summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_health.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fs/xfs/xfs_health.c36
1 files changed, 11 insertions, 25 deletions
diff --git a/fs/xfs/xfs_health.c b/fs/xfs/xfs_health.c
index 855221c0dd34..9921b5d3f158 100644
--- a/fs/xfs/xfs_health.c
+++ b/fs/xfs/xfs_health.c
@@ -526,36 +526,22 @@ void
xfs_btree_mark_sick(
struct xfs_btree_cur *cur)
{
- unsigned int mask;
-
- switch (cur->bc_btnum) {
- case XFS_BTNUM_BMAP:
- xfs_bmap_mark_sick(cur->bc_ino.ip, cur->bc_ino.whichfork);
+ switch (cur->bc_ops->type) {
+ case XFS_BTREE_TYPE_AG:
+ ASSERT(cur->bc_ops->sick_mask);
+ xfs_ag_mark_sick(cur->bc_ag.pag, cur->bc_ops->sick_mask);
return;
- case XFS_BTNUM_BNO:
- mask = XFS_SICK_AG_BNOBT;
- break;
- case XFS_BTNUM_CNT:
- mask = XFS_SICK_AG_CNTBT;
- break;
- case XFS_BTNUM_INO:
- mask = XFS_SICK_AG_INOBT;
- break;
- case XFS_BTNUM_FINO:
- mask = XFS_SICK_AG_FINOBT;
- break;
- case XFS_BTNUM_RMAP:
- mask = XFS_SICK_AG_RMAPBT;
- break;
- case XFS_BTNUM_REFC:
- mask = XFS_SICK_AG_REFCNTBT;
- break;
+ case XFS_BTREE_TYPE_INODE:
+ if (cur->bc_btnum == XFS_BTNUM_BMAP) {
+ xfs_bmap_mark_sick(cur->bc_ino.ip,
+ cur->bc_ino.whichfork);
+ return;
+ }
+ fallthrough;
default:
ASSERT(0);
return;
}
-
- xfs_ag_mark_sick(cur->bc_ag.pag, mask);
}
/*