From: Christoph Hellwig <hch@lst.de>
To: Yao Sang <sangyao@kylinos.cn>
Cc: linux-nvme@lists.infradead.org, kbusch@kernel.org,
axboe@kernel.dk, sagi@grimberg.me, shinichiro.kawasaki@wdc.com
Subject: Re: [PATCH v3] nvme: refresh multipath head zoned limits from path limits
Date: Wed, 27 May 2026 15:35:18 +0200 [thread overview]
Message-ID: <20260527133518.GA12167@lst.de> (raw)
In-Reply-To: <20260526072529.1086128-1-sangyao@kylinos.cn>
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.
prev parent reply other threads:[~2026-05-27 13:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 7:25 [PATCH v3] nvme: refresh multipath head zoned limits from path limits Yao Sang
2026-05-27 13:35 ` Christoph Hellwig [this message]
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=20260527133518.GA12167@lst.de \
--to=hch@lst.de \
--cc=axboe@kernel.dk \
--cc=kbusch@kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
--cc=sangyao@kylinos.cn \
--cc=shinichiro.kawasaki@wdc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox