[PATCH] nvme-multipath: fix lockdep WARN due to partition scan work
Christoph Hellwig
hch at infradead.org
Wed Oct 22 22:54:54 PDT 2025
On Thu, Oct 23, 2025 at 09:19:37AM +0900, Shin'ichiro Kawasaki wrote:
> Blktests test cases nvme/014, 057 and 058 fail occasionally due to a
> lockdep WARN. As reported in the Closes tag URL, the WARN indicates that
> a deadlock can happen due to the dependency among disk->open_mutex,
> kblockd workqueue completion and partition_scan_work completion.
>
> To avoid the lockdep WARN and the potential deadlock, cut the dependency
> by running the partition_scan_work not by kblockd workqueue but by
> nvme_wq.
The partition_scan_work was added in 1f021341eef4 ("nvme-multipath:
defer partition scanning") to get it out of the scan work to avoid
deadlocks. I suspect moving it to the same workqueue might reintroduce
the deadlocks, so we might have to add a new workqueue here. Keith
might remember more.
More information about the Linux-nvme
mailing list