]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: exclude logged extents before replying when we are mixed
authorJosef Bacik <jbacik@fusionio.com>
Thu, 6 Jun 2013 17:19:32 +0000 (13:19 -0400)
committerJosef Bacik <jbacik@fusionio.com>
Fri, 14 Jun 2013 15:30:17 +0000 (11:30 -0400)
commita490f82a5cd8c886f66c7f8603a3b3419adf4737
tree05230bf96a4c0122d672ea41426b992442e71089
parentfcd91cadc4d340585a0e2c0eeef41876b251d02d
Btrfs: exclude logged extents before replying when we are mixed

With non-mixed block groups we replay the logs before we're allowed to do any
writes, so we get away with not pinning/removing the data extents until right
when we replay them.  However with mixed block groups we allocate out of the
same pool, so we could easily allocate a metadata block that was logged in our
tree log.  To deal with this we just need to notice that we have mixed block
groups and do the normal excluding/removal dance during the pin stage of the log
replay and that way we don't allocate metadata blocks from areas we have logged
data extents.  With this patch we now pass xfstests generic/311 with mixed
block groups turned on.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/ctree.h
fs/btrfs/extent-tree.c
fs/btrfs/tree-log.c