public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: Keith Busch <kbusch@meta.com>,
	linux-block@vger.kernel.org, axboe@kernel.dk,
	ebiggers@kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCH] blk-integrity: support arbitrary buffer alignment
Date: Tue, 18 Nov 2025 14:26:38 -0700	[thread overview]
Message-ID: <aRzkjoSdpAINcvZq@kbusch-mbp> (raw)
In-Reply-To: <20251118064513.GA24192@lst.de>

On Tue, Nov 18, 2025 at 07:45:13AM +0100, Christoph Hellwig wrote:
> On Mon, Nov 17, 2025 at 12:39:35PM -0800, Keith Busch wrote:
> >   * Fixed up ip checksum when it's split among intervals. The previous
> >   version would happen to work if the data interval was aligned in a
> >   single segment, but it would have gotten the wrong final result if it
> >   had to do multiple partial updates.
> > 
> >   Testing this type was a little more difficult than it sounds. The
> >   scsi_debug driver would force alignment, so it would never hit the
> >   partial condition that was previously broken.
> > 
> >   To test it, I hacked up a nvme qemu emulation for this checksum type,
> >   taking some liberty with the protocol's undefined fields.  qemu has
> >   its own checksum implementation, 'net_raw_checksum()', and it is
> >   calculating the same result through its contiguous bounce buffer as
> 
> Hah.  Even if it doesn't work for the IP checksum, can we wire up some
> of your tests in blktests?

Certainly. New versions are being prepared for the mailing list, but
these tests are still fine to hit the kernel's edge cases.

Forcing partial checksum comes from the dio-offsets test here:

  https://lore.kernel.org/linux-block/20251014205420.941424-1-kbusch@meta.com/

And to test out the reftag seed mapping/unmapping, I have this one for
liburing:

  https://lore.kernel.org/io-uring/20251107042953.3393507-1-kbusch@meta.com/

Both of these require nvme for the interesting multi-segment use cases
since PI formats for anyone else forces single segment alignment.

> I think the new split_interval_capable need to be stacked as we still
> build I/O to limits.  Not just for that it might be nice to turn it
> into a BLK_FEAT_* bit.

Yes, sounds good.

      reply	other threads:[~2025-11-18 21:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-17 20:39 [PATCH] blk-integrity: support arbitrary buffer alignment Keith Busch
2025-11-18  6:45 ` Christoph Hellwig
2025-11-18 21:26   ` Keith Busch [this message]

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=aRzkjoSdpAINcvZq@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=ebiggers@kernel.org \
    --cc=hch@lst.de \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.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