7 * IO submission data structure
21 __kernel_rwf_t rw_flags;
27 * io_uring_setup() flags
29 #define IORING_SETUP_IOPOLL (1 << 0) /* io_context is polled */
30 #define IORING_SETUP_FIXEDBUFS (1 << 1) /* IO buffers are fixed */
31 #define IORING_SETUP_SQTHREAD (1 << 2) /* Use SQ thread */
32 #define IORING_SETUP_SQWQ (1 << 3) /* Use SQ workqueue */
33 #define IORING_SETUP_SQPOLL (1 << 4) /* SQ thread polls */
35 #define IORING_OP_READ 1
36 #define IORING_OP_WRITE 2
37 #define IORING_OP_FSYNC 3
38 #define IORING_OP_FDSYNC 4
39 #define IORING_OP_READ_FIXED 5
40 #define IORING_OP_WRITE_FIXED 6
43 * IO completion data structure
45 struct io_uring_event {
46 __u64 index; /* what iocb this event came from */
47 s32 res; /* result code for this event */
51 #define IOEV_FLAG_CACHEHIT (1 << 0) /* IO did not hit media */
54 * Magic offsets for the application to mmap the data it needs
56 #define IORING_OFF_SQ_RING 0ULL
57 #define IORING_OFF_CQ_RING 0x8000000ULL
58 #define IORING_OFF_IOCB 0x10000000ULL
61 * Filled with the offset for mmap(2)
63 struct io_sqring_offsets {
74 #define IORING_SQ_NEED_WAKEUP (1 << 0) /* needs io_uring_enter wakeup */
76 struct io_cqring_offsets {
86 #define IORING_ENTER_GETEVENTS (1 << 0)
89 * Passed in for io_uring_setup(2). Copied back with updated info on success
91 struct io_uring_params {
97 struct io_sqring_offsets sq_off;
98 struct io_cqring_offsets cq_off;