Skip to content

Commit c4212f3

Browse files
committed
io_uring: flag the fact that linked file assignment is sane
Give applications a way to tell if the kernel supports sane linked files, as in files being assigned at the right time to be able to reliably do <open file direct into slot X><read file from slot X> while using IOSQE_IO_LINK to order them. Not really a bug fix, but flag it as such so that it gets pulled in with backports of the deferred file assignment. Fixes: 6bf9c47 ("io_uring: defer file assignment") Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent ce522ba commit c4212f3

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

fs/io_uring.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11178,7 +11178,8 @@ static __cold int io_uring_create(unsigned entries, struct io_uring_params *p,
1117811178
IORING_FEAT_CUR_PERSONALITY | IORING_FEAT_FAST_POLL |
1117911179
IORING_FEAT_POLL_32BITS | IORING_FEAT_SQPOLL_NONFIXED |
1118011180
IORING_FEAT_EXT_ARG | IORING_FEAT_NATIVE_WORKERS |
11181-
IORING_FEAT_RSRC_TAGS | IORING_FEAT_CQE_SKIP;
11181+
IORING_FEAT_RSRC_TAGS | IORING_FEAT_CQE_SKIP |
11182+
IORING_FEAT_LINKED_FILE;
1118211183

1118311184
if (copy_to_user(params, p, sizeof(*p))) {
1118411185
ret = -EFAULT;

include/uapi/linux/io_uring.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,7 @@ struct io_uring_params {
296296
#define IORING_FEAT_NATIVE_WORKERS (1U << 9)
297297
#define IORING_FEAT_RSRC_TAGS (1U << 10)
298298
#define IORING_FEAT_CQE_SKIP (1U << 11)
299+
#define IORING_FEAT_LINKED_FILE (1U << 12)
299300

300301
/*
301302
* io_uring_register(2) opcodes and arguments

0 commit comments

Comments
 (0)