Searched hist:"6 d3b050efa079f5bc4d5e2a8f37f0dc0345a2096" (Results 1 – 2 of 2) sorted by relevance
/openbmc/linux/fs/btrfs/tests/ |
H A D | extent-map-tests.c | diff 6d3b050efa079f5bc4d5e2a8f37f0dc0345a2096 Thu Feb 03 09:36:45 CST 2022 Filipe Manana <fdmanana@suse.com> 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>
|
/openbmc/linux/fs/btrfs/ |
H A D | extent_map.c | diff 6d3b050efa079f5bc4d5e2a8f37f0dc0345a2096 Thu Feb 03 09:36:45 CST 2022 Filipe Manana <fdmanana@suse.com> 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>
|