[RFC PATCH v1 0/2] nvme: use local limits for namespace heads

Yao Sang sangyao at kylinos.cn
Thu Jul 9 01:48:23 PDT 2026


Hi,

This series makes the namespace-head queue-limit refresh in NVMe native
multipath local to NVMe instead of routing it through generic
stacked-device helpers. Patch 1 factors the existing refresh sequence into
nvme_update_ns_head_limits() without changing behavior. Patch 2 replaces
queue_limits_stack_bdev() with NVMe-local limit handling.

The motivation is a zoned namespace configuration issue that made the
current namespace-head limit refresh hard to reason about. NVMe native
multipath heads currently call queue_limits_stack_bdev(), then adjust some
NVMe-specific values afterwards. That mixes the rules for mapped stacked
devices, such as DM, with the rules for refreshing one NVMe namespace
through multiple paths.

The goal is to make the NVMe native multipath path easier to review and
decouple it from the configuration rules used by DM and other mapped
devices. If this direction looks reasonable, the next step can be either to
keep the helper local to NVMe or to discuss a smaller common helper later.

The main RFC question is the exact handling for individual queue limits
once NVMe stops using queue_limits_stack_bdev(). For example, this version
does not carry bdev offset and alignment handling from the namespace
head refresh, keeps the existing feature inheritance behavior, and merges
request limits conservatively. Review on whether these field handling
choices are the right ones for NVMe native multipath would be appreciated.

The thread also carries the nvme/068 blktests self-test as a
companion patch. It can be submitted to the blktests tree later if the
direction looks good.

Testing:
- blktests nvme/068 passed.
- blktests nvme/004, 005, 006, 008, 010, 012, 014, 016, 017, 018,
  019, 021, 022, 023, 025, 026, 027, 028, 029, 030, 031, 040, 041,
  042, 043, 044, 045, 049, 051, 052, 053, 054, 057, 058, 059, 065,
  and 067 passed.
- blktests zbd/001, 003, 004, 005, 006, 008, 009, 011, 012, and 013
  passed.
- blktests block/003, 004, and 012 passed.
- blktests scsi/009 and scsi/010 passed.

Thanks,
Yao

Yao Sang (2):
  nvme: factor namespace-head queue-limit update
  nvme: stop using queue_limits_stack_bdev for namespace heads

 drivers/nvme/host/core.c | 188 +++++++++++++++++++++++++++++----------
 1 file changed, 139 insertions(+), 49 deletions(-)

-- 
2.25.1




More information about the Linux-nvme mailing list