io-uring.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Drew DeVault <sir@cmpwn.com>
To: io-uring@vger.kernel.org
Cc: Drew DeVault <sir@cmpwn.com>, noah <goldstein.w.n@gmail.com>,
	"Jens Axboe" <axboe@kernel.dk>,
	"Pavel Begunkov" <asml.silence@gmail.com>
Subject: [PATCH] Add IORING_FEAT_FILES_SKIP feature flag
Date: Tue, 18 May 2021 12:12:41 -0400	[thread overview]
Message-ID: <20210518161241.10532-1-sir@cmpwn.com> (raw)

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 <sir@cmpwn.com>
---
 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


             reply	other threads:[~2021-05-18 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18 16:12 Drew DeVault [this message]
2021-05-20 13:32 ` [PATCH] Add IORING_FEAT_FILES_SKIP feature flag Jens Axboe
2021-05-20 21:55   ` Drew DeVault
2021-05-20 22:54     ` Pavel Begunkov
2021-05-20 23:09       ` Drew DeVault

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518161241.10532-1-sir@cmpwn.com \
    --to=sir@cmpwn.com \
    --cc=asml.silence@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=goldstein.w.n@gmail.com \
    --cc=io-uring@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).