nvme: refresh multipath head zoned limits from path limits
authorYao Sang <sangyao@kylinos.cn>
Thu, 28 May 2026 07:36:01 +0000 (15:36 +0800)
committerKeith Busch <kbusch@kernel.org>
Tue, 2 Jun 2026 12:30:59 +0000 (05:30 -0700)
commit59c0517123f2757c41d7795f841bc4c836577d17
treee4ebf0ed80a34a7f164394c6c8ef49ec6da0e788
parent0967074f6830718fd2597404ef119bddd0dbfd00
nvme: refresh multipath head zoned limits from path limits

queue_limits_stack_bdev() updates the multipath head limits from the
path queue, but it does not propagate max_open_zones or
max_active_zones. As a result, a zoned multipath namespace head can
keep stale 0/0 values even after a ready path reports finite zoned
resource limits.

When refreshing the head limits in nvme_update_ns_info(), stack the
zoned resource limits directly after stacking the path queue limits.
Use min_not_zero() so the block layer's 0 value keeps its "no limit"
meaning while finite limits are combined conservatively.

This avoids advertising "no limit" on the multipath head while keeping
the zoned-limit handling local to the NVMe multipath update path.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Yao Sang <sangyao@kylinos.cn>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c