From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>,
linux-nvme@lists.infradead.org, Sagi Grimberg <sagi@grimberg.me>,
Yi Zhang <yi.zhang@redhat.com>
Subject: Re: [PATCH] nvme-multipath: fix lockdep WARN due to partition scan work
Date: Thu, 23 Oct 2025 08:28:03 -0600 [thread overview]
Message-ID: <aPo7c8aZ7GDqHFEO@kbusch-mbp> (raw)
In-Reply-To: <aPnDLr2IiOQUQLKI@infradead.org>
On Wed, Oct 22, 2025 at 10:54:54PM -0700, Christoph Hellwig wrote:
> 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.
I don't think it was a problem of the same workqueue, but because
partition scanning happened in the same work_struct as namespace
scanning. As long as the two happen in different work items, I believe
they can use the same workqueue and be fine.
next prev parent reply other threads:[~2025-10-23 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-23 0:19 [PATCH] nvme-multipath: fix lockdep WARN due to partition scan work Shin'ichiro Kawasaki
2025-10-23 5:54 ` Christoph Hellwig
2025-10-23 14:28 ` Keith Busch [this message]
2025-10-28 7:55 ` Shinichiro Kawasaki
2025-10-29 7:54 ` hch
2025-11-05 7:32 ` Hannes Reinecke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aPo7c8aZ7GDqHFEO@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=hch@infradead.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=shinichiro.kawasaki@wdc.com \
--cc=yi.zhang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.