]> git.hungrycats.org Git - linux/commit
nvme-multipath: defer partition scanning
authorKeith Busch <kbusch@kernel.org>
Tue, 15 Oct 2024 14:30:17 +0000 (07:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Nov 2024 14:07:20 +0000 (15:07 +0100)
commit60de2e03f984cfbcdc12fa552f95087c35a05a98
tree530596131c0f595528a5af02f580dc737632d168
parentf17c880a4736d8207c71581ce44e518a581c355b
nvme-multipath: defer partition scanning

[ Upstream commit 1f021341eef41e77a633186e9be5223de2ce5d48 ]

We need to suppress the partition scan from occuring within the
controller's scan_work context. If a path error occurs here, the IO will
wait until a path becomes available or all paths are torn down, but that
action also occurs within scan_work, so it would deadlock. Defer the
partion scan to a different context that does not block scan_work.

Reported-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/multipath.c
drivers/nvme/host/nvme.h