]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs_io: don't count fsmaps before querying fsmaps
authorDarrick J. Wong <djwong@kernel.org>
Fri, 11 Jun 2021 18:19:53 +0000 (11:19 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 2 Jul 2021 23:28:41 +0000 (16:28 -0700)
commit6be5f4eef113ced9764c29ddaaf2f1ba2bd21d0d
treed22351984a58c884b5669f6ffb2dc308b7dade52
parent4f5bd98fe0be39465d8f7990ee63c25cc4a0ff79
xfs_io: don't count fsmaps before querying fsmaps

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.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
io/fsmap.c