summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_rmap_item.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-08-06 11:06:35 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-08-06 14:48:49 -0700
commit58663feeda1ad2d7b50a7183c1958b80c8a8201f (patch)
treeb1db0d01748bb8032892c6012e928eced54e6a21 /fs/xfs/xfs_rmap_item.c
parentffd76c8830f301c329c169af3687d0af9b254d3e (diff)
xfs: grab active perag ref when reading AG headers
This patch prepares scrub to deal with the possibility of tearing down entire AGs by changing the order of resource acquisition to match the rest of the XFS codebase. In other words, scrub now grabs AG resources in order of: perag structure, then AGI/AGF/AGFL buffers, then btree cursors; and releases them in reverse order. This requires us to distinguish xchk_ag_init callers -- some are responding to a user request to check AG metadata, in which case we can return ENOENT to userspace; but other callers have an ondisk reference to an AG that they're trying to cross-reference. In this second case, the lack of an AG means there's ondisk corruption, since ondisk metadata cannot point into nonexistent space. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com>
Diffstat (limited to 'fs/xfs/xfs_rmap_item.c')
0 files changed, 0 insertions, 0 deletions