[PATCH] nvme-multipath: set BLK_FEAT_ZONED only after the zone info is known

Christoph Hellwig hch at lst.de
Mon Sep 14 23:36:51 PDT 2026


On Mon, Sep 14, 2026 at 06:57:13PM +0800, Guixin Liu wrote:
> The namespace head is marked zoned at allocation time based only on
> the command set identifier, before any zone information has been
> queried.  If the zone info query fails on the first scan, the path
> namespace is registered without zoned limits while the head still
> advertises the zoned capability with a zone size of zero.  Reporting
> zones or writing to the head then shifts by ilog2(0), triggering the
> UBSAN shift-out-of-bounds report in the report-zones and write paths.
> 
> Drop the zoned feature from the head allocation and inherit it from
> the path namespace: the head limits refresh already stacks the zoned
> feature, the zone size and the zone resource limits from the path
> queue, so the head matches the path namespace and becomes zoned once a
> revalidation succeeds.  This also stops marking the head zoned when
> CONFIG_BLK_DEV_ZONED is off, which used to fail the head allocation
> with a WARN.

Where do we actually stack it right now?




More information about the Linux-nvme mailing list