diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-10-10 15:45:18 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-11-22 21:35:04 -0800 |
commit | cf31c16e0f18312a44244487cd7e24f79e40fd1b (patch) | |
tree | 94a76e4d384dfd290aeeb11bc26a07b782c2a9dc /fs/xfs/libxfs/xfs_btree.c | |
parent | 290a5447402e14603794852d19cfba58f28c9a2c (diff) |
xfs: always log corruption errorsreport-corruption_2019-11-22
Make sure we log something to dmesg whenever we return -EFSCORRUPTED up
the call stack.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index 39d0ebc86816..ae8220f7fb70 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -1832,6 +1832,7 @@ xfs_btree_lookup_get_block( out_bad: *blkp = NULL; + xfs_buf_corruption_error(bp); xfs_trans_brelse(cur->bc_tp, bp); return -EFSCORRUPTED; } @@ -1879,8 +1880,10 @@ xfs_btree_lookup( XFS_BTREE_STATS_INC(cur, lookup); /* No such thing as a zero-level tree. */ - if (cur->bc_nlevels == 0) + if (cur->bc_nlevels == 0) { + XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, cur->bc_mp); return -EFSCORRUPTED; + } block = NULL; keyno = 0; |