summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2024-02-22 12:32:18 -0800
committerDarrick J. Wong <djwong@kernel.org>2024-02-22 12:32:18 -0800
commitca14c0968c1f693ab4bcb5368c800c33e7a2ad7e (patch)
treef7d5afbf2de3956a8b17939837538a3288314842 /fs/xfs/libxfs/xfs_dir2_leaf.c
parenta78d10f45b23149f1b23019a4f4fb57dcf852e39 (diff)
downloadlinux-ca14c0968c1f693ab4bcb5368c800c33e7a2ad7e.tar.gz
linux-ca14c0968c1f693ab4bcb5368c800c33e7a2ad7e.tar.bz2
linux-ca14c0968c1f693ab4bcb5368c800c33e7a2ad7e.zip
xfs: report dir/attr block corruption errors to the health system
Whenever we encounter corrupt directory or extended attribute 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/libxfs/xfs_dir2_leaf.c')
-rw-r--r--fs/xfs/libxfs/xfs_dir2_leaf.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_dir2_leaf.c b/fs/xfs/libxfs/xfs_dir2_leaf.c
index cb9e950a911d..08dda5ce9d91 100644
--- a/fs/xfs/libxfs/xfs_dir2_leaf.c
+++ b/fs/xfs/libxfs/xfs_dir2_leaf.c
@@ -19,6 +19,7 @@
#include "xfs_trace.h"
#include "xfs_trans.h"
#include "xfs_buf_item.h"
+#include "xfs_health.h"
/*
* Local function declarations.
@@ -1393,8 +1394,10 @@ xfs_dir2_leaf_removename(
bestsp = xfs_dir2_leaf_bests_p(ltp);
if (be16_to_cpu(bestsp[db]) != oldbest) {
xfs_buf_mark_corrupt(lbp);
+ xfs_da_mark_sick(args);
return -EFSCORRUPTED;
}
+
/*
* Mark the former data entry unused.
*/