[PATCH v3] nvme: fix nvme_ns_has_pi() to check PI size if metadata size or below

Christoph Hellwig hch at infradead.org
Wed Oct 23 05:45:13 PDT 2024


On Tue, Oct 22, 2024 at 01:20:44PM -0600, Keith Busch wrote:
> On Wed, Oct 23, 2024 at 03:10:54AM +0900, Tokunori Ikegami wrote:
> > The PI is the first bytes or last bytes of the metadata.
> > So its size is not equal to the metadata size only but below also.
> 
> This is still wrong because the only users of this function are with
> respect to PRACT. If anything, you could change the name from "has_pi"
> to "supports_pract", or something like that.

It's also use in the NVME_NS_METADATA_SUPPORTED for fabrics.
Where fabrics really means RDMA with the Mellanox PI offload.  I don't
really know if that supports PI smaller than the metadata size offhand.




More information about the Linux-nvme mailing list