Message ID | 001ec4d2336af581f1014c6a3ec96c24ba6e5dba.1733989299.git.jth@kernel.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | btrfs: more RST delete fixes | expand |
On Thu, Dec 12, 2024 at 7:56 AM Johannes Thumshirn <jth@kernel.org> wrote: > > From: Johannes Thumshirn <johannes.thumshirn@wdc.com> > > Commit 5e72aabc1fff ("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. > > Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Looks good, thanks. > --- > fs/btrfs/tests/raid-stripe-tree-tests.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/btrfs/tests/raid-stripe-tree-tests.c b/fs/btrfs/tests/raid-stripe-tree-tests.c > index f060c04c7f76..19f6147a38a5 100644 > --- a/fs/btrfs/tests/raid-stripe-tree-tests.c > +++ b/fs/btrfs/tests/raid-stripe-tree-tests.c > @@ -125,7 +125,7 @@ static int test_front_delete(struct btrfs_trans_handle *trans) > } > > ret = btrfs_get_raid_extent_offset(fs_info, logical, &len, map_type, 0, &io_stripe); > - if (!ret) { > + if (ret != -ENODATA) { > ret = -EINVAL; > test_err("lookup of RAID extent [%llu, %llu] succeeded, should fail", > logical, logical + SZ_32K); > -- > 2.43.0 > >
diff --git a/fs/btrfs/tests/raid-stripe-tree-tests.c b/fs/btrfs/tests/raid-stripe-tree-tests.c index f060c04c7f76..19f6147a38a5 100644 --- a/fs/btrfs/tests/raid-stripe-tree-tests.c +++ b/fs/btrfs/tests/raid-stripe-tree-tests.c @@ -125,7 +125,7 @@ static int test_front_delete(struct btrfs_trans_handle *trans) } ret = btrfs_get_raid_extent_offset(fs_info, logical, &len, map_type, 0, &io_stripe); - if (!ret) { + if (ret != -ENODATA) { ret = -EINVAL; test_err("lookup of RAID extent [%llu, %llu] succeeded, should fail", logical, logical + SZ_32K);