diff options
author | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 23:31:03 +0300 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2024-02-22 23:31:03 +0300 |
commit | de6077ec4198b9313c6e09e4c6acbe9179d057c1 (patch) | |
tree | ca348ebd9daa67f2eb5ef56c725d2af40c208d0d /fs/xfs/libxfs/xfs_bmap.c | |
parent | 50645ce8822d23ae3e002d3bee775fa8c315f957 (diff) | |
download | linux-de6077ec4198b9313c6e09e4c6acbe9179d057c1.tar.xz |
xfs: report ag header corruption errors to the health tracking system
Whenever we encounter a corrupt AG header, we should report that to the
health monitoring system for later reporting. Buffer readers that don't
respond to corruption events with a _mark_sick call can be detected with
the following script:
#!/bin/bash
# Detect missing calls to xfs_*_mark_sick
filter=cat
tty -s && filter=less
git grep -A10 -E '( = xfs_trans_read_buf| = xfs_buf_read\()' fs/xfs/*.[ch] fs/xfs/libxfs/*.[ch] | awk '
BEGIN {
ignore = 0;
lineno = 0;
delete lines;
}
{
if ($0 == "--") {
if (!ignore) {
for (i = 0; i < lineno; i++) {
print(lines[i]);
}
printf("--\n");
}
delete lines;
lineno = 0;
ignore = 0;
} else if ($0 ~ /mark_sick/) {
ignore = 1;
} else {
lines[lineno++] = $0;
}
}
' | $filter
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
0 files changed, 0 insertions, 0 deletions