ublk: quiesce request queue when aborting queue
authorMing Lei <ming.lei@redhat.com>
Mon, 9 Oct 2023 09:33:20 +0000 (17:33 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 17 Oct 2023 14:27:56 +0000 (08:27 -0600)
commitbd23f6c2c2d00518e2f27f2d25cef795de9bee56
tree9aaf304876a5a6e841338714719061ef5c8e4d93
parent28dde8c062b640a26dc0bdbd341ace59ec96f7a3
ublk: quiesce request queue when aborting queue

So far aborting queue ends request when the ubq daemon is exiting, and
it can be run concurrently with ublk_queue_rq(), this way is fragile and
we depend on the tricky usage of UBLK_IO_FLAG_ABORTED for avoiding such
race.

Quiesce queue when aborting queue, and the two code paths can be run
completely exclusively, then it becomes easier to add new ublk feature,
such as relaxing single same task limit for each queue.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20231009093324.957829-6-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/ublk_drv.c