1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM f2fs
5 #if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/tracepoint.h>
10 #define show_dev(dev) MAJOR(dev), MINOR(dev)
11 #define show_dev_ino(entry) show_dev(entry->dev), (unsigned long)entry->ino
13 TRACE_DEFINE_ENUM(NODE
);
14 TRACE_DEFINE_ENUM(DATA
);
15 TRACE_DEFINE_ENUM(META
);
16 TRACE_DEFINE_ENUM(META_FLUSH
);
17 TRACE_DEFINE_ENUM(INMEM
);
18 TRACE_DEFINE_ENUM(INMEM_DROP
);
19 TRACE_DEFINE_ENUM(INMEM_INVALIDATE
);
20 TRACE_DEFINE_ENUM(INMEM_REVOKE
);
21 TRACE_DEFINE_ENUM(IPU
);
22 TRACE_DEFINE_ENUM(OPU
);
23 TRACE_DEFINE_ENUM(HOT
);
24 TRACE_DEFINE_ENUM(WARM
);
25 TRACE_DEFINE_ENUM(COLD
);
26 TRACE_DEFINE_ENUM(CURSEG_HOT_DATA
);
27 TRACE_DEFINE_ENUM(CURSEG_WARM_DATA
);
28 TRACE_DEFINE_ENUM(CURSEG_COLD_DATA
);
29 TRACE_DEFINE_ENUM(CURSEG_HOT_NODE
);
30 TRACE_DEFINE_ENUM(CURSEG_WARM_NODE
);
31 TRACE_DEFINE_ENUM(CURSEG_COLD_NODE
);
32 TRACE_DEFINE_ENUM(NO_CHECK_TYPE
);
33 TRACE_DEFINE_ENUM(GC_GREEDY
);
34 TRACE_DEFINE_ENUM(GC_CB
);
35 TRACE_DEFINE_ENUM(FG_GC
);
36 TRACE_DEFINE_ENUM(BG_GC
);
37 TRACE_DEFINE_ENUM(LFS
);
38 TRACE_DEFINE_ENUM(SSR
);
39 TRACE_DEFINE_ENUM(__REQ_RAHEAD
);
40 TRACE_DEFINE_ENUM(__REQ_SYNC
);
41 TRACE_DEFINE_ENUM(__REQ_IDLE
);
42 TRACE_DEFINE_ENUM(__REQ_PREFLUSH
);
43 TRACE_DEFINE_ENUM(__REQ_FUA
);
44 TRACE_DEFINE_ENUM(__REQ_PRIO
);
45 TRACE_DEFINE_ENUM(__REQ_META
);
46 TRACE_DEFINE_ENUM(CP_UMOUNT
);
47 TRACE_DEFINE_ENUM(CP_FASTBOOT
);
48 TRACE_DEFINE_ENUM(CP_SYNC
);
49 TRACE_DEFINE_ENUM(CP_RECOVERY
);
50 TRACE_DEFINE_ENUM(CP_DISCARD
);
51 TRACE_DEFINE_ENUM(CP_TRIMMED
);
52 TRACE_DEFINE_ENUM(CP_PAUSE
);
54 #define show_block_type(type) \
55 __print_symbolic(type, \
59 { META_FLUSH, "META_FLUSH" }, \
61 { INMEM_DROP, "INMEM_DROP" }, \
62 { INMEM_INVALIDATE, "INMEM_INVALIDATE" }, \
63 { INMEM_REVOKE, "INMEM_REVOKE" }, \
64 { IPU, "IN-PLACE" }, \
65 { OPU, "OUT-OF-PLACE" })
67 #define show_block_temp(temp) \
68 __print_symbolic(temp, \
73 #define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_META | REQ_PRIO | \
74 REQ_PREFLUSH | REQ_FUA)
75 #define F2FS_BIO_FLAG_MASK(t) (t & F2FS_OP_FLAGS)
77 #define show_bio_type(op,op_flags) show_bio_op(op), \
78 show_bio_op_flags(op_flags)
80 #define show_bio_op(op) blk_op_str(op)
82 #define show_bio_op_flags(flags) \
83 __print_flags(F2FS_BIO_FLAG_MASK(flags), "|", \
84 { REQ_RAHEAD, "R" }, \
88 { REQ_PREFLUSH, "PF" }, \
91 #define show_data_type(type) \
92 __print_symbolic(type, \
93 { CURSEG_HOT_DATA, "Hot DATA" }, \
94 { CURSEG_WARM_DATA, "Warm DATA" }, \
95 { CURSEG_COLD_DATA, "Cold DATA" }, \
96 { CURSEG_HOT_NODE, "Hot NODE" }, \
97 { CURSEG_WARM_NODE, "Warm NODE" }, \
98 { CURSEG_COLD_NODE, "Cold NODE" }, \
99 { NO_CHECK_TYPE, "No TYPE" })
101 #define show_file_type(type) \
102 __print_symbolic(type, \
106 #define show_gc_type(type) \
107 __print_symbolic(type, \
108 { FG_GC, "Foreground GC" }, \
109 { BG_GC, "Background GC" })
111 #define show_alloc_mode(type) \
112 __print_symbolic(type, \
113 { LFS, "LFS-mode" }, \
116 #define show_victim_policy(type) \
117 __print_symbolic(type, \
118 { GC_GREEDY, "Greedy" }, \
119 { GC_CB, "Cost-Benefit" })
121 #define show_cpreason(type) \
122 __print_flags(type, "|", \
123 { CP_UMOUNT, "Umount" }, \
124 { CP_FASTBOOT, "Fastboot" }, \
125 { CP_SYNC, "Sync" }, \
126 { CP_RECOVERY, "Recovery" }, \
127 { CP_DISCARD, "Discard" }, \
128 { CP_PAUSE, "Pause" }, \
129 { CP_TRIMMED, "Trimmed" })
131 #define show_fsync_cpreason(type) \
132 __print_symbolic(type, \
133 { CP_NO_NEEDED, "no needed" }, \
134 { CP_NON_REGULAR, "non regular" }, \
135 { CP_COMPRESSED, "compreesed" }, \
136 { CP_HARDLINK, "hardlink" }, \
137 { CP_SB_NEED_CP, "sb needs cp" }, \
138 { CP_WRONG_PINO, "wrong pino" }, \
139 { CP_NO_SPC_ROLL, "no space roll forward" }, \
140 { CP_NODE_NEED_CP, "node needs cp" }, \
141 { CP_FASTBOOT_MODE, "fastboot mode" }, \
142 { CP_SPEC_LOG_NUM, "log type is 2" }, \
143 { CP_RECOVER_DIR, "dir needs recovery" })
145 #define show_shutdown_mode(type) \
146 __print_symbolic(type, \
147 { F2FS_GOING_DOWN_FULLSYNC, "full sync" }, \
148 { F2FS_GOING_DOWN_METASYNC, "meta sync" }, \
149 { F2FS_GOING_DOWN_NOSYNC, "no sync" }, \
150 { F2FS_GOING_DOWN_METAFLUSH, "meta flush" }, \
151 { F2FS_GOING_DOWN_NEED_FSCK, "need fsck" })
153 #define show_compress_algorithm(type) \
154 __print_symbolic(type, \
155 { COMPRESS_LZO, "LZO" }, \
156 { COMPRESS_LZ4, "LZ4" })
161 struct victim_sel_policy
;
162 struct f2fs_map_blocks
;
164 DECLARE_EVENT_CLASS(f2fs__inode
,
166 TP_PROTO(struct inode
*inode
),
174 __field(umode_t
, mode
)
175 __field(loff_t
, size
)
176 __field(unsigned int, nlink
)
177 __field(blkcnt_t
, blocks
)
178 __field(__u8
, advise
)
182 __entry
->dev
= inode
->i_sb
->s_dev
;
183 __entry
->ino
= inode
->i_ino
;
184 __entry
->pino
= F2FS_I(inode
)->i_pino
;
185 __entry
->mode
= inode
->i_mode
;
186 __entry
->nlink
= inode
->i_nlink
;
187 __entry
->size
= inode
->i_size
;
188 __entry
->blocks
= inode
->i_blocks
;
189 __entry
->advise
= F2FS_I(inode
)->i_advise
;
192 TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
193 "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
194 show_dev_ino(__entry
),
195 (unsigned long)__entry
->pino
,
198 (unsigned int)__entry
->nlink
,
199 (unsigned long long)__entry
->blocks
,
200 (unsigned char)__entry
->advise
)
203 DECLARE_EVENT_CLASS(f2fs__inode_exit
,
205 TP_PROTO(struct inode
*inode
, int ret
),
216 __entry
->dev
= inode
->i_sb
->s_dev
;
217 __entry
->ino
= inode
->i_ino
;
221 TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
222 show_dev_ino(__entry
),
226 DEFINE_EVENT(f2fs__inode
, f2fs_sync_file_enter
,
228 TP_PROTO(struct inode
*inode
),
233 TRACE_EVENT(f2fs_sync_file_exit
,
235 TP_PROTO(struct inode
*inode
, int cp_reason
, int datasync
, int ret
),
237 TP_ARGS(inode
, cp_reason
, datasync
, ret
),
242 __field(int, cp_reason
)
243 __field(int, datasync
)
248 __entry
->dev
= inode
->i_sb
->s_dev
;
249 __entry
->ino
= inode
->i_ino
;
250 __entry
->cp_reason
= cp_reason
;
251 __entry
->datasync
= datasync
;
255 TP_printk("dev = (%d,%d), ino = %lu, cp_reason: %s, "
256 "datasync = %d, ret = %d",
257 show_dev_ino(__entry
),
258 show_fsync_cpreason(__entry
->cp_reason
),
263 TRACE_EVENT(f2fs_sync_fs
,
265 TP_PROTO(struct super_block
*sb
, int wait
),
276 __entry
->dev
= sb
->s_dev
;
277 __entry
->dirty
= is_sbi_flag_set(F2FS_SB(sb
), SBI_IS_DIRTY
);
278 __entry
->wait
= wait
;
281 TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
282 show_dev(__entry
->dev
),
283 __entry
->dirty
? "dirty" : "not dirty",
287 DEFINE_EVENT(f2fs__inode
, f2fs_iget
,
289 TP_PROTO(struct inode
*inode
),
294 DEFINE_EVENT(f2fs__inode_exit
, f2fs_iget_exit
,
296 TP_PROTO(struct inode
*inode
, int ret
),
301 DEFINE_EVENT(f2fs__inode
, f2fs_evict_inode
,
303 TP_PROTO(struct inode
*inode
),
308 DEFINE_EVENT(f2fs__inode_exit
, f2fs_new_inode
,
310 TP_PROTO(struct inode
*inode
, int ret
),
315 TRACE_EVENT(f2fs_unlink_enter
,
317 TP_PROTO(struct inode
*dir
, struct dentry
*dentry
),
319 TP_ARGS(dir
, dentry
),
324 __field(loff_t
, size
)
325 __field(blkcnt_t
, blocks
)
326 __field(const char *, name
)
330 __entry
->dev
= dir
->i_sb
->s_dev
;
331 __entry
->ino
= dir
->i_ino
;
332 __entry
->size
= dir
->i_size
;
333 __entry
->blocks
= dir
->i_blocks
;
334 __entry
->name
= dentry
->d_name
.name
;
337 TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
338 "i_blocks = %llu, name = %s",
339 show_dev_ino(__entry
),
341 (unsigned long long)__entry
->blocks
,
345 DEFINE_EVENT(f2fs__inode_exit
, f2fs_unlink_exit
,
347 TP_PROTO(struct inode
*inode
, int ret
),
352 DEFINE_EVENT(f2fs__inode_exit
, f2fs_drop_inode
,
354 TP_PROTO(struct inode
*inode
, int ret
),
359 DEFINE_EVENT(f2fs__inode
, f2fs_truncate
,
361 TP_PROTO(struct inode
*inode
),
366 TRACE_EVENT(f2fs_truncate_data_blocks_range
,
368 TP_PROTO(struct inode
*inode
, nid_t nid
, unsigned int ofs
, int free
),
370 TP_ARGS(inode
, nid
, ofs
, free
),
376 __field(unsigned int, ofs
)
381 __entry
->dev
= inode
->i_sb
->s_dev
;
382 __entry
->ino
= inode
->i_ino
;
385 __entry
->free
= free
;
388 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
389 show_dev_ino(__entry
),
390 (unsigned int)__entry
->nid
,
395 DECLARE_EVENT_CLASS(f2fs__truncate_op
,
397 TP_PROTO(struct inode
*inode
, u64 from
),
399 TP_ARGS(inode
, from
),
404 __field(loff_t
, size
)
405 __field(blkcnt_t
, blocks
)
410 __entry
->dev
= inode
->i_sb
->s_dev
;
411 __entry
->ino
= inode
->i_ino
;
412 __entry
->size
= inode
->i_size
;
413 __entry
->blocks
= inode
->i_blocks
;
414 __entry
->from
= from
;
417 TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
418 "start file offset = %llu",
419 show_dev_ino(__entry
),
421 (unsigned long long)__entry
->blocks
,
422 (unsigned long long)__entry
->from
)
425 DEFINE_EVENT(f2fs__truncate_op
, f2fs_truncate_blocks_enter
,
427 TP_PROTO(struct inode
*inode
, u64 from
),
432 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_blocks_exit
,
434 TP_PROTO(struct inode
*inode
, int ret
),
439 DEFINE_EVENT(f2fs__truncate_op
, f2fs_truncate_inode_blocks_enter
,
441 TP_PROTO(struct inode
*inode
, u64 from
),
446 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_inode_blocks_exit
,
448 TP_PROTO(struct inode
*inode
, int ret
),
453 DECLARE_EVENT_CLASS(f2fs__truncate_node
,
455 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
457 TP_ARGS(inode
, nid
, blk_addr
),
463 __field(block_t
, blk_addr
)
467 __entry
->dev
= inode
->i_sb
->s_dev
;
468 __entry
->ino
= inode
->i_ino
;
470 __entry
->blk_addr
= blk_addr
;
473 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
474 show_dev_ino(__entry
),
475 (unsigned int)__entry
->nid
,
476 (unsigned long long)__entry
->blk_addr
)
479 DEFINE_EVENT(f2fs__truncate_node
, f2fs_truncate_nodes_enter
,
481 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
483 TP_ARGS(inode
, nid
, blk_addr
)
486 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_nodes_exit
,
488 TP_PROTO(struct inode
*inode
, int ret
),
493 DEFINE_EVENT(f2fs__truncate_node
, f2fs_truncate_node
,
495 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
497 TP_ARGS(inode
, nid
, blk_addr
)
500 TRACE_EVENT(f2fs_truncate_partial_nodes
,
502 TP_PROTO(struct inode
*inode
, nid_t
*nid
, int depth
, int err
),
504 TP_ARGS(inode
, nid
, depth
, err
),
509 __field(nid_t
, nid
[3])
515 __entry
->dev
= inode
->i_sb
->s_dev
;
516 __entry
->ino
= inode
->i_ino
;
517 __entry
->nid
[0] = nid
[0];
518 __entry
->nid
[1] = nid
[1];
519 __entry
->nid
[2] = nid
[2];
520 __entry
->depth
= depth
;
524 TP_printk("dev = (%d,%d), ino = %lu, "
525 "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
526 show_dev_ino(__entry
),
527 (unsigned int)__entry
->nid
[0],
528 (unsigned int)__entry
->nid
[1],
529 (unsigned int)__entry
->nid
[2],
534 TRACE_EVENT(f2fs_file_write_iter
,
536 TP_PROTO(struct inode
*inode
, unsigned long offset
,
537 unsigned long length
, int ret
),
539 TP_ARGS(inode
, offset
, length
, ret
),
544 __field(unsigned long, offset
)
545 __field(unsigned long, length
)
550 __entry
->dev
= inode
->i_sb
->s_dev
;
551 __entry
->ino
= inode
->i_ino
;
552 __entry
->offset
= offset
;
553 __entry
->length
= length
;
557 TP_printk("dev = (%d,%d), ino = %lu, "
558 "offset = %lu, length = %lu, written(err) = %d",
559 show_dev_ino(__entry
),
565 TRACE_EVENT(f2fs_map_blocks
,
566 TP_PROTO(struct inode
*inode
, struct f2fs_map_blocks
*map
, int ret
),
568 TP_ARGS(inode
, map
, ret
),
573 __field(block_t
, m_lblk
)
574 __field(block_t
, m_pblk
)
575 __field(unsigned int, m_len
)
576 __field(unsigned int, m_flags
)
577 __field(int, m_seg_type
)
578 __field(bool, m_may_create
)
583 __entry
->dev
= inode
->i_sb
->s_dev
;
584 __entry
->ino
= inode
->i_ino
;
585 __entry
->m_lblk
= map
->m_lblk
;
586 __entry
->m_pblk
= map
->m_pblk
;
587 __entry
->m_len
= map
->m_len
;
588 __entry
->m_flags
= map
->m_flags
;
589 __entry
->m_seg_type
= map
->m_seg_type
;
590 __entry
->m_may_create
= map
->m_may_create
;
594 TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
595 "start blkaddr = 0x%llx, len = 0x%llx, flags = %u,"
596 "seg_type = %d, may_create = %d, err = %d",
597 show_dev_ino(__entry
),
598 (unsigned long long)__entry
->m_lblk
,
599 (unsigned long long)__entry
->m_pblk
,
600 (unsigned long long)__entry
->m_len
,
603 __entry
->m_may_create
,
607 TRACE_EVENT(f2fs_background_gc
,
609 TP_PROTO(struct super_block
*sb
, unsigned int wait_ms
,
610 unsigned int prefree
, unsigned int free
),
612 TP_ARGS(sb
, wait_ms
, prefree
, free
),
616 __field(unsigned int, wait_ms
)
617 __field(unsigned int, prefree
)
618 __field(unsigned int, free
)
622 __entry
->dev
= sb
->s_dev
;
623 __entry
->wait_ms
= wait_ms
;
624 __entry
->prefree
= prefree
;
625 __entry
->free
= free
;
628 TP_printk("dev = (%d,%d), wait_ms = %u, prefree = %u, free = %u",
629 show_dev(__entry
->dev
),
635 TRACE_EVENT(f2fs_gc_begin
,
637 TP_PROTO(struct super_block
*sb
, bool sync
, bool background
,
638 long long dirty_nodes
, long long dirty_dents
,
639 long long dirty_imeta
, unsigned int free_sec
,
640 unsigned int free_seg
, int reserved_seg
,
641 unsigned int prefree_seg
),
643 TP_ARGS(sb
, sync
, background
, dirty_nodes
, dirty_dents
, dirty_imeta
,
644 free_sec
, free_seg
, reserved_seg
, prefree_seg
),
649 __field(bool, background
)
650 __field(long long, dirty_nodes
)
651 __field(long long, dirty_dents
)
652 __field(long long, dirty_imeta
)
653 __field(unsigned int, free_sec
)
654 __field(unsigned int, free_seg
)
655 __field(int, reserved_seg
)
656 __field(unsigned int, prefree_seg
)
660 __entry
->dev
= sb
->s_dev
;
661 __entry
->sync
= sync
;
662 __entry
->background
= background
;
663 __entry
->dirty_nodes
= dirty_nodes
;
664 __entry
->dirty_dents
= dirty_dents
;
665 __entry
->dirty_imeta
= dirty_imeta
;
666 __entry
->free_sec
= free_sec
;
667 __entry
->free_seg
= free_seg
;
668 __entry
->reserved_seg
= reserved_seg
;
669 __entry
->prefree_seg
= prefree_seg
;
672 TP_printk("dev = (%d,%d), sync = %d, background = %d, nodes = %lld, "
673 "dents = %lld, imeta = %lld, free_sec:%u, free_seg:%u, "
674 "rsv_seg:%d, prefree_seg:%u",
675 show_dev(__entry
->dev
),
678 __entry
->dirty_nodes
,
679 __entry
->dirty_dents
,
680 __entry
->dirty_imeta
,
683 __entry
->reserved_seg
,
684 __entry
->prefree_seg
)
687 TRACE_EVENT(f2fs_gc_end
,
689 TP_PROTO(struct super_block
*sb
, int ret
, int seg_freed
,
690 int sec_freed
, long long dirty_nodes
,
691 long long dirty_dents
, long long dirty_imeta
,
692 unsigned int free_sec
, unsigned int free_seg
,
693 int reserved_seg
, unsigned int prefree_seg
),
695 TP_ARGS(sb
, ret
, seg_freed
, sec_freed
, dirty_nodes
, dirty_dents
,
696 dirty_imeta
, free_sec
, free_seg
, reserved_seg
, prefree_seg
),
701 __field(int, seg_freed
)
702 __field(int, sec_freed
)
703 __field(long long, dirty_nodes
)
704 __field(long long, dirty_dents
)
705 __field(long long, dirty_imeta
)
706 __field(unsigned int, free_sec
)
707 __field(unsigned int, free_seg
)
708 __field(int, reserved_seg
)
709 __field(unsigned int, prefree_seg
)
713 __entry
->dev
= sb
->s_dev
;
715 __entry
->seg_freed
= seg_freed
;
716 __entry
->sec_freed
= sec_freed
;
717 __entry
->dirty_nodes
= dirty_nodes
;
718 __entry
->dirty_dents
= dirty_dents
;
719 __entry
->dirty_imeta
= dirty_imeta
;
720 __entry
->free_sec
= free_sec
;
721 __entry
->free_seg
= free_seg
;
722 __entry
->reserved_seg
= reserved_seg
;
723 __entry
->prefree_seg
= prefree_seg
;
726 TP_printk("dev = (%d,%d), ret = %d, seg_freed = %d, sec_freed = %d, "
727 "nodes = %lld, dents = %lld, imeta = %lld, free_sec:%u, "
728 "free_seg:%u, rsv_seg:%d, prefree_seg:%u",
729 show_dev(__entry
->dev
),
733 __entry
->dirty_nodes
,
734 __entry
->dirty_dents
,
735 __entry
->dirty_imeta
,
738 __entry
->reserved_seg
,
739 __entry
->prefree_seg
)
742 TRACE_EVENT(f2fs_get_victim
,
744 TP_PROTO(struct super_block
*sb
, int type
, int gc_type
,
745 struct victim_sel_policy
*p
, unsigned int pre_victim
,
746 unsigned int prefree
, unsigned int free
),
748 TP_ARGS(sb
, type
, gc_type
, p
, pre_victim
, prefree
, free
),
753 __field(int, gc_type
)
754 __field(int, alloc_mode
)
755 __field(int, gc_mode
)
756 __field(unsigned int, victim
)
757 __field(unsigned int, cost
)
758 __field(unsigned int, ofs_unit
)
759 __field(unsigned int, pre_victim
)
760 __field(unsigned int, prefree
)
761 __field(unsigned int, free
)
765 __entry
->dev
= sb
->s_dev
;
766 __entry
->type
= type
;
767 __entry
->gc_type
= gc_type
;
768 __entry
->alloc_mode
= p
->alloc_mode
;
769 __entry
->gc_mode
= p
->gc_mode
;
770 __entry
->victim
= p
->min_segno
;
771 __entry
->cost
= p
->min_cost
;
772 __entry
->ofs_unit
= p
->ofs_unit
;
773 __entry
->pre_victim
= pre_victim
;
774 __entry
->prefree
= prefree
;
775 __entry
->free
= free
;
778 TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), "
779 "victim = %u, cost = %u, ofs_unit = %u, "
780 "pre_victim_secno = %d, prefree = %u, free = %u",
781 show_dev(__entry
->dev
),
782 show_data_type(__entry
->type
),
783 show_gc_type(__entry
->gc_type
),
784 show_alloc_mode(__entry
->alloc_mode
),
785 show_victim_policy(__entry
->gc_mode
),
789 (int)__entry
->pre_victim
,
794 TRACE_EVENT(f2fs_lookup_start
,
796 TP_PROTO(struct inode
*dir
, struct dentry
*dentry
, unsigned int flags
),
798 TP_ARGS(dir
, dentry
, flags
),
803 __field(const char *, name
)
804 __field(unsigned int, flags
)
808 __entry
->dev
= dir
->i_sb
->s_dev
;
809 __entry
->ino
= dir
->i_ino
;
810 __entry
->name
= dentry
->d_name
.name
;
811 __entry
->flags
= flags
;
814 TP_printk("dev = (%d,%d), pino = %lu, name:%s, flags:%u",
815 show_dev_ino(__entry
),
820 TRACE_EVENT(f2fs_lookup_end
,
822 TP_PROTO(struct inode
*dir
, struct dentry
*dentry
, nid_t ino
,
825 TP_ARGS(dir
, dentry
, ino
, err
),
830 __field(const char *, name
)
836 __entry
->dev
= dir
->i_sb
->s_dev
;
837 __entry
->ino
= dir
->i_ino
;
838 __entry
->name
= dentry
->d_name
.name
;
843 TP_printk("dev = (%d,%d), pino = %lu, name:%s, ino:%u, err:%d",
844 show_dev_ino(__entry
),
850 TRACE_EVENT(f2fs_readdir
,
852 TP_PROTO(struct inode
*dir
, loff_t start_pos
, loff_t end_pos
, int err
),
854 TP_ARGS(dir
, start_pos
, end_pos
, err
),
859 __field(loff_t
, start
)
865 __entry
->dev
= dir
->i_sb
->s_dev
;
866 __entry
->ino
= dir
->i_ino
;
867 __entry
->start
= start_pos
;
868 __entry
->end
= end_pos
;
872 TP_printk("dev = (%d,%d), ino = %lu, start_pos:%llu, end_pos:%llu, err:%d",
873 show_dev_ino(__entry
),
879 TRACE_EVENT(f2fs_fallocate
,
881 TP_PROTO(struct inode
*inode
, int mode
,
882 loff_t offset
, loff_t len
, int ret
),
884 TP_ARGS(inode
, mode
, offset
, len
, ret
),
890 __field(loff_t
, offset
)
892 __field(loff_t
, size
)
893 __field(blkcnt_t
, blocks
)
898 __entry
->dev
= inode
->i_sb
->s_dev
;
899 __entry
->ino
= inode
->i_ino
;
900 __entry
->mode
= mode
;
901 __entry
->offset
= offset
;
903 __entry
->size
= inode
->i_size
;
904 __entry
->blocks
= inode
->i_blocks
;
908 TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
909 "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
910 show_dev_ino(__entry
),
912 (unsigned long long)__entry
->offset
,
913 (unsigned long long)__entry
->len
,
914 (unsigned long long)__entry
->size
,
915 (unsigned long long)__entry
->blocks
,
919 TRACE_EVENT(f2fs_direct_IO_enter
,
921 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
923 TP_ARGS(inode
, offset
, len
, rw
),
929 __field(unsigned long, len
)
934 __entry
->dev
= inode
->i_sb
->s_dev
;
935 __entry
->ino
= inode
->i_ino
;
936 __entry
->pos
= offset
;
941 TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu rw = %d",
942 show_dev_ino(__entry
),
948 TRACE_EVENT(f2fs_direct_IO_exit
,
950 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
953 TP_ARGS(inode
, offset
, len
, rw
, ret
),
959 __field(unsigned long, len
)
965 __entry
->dev
= inode
->i_sb
->s_dev
;
966 __entry
->ino
= inode
->i_ino
;
967 __entry
->pos
= offset
;
973 TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
975 show_dev_ino(__entry
),
982 TRACE_EVENT(f2fs_reserve_new_blocks
,
984 TP_PROTO(struct inode
*inode
, nid_t nid
, unsigned int ofs_in_node
,
987 TP_ARGS(inode
, nid
, ofs_in_node
, count
),
992 __field(unsigned int, ofs_in_node
)
993 __field(blkcnt_t
, count
)
997 __entry
->dev
= inode
->i_sb
->s_dev
;
999 __entry
->ofs_in_node
= ofs_in_node
;
1000 __entry
->count
= count
;
1003 TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u, count = %llu",
1004 show_dev(__entry
->dev
),
1005 (unsigned int)__entry
->nid
,
1006 __entry
->ofs_in_node
,
1007 (unsigned long long)__entry
->count
)
1010 DECLARE_EVENT_CLASS(f2fs__submit_page_bio
,
1012 TP_PROTO(struct page
*page
, struct f2fs_io_info
*fio
),
1019 __field(pgoff_t
, index
)
1020 __field(block_t
, old_blkaddr
)
1021 __field(block_t
, new_blkaddr
)
1023 __field(int, op_flags
)
1029 __entry
->dev
= page_file_mapping(page
)->host
->i_sb
->s_dev
;
1030 __entry
->ino
= page_file_mapping(page
)->host
->i_ino
;
1031 __entry
->index
= page
->index
;
1032 __entry
->old_blkaddr
= fio
->old_blkaddr
;
1033 __entry
->new_blkaddr
= fio
->new_blkaddr
;
1034 __entry
->op
= fio
->op
;
1035 __entry
->op_flags
= fio
->op_flags
;
1036 __entry
->temp
= fio
->temp
;
1037 __entry
->type
= fio
->type
;
1040 TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
1041 "oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s(%s), type = %s_%s",
1042 show_dev_ino(__entry
),
1043 (unsigned long)__entry
->index
,
1044 (unsigned long long)__entry
->old_blkaddr
,
1045 (unsigned long long)__entry
->new_blkaddr
,
1046 show_bio_type(__entry
->op
, __entry
->op_flags
),
1047 show_block_temp(__entry
->temp
),
1048 show_block_type(__entry
->type
))
1051 DEFINE_EVENT_CONDITION(f2fs__submit_page_bio
, f2fs_submit_page_bio
,
1053 TP_PROTO(struct page
*page
, struct f2fs_io_info
*fio
),
1057 TP_CONDITION(page
->mapping
)
1060 DEFINE_EVENT_CONDITION(f2fs__submit_page_bio
, f2fs_submit_page_write
,
1062 TP_PROTO(struct page
*page
, struct f2fs_io_info
*fio
),
1066 TP_CONDITION(page
->mapping
)
1069 DECLARE_EVENT_CLASS(f2fs__bio
,
1071 TP_PROTO(struct super_block
*sb
, int type
, struct bio
*bio
),
1073 TP_ARGS(sb
, type
, bio
),
1077 __field(dev_t
, target
)
1079 __field(int, op_flags
)
1081 __field(sector_t
, sector
)
1082 __field(unsigned int, size
)
1086 __entry
->dev
= sb
->s_dev
;
1087 __entry
->target
= bio_dev(bio
);
1088 __entry
->op
= bio_op(bio
);
1089 __entry
->op_flags
= bio
->bi_opf
;
1090 __entry
->type
= type
;
1091 __entry
->sector
= bio
->bi_iter
.bi_sector
;
1092 __entry
->size
= bio
->bi_iter
.bi_size
;
1095 TP_printk("dev = (%d,%d)/(%d,%d), rw = %s(%s), %s, sector = %lld, size = %u",
1096 show_dev(__entry
->target
),
1097 show_dev(__entry
->dev
),
1098 show_bio_type(__entry
->op
, __entry
->op_flags
),
1099 show_block_type(__entry
->type
),
1100 (unsigned long long)__entry
->sector
,
1104 DEFINE_EVENT_CONDITION(f2fs__bio
, f2fs_prepare_write_bio
,
1106 TP_PROTO(struct super_block
*sb
, int type
, struct bio
*bio
),
1108 TP_ARGS(sb
, type
, bio
),
1113 DEFINE_EVENT_CONDITION(f2fs__bio
, f2fs_prepare_read_bio
,
1115 TP_PROTO(struct super_block
*sb
, int type
, struct bio
*bio
),
1117 TP_ARGS(sb
, type
, bio
),
1122 DEFINE_EVENT_CONDITION(f2fs__bio
, f2fs_submit_read_bio
,
1124 TP_PROTO(struct super_block
*sb
, int type
, struct bio
*bio
),
1126 TP_ARGS(sb
, type
, bio
),
1131 DEFINE_EVENT_CONDITION(f2fs__bio
, f2fs_submit_write_bio
,
1133 TP_PROTO(struct super_block
*sb
, int type
, struct bio
*bio
),
1135 TP_ARGS(sb
, type
, bio
),
1140 TRACE_EVENT(f2fs_write_begin
,
1142 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
1143 unsigned int flags
),
1145 TP_ARGS(inode
, pos
, len
, flags
),
1150 __field(loff_t
, pos
)
1151 __field(unsigned int, len
)
1152 __field(unsigned int, flags
)
1156 __entry
->dev
= inode
->i_sb
->s_dev
;
1157 __entry
->ino
= inode
->i_ino
;
1160 __entry
->flags
= flags
;
1163 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
1164 show_dev_ino(__entry
),
1165 (unsigned long long)__entry
->pos
,
1170 TRACE_EVENT(f2fs_write_end
,
1172 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
1173 unsigned int copied
),
1175 TP_ARGS(inode
, pos
, len
, copied
),
1180 __field(loff_t
, pos
)
1181 __field(unsigned int, len
)
1182 __field(unsigned int, copied
)
1186 __entry
->dev
= inode
->i_sb
->s_dev
;
1187 __entry
->ino
= inode
->i_ino
;
1190 __entry
->copied
= copied
;
1193 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
1194 show_dev_ino(__entry
),
1195 (unsigned long long)__entry
->pos
,
1200 DECLARE_EVENT_CLASS(f2fs__page
,
1202 TP_PROTO(struct page
*page
, int type
),
1204 TP_ARGS(page
, type
),
1211 __field(pgoff_t
, index
)
1213 __field(int, uptodate
)
1217 __entry
->dev
= page_file_mapping(page
)->host
->i_sb
->s_dev
;
1218 __entry
->ino
= page_file_mapping(page
)->host
->i_ino
;
1219 __entry
->type
= type
;
1221 S_ISDIR(page_file_mapping(page
)->host
->i_mode
);
1222 __entry
->index
= page
->index
;
1223 __entry
->dirty
= PageDirty(page
);
1224 __entry
->uptodate
= PageUptodate(page
);
1227 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
1228 "dirty = %d, uptodate = %d",
1229 show_dev_ino(__entry
),
1230 show_block_type(__entry
->type
),
1231 show_file_type(__entry
->dir
),
1232 (unsigned long)__entry
->index
,
1237 DEFINE_EVENT(f2fs__page
, f2fs_writepage
,
1239 TP_PROTO(struct page
*page
, int type
),
1244 DEFINE_EVENT(f2fs__page
, f2fs_do_write_data_page
,
1246 TP_PROTO(struct page
*page
, int type
),
1251 DEFINE_EVENT(f2fs__page
, f2fs_readpage
,
1253 TP_PROTO(struct page
*page
, int type
),
1258 DEFINE_EVENT(f2fs__page
, f2fs_set_page_dirty
,
1260 TP_PROTO(struct page
*page
, int type
),
1265 DEFINE_EVENT(f2fs__page
, f2fs_vm_page_mkwrite
,
1267 TP_PROTO(struct page
*page
, int type
),
1272 DEFINE_EVENT(f2fs__page
, f2fs_register_inmem_page
,
1274 TP_PROTO(struct page
*page
, int type
),
1279 DEFINE_EVENT(f2fs__page
, f2fs_commit_inmem_page
,
1281 TP_PROTO(struct page
*page
, int type
),
1286 TRACE_EVENT(f2fs_filemap_fault
,
1288 TP_PROTO(struct inode
*inode
, pgoff_t index
, unsigned long ret
),
1290 TP_ARGS(inode
, index
, ret
),
1295 __field(pgoff_t
, index
)
1296 __field(unsigned long, ret
)
1300 __entry
->dev
= inode
->i_sb
->s_dev
;
1301 __entry
->ino
= inode
->i_ino
;
1302 __entry
->index
= index
;
1306 TP_printk("dev = (%d,%d), ino = %lu, index = %lu, ret = %lx",
1307 show_dev_ino(__entry
),
1308 (unsigned long)__entry
->index
,
1312 TRACE_EVENT(f2fs_writepages
,
1314 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
, int type
),
1316 TP_ARGS(inode
, wbc
, type
),
1323 __field(long, nr_to_write
)
1324 __field(long, pages_skipped
)
1325 __field(loff_t
, range_start
)
1326 __field(loff_t
, range_end
)
1327 __field(pgoff_t
, writeback_index
)
1328 __field(int, sync_mode
)
1329 __field(char, for_kupdate
)
1330 __field(char, for_background
)
1331 __field(char, tagged_writepages
)
1332 __field(char, for_reclaim
)
1333 __field(char, range_cyclic
)
1334 __field(char, for_sync
)
1338 __entry
->dev
= inode
->i_sb
->s_dev
;
1339 __entry
->ino
= inode
->i_ino
;
1340 __entry
->type
= type
;
1341 __entry
->dir
= S_ISDIR(inode
->i_mode
);
1342 __entry
->nr_to_write
= wbc
->nr_to_write
;
1343 __entry
->pages_skipped
= wbc
->pages_skipped
;
1344 __entry
->range_start
= wbc
->range_start
;
1345 __entry
->range_end
= wbc
->range_end
;
1346 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
1347 __entry
->sync_mode
= wbc
->sync_mode
;
1348 __entry
->for_kupdate
= wbc
->for_kupdate
;
1349 __entry
->for_background
= wbc
->for_background
;
1350 __entry
->tagged_writepages
= wbc
->tagged_writepages
;
1351 __entry
->for_reclaim
= wbc
->for_reclaim
;
1352 __entry
->range_cyclic
= wbc
->range_cyclic
;
1353 __entry
->for_sync
= wbc
->for_sync
;
1356 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
1357 "skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
1358 "kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
1359 show_dev_ino(__entry
),
1360 show_block_type(__entry
->type
),
1361 show_file_type(__entry
->dir
),
1362 __entry
->nr_to_write
,
1363 __entry
->pages_skipped
,
1364 __entry
->range_start
,
1366 (unsigned long)__entry
->writeback_index
,
1368 __entry
->for_kupdate
,
1369 __entry
->for_background
,
1370 __entry
->tagged_writepages
,
1371 __entry
->for_reclaim
,
1372 __entry
->range_cyclic
,
1376 TRACE_EVENT(f2fs_readpages
,
1378 TP_PROTO(struct inode
*inode
, struct page
*page
, unsigned int nrpage
),
1380 TP_ARGS(inode
, page
, nrpage
),
1385 __field(pgoff_t
, start
)
1386 __field(unsigned int, nrpage
)
1390 __entry
->dev
= inode
->i_sb
->s_dev
;
1391 __entry
->ino
= inode
->i_ino
;
1392 __entry
->start
= page
->index
;
1393 __entry
->nrpage
= nrpage
;
1396 TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
1397 show_dev_ino(__entry
),
1398 (unsigned long)__entry
->start
,
1402 TRACE_EVENT(f2fs_write_checkpoint
,
1404 TP_PROTO(struct super_block
*sb
, int reason
, char *msg
),
1406 TP_ARGS(sb
, reason
, msg
),
1410 __field(int, reason
)
1411 __field(char *, msg
)
1415 __entry
->dev
= sb
->s_dev
;
1416 __entry
->reason
= reason
;
1420 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
1421 show_dev(__entry
->dev
),
1422 show_cpreason(__entry
->reason
),
1426 DECLARE_EVENT_CLASS(f2fs_discard
,
1428 TP_PROTO(struct block_device
*dev
, block_t blkstart
, block_t blklen
),
1430 TP_ARGS(dev
, blkstart
, blklen
),
1434 __field(block_t
, blkstart
)
1435 __field(block_t
, blklen
)
1439 __entry
->dev
= dev
->bd_dev
;
1440 __entry
->blkstart
= blkstart
;
1441 __entry
->blklen
= blklen
;
1444 TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
1445 show_dev(__entry
->dev
),
1446 (unsigned long long)__entry
->blkstart
,
1447 (unsigned long long)__entry
->blklen
)
1450 DEFINE_EVENT(f2fs_discard
, f2fs_queue_discard
,
1452 TP_PROTO(struct block_device
*dev
, block_t blkstart
, block_t blklen
),
1454 TP_ARGS(dev
, blkstart
, blklen
)
1457 DEFINE_EVENT(f2fs_discard
, f2fs_issue_discard
,
1459 TP_PROTO(struct block_device
*dev
, block_t blkstart
, block_t blklen
),
1461 TP_ARGS(dev
, blkstart
, blklen
)
1464 DEFINE_EVENT(f2fs_discard
, f2fs_remove_discard
,
1466 TP_PROTO(struct block_device
*dev
, block_t blkstart
, block_t blklen
),
1468 TP_ARGS(dev
, blkstart
, blklen
)
1471 TRACE_EVENT(f2fs_issue_reset_zone
,
1473 TP_PROTO(struct block_device
*dev
, block_t blkstart
),
1475 TP_ARGS(dev
, blkstart
),
1479 __field(block_t
, blkstart
)
1483 __entry
->dev
= dev
->bd_dev
;
1484 __entry
->blkstart
= blkstart
;
1487 TP_printk("dev = (%d,%d), reset zone at block = 0x%llx",
1488 show_dev(__entry
->dev
),
1489 (unsigned long long)__entry
->blkstart
)
1492 TRACE_EVENT(f2fs_issue_flush
,
1494 TP_PROTO(struct block_device
*dev
, unsigned int nobarrier
,
1495 unsigned int flush_merge
, int ret
),
1497 TP_ARGS(dev
, nobarrier
, flush_merge
, ret
),
1501 __field(unsigned int, nobarrier
)
1502 __field(unsigned int, flush_merge
)
1507 __entry
->dev
= dev
->bd_dev
;
1508 __entry
->nobarrier
= nobarrier
;
1509 __entry
->flush_merge
= flush_merge
;
1513 TP_printk("dev = (%d,%d), %s %s, ret = %d",
1514 show_dev(__entry
->dev
),
1515 __entry
->nobarrier
? "skip (nobarrier)" : "issue",
1516 __entry
->flush_merge
? " with flush_merge" : "",
1520 TRACE_EVENT(f2fs_lookup_extent_tree_start
,
1522 TP_PROTO(struct inode
*inode
, unsigned int pgofs
),
1524 TP_ARGS(inode
, pgofs
),
1529 __field(unsigned int, pgofs
)
1533 __entry
->dev
= inode
->i_sb
->s_dev
;
1534 __entry
->ino
= inode
->i_ino
;
1535 __entry
->pgofs
= pgofs
;
1538 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u",
1539 show_dev_ino(__entry
),
1543 TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end
,
1545 TP_PROTO(struct inode
*inode
, unsigned int pgofs
,
1546 struct extent_info
*ei
),
1548 TP_ARGS(inode
, pgofs
, ei
),
1555 __field(unsigned int, pgofs
)
1556 __field(unsigned int, fofs
)
1558 __field(unsigned int, len
)
1562 __entry
->dev
= inode
->i_sb
->s_dev
;
1563 __entry
->ino
= inode
->i_ino
;
1564 __entry
->pgofs
= pgofs
;
1565 __entry
->fofs
= ei
->fofs
;
1566 __entry
->blk
= ei
->blk
;
1567 __entry
->len
= ei
->len
;
1570 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
1571 "ext_info(fofs: %u, blk: %u, len: %u)",
1572 show_dev_ino(__entry
),
1579 TRACE_EVENT(f2fs_update_extent_tree_range
,
1581 TP_PROTO(struct inode
*inode
, unsigned int pgofs
, block_t blkaddr
,
1584 TP_ARGS(inode
, pgofs
, blkaddr
, len
),
1589 __field(unsigned int, pgofs
)
1591 __field(unsigned int, len
)
1595 __entry
->dev
= inode
->i_sb
->s_dev
;
1596 __entry
->ino
= inode
->i_ino
;
1597 __entry
->pgofs
= pgofs
;
1598 __entry
->blk
= blkaddr
;
1602 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
1603 "blkaddr = %u, len = %u",
1604 show_dev_ino(__entry
),
1610 TRACE_EVENT(f2fs_shrink_extent_tree
,
1612 TP_PROTO(struct f2fs_sb_info
*sbi
, unsigned int node_cnt
,
1613 unsigned int tree_cnt
),
1615 TP_ARGS(sbi
, node_cnt
, tree_cnt
),
1619 __field(unsigned int, node_cnt
)
1620 __field(unsigned int, tree_cnt
)
1624 __entry
->dev
= sbi
->sb
->s_dev
;
1625 __entry
->node_cnt
= node_cnt
;
1626 __entry
->tree_cnt
= tree_cnt
;
1629 TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u",
1630 show_dev(__entry
->dev
),
1635 TRACE_EVENT(f2fs_destroy_extent_tree
,
1637 TP_PROTO(struct inode
*inode
, unsigned int node_cnt
),
1639 TP_ARGS(inode
, node_cnt
),
1644 __field(unsigned int, node_cnt
)
1648 __entry
->dev
= inode
->i_sb
->s_dev
;
1649 __entry
->ino
= inode
->i_ino
;
1650 __entry
->node_cnt
= node_cnt
;
1653 TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u",
1654 show_dev_ino(__entry
),
1658 DECLARE_EVENT_CLASS(f2fs_sync_dirty_inodes
,
1660 TP_PROTO(struct super_block
*sb
, int type
, s64 count
),
1662 TP_ARGS(sb
, type
, count
),
1671 __entry
->dev
= sb
->s_dev
;
1672 __entry
->type
= type
;
1673 __entry
->count
= count
;
1676 TP_printk("dev = (%d,%d), %s, dirty count = %lld",
1677 show_dev(__entry
->dev
),
1678 show_file_type(__entry
->type
),
1682 DEFINE_EVENT(f2fs_sync_dirty_inodes
, f2fs_sync_dirty_inodes_enter
,
1684 TP_PROTO(struct super_block
*sb
, int type
, s64 count
),
1686 TP_ARGS(sb
, type
, count
)
1689 DEFINE_EVENT(f2fs_sync_dirty_inodes
, f2fs_sync_dirty_inodes_exit
,
1691 TP_PROTO(struct super_block
*sb
, int type
, s64 count
),
1693 TP_ARGS(sb
, type
, count
)
1696 TRACE_EVENT(f2fs_shutdown
,
1698 TP_PROTO(struct f2fs_sb_info
*sbi
, unsigned int mode
, int ret
),
1700 TP_ARGS(sbi
, mode
, ret
),
1704 __field(unsigned int, mode
)
1709 __entry
->dev
= sbi
->sb
->s_dev
;
1710 __entry
->mode
= mode
;
1714 TP_printk("dev = (%d,%d), mode: %s, ret:%d",
1715 show_dev(__entry
->dev
),
1716 show_shutdown_mode(__entry
->mode
),
1720 DECLARE_EVENT_CLASS(f2fs_zip_start
,
1722 TP_PROTO(struct inode
*inode
, pgoff_t cluster_idx
,
1723 unsigned int cluster_size
, unsigned char algtype
),
1725 TP_ARGS(inode
, cluster_idx
, cluster_size
, algtype
),
1730 __field(pgoff_t
, idx
)
1731 __field(unsigned int, size
)
1732 __field(unsigned int, algtype
)
1736 __entry
->dev
= inode
->i_sb
->s_dev
;
1737 __entry
->ino
= inode
->i_ino
;
1738 __entry
->idx
= cluster_idx
;
1739 __entry
->size
= cluster_size
;
1740 __entry
->algtype
= algtype
;
1743 TP_printk("dev = (%d,%d), ino = %lu, cluster_idx:%lu, "
1744 "cluster_size = %u, algorithm = %s",
1745 show_dev_ino(__entry
),
1748 show_compress_algorithm(__entry
->algtype
))
1751 DECLARE_EVENT_CLASS(f2fs_zip_end
,
1753 TP_PROTO(struct inode
*inode
, pgoff_t cluster_idx
,
1754 unsigned int compressed_size
, int ret
),
1756 TP_ARGS(inode
, cluster_idx
, compressed_size
, ret
),
1761 __field(pgoff_t
, idx
)
1762 __field(unsigned int, size
)
1763 __field(unsigned int, ret
)
1767 __entry
->dev
= inode
->i_sb
->s_dev
;
1768 __entry
->ino
= inode
->i_ino
;
1769 __entry
->idx
= cluster_idx
;
1770 __entry
->size
= compressed_size
;
1774 TP_printk("dev = (%d,%d), ino = %lu, cluster_idx:%lu, "
1775 "compressed_size = %u, ret = %d",
1776 show_dev_ino(__entry
),
1782 DEFINE_EVENT(f2fs_zip_start
, f2fs_compress_pages_start
,
1784 TP_PROTO(struct inode
*inode
, pgoff_t cluster_idx
,
1785 unsigned int cluster_size
, unsigned char algtype
),
1787 TP_ARGS(inode
, cluster_idx
, cluster_size
, algtype
)
1790 DEFINE_EVENT(f2fs_zip_start
, f2fs_decompress_pages_start
,
1792 TP_PROTO(struct inode
*inode
, pgoff_t cluster_idx
,
1793 unsigned int cluster_size
, unsigned char algtype
),
1795 TP_ARGS(inode
, cluster_idx
, cluster_size
, algtype
)
1798 DEFINE_EVENT(f2fs_zip_end
, f2fs_compress_pages_end
,
1800 TP_PROTO(struct inode
*inode
, pgoff_t cluster_idx
,
1801 unsigned int compressed_size
, int ret
),
1803 TP_ARGS(inode
, cluster_idx
, compressed_size
, ret
)
1806 DEFINE_EVENT(f2fs_zip_end
, f2fs_decompress_pages_end
,
1808 TP_PROTO(struct inode
*inode
, pgoff_t cluster_idx
,
1809 unsigned int compressed_size
, int ret
),
1811 TP_ARGS(inode
, cluster_idx
, compressed_size
, ret
)
1814 #endif /* _TRACE_F2FS_H */
1816 /* This part must be outside protection */
1817 #include <trace/define_trace.h>