Skip to content

Commit d44d3d7

Browse files
morbidrsakdave
authored andcommitted
btrfs: selftests: check for correct return value of failed lookup
Commit 5e72aab ("btrfs: return ENODATA in case RST lookup fails") changed btrfs_get_raid_extent_offset()'s return value to ENODATA in case the RAID stripe-tree lookup failed. Adjust the test cases which check for absence of a given range to check for ENODATA as return value in this case. Reviewed-by: Filipe Manana <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent dc14ba1 commit d44d3d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/tests/raid-stripe-tree-tests.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ static int test_front_delete(struct btrfs_trans_handle *trans)
125125
}
126126

127127
ret = btrfs_get_raid_extent_offset(fs_info, logical, &len, map_type, 0, &io_stripe);
128-
if (!ret) {
128+
if (ret != -ENODATA) {
129129
ret = -EINVAL;
130130
test_err("lookup of RAID extent [%llu, %llu] succeeded, should fail",
131131
logical, logical + SZ_32K);

0 commit comments

Comments
 (0)