From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 1/2] Add io_uring_prep_msg_ring_fd_alloc() helper
Date: Thu, 16 Mar 2023 13:09:20 +0000 [thread overview]
Message-ID: <9237f9399e4d8fcc9c8c1996905168138f99d2b3.1678968783.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
Add a helper initialising msg-ring requests transferring files and
allocating a target file index.
Signed-off-by: Pavel Begunkov <[email protected]>
---
src/include/liburing.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/include/liburing.h b/src/include/liburing.h
index bf48141..0848cf0 100644
--- a/src/include/liburing.h
+++ b/src/include/liburing.h
@@ -1015,6 +1015,15 @@ IOURINGINLINE void io_uring_prep_msg_ring_fd(struct io_uring_sqe *sqe, int fd,
sqe->msg_ring_flags = flags;
}
+IOURINGINLINE void io_uring_prep_msg_ring_fd_alloc(struct io_uring_sqe *sqe,
+ int fd, int source_fd,
+ __u64 data, unsigned int flags)
+{
+ io_uring_prep_msg_ring_fd(sqe, fd, source_fd,
+ IORING_FILE_INDEX_ALLOC - 1,
+ data, flags);
+}
+
IOURINGINLINE void io_uring_prep_getxattr(struct io_uring_sqe *sqe,
const char *name, char *value,
const char *path, unsigned int len)
--
2.39.1
next prev parent reply other threads:[~2023-03-16 13:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 13:09 [PATCH liburing for-next 0/2] fd msg-ring slot allocation tests Pavel Begunkov
2023-03-16 13:09 ` Pavel Begunkov [this message]
2023-03-16 15:01 ` [PATCH liburing 1/2] Add io_uring_prep_msg_ring_fd_alloc() helper Jens Axboe
2023-03-16 13:09 ` [PATCH liburing 2/2] test: test fd msg-ring allocating indexes Pavel Begunkov
2023-03-16 15:02 ` [PATCH liburing for-next 0/2] fd msg-ring slot allocation tests Jens Axboe
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=9237f9399e4d8fcc9c8c1996905168138f99d2b3.1678968783.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/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