diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-04-19 21:53:50 -0400 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-06-10 12:26:23 -0400 |
commit | 9086db86e0b09c39abead4d747119695553e3978 (patch) | |
tree | 26cba099d0d7c8209e036024f70b32d3bd2615e0 /fs/btrfs/delayed-ref.h | |
parent | d4b804045924d7f8d2ea988be22c4b9e6492ec11 (diff) |
btrfs: qgroup: Add the ability to skip given qgroup for old/new_roots.
This is used by later qgroup fix patches for snapshot.
As current snapshot accounting is done by btrfs_qgroup_inherit(), but
new extent oriented quota mechanism will account extent from
btrfs_copy_root() and other snapshot things, causing wrong result.
So add this ability to handle snapshot accounting.
Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/delayed-ref.h')
-rw-r--r-- | fs/btrfs/delayed-ref.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/btrfs/delayed-ref.h b/fs/btrfs/delayed-ref.h index 4016f963599e..13fb5e6090fe 100644 --- a/fs/btrfs/delayed-ref.h +++ b/fs/btrfs/delayed-ref.h | |||
@@ -175,6 +175,14 @@ struct btrfs_delayed_ref_root { | |||
175 | int flushing; | 175 | int flushing; |
176 | 176 | ||
177 | u64 run_delayed_start; | 177 | u64 run_delayed_start; |
178 | |||
179 | /* | ||
180 | * To make qgroup to skip given root. | ||
181 | * This is for snapshot, as btrfs_qgroup_inherit() will manully | ||
182 | * modify counters for snapshot and its source, so we should skip | ||
183 | * the snapshot in new_root/old_roots or it will get calculated twice | ||
184 | */ | ||
185 | u64 qgroup_to_skip; | ||
178 | }; | 186 | }; |
179 | 187 | ||
180 | extern struct kmem_cache *btrfs_delayed_ref_head_cachep; | 188 | extern struct kmem_cache *btrfs_delayed_ref_head_cachep; |