summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2024-08-29 09:24:37 +0300
committerKeith Busch <kbusch@kernel.org>2024-09-03 10:00:10 -0700
commit28982ad73d6a9605708631dc49a0c763cc398aa2 (patch)
treec4f5bd6087add17e6bff2c1a8e7e5c1cd42fd8ac /drivers/nvme
parent61aa894e7a2fda4ee026523b01d07e83ce2abb72 (diff)
downloadlinux-stable-28982ad73d6a9605708631dc49a0c763cc398aa2.tar.gz
linux-stable-28982ad73d6a9605708631dc49a0c763cc398aa2.tar.bz2
linux-stable-28982ad73d6a9605708631dc49a0c763cc398aa2.zip
nvme: set BLK_FEAT_ZONED for ZNS multipath disks
The new stricter limits validation doesn't like a max_append_sectors value to be set without BLK_FEAT_ZONED. Set it before allocation the disk to fix this instead of just inheriting it later. Fixes: d690cb8ae14b ("block: add an API to atomically update queue limits") Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/multipath.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 91d9eb3c22ef..518e22dd4f9b 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -616,7 +616,9 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
blk_set_stacking_limits(&lim);
lim.dma_alignment = 3;
lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL;
- if (head->ids.csi != NVME_CSI_ZNS)
+ if (head->ids.csi == NVME_CSI_ZNS)
+ lim.features |= BLK_FEAT_ZONED;
+ else
lim.max_zone_append_sectors = 0;
head->disk = blk_alloc_disk(&lim, ctrl->numa_node);