btrfs: tests: test invalid splitting when skipping pinned drop extent_map
authorJosef Bacik <josef@toxicpanda.com>
Thu, 17 Aug 2023 20:57:33 +0000 (16:57 -0400)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Aug 2023 12:54:49 +0000 (14:54 +0200)
commit92e1229b204d66525ee95054188938142420324d
treed776c977f166f744beb0b7381769f6d2f3026706
parentf345dbdf2c9c4733d52b9389da6c02672f3b8672
btrfs: tests: test invalid splitting when skipping pinned drop extent_map

This reproduces the bug fixed by "btrfs: fix incorrect splitting in
btrfs_drop_extent_map_range", we were improperly calculating the range
for the split extent.  Add a test that exercises this scenario and
validates that we get the correct resulting extent_maps in our tree.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tests/extent-map-tests.c