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