Skip to content
Commit 4c8a9517 authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe
Browse files

ublk: setup ublk_io correctly in case of ublk_get_data() failure



If ublk_get_data() fails, -EIOCBQUEUED is returned and the current command
becomes ASYNC. And the only reason is that mapping data can't move on,
because of no enough pages or pending signal, then the current ublk request
has to be requeued.

Once the request need to be requeued, we have to setup `ublk_io` correctly,
including io->cmd and flags, otherwise the request may not be forwarded to
ublk server successfully.

Fixes: 9810362a ("ublk: don't call ublk_dispatch_req() for NEED_GET_DATA")
Reported-by: default avatarChanghui Zhong <czhong@redhat.com>
Closes: https://lore.kernel.org/linux-block/CAGVVp+VN9QcpHUz_0nasFf5q9i1gi8H8j-G-6mkBoqa3TyjRHA@mail.gmail.com/


Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Tested-by: default avatarChanghui Zhong <czhong@redhat.com>
Link: https://lore.kernel.org/r/20250624104121.859519-1-ming.lei@redhat.com


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 81b4d1a1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment