summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorJosef Bacik2013-12-16 19:24:27 +0100
committerChris Mason2014-01-28 22:19:55 +0100
commitf28491e0a6c46d99cbbef0f8ef7e314afa2359c8 (patch)
tree4a64b0042fbdd784a4dd2e038d9e3833f69bab7a /fs/btrfs/ctree.h
parentBtrfs: use a bit to track if we're in the radix tree (diff)
downloadkernel-qcow2-linux-f28491e0a6c46d99cbbef0f8ef7e314afa2359c8.tar.gz
kernel-qcow2-linux-f28491e0a6c46d99cbbef0f8ef7e314afa2359c8.tar.xz
kernel-qcow2-linux-f28491e0a6c46d99cbbef0f8ef7e314afa2359c8.zip
Btrfs: move the extent buffer radix tree into the fs_info
I need to create a fake tree to test qgroups and I don't want to have to setup a fake btree_inode. The fact is we only use the radix tree for the fs_info, so everybody else who allocates an extent_io_tree is just wasting the space anyway. This patch moves the radix tree and its lock into btrfs_fs_info so there is less stuff I have to fake to do qgroup sanity tests. Thanks, Signed-off-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 7158c97fdc5e..a924274a503e 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1659,6 +1659,10 @@ struct btrfs_fs_info {
spinlock_t reada_lock;
struct radix_tree_root reada_tree;
+ /* Extent buffer radix tree */
+ spinlock_t buffer_lock;
+ struct radix_tree_root buffer_radix;
+
/* next backup root to be overwritten */
int backup_root_index;