aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/disk-io.c
diff options
context:
space:
mode:
authorZheng Yan <zheng.yan@oracle.com>2008-09-26 10:04:53 -0400
committerChris Mason <chris.mason@oracle.com>2008-09-26 10:04:53 -0400
commite465768938f95388723b0fd3c50a0ae48173edb9 (patch)
tree0f624a9a98dedfafae902e12b384d27e1100cd3a /fs/btrfs/disk-io.c
parente8569813849b5da394a195c7e76b4faa452b12d1 (diff)
Btrfs: Add shared reference cache
Btrfs has a cache of reference counts in leaves, allowing it to avoid reading tree leaves while deleting snapshots. To reduce contention with multiple subvolumes, this cache is private to each subvolume. This patch adds shared reference cache support. The new space balancing code plays with multiple subvols at the same time, So the old per-subvol reference cache is not well suited. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r--fs/btrfs/disk-io.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 71e81f3a765b..8969fee23318 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -1406,6 +1406,8 @@ struct btrfs_root *open_ctree(struct super_block *sb,
1406 fs_info->btree_inode->i_mapping, GFP_NOFS); 1406 fs_info->btree_inode->i_mapping, GFP_NOFS);
1407 fs_info->do_barriers = 1; 1407 fs_info->do_barriers = 1;
1408 1408
1409 btrfs_leaf_ref_tree_init(&fs_info->shared_ref_tree);
1410
1409 BTRFS_I(fs_info->btree_inode)->root = tree_root; 1411 BTRFS_I(fs_info->btree_inode)->root = tree_root;
1410 memset(&BTRFS_I(fs_info->btree_inode)->location, 0, 1412 memset(&BTRFS_I(fs_info->btree_inode)->location, 0,
1411 sizeof(struct btrfs_key)); 1413 sizeof(struct btrfs_key));