diff options
author | Qu Wenruo <quwenruo@cn.fujitsu.com> | 2015-04-16 11:40:39 +0300 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2015-06-10 19:25:39 +0300 |
commit | 3b7d00f99c60b31e1cff0efc6b9178eea3696e27 (patch) | |
tree | 6ad1addc84a6635f3696fbea6bfd54276075d30c /fs/btrfs/qgroup.h | |
parent | 3368d001ba5df44930d986e82b1b497d4da285ba (diff) | |
download | linux-3b7d00f99c60b31e1cff0efc6b9178eea3696e27.tar.xz |
btrfs: qgroup: Add new function to record old_roots.
Add function btrfs_qgroup_prepare_account_extents() to get old_roots
which are needed for qgroup.
We do it in commit_transaction() and before switch_roots(), and only
search commit_root, so it gives a quite accurate view for previous
transaction.
With old_roots from previous transaction, we can use it to do accurate
account with current transaction.
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.h b/fs/btrfs/qgroup.h index e58155d0390c..6fe249f078ac 100644 --- a/fs/btrfs/qgroup.h +++ b/fs/btrfs/qgroup.h @@ -98,6 +98,8 @@ int btrfs_qgroup_record_ref(struct btrfs_trans_handle *trans, u64 bytenr, u64 num_bytes, enum btrfs_qgroup_operation_type type, int mod_seq); +int btrfs_qgroup_prepare_account_extents(struct btrfs_trans_handle *trans, + struct btrfs_fs_info *fs_info); struct btrfs_qgroup_extent_record *btrfs_qgroup_insert_dirty_extent(struct btrfs_delayed_ref_root *delayed_refs, struct btrfs_qgroup_extent_record *record); |