ublk: factor out ublk_commit_and_fetch
Move the logic for the UBLK_IO_COMMIT_AND_FETCH_REQ opcode into its own function. This also allows us to mark ublk_queue pointers as const for that operation, which can help prevent data races since we may allow concurrent operation on one ublk_queue in the future. Also open code ublk_commit_completion in ublk_commit_and_fetch to reduce the number of parameters/avoid a redundant lookup. [Restore __ublk_ch_uring_cmd() req variable used in commit d6aa0c17 ("ublk: call ublk_dispatch_req() for handling UBLK_U_IO_NEED_GET_DATA")] Suggested-by:Ming Lei <ming.lei@redhat.com> Signed-off-by:
Uday Shankar <ushankar@purestorage.com> Reviewed-by:
Caleb Sander Mateos <csander@purestorage.com> Reviewed-by:
Ming Lei <ming.lei@redhat.com> Signed-off-by:
Caleb Sander Mateos <csander@purestorage.com> Link: https://lore.kernel.org/r/20250430225234.2676781-2-csander@purestorage.com Signed-off-by:
Jens Axboe <axboe@kernel.dk>
Loading
Please register or sign in to comment