]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: fix tree log remove space corner case
authorJosef Bacik <jbacik@fusionio.com>
Wed, 27 Jun 2012 19:10:56 +0000 (15:10 -0400)
committerChris Mason <chris.mason@fusionio.com>
Mon, 2 Jul 2012 19:39:18 +0000 (15:39 -0400)
commit9ae4a9d7f57111f2049c2ca07e6db431b32d8b62
tree78e24aa16c3d3cec9133616fa9076f7420e03612
parent82fefafac1e787be4041921d42bb5c452b069005
Btrfs: fix tree log remove space corner case

The tree log stuff can have allocated space that we end up having split
across a bitmap and a real extent.  The free space code does not deal with
this, it assumes that if it finds an extent or bitmap entry that the entire
range must fall within the entry it finds.  This isn't necessarily the case,
so rework the remove function so it can handle this case properly.  This
fixed two panics the user hit, first in the case where the space was
initially in a bitmap and then in an extent entry, and then the reverse
case.  Thanks,

Reported-and-tested-by: Shaun Reich <sreich@kde.org>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/free-space-cache.c