btrfs: tree-checker: check for overlapping extent items
authorJosef Bacik <josef@toxicpanda.com>
Wed, 3 Aug 2022 18:28:47 +0000 (14:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:12 +0000 (10:30 +0200)
commit6a27997cf44eab55007e49bceb158a32ef8e7811
tree756bfc23486a1bda620b3381bc900a3f5b7756d5
parent1b2a7ddeaa779478fbaaeb83cacd95270ae71fa3
btrfs: tree-checker: check for overlapping extent items

[ Upstream commit 899b7f69f244e539ea5df1b4d756046337de44a5 ]

We're seeing a weird problem in production where we have overlapping
extent items in the extent tree.  It's unclear where these are coming
from, and in debugging we realized there's no check in the tree checker
for this sort of problem.  Add a check to the tree-checker to make sure
that the extents do not overlap each other.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/btrfs/tree-checker.c