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:
@@ -702,8 +702,10 @@ xfs_alloc_update_counters(
|
||||
|
||||
xfs_trans_agblocks_delta(tp, len);
|
||||
if (unlikely(be32_to_cpu(agf->agf_freeblks) >
|
||||
be32_to_cpu(agf->agf_length)))
|
||||
be32_to_cpu(agf->agf_length))) {
|
||||
xfs_buf_corruption_error(agbp);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
|
||||
xfs_alloc_log_agf(tp, agbp, XFS_AGF_FREEBLKS);
|
||||
return 0;
|
||||
@@ -1048,6 +1050,7 @@ xfs_alloc_ag_vextent_small(
|
||||
|
||||
bp = xfs_btree_get_bufs(args->mp, args->tp, args->agno, fbno);
|
||||
if (!bp) {
|
||||
XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, args->mp);
|
||||
error = -EFSCORRUPTED;
|
||||
goto error;
|
||||
}
|
||||
@@ -2215,8 +2218,10 @@ xfs_free_agfl_block(
|
||||
return error;
|
||||
|
||||
bp = xfs_btree_get_bufs(tp->t_mountp, tp, agno, agbno);
|
||||
if (!bp)
|
||||
if (!bp) {
|
||||
XFS_ERROR_REPORT(__func__, XFS_ERRLEVEL_LOW, tp->t_mountp);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
xfs_trans_binval(tp, bp);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user