Skip to content

Commit 3705691

Browse files
author
Darrick J. Wong
committed
xfs: report directory tree corruption in the health information
Report directories that are the source of corruption in the directory tree. Signed-off-by: Darrick J. Wong <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]>
1 parent d54c5ac commit 3705691

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

fs/xfs/libxfs/xfs_fs.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ struct xfs_bulkstat {
411411
#define XFS_BS_SICK_XATTR (1 << 5) /* extended attributes */
412412
#define XFS_BS_SICK_SYMLINK (1 << 6) /* symbolic link remote target */
413413
#define XFS_BS_SICK_PARENT (1 << 7) /* parent pointers */
414+
#define XFS_BS_SICK_DIRTREE (1 << 8) /* directory tree structure */
414415

415416
/*
416417
* Project quota id helpers (previously projid was 16bit only

fs/xfs/libxfs/xfs_health.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ struct xfs_da_args;
9595

9696
/* Don't propagate sick status to ag health summary during inactivation */
9797
#define XFS_SICK_INO_FORGET (1 << 12)
98+
#define XFS_SICK_INO_DIRTREE (1 << 13) /* directory tree structure */
9899

99100
/* Primary evidence of health problems in a given group. */
100101
#define XFS_SICK_FS_PRIMARY (XFS_SICK_FS_COUNTERS | \
@@ -125,7 +126,8 @@ struct xfs_da_args;
125126
XFS_SICK_INO_DIR | \
126127
XFS_SICK_INO_XATTR | \
127128
XFS_SICK_INO_SYMLINK | \
128-
XFS_SICK_INO_PARENT)
129+
XFS_SICK_INO_PARENT | \
130+
XFS_SICK_INO_DIRTREE)
129131

130132
#define XFS_SICK_INO_ZAPPED (XFS_SICK_INO_BMBTD_ZAPPED | \
131133
XFS_SICK_INO_BMBTA_ZAPPED | \

fs/xfs/scrub/health.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ static const struct xchk_health_map type_to_health_flag[XFS_SCRUB_TYPE_NR] = {
108108
[XFS_SCRUB_TYPE_FSCOUNTERS] = { XHG_FS, XFS_SICK_FS_COUNTERS },
109109
[XFS_SCRUB_TYPE_QUOTACHECK] = { XHG_FS, XFS_SICK_FS_QUOTACHECK },
110110
[XFS_SCRUB_TYPE_NLINKS] = { XHG_FS, XFS_SICK_FS_NLINKS },
111+
[XFS_SCRUB_TYPE_DIRTREE] = { XHG_INO, XFS_SICK_INO_DIRTREE },
111112
};
112113

113114
/* Return the health status mask for this scrub type. */

fs/xfs/xfs_health.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,7 @@ static const struct ioctl_sick_map ino_map[] = {
470470
{ XFS_SICK_INO_BMBTA_ZAPPED, XFS_BS_SICK_BMBTA },
471471
{ XFS_SICK_INO_DIR_ZAPPED, XFS_BS_SICK_DIR },
472472
{ XFS_SICK_INO_SYMLINK_ZAPPED, XFS_BS_SICK_SYMLINK },
473+
{ XFS_SICK_INO_DIRTREE, XFS_BS_SICK_DIRTREE },
473474
{ 0, 0 },
474475
};
475476

0 commit comments

Comments
 (0)