public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH] Add IORING_FEAT_FILES_SKIP feature flag
@ 2021-05-18 16:12 Drew DeVault
  2021-05-20 13:32 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Drew DeVault @ 2021-05-18 16:12 UTC (permalink / raw)
  To: io-uring; +Cc: Drew DeVault, noah, Jens Axboe, Pavel Begunkov

This is aliased to IORING_FEAT_NATIVE_WORKERS, which was shipped in the
same kernel release. A separate flag is useful because the features are
unrelated, so user code testing for IORING_FEAT_NATIVE_WORKERS before
using FILES_SKIP is not very obvious in intent.

Signed-off-by: Drew DeVault <[email protected]>
---
 man/io_uring_register.2         | 10 ++++++++--
 src/include/liburing/io_uring.h |  1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/man/io_uring_register.2 b/man/io_uring_register.2
index 5326a87..c71ce40 100644
--- a/man/io_uring_register.2
+++ b/man/io_uring_register.2
@@ -156,8 +156,14 @@ since 5.5.
 File descriptors can be skipped if they are set to
 .B IORING_REGISTER_FILES_SKIP.
 Skipping an fd will not touch the file associated with the previous
-fd at that index. Available since 5.12.
-
+fd at that index. Available since 5.12. Availability of this feature is
+indicated by the presence of the
+.B IORING_FEAT_FILES_SKIP
+bit in the
+.I features
+field of the
+.I io_uring_params
+structure.
 
 .TP
 .B IORING_UNREGISTER_FILES
diff --git a/src/include/liburing/io_uring.h b/src/include/liburing/io_uring.h
index 5a3cb90..091dcf7 100644
--- a/src/include/liburing/io_uring.h
+++ b/src/include/liburing/io_uring.h
@@ -285,6 +285,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		IORING_FEAT_NATIVE_WORKERS
 
 /*
  * io_uring_register(2) opcodes and arguments
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-20 23:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-18 16:12 [PATCH] Add IORING_FEAT_FILES_SKIP feature flag Drew DeVault
2021-05-20 13:32 ` Jens Axboe
2021-05-20 21:55   ` Drew DeVault
2021-05-20 22:54     ` Pavel Begunkov
2021-05-20 23:09       ` Drew DeVault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox