Re: [PATCHv4 2/5] io_uring: add support for kernel registered bvecs

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

 



On 2/19/25 01:54, Caleb Sander Mateos wrote:
On Tue, Feb 18, 2025 at 2:42 PM Keith Busch <kbusch@xxxxxxxx> wrote:
...
diff --git a/include/linux/io_uring_types.h b/include/linux/io_uring_types.h
index 0bcaefc4ffe02..2aed51e8c79ee 100644
--- a/include/linux/io_uring_types.h
+++ b/include/linux/io_uring_types.h
@@ -709,4 +709,10 @@ static inline bool io_ctx_cqe32(struct io_ring_ctx *ctx)
         return ctx->flags & IORING_SETUP_CQE32;
  }

+int io_buffer_register_bvec(struct io_ring_ctx *ctx, struct request *rq,
+                           void (*release)(void *), unsigned int index,
+                           unsigned int issue_flags);
+void io_buffer_unregister_bvec(struct io_ring_ctx *ctx, unsigned int index,
+                              unsigned int issue_flags);

Hmm, io_uring_types.h seems like a strange place for these. The rest
of this file consists of types and inline functions. Maybe
io_uring/rsrc.h would make more sense?

There is linux/io_uring/cmd.h for that

And it should be taking struct io_uring_cmd. ublk shouldn't
know anything about ctx, and this line from the following
patch in not allowed.

struct io_ring_ctx *ctx = cmd_to_io_kiocb(cmd)->ctx;

--
Pavel Begunkov





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux