Re: [PATCH 1/3] block: add a bio_reuse helper

Christoph Hellwig
2026-01-09T16:25:15Z

On Fri, Jan 09, 2026 at 08:19:06AM -0800, Darrick J. Wong wrote:
> General question about bio_reset -- it calls bio_uninit, which strips
> off the integrity and crypt metadata. I /think/ that will all get
> re-added if necessary during the subsequent bio submission, right?

Yes.

> For your zonegc case, I wonder if it's actually a good idea to keep that
> metadata attached as long as the bdev doesn't change across reuse?

We need to generate different metadata for a different block location.
Reusing the allocation might be useful, but it would really complicate
this API, especially as the currently most common way to use integrity
metadata is through the block layer auto PI, which allocates it below
submit_bio and frees it before calling back into the submitter on I/O
completion.

But it might be worth writing up another sentence on this in the comment.