OpenCloudOS-Kernel/fs/btrfs/tests
Filipe Manana 6d3b050efa btrfs: assert we have a write lock when removing and replacing extent maps
Removing or replacing an extent map requires holding a write lock on the
extent map's tree. We currently do that everywhere, except in one of the
self tests, where it's harmless since there's no concurrency.

In order to catch possible races in the future, assert that we are holding
a write lock on the extent map tree before removing or replacing an extent
map in the tree, and update the self test to obtain a write lock before
removing extent maps.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-03-14 13:13:50 +01:00
..
btrfs-tests.c btrfs: track the csum, extent, and free space trees in a rb tree 2022-01-03 15:09:50 +01:00
btrfs-tests.h btrfs: selftests: Add support for dummy devices 2020-01-23 17:24:34 +01:00
extent-buffer-tests.c btrfs: drop the _nr from the item helpers 2022-01-03 15:09:43 +01:00
extent-io-tests.c btrfs: selftests: dump extent io tree if extent-io-tree test failed 2022-01-07 14:18:27 +01:00
extent-map-tests.c btrfs: assert we have a write lock when removing and replacing extent maps 2022-03-14 13:13:50 +01:00
free-space-tests.c btrfs: track the csum, extent, and free space trees in a rb tree 2022-01-03 15:09:50 +01:00
free-space-tree-tests.c btrfs: track the csum, extent, and free space trees in a rb tree 2022-01-03 15:09:50 +01:00
inode-tests.c btrfs: unexport setup_items_for_insert() 2021-10-26 19:08:03 +02:00
qgroup-tests.c btrfs: track the csum, extent, and free space trees in a rb tree 2022-01-03 15:09:50 +01:00