On 2/24/25 21:31, Keith Busch wrote:
From: Keith Busch <kbusch@xxxxxxxxxx> Registered buffers may depend on a linked command, which makes the prep path too early to import. Move to the issue path when the node is actually needed like all the other users of fixed buffers. Signed-off-by: Keith Busch <kbusch@xxxxxxxxxx> --- io_uring/opdef.c | 8 ++++---- io_uring/rw.c | 43 ++++++++++++++++++++++++++----------------- io_uring/rw.h | 4 ++-- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/io_uring/opdef.c b/io_uring/opdef.c index 9344534780a02..5369ae33b5ad9 100644 --- a/io_uring/opdef.c +++ b/io_uring/opdef.c @@ -104,8 +104,8 @@ const struct io_issue_def io_issue_defs[] = { .iopoll = 1, .iopoll_queue = 1, .async_size = sizeof(struct io_async_rw), - .prep = io_prep_read_fixed, - .issue = io_read, + .prep = io_prep_read,
io_prep_read_fixed() -> io_init_rw_fixed() -> io_prep_rw(do_import=false) after: io_prep_read() -> io_prep_rw(do_import=true) This change flips do_import. I'd say, let's just remove the importing bits from io_prep_rw_fixed(), and should be good for now. Apart from that: Reviewed-by: Pavel Begunkov <asml.silence@xxxxxxxxx> -- Pavel Begunkov