[PATCH-part-2 8/9] nvme-pci: add support for sgl metadata

Keith Busch kbusch at kernel.org
Wed Sep 4 12:22:07 PDT 2024


On Wed, Sep 04, 2024 at 11:38:16AM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
> 
> Supporting this mode allows merging requests with metadata that wouldn't
> be possible otherwise.

A couple minor issues from splitting/merging in-progress patches.

> @@ -1988,7 +1988,9 @@ static void nvme_set_ctrl_limits(struct nvme_ctrl *ctrl,
>  	lim->max_hw_sectors = ctrl->max_hw_sectors;
>  	lim->max_segments = min_t(u32, USHRT_MAX,
>  		min_not_zero(nvme_max_drv_segments(ctrl), ctrl->max_segments));
> -	lim->max_integrity_segments = ctrl->max_integrity_segments;

This line was not supposed to be deleted. It should remain there as
before.

> +	if (lim->max_integrity_segments > 1 &&
> +	    !nvme_ctrl_meta_sgl_supported(ctrl))
> +		lim->max_integrity_segments = 1;

[snip]

> diff --git a/include/linux/nvme.h b/include/linux/nvme.h
> index 7b2ae2e435447..87ea1673c60b8 100644
> --- a/include/linux/nvme.h
> +++ b/include/linux/nvme.h
> @@ -388,6 +388,7 @@ enum {
>  	NVME_CTRL_CTRATT_PREDICTABLE_LAT	= 1 << 5,
>  	NVME_CTRL_CTRATT_NAMESPACE_GRANULARITY	= 1 << 7,
>  	NVME_CTRL_CTRATT_UUID_LIST		= 1 << 9,
> +	NVME_CTRL_SGLS_MPTR                     = 1 << 18,

This shift should be 19, not 18.



More information about the Linux-nvme mailing list