2 #define TRACE_SYSTEM f2fs
4 #if !defined(_TRACE_F2FS_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/tracepoint.h>
9 #define show_dev(entry) MAJOR(entry->dev), MINOR(entry->dev)
10 #define show_dev_ino(entry) show_dev(entry), (unsigned long)entry->ino
12 #define show_block_type(type) \
13 __print_symbolic(type, \
17 { META_FLUSH, "META_FLUSH" })
19 #define F2FS_BIO_MASK(t) (t & (READA | WRITE_FLUSH_FUA))
20 #define F2FS_BIO_EXTRA_MASK(t) (t & (REQ_META | REQ_PRIO))
22 #define show_bio_type(type) show_bio_base(type), show_bio_extra(type)
24 #define show_bio_base(type) \
25 __print_symbolic(F2FS_BIO_MASK(type), \
27 { READA, "READAHEAD" }, \
28 { READ_SYNC, "READ_SYNC" }, \
30 { WRITE_SYNC, "WRITE_SYNC" }, \
31 { WRITE_FLUSH, "WRITE_FLUSH" }, \
32 { WRITE_FUA, "WRITE_FUA" }, \
33 { WRITE_FLUSH_FUA, "WRITE_FLUSH_FUA" })
35 #define show_bio_extra(type) \
36 __print_symbolic(F2FS_BIO_EXTRA_MASK(type), \
37 { REQ_META, "(M)" }, \
38 { REQ_PRIO, "(P)" }, \
39 { REQ_META | REQ_PRIO, "(MP)" }, \
42 #define show_data_type(type) \
43 __print_symbolic(type, \
44 { CURSEG_HOT_DATA, "Hot DATA" }, \
45 { CURSEG_WARM_DATA, "Warm DATA" }, \
46 { CURSEG_COLD_DATA, "Cold DATA" }, \
47 { CURSEG_HOT_NODE, "Hot NODE" }, \
48 { CURSEG_WARM_NODE, "Warm NODE" }, \
49 { CURSEG_COLD_NODE, "Cold NODE" }, \
50 { NO_CHECK_TYPE, "No TYPE" })
52 #define show_file_type(type) \
53 __print_symbolic(type, \
57 #define show_gc_type(type) \
58 __print_symbolic(type, \
59 { FG_GC, "Foreground GC" }, \
60 { BG_GC, "Background GC" })
62 #define show_alloc_mode(type) \
63 __print_symbolic(type, \
64 { LFS, "LFS-mode" }, \
67 #define show_victim_policy(type) \
68 __print_symbolic(type, \
69 { GC_GREEDY, "Greedy" }, \
70 { GC_CB, "Cost-Benefit" })
72 #define show_cpreason(type) \
73 __print_symbolic(type, \
74 { CP_UMOUNT, "Umount" }, \
75 { CP_FASTBOOT, "Fastboot" }, \
76 { CP_SYNC, "Sync" }, \
77 { CP_DISCARD, "Discard" })
79 struct victim_sel_policy
;
81 DECLARE_EVENT_CLASS(f2fs__inode
,
83 TP_PROTO(struct inode
*inode
),
91 __field(umode_t
, mode
)
93 __field(unsigned int, nlink
)
94 __field(blkcnt_t
, blocks
)
99 __entry
->dev
= inode
->i_sb
->s_dev
;
100 __entry
->ino
= inode
->i_ino
;
101 __entry
->pino
= F2FS_I(inode
)->i_pino
;
102 __entry
->mode
= inode
->i_mode
;
103 __entry
->nlink
= inode
->i_nlink
;
104 __entry
->size
= inode
->i_size
;
105 __entry
->blocks
= inode
->i_blocks
;
106 __entry
->advise
= F2FS_I(inode
)->i_advise
;
109 TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
110 "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
111 show_dev_ino(__entry
),
112 (unsigned long)__entry
->pino
,
115 (unsigned int)__entry
->nlink
,
116 (unsigned long long)__entry
->blocks
,
117 (unsigned char)__entry
->advise
)
120 DECLARE_EVENT_CLASS(f2fs__inode_exit
,
122 TP_PROTO(struct inode
*inode
, int ret
),
133 __entry
->dev
= inode
->i_sb
->s_dev
;
134 __entry
->ino
= inode
->i_ino
;
138 TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
139 show_dev_ino(__entry
),
143 DEFINE_EVENT(f2fs__inode
, f2fs_sync_file_enter
,
145 TP_PROTO(struct inode
*inode
),
150 TRACE_EVENT(f2fs_sync_file_exit
,
152 TP_PROTO(struct inode
*inode
, bool need_cp
, int datasync
, int ret
),
154 TP_ARGS(inode
, need_cp
, datasync
, ret
),
159 __field(bool, need_cp
)
160 __field(int, datasync
)
165 __entry
->dev
= inode
->i_sb
->s_dev
;
166 __entry
->ino
= inode
->i_ino
;
167 __entry
->need_cp
= need_cp
;
168 __entry
->datasync
= datasync
;
172 TP_printk("dev = (%d,%d), ino = %lu, checkpoint is %s, "
173 "datasync = %d, ret = %d",
174 show_dev_ino(__entry
),
175 __entry
->need_cp
? "needed" : "not needed",
180 TRACE_EVENT(f2fs_sync_fs
,
182 TP_PROTO(struct super_block
*sb
, int wait
),
193 __entry
->dev
= sb
->s_dev
;
194 __entry
->dirty
= is_sbi_flag_set(F2FS_SB(sb
), SBI_IS_DIRTY
);
195 __entry
->wait
= wait
;
198 TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
200 __entry
->dirty
? "dirty" : "not dirty",
204 DEFINE_EVENT(f2fs__inode
, f2fs_iget
,
206 TP_PROTO(struct inode
*inode
),
211 DEFINE_EVENT(f2fs__inode_exit
, f2fs_iget_exit
,
213 TP_PROTO(struct inode
*inode
, int ret
),
218 DEFINE_EVENT(f2fs__inode
, f2fs_evict_inode
,
220 TP_PROTO(struct inode
*inode
),
225 DEFINE_EVENT(f2fs__inode_exit
, f2fs_new_inode
,
227 TP_PROTO(struct inode
*inode
, int ret
),
232 TRACE_EVENT(f2fs_unlink_enter
,
234 TP_PROTO(struct inode
*dir
, struct dentry
*dentry
),
236 TP_ARGS(dir
, dentry
),
241 __field(loff_t
, size
)
242 __field(blkcnt_t
, blocks
)
243 __field(const char *, name
)
247 __entry
->dev
= dir
->i_sb
->s_dev
;
248 __entry
->ino
= dir
->i_ino
;
249 __entry
->size
= dir
->i_size
;
250 __entry
->blocks
= dir
->i_blocks
;
251 __entry
->name
= dentry
->d_name
.name
;
254 TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
255 "i_blocks = %llu, name = %s",
256 show_dev_ino(__entry
),
258 (unsigned long long)__entry
->blocks
,
262 DEFINE_EVENT(f2fs__inode_exit
, f2fs_unlink_exit
,
264 TP_PROTO(struct inode
*inode
, int ret
),
269 DEFINE_EVENT(f2fs__inode
, f2fs_truncate
,
271 TP_PROTO(struct inode
*inode
),
276 TRACE_EVENT(f2fs_truncate_data_blocks_range
,
278 TP_PROTO(struct inode
*inode
, nid_t nid
, unsigned int ofs
, int free
),
280 TP_ARGS(inode
, nid
, ofs
, free
),
286 __field(unsigned int, ofs
)
291 __entry
->dev
= inode
->i_sb
->s_dev
;
292 __entry
->ino
= inode
->i_ino
;
295 __entry
->free
= free
;
298 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
299 show_dev_ino(__entry
),
300 (unsigned int)__entry
->nid
,
305 DECLARE_EVENT_CLASS(f2fs__truncate_op
,
307 TP_PROTO(struct inode
*inode
, u64 from
),
309 TP_ARGS(inode
, from
),
314 __field(loff_t
, size
)
315 __field(blkcnt_t
, blocks
)
320 __entry
->dev
= inode
->i_sb
->s_dev
;
321 __entry
->ino
= inode
->i_ino
;
322 __entry
->size
= inode
->i_size
;
323 __entry
->blocks
= inode
->i_blocks
;
324 __entry
->from
= from
;
327 TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
328 "start file offset = %llu",
329 show_dev_ino(__entry
),
331 (unsigned long long)__entry
->blocks
,
332 (unsigned long long)__entry
->from
)
335 DEFINE_EVENT(f2fs__truncate_op
, f2fs_truncate_blocks_enter
,
337 TP_PROTO(struct inode
*inode
, u64 from
),
342 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_blocks_exit
,
344 TP_PROTO(struct inode
*inode
, int ret
),
349 DEFINE_EVENT(f2fs__truncate_op
, f2fs_truncate_inode_blocks_enter
,
351 TP_PROTO(struct inode
*inode
, u64 from
),
356 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_inode_blocks_exit
,
358 TP_PROTO(struct inode
*inode
, int ret
),
363 DECLARE_EVENT_CLASS(f2fs__truncate_node
,
365 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
367 TP_ARGS(inode
, nid
, blk_addr
),
373 __field(block_t
, blk_addr
)
377 __entry
->dev
= inode
->i_sb
->s_dev
;
378 __entry
->ino
= inode
->i_ino
;
380 __entry
->blk_addr
= blk_addr
;
383 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
384 show_dev_ino(__entry
),
385 (unsigned int)__entry
->nid
,
386 (unsigned long long)__entry
->blk_addr
)
389 DEFINE_EVENT(f2fs__truncate_node
, f2fs_truncate_nodes_enter
,
391 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
393 TP_ARGS(inode
, nid
, blk_addr
)
396 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_nodes_exit
,
398 TP_PROTO(struct inode
*inode
, int ret
),
403 DEFINE_EVENT(f2fs__truncate_node
, f2fs_truncate_node
,
405 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
407 TP_ARGS(inode
, nid
, blk_addr
)
410 TRACE_EVENT(f2fs_truncate_partial_nodes
,
412 TP_PROTO(struct inode
*inode
, nid_t nid
[], int depth
, int err
),
414 TP_ARGS(inode
, nid
, depth
, err
),
419 __field(nid_t
, nid
[3])
425 __entry
->dev
= inode
->i_sb
->s_dev
;
426 __entry
->ino
= inode
->i_ino
;
427 __entry
->nid
[0] = nid
[0];
428 __entry
->nid
[1] = nid
[1];
429 __entry
->nid
[2] = nid
[2];
430 __entry
->depth
= depth
;
434 TP_printk("dev = (%d,%d), ino = %lu, "
435 "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
436 show_dev_ino(__entry
),
437 (unsigned int)__entry
->nid
[0],
438 (unsigned int)__entry
->nid
[1],
439 (unsigned int)__entry
->nid
[2],
444 TRACE_EVENT(f2fs_get_data_block
,
445 TP_PROTO(struct inode
*inode
, sector_t iblock
,
446 struct buffer_head
*bh
, int ret
),
448 TP_ARGS(inode
, iblock
, bh
, ret
),
453 __field(sector_t
, iblock
)
454 __field(sector_t
, bh_start
)
455 __field(size_t, bh_size
)
460 __entry
->dev
= inode
->i_sb
->s_dev
;
461 __entry
->ino
= inode
->i_ino
;
462 __entry
->iblock
= iblock
;
463 __entry
->bh_start
= bh
->b_blocknr
;
464 __entry
->bh_size
= bh
->b_size
;
468 TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
469 "start blkaddr = 0x%llx, len = 0x%llx bytes, err = %d",
470 show_dev_ino(__entry
),
471 (unsigned long long)__entry
->iblock
,
472 (unsigned long long)__entry
->bh_start
,
473 (unsigned long long)__entry
->bh_size
,
477 TRACE_EVENT(f2fs_get_victim
,
479 TP_PROTO(struct super_block
*sb
, int type
, int gc_type
,
480 struct victim_sel_policy
*p
, unsigned int pre_victim
,
481 unsigned int prefree
, unsigned int free
),
483 TP_ARGS(sb
, type
, gc_type
, p
, pre_victim
, prefree
, free
),
488 __field(int, gc_type
)
489 __field(int, alloc_mode
)
490 __field(int, gc_mode
)
491 __field(unsigned int, victim
)
492 __field(unsigned int, ofs_unit
)
493 __field(unsigned int, pre_victim
)
494 __field(unsigned int, prefree
)
495 __field(unsigned int, free
)
499 __entry
->dev
= sb
->s_dev
;
500 __entry
->type
= type
;
501 __entry
->gc_type
= gc_type
;
502 __entry
->alloc_mode
= p
->alloc_mode
;
503 __entry
->gc_mode
= p
->gc_mode
;
504 __entry
->victim
= p
->min_segno
;
505 __entry
->ofs_unit
= p
->ofs_unit
;
506 __entry
->pre_victim
= pre_victim
;
507 __entry
->prefree
= prefree
;
508 __entry
->free
= free
;
511 TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), victim = %u "
512 "ofs_unit = %u, pre_victim_secno = %d, prefree = %u, free = %u",
514 show_data_type(__entry
->type
),
515 show_gc_type(__entry
->gc_type
),
516 show_alloc_mode(__entry
->alloc_mode
),
517 show_victim_policy(__entry
->gc_mode
),
520 (int)__entry
->pre_victim
,
525 TRACE_EVENT(f2fs_fallocate
,
527 TP_PROTO(struct inode
*inode
, int mode
,
528 loff_t offset
, loff_t len
, int ret
),
530 TP_ARGS(inode
, mode
, offset
, len
, ret
),
536 __field(loff_t
, offset
)
538 __field(loff_t
, size
)
539 __field(blkcnt_t
, blocks
)
544 __entry
->dev
= inode
->i_sb
->s_dev
;
545 __entry
->ino
= inode
->i_ino
;
546 __entry
->mode
= mode
;
547 __entry
->offset
= offset
;
549 __entry
->size
= inode
->i_size
;
550 __entry
->blocks
= inode
->i_blocks
;
554 TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
555 "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
556 show_dev_ino(__entry
),
558 (unsigned long long)__entry
->offset
,
559 (unsigned long long)__entry
->len
,
560 (unsigned long long)__entry
->size
,
561 (unsigned long long)__entry
->blocks
,
565 TRACE_EVENT(f2fs_direct_IO_enter
,
567 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
569 TP_ARGS(inode
, offset
, len
, rw
),
575 __field(unsigned long, len
)
580 __entry
->dev
= inode
->i_sb
->s_dev
;
581 __entry
->ino
= inode
->i_ino
;
582 __entry
->pos
= offset
;
587 TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu rw = %d",
588 show_dev_ino(__entry
),
594 TRACE_EVENT(f2fs_direct_IO_exit
,
596 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
599 TP_ARGS(inode
, offset
, len
, rw
, ret
),
605 __field(unsigned long, len
)
611 __entry
->dev
= inode
->i_sb
->s_dev
;
612 __entry
->ino
= inode
->i_ino
;
613 __entry
->pos
= offset
;
619 TP_printk("dev = (%d,%d), ino = %lu pos = %lld len = %lu "
621 show_dev_ino(__entry
),
628 TRACE_EVENT(f2fs_reserve_new_block
,
630 TP_PROTO(struct inode
*inode
, nid_t nid
, unsigned int ofs_in_node
),
632 TP_ARGS(inode
, nid
, ofs_in_node
),
637 __field(unsigned int, ofs_in_node
)
641 __entry
->dev
= inode
->i_sb
->s_dev
;
643 __entry
->ofs_in_node
= ofs_in_node
;
646 TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u",
648 (unsigned int)__entry
->nid
,
649 __entry
->ofs_in_node
)
652 DECLARE_EVENT_CLASS(f2fs__submit_page_bio
,
654 TP_PROTO(struct page
*page
, struct f2fs_io_info
*fio
),
661 __field(pgoff_t
, index
)
662 __field(block_t
, blkaddr
)
668 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
669 __entry
->ino
= page
->mapping
->host
->i_ino
;
670 __entry
->index
= page
->index
;
671 __entry
->blkaddr
= fio
->blk_addr
;
672 __entry
->rw
= fio
->rw
;
673 __entry
->type
= fio
->type
;
676 TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
677 "blkaddr = 0x%llx, rw = %s%s, type = %s",
678 show_dev_ino(__entry
),
679 (unsigned long)__entry
->index
,
680 (unsigned long long)__entry
->blkaddr
,
681 show_bio_type(__entry
->rw
),
682 show_block_type(__entry
->type
))
685 DEFINE_EVENT_CONDITION(f2fs__submit_page_bio
, f2fs_submit_page_bio
,
687 TP_PROTO(struct page
*page
, struct f2fs_io_info
*fio
),
691 TP_CONDITION(page
->mapping
)
694 DEFINE_EVENT_CONDITION(f2fs__submit_page_bio
, f2fs_submit_page_mbio
,
696 TP_PROTO(struct page
*page
, struct f2fs_io_info
*fio
),
700 TP_CONDITION(page
->mapping
)
703 DECLARE_EVENT_CLASS(f2fs__submit_bio
,
705 TP_PROTO(struct super_block
*sb
, struct f2fs_io_info
*fio
,
708 TP_ARGS(sb
, fio
, bio
),
714 __field(sector_t
, sector
)
715 __field(unsigned int, size
)
719 __entry
->dev
= sb
->s_dev
;
720 __entry
->rw
= fio
->rw
;
721 __entry
->type
= fio
->type
;
722 __entry
->sector
= bio
->bi_iter
.bi_sector
;
723 __entry
->size
= bio
->bi_iter
.bi_size
;
726 TP_printk("dev = (%d,%d), %s%s, %s, sector = %lld, size = %u",
728 show_bio_type(__entry
->rw
),
729 show_block_type(__entry
->type
),
730 (unsigned long long)__entry
->sector
,
734 DEFINE_EVENT_CONDITION(f2fs__submit_bio
, f2fs_submit_write_bio
,
736 TP_PROTO(struct super_block
*sb
, struct f2fs_io_info
*fio
,
739 TP_ARGS(sb
, fio
, bio
),
744 DEFINE_EVENT_CONDITION(f2fs__submit_bio
, f2fs_submit_read_bio
,
746 TP_PROTO(struct super_block
*sb
, struct f2fs_io_info
*fio
,
749 TP_ARGS(sb
, fio
, bio
),
754 TRACE_EVENT(f2fs_write_begin
,
756 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
759 TP_ARGS(inode
, pos
, len
, flags
),
765 __field(unsigned int, len
)
766 __field(unsigned int, flags
)
770 __entry
->dev
= inode
->i_sb
->s_dev
;
771 __entry
->ino
= inode
->i_ino
;
774 __entry
->flags
= flags
;
777 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
778 show_dev_ino(__entry
),
779 (unsigned long long)__entry
->pos
,
784 TRACE_EVENT(f2fs_write_end
,
786 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
787 unsigned int copied
),
789 TP_ARGS(inode
, pos
, len
, copied
),
795 __field(unsigned int, len
)
796 __field(unsigned int, copied
)
800 __entry
->dev
= inode
->i_sb
->s_dev
;
801 __entry
->ino
= inode
->i_ino
;
804 __entry
->copied
= copied
;
807 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
808 show_dev_ino(__entry
),
809 (unsigned long long)__entry
->pos
,
814 DECLARE_EVENT_CLASS(f2fs__page
,
816 TP_PROTO(struct page
*page
, int type
),
825 __field(pgoff_t
, index
)
827 __field(int, uptodate
)
831 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
832 __entry
->ino
= page
->mapping
->host
->i_ino
;
833 __entry
->type
= type
;
834 __entry
->dir
= S_ISDIR(page
->mapping
->host
->i_mode
);
835 __entry
->index
= page
->index
;
836 __entry
->dirty
= PageDirty(page
);
837 __entry
->uptodate
= PageUptodate(page
);
840 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
841 "dirty = %d, uptodate = %d",
842 show_dev_ino(__entry
),
843 show_block_type(__entry
->type
),
844 show_file_type(__entry
->dir
),
845 (unsigned long)__entry
->index
,
850 DEFINE_EVENT(f2fs__page
, f2fs_writepage
,
852 TP_PROTO(struct page
*page
, int type
),
857 DEFINE_EVENT(f2fs__page
, f2fs_readpage
,
859 TP_PROTO(struct page
*page
, int type
),
864 DEFINE_EVENT(f2fs__page
, f2fs_set_page_dirty
,
866 TP_PROTO(struct page
*page
, int type
),
871 DEFINE_EVENT(f2fs__page
, f2fs_vm_page_mkwrite
,
873 TP_PROTO(struct page
*page
, int type
),
878 TRACE_EVENT(f2fs_writepages
,
880 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
, int type
),
882 TP_ARGS(inode
, wbc
, type
),
889 __field(long, nr_to_write
)
890 __field(long, pages_skipped
)
891 __field(loff_t
, range_start
)
892 __field(loff_t
, range_end
)
893 __field(pgoff_t
, writeback_index
)
894 __field(int, sync_mode
)
895 __field(char, for_kupdate
)
896 __field(char, for_background
)
897 __field(char, tagged_writepages
)
898 __field(char, for_reclaim
)
899 __field(char, range_cyclic
)
900 __field(char, for_sync
)
904 __entry
->dev
= inode
->i_sb
->s_dev
;
905 __entry
->ino
= inode
->i_ino
;
906 __entry
->type
= type
;
907 __entry
->dir
= S_ISDIR(inode
->i_mode
);
908 __entry
->nr_to_write
= wbc
->nr_to_write
;
909 __entry
->pages_skipped
= wbc
->pages_skipped
;
910 __entry
->range_start
= wbc
->range_start
;
911 __entry
->range_end
= wbc
->range_end
;
912 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
913 __entry
->sync_mode
= wbc
->sync_mode
;
914 __entry
->for_kupdate
= wbc
->for_kupdate
;
915 __entry
->for_background
= wbc
->for_background
;
916 __entry
->tagged_writepages
= wbc
->tagged_writepages
;
917 __entry
->for_reclaim
= wbc
->for_reclaim
;
918 __entry
->range_cyclic
= wbc
->range_cyclic
;
919 __entry
->for_sync
= wbc
->for_sync
;
922 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
923 "skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
924 "kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
925 show_dev_ino(__entry
),
926 show_block_type(__entry
->type
),
927 show_file_type(__entry
->dir
),
928 __entry
->nr_to_write
,
929 __entry
->pages_skipped
,
930 __entry
->range_start
,
932 (unsigned long)__entry
->writeback_index
,
934 __entry
->for_kupdate
,
935 __entry
->for_background
,
936 __entry
->tagged_writepages
,
937 __entry
->for_reclaim
,
938 __entry
->range_cyclic
,
942 TRACE_EVENT(f2fs_write_checkpoint
,
944 TP_PROTO(struct super_block
*sb
, int reason
, char *msg
),
946 TP_ARGS(sb
, reason
, msg
),
955 __entry
->dev
= sb
->s_dev
;
956 __entry
->reason
= reason
;
960 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
962 show_cpreason(__entry
->reason
),
966 TRACE_EVENT(f2fs_issue_discard
,
968 TP_PROTO(struct super_block
*sb
, block_t blkstart
, block_t blklen
),
970 TP_ARGS(sb
, blkstart
, blklen
),
974 __field(block_t
, blkstart
)
975 __field(block_t
, blklen
)
979 __entry
->dev
= sb
->s_dev
;
980 __entry
->blkstart
= blkstart
;
981 __entry
->blklen
= blklen
;
984 TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
986 (unsigned long long)__entry
->blkstart
,
987 (unsigned long long)__entry
->blklen
)
990 TRACE_EVENT(f2fs_issue_flush
,
992 TP_PROTO(struct super_block
*sb
, bool nobarrier
, bool flush_merge
),
994 TP_ARGS(sb
, nobarrier
, flush_merge
),
998 __field(bool, nobarrier
)
999 __field(bool, flush_merge
)
1003 __entry
->dev
= sb
->s_dev
;
1004 __entry
->nobarrier
= nobarrier
;
1005 __entry
->flush_merge
= flush_merge
;
1008 TP_printk("dev = (%d,%d), %s %s",
1010 __entry
->nobarrier
? "skip (nobarrier)" : "issue",
1011 __entry
->flush_merge
? " with flush_merge" : "")
1013 #endif /* _TRACE_F2FS_H */
1015 /* This part must be outside protection */
1016 #include <trace/define_trace.h>