xfs: replace -EIO with -EFSCORRUPTED for corrupt metadata
There are a few places where we return -EIO instead of -EFSCORRUPTED when we find corrupt metadata. Fix those places. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com>
This commit is contained in:
@@ -1375,7 +1375,7 @@ xfs_bmap_last_before(
|
||||
case XFS_DINODE_FMT_EXTENTS:
|
||||
break;
|
||||
default:
|
||||
return -EIO;
|
||||
return -EFSCORRUPTED;
|
||||
}
|
||||
|
||||
if (!(ifp->if_flags & XFS_IFEXTENTS)) {
|
||||
@@ -1476,7 +1476,7 @@ xfs_bmap_last_offset(
|
||||
|
||||
if (XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_BTREE &&
|
||||
XFS_IFORK_FORMAT(ip, whichfork) != XFS_DINODE_FMT_EXTENTS)
|
||||
return -EIO;
|
||||
return -EFSCORRUPTED;
|
||||
|
||||
error = xfs_bmap_last_extent(NULL, ip, whichfork, &rec, &is_empty);
|
||||
if (error || is_empty)
|
||||
@@ -5869,7 +5869,7 @@ xfs_bmap_insert_extents(
|
||||
del_cursor);
|
||||
|
||||
if (stop_fsb >= got.br_startoff + got.br_blockcount) {
|
||||
error = -EIO;
|
||||
error = -EFSCORRUPTED;
|
||||
goto del_cursor;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user