btrfs: qgroup: Switch self test to extent-oriented qgroup mechanism.

Since the self test transaction don't have delayed_ref_roots, so use
find_all_roots() and export btrfs_qgroup_account_extent() to simulate it

Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com>
Signed-off-by: Chris Mason <clm@fb.com>
This commit is contained in:
Qu Wenruo
2015-04-16 17:18:36 +08:00
committed by Chris Mason
parent 0ed4792af0
commit 442244c963
3 changed files with 89 additions and 27 deletions

View File

@@ -2455,7 +2455,7 @@ static int btrfs_qgroup_account(struct btrfs_trans_handle *trans,
return ret;
}
static int
int
btrfs_qgroup_account_extent(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
u64 bytenr, u64 num_bytes,