]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: selftests: add selftest for punching holes into the RAID stripe extents
authorJohannes Thumshirn <johannes.thumshirn@wdc.com>
Mon, 13 Jan 2025 19:31:53 +0000 (20:31 +0100)
committerDavid Sterba <dsterba@suse.com>
Tue, 14 Jan 2025 14:54:45 +0000 (15:54 +0100)
commit27ae15b25b6e892a4161bc33c7f2b8a356318a2c
tree1bf10efe571a3ef50fb2a34bf03fb8ecff43cb5b
parent1d395c3926d8996918ca29a67fe194e7088491d9
btrfs: selftests: add selftest for punching holes into the RAID stripe extents

Add a selftest for punching a hole into a RAID stripe extent. The test
create an 1M extent and punches a 64k bytes long hole at offset of 32k from
the start of the extent.

Afterwards it verifies the start and length of both resulting new extents
"left" and "right" as well as the absence of the hole.

Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tests/raid-stripe-tree-tests.c