Re: [PATCH 3/4] io_uring/rw: extract helper for iovec import

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/24/25 16:48, Caleb Sander Mateos wrote:
On Mon, Feb 24, 2025 at 8:07 AM Pavel Begunkov <asml.silence@xxxxxxxxx> 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 <asml.silence@xxxxxxxxx>
---
  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





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux