Re: [RFC v1] nvme: add cse, ds, ms, nsze and nuse to sysfs
From: Christoph Hellwig
Date: Tue Nov 28 2023 - 08:05:17 EST
On Mon, Nov 27, 2023 at 09:46:43AM -0700, Keith Busch wrote:
> >
> > Yes. But does it care about the tuple size, or the actual size of the
> > metadata field even if is bigger than the PI tuple?
>
> tuple_size is the same value as metadata size regardless of PI usage.
> See nvme_init_integrity() for how this driver sets it:
>
> integrity.tuple_size = ns->ms;
Yes, for the case where we actually support integrity in the kernel
for a given device. But if the device has a metadata size larger than
the PI size we still support it, and just let the device strip/insert
the PI. And if nvme-cli wants to report detailed information about
the namespace it probably needs to report the actual metadata size
as the tuple size won't be reported given that we're never initializing
the kernel PI support.