Skip to content

Commit 94d5744

Browse files
Anuj Guptaaxboe
authored andcommitted
io_uring: expose read/write attribute capability
After commit 9a213d3, we can pass additional attributes along with read/write. However, userspace doesn't know that. Add a new feature flag IORING_FEAT_RW_ATTR, to notify the userspace that the kernel has this ability. Signed-off-by: Anuj Gupta <[email protected]> Reviewed-by: Li Zetao <[email protected]> Reviewed-by: Martin K. Petersen <[email protected]> Tested-by: Martin K. Petersen <[email protected]> Reviewed-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent b08e020 commit 94d5744

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

include/uapi/linux/io_uring.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -577,6 +577,7 @@ struct io_uring_params {
577577
#define IORING_FEAT_REG_REG_RING (1U << 13)
578578
#define IORING_FEAT_RECVSEND_BUNDLE (1U << 14)
579579
#define IORING_FEAT_MIN_TIMEOUT (1U << 15)
580+
#define IORING_FEAT_RW_ATTR (1U << 16)
580581

581582
/*
582583
* io_uring_register(2) opcodes and arguments

io_uring/io_uring.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3713,7 +3713,8 @@ static __cold int io_uring_create(unsigned entries, struct io_uring_params *p,
37133713
IORING_FEAT_EXT_ARG | IORING_FEAT_NATIVE_WORKERS |
37143714
IORING_FEAT_RSRC_TAGS | IORING_FEAT_CQE_SKIP |
37153715
IORING_FEAT_LINKED_FILE | IORING_FEAT_REG_REG_RING |
3716-
IORING_FEAT_RECVSEND_BUNDLE | IORING_FEAT_MIN_TIMEOUT;
3716+
IORING_FEAT_RECVSEND_BUNDLE | IORING_FEAT_MIN_TIMEOUT |
3717+
IORING_FEAT_RW_ATTR;
37173718

37183719
if (copy_to_user(params, p, sizeof(*p))) {
37193720
ret = -EFAULT;

0 commit comments

Comments
 (0)