]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: add helpers to collect and sift btree block pointers during repair
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 May 2018 05:18:09 +0000 (22:18 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 30 May 2018 15:03:14 +0000 (08:03 -0700)
commit5f9bfc3226b945723fba607638665efe9efe9a5e
tree0120120ceb502bd8d6dd4ee6554f8cba76bc873c
parentdf12f7a2593ca2813618deed47949b3ba4fe04bf
xfs: add helpers to collect and sift btree block pointers during repair

Add some helpers to assemble a list of fs block extents.  Generally,
repair functions will iterate the rmapbt to make a list (1) of all
extents owned by the nominal owner of the metadata structure; then they
will iterate all other structures with the same rmap owner to make a
list (2) of active blocks; and finally we have a subtraction function to
subtract all the blocks in (2) from (1), with the result that (1) is now
a list of blocks that were owned by the old btree and must be disposed.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/repair.c
fs/xfs/scrub/repair.h