Skip to contentSkip to conversation

nvme: skip noiob for zoned devices

PATCH Superseded Keith Busch 2 participants 4 messages Aug 7, 2020 NVMe

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Keith Busch

author maintainer
#0 lore raw

PATCH 1/1 nvme: skip noiob for zoned devices

Zoned block devices reuse the chunk_sectors queue limit to define zone boundaries. If a such a device happens to also report an optimal boundary, do not use that to define the chunk_sectors as that may intermittently interfere with io splitting and zone size queries.

---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
index 88cff309d8e4..4e0225d85e70 100644
@@ -2075,7 +2075,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
 		}
 	}
 
-	if (iob)
+	if (iob && blk_queue_is_zoned(ns->queue))
 		blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(iob));
 	nvme_update_disk_info(disk, ns, id);
 #ifdef CONFIG_NVME_MULTIPATH
Signature · 7 lines
2.24.1


_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
author maintainer
#1 lore raw

drivers/nvme/host/core.c static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) · line 2078

Quoted 2 lines · Keith Busch
drivers/nvme/host/core.c +1 -1
-	if (iob)
+	if (iob && blk_queue_is_zoned(ns->queue))

Err, that should have been !blk_queue_is_zoned(). Resending...

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

maintainer
#2 lore raw
Quoted 5 lines

drivers/nvme/host/core.c static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) · line 2078

Quoted 3 lines
drivers/nvme/host/core.c +1 -1
-	if (iob)
+	if (iob && blk_queue_is_zoned(ns->queue))

Err, that should have been !blk_queue_is_zoned(). Resending...

I'll fix it up...

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

maintainer Reviewed-by on v1 1/1
#3 lore raw
In reply to Keith Busch
Quoted 16 lines

Zoned block devices reuse the chunk_sectors queue limit to define zone boundaries. If a such a device happens to also report an optimal boundary, do not use that to define the chunk_sectors as that may intermittently interfere with io splitting and zone size queries.

---
  drivers/nvme/host/core.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +0 -0
index 88cff309d8e4..4e0225d85e70 100644

drivers/nvme/host/core.c static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id) · line 2081

Quoted 8 lines
drivers/nvme/host/core.c +1 -1
@@ -2075,7 +2075,7 @@ static int __nvme_revalidate_disk(struct gendisk *disk, struct nvme_id_ns *id)
  		}
  	}
 
-	if (iob)
+	if (iob && blk_queue_is_zoned(ns->queue))
  		blk_queue_chunk_sectors(ns->queue, rounddown_pow_of_two(iob));
  	nvme_update_disk_info(disk, ns, id);
  #ifdef CONFIG_NVME_MULTIPATH

_______________________________________________
Linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme