scoutfs: replace trace_printk in dir.c

Signed-off-by: Mark Fasheh <mfasheh@versity.com>
This commit is contained in:
Mark Fasheh
2017-09-28 13:59:49 -07:00
committed by Mark Fasheh
parent 2c1f117bef
commit a5283e6f2c
2 changed files with 29 additions and 2 deletions
+2 -2
View File
@@ -30,6 +30,7 @@
#include "kvec.h"
#include "item.h"
#include "lock.h"
#include "scoutfs_trace.h"
/*
* Directory entries are stored in entries with offsets calculated from
@@ -1073,8 +1074,7 @@ static int add_next_linkref(struct super_block *sb, u64 ino,
/* next backref key is now in ent */
ret = scoutfs_item_next(sb, &key, &last, NULL, NULL);
trace_printk("ino %llu dir_ino %llu ret %d key_len %u\n",
ino, dir_ino, ret, key.key_len);
trace_scoutfs_dir_add_next_linkref(sb, ino, dir_ino, ret, key.key_len);
if (ret < 0)
goto out;
+27
View File
@@ -36,6 +36,33 @@
#define FSID_ARG(sb) le64_to_cpu(SCOUTFS_SB(sb)->super.hdr.fsid)
#define FSID_FMT "%llx"
TRACE_EVENT(scoutfs_dir_add_next_linkref,
TP_PROTO(struct super_block *sb, __u64 ino, __u64 dir_ino, int ret,
unsigned int key_len),
TP_ARGS(sb, ino, dir_ino, ret, key_len),
TP_STRUCT__entry(
__field(__u64, fsid)
__field(__u64, ino)
__field(__u64, dir_ino)
__field(int, ret)
__field(unsigned int, key_len)
),
TP_fast_assign(
__entry->fsid = FSID_ARG(sb);
__entry->ino = ino;
__entry->dir_ino = dir_ino;
__entry->ret = ret;
__entry->key_len = key_len;
),
TP_printk(FSID_FMT" ino %llu dir_ino %llu ret %d key_len %u",
__entry->fsid, __entry->ino, __entry->dir_ino, __entry->ret,
__entry->key_len)
);
TRACE_EVENT(scoutfs_compact_func,
TP_PROTO(struct super_block *sb, int ret),