Thread (8 messages) 8 messages, 4 authors, 2021-02-08

Re: [PATCH] nvme-multipath: set nr_zones for zoned namespaces

From: Keith Busch <kbusch@kernel.org>
Date: 2021-02-08 03:29:07

On Sun, Feb 07, 2021 at 11:06:36PM +0000, Damien Le Moal wrote:
On 2021/02/06 4:50, Keith Busch wrote:
quoted
The bio based drivers only require the request_queue's nr_zones is set,
so set this field in the head if the namespace path is zoned.

Reported-by: Minwoo Im <redacted>
Cc: Damien Le Moal <redacted>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Shouldn't this have a Fixes tag ?
Probably yes, since this omission does go back to the initial inclusion:

Fixes: 240e6ee272c07 ("nvme: support for zoned namespaces")
 
quoted
---
 drivers/nvme/host/multipath.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 1427c9555cef..a1d476e1ac02 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -677,6 +677,10 @@ void nvme_mpath_add_disk(struct nvme_ns *ns, struct nvme_id_ns *id)
 	if (blk_queue_stable_writes(ns->queue) && ns->head->disk)
 		blk_queue_flag_set(QUEUE_FLAG_STABLE_WRITES,
 				   ns->head->disk->queue);
+#ifdef CONFIG_BLK_DEV_ZONED
+	if (blk_queue_is_zoned(ns->queue) && ns->head->disk)
+		ns->head->disk->queue->nr_zones = ns->queue->nr_zones;
+#endif
Is the zone model set already ? I have not checked...
That's a good question, and we should be safe with the zone namespace's
zone settings set at this point: nvme_mpath_add_disk() is invoked after
nvme_update_ns_info().

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help