From: Pavel Begunkov <[email protected]>
To: Caleb Sander Mateos <[email protected]>
Cc: [email protected]
Subject: Re: [PATCH 3/4] io_uring/rw: extract helper for iovec import
Date: Mon, 24 Feb 2025 19:11:21 +0000 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <CADUfDZp5FJ52F4SUejCcXO4YzM8r411_MwT3sRRTWQBeo89pmQ@mail.gmail.com>
On 2/24/25 16:48, Caleb Sander Mateos wrote:
> On Mon, Feb 24, 2025 at 8:07 AM Pavel Begunkov <[email protected]> wrote:
>>
>> Split out a helper out of __io_import_rw_buffer() that handles vectored
>> buffers. I'll need it for registered vectored buffers, but it also looks
>> cleaner, especially with parameters being properly named.
>>
>> Signed-off-by: Pavel Begunkov <[email protected]>
>> ---
>> io_uring/rw.c | 57 ++++++++++++++++++++++++++++-----------------------
>> 1 file changed, 31 insertions(+), 26 deletions(-)
>>
>> diff --git a/io_uring/rw.c b/io_uring/rw.c
>> index e636be4850a7..0e0d2a19f21d 100644
>> --- a/io_uring/rw.c
>> +++ b/io_uring/rw.c
>> @@ -76,41 +76,23 @@ static int io_iov_buffer_select_prep(struct io_kiocb *req)
>> return 0;
>> }
>>
>> -static int __io_import_rw_buffer(int ddir, struct io_kiocb *req,
>> - struct io_async_rw *io,
>> - unsigned int issue_flags)
>> +static int io_import_vec(int ddir, struct io_kiocb *req,
>> + struct io_async_rw *io, void __user *uvec,
>> + size_t uvec_segs)
>
> Could use a more specific type for uvec: const struct iovec __user *uvec?
Indeed
--
Pavel Begunkov
next prev parent reply other threads:[~2025-02-24 19:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-24 16:07 [PATCH 0/4] clean up rw buffer import Pavel Begunkov
2025-02-24 16:07 ` [PATCH 1/4] io_uring/rw: allocate async data in io_prep_rw() Pavel Begunkov
2025-02-24 16:52 ` Caleb Sander Mateos
2025-02-24 19:21 ` Pavel Begunkov
2025-02-24 19:44 ` Pavel Begunkov
2025-02-24 16:07 ` [PATCH 2/4] io_uring/rw: rename io_import_iovec() Pavel Begunkov
2025-02-24 16:07 ` [PATCH 3/4] io_uring/rw: extract helper for iovec import Pavel Begunkov
2025-02-24 16:48 ` Caleb Sander Mateos
2025-02-24 19:11 ` Pavel Begunkov [this message]
2025-02-24 16:07 ` [PATCH 4/4] io_uring/rw: open code io_prep_rw_setup() Pavel Begunkov
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 \
[email protected] \
[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