Skip to content

Commit 28982ad

Browse files
Christoph Hellwigkeithbusch
authored andcommitted
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: d690cb8 ("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>
1 parent 61aa894 commit 28982ad

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/nvme/host/multipath.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,9 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
616616
blk_set_stacking_limits(&lim);
617617
lim.dma_alignment = 3;
618618
lim.features |= BLK_FEAT_IO_STAT | BLK_FEAT_NOWAIT | BLK_FEAT_POLL;
619-
if (head->ids.csi != NVME_CSI_ZNS)
619+
if (head->ids.csi == NVME_CSI_ZNS)
620+
lim.features |= BLK_FEAT_ZONED;
621+
else
620622
lim.max_zone_append_sectors = 0;
621623

622624
head->disk = blk_alloc_disk(&lim, ctrl->numa_node);

0 commit comments

Comments
 (0)