diff options
author | Aarushi Mehta | 2020-01-20 15:18:47 +0100 |
---|---|---|
committer | Stefan Hajnoczi | 2020-01-30 21:59:41 +0100 |
commit | 6663a0a33764613bfa0bcac5cc7a6f14bd04ee34 (patch) | |
tree | 2c6f442754f7ddb40934afeec4a622d52ad53450 /include/block/raw-aio.h | |
parent | block/block: add BDRV flag for io_uring (diff) | |
download | qemu-6663a0a33764613bfa0bcac5cc7a6f14bd04ee34.tar.gz qemu-6663a0a33764613bfa0bcac5cc7a6f14bd04ee34.tar.xz qemu-6663a0a33764613bfa0bcac5cc7a6f14bd04ee34.zip |
block/io_uring: implements interfaces for io_uring
Aborts when sqe fails to be set as sqes cannot be returned to the
ring. Adds slow path for short reads for older kernels
Signed-off-by: Aarushi Mehta <mehta.aaru20@gmail.com>
Acked-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20200120141858.587874-5-stefanha@redhat.com
Message-Id: <20200120141858.587874-5-stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/block/raw-aio.h')
-rw-r--r-- | include/block/raw-aio.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/block/raw-aio.h b/include/block/raw-aio.h index 4629f24d08..251b10d273 100644 --- a/include/block/raw-aio.h +++ b/include/block/raw-aio.h @@ -57,6 +57,18 @@ void laio_attach_aio_context(LinuxAioState *s, AioContext *new_context); void laio_io_plug(BlockDriverState *bs, LinuxAioState *s); void laio_io_unplug(BlockDriverState *bs, LinuxAioState *s); #endif +/* io_uring.c - Linux io_uring implementation */ +#ifdef CONFIG_LINUX_IO_URING +typedef struct LuringState LuringState; +LuringState *luring_init(Error **errp); +void luring_cleanup(LuringState *s); +int coroutine_fn luring_co_submit(BlockDriverState *bs, LuringState *s, int fd, + uint64_t offset, QEMUIOVector *qiov, int type); +void luring_detach_aio_context(LuringState *s, AioContext *old_context); +void luring_attach_aio_context(LuringState *s, AioContext *new_context); +void luring_io_plug(BlockDriverState *bs, LuringState *s); +void luring_io_unplug(BlockDriverState *bs, LuringState *s); +#endif #ifdef _WIN32 typedef struct QEMUWin32AIOState QEMUWin32AIOState; |