aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.de>2014-07-17 15:39:00 -0400
committerChris Mason <clm@fb.com>2014-09-17 16:37:50 -0400
commitd3982100baeb9bed8cf931545fb0522268f526e5 (patch)
tree4fda14d4f0721f69e284c8dd419d6d05f820f8a5 /fs
parent443f24fee731703345e2e6eec8177bb7b7d094c6 (diff)
btrfs: add trace for qgroup accounting
We want this to debug qgroup changes on live systems. Signed-off-by: Mark Fasheh <mfasheh@suse.de> Reviewed-by: Josef Bacik <jbacik@fb.com> Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/qgroup.c4
-rw-r--r--fs/btrfs/super.c1
2 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
index 2ce4ce7b47d8..1e4c6e95ab55 100644
--- a/fs/btrfs/qgroup.c
+++ b/fs/btrfs/qgroup.c
@@ -1335,6 +1335,8 @@ int btrfs_qgroup_record_ref(struct btrfs_trans_handle *trans,
1335 INIT_LIST_HEAD(&oper->elem.list); 1335 INIT_LIST_HEAD(&oper->elem.list);
1336 oper->elem.seq = 0; 1336 oper->elem.seq = 0;
1337 1337
1338 trace_btrfs_qgroup_record_ref(oper);
1339
1338 if (type == BTRFS_QGROUP_OPER_SUB_SUBTREE) { 1340 if (type == BTRFS_QGROUP_OPER_SUB_SUBTREE) {
1339 /* 1341 /*
1340 * If any operation for this bytenr/ref_root combo 1342 * If any operation for this bytenr/ref_root combo
@@ -2077,6 +2079,8 @@ static int btrfs_qgroup_account(struct btrfs_trans_handle *trans,
2077 2079
2078 ASSERT(is_fstree(oper->ref_root)); 2080 ASSERT(is_fstree(oper->ref_root));
2079 2081
2082 trace_btrfs_qgroup_account(oper);
2083
2080 switch (oper->type) { 2084 switch (oper->type) {
2081 case BTRFS_QGROUP_OPER_ADD_EXCL: 2085 case BTRFS_QGROUP_OPER_ADD_EXCL:
2082 case BTRFS_QGROUP_OPER_SUB_EXCL: 2086 case BTRFS_QGROUP_OPER_SUB_EXCL:
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index d66fbd57f1b5..3f1f4e2dc78f 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -60,6 +60,7 @@
60#include "backref.h" 60#include "backref.h"
61#include "tests/btrfs-tests.h" 61#include "tests/btrfs-tests.h"
62 62
63#include "qgroup.h"
63#define CREATE_TRACE_POINTS 64#define CREATE_TRACE_POINTS
64#include <trace/events/btrfs.h> 65#include <trace/events/btrfs.h>
65 66