Let the user of the io_uring interface specify a slice of iovecs to read
from or write to when queueing an operation to the ring.
These ops can be used by block that has a Vec of iovecs from the
descriptor chain already.
Change-Id: Ia91e03e441cdae03e4fdba33bb601de006ef53ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2140914
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Switch from returning an i32 to a u32. This will make handling the
number easier for users, as they can assume it is >= 0.
Any value < 0 would not be returned as Ok(value) anyways as ret < 0 is
used for error conditions.
Change-Id: I609ce55d3c6be6e28f4d7aadf7148b2ac3b18878
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2140913
Reviewed-by: Chirantan Ekbote <chirantan@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Tested-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Provide a low-level interface to operating the new io_uring interface.
This is an unsafe interface with the basic operations of setting up the
ring, adding to it, removing from it, and polling it.
This will be followed by a safe interface layer on top of this code,
then by additions to the asynchronous executor that allow for
asynchronously doing multiple operations to files from one context.
Change-Id: I71f7ffb04ce8cb4da470deda9aee768ab95d3d98
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2124009
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: Dylan Reid <dgreid@chromium.org>
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Dylan Reid <dgreid@chromium.org>