]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: tree-checker: detect file extent items with overlapping ranges
authorFilipe Manana <fdmanana@suse.com>
Mon, 6 May 2019 15:44:12 +0000 (16:44 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 16 May 2019 12:33:51 +0000 (14:33 +0200)
commit417f944aff6e0db395255e93be6c2892291446a7
treed49383efac1e04f415a37a0aa0931cb6703040bc
parent19ee5b4359c6f864a9394d46d72ce589d378100d
Btrfs: tree-checker: detect file extent items with overlapping ranges

Having file extent items with ranges that overlap each other is a
serious issue that leads to all sorts of corruptions and crashes (like a
BUG_ON() during the course of __btrfs_drop_extents() when it traims file
extent items). Therefore teach the tree checker to detect such cases.
This is motivated by a recently fixed bug (race between ranged full
fsync and writeback or adjacent ranges).

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/tree-checker.c