summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-10 09:39:14 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-10 09:39:14 -0700
commita70865917e2a550d0b84721e789b334d612b2de6 (patch)
tree0e0d7e3077feec51cd4551a3ea7e905d22194c59 /os
parent650346e17d045366b817814dd3e10dc94d0d990f (diff)
downloadfio-a70865917e2a550d0b84721e789b334d612b2de6.tar.gz
fio-a70865917e2a550d0b84721e789b334d612b2de6.tar.bz2
Update to newer io_uring API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os')
-rw-r--r--os/io_uring.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/os/io_uring.h b/os/io_uring.h
index 20e4c22e..b07bbbb3 100644
--- a/os/io_uring.h
+++ b/os/io_uring.h
@@ -15,20 +15,23 @@
* IO submission data structure (Submission Queue Entry)
*/
struct io_uring_sqe {
- __u8 opcode;
- __u8 flags;
- __u16 ioprio;
- __s32 fd;
- __u64 off;
+ __u8 opcode; /* type of operation for this sqe */
+ __u8 flags; /* as of now unused */
+ __u16 ioprio; /* ioprio for the request */
+ __s32 fd; /* file descriptor to do IO on */
+ __u64 off; /* offset into file */
union {
- void *addr;
+ void *addr; /* buffer or iovecs */
__u64 __pad;
};
- __u32 len;
+ __u32 len; /* buffer size or number of iovecs */
union {
__kernel_rwf_t rw_flags;
__u32 __resv;
};
+ __u16 index; /* index into fixed buffers, if used */
+ __u16 __pad2[3];
+ __u64 data; /* data to be passed back at completion time */
};
/*
@@ -50,7 +53,7 @@ struct io_uring_sqe {
* IO completion data structure (Completion Queue Entry)
*/
struct io_uring_cqe {
- __u64 index; /* what sqe this event came from */
+ __u64 data; /* sqe->data submission passed back */
__s32 res; /* result code for this event */
__u32 flags;
};