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 struct victim_sel_policy
;
74 DECLARE_EVENT_CLASS(f2fs__inode
,
76 TP_PROTO(struct inode
*inode
),
84 __field(umode_t
, mode
)
86 __field(unsigned int, nlink
)
87 __field(blkcnt_t
, blocks
)
92 __entry
->dev
= inode
->i_sb
->s_dev
;
93 __entry
->ino
= inode
->i_ino
;
94 __entry
->pino
= F2FS_I(inode
)->i_pino
;
95 __entry
->mode
= inode
->i_mode
;
96 __entry
->nlink
= inode
->i_nlink
;
97 __entry
->size
= inode
->i_size
;
98 __entry
->blocks
= inode
->i_blocks
;
99 __entry
->advise
= F2FS_I(inode
)->i_advise
;
102 TP_printk("dev = (%d,%d), ino = %lu, pino = %lu, i_mode = 0x%hx, "
103 "i_size = %lld, i_nlink = %u, i_blocks = %llu, i_advise = 0x%x",
104 show_dev_ino(__entry
),
105 (unsigned long)__entry
->pino
,
108 (unsigned int)__entry
->nlink
,
109 (unsigned long long)__entry
->blocks
,
110 (unsigned char)__entry
->advise
)
113 DECLARE_EVENT_CLASS(f2fs__inode_exit
,
115 TP_PROTO(struct inode
*inode
, int ret
),
126 __entry
->dev
= inode
->i_sb
->s_dev
;
127 __entry
->ino
= inode
->i_ino
;
131 TP_printk("dev = (%d,%d), ino = %lu, ret = %d",
132 show_dev_ino(__entry
),
136 DEFINE_EVENT(f2fs__inode
, f2fs_sync_file_enter
,
138 TP_PROTO(struct inode
*inode
),
143 TRACE_EVENT(f2fs_sync_file_exit
,
145 TP_PROTO(struct inode
*inode
, bool need_cp
, int datasync
, int ret
),
147 TP_ARGS(inode
, need_cp
, datasync
, ret
),
152 __field(bool, need_cp
)
153 __field(int, datasync
)
158 __entry
->dev
= inode
->i_sb
->s_dev
;
159 __entry
->ino
= inode
->i_ino
;
160 __entry
->need_cp
= need_cp
;
161 __entry
->datasync
= datasync
;
165 TP_printk("dev = (%d,%d), ino = %lu, checkpoint is %s, "
166 "datasync = %d, ret = %d",
167 show_dev_ino(__entry
),
168 __entry
->need_cp
? "needed" : "not needed",
173 TRACE_EVENT(f2fs_sync_fs
,
175 TP_PROTO(struct super_block
*sb
, int wait
),
186 __entry
->dev
= sb
->s_dev
;
187 __entry
->dirty
= F2FS_SB(sb
)->s_dirty
;
188 __entry
->wait
= wait
;
191 TP_printk("dev = (%d,%d), superblock is %s, wait = %d",
193 __entry
->dirty
? "dirty" : "not dirty",
197 DEFINE_EVENT(f2fs__inode
, f2fs_iget
,
199 TP_PROTO(struct inode
*inode
),
204 DEFINE_EVENT(f2fs__inode_exit
, f2fs_iget_exit
,
206 TP_PROTO(struct inode
*inode
, int ret
),
211 DEFINE_EVENT(f2fs__inode
, f2fs_evict_inode
,
213 TP_PROTO(struct inode
*inode
),
218 DEFINE_EVENT(f2fs__inode_exit
, f2fs_new_inode
,
220 TP_PROTO(struct inode
*inode
, int ret
),
225 TRACE_EVENT(f2fs_unlink_enter
,
227 TP_PROTO(struct inode
*dir
, struct dentry
*dentry
),
229 TP_ARGS(dir
, dentry
),
234 __field(loff_t
, size
)
235 __field(blkcnt_t
, blocks
)
236 __field(const char *, name
)
240 __entry
->dev
= dir
->i_sb
->s_dev
;
241 __entry
->ino
= dir
->i_ino
;
242 __entry
->size
= dir
->i_size
;
243 __entry
->blocks
= dir
->i_blocks
;
244 __entry
->name
= dentry
->d_name
.name
;
247 TP_printk("dev = (%d,%d), dir ino = %lu, i_size = %lld, "
248 "i_blocks = %llu, name = %s",
249 show_dev_ino(__entry
),
251 (unsigned long long)__entry
->blocks
,
255 DEFINE_EVENT(f2fs__inode_exit
, f2fs_unlink_exit
,
257 TP_PROTO(struct inode
*inode
, int ret
),
262 DEFINE_EVENT(f2fs__inode
, f2fs_truncate
,
264 TP_PROTO(struct inode
*inode
),
269 TRACE_EVENT(f2fs_truncate_data_blocks_range
,
271 TP_PROTO(struct inode
*inode
, nid_t nid
, unsigned int ofs
, int free
),
273 TP_ARGS(inode
, nid
, ofs
, free
),
279 __field(unsigned int, ofs
)
284 __entry
->dev
= inode
->i_sb
->s_dev
;
285 __entry
->ino
= inode
->i_ino
;
288 __entry
->free
= free
;
291 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, offset = %u, freed = %d",
292 show_dev_ino(__entry
),
293 (unsigned int)__entry
->nid
,
298 DECLARE_EVENT_CLASS(f2fs__truncate_op
,
300 TP_PROTO(struct inode
*inode
, u64 from
),
302 TP_ARGS(inode
, from
),
307 __field(loff_t
, size
)
308 __field(blkcnt_t
, blocks
)
313 __entry
->dev
= inode
->i_sb
->s_dev
;
314 __entry
->ino
= inode
->i_ino
;
315 __entry
->size
= inode
->i_size
;
316 __entry
->blocks
= inode
->i_blocks
;
317 __entry
->from
= from
;
320 TP_printk("dev = (%d,%d), ino = %lu, i_size = %lld, i_blocks = %llu, "
321 "start file offset = %llu",
322 show_dev_ino(__entry
),
324 (unsigned long long)__entry
->blocks
,
325 (unsigned long long)__entry
->from
)
328 DEFINE_EVENT(f2fs__truncate_op
, f2fs_truncate_blocks_enter
,
330 TP_PROTO(struct inode
*inode
, u64 from
),
335 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_blocks_exit
,
337 TP_PROTO(struct inode
*inode
, int ret
),
342 DEFINE_EVENT(f2fs__truncate_op
, f2fs_truncate_inode_blocks_enter
,
344 TP_PROTO(struct inode
*inode
, u64 from
),
349 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_inode_blocks_exit
,
351 TP_PROTO(struct inode
*inode
, int ret
),
356 DECLARE_EVENT_CLASS(f2fs__truncate_node
,
358 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
360 TP_ARGS(inode
, nid
, blk_addr
),
366 __field(block_t
, blk_addr
)
370 __entry
->dev
= inode
->i_sb
->s_dev
;
371 __entry
->ino
= inode
->i_ino
;
373 __entry
->blk_addr
= blk_addr
;
376 TP_printk("dev = (%d,%d), ino = %lu, nid = %u, block_address = 0x%llx",
377 show_dev_ino(__entry
),
378 (unsigned int)__entry
->nid
,
379 (unsigned long long)__entry
->blk_addr
)
382 DEFINE_EVENT(f2fs__truncate_node
, f2fs_truncate_nodes_enter
,
384 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
386 TP_ARGS(inode
, nid
, blk_addr
)
389 DEFINE_EVENT(f2fs__inode_exit
, f2fs_truncate_nodes_exit
,
391 TP_PROTO(struct inode
*inode
, int ret
),
396 DEFINE_EVENT(f2fs__truncate_node
, f2fs_truncate_node
,
398 TP_PROTO(struct inode
*inode
, nid_t nid
, block_t blk_addr
),
400 TP_ARGS(inode
, nid
, blk_addr
)
403 TRACE_EVENT(f2fs_truncate_partial_nodes
,
405 TP_PROTO(struct inode
*inode
, nid_t nid
[], int depth
, int err
),
407 TP_ARGS(inode
, nid
, depth
, err
),
412 __field(nid_t
, nid
[3])
418 __entry
->dev
= inode
->i_sb
->s_dev
;
419 __entry
->ino
= inode
->i_ino
;
420 __entry
->nid
[0] = nid
[0];
421 __entry
->nid
[1] = nid
[1];
422 __entry
->nid
[2] = nid
[2];
423 __entry
->depth
= depth
;
427 TP_printk("dev = (%d,%d), ino = %lu, "
428 "nid[0] = %u, nid[1] = %u, nid[2] = %u, depth = %d, err = %d",
429 show_dev_ino(__entry
),
430 (unsigned int)__entry
->nid
[0],
431 (unsigned int)__entry
->nid
[1],
432 (unsigned int)__entry
->nid
[2],
437 TRACE_EVENT_CONDITION(f2fs_submit_page_bio
,
439 TP_PROTO(struct page
*page
, sector_t blkaddr
, int type
),
441 TP_ARGS(page
, blkaddr
, type
),
443 TP_CONDITION(page
->mapping
),
448 __field(pgoff_t
, index
)
449 __field(sector_t
, blkaddr
)
454 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
455 __entry
->ino
= page
->mapping
->host
->i_ino
;
456 __entry
->index
= page
->index
;
457 __entry
->blkaddr
= blkaddr
;
458 __entry
->type
= type
;
461 TP_printk("dev = (%d,%d), ino = %lu, page_index = 0x%lx, "
462 "blkaddr = 0x%llx, bio_type = %s%s",
463 show_dev_ino(__entry
),
464 (unsigned long)__entry
->index
,
465 (unsigned long long)__entry
->blkaddr
,
466 show_bio_type(__entry
->type
))
469 TRACE_EVENT(f2fs_get_data_block
,
470 TP_PROTO(struct inode
*inode
, sector_t iblock
,
471 struct buffer_head
*bh
, int ret
),
473 TP_ARGS(inode
, iblock
, bh
, ret
),
478 __field(sector_t
, iblock
)
479 __field(sector_t
, bh_start
)
480 __field(size_t, bh_size
)
485 __entry
->dev
= inode
->i_sb
->s_dev
;
486 __entry
->ino
= inode
->i_ino
;
487 __entry
->iblock
= iblock
;
488 __entry
->bh_start
= bh
->b_blocknr
;
489 __entry
->bh_size
= bh
->b_size
;
493 TP_printk("dev = (%d,%d), ino = %lu, file offset = %llu, "
494 "start blkaddr = 0x%llx, len = 0x%llx bytes, err = %d",
495 show_dev_ino(__entry
),
496 (unsigned long long)__entry
->iblock
,
497 (unsigned long long)__entry
->bh_start
,
498 (unsigned long long)__entry
->bh_size
,
502 TRACE_EVENT(f2fs_get_victim
,
504 TP_PROTO(struct super_block
*sb
, int type
, int gc_type
,
505 struct victim_sel_policy
*p
, unsigned int pre_victim
,
506 unsigned int prefree
, unsigned int free
),
508 TP_ARGS(sb
, type
, gc_type
, p
, pre_victim
, prefree
, free
),
513 __field(int, gc_type
)
514 __field(int, alloc_mode
)
515 __field(int, gc_mode
)
516 __field(unsigned int, victim
)
517 __field(unsigned int, ofs_unit
)
518 __field(unsigned int, pre_victim
)
519 __field(unsigned int, prefree
)
520 __field(unsigned int, free
)
524 __entry
->dev
= sb
->s_dev
;
525 __entry
->type
= type
;
526 __entry
->gc_type
= gc_type
;
527 __entry
->alloc_mode
= p
->alloc_mode
;
528 __entry
->gc_mode
= p
->gc_mode
;
529 __entry
->victim
= p
->min_segno
;
530 __entry
->ofs_unit
= p
->ofs_unit
;
531 __entry
->pre_victim
= pre_victim
;
532 __entry
->prefree
= prefree
;
533 __entry
->free
= free
;
536 TP_printk("dev = (%d,%d), type = %s, policy = (%s, %s, %s), victim = %u "
537 "ofs_unit = %u, pre_victim_secno = %d, prefree = %u, free = %u",
539 show_data_type(__entry
->type
),
540 show_gc_type(__entry
->gc_type
),
541 show_alloc_mode(__entry
->alloc_mode
),
542 show_victim_policy(__entry
->gc_mode
),
545 (int)__entry
->pre_victim
,
550 TRACE_EVENT(f2fs_fallocate
,
552 TP_PROTO(struct inode
*inode
, int mode
,
553 loff_t offset
, loff_t len
, int ret
),
555 TP_ARGS(inode
, mode
, offset
, len
, ret
),
561 __field(loff_t
, offset
)
563 __field(loff_t
, size
)
564 __field(blkcnt_t
, blocks
)
569 __entry
->dev
= inode
->i_sb
->s_dev
;
570 __entry
->ino
= inode
->i_ino
;
571 __entry
->mode
= mode
;
572 __entry
->offset
= offset
;
574 __entry
->size
= inode
->i_size
;
575 __entry
->blocks
= inode
->i_blocks
;
579 TP_printk("dev = (%d,%d), ino = %lu, mode = %x, offset = %lld, "
580 "len = %lld, i_size = %lld, i_blocks = %llu, ret = %d",
581 show_dev_ino(__entry
),
583 (unsigned long long)__entry
->offset
,
584 (unsigned long long)__entry
->len
,
585 (unsigned long long)__entry
->size
,
586 (unsigned long long)__entry
->blocks
,
590 TRACE_EVENT(f2fs_reserve_new_block
,
592 TP_PROTO(struct inode
*inode
, nid_t nid
, unsigned int ofs_in_node
),
594 TP_ARGS(inode
, nid
, ofs_in_node
),
599 __field(unsigned int, ofs_in_node
)
603 __entry
->dev
= inode
->i_sb
->s_dev
;
605 __entry
->ofs_in_node
= ofs_in_node
;
608 TP_printk("dev = (%d,%d), nid = %u, ofs_in_node = %u",
610 (unsigned int)__entry
->nid
,
611 __entry
->ofs_in_node
)
614 DECLARE_EVENT_CLASS(f2fs__submit_bio
,
616 TP_PROTO(struct super_block
*sb
, int rw
, int type
, struct bio
*bio
),
618 TP_ARGS(sb
, rw
, type
, bio
),
624 __field(sector_t
, sector
)
625 __field(unsigned int, size
)
629 __entry
->dev
= sb
->s_dev
;
631 __entry
->type
= type
;
632 __entry
->sector
= bio
->bi_iter
.bi_sector
;
633 __entry
->size
= bio
->bi_iter
.bi_size
;
636 TP_printk("dev = (%d,%d), %s%s, %s, sector = %lld, size = %u",
638 show_bio_type(__entry
->rw
),
639 show_block_type(__entry
->type
),
640 (unsigned long long)__entry
->sector
,
644 DEFINE_EVENT_CONDITION(f2fs__submit_bio
, f2fs_submit_write_bio
,
646 TP_PROTO(struct super_block
*sb
, int rw
, int type
, struct bio
*bio
),
648 TP_ARGS(sb
, rw
, type
, bio
),
653 DEFINE_EVENT_CONDITION(f2fs__submit_bio
, f2fs_submit_read_bio
,
655 TP_PROTO(struct super_block
*sb
, int rw
, int type
, struct bio
*bio
),
657 TP_ARGS(sb
, rw
, type
, bio
),
662 TRACE_EVENT(f2fs_write_begin
,
664 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
667 TP_ARGS(inode
, pos
, len
, flags
),
673 __field(unsigned int, len
)
674 __field(unsigned int, flags
)
678 __entry
->dev
= inode
->i_sb
->s_dev
;
679 __entry
->ino
= inode
->i_ino
;
682 __entry
->flags
= flags
;
685 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, flags = %u",
686 show_dev_ino(__entry
),
687 (unsigned long long)__entry
->pos
,
692 TRACE_EVENT(f2fs_write_end
,
694 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
695 unsigned int copied
),
697 TP_ARGS(inode
, pos
, len
, copied
),
703 __field(unsigned int, len
)
704 __field(unsigned int, copied
)
708 __entry
->dev
= inode
->i_sb
->s_dev
;
709 __entry
->ino
= inode
->i_ino
;
712 __entry
->copied
= copied
;
715 TP_printk("dev = (%d,%d), ino = %lu, pos = %llu, len = %u, copied = %u",
716 show_dev_ino(__entry
),
717 (unsigned long long)__entry
->pos
,
722 DECLARE_EVENT_CLASS(f2fs__page
,
724 TP_PROTO(struct page
*page
, int type
),
733 __field(pgoff_t
, index
)
735 __field(int, uptodate
)
739 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
740 __entry
->ino
= page
->mapping
->host
->i_ino
;
741 __entry
->type
= type
;
742 __entry
->dir
= S_ISDIR(page
->mapping
->host
->i_mode
);
743 __entry
->index
= page
->index
;
744 __entry
->dirty
= PageDirty(page
);
745 __entry
->uptodate
= PageUptodate(page
);
748 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, index = %lu, "
749 "dirty = %d, uptodate = %d",
750 show_dev_ino(__entry
),
751 show_block_type(__entry
->type
),
752 show_file_type(__entry
->dir
),
753 (unsigned long)__entry
->index
,
758 DEFINE_EVENT(f2fs__page
, f2fs_writepage
,
760 TP_PROTO(struct page
*page
, int type
),
765 DEFINE_EVENT(f2fs__page
, f2fs_readpage
,
767 TP_PROTO(struct page
*page
, int type
),
772 DEFINE_EVENT(f2fs__page
, f2fs_set_page_dirty
,
774 TP_PROTO(struct page
*page
, int type
),
779 DEFINE_EVENT(f2fs__page
, f2fs_vm_page_mkwrite
,
781 TP_PROTO(struct page
*page
, int type
),
786 TRACE_EVENT(f2fs_writepages
,
788 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
, int type
),
790 TP_ARGS(inode
, wbc
, type
),
797 __field(long, nr_to_write
)
798 __field(long, pages_skipped
)
799 __field(loff_t
, range_start
)
800 __field(loff_t
, range_end
)
801 __field(pgoff_t
, writeback_index
)
802 __field(int, sync_mode
)
803 __field(char, for_kupdate
)
804 __field(char, for_background
)
805 __field(char, tagged_writepages
)
806 __field(char, for_reclaim
)
807 __field(char, range_cyclic
)
808 __field(char, for_sync
)
812 __entry
->dev
= inode
->i_sb
->s_dev
;
813 __entry
->ino
= inode
->i_ino
;
814 __entry
->type
= type
;
815 __entry
->dir
= S_ISDIR(inode
->i_mode
);
816 __entry
->nr_to_write
= wbc
->nr_to_write
;
817 __entry
->pages_skipped
= wbc
->pages_skipped
;
818 __entry
->range_start
= wbc
->range_start
;
819 __entry
->range_end
= wbc
->range_end
;
820 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
821 __entry
->sync_mode
= wbc
->sync_mode
;
822 __entry
->for_kupdate
= wbc
->for_kupdate
;
823 __entry
->for_background
= wbc
->for_background
;
824 __entry
->tagged_writepages
= wbc
->tagged_writepages
;
825 __entry
->for_reclaim
= wbc
->for_reclaim
;
826 __entry
->range_cyclic
= wbc
->range_cyclic
;
827 __entry
->for_sync
= wbc
->for_sync
;
830 TP_printk("dev = (%d,%d), ino = %lu, %s, %s, nr_to_write %ld, "
831 "skipped %ld, start %lld, end %lld, wb_idx %lu, sync_mode %d, "
832 "kupdate %u background %u tagged %u reclaim %u cyclic %u sync %u",
833 show_dev_ino(__entry
),
834 show_block_type(__entry
->type
),
835 show_file_type(__entry
->dir
),
836 __entry
->nr_to_write
,
837 __entry
->pages_skipped
,
838 __entry
->range_start
,
840 (unsigned long)__entry
->writeback_index
,
842 __entry
->for_kupdate
,
843 __entry
->for_background
,
844 __entry
->tagged_writepages
,
845 __entry
->for_reclaim
,
846 __entry
->range_cyclic
,
850 TRACE_EVENT(f2fs_submit_page_mbio
,
852 TP_PROTO(struct page
*page
, int rw
, int type
, block_t blk_addr
),
854 TP_ARGS(page
, rw
, type
, blk_addr
),
861 __field(pgoff_t
, index
)
862 __field(block_t
, block
)
866 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
867 __entry
->ino
= page
->mapping
->host
->i_ino
;
869 __entry
->type
= type
;
870 __entry
->index
= page
->index
;
871 __entry
->block
= blk_addr
;
874 TP_printk("dev = (%d,%d), ino = %lu, %s%s, %s, index = %lu, blkaddr = 0x%llx",
875 show_dev_ino(__entry
),
876 show_bio_type(__entry
->rw
),
877 show_block_type(__entry
->type
),
878 (unsigned long)__entry
->index
,
879 (unsigned long long)__entry
->block
)
882 TRACE_EVENT(f2fs_write_checkpoint
,
884 TP_PROTO(struct super_block
*sb
, bool is_umount
, char *msg
),
886 TP_ARGS(sb
, is_umount
, msg
),
890 __field(bool, is_umount
)
895 __entry
->dev
= sb
->s_dev
;
896 __entry
->is_umount
= is_umount
;
900 TP_printk("dev = (%d,%d), checkpoint for %s, state = %s",
902 __entry
->is_umount
? "clean umount" : "consistency",
906 TRACE_EVENT(f2fs_issue_discard
,
908 TP_PROTO(struct super_block
*sb
, block_t blkstart
, block_t blklen
),
910 TP_ARGS(sb
, blkstart
, blklen
),
914 __field(block_t
, blkstart
)
915 __field(block_t
, blklen
)
919 __entry
->dev
= sb
->s_dev
;
920 __entry
->blkstart
= blkstart
;
921 __entry
->blklen
= blklen
;
924 TP_printk("dev = (%d,%d), blkstart = 0x%llx, blklen = 0x%llx",
926 (unsigned long long)__entry
->blkstart
,
927 (unsigned long long)__entry
->blklen
)
930 TRACE_EVENT(f2fs_issue_flush
,
932 TP_PROTO(struct super_block
*sb
, bool nobarrier
, bool flush_merge
),
934 TP_ARGS(sb
, nobarrier
, flush_merge
),
938 __field(bool, nobarrier
)
939 __field(bool, flush_merge
)
943 __entry
->dev
= sb
->s_dev
;
944 __entry
->nobarrier
= nobarrier
;
945 __entry
->flush_merge
= flush_merge
;
948 TP_printk("dev = (%d,%d), %s %s",
950 __entry
->nobarrier
? "skip (nobarrier)" : "issue",
951 __entry
->flush_merge
? " with flush_merge" : "")
953 #endif /* _TRACE_F2FS_H */
955 /* This part must be outside protection */
956 #include <trace/define_trace.h>