]> www.infradead.org Git - nvme.git/commit
nvme-loop: flush off pending I/O while shutting down loop controller
authorNilay Shroff <nilay@linux.ibm.com>
Wed, 16 Oct 2024 03:03:14 +0000 (08:33 +0530)
committerKeith Busch <kbusch@kernel.org>
Thu, 17 Oct 2024 18:07:37 +0000 (11:07 -0700)
commitc199fac88fe7c749f88a0653e9f621b9f5a71cf1
tree6d76834fa383a2194594e0ce63a84291070b7051
parent26bc0a81f64ce00fc4342c38eeb2eddaad084dd2
nvme-loop: flush off pending I/O while shutting down loop controller

While shutting down loop controller, we first quiesce the admin/IO queue,
delete the admin/IO tag-set and then at last destroy the admin/IO queue.
However it's quite possible that during the window between quiescing and
destroying of the admin/IO queue, some admin/IO request might sneak in
and if that happens then we could potentially encounter a hung task
because shutdown operation can't forward progress until any pending I/O
is flushed off.

This commit helps ensure that before destroying the admin/IO queue, we
unquiesce the admin/IO queue so that any outstanding requests, which are
added after the admin/IO queue is quiesced, are now flushed to its
completion.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/target/loop.c