On Mon, May 12, 2025 at 10:04:00AM -0700, Darrick J. Wong wrote: > Hmm. I started wondering why you can't reuse chunk->scratch->offset in > the bio_add_folio_nofail call below. I /think/ that's because > xfs_zone_gc_start_chunk increments chunk->scratch->offset after adding > the folio to the bio? Exactly, it's a basically a circular buffer. > And then we can attach the same scratch->folio to different read bios. > Each bio gets a different offset within the folio, right? Yes. > So > xfs_zone_gc_write_chunk really does need to find the offset_in_folio > from the read bio. And I guess that's why you use bvec_phys to figure > that out (instead of, say, wasting space recording it again in the > xfs_gc_bio), correct? Yes.