public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Caleb Sander Mateos <csander@purestorage.com>
Cc: Keith Busch <kbusch@meta.com>,
	linux-block@vger.kernel.org, axboe@kernel.dk, hch@lst.de,
	ebiggers@kernel.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Subject: Re: [PATCHv6] blk-integrity: support arbitrary buffer alignment
Date: Mon, 24 Nov 2025 15:56:11 -0700	[thread overview]
Message-ID: <aSTii9KbN6wQCvOt@kbusch-mbp> (raw)
In-Reply-To: <CADUfDZqrpJXLLU9V3eFJvRgth45-ht-yi4cSpmrBdnbfQGtWYw@mail.gmail.com>

On Mon, Nov 24, 2025 at 01:34:03PM -0800, Caleb Sander Mateos wrote:
> On Mon, Nov 24, 2025 at 8:18 AM Keith Busch <kbusch@meta.com> wrote:
> >
> > From: Keith Busch <kbusch@kernel.org>
> >
> > A bio segment may have partial interval block data with the rest continuing
> > into the next segments because direct-io data payloads only need to aligned in
> 
> "need to be aligned"?

In the original text, s/aligned/align
 
> > +       while (offset > 0) {
> > +               struct bio_vec pbv = mp_bvec_iter_bvec(bvec, iter->prot_iter);
> > +               unsigned int len = min(pbv.bv_len, offset);
> > +               void *prot_buf = bvec_kmap_local(&pbv);
> 
> Is it valid to use bvec_kmap_local() on a multi-page bvec? 

If it wasn't valid, there'd be a major problem with large folios.

> It calls
> kmap_local_page() internally, which will only map the first page,
> right?

Compare kmap_local_page() with kmap_local_folio(). They both resolve to
the same lower level mapping function, and folios have no problem
spanning pages.
 
> > @@ -1874,6 +1874,7 @@ static bool nvme_init_integrity(struct nvme_ns_head *head,
> >                 break;
> >         }
> >
> > +       bi->flags |= BLK_SPLIT_INTERVAL_CAPABLE;
> 
> Can just be = instead of |= since bi is zeroed above.

It can, but these kinds of syntax are a courtesty to future changes so
that you don't need to change this line later. You can also end a struct
initialization without a trailing "," too, but that's just mean.

  reply	other threads:[~2025-11-24 22:56 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24 16:17 [PATCHv6] blk-integrity: support arbitrary buffer alignment Keith Busch
2025-11-24 16:31 ` Martin K. Petersen
2025-11-24 17:57   ` Keith Busch
2025-11-24 20:49     ` Martin K. Petersen
2025-11-24 16:58 ` Christoph Hellwig
2025-11-24 21:34 ` Caleb Sander Mateos
2025-11-24 22:56   ` Keith Busch [this message]
2025-11-25  3:41     ` Caleb Sander Mateos
2025-11-25 11:31       ` Christoph Hellwig
2025-11-25 14:24         ` Keith Busch
2025-11-25 16:46           ` 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=aSTii9KbN6wQCvOt@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=csander@purestorage.com \
    --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