[PATCH] block: always allocate integrity buffer when required
Keith Busch
kbusch at kernel.org
Fri May 9 07:33:00 PDT 2025
On Fri, May 09, 2025 at 06:19:49AM +0200, Christoph Hellwig wrote:
> On Thu, May 08, 2025 at 10:58:14AM -0700, Keith Busch wrote:
> > Add a new blk_integrity flag to indicate if the disk format requires an
> > integrity buffer. When this flag is set, provide an unchecked buffer if
> > the sysfs attributes disabled verify or generation. This fixes the
> > following nvme warning:
>
> Do we even need the flag? I think we could just deduce it from
> tag_size < tuple_size, which feels more robust.
It looks like tag_size just refers to the space for the "application
tag", which can vary depending on if ref_tag is used or not. But it's
always going to be smaller than the tuple size.
I think you mean 'if tuple_size == sizeof(struct {t10|crc64}_pi_tuple)',
depending on which csum type is used. I introduced a new flag because I
thought that gen/strip property was just an arbitrary decision that NVMe
made for PRACT, but if it's a universal thing, then we can totally use
that.
More information about the Linux-nvme
mailing list