[PATCH v3] nvme: refresh multipath head zoned limits from path limits
Christoph Hellwig
hch at lst.de
Wed May 27 06:35:18 PDT 2026
Hi Yao,
thanks for the patch.
On Tue, May 26, 2026 at 03:25:29PM +0800, Yao Sang wrote:
> + if (lim.features & BLK_FEAT_ZONED) {
> + lim.max_open_zones = min_not_zero(lim.max_open_zones,
> + ns_lim->max_open_zones);
> + lim.max_active_zones = min_not_zero(lim.max_active_zones,
> + ns_lim->max_active_zones);
A bunch for overly long lines here. And I think this would become a lot
more readable by factoring it into a little helper:
static void nvme_stack_zone_resources(struct queue_limits *t,
const struct queue_limits *b)
{
t->max_open_zones = min_not_zero(t->max_open_zones, b->max_open_zones);
t->max_active_zones =
min_not_zero(t->max_active_zones, b->max_active_zones);
}
and then call that.
> + } else {
> + lim.max_open_zones = 0;
> + lim.max_active_zones = 0;
> + }
and we should not need this, as the values should already be zeroed
when BLK_FEAT_ZONED is not set.
More information about the Linux-nvme
mailing list