diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-02-19 17:02:57 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-06-01 21:16:47 -0700 |
commit | 57230a844458bc519a1ba576eeafe6ac3bc5eac1 (patch) | |
tree | 1d2219e759843d29fff0515d77c7755e3851aef8 /fs/xfs/libxfs/xfs_inode_fork.c | |
parent | 9a47046b0ace21791676aab53bebcd65b811e919 (diff) |
xfs: report realtime rmap btree corruption errors to the health systemrealtime-rmap_2020-06-01
Whenever we encounter corrupt realtime rmap btree blocks, we should
report that to the health monitoring system for later reporting.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_inode_fork.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_inode_fork.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_inode_fork.c b/fs/xfs/libxfs/xfs_inode_fork.c index e72751af4239..9204ff32ee58 100644 --- a/fs/xfs/libxfs/xfs_inode_fork.c +++ b/fs/xfs/libxfs/xfs_inode_fork.c @@ -78,8 +78,13 @@ xfs_iformat_fork( error = xfs_iformat_btree(ip, dip, XFS_DATA_FORK); break; case XFS_DINODE_FMT_RMAP: - if (!xfs_sb_version_hasrtrmapbt(&ip->i_mount->m_sb)) + if (!xfs_sb_version_hasrtrmapbt(&ip->i_mount->m_sb)) { + xfs_inode_verifier_error(ip, -EFSCORRUPTED, + __func__, dip, sizeof(*dip), + __this_address); + xfs_inode_mark_sick(ip, XFS_SICK_INO_CORE); return -EFSCORRUPTED; + } error = xfs_iformat_rmap(ip, dip); break; default: |