blk-mq: add one API for waiting until quiesce is done
authorMing Lei <ming.lei@redhat.com>
Tue, 9 Nov 2021 07:11:41 +0000 (15:11 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 9 Nov 2021 15:14:27 +0000 (08:14 -0700)
commit9ef4d0209cbadb63656a7aa29fde49c27ab2b9bf
treee65be820c16cf45837298aeed69984f86cf05aaa
parenta846a8e6c9a5949582c5a6a8bbc83a7d27fd891e
blk-mq: add one API for waiting until quiesce is done

Some drivers(NVMe, SCSI) need to call quiesce and unquiesce in pair, but it
is hard to switch to this style, so these drivers need one atomic flag for
helping to balance quiesce and unquiesce.

When quiesce is in-progress, the driver still needs to wait until
the quiesce is done, so add API of blk_mq_wait_quiesce_done() for
these drivers.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Link: https://lore.kernel.org/r/20211109071144.181581-2-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq.c
include/linux/blk-mq.h