2 #define TRACE_SYSTEM gfs2
4 #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
19 #define dlm_state_name(nn) { DLM_LOCK_##nn, #nn }
20 #define glock_trace_name(x) __print_symbolic(x, \
29 #define block_state_name(x) __print_symbolic(x, \
30 { GFS2_BLKST_FREE, "free" }, \
31 { GFS2_BLKST_USED, "used" }, \
32 { GFS2_BLKST_DINODE, "dinode" }, \
33 { GFS2_BLKST_UNLINKED, "unlinked" })
35 #define TRACE_RS_DELETE 0
36 #define TRACE_RS_TREEDEL 1
37 #define TRACE_RS_INSERT 2
38 #define TRACE_RS_CLAIM 3
40 #define rs_func_name(x) __print_symbolic(x, \
46 #define show_glock_flags(flags) __print_flags(flags, "", \
47 {(1UL << GLF_LOCK), "l" }, \
48 {(1UL << GLF_DEMOTE), "D" }, \
49 {(1UL << GLF_PENDING_DEMOTE), "d" }, \
50 {(1UL << GLF_DEMOTE_IN_PROGRESS), "p" }, \
51 {(1UL << GLF_DIRTY), "y" }, \
52 {(1UL << GLF_LFLUSH), "f" }, \
53 {(1UL << GLF_INVALIDATE_IN_PROGRESS), "i" }, \
54 {(1UL << GLF_REPLY_PENDING), "r" }, \
55 {(1UL << GLF_INITIAL), "I" }, \
56 {(1UL << GLF_FROZEN), "F" }, \
57 {(1UL << GLF_QUEUED), "q" }, \
58 {(1UL << GLF_LRU), "L" }, \
59 {(1UL << GLF_OBJECT), "o" }, \
60 {(1UL << GLF_BLOCKING), "b" })
64 static inline u8 glock_trace_state(
unsigned int state)
111 __entry->new_state = glock_trace_state(new_state);
117 TP_printk(
"%u,%u glock %d:%lld state %s to %s tgt:%s dmt:%s flags:%s",
150 TP_printk(
"%u,%u glock %d:%lld state %s => %s flags:%s",
184 TP_printk(
"%u,%u glock %d:%lld demote %s to %s flags:%s",
186 (
unsigned long long)
__entry->glnum,
216 TP_printk(
"%u,%u glock %u:%llu promote %s %s",
218 (
unsigned long long)
__entry->glnum,
219 __entry->first ?
"first":
"other",
246 TP_printk(
"%u,%u glock %u:%llu %squeue %s",
248 (
unsigned long long)
__entry->glnum,
294 TP_printk(
"%u,%u glock %d:%lld status:%d flags:%02x tdiff:%lld srtt:%lld/%lld srttb:%lld/%lld sirt:%lld/%lld dcnt:%lld qcnt:%lld",
296 (
unsigned long long)
__entry->glnum,
340 TP_printk(
"%u,%u log %s %llu/%lu inode %llu",
342 __entry->pin ?
"pin" :
"unpin",
343 (
unsigned long long)
__entry->block,
345 (
unsigned long long)
__entry->ino)
369 __entry->start ?
"start" :
"end",
370 (
unsigned long long)
__entry->log_seq)
435 TP_ARGS(ip, bh, lblock, create, errno),
451 __entry->pblock = buffer_mapped(bh) ? bh->b_blocknr : 0;
459 TP_printk(
"%u,%u bmap %llu map %llu/%lu to %llu flags:%08lx %s %d",
461 (
unsigned long long)
__entry->inum,
462 (
unsigned long long)
__entry->lblock,
464 (
unsigned long long)
__entry->pblock,
475 TP_ARGS(ip, rgd, block, len, block_state),
493 __entry->block_state = block_state;
499 TP_printk(
"%u,%u bmap %llu alloc %llu/%lu %s rg:%llu rf:%u rr:%lu",
501 (
unsigned long long)
__entry->inum,
502 (
unsigned long long)
__entry->start,
505 (
unsigned long long)
__entry->rd_addr,
538 TP_printk(
"%u,%u bmap %llu resrv %llu rg:%llu rf:%lu rr:%lu %s f:%lu",
540 (
unsigned long long)
__entry->inum,
541 (
unsigned long long)
__entry->start,
542 (
unsigned long long)
__entry->rd_addr,
543 (
unsigned long)
__entry->rd_free_clone,
544 (
unsigned long)
__entry->rd_reserved,
551 #undef TRACE_INCLUDE_PATH
552 #define TRACE_INCLUDE_PATH .
553 #define TRACE_INCLUDE_FILE trace_gfs2