[PATCHv2] nvme: skip noiob for zoned devices

Christoph Hellwig hch at lst.de
Mon Aug 10 08:33:13 EDT 2020


On Fri, Aug 07, 2020 at 09:32:35AM -0700, Keith Busch wrote:
> 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.

Instead of skipping shouldn't we use the max of noiob and the zone
size, even if that is mostly theoretical?

> 
> Signed-off-by: Keith Busch <kbusch at kernel.org>
> ---
> v1->v2: Fixed the if condition to check for *not* zoned.
> 
>  drivers/nvme/host/core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index 88cff309d8e4..4e0225d85e70 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -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
> -- 
> 2.24.1
---end quoted text---



More information about the Linux-nvme mailing list