All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Yao Sang <sangyao@kylinos.cn>
Cc: Jens Axboe <axboe@kernel.dk>, Keith Busch <kbusch@kernel.org>,
	Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
	linux-block@vger.kernel.org, linux-nvme@lists.infradead.org
Subject: Re: [PATCH v2 3/4] block: factor out path limit stacking
Date: Mon, 17 Aug 2026 10:10:17 +0200	[thread overview]
Message-ID: <20260817081017.GC21461@lst.de> (raw)
In-Reply-To: <20260806024658.4193386-4-sangyao@kylinos.cn>

On Thu, Aug 06, 2026 at 10:46:57AM +0800, Yao Sang wrote:
> +static void blk_stack_path_limits(struct queue_limits *t,
> +		const struct queue_limits *b)

I find the path limits name a bit confusing, but I don't really
have a much better suggestion.

> +	t->max_dev_sectors = min_not_zero(t->max_dev_sectors, b->max_dev_sectors);

overly long line here.

I wonder if we sould have a helper macro that encapsulates the

	t = min_not_zero(t, b)

pattern to make all these lines a bit easier to read while we're
at it?

>  	t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
>  	t->max_user_sectors = min_not_zero(t->max_user_sectors,
>  			b->max_user_sectors);
> -	t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
> -	t->max_dev_sectors = min_not_zero(t->max_dev_sectors, b->max_dev_sectors);
>  	t->max_write_zeroes_sectors = min(t->max_write_zeroes_sectors,
>  					b->max_write_zeroes_sectors);
>  	t->max_user_wzeroes_unmap_sectors =

I'm also not sure why some limits are included in the path limits
and other not.  E.g. wy not max_write_zeroes_sectors?


  reply	other threads:[~2026-08-17  8:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06  2:46 [PATCH v2 0/4] block/nvme: split path limits for namespace heads Yao Sang
2026-08-06  2:46 ` [PATCH v2 1/4] nvme: factor namespace-head queue-limit update Yao Sang
2026-08-17  8:04   ` Christoph Hellwig
2026-08-06  2:46 ` [PATCH v2 2/4] block: factor block size and alignment handling out of blk_stack_limits Yao Sang
2026-08-17  8:05   ` Christoph Hellwig
2026-08-06  2:46 ` [PATCH v2 3/4] block: factor out path limit stacking Yao Sang
2026-08-17  8:10   ` Christoph Hellwig [this message]
2026-08-06  2:46 ` [PATCH v2 4/4] block, nvme: use lower-level limit helpers for namespace heads Yao Sang
2026-08-17  8:13   ` Christoph Hellwig
2026-08-10  8:50 ` [PATCH v2 0/4] block/nvme: split path limits " Yao Sang

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=20260817081017.GC21461@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=kbusch@kernel.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --cc=sangyao@kylinos.cn \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.