summaryrefslogtreecommitdiff
path: root/fs/btrfs/ctree.h
diff options
context:
space:
mode:
authorArne Jansen <sensille@gmx.net>2011-09-13 12:56:09 +0200
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-07-10 15:14:44 +0200
commit416ac51da90e98daaac17e1f359a6c5591f7f5bd (patch)
tree44dd89f08ef1fe9a0f90917beb3df1f066bc1901 /fs/btrfs/ctree.h
parent20897f5c86b9d2b77baea1d48eda7fa4ac217279 (diff)
downloadlinux-3.10-416ac51da90e98daaac17e1f359a6c5591f7f5bd.tar.gz
linux-3.10-416ac51da90e98daaac17e1f359a6c5591f7f5bd.tar.bz2
linux-3.10-416ac51da90e98daaac17e1f359a6c5591f7f5bd.zip
Btrfs: qgroup state and initialization
Add state to fs_info. Signed-off-by: Arne Jansen <sensille@gmx.net>
Diffstat (limited to 'fs/btrfs/ctree.h')
-rw-r--r--fs/btrfs/ctree.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index 27cf995564e..a5269d4a164 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -1120,6 +1120,7 @@ struct btrfs_fs_info {
struct btrfs_root *dev_root;
struct btrfs_root *fs_root;
struct btrfs_root *csum_root;
+ struct btrfs_root *quota_root;
/* the log root tree is a directory of all the other log roots */
struct btrfs_root *log_root_tree;
@@ -1374,6 +1375,29 @@ struct btrfs_fs_info {
#ifdef CONFIG_BTRFS_FS_CHECK_INTEGRITY
u32 check_integrity_print_mask;
#endif
+ /*
+ * quota information
+ */
+ unsigned int quota_enabled:1;
+
+ /*
+ * quota_enabled only changes state after a commit. This holds the
+ * next state.
+ */
+ unsigned int pending_quota_state:1;
+
+ /* is qgroup tracking in a consistent state? */
+ u64 qgroup_flags;
+
+ /* holds configuration and tracking. Protected by qgroup_lock */
+ struct rb_root qgroup_tree;
+ spinlock_t qgroup_lock;
+
+ /* list of dirty qgroups to be written at next commit */
+ struct list_head dirty_qgroups;
+
+ /* used by btrfs_qgroup_record_ref for an efficient tree traversal */
+ u64 qgroup_seq;
/* filesystem state */
u64 fs_state;