Re: [PATCH] block: Add bvec_folio()

From: Matthew Wilcox

Date: Wed May 27 2026 - 12:02:33 EST


On Tue, May 26, 2026 at 11:22:29PM -0700, Christoph Hellwig wrote:
> On Tue, May 26, 2026 at 06:47:30PM +0100, Matthew Wilcox wrote:
> > How about:
> >
> > /**
> > * bvec_folio - Return the first folio referenced by this bvec
> > * @bv: bvec to access
> > *
> > * bvecs can contain non-folio memory, so this should only be called by
> > * the creator of the bvec; drivers have no business looking at the owner
> > * of the memory. It may not even be the right interface for the caller
> > * to use as bvecs can span multiple folios. You may be better off using
> > * something like bio_for_each_folio_all() which iterates over all folios.
> > */
>
> Sounds good, although I'd captialize the first word in the sentence.
> (Not that anyone should follow my spelling advice in general)

I don't know how to capitalise bvec. Is it Bvec? BVec?

Fortunately my wife is an expert, and many years ago taught me that if
you have a difficult grammar problem, don't fix it, avoid it.

* A bvec can contain non-folio memory, so this should only be called by