Linux block layer
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@meta.com>,
	axboe@kernel.dk, linux-block@vger.kernel.org,
	martin.petersen@oracle.com, linux-nvme@lists.infradead.org
Subject: Re: [PATCH] block: always allocate integrity buffer when required
Date: Fri, 9 May 2025 08:33:00 -0600	[thread overview]
Message-ID: <aB4SHKuSiuewRltB@kbusch-mbp> (raw)
In-Reply-To: <20250509041949.GA28563@lst.de>

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. 

  reply	other threads:[~2025-05-09 14:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-08 17:58 [PATCH] block: always allocate integrity buffer when required Keith Busch
2025-05-09  4:19 ` Christoph Hellwig
2025-05-09 14:33   ` Keith Busch [this message]
2025-05-09 14:39     ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aB4SHKuSiuewRltB@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox