[PATCH 1/2] nvme-pci: meta-transfer via sgl

Kanchan Joshi joshi.k at samsung.com
Thu Oct 19 02:54:12 PDT 2023


On 10/19/2023 11:18 AM, Christoph Hellwig wrote:
> On Thu, Oct 19, 2023 at 12:00:02AM +0530, Kanchan Joshi wrote:
>> Introduce the ability to transfer the metadata buffer using sgl.
>> Also add a nvme request flag 'NVME_REQ_FORCE_SGL' that mandates both
>> data and meta transfer via sgl.
> 
> That's really two different changes, that should be separate patches.

Do you mean a separate patch with just this flag?

diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index f35647c470af..58f8efe1ace9 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -184,6 +184,7 @@ enum {
         NVME_REQ_CANCELLED              = (1 << 0),
         NVME_REQ_USERCMD                = (1 << 1),
         NVME_MPATH_IO_STATS             = (1 << 2),
+       NVME_REQ_FORCE_SGL              = (1 << 3),
  };


I thought about it, but did not feel strong about it as all the new code 
was really tied to this flag.
I think the issue is more about the commit message. I can just reword 
the commit description make the connection explicit. Something like this-

Add a nvme request flag 'NVME_REQ_FORCE_SGL' that mandates both
data and meta transfer via sgl. Meta-transfer via SGL is a new ability 
that kicks in only when this flag is present.



More information about the Linux-nvme mailing list