aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/transaction.c
diff options
context:
space:
mode:
authorJan Schmidt <list.btrfs@jan-o-sch.net>2012-06-14 10:37:44 -0400
committerJan Schmidt <list.btrfs@jan-o-sch.net>2012-07-12 04:54:38 -0400
commit546adb0d817c34dc2be3a7cb5bba8771f837a562 (patch)
treee287f5cb18b6c97d6acdbc09dbb045dca95e7daa /fs/btrfs/transaction.c
parentbcef60f249034f69e89e544461cbfecb68975595 (diff)
Btrfs: hooks for qgroup to record delayed refs
Hooks into qgroup code to record refs and into transaction commit. This is the main entry point for qgroup. Basically every change in extent backrefs got accounted to the appropriate qgroups. Signed-off-by: Arne Jansen <sensille@gmx.net> Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Diffstat (limited to 'fs/btrfs/transaction.c')
-rw-r--r--fs/btrfs/transaction.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index d20d2e24f8d..21c768cb443 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -795,6 +795,13 @@ static noinline int commit_cowonly_roots(struct btrfs_trans_handle *trans,
795 ret = btrfs_run_dev_stats(trans, root->fs_info); 795 ret = btrfs_run_dev_stats(trans, root->fs_info);
796 BUG_ON(ret); 796 BUG_ON(ret);
797 797
798 ret = btrfs_run_qgroups(trans, root->fs_info);
799 BUG_ON(ret);
800
801 /* run_qgroups might have added some more refs */
802 ret = btrfs_run_delayed_refs(trans, root, (unsigned long)-1);
803 BUG_ON(ret);
804
798 while (!list_empty(&fs_info->dirty_cowonly_roots)) { 805 while (!list_empty(&fs_info->dirty_cowonly_roots)) {
799 next = fs_info->dirty_cowonly_roots.next; 806 next = fs_info->dirty_cowonly_roots.next;
800 list_del_init(next); 807 list_del_init(next);