* [PATCH] nvme: set BLK_FEAT_ZONED for ZNS multipath disks
@ 2024-08-29 6:24 Christoph Hellwig
2024-09-03 17:04 ` Keith Busch
0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2024-08-29 6:24 UTC (permalink / raw)
To: kbusch, sagi; +Cc: linux-nvme
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>
---
drivers/nvme/host/multipath.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 25761fb7d88ff0..ac6991ded82a47 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -617,7 +617,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);
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvme: set BLK_FEAT_ZONED for ZNS multipath disks
2024-08-29 6:24 [PATCH] nvme: set BLK_FEAT_ZONED for ZNS multipath disks Christoph Hellwig
@ 2024-09-03 17:04 ` Keith Busch
0 siblings, 0 replies; 2+ messages in thread
From: Keith Busch @ 2024-09-03 17:04 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: sagi, linux-nvme
On Thu, Aug 29, 2024 at 09:24:37AM +0300, Christoph Hellwig wrote:
> 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")
Applied to nvme-6.11, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-03 17:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-29 6:24 [PATCH] nvme: set BLK_FEAT_ZONED for ZNS multipath disks Christoph Hellwig
2024-09-03 17:04 ` Keith Busch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox