Pull io_uring updates from Jens Axboe: "Not a lot in terms of features this time around, mostly just cleanups and code consolidation: - Support for PI meta data read/write via io_uring, with NVMe and SCSI covered - Cleanup the per-op structure caching, making it consistent across various command types - Consolidate the various user mapped features into a concept called regions, making the various users of that consistent - Various cleanups and fixes" * tag 'for-6.14/io_uring-20250119' of git://git.kernel.dk/linux: (56 commits) io_uring/fdinfo: fix io_uring_show_fdinfo() misuse of ->d_iname io_uring: reuse io_should_terminate_tw() for cmds io_uring: Factor out a function to parse restrictions io_uring/rsrc: require cloned buffers to share accounting contexts io_uring: simplify the SQPOLL thread check when cancelling requests io_uring: expose read/write attribute capability io_uring/rw: don't gate retry on completion context io_uring/rw: handle -EAGAIN retry at IO completion time io_uring/rw: use io_rw_recycle() from cleanup path io_uring/rsrc: simplify the bvec iter count calculation io_uring: ensure io_queue_deferred() is out-of-line io_uring/rw: always clear ->bytes_done on io_async_rw setup io_uring/rw: use NULL for rw->free_iovec assigment io_uring/rw: don't mask in f_iocb_flags io_uring/msg_ring: Drop custom destructor io_uring: Move old async data allocation helper to header io_uring/rw: Allocate async data through helper io_uring/net: Allocate msghdr async data through helper io_uring/uring_cmd: Allocate async data through generic helper io_uring/poll: Allocate apoll with generic alloc_cache helper ...
Showing the changes to include/uapi/linux (2 of 32 files). Show all
Unified · Split
| @@ -40,6 +40,15 @@ · 39 unmodified lines | ||
| 40 | 40 | #define BLOCK_SIZE_BITS 10 |
| 41 | 41 | #define BLOCK_SIZE (1<<BLOCK_SIZE_BITS) |
| 42 | 42 | |
| 43 | +/* flags for integrity meta */ | |
| 44 | +#define IO_INTEGRITY_CHK_GUARD (1U << 0) /* enforce guard check */ | |
| 45 | +#define IO_INTEGRITY_CHK_REFTAG (1U << 1) /* enforce ref check */ | |
| 46 | +#define IO_INTEGRITY_CHK_APPTAG (1U << 2) /* enforce app check */ | |
| 47 | + | |
| 48 | +#define IO_INTEGRITY_VALID_FLAGS (IO_INTEGRITY_CHK_GUARD | \ | |
| 49 | + IO_INTEGRITY_CHK_REFTAG | \ | |
| 50 | + IO_INTEGRITY_CHK_APPTAG) | |
| 51 | + | |
| 43 | 52 | #define SEEK_SET 0 /* seek relative to beginning of file */ |
| 44 | 53 | #define SEEK_CUR 1 /* seek relative to current file position */ |
| 45 | 54 | #define SEEK_END 2 /* seek relative to end of file */ |
| @@ -98,6 +98,10 @@ struct io_uring_sqe { · 97 unmodified lines | ||
| 98 | 98 | __u64 addr3; |
| 99 | 99 | __u64 __pad2[1]; |
| 100 | 100 | }; |
| 101 | + struct { | |
| 102 | + __u64 attr_ptr; /* pointer to attribute information */ | |
| 103 | + __u64 attr_type_mask; /* bit mask of attributes */ | |
| 104 | + }; | |
| 101 | 105 | __u64 optval; |
| 102 | 106 | /* |
| 103 | 107 | * If the ring is initialized with IORING_SETUP_SQE128, then |
| @@ -107,6 +111,18 @@ struct io_uring_sqe { · 3 unmodified lines | ||
| 107 | 111 | }; |
| 108 | 112 | }; |
| 109 | 113 | |
| 114 | +/* sqe->attr_type_mask flags */ | |
| 115 | +#define IORING_RW_ATTR_FLAG_PI (1U << 0) | |
| 116 | +/* PI attribute information */ | |
| 117 | +struct io_uring_attr_pi { | |
| 118 | + __u16 flags; | |
| 119 | + __u16 app_tag; | |
| 120 | + __u32 len; | |
| 121 | + __u64 addr; | |
| 122 | + __u64 seed; | |
| 123 | + __u64 rsvd; | |
| 124 | +}; | |
| 125 | + | |
| 110 | 126 | /* |
| 111 | 127 | * If sqe->file_index is set to this for opcodes that instantiate a new |
| 112 | 128 | * direct descriptor (like openat/openat2/accept), then io_uring will allocate |
| @@ -561,6 +577,7 @@ struct io_uring_params { · 448 unmodified lines | ||
| 561 | 577 | #define IORING_FEAT_REG_REG_RING (1U << 13) |
| 562 | 578 | #define IORING_FEAT_RECVSEND_BUNDLE (1U << 14) |
| 563 | 579 | #define IORING_FEAT_MIN_TIMEOUT (1U << 15) |
| 580 | +#define IORING_FEAT_RW_ATTR (1U << 16) | |
| 564 | 581 | |
| 565 | 582 | /* |
| 566 | 583 | * io_uring_register(2) opcodes and arguments |