aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2012-05-16 11:55:38 -0400
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-05-26 06:17:54 -0400
commitf29021b29a85701c08afadfd51d87163fb078059 (patch)
treeb3d0bd17f97ae92c1c70031704ddf833b3bd8a7f /fs/btrfs/disk-io.c
parent815a51c74ad14864d0a8fff5eea983819c18feae (diff)
Btrfs: add tree mod log to fs_info
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index f43307492518..f51ad8477f18 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1914,11 +1914,14 @@ int open_ctree(struct super_block *sb,
1914 spin_lock_init(&fs_info->delayed_iput_lock); 1914 spin_lock_init(&fs_info->delayed_iput_lock);
1915 spin_lock_init(&fs_info->defrag_inodes_lock); 1915 spin_lock_init(&fs_info->defrag_inodes_lock);
1916 spin_lock_init(&fs_info->free_chunk_lock); 1916 spin_lock_init(&fs_info->free_chunk_lock);
1917 spin_lock_init(&fs_info->tree_mod_seq_lock);
1918 rwlock_init(&fs_info->tree_mod_log_lock);
1917 mutex_init(&fs_info->reloc_mutex); 1919 mutex_init(&fs_info->reloc_mutex);
1918 1920
1919 init_completion(&fs_info->kobj_unregister); 1921 init_completion(&fs_info->kobj_unregister);
1920 INIT_LIST_HEAD(&fs_info->dirty_cowonly_roots); 1922 INIT_LIST_HEAD(&fs_info->dirty_cowonly_roots);
1921 INIT_LIST_HEAD(&fs_info->space_info); 1923 INIT_LIST_HEAD(&fs_info->space_info);
1924 INIT_LIST_HEAD(&fs_info->tree_mod_seq_list);
1922 btrfs_mapping_init(&fs_info->mapping_tree); 1925 btrfs_mapping_init(&fs_info->mapping_tree);
1923 btrfs_init_block_rsv(&fs_info->global_block_rsv); 1926 btrfs_init_block_rsv(&fs_info->global_block_rsv);
1924 btrfs_init_block_rsv(&fs_info->delalloc_block_rsv); 1927 btrfs_init_block_rsv(&fs_info->delalloc_block_rsv);
@@ -1931,12 +1934,14 @@ int open_ctree(struct super_block *sb,
1931 atomic_set(&fs_info->async_submit_draining, 0); 1934 atomic_set(&fs_info->async_submit_draining, 0);
1932 atomic_set(&fs_info->nr_async_bios, 0); 1935 atomic_set(&fs_info->nr_async_bios, 0);
1933 atomic_set(&fs_info->defrag_running, 0); 1936 atomic_set(&fs_info->defrag_running, 0);
1937 atomic_set(&fs_info->tree_mod_seq, 0);
1934 fs_info->sb = sb; 1938 fs_info->sb = sb;
1935 fs_info->max_inline = 8192 * 1024; 1939 fs_info->max_inline = 8192 * 1024;
1936 fs_info->metadata_ratio = 0; 1940 fs_info->metadata_ratio = 0;
1937 fs_info->defrag_inodes = RB_ROOT; 1941 fs_info->defrag_inodes = RB_ROOT;
1938 fs_info->trans_no_join = 0; 1942 fs_info->trans_no_join = 0;
1939 fs_info->free_chunk_space = 0; 1943 fs_info->free_chunk_space = 0;
1944 fs_info->tree_mod_log = RB_ROOT;
1940 1945
1941 /* readahead state */ 1946 /* readahead state */
1942 INIT_RADIX_TREE(&fs_info->reada_tree, GFP_NOFS & ~__GFP_WAIT); 1947 INIT_RADIX_TREE(&fs_info->reada_tree, GFP_NOFS & ~__GFP_WAIT);