summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/qgroup.h
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2015-04-16 15:37:33 +0800
committerChris Mason <clm@fb.com>2015-06-10 09:25:49 -0700
commit550d7a2ed5db35756222ec17cff3376ff38d78e2 (patch)
treec8b60650e4ac8facdf25f498e2901b7eebb3f4ae /fs/btrfs/qgroup.h
parent21633fc6037f8ceb2bb927dacc3f9ef46ccae891 (diff)
downloadlinux-stable-550d7a2ed5db35756222ec17cff3376ff38d78e2.tar.gz
linux-stable-550d7a2ed5db35756222ec17cff3376ff38d78e2.tar.bz2
linux-stable-550d7a2ed5db35756222ec17cff3376ff38d78e2.zip
btrfs: qgroup: Add new qgroup calculation function
btrfs_qgroup_account_extents(). The new btrfs_qgroup_account_extents() function should be called in btrfs_commit_transaction() and it will update all the qgroup according to delayed_ref_root->dirty_extent_root. The new function can handle both normal operation during commit_transaction() or in rescan in a unified method with clearer logic. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs/btrfs/qgroup.h')
-rw-r--r--fs/btrfs/qgroup.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h
index 6fe249f078ac..cb703f859af6 100644
--- a/fs/btrfs/qgroup.h
+++ b/fs/btrfs/qgroup.h
@@ -103,6 +103,8 @@ int btrfs_qgroup_prepare_account_extents(struct btrfs_trans_handle *trans,
struct btrfs_qgroup_extent_record
*btrfs_qgroup_insert_dirty_extent(struct btrfs_delayed_ref_root *delayed_refs,
struct btrfs_qgroup_extent_record *record);
+int btrfs_qgroup_account_extents(struct btrfs_trans_handle *trans,
+ struct btrfs_fs_info *fs_info);
int btrfs_delayed_qgroup_accounting(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info);
void btrfs_remove_qgroup_operation(struct btrfs_trans_handle *trans,