Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
416ac51d
Commit
416ac51d
authored
Sep 13, 2011
by
Arne Jansen
Committed by
Jan Schmidt
Jul 10, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Btrfs: qgroup state and initialization
Add state to fs_info. Signed-off-by:
Arne Jansen
<
sensille@gmx.net
>
parent
20897f5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
fs/btrfs/ctree.h
fs/btrfs/ctree.h
+24
-0
fs/btrfs/disk-io.c
fs/btrfs/disk-io.c
+7
-0
No files found.
fs/btrfs/ctree.h
View file @
416ac51d
...
...
@@ -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
;
...
...
fs/btrfs/disk-io.c
View file @
416ac51d
...
...
@@ -2110,6 +2110,13 @@ int open_ctree(struct super_block *sb,
init_rwsem
(
&
fs_info
->
cleanup_work_sem
);
init_rwsem
(
&
fs_info
->
subvol_sem
);
spin_lock_init
(
&
fs_info
->
qgroup_lock
);
fs_info
->
qgroup_tree
=
RB_ROOT
;
INIT_LIST_HEAD
(
&
fs_info
->
dirty_qgroups
);
fs_info
->
qgroup_seq
=
1
;
fs_info
->
quota_enabled
=
0
;
fs_info
->
pending_quota_state
=
0
;
btrfs_init_free_cluster
(
&
fs_info
->
meta_alloc_cluster
);
btrfs_init_free_cluster
(
&
fs_info
->
data_alloc_cluster
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment