xfs: always log corruption errors
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> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -1820,6 +1820,7 @@ xfs_btree_lookup_get_block(
|
||||
|
||||
out_bad:
|
||||
*blkp = NULL;
|
||||
xfs_buf_corruption_error(bp);
|
||||
xfs_trans_brelse(cur->bc_tp, bp);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
@@ -1867,8 +1868,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;
|
||||
|
Reference in New Issue
Block a user