]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: simplify free space btree calculations in init_freespace_cursors
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 10 Jul 2020 19:35:46 +0000 (15:35 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 10 Jul 2020 19:35:46 +0000 (15:35 -0400)
commit6ffc95232cee7ebeda302bdcc48d1b99ef2dbbe5
treef987c8ada5d470ae9f85144cc7289c1dbdb939b0
parenta891d871ee17680c12ebf57782fb8322f28e4247
xfs_repair: simplify free space btree calculations in init_freespace_cursors

Add a summary variable to the bulkload structure so that we can track
the number of blocks that have been reserved for a particular (btree)
bulkload operation.  Doing so enables us to simplify the logic in
init_freespace_cursors that deals with figuring out how many more blocks
we need to fill the bnobt/cntbt properly.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/agbtree.c
repair/bulkload.c
repair/bulkload.h