Re: [PATCH v4 3/4] ublk: mark ublk_queue as const for ublk_register_io_buf
From: Caleb Sander Mateos
Date: Wed Apr 16 2025 - 15:13:10 EST
On Tue, Apr 15, 2025 at 6:00 PM Uday Shankar <ushankar@xxxxxxxxxxxxxxx> wrote:
>
> We now allow multiple tasks to operate on I/Os belonging to the same
> queue concurrently. This means that any writes to ublk_queue in the I/O
> path are potential sources of data races. Try to prevent these by
> marking ublk_queue pointers as const in ublk_register_io_buf.
>
> Suggested-by: Ming Lei <ming.lei@xxxxxxxxxx>
> Signed-off-by: Uday Shankar <ushankar@xxxxxxxxxxxxxxx>
Reviewed-by: Caleb Sander Mateos <csander@xxxxxxxxxxxxxxx>