Skip to content

Commit eba444f

Browse files
fdmananakdave
authored andcommitted
btrfs: return -EUCLEAN if extent item is missing when searching inline backref
At lookup_inline_extent_backref() when trying to insert an inline backref, if we don't find the extent item we log an error and then return -EIO. This error code is confusing because there was actually no IO error, and this means we have some corruption, either caused by a bug or something like a memory bitflip for example. So change the error code from -EIO to -EUCLEAN. Reviewed-by: Josef Bacik <[email protected]> Signed-off-by: Filipe Manana <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent cc925b9 commit eba444f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/extent-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ int lookup_inline_extent_backref(struct btrfs_trans_handle *trans,
851851
"extent item not found for insert, bytenr %llu num_bytes %llu parent %llu root_objectid %llu owner %llu offset %llu",
852852
bytenr, num_bytes, parent, root_objectid, owner,
853853
offset);
854-
ret = -EIO;
854+
ret = -EUCLEAN;
855855
goto out;
856856
}
857857

0 commit comments

Comments
 (0)