Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cris-mirror.git] / include / trace / events / f2fs.h
blob06c87f9f720c2ee9775eb707784c375bdcea4fd5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM f2fs
5 #if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_F2FS_H
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);
53 #define show_block_type(type) \
54 __print_symbolic(type, \
55 { NODE, "NODE" }, \
56 { DATA, "DATA" }, \
57 { META, "META" }, \
58 { META_FLUSH, "META_FLUSH" }, \
59 { INMEM, "INMEM" }, \
60 { INMEM_DROP, "INMEM_DROP" }, \
61 { INMEM_INVALIDATE, "INMEM_INVALIDATE" }, \
62 { INMEM_REVOKE, "INMEM_REVOKE" }, \
63 { IPU, "IN-PLACE" }, \
64 { OPU, "OUT-OF-PLACE" })
66 #define show_block_temp(temp) \
67 __print_symbolic(temp, \
68 { HOT, "HOT" }, \
69 { WARM, "WARM" }, \
70 { COLD, "COLD" })
72 #define F2FS_OP_FLAGS (REQ_RAHEAD | REQ_SYNC | REQ_META | REQ_PRIO | \
73 REQ_PREFLUSH | REQ_FUA)
74 #define F2FS_BIO_FLAG_MASK(t) (t & F2FS_OP_FLAGS)
76 #define show_bio_type(op,op_flags) show_bio_op(op), \
77 show_bio_op_flags(op_flags)
79 #define show_bio_op(op) \
80 __print_symbolic(op, \
81 { REQ_OP_READ, "READ" }, \
82 { REQ_OP_WRITE, "WRITE" }, \
83 { REQ_OP_FLUSH, "FLUSH" }, \
84 { REQ_OP_DISCARD, "DISCARD" }, \
85 { REQ_OP_ZONE_REPORT, "ZONE_REPORT" }, \
86 { REQ_OP_SECURE_ERASE, "SECURE_ERASE" }, \
87 { REQ_OP_ZONE_RESET, "ZONE_RESET" }, \
88 { REQ_OP_WRITE_SAME, "WRITE_SAME" }, \
89 { REQ_OP_WRITE_ZEROES, "WRITE_ZEROES" })
91 #define show_bio_op_flags(flags) \
92 __print_flags(F2FS_BIO_FLAG_MASK(flags), "|", \
93 { REQ_RAHEAD, "R" }, \
94 { REQ_SYNC, "S" }, \
95 { REQ_META, "M" }, \
96 { REQ_PRIO, "P" }, \
97 { REQ_PREFLUSH, "PF" }, \
98 { REQ_FUA, "FUA" })
100 #define show_data_type(type) \
101 __print_symbolic(type, \
102 { CURSEG_HOT_DATA, "Hot DATA" }, \
103 { CURSEG_WARM_DATA, "Warm DATA" }, \
104 { CURSEG_COLD_DATA, "Cold DATA" }, \
105 { CURSEG_HOT_NODE, "Hot NODE" }, \
106 { CURSEG_WARM_NODE, "Warm NODE" }, \
107 { CURSEG_COLD_NODE, "Cold NODE" }, \
108 { NO_CHECK_TYPE, "No TYPE" })
110 #define show_file_type(type) \
111 __print_symbolic(type, \
112 { 0, "FILE" }, \
113 { 1, "DIR" })
115 #define show_gc_type(type) \
116 __print_symbolic(type, \
117 { FG_GC, "Foreground GC" }, \
118 { BG_GC, "Background GC" })
120 #define show_alloc_mode(type) \
121 __print_symbolic(type, \
122 { LFS, "LFS-mode" }, \
123 { SSR, "SSR-mode" })
125 #define show_victim_policy(type) \
126 __print_symbolic(type, \
127 { GC_GREEDY, "Greedy" }, \
128 { GC_CB, "Cost-Benefit" })
130 #define show_cpreason(type) \
131 __print_flags(type, "|", \
132 { CP_UMOUNT, "Umount" }, \
133 { CP_FASTBOOT, "Fastboot" }, \
134 { CP_SYNC, "Sync" }, \
135 { CP_RECOVERY, "Recovery" }, \
136 { CP_DISCARD, "Discard" }, \
137 { CP_UMOUNT, "Umount" }, \
138 { CP_TRIMMED, "Trimmed" })
140 #define show_fsync_cpreason(type) \
141 __print_symbolic(type, \
142 { CP_NO_NEEDED, "no needed" }, \
143 { CP_NON_REGULAR, "non regular" }, \
144 { CP_HARDLINK, "hardlink" }, \
145 { CP_SB_NEED_CP, "sb needs cp" }, \
146 { CP_WRONG_PINO, "wrong pino" }, \
147 { CP_NO_SPC_ROLL, "no space roll forward" }, \
148 { CP_NODE_NEED_CP, "node needs cp" }, \
149 { CP_FASTBOOT_MODE, "fastboot mode" }, \
150 { CP_SPEC_LOG_NUM, "log type is 2" }, \
151 { CP_RECOVER_DIR, "dir needs recovery" })
153 struct victim_sel_policy;
154 struct f2fs_map_blocks;
156 DECLARE_EVENT_CLASS(f2fs__inode,
158 TP_PROTO(struct inode *inode),
160 TP_ARGS(inode),
162 TP_STRUCT__entry(
163 __field(dev_t, dev)
164 __field(ino_t, ino)
165 __field(ino_t, pino)
166 __field(umode_t, mode)
167 __field(loff_t, size)
168 __field(unsigned int, nlink)
169 __field(blkcnt_t, blocks)
170 __field(__u8, advise)
173 TP_fast_assign(
174 __entry->dev = inode->i_sb->s_dev;
175 __entry->ino = inode->i_ino;
176 __entry->pino = F2FS_I(inode)->i_pino;
177 __entry->mode = inode->i_mode;
178 __entry->nlink = inode->i_nlink;
179 __entry->size = inode->i_size;
180 __entry->blocks = inode->i_blocks;
181 __entry->advise = F2FS_I(inode)->i_advise;
184 TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
185 "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
186 show_dev_ino(__entry),
187 (unsigned long)__entry->pino,
188 __entry->mode,
189 __entry->size,
190 (unsigned int)__entry->nlink,
191 (unsigned long long)__entry->blocks,
192 (unsigned char)__entry->advise)
195 DECLARE_EVENT_CLASS(f2fs__inode_exit,
197 TP_PROTO(struct inode *inode, int ret),
199 TP_ARGS(inode, ret),
201 TP_STRUCT__entry(
202 __field(dev_t, dev)
203 __field(ino_t, ino)
204 __field(int, ret)
207 TP_fast_assign(
208 __entry->dev = inode->i_sb->s_dev;
209 __entry->ino = inode->i_ino;
210 __entry->ret = ret;
213 TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
214 show_dev_ino(__entry),
215 __entry->ret)
218 DEFINE_EVENT(f2fs__inode, f2fs_sync_file_enter,
220 TP_PROTO(struct inode *inode),
222 TP_ARGS(inode)
225 TRACE_EVENT(f2fs_sync_file_exit,
227 TP_PROTO(struct inode *inode, int cp_reason, int datasync, int ret),
229 TP_ARGS(inode, cp_reason, datasync, ret),
231 TP_STRUCT__entry(
232 __field(dev_t, dev)
233 __field(ino_t, ino)
234 __field(int, cp_reason)
235 __field(int, datasync)
236 __field(int, ret)
239 TP_fast_assign(
240 __entry->dev = inode->i_sb->s_dev;
241 __entry->ino = inode->i_ino;
242 __entry->cp_reason = cp_reason;
243 __entry->datasync = datasync;
244 __entry->ret = ret;
247 TP_printk("dev = (%d,%d), ino = %lu, cp_reason: %s, "
248 "datasync = %d, ret = %d",
249 show_dev_ino(__entry),
250 show_fsync_cpreason(__entry->cp_reason),
251 __entry->datasync,
252 __entry->ret)
255 TRACE_EVENT(f2fs_sync_fs,
257 TP_PROTO(struct super_block *sb, int wait),
259 TP_ARGS(sb, wait),
261 TP_STRUCT__entry(
262 __field(dev_t, dev)
263 __field(int, dirty)
264 __field(int, wait)
267 TP_fast_assign(
268 __entry->dev = sb->s_dev;
269 __entry->dirty = is_sbi_flag_set(F2FS_SB(sb), SBI_IS_DIRTY);
270 __entry->wait = wait;
273 TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
274 show_dev(__entry->dev),
275 __entry->dirty ? "dirty" : "not dirty",
276 __entry->wait)
279 DEFINE_EVENT(f2fs__inode, f2fs_iget,
281 TP_PROTO(struct inode *inode),
283 TP_ARGS(inode)
286 DEFINE_EVENT(f2fs__inode_exit, f2fs_iget_exit,
288 TP_PROTO(struct inode *inode, int ret),
290 TP_ARGS(inode, ret)
293 DEFINE_EVENT(f2fs__inode, f2fs_evict_inode,
295 TP_PROTO(struct inode *inode),
297 TP_ARGS(inode)
300 DEFINE_EVENT(f2fs__inode_exit, f2fs_new_inode,
302 TP_PROTO(struct inode *inode, int ret),
304 TP_ARGS(inode, ret)
307 TRACE_EVENT(f2fs_unlink_enter,
309 TP_PROTO(struct inode *dir, struct dentry *dentry),
311 TP_ARGS(dir, dentry),
313 TP_STRUCT__entry(
314 __field(dev_t, dev)
315 __field(ino_t, ino)
316 __field(loff_t, size)
317 __field(blkcnt_t, blocks)
318 __field(const char *, name)
321 TP_fast_assign(
322 __entry->dev = dir->i_sb->s_dev;
323 __entry->ino = dir->i_ino;
324 __entry->size = dir->i_size;
325 __entry->blocks = dir->i_blocks;
326 __entry->name = dentry->d_name.name;
329 TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
330 "i_blocks = %llu, name = %s",
331 show_dev_ino(__entry),
332 __entry->size,
333 (unsigned long long)__entry->blocks,
334 __entry->name)
337 DEFINE_EVENT(f2fs__inode_exit, f2fs_unlink_exit,
339 TP_PROTO(struct inode *inode, int ret),
341 TP_ARGS(inode, ret)
344 DEFINE_EVENT(f2fs__inode_exit, f2fs_drop_inode,
346 TP_PROTO(struct inode *inode, int ret),
348 TP_ARGS(inode, ret)
351 DEFINE_EVENT(f2fs__inode, f2fs_truncate,
353 TP_PROTO(struct inode *inode),
355 TP_ARGS(inode)
358 TRACE_EVENT(f2fs_truncate_data_blocks_range,
360 TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs, int free),
362 TP_ARGS(inode, nid, ofs, free),
364 TP_STRUCT__entry(
365 __field(dev_t, dev)
366 __field(ino_t, ino)
367 __field(nid_t, nid)
368 __field(unsigned int, ofs)
369 __field(int, free)
372 TP_fast_assign(
373 __entry->dev = inode->i_sb->s_dev;
374 __entry->ino = inode->i_ino;
375 __entry->nid = nid;
376 __entry->ofs = ofs;
377 __entry->free = free;
380 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
381 show_dev_ino(__entry),
382 (unsigned int)__entry->nid,
383 __entry->ofs,
384 __entry->free)
387 DECLARE_EVENT_CLASS(f2fs__truncate_op,
389 TP_PROTO(struct inode *inode, u64 from),
391 TP_ARGS(inode, from),
393 TP_STRUCT__entry(
394 __field(dev_t, dev)
395 __field(ino_t, ino)
396 __field(loff_t, size)
397 __field(blkcnt_t, blocks)
398 __field(u64, from)
401 TP_fast_assign(
402 __entry->dev = inode->i_sb->s_dev;
403 __entry->ino = inode->i_ino;
404 __entry->size = inode->i_size;
405 __entry->blocks = inode->i_blocks;
406 __entry->from = from;
409 TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
410 "start file offset = %llu",
411 show_dev_ino(__entry),
412 __entry->size,
413 (unsigned long long)__entry->blocks,
414 (unsigned long long)__entry->from)
417 DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_blocks_enter,
419 TP_PROTO(struct inode *inode, u64 from),
421 TP_ARGS(inode, from)
424 DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_blocks_exit,
426 TP_PROTO(struct inode *inode, int ret),
428 TP_ARGS(inode, ret)
431 DEFINE_EVENT(f2fs__truncate_op, f2fs_truncate_inode_blocks_enter,
433 TP_PROTO(struct inode *inode, u64 from),
435 TP_ARGS(inode, from)
438 DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_inode_blocks_exit,
440 TP_PROTO(struct inode *inode, int ret),
442 TP_ARGS(inode, ret)
445 DECLARE_EVENT_CLASS(f2fs__truncate_node,
447 TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
449 TP_ARGS(inode, nid, blk_addr),
451 TP_STRUCT__entry(
452 __field(dev_t, dev)
453 __field(ino_t, ino)
454 __field(nid_t, nid)
455 __field(block_t, blk_addr)
458 TP_fast_assign(
459 __entry->dev = inode->i_sb->s_dev;
460 __entry->ino = inode->i_ino;
461 __entry->nid = nid;
462 __entry->blk_addr = blk_addr;
465 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
466 show_dev_ino(__entry),
467 (unsigned int)__entry->nid,
468 (unsigned long long)__entry->blk_addr)
471 DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_nodes_enter,
473 TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
475 TP_ARGS(inode, nid, blk_addr)
478 DEFINE_EVENT(f2fs__inode_exit, f2fs_truncate_nodes_exit,
480 TP_PROTO(struct inode *inode, int ret),
482 TP_ARGS(inode, ret)
485 DEFINE_EVENT(f2fs__truncate_node, f2fs_truncate_node,
487 TP_PROTO(struct inode *inode, nid_t nid, block_t blk_addr),
489 TP_ARGS(inode, nid, blk_addr)
492 TRACE_EVENT(f2fs_truncate_partial_nodes,
494 TP_PROTO(struct inode *inode, nid_t nid[], int depth, int err),
496 TP_ARGS(inode, nid, depth, err),
498 TP_STRUCT__entry(
499 __field(dev_t, dev)
500 __field(ino_t, ino)
501 __field(nid_t, nid[3])
502 __field(int, depth)
503 __field(int, err)
506 TP_fast_assign(
507 __entry->dev = inode->i_sb->s_dev;
508 __entry->ino = inode->i_ino;
509 __entry->nid[0] = nid[0];
510 __entry->nid[1] = nid[1];
511 __entry->nid[2] = nid[2];
512 __entry->depth = depth;
513 __entry->err = err;
516 TP_printk("dev = (%d,%d), ino = %lu, "
517 "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
518 show_dev_ino(__entry),
519 (unsigned int)__entry->nid[0],
520 (unsigned int)__entry->nid[1],
521 (unsigned int)__entry->nid[2],
522 __entry->depth,
523 __entry->err)
526 TRACE_EVENT(f2fs_map_blocks,
527 TP_PROTO(struct inode *inode, struct f2fs_map_blocks *map, int ret),
529 TP_ARGS(inode, map, ret),
531 TP_STRUCT__entry(
532 __field(dev_t, dev)
533 __field(ino_t, ino)
534 __field(block_t, m_lblk)
535 __field(block_t, m_pblk)
536 __field(unsigned int, m_len)
537 __field(int, ret)
540 TP_fast_assign(
541 __entry->dev = inode->i_sb->s_dev;
542 __entry->ino = inode->i_ino;
543 __entry->m_lblk = map->m_lblk;
544 __entry->m_pblk = map->m_pblk;
545 __entry->m_len = map->m_len;
546 __entry->ret = ret;
549 TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
550 "start blkaddr = 0x%llx, len = 0x%llx, err = %d",
551 show_dev_ino(__entry),
552 (unsigned long long)__entry->m_lblk,
553 (unsigned long long)__entry->m_pblk,
554 (unsigned long long)__entry->m_len,
555 __entry->ret)
558 TRACE_EVENT(f2fs_background_gc,
560 TP_PROTO(struct super_block *sb, unsigned int wait_ms,
561 unsigned int prefree, unsigned int free),
563 TP_ARGS(sb, wait_ms, prefree, free),
565 TP_STRUCT__entry(
566 __field(dev_t, dev)
567 __field(unsigned int, wait_ms)
568 __field(unsigned int, prefree)
569 __field(unsigned int, free)
572 TP_fast_assign(
573 __entry->dev = sb->s_dev;
574 __entry->wait_ms = wait_ms;
575 __entry->prefree = prefree;
576 __entry->free = free;
579 TP_printk("dev = (%d,%d), wait_ms = %u, prefree = %u, free = %u",
580 show_dev(__entry->dev),
581 __entry->wait_ms,
582 __entry->prefree,
583 __entry->free)
586 TRACE_EVENT(f2fs_gc_begin,
588 TP_PROTO(struct super_block *sb, bool sync, bool background,
589 long long dirty_nodes, long long dirty_dents,
590 long long dirty_imeta, unsigned int free_sec,
591 unsigned int free_seg, int reserved_seg,
592 unsigned int prefree_seg),
594 TP_ARGS(sb, sync, background, dirty_nodes, dirty_dents, dirty_imeta,
595 free_sec, free_seg, reserved_seg, prefree_seg),
597 TP_STRUCT__entry(
598 __field(dev_t, dev)
599 __field(bool, sync)
600 __field(bool, background)
601 __field(long long, dirty_nodes)
602 __field(long long, dirty_dents)
603 __field(long long, dirty_imeta)
604 __field(unsigned int, free_sec)
605 __field(unsigned int, free_seg)
606 __field(int, reserved_seg)
607 __field(unsigned int, prefree_seg)
610 TP_fast_assign(
611 __entry->dev = sb->s_dev;
612 __entry->sync = sync;
613 __entry->background = background;
614 __entry->dirty_nodes = dirty_nodes;
615 __entry->dirty_dents = dirty_dents;
616 __entry->dirty_imeta = dirty_imeta;
617 __entry->free_sec = free_sec;
618 __entry->free_seg = free_seg;
619 __entry->reserved_seg = reserved_seg;
620 __entry->prefree_seg = prefree_seg;
623 TP_printk("dev = (%d,%d), sync = %d, background = %d, nodes = %lld, "
624 "dents = %lld, imeta = %lld, free_sec:%u, free_seg:%u, "
625 "rsv_seg:%d, prefree_seg:%u",
626 show_dev(__entry->dev),
627 __entry->sync,
628 __entry->background,
629 __entry->dirty_nodes,
630 __entry->dirty_dents,
631 __entry->dirty_imeta,
632 __entry->free_sec,
633 __entry->free_seg,
634 __entry->reserved_seg,
635 __entry->prefree_seg)
638 TRACE_EVENT(f2fs_gc_end,
640 TP_PROTO(struct super_block *sb, int ret, int seg_freed,
641 int sec_freed, long long dirty_nodes,
642 long long dirty_dents, long long dirty_imeta,
643 unsigned int free_sec, unsigned int free_seg,
644 int reserved_seg, unsigned int prefree_seg),
646 TP_ARGS(sb, ret, seg_freed, sec_freed, dirty_nodes, dirty_dents,
647 dirty_imeta, free_sec, free_seg, reserved_seg, prefree_seg),
649 TP_STRUCT__entry(
650 __field(dev_t, dev)
651 __field(int, ret)
652 __field(int, seg_freed)
653 __field(int, sec_freed)
654 __field(long long, dirty_nodes)
655 __field(long long, dirty_dents)
656 __field(long long, dirty_imeta)
657 __field(unsigned int, free_sec)
658 __field(unsigned int, free_seg)
659 __field(int, reserved_seg)
660 __field(unsigned int, prefree_seg)
663 TP_fast_assign(
664 __entry->dev = sb->s_dev;
665 __entry->ret = ret;
666 __entry->seg_freed = seg_freed;
667 __entry->sec_freed = sec_freed;
668 __entry->dirty_nodes = dirty_nodes;
669 __entry->dirty_dents = dirty_dents;
670 __entry->dirty_imeta = dirty_imeta;
671 __entry->free_sec = free_sec;
672 __entry->free_seg = free_seg;
673 __entry->reserved_seg = reserved_seg;
674 __entry->prefree_seg = prefree_seg;
677 TP_printk("dev = (%d,%d), ret = %d, seg_freed = %d, sec_freed = %d, "
678 "nodes = %lld, dents = %lld, imeta = %lld, free_sec:%u, "
679 "free_seg:%u, rsv_seg:%d, prefree_seg:%u",
680 show_dev(__entry->dev),
681 __entry->ret,
682 __entry->seg_freed,
683 __entry->sec_freed,
684 __entry->dirty_nodes,
685 __entry->dirty_dents,
686 __entry->dirty_imeta,
687 __entry->free_sec,
688 __entry->free_seg,
689 __entry->reserved_seg,
690 __entry->prefree_seg)
693 TRACE_EVENT(f2fs_get_victim,
695 TP_PROTO(struct super_block *sb, int type, int gc_type,
696 struct victim_sel_policy *p, unsigned int pre_victim,
697 unsigned int prefree, unsigned int free),
699 TP_ARGS(sb, type, gc_type, p, pre_victim, prefree, free),
701 TP_STRUCT__entry(
702 __field(dev_t, dev)
703 __field(int, type)
704 __field(int, gc_type)
705 __field(int, alloc_mode)
706 __field(int, gc_mode)
707 __field(unsigned int, victim)
708 __field(unsigned int, cost)
709 __field(unsigned int, ofs_unit)
710 __field(unsigned int, pre_victim)
711 __field(unsigned int, prefree)
712 __field(unsigned int, free)
715 TP_fast_assign(
716 __entry->dev = sb->s_dev;
717 __entry->type = type;
718 __entry->gc_type = gc_type;
719 __entry->alloc_mode = p->alloc_mode;
720 __entry->gc_mode = p->gc_mode;
721 __entry->victim = p->min_segno;
722 __entry->cost = p->min_cost;
723 __entry->ofs_unit = p->ofs_unit;
724 __entry->pre_victim = pre_victim;
725 __entry->prefree = prefree;
726 __entry->free = free;
729 TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), "
730 "victim = %u, cost = %u, ofs_unit = %u, "
731 "pre_victim_secno = %d, prefree = %u, free = %u",
732 show_dev(__entry->dev),
733 show_data_type(__entry->type),
734 show_gc_type(__entry->gc_type),
735 show_alloc_mode(__entry->alloc_mode),
736 show_victim_policy(__entry->gc_mode),
737 __entry->victim,
738 __entry->cost,
739 __entry->ofs_unit,
740 (int)__entry->pre_victim,
741 __entry->prefree,
742 __entry->free)
745 TRACE_EVENT(f2fs_lookup_start,
747 TP_PROTO(struct inode *dir, struct dentry *dentry, unsigned int flags),
749 TP_ARGS(dir, dentry, flags),
751 TP_STRUCT__entry(
752 __field(dev_t, dev)
753 __field(ino_t, ino)
754 __field(const char *, name)
755 __field(unsigned int, flags)
758 TP_fast_assign(
759 __entry->dev = dir->i_sb->s_dev;
760 __entry->ino = dir->i_ino;
761 __entry->name = dentry->d_name.name;
762 __entry->flags = flags;
765 TP_printk("dev = (%d,%d), pino = %lu, name:%s, flags:%u",
766 show_dev_ino(__entry),
767 __entry->name,
768 __entry->flags)
771 TRACE_EVENT(f2fs_lookup_end,
773 TP_PROTO(struct inode *dir, struct dentry *dentry, nid_t ino,
774 int err),
776 TP_ARGS(dir, dentry, ino, err),
778 TP_STRUCT__entry(
779 __field(dev_t, dev)
780 __field(ino_t, ino)
781 __field(const char *, name)
782 __field(nid_t, cino)
783 __field(int, err)
786 TP_fast_assign(
787 __entry->dev = dir->i_sb->s_dev;
788 __entry->ino = dir->i_ino;
789 __entry->name = dentry->d_name.name;
790 __entry->cino = ino;
791 __entry->err = err;
794 TP_printk("dev = (%d,%d), pino = %lu, name:%s, ino:%u, err:%d",
795 show_dev_ino(__entry),
796 __entry->name,
797 __entry->cino,
798 __entry->err)
801 TRACE_EVENT(f2fs_readdir,
803 TP_PROTO(struct inode *dir, loff_t start_pos, loff_t end_pos, int err),
805 TP_ARGS(dir, start_pos, end_pos, err),
807 TP_STRUCT__entry(
808 __field(dev_t, dev)
809 __field(ino_t, ino)
810 __field(loff_t, start)
811 __field(loff_t, end)
812 __field(int, err)
815 TP_fast_assign(
816 __entry->dev = dir->i_sb->s_dev;
817 __entry->ino = dir->i_ino;
818 __entry->start = start_pos;
819 __entry->end = end_pos;
820 __entry->err = err;
823 TP_printk("dev = (%d,%d), ino = %lu, start_pos:%llu, end_pos:%llu, err:%d",
824 show_dev_ino(__entry),
825 __entry->start,
826 __entry->end,
827 __entry->err)
830 TRACE_EVENT(f2fs_fallocate,
832 TP_PROTO(struct inode *inode, int mode,
833 loff_t offset, loff_t len, int ret),
835 TP_ARGS(inode, mode, offset, len, ret),
837 TP_STRUCT__entry(
838 __field(dev_t, dev)
839 __field(ino_t, ino)
840 __field(int, mode)
841 __field(loff_t, offset)
842 __field(loff_t, len)
843 __field(loff_t, size)
844 __field(blkcnt_t, blocks)
845 __field(int, ret)
848 TP_fast_assign(
849 __entry->dev = inode->i_sb->s_dev;
850 __entry->ino = inode->i_ino;
851 __entry->mode = mode;
852 __entry->offset = offset;
853 __entry->len = len;
854 __entry->size = inode->i_size;
855 __entry->blocks = inode->i_blocks;
856 __entry->ret = ret;
859 TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
860 "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
861 show_dev_ino(__entry),
862 __entry->mode,
863 (unsigned long long)__entry->offset,
864 (unsigned long long)__entry->len,
865 (unsigned long long)__entry->size,
866 (unsigned long long)__entry->blocks,
867 __entry->ret)
870 TRACE_EVENT(f2fs_direct_IO_enter,
872 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
874 TP_ARGS(inode, offset, len, rw),
876 TP_STRUCT__entry(
877 __field(dev_t, dev)
878 __field(ino_t, ino)
879 __field(loff_t, pos)
880 __field(unsigned long, len)
881 __field(int, rw)
884 TP_fast_assign(
885 __entry->dev = inode->i_sb->s_dev;
886 __entry->ino = inode->i_ino;
887 __entry->pos = offset;
888 __entry->len = len;
889 __entry->rw = rw;
892 TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu rw = %d",
893 show_dev_ino(__entry),
894 __entry->pos,
895 __entry->len,
896 __entry->rw)
899 TRACE_EVENT(f2fs_direct_IO_exit,
901 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
902 int rw, int ret),
904 TP_ARGS(inode, offset, len, rw, ret),
906 TP_STRUCT__entry(
907 __field(dev_t, dev)
908 __field(ino_t, ino)
909 __field(loff_t, pos)
910 __field(unsigned long, len)
911 __field(int, rw)
912 __field(int, ret)
915 TP_fast_assign(
916 __entry->dev = inode->i_sb->s_dev;
917 __entry->ino = inode->i_ino;
918 __entry->pos = offset;
919 __entry->len = len;
920 __entry->rw = rw;
921 __entry->ret = ret;
924 TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
925 "rw = %d ret = %d",
926 show_dev_ino(__entry),
927 __entry->pos,
928 __entry->len,
929 __entry->rw,
930 __entry->ret)
933 TRACE_EVENT(f2fs_reserve_new_blocks,
935 TP_PROTO(struct inode *inode, nid_t nid, unsigned int ofs_in_node,
936 blkcnt_t count),
938 TP_ARGS(inode, nid, ofs_in_node, count),
940 TP_STRUCT__entry(
941 __field(dev_t, dev)
942 __field(nid_t, nid)
943 __field(unsigned int, ofs_in_node)
944 __field(blkcnt_t, count)
947 TP_fast_assign(
948 __entry->dev = inode->i_sb->s_dev;
949 __entry->nid = nid;
950 __entry->ofs_in_node = ofs_in_node;
951 __entry->count = count;
954 TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u, count = %llu",
955 show_dev(__entry->dev),
956 (unsigned int)__entry->nid,
957 __entry->ofs_in_node,
958 (unsigned long long)__entry->count)
961 DECLARE_EVENT_CLASS(f2fs__submit_page_bio,
963 TP_PROTO(struct page *page, struct f2fs_io_info *fio),
965 TP_ARGS(page, fio),
967 TP_STRUCT__entry(
968 __field(dev_t, dev)
969 __field(ino_t, ino)
970 __field(pgoff_t, index)
971 __field(block_t, old_blkaddr)
972 __field(block_t, new_blkaddr)
973 __field(int, op)
974 __field(int, op_flags)
975 __field(int, temp)
976 __field(int, type)
979 TP_fast_assign(
980 __entry->dev = page->mapping->host->i_sb->s_dev;
981 __entry->ino = page->mapping->host->i_ino;
982 __entry->index = page->index;
983 __entry->old_blkaddr = fio->old_blkaddr;
984 __entry->new_blkaddr = fio->new_blkaddr;
985 __entry->op = fio->op;
986 __entry->op_flags = fio->op_flags;
987 __entry->temp = fio->temp;
988 __entry->type = fio->type;
991 TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
992 "oldaddr = 0x%llx, newaddr = 0x%llx, rw = %s(%s), type = %s_%s",
993 show_dev_ino(__entry),
994 (unsigned long)__entry->index,
995 (unsigned long long)__entry->old_blkaddr,
996 (unsigned long long)__entry->new_blkaddr,
997 show_bio_type(__entry->op, __entry->op_flags),
998 show_block_temp(__entry->temp),
999 show_block_type(__entry->type))
1002 DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_bio,
1004 TP_PROTO(struct page *page, struct f2fs_io_info *fio),
1006 TP_ARGS(page, fio),
1008 TP_CONDITION(page->mapping)
1011 DEFINE_EVENT_CONDITION(f2fs__submit_page_bio, f2fs_submit_page_write,
1013 TP_PROTO(struct page *page, struct f2fs_io_info *fio),
1015 TP_ARGS(page, fio),
1017 TP_CONDITION(page->mapping)
1020 DECLARE_EVENT_CLASS(f2fs__bio,
1022 TP_PROTO(struct super_block *sb, int type, struct bio *bio),
1024 TP_ARGS(sb, type, bio),
1026 TP_STRUCT__entry(
1027 __field(dev_t, dev)
1028 __field(dev_t, target)
1029 __field(int, op)
1030 __field(int, op_flags)
1031 __field(int, type)
1032 __field(sector_t, sector)
1033 __field(unsigned int, size)
1036 TP_fast_assign(
1037 __entry->dev = sb->s_dev;
1038 __entry->target = bio_dev(bio);
1039 __entry->op = bio_op(bio);
1040 __entry->op_flags = bio->bi_opf;
1041 __entry->type = type;
1042 __entry->sector = bio->bi_iter.bi_sector;
1043 __entry->size = bio->bi_iter.bi_size;
1046 TP_printk("dev = (%d,%d)/(%d,%d), rw = %s(%s), %s, sector = %lld, size = %u",
1047 show_dev(__entry->target),
1048 show_dev(__entry->dev),
1049 show_bio_type(__entry->op, __entry->op_flags),
1050 show_block_type(__entry->type),
1051 (unsigned long long)__entry->sector,
1052 __entry->size)
1055 DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_write_bio,
1057 TP_PROTO(struct super_block *sb, int type, struct bio *bio),
1059 TP_ARGS(sb, type, bio),
1061 TP_CONDITION(bio)
1064 DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_prepare_read_bio,
1066 TP_PROTO(struct super_block *sb, int type, struct bio *bio),
1068 TP_ARGS(sb, type, bio),
1070 TP_CONDITION(bio)
1073 DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_read_bio,
1075 TP_PROTO(struct super_block *sb, int type, struct bio *bio),
1077 TP_ARGS(sb, type, bio),
1079 TP_CONDITION(bio)
1082 DEFINE_EVENT_CONDITION(f2fs__bio, f2fs_submit_write_bio,
1084 TP_PROTO(struct super_block *sb, int type, struct bio *bio),
1086 TP_ARGS(sb, type, bio),
1088 TP_CONDITION(bio)
1091 TRACE_EVENT(f2fs_write_begin,
1093 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
1094 unsigned int flags),
1096 TP_ARGS(inode, pos, len, flags),
1098 TP_STRUCT__entry(
1099 __field(dev_t, dev)
1100 __field(ino_t, ino)
1101 __field(loff_t, pos)
1102 __field(unsigned int, len)
1103 __field(unsigned int, flags)
1106 TP_fast_assign(
1107 __entry->dev = inode->i_sb->s_dev;
1108 __entry->ino = inode->i_ino;
1109 __entry->pos = pos;
1110 __entry->len = len;
1111 __entry->flags = flags;
1114 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
1115 show_dev_ino(__entry),
1116 (unsigned long long)__entry->pos,
1117 __entry->len,
1118 __entry->flags)
1121 TRACE_EVENT(f2fs_write_end,
1123 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
1124 unsigned int copied),
1126 TP_ARGS(inode, pos, len, copied),
1128 TP_STRUCT__entry(
1129 __field(dev_t, dev)
1130 __field(ino_t, ino)
1131 __field(loff_t, pos)
1132 __field(unsigned int, len)
1133 __field(unsigned int, copied)
1136 TP_fast_assign(
1137 __entry->dev = inode->i_sb->s_dev;
1138 __entry->ino = inode->i_ino;
1139 __entry->pos = pos;
1140 __entry->len = len;
1141 __entry->copied = copied;
1144 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
1145 show_dev_ino(__entry),
1146 (unsigned long long)__entry->pos,
1147 __entry->len,
1148 __entry->copied)
1151 DECLARE_EVENT_CLASS(f2fs__page,
1153 TP_PROTO(struct page *page, int type),
1155 TP_ARGS(page, type),
1157 TP_STRUCT__entry(
1158 __field(dev_t, dev)
1159 __field(ino_t, ino)
1160 __field(int, type)
1161 __field(int, dir)
1162 __field(pgoff_t, index)
1163 __field(int, dirty)
1164 __field(int, uptodate)
1167 TP_fast_assign(
1168 __entry->dev = page->mapping->host->i_sb->s_dev;
1169 __entry->ino = page->mapping->host->i_ino;
1170 __entry->type = type;
1171 __entry->dir = S_ISDIR(page->mapping->host->i_mode);
1172 __entry->index = page->index;
1173 __entry->dirty = PageDirty(page);
1174 __entry->uptodate = PageUptodate(page);
1177 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
1178 "dirty = %d, uptodate = %d",
1179 show_dev_ino(__entry),
1180 show_block_type(__entry->type),
1181 show_file_type(__entry->dir),
1182 (unsigned long)__entry->index,
1183 __entry->dirty,
1184 __entry->uptodate)
1187 DEFINE_EVENT(f2fs__page, f2fs_writepage,
1189 TP_PROTO(struct page *page, int type),
1191 TP_ARGS(page, type)
1194 DEFINE_EVENT(f2fs__page, f2fs_do_write_data_page,
1196 TP_PROTO(struct page *page, int type),
1198 TP_ARGS(page, type)
1201 DEFINE_EVENT(f2fs__page, f2fs_readpage,
1203 TP_PROTO(struct page *page, int type),
1205 TP_ARGS(page, type)
1208 DEFINE_EVENT(f2fs__page, f2fs_set_page_dirty,
1210 TP_PROTO(struct page *page, int type),
1212 TP_ARGS(page, type)
1215 DEFINE_EVENT(f2fs__page, f2fs_vm_page_mkwrite,
1217 TP_PROTO(struct page *page, int type),
1219 TP_ARGS(page, type)
1222 DEFINE_EVENT(f2fs__page, f2fs_register_inmem_page,
1224 TP_PROTO(struct page *page, int type),
1226 TP_ARGS(page, type)
1229 DEFINE_EVENT(f2fs__page, f2fs_commit_inmem_page,
1231 TP_PROTO(struct page *page, int type),
1233 TP_ARGS(page, type)
1236 TRACE_EVENT(f2fs_writepages,
1238 TP_PROTO(struct inode *inode, struct writeback_control *wbc, int type),
1240 TP_ARGS(inode, wbc, type),
1242 TP_STRUCT__entry(
1243 __field(dev_t, dev)
1244 __field(ino_t, ino)
1245 __field(int, type)
1246 __field(int, dir)
1247 __field(long, nr_to_write)
1248 __field(long, pages_skipped)
1249 __field(loff_t, range_start)
1250 __field(loff_t, range_end)
1251 __field(pgoff_t, writeback_index)
1252 __field(int, sync_mode)
1253 __field(char, for_kupdate)
1254 __field(char, for_background)
1255 __field(char, tagged_writepages)
1256 __field(char, for_reclaim)
1257 __field(char, range_cyclic)
1258 __field(char, for_sync)
1261 TP_fast_assign(
1262 __entry->dev = inode->i_sb->s_dev;
1263 __entry->ino = inode->i_ino;
1264 __entry->type = type;
1265 __entry->dir = S_ISDIR(inode->i_mode);
1266 __entry->nr_to_write = wbc->nr_to_write;
1267 __entry->pages_skipped = wbc->pages_skipped;
1268 __entry->range_start = wbc->range_start;
1269 __entry->range_end = wbc->range_end;
1270 __entry->writeback_index = inode->i_mapping->writeback_index;
1271 __entry->sync_mode = wbc->sync_mode;
1272 __entry->for_kupdate = wbc->for_kupdate;
1273 __entry->for_background = wbc->for_background;
1274 __entry->tagged_writepages = wbc->tagged_writepages;
1275 __entry->for_reclaim = wbc->for_reclaim;
1276 __entry->range_cyclic = wbc->range_cyclic;
1277 __entry->for_sync = wbc->for_sync;
1280 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
1281 "skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
1282 "kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
1283 show_dev_ino(__entry),
1284 show_block_type(__entry->type),
1285 show_file_type(__entry->dir),
1286 __entry->nr_to_write,
1287 __entry->pages_skipped,
1288 __entry->range_start,
1289 __entry->range_end,
1290 (unsigned long)__entry->writeback_index,
1291 __entry->sync_mode,
1292 __entry->for_kupdate,
1293 __entry->for_background,
1294 __entry->tagged_writepages,
1295 __entry->for_reclaim,
1296 __entry->range_cyclic,
1297 __entry->for_sync)
1300 TRACE_EVENT(f2fs_readpages,
1302 TP_PROTO(struct inode *inode, struct page *page, unsigned int nrpage),
1304 TP_ARGS(inode, page, nrpage),
1306 TP_STRUCT__entry(
1307 __field(dev_t, dev)
1308 __field(ino_t, ino)
1309 __field(pgoff_t, start)
1310 __field(unsigned int, nrpage)
1313 TP_fast_assign(
1314 __entry->dev = inode->i_sb->s_dev;
1315 __entry->ino = inode->i_ino;
1316 __entry->start = page->index;
1317 __entry->nrpage = nrpage;
1320 TP_printk("dev = (%d,%d), ino = %lu, start = %lu nrpage = %u",
1321 show_dev_ino(__entry),
1322 (unsigned long)__entry->start,
1323 __entry->nrpage)
1326 TRACE_EVENT(f2fs_write_checkpoint,
1328 TP_PROTO(struct super_block *sb, int reason, char *msg),
1330 TP_ARGS(sb, reason, msg),
1332 TP_STRUCT__entry(
1333 __field(dev_t, dev)
1334 __field(int, reason)
1335 __field(char *, msg)
1338 TP_fast_assign(
1339 __entry->dev = sb->s_dev;
1340 __entry->reason = reason;
1341 __entry->msg = msg;
1344 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
1345 show_dev(__entry->dev),
1346 show_cpreason(__entry->reason),
1347 __entry->msg)
1350 DECLARE_EVENT_CLASS(f2fs_discard,
1352 TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
1354 TP_ARGS(dev, blkstart, blklen),
1356 TP_STRUCT__entry(
1357 __field(dev_t, dev)
1358 __field(block_t, blkstart)
1359 __field(block_t, blklen)
1362 TP_fast_assign(
1363 __entry->dev = dev->bd_dev;
1364 __entry->blkstart = blkstart;
1365 __entry->blklen = blklen;
1368 TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
1369 show_dev(__entry->dev),
1370 (unsigned long long)__entry->blkstart,
1371 (unsigned long long)__entry->blklen)
1374 DEFINE_EVENT(f2fs_discard, f2fs_queue_discard,
1376 TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
1378 TP_ARGS(dev, blkstart, blklen)
1381 DEFINE_EVENT(f2fs_discard, f2fs_issue_discard,
1383 TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
1385 TP_ARGS(dev, blkstart, blklen)
1388 DEFINE_EVENT(f2fs_discard, f2fs_remove_discard,
1390 TP_PROTO(struct block_device *dev, block_t blkstart, block_t blklen),
1392 TP_ARGS(dev, blkstart, blklen)
1395 TRACE_EVENT(f2fs_issue_reset_zone,
1397 TP_PROTO(struct block_device *dev, block_t blkstart),
1399 TP_ARGS(dev, blkstart),
1401 TP_STRUCT__entry(
1402 __field(dev_t, dev)
1403 __field(block_t, blkstart)
1406 TP_fast_assign(
1407 __entry->dev = dev->bd_dev;
1408 __entry->blkstart = blkstart;
1411 TP_printk("dev = (%d,%d), reset zone at block = 0x%llx",
1412 show_dev(__entry->dev),
1413 (unsigned long long)__entry->blkstart)
1416 TRACE_EVENT(f2fs_issue_flush,
1418 TP_PROTO(struct block_device *dev, unsigned int nobarrier,
1419 unsigned int flush_merge, int ret),
1421 TP_ARGS(dev, nobarrier, flush_merge, ret),
1423 TP_STRUCT__entry(
1424 __field(dev_t, dev)
1425 __field(unsigned int, nobarrier)
1426 __field(unsigned int, flush_merge)
1427 __field(int, ret)
1430 TP_fast_assign(
1431 __entry->dev = dev->bd_dev;
1432 __entry->nobarrier = nobarrier;
1433 __entry->flush_merge = flush_merge;
1434 __entry->ret = ret;
1437 TP_printk("dev = (%d,%d), %s %s, ret = %d",
1438 show_dev(__entry->dev),
1439 __entry->nobarrier ? "skip (nobarrier)" : "issue",
1440 __entry->flush_merge ? " with flush_merge" : "",
1441 __entry->ret)
1444 TRACE_EVENT(f2fs_lookup_extent_tree_start,
1446 TP_PROTO(struct inode *inode, unsigned int pgofs),
1448 TP_ARGS(inode, pgofs),
1450 TP_STRUCT__entry(
1451 __field(dev_t, dev)
1452 __field(ino_t, ino)
1453 __field(unsigned int, pgofs)
1456 TP_fast_assign(
1457 __entry->dev = inode->i_sb->s_dev;
1458 __entry->ino = inode->i_ino;
1459 __entry->pgofs = pgofs;
1462 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u",
1463 show_dev_ino(__entry),
1464 __entry->pgofs)
1467 TRACE_EVENT_CONDITION(f2fs_lookup_extent_tree_end,
1469 TP_PROTO(struct inode *inode, unsigned int pgofs,
1470 struct extent_info *ei),
1472 TP_ARGS(inode, pgofs, ei),
1474 TP_CONDITION(ei),
1476 TP_STRUCT__entry(
1477 __field(dev_t, dev)
1478 __field(ino_t, ino)
1479 __field(unsigned int, pgofs)
1480 __field(unsigned int, fofs)
1481 __field(u32, blk)
1482 __field(unsigned int, len)
1485 TP_fast_assign(
1486 __entry->dev = inode->i_sb->s_dev;
1487 __entry->ino = inode->i_ino;
1488 __entry->pgofs = pgofs;
1489 __entry->fofs = ei->fofs;
1490 __entry->blk = ei->blk;
1491 __entry->len = ei->len;
1494 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
1495 "ext_info(fofs: %u, blk: %u, len: %u)",
1496 show_dev_ino(__entry),
1497 __entry->pgofs,
1498 __entry->fofs,
1499 __entry->blk,
1500 __entry->len)
1503 TRACE_EVENT(f2fs_update_extent_tree_range,
1505 TP_PROTO(struct inode *inode, unsigned int pgofs, block_t blkaddr,
1506 unsigned int len),
1508 TP_ARGS(inode, pgofs, blkaddr, len),
1510 TP_STRUCT__entry(
1511 __field(dev_t, dev)
1512 __field(ino_t, ino)
1513 __field(unsigned int, pgofs)
1514 __field(u32, blk)
1515 __field(unsigned int, len)
1518 TP_fast_assign(
1519 __entry->dev = inode->i_sb->s_dev;
1520 __entry->ino = inode->i_ino;
1521 __entry->pgofs = pgofs;
1522 __entry->blk = blkaddr;
1523 __entry->len = len;
1526 TP_printk("dev = (%d,%d), ino = %lu, pgofs = %u, "
1527 "blkaddr = %u, len = %u",
1528 show_dev_ino(__entry),
1529 __entry->pgofs,
1530 __entry->blk,
1531 __entry->len)
1534 TRACE_EVENT(f2fs_shrink_extent_tree,
1536 TP_PROTO(struct f2fs_sb_info *sbi, unsigned int node_cnt,
1537 unsigned int tree_cnt),
1539 TP_ARGS(sbi, node_cnt, tree_cnt),
1541 TP_STRUCT__entry(
1542 __field(dev_t, dev)
1543 __field(unsigned int, node_cnt)
1544 __field(unsigned int, tree_cnt)
1547 TP_fast_assign(
1548 __entry->dev = sbi->sb->s_dev;
1549 __entry->node_cnt = node_cnt;
1550 __entry->tree_cnt = tree_cnt;
1553 TP_printk("dev = (%d,%d), shrunk: node_cnt = %u, tree_cnt = %u",
1554 show_dev(__entry->dev),
1555 __entry->node_cnt,
1556 __entry->tree_cnt)
1559 TRACE_EVENT(f2fs_destroy_extent_tree,
1561 TP_PROTO(struct inode *inode, unsigned int node_cnt),
1563 TP_ARGS(inode, node_cnt),
1565 TP_STRUCT__entry(
1566 __field(dev_t, dev)
1567 __field(ino_t, ino)
1568 __field(unsigned int, node_cnt)
1571 TP_fast_assign(
1572 __entry->dev = inode->i_sb->s_dev;
1573 __entry->ino = inode->i_ino;
1574 __entry->node_cnt = node_cnt;
1577 TP_printk("dev = (%d,%d), ino = %lu, destroyed: node_cnt = %u",
1578 show_dev_ino(__entry),
1579 __entry->node_cnt)
1582 DECLARE_EVENT_CLASS(f2fs_sync_dirty_inodes,
1584 TP_PROTO(struct super_block *sb, int type, s64 count),
1586 TP_ARGS(sb, type, count),
1588 TP_STRUCT__entry(
1589 __field(dev_t, dev)
1590 __field(int, type)
1591 __field(s64, count)
1594 TP_fast_assign(
1595 __entry->dev = sb->s_dev;
1596 __entry->type = type;
1597 __entry->count = count;
1600 TP_printk("dev = (%d,%d), %s, dirty count = %lld",
1601 show_dev(__entry->dev),
1602 show_file_type(__entry->type),
1603 __entry->count)
1606 DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_enter,
1608 TP_PROTO(struct super_block *sb, int type, s64 count),
1610 TP_ARGS(sb, type, count)
1613 DEFINE_EVENT(f2fs_sync_dirty_inodes, f2fs_sync_dirty_inodes_exit,
1615 TP_PROTO(struct super_block *sb, int type, s64 count),
1617 TP_ARGS(sb, type, count)
1620 #endif /* _TRACE_F2FS_H */
1622 /* This part must be outside protection */
1623 #include <trace/define_trace.h>