Btrfs: free up block groups after everything
PATCH 1/1 Btrfs: free up block groups after everything
If we abort a transaction we will do the tree log cleanup at unmount, but this happens after we free up the block groups. This makes all the leak detection warnings go off because we think we've leaked space but in reality we just haven't cleaned it up yet. So instead do the block group cleanup stuff after free'ing the fs roots so we don't get these warnings. Thanks,
--- fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/btrfs/disk-io.c +2 -2
@@ -3637,12 +3637,12 @@ int close_ctree(struct btrfs_root *root) percpu_counter_sum(&fs_info->delalloc_bytes)); } -btrfs_free_block_groups (fs_info); -btrfs_stop_all_workers (fs_info);del_fs_roots (fs_info); +btrfs_free_block_groups (fs_info); +free_root_pointers (fs_info,1 );iput (fs_info->btree_inode);
Signature · 1 line
1.8.3.1
Quoted 5 lines · Josef Bacik
If we abort a transaction we will do the tree log cleanup at unmount, but this happens after we free up the block groups. This makes all the leak detection warnings go off because we think we've leaked space but in reality we just haven't cleaned it up yet. So instead do the block group cleanup stuff after free'ing the fs roots so we don't get these warnings. Thanks,
Looks good.
Quoted 32 lines
Signed-off-by Josef Bacik <[email protected]>--- fs/btrfs/disk-io.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/btrfs/disk-io.c +2
-2@@ -3637,12 +3637,12 @@ int close_ctree(struct btrfs_root *root) percpu_counter_sum(&fs_info->delalloc_bytes)); } -btrfs_free_block_groups (fs_info); -btrfs_stop_all_workers (fs_info);del_fs_roots (fs_info); +btrfs_free_block_groups (fs_info); +free_root_pointers (fs_info,1 );iput (fs_info->btree_inode);Signature · 6 lines
1.8.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html