[PATCH v3 0/5] block, nvme: support same-LBA multipath limit stacking

Yao Sang <[email protected]>
Newsgroups org.kernel.vger.linux-block,org.infradead.lists.linux-nvme
Message-ID <[email protected]>
blk_stack_limits() stacks limits for a top-device range mapped onto a
bottom device. Same-LBA multipath instead needs to stack limits across
paths without applying mapped-range topology calculations.

Factor the common topology, path and atomic write code into helpers. Add
block helpers for same-LBA multipath and use them for NVMe namespace heads.
SCSI multipath can use the same helpers.

Changes since v2:
- replace the exported low-level helpers with block helpers for same-LBA
  multipath;
- keep mapped-range and start-dependent checks inside blk_stack_limits().

Review of v2 noted that fixed namespace limits should not be updated for
each path. V3 separates these limits from path limit stacking, but keeps
the existing NVMe update behavior.

Changing this also requires explicit namespace-head revalidation after
events such as Format NVM. That work is left for a follow-up.

Tests:
- 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,
  067 and 068 passed.
- blktests zbd/001, 003, 004, 005, 006, 008, 009, 011, 012 and 013
  passed.
- blktests block/003, 004 and 012, and scsi/009 and 010 passed.
- xfstests xfs/643, xfs/646, generic/765 and generic/773 passed.

Link to v2:
https://lore.kernel.org/r/[email protected]

Yao Sang (5):
  nvme: factor namespace-head queue-limit update
  block: factor mapped-range topology out of blk_stack_limits
  block: factor path limits out of blk_stack_limits
  block: factor atomic write hardware limit stacking
  block, nvme: add same-LBA multipath limit helpers

 block/blk-settings.c          | 252 ++++++++++++++++++++++------------
 drivers/nvme/host/core.c      |  83 ++++-------
 drivers/nvme/host/multipath.c |   2 +
 include/linux/blkdev.h        |   3 +
 4 files changed, 202 insertions(+), 138 deletions(-)


base-commit: f1a8846e06388113dfdbb89dee005083fa9afdf9
-- 
2.25.1
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.