]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: check btree block ownership with bnobt/rmapbt when scrubbing btree
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 17 Jan 2018 02:53:05 +0000 (18:53 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 18 Jan 2018 05:00:45 +0000 (21:00 -0800)
commit63c65a39ff03a88de211d61c9614be1253bb4c5c
tree24c285ea1fff987b9cdc1e7668024f0f6afa15f2
parentdcfbb88cebfdc1f117bb54ce7e4b9953148b5d73
xfs: check btree block ownership with bnobt/rmapbt when scrubbing btree

When scanning a metadata btree block, cross-reference the block location
with the free space btree and the reverse mapping btree to ensure that
the rmapbt knows about the block and the bnobt does not.  Add a
mechanism to defer checks when we happen to be scanning the bnobt/rmapbt
itself because it's less efficient to repeatedly clone and destroy the
cursor.

This patch provides the framework to make btree block owner checks
happen; the actual meat will be added in subsequent patches.

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