Re: [PATCH 2/2] xfs_io: don't count fsmaps before querying fsmaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 find the current commit log a little confusing, but the change itself
looks good:

Reviewed-by: Christoph Hellwig <hch@xxxxxx>



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux