Re: [PATCH 1/4] ublk: factor out ublk_commit_and_fetch

Ming Lei
2025-04-22T02:16:42Z

On Mon, Apr 21, 2025 at 05:46:40PM -0600, Uday Shankar wrote:
> 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.
>
> 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>

Thanks,
Ming