• Darrick J. Wong's avatar
    xfs: report XFS_IS_CORRUPT errors to the health system · 989d5ec3
    Darrick J. Wong authored
    Whenever we encounter XFS_IS_CORRUPT failures, we should report that to
    the health monitoring system for later reporting.
    
    I started with this semantic patch and massaged everything until it
    built:
    
    @@
    expression mp, test;
    @@
    
    - if (XFS_IS_CORRUPT(mp, test)) return -EFSCORRUPTED;
    + if (XFS_IS_CORRUPT(mp, test)) { xfs_btree_mark_sick(cur); return -EFSCORRUPTED; }
    
    @@
    expression mp, test;
    identifier label, error;
    @@
    
    - if (XFS_IS_CORRUPT(mp, test)) { error = -EFSCORRUPTED; goto label; }
    + if (XFS_IS_CORRUPT(mp, test)) { xfs_btree_mark_sick(cur); error = -EFSCORRUPTED; goto label; }
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    989d5ec3
xfs_dir2_readdir.c 13.8 KB