]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
btrfs: qgroup: Add new function to record old_roots.
authorQu Wenruo <quwenruo@cn.fujitsu.com>
Thu, 16 Apr 2015 08:40:39 +0000 (16:40 +0800)
committerChris Mason <clm@fb.com>
Wed, 10 Jun 2015 16:25:39 +0000 (09:25 -0700)
commit3b7d00f99c60b31e1cff0efc6b9178eea3696e27
tree6ad1addc84a6635f3696fbea6bfd54276075d30c
parent3368d001ba5df44930d986e82b1b497d4da285ba
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>
fs/btrfs/qgroup.c
fs/btrfs/qgroup.h