btrfs: free space cache cleanups
PATCH 1/4 btrfs: free space cache cleanups
This patch cleans up the free space cache code a bit. It better documents the idiosyncrasies of tree_search_offset and makes the code make a bit more sense. I took out the info allocation at the start of __btrfs_add_free_space and put it where it makes more sense. This was left over cruft from when alloc_mutex existed. Also all of the re-searches we do to make sure we inserted properly.
Signed-off-by Josef Bacik <[email protected]>
--- fs/btrfs/extent-tree.c | 2 +- fs/btrfs/free-space-cache.c | 93 ++++++++++++++++++++----------------------- 2 files changed, 44 insertions(+), 51 deletions(-)
fs/btrfs/extent-tree.c +1 -1
@@ -291,8 +291,8 @@ next: block_group->key.objectid + block_group->key.offset); -remove_sb_from_cache (root, block_group); block_group->cached =1 ; +remove_sb_from_cache (root, block_group); ret =0 ; err:btrfs_free_path (path);
fs/btrfs/free-space-cache.c +43 -50
194 lines not on this page · raw message
Signature · 1 line
1.5.4.3