[PATCH] nvme: clamp max_hw_sectors based on DMA optimized limitation

Keith Busch kbusch at kernel.org
Thu Apr 20 08:34:03 PDT 2023


On Thu, Apr 20, 2023 at 09:29:30AM -0600, Keith Busch wrote:
>  	struct nvme_dev *dev;
>  	int ret = -ENOMEM;
>  
> +	/*
> +	 * Limit the max command size to prevent iod->sg allocations going
> +	 * over a single page.
> +	 */
> +	size_t max_bytes = NVME_MAX_KB_SZ;

Oops, the above should say 'NVME_MAX_KB_SZ * 1024;'.



More information about the Linux-nvme mailing list