Re: [PATCH v2 4/4] block, nvme: use lower-level limit helpers for namespace heads

Christoph Hellwig <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.infradead.lists.linux-nvme
Message-ID <[email protected]>
On Thu, Aug 06, 2026 at 10:46:58AM +0800, Yao Sang wrote:
> An NVMe namespace head and each path refer to the same namespace.
> queue_limits_stack_bdev() treats the path as a bottom-device range and
> applies all of blk_stack_limits(), including topology rules and start-based
> atomic write checks. These mapped-device rules should not be used when
> updating the namespace head.
> 
> Make blk_stack_path_limits() and the existing
> blk_stack_atomic_writes_limits() public when adding their first caller
> outside the block layer. Keep the existing names and parameter types.

I'd move the making public including the kerneldoc and export into
the patches adding them.  Much better than hiding that in nvme patches.

> +static void nvme_apply_ns_head_identify_limits(struct queue_limits *lim,
> +		const struct queue_limits *ns_lim)

Nothing in here feels nvme specific.  I wonder how much of this
should be in common code, and if that would be useful to John's
scsi multipath work?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.