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:
@@ -22,6 +22,7 @@
|
||||
#include "xfs_attr_leaf.h"
|
||||
#include "xfs_quota.h"
|
||||
#include "xfs_dir2.h"
|
||||
#include "xfs_error.h"
|
||||
|
||||
/*
|
||||
* Look at all the extents for this logical region,
|
||||
@@ -209,6 +210,7 @@ xfs_attr3_node_inactive(
|
||||
*/
|
||||
if (level > XFS_DA_NODE_MAXDEPTH) {
|
||||
xfs_trans_brelse(*trans, bp); /* no locks for later trans */
|
||||
xfs_buf_corruption_error(bp);
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
|
||||
@@ -258,8 +260,9 @@ xfs_attr3_node_inactive(
|
||||
error = xfs_attr3_leaf_inactive(trans, dp, child_bp);
|
||||
break;
|
||||
default:
|
||||
error = -EFSCORRUPTED;
|
||||
xfs_buf_corruption_error(child_bp);
|
||||
xfs_trans_brelse(*trans, child_bp);
|
||||
error = -EFSCORRUPTED;
|
||||
break;
|
||||
}
|
||||
if (error)
|
||||
@@ -342,6 +345,7 @@ xfs_attr3_root_inactive(
|
||||
break;
|
||||
default:
|
||||
error = -EFSCORRUPTED;
|
||||
xfs_buf_corruption_error(bp);
|
||||
xfs_trans_brelse(*trans, bp);
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user