On Mon, Jul 05, 2021 at 04:25:27PM +0100, Christoph Hellwig wrote: > On Fri, Jul 02, 2021 at 07:58:20PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > > > There's a bunch of code in fsmap.c that tries to count the GETFSMAP > > records so that it can size the fsmap array appropriately for the > > GETFSMAP call. It's pointless to iterate the entire result set /twice/ > > (unlike the bmap command where the extent count is actually stored in > > the fs metadata), so get rid of the duplicate walk. > > In otherwords: just keep iterating over the records using the default > chunk size instead of doing one call to find the size and then do > a giant allocation and GETFSMAP call. I'll paste this into the commit log, thanks. --D > I find the current commit log a little confusing, but the change itself > looks good: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx>