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>
This commit is contained in:
Chris Mason
2015-12-30 07:52:35 -08:00
parent b4570aa994
commit 511711af91
4 changed files with 28 additions and 16 deletions

View File

@@ -1856,6 +1856,8 @@ struct btrfs_fs_info {
* and will be latter freed. Protected by fs_info->chunk_mutex.
*/
struct list_head pinned_chunks;
int creating_free_space_tree;
};
struct btrfs_subvolume_writers {