[PATCH RFC 1/2] nvme: downgrade WARN in nvme_setup_rw to pr_debug

Keith Busch kbusch at kernel.org
Mon May 18 15:41:55 PDT 2026


On Sat, May 16, 2026 at 11:53:54PM -0400, Chao S wrote:
> Not the freeze.  The WARN does not depend on q->limits, but on
> ns->head->ms (read live at dispatch, set inside the freeze window) and
> on REQ_INTEGRITY, never set for EXT_LBAS-non-PI.  capacity==0 only
> gates submission (bio_check_eod()), not dispatch: a writeback bio that
> passed bio_check_eod() under the old capacity sits on the task plug
> holding no q_usage_counter ref, so it does not block the freeze;
> blk_finish_plug() flushes it after the update committed head->ms != 0
> (dmesg: the capacity-change line prints before the WARN).

I'm also not what you mean about the task plug here. The plug list holds
requests, which hold queue references. The plug does not hold bios. If
you're not using a preallocated cached request, then the bio just gets
stuck on "bio_queue_enter" until the freeze completes with the new
limits, though it does proceed with potentially outdated assumtions.

So I think the problem is that the early checks are done outside the
queue entered context, and some of the following code depends on those
checks being valid.

My suggestion in the other reply isn't quite right for a couple reasons
(partition handling and issues with nvme multipath path failure), so
don't bother trying that.



More information about the Linux-nvme mailing list