diff options
author | Chris Mason <clm@fb.com> | 2015-12-30 07:52:35 -0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-12-30 07:52:35 -0800 |
commit | 511711af91f21d80b27f18b569352d6896562828 (patch) | |
tree | 105c99f81073dfe5ce3b15623491f65778bf2032 /fs/btrfs/extent-tree.c | |
parent | b4570aa994b8fdb3a9c04ed80a6cac69072d4d42 (diff) | |
download | linux-511711af91f21d80b27f18b569352d6896562828.tar.bz2 |
btrfs: don't run delayed references while we are creating the free space tree
This is a short term solution to make sure btrfs_run_delayed_refs()
doesn't change the extent tree while we are scanning it to create the
free space tree.
Longer term we need to synchronize scanning the block groups one by one,
similar to what happens during a balance.
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 83fc61db0e45..add4af641cfa 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -2926,6 +2926,9 @@ int btrfs_run_delayed_refs(struct btrfs_trans_handle *trans, if (trans->aborted) return 0; + if (root->fs_info->creating_free_space_tree) + return 0; + if (root == root->fs_info->extent_root) root = root->fs_info->tree_root; |