From: Keith Busch Date: Fri, 5 Feb 2021 19:50:02 +0000 (-0800) Subject: nvme-multipath: set nr_zones for zoned namespaces X-Git-Tag: v5.10.25~912 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48629fed4fc42e7fd7e16e32a070075cd4a3aceb;p=platform%2Fkernel%2Flinux-rpi.git nvme-multipath: set nr_zones for zoned namespaces [ Upstream commit 73a1a2298f3e9df24cea7a9aab412ba9470f6159 ] 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. Fixes: 240e6ee272c07 ("nvme: support for zoned namespaces") Reported-by: Minwoo Im Cc: Damien Le Moal Signed-off-by: Keith Busch Signed-off-by: Christoph Hellwig Signed-off-by: Sasha Levin --- diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c index 292e535..e812a0d 100644 --- a/drivers/nvme/host/multipath.c +++ b/drivers/nvme/host/multipath.c @@ -676,6 +676,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 } void nvme_mpath_remove_disk(struct nvme_ns_head *head)