xfs_health.c (5c8483cec3fe261a5c1ede7430bab042ed156361) xfs_health.c (77a530e6c49d22bd4a221d2f059db24fc30094db)
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2019 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 517 unchanged lines hidden (view full) ---

526 xfs_inode_mark_sick(ip, mask);
527}
528
529/* Record observations of btree corruption with the health tracking system. */
530void
531xfs_btree_mark_sick(
532 struct xfs_btree_cur *cur)
533{
1// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (C) 2019 Oracle. All Rights Reserved.
4 * Author: Darrick J. Wong <darrick.wong@oracle.com>
5 */
6#include "xfs.h"
7#include "xfs_fs.h"
8#include "xfs_shared.h"

--- 517 unchanged lines hidden (view full) ---

526 xfs_inode_mark_sick(ip, mask);
527}
528
529/* Record observations of btree corruption with the health tracking system. */
530void
531xfs_btree_mark_sick(
532 struct xfs_btree_cur *cur)
533{
534 switch (cur->bc_ops->type) {
535 case XFS_BTREE_TYPE_MEM:
536 /* no health state tracking for ephemeral btrees */
537 return;
538 case XFS_BTREE_TYPE_AG:
534 if (xfs_btree_is_bmap(cur->bc_ops)) {
535 xfs_bmap_mark_sick(cur->bc_ino.ip, cur->bc_ino.whichfork);
536 /* no health state tracking for ephemeral btrees */
537 } else if (cur->bc_ops->type != XFS_BTREE_TYPE_MEM) {
538 ASSERT(cur->bc_group);
539 ASSERT(cur->bc_ops->sick_mask);
539 ASSERT(cur->bc_ops->sick_mask);
540 xfs_ag_mark_sick(cur->bc_ag.pag, cur->bc_ops->sick_mask);
541 return;
542 case XFS_BTREE_TYPE_INODE:
543 if (xfs_btree_is_bmap(cur->bc_ops)) {
544 xfs_bmap_mark_sick(cur->bc_ino.ip,
545 cur->bc_ino.whichfork);
546 return;
547 }
548 fallthrough;
549 default:
550 ASSERT(0);
551 return;
540 xfs_group_mark_sick(cur->bc_group, cur->bc_ops->sick_mask);
552 }
553}
554
555/*
556 * Record observations of dir/attr btree corruption with the health tracking
557 * system.
558 */
559void

--- 31 unchanged lines hidden ---
541 }
542}
543
544/*
545 * Record observations of dir/attr btree corruption with the health tracking
546 * system.
547 */
548void

--- 31 unchanged lines hidden ---