projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
io_uring: update to newer API
[fio.git]
/
os
/
io_uring.h
diff --git
a/os/io_uring.h
b/os/io_uring.h
index e1d3df0bef60d63cdb579b6f97cd363438fc1e9f..74370aed5f7125c9508d661e4df251a74e536e22 100644
(file)
--- 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 */
*/
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 */
__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 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 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
*/
};
/*
* 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
/*
* 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_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 {
/*
* 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;
};
__s32 res; /* result code for this event */
__u32 flags;
};
@@
-87,6
+93,9
@@
struct io_sqring_offsets {
__u32 resv[3];
};
__u32 resv[3];
};
+/*
+ * sq_ring->flags
+ */
#define IORING_SQ_NEED_WAKEUP (1 << 0) /* needs io_uring_enter wakeup */
struct io_cqring_offsets {
#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;
struct io_uring_register_buffers {
struct iovec *iovecs;
-
unsigned
nr_iovecs;
+
__u32
nr_iovecs;
};
struct io_uring_register_files {
};
struct io_uring_register_files {
-
int
*fds;
-
unsigned
nr_fds;
+
__s32
*fds;
+
__u32
nr_fds;
};
#endif
};
#endif