io_uring: add IORING_FEAT_FILES_SKIP feature flag
PATCH 1/1 io_uring: add IORING_FEAT_FILES_SKIP feature flag
This signals that the kernel supports IORING_REGISTER_FILES_SKIP.
--- fs/io_uring.c | 3 ++- include/uapi/linux/io_uring.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)
fs/io_uring.c +2 -1
@@ -9659,7 +9659,8 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,IORING_FEAT_SUBMIT_STABLE |IORING_FEAT_RW_CUR_POS |IORING_FEAT_CUR_PERSONALITY |IORING_FEAT_FAST_POLL |IORING_FEAT_POLL_32BITS |IORING_FEAT_SQPOLL_NONFIXED | -IORING_FEAT_EXT_ARG |IORING_FEAT_NATIVE_WORKERS ; +IORING_FEAT_EXT_ARG |IORING_FEAT_NATIVE_WORKERS | +IORING_FEAT_FILES_SKIP ;if (copy_to_user (params, p,sizeof (*p))) { ret = -EFAULT ;
include/uapi/linux/io_uring.h +1 -0
@@ -280,6 +280,7 @@ struct io_uring_params {#define IORING_FEAT_SQPOLL_NONFIXED (1U << 7)#define IORING_FEAT_EXT_ARG (1U << 8)#define IORING_FEAT_NATIVE_WORKERS (1U << 9) +#define IORING_FEAT_FILES_SKIP (1U << 10)/* * io_uring_register(2) opcodes and arguments
Signature · 1 line
2.31.1
Quoted 1 line · Drew DeVault
This signals that the kernel supports
IORING_REGISTER_FILES_SKIP.
#define IORING_FEAT_FILES_SKIP IORING_FEAT_NATIVE_WORKERS
Maybe even solely in liburing. Any reason to have them separately? We keep compatibility anyway
Quoted 33 lines
Signed-off-by Drew DeVault <[email protected]>--- fs/io_uring.c | 3 ++- include/uapi/linux/io_uring.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-)fs/io_uring.c +2
-1@@ -9659,7 +9659,8 @@ static int io_uring_create(unsigned entries, struct io_uring_params *p,IORING_FEAT_SUBMIT_STABLE |IORING_FEAT_RW_CUR_POS |IORING_FEAT_CUR_PERSONALITY |IORING_FEAT_FAST_POLL |IORING_FEAT_POLL_32BITS |IORING_FEAT_SQPOLL_NONFIXED | -IORING_FEAT_EXT_ARG |IORING_FEAT_NATIVE_WORKERS ; +IORING_FEAT_EXT_ARG |IORING_FEAT_NATIVE_WORKERS | +IORING_FEAT_FILES_SKIP ;if (copy_to_user (params, p,sizeof (*p))) { ret = -EFAULT ;include/uapi/linux/io_uring.h +1
-0@@ -280,6 +280,7 @@ struct io_uring_params {#define IORING_FEAT_SQPOLL_NONFIXED (1U << 7)#define IORING_FEAT_EXT_ARG (1U << 8)#define IORING_FEAT_NATIVE_WORKERS (1U << 9) +#define IORING_FEAT_FILES_SKIP (1U << 10)/* * io_uring_register(2) opcodes and arguments
Signature · 1 line
Pavel Begunkov
Quoted 7 lines · Pavel Begunkov
Quoted 1 line · Drew DeVault
This signals that the kernel supports
IORING_REGISTER_FILES_SKIP.#define
IORING_FEAT_FILES_SKIPIORING_FEAT_NATIVE_WORKERSMaybe even solely in liburing. Any reason to have them separately? We keep compatibility anyway
What is the relationship between IORING_FEAT_NATIVE_WORKERS and IORING_REGISTER_FILES_SKIP? Actually, what is NATIVE_WORKERS? The documentation is sparse on this detail.
Quoted 4 lines · Drew DeVault
Quoted 3 lines · Pavel Begunkov
Quoted 1 line · Drew DeVault
This signals that the kernel supports
IORING_REGISTER_FILES_SKIP.
Quoted 8 lines
Quoted 4 lines
#define
IORING_FEAT_FILES_SKIPIORING_FEAT_NATIVE_WORKERSMaybe even solely in liburing. Any reason to have them separately? We keep compatibility anyway
What is the relationship between
IORING_FEAT_NATIVE_WORKERSandIORING_REGISTER_FILES_SKIP? Actually, what isNATIVE_WORKERS? The documentation is sparse on this detail.
They are not related by both came in 5.12, so if you have one you have another
Signature · 1 line
Pavel Begunkov
Quoted 6 lines · Pavel Begunkov
Quoted 3 lines
What is the relationship between
IORING_FEAT_NATIVE_WORKERSandIORING_REGISTER_FILES_SKIP? Actually, what isNATIVE_WORKERS? The documentation is sparse on this detail.They are not related by both came in 5.12, so if you have one you have another
Gotcha. I'm open to a simple alias in liburing, in that case. I'll send a new patch tomorrow morning.
Quoted 10 lines · Drew DeVault
Quoted 6 lines · Pavel Begunkov
Quoted 3 lines
What is the relationship between
IORING_FEAT_NATIVE_WORKERSandIORING_REGISTER_FILES_SKIP? Actually, what isNATIVE_WORKERS? The documentation is sparse on this detail.They are not related by both came in 5.12, so if you have one you have another
Gotcha. I'm open to a simple alias in liburing, in that case. I'll send a new patch tomorrow morning.
At least there won't be one release delay between feature and the flag this way as it can't lend earlier than 5.13
Signature · 1 line
Pavel Begunkov