Re: [PATCH v2] block : add larger order folio size instead of pages

Christoph Hellwig
2024-05-03T16:22:57Z

On Fri, May 03, 2024 at 04:26:55PM +0100, Matthew Wilcox wrote:
> I think this is wandering into a minefield. I'm pretty sure
> it's considered valid to split the bio, and complete the two halves
> independently. Each one will put the refcounts for the pages it touches,
> and if we do this early putting of references, that's going to fail.

That's now how bios work. The submitter always operates on the entire
bio using the _all iterators. bios do get split and advances, but that
only affects the bi_iter state.

In a perfect world we'd split the memory containers aspect of the bio
from the iterator, but that would be a lot of churn and we've got
bigger fish to fry.