Hi all, In a previous series we performed a lot of cleanups to the metadata corruption detection code in XFS. Now add the ability to report these problems to the health tracking system so that administrators can gather reports on live filesystems, and (in the future) to enable more targeted scanning of metadata. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D kernel git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=corruption-health-reports xfsprogs git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=corruption-health-reports fstests git tree: https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=corruption-health-reports --- fs/xfs/libxfs/xfs_alloc.c | 103 ++++++++++++++++++++---- fs/xfs/libxfs/xfs_attr_leaf.c | 5 + fs/xfs/libxfs/xfs_attr_remote.c | 25 +++--- fs/xfs/libxfs/xfs_bmap.c | 115 ++++++++++++++++++++++++-- fs/xfs/libxfs/xfs_btree.c | 30 ++++++- fs/xfs/libxfs/xfs_da_btree.c | 35 +++++++- fs/xfs/libxfs/xfs_dir2.c | 5 + fs/xfs/libxfs/xfs_dir2_block.c | 2 fs/xfs/libxfs/xfs_dir2_data.c | 3 + fs/xfs/libxfs/xfs_dir2_leaf.c | 3 + fs/xfs/libxfs/xfs_dir2_node.c | 7 ++ fs/xfs/libxfs/xfs_health.h | 35 +++++++- fs/xfs/libxfs/xfs_ialloc.c | 56 +++++++++++-- fs/xfs/libxfs/xfs_inode_buf.c | 4 + fs/xfs/libxfs/xfs_inode_fork.c | 8 ++ fs/xfs/libxfs/xfs_refcount.c | 36 ++++++++ fs/xfs/libxfs/xfs_rmap.c | 86 +++++++++++++++++++- fs/xfs/libxfs/xfs_rmap.h | 2 fs/xfs/libxfs/xfs_rtbitmap.c | 9 ++ fs/xfs/libxfs/xfs_sb.c | 2 fs/xfs/scrub/health.c | 20 +++-- fs/xfs/scrub/refcount_repair.c | 4 + fs/xfs/scrub/rmap.c | 2 fs/xfs/xfs_attr_inactive.c | 4 + fs/xfs/xfs_attr_list.c | 7 +- fs/xfs/xfs_discard.c | 2 fs/xfs/xfs_dquot.c | 28 ++++++ fs/xfs/xfs_health.c | 170 +++++++++++++++++++++++++++++++++++++++ fs/xfs/xfs_icache.c | 5 + fs/xfs/xfs_inode.c | 11 +++ fs/xfs/xfs_iomap.c | 15 +++ fs/xfs/xfs_iops.c | 5 + fs/xfs/xfs_iwalk.c | 4 + fs/xfs/xfs_mount.c | 5 + fs/xfs/xfs_qm.c | 9 ++ fs/xfs/xfs_rtalloc.c | 5 + fs/xfs/xfs_symlink.c | 4 + 37 files changed, 784 insertions(+), 87 deletions(-)