summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2019-01-11 10:33:28 -0700
committerJens Axboe <axboe@kernel.dk>2019-01-11 10:33:28 -0700
commit48e698fa59d6258f989d56890851d7658566aefc (patch)
tree741a284515f36bf0d74bb080c4d6b4b26b9408ee /os
parenta7abc9fb769596d3bbf6d779e99d1cb8c1fcd49b (diff)
downloadfio-48e698fa59d6258f989d56890851d7658566aefc.tar.gz
fio-48e698fa59d6258f989d56890851d7658566aefc.tar.bz2
io_uring: update to newer API
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'os')
-rw-r--r--os/io_uring.h31
1 files changed, 20 insertions, 11 deletions
diff --git a/os/io_uring.h b/os/io_uring.h
index e1d3df0b..74370aed 100644
--- a/os/io_uring.h
+++ b/os/io_uring.h
@@ -16,7 +16,7 @@
*/
struct io_uring_sqe {
__u8 opcode; /* type of operation for this sqe */
- __u8 flags; /* IOSQE_ flags below */
+ __u8 flags; /* IOSQE_ flags */
__u16 ioprio; /* ioprio for the request */
__s32 fd; /* file descriptor to do IO on */
__u64 off; /* offset into file */
@@ -27,18 +27,18 @@ struct io_uring_sqe {
__u32 len; /* buffer size or number of iovecs */
union {
__kernel_rwf_t rw_flags;
- __u32 __resv;
+ __u32 fsync_flags;
};
__u16 buf_index; /* index into fixed buffers, if used */
- __u16 __pad2[3];
- __u64 data; /* data to be passed back at completion time */
+ __u16 __pad2;
+ __u32 __pad3;
+ __u64 user_data; /* data to be passed back at completion time */
};
/*
* sqe->flags
*/
-#define IOSQE_FIXED_BUFFER (1 << 0) /* use fixed buffer */
-#define IOSQE_FIXED_FILE (1 << 1) /* use fixed fileset */
+#define IOSQE_FIXED_FILE (1 << 0) /* use fixed fileset */
/*
* io_uring_setup() flags
@@ -50,13 +50,19 @@ struct io_uring_sqe {
#define IORING_OP_READV 1
#define IORING_OP_WRITEV 2
#define IORING_OP_FSYNC 3
-#define IORING_OP_FDSYNC 4
+#define IORING_OP_READ_FIXED 4
+#define IORING_OP_WRITE_FIXED 5
+
+/*
+ * sqe->fsync_flags
+ */
+#define IORING_FSYNC_DATASYNC (1 << 0)
/*
* IO completion data structure (Completion Queue Entry)
*/
struct io_uring_cqe {
- __u64 data; /* sqe->data submission passed back */
+ __u64 user_data; /* sqe->data submission passed back */
__s32 res; /* result code for this event */
__u32 flags;
};
@@ -87,6 +93,9 @@ struct io_sqring_offsets {
__u32 resv[3];
};
+/*
+ * sq_ring->flags
+ */
#define IORING_SQ_NEED_WAKEUP (1 << 0) /* needs io_uring_enter wakeup */
struct io_cqring_offsets {
@@ -127,12 +136,12 @@ struct io_uring_params {
struct io_uring_register_buffers {
struct iovec *iovecs;
- unsigned nr_iovecs;
+ __u32 nr_iovecs;
};
struct io_uring_register_files {
- int *fds;
- unsigned nr_fds;
+ __s32 *fds;
+ __u32 nr_fds;
};
#endif