OSDN Git Service

nvme: skip noiob for zoned devices
authorKeith Busch <kbusch@kernel.org>
Fri, 7 Aug 2020 16:32:35 +0000 (09:32 -0700)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Aug 2020 23:14:27 +0000 (17:14 -0600)
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.

Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/nvme/host/core.c

index 466c591..6c0d175 100644 (file)
@@ -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