On Wed, Oct 04, 2023 at 11:19:37AM +1100, Dave Chinner wrote: > + if (max_blen > *blen) { > + if (max_blen_agno != startag) { > + ap->blkno = XFS_AGB_TO_FSB(mp, max_blen_agno, 0); > + ap->aeof = false; > + } > + *blen = max_blen; > + } A comment explaining that we at least want the longest freespace if no perfect match is available here would be useful to future readers. Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>