]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: look into the extent during find_all_leafs
authorJan Schmidt <list.btrfs@jan-o-sch.net>
Thu, 17 May 2012 14:43:03 +0000 (16:43 +0200)
committerJan Schmidt <list.btrfs@jan-o-sch.net>
Sat, 26 May 2012 10:17:52 +0000 (12:17 +0200)
commit8d27a65f58052670248f3913a1f1f9268c15a7d5
tree77d53f8b40ea6a1692fbf93bdc2bbc0daf01e85c
parentfd4c7d32b50dc138a886bcb3604515f0b06691d2
Btrfs: look into the extent during find_all_leafs

Before this patch we called find_all_leafs for a data extent, then called
find_all_roots and then looked into the extent to grab the information
we were seeking. This was done without holding the leaves locked to avoid
deadlocks. However, this can obviouly race with concurrent tree
modifications.

Instead, we now look into the extent while we're holding the lock during
find_all_leafs and store this information together with the leaf list.

Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
fs/btrfs/backref.c
fs/btrfs/backref.h