From: Pavel Begunkov <[email protected]>
To: [email protected]
Cc: [email protected], Caleb Sander Mateos <[email protected]>
Subject: [PATCH v2 2/4] io_uring/rw: rename io_import_iovec()
Date: Mon, 24 Feb 2025 19:45:04 +0000 [thread overview]
Message-ID: <91cea59340b61a8f52dc7b8e720274577a25188c.1740425922.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
io_import_iovec() is not limited to iovecs but also imports buffers for
normal reads and selected buffers, rename it for clarity.
Signed-off-by: Pavel Begunkov <[email protected]>
---
io_uring/rw.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/io_uring/rw.c b/io_uring/rw.c
index 7efc2337c5a0..e636be4850a7 100644
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@ -76,7 +76,7 @@ static int io_iov_buffer_select_prep(struct io_kiocb *req)
return 0;
}
-static int __io_import_iovec(int ddir, struct io_kiocb *req,
+static int __io_import_rw_buffer(int ddir, struct io_kiocb *req,
struct io_async_rw *io,
unsigned int issue_flags)
{
@@ -122,13 +122,13 @@ static int __io_import_iovec(int ddir, struct io_kiocb *req,
return 0;
}
-static inline int io_import_iovec(int rw, struct io_kiocb *req,
- struct io_async_rw *io,
- unsigned int issue_flags)
+static inline int io_import_rw_buffer(int rw, struct io_kiocb *req,
+ struct io_async_rw *io,
+ unsigned int issue_flags)
{
int ret;
- ret = __io_import_iovec(rw, req, io, issue_flags);
+ ret = __io_import_rw_buffer(rw, req, io, issue_flags);
if (unlikely(ret < 0))
return ret;
@@ -207,7 +207,7 @@ static int io_prep_rw_setup(struct io_kiocb *req, int ddir, bool do_import)
return 0;
rw = req->async_data;
- return io_import_iovec(ddir, req, rw, 0);
+ return io_import_rw_buffer(ddir, req, rw, 0);
}
static inline void io_meta_save_state(struct io_async_rw *io)
@@ -845,7 +845,7 @@ static int __io_read(struct io_kiocb *req, unsigned int issue_flags)
loff_t *ppos;
if (io_do_buffer_select(req)) {
- ret = io_import_iovec(ITER_DEST, req, io, issue_flags);
+ ret = io_import_rw_buffer(ITER_DEST, req, io, issue_flags);
if (unlikely(ret < 0))
return ret;
}
--
2.48.1
next prev parent reply other threads:[~2025-02-24 19:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 19:45 [PATCH v2 0/4] clean up rw buffer import Pavel Begunkov
2025-02-24 19:45 ` [PATCH v2 1/4] io_uring/rw: allocate async data in io_prep_rw() Pavel Begunkov
2025-02-24 19:45 ` Pavel Begunkov [this message]
2025-02-24 19:45 ` [PATCH v2 3/4] io_uring/rw: extract helper for iovec import Pavel Begunkov
2025-02-24 19:45 ` [PATCH v2 4/4] io_uring/rw: open code io_prep_rw_setup() Pavel Begunkov
2025-02-25 14:43 ` [PATCH v2 0/4] clean up rw buffer import 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=91cea59340b61a8f52dc7b8e720274577a25188c.1740425922.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