diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:32:44 +0100 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 21:32:44 +0100 |
commit | 8368ad49aaf771a6283840140149440b958b20fb (patch) | |
tree | cd17c572b107bcb351fa758e6e11e71284785eeb /fs/xfs/xfs_rtalloc.c | |
parent | xfs: report quota block corruption errors to the health system (diff) | |
download | linux-8368ad49aaf771a6283840140149440b958b20fb.tar.xz linux-8368ad49aaf771a6283840140149440b958b20fb.zip |
xfs: report realtime metadata corruption errors to the health system
Whenever we encounter corrupt realtime metadat blocks, we should report
that to the health monitoring system for later reporting.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_rtalloc.c')
-rw-r--r-- | fs/xfs/xfs_rtalloc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index b62b5c34413e..e66f9bd5de5c 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -22,6 +22,8 @@ #include "xfs_sb.h" #include "xfs_rtbitmap.h" #include "xfs_quota.h" +#include "xfs_log_priv.h" +#include "xfs_health.h" /* * Return whether there are any free extents in the size range given @@ -1202,6 +1204,8 @@ xfs_rtmount_inodes( sbp = &mp->m_sb; error = xfs_iget(mp, NULL, sbp->sb_rbmino, 0, 0, &mp->m_rbmip); + if (xfs_metadata_is_sick(error)) + xfs_rt_mark_sick(mp, XFS_SICK_RT_BITMAP); if (error) return error; ASSERT(mp->m_rbmip != NULL); @@ -1211,6 +1215,8 @@ xfs_rtmount_inodes( goto out_rele_bitmap; error = xfs_iget(mp, NULL, sbp->sb_rsumino, 0, 0, &mp->m_rsumip); + if (xfs_metadata_is_sick(error)) + xfs_rt_mark_sick(mp, XFS_SICK_RT_SUMMARY); if (error) goto out_rele_bitmap; ASSERT(mp->m_rsumip != NULL); |