Thread (6 messages) 6 messages, 2 authors, 2021-07-06

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

From: "Darrick J. Wong" <djwong@kernel.org>
Date: 2021-07-06 18:30:24

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:
quoted
From: Darrick J. Wong <djwong@kernel.org>

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@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help