2 #define TRACE_SYSTEM ext4
4 #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
7 #include <linux/writeback.h>
8 #include <linux/tracepoint.h>
10 struct ext4_allocation_context
;
11 struct ext4_allocation_request
;
13 struct ext4_prealloc_space
;
14 struct ext4_inode_info
;
16 struct ext4_map_blocks
;
20 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
22 #define show_mballoc_flags(flags) __print_flags(flags, "|", \
23 { EXT4_MB_HINT_MERGE, "HINT_MERGE" }, \
24 { EXT4_MB_HINT_RESERVED, "HINT_RESV" }, \
25 { EXT4_MB_HINT_METADATA, "HINT_MDATA" }, \
26 { EXT4_MB_HINT_FIRST, "HINT_FIRST" }, \
27 { EXT4_MB_HINT_BEST, "HINT_BEST" }, \
28 { EXT4_MB_HINT_DATA, "HINT_DATA" }, \
29 { EXT4_MB_HINT_NOPREALLOC, "HINT_NOPREALLOC" }, \
30 { EXT4_MB_HINT_GROUP_ALLOC, "HINT_GRP_ALLOC" }, \
31 { EXT4_MB_HINT_GOAL_ONLY, "HINT_GOAL_ONLY" }, \
32 { EXT4_MB_HINT_TRY_GOAL, "HINT_TRY_GOAL" }, \
33 { EXT4_MB_DELALLOC_RESERVED, "DELALLOC_RESV" }, \
34 { EXT4_MB_STREAM_ALLOC, "STREAM_ALLOC" }, \
35 { EXT4_MB_USE_ROOT_BLOCKS, "USE_ROOT_BLKS" }, \
36 { EXT4_MB_USE_RESERVED, "USE_RESV" })
38 #define show_map_flags(flags) __print_flags(flags, "|", \
39 { EXT4_GET_BLOCKS_CREATE, "CREATE" }, \
40 { EXT4_GET_BLOCKS_UNWRIT_EXT, "UNWRIT" }, \
41 { EXT4_GET_BLOCKS_DELALLOC_RESERVE, "DELALLOC" }, \
42 { EXT4_GET_BLOCKS_PRE_IO, "PRE_IO" }, \
43 { EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \
44 { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \
45 { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \
46 { EXT4_GET_BLOCKS_KEEP_SIZE, "KEEP_SIZE" }, \
47 { EXT4_GET_BLOCKS_ZERO, "ZERO" })
49 #define show_mflags(flags) __print_flags(flags, "", \
50 { EXT4_MAP_NEW, "N" }, \
51 { EXT4_MAP_MAPPED, "M" }, \
52 { EXT4_MAP_UNWRITTEN, "U" }, \
53 { EXT4_MAP_BOUNDARY, "B" })
55 #define show_free_flags(flags) __print_flags(flags, "|", \
56 { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \
57 { EXT4_FREE_BLOCKS_FORGET, "FORGET" }, \
58 { EXT4_FREE_BLOCKS_VALIDATED, "VALIDATED" }, \
59 { EXT4_FREE_BLOCKS_NO_QUOT_UPDATE, "NO_QUOTA" }, \
60 { EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER,"1ST_CLUSTER" },\
61 { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" })
63 #define show_extent_status(status) __print_flags(status, "", \
64 { EXTENT_STATUS_WRITTEN, "W" }, \
65 { EXTENT_STATUS_UNWRITTEN, "U" }, \
66 { EXTENT_STATUS_DELAYED, "D" }, \
67 { EXTENT_STATUS_HOLE, "H" })
69 #define show_falloc_mode(mode) __print_flags(mode, "|", \
70 { FALLOC_FL_KEEP_SIZE, "KEEP_SIZE"}, \
71 { FALLOC_FL_PUNCH_HOLE, "PUNCH_HOLE"}, \
72 { FALLOC_FL_NO_HIDE_STALE, "NO_HIDE_STALE"}, \
73 { FALLOC_FL_COLLAPSE_RANGE, "COLLAPSE_RANGE"}, \
74 { FALLOC_FL_ZERO_RANGE, "ZERO_RANGE"})
77 TRACE_EVENT(ext4_other_inode_update_time
,
78 TP_PROTO(struct inode
*inode
, ino_t orig_ino
),
80 TP_ARGS(inode
, orig_ino
),
85 __field( ino_t
, orig_ino
)
88 __field( __u16
, mode
)
92 __entry
->orig_ino
= orig_ino
;
93 __entry
->dev
= inode
->i_sb
->s_dev
;
94 __entry
->ino
= inode
->i_ino
;
95 __entry
->uid
= i_uid_read(inode
);
96 __entry
->gid
= i_gid_read(inode
);
97 __entry
->mode
= inode
->i_mode
;
100 TP_printk("dev %d,%d orig_ino %lu ino %lu mode 0%o uid %u gid %u",
101 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
102 (unsigned long) __entry
->orig_ino
,
103 (unsigned long) __entry
->ino
, __entry
->mode
,
104 __entry
->uid
, __entry
->gid
)
107 TRACE_EVENT(ext4_free_inode
,
108 TP_PROTO(struct inode
*inode
),
113 __field( dev_t
, dev
)
114 __field( ino_t
, ino
)
115 __field( uid_t
, uid
)
116 __field( gid_t
, gid
)
117 __field( __u64
, blocks
)
118 __field( __u16
, mode
)
122 __entry
->dev
= inode
->i_sb
->s_dev
;
123 __entry
->ino
= inode
->i_ino
;
124 __entry
->uid
= i_uid_read(inode
);
125 __entry
->gid
= i_gid_read(inode
);
126 __entry
->blocks
= inode
->i_blocks
;
127 __entry
->mode
= inode
->i_mode
;
130 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
131 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
132 (unsigned long) __entry
->ino
, __entry
->mode
,
133 __entry
->uid
, __entry
->gid
, __entry
->blocks
)
136 TRACE_EVENT(ext4_request_inode
,
137 TP_PROTO(struct inode
*dir
, int mode
),
142 __field( dev_t
, dev
)
143 __field( ino_t
, dir
)
144 __field( __u16
, mode
)
148 __entry
->dev
= dir
->i_sb
->s_dev
;
149 __entry
->dir
= dir
->i_ino
;
150 __entry
->mode
= mode
;
153 TP_printk("dev %d,%d dir %lu mode 0%o",
154 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
155 (unsigned long) __entry
->dir
, __entry
->mode
)
158 TRACE_EVENT(ext4_allocate_inode
,
159 TP_PROTO(struct inode
*inode
, struct inode
*dir
, int mode
),
161 TP_ARGS(inode
, dir
, mode
),
164 __field( dev_t
, dev
)
165 __field( ino_t
, ino
)
166 __field( ino_t
, dir
)
167 __field( __u16
, mode
)
171 __entry
->dev
= inode
->i_sb
->s_dev
;
172 __entry
->ino
= inode
->i_ino
;
173 __entry
->dir
= dir
->i_ino
;
174 __entry
->mode
= mode
;
177 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
178 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
179 (unsigned long) __entry
->ino
,
180 (unsigned long) __entry
->dir
, __entry
->mode
)
183 TRACE_EVENT(ext4_evict_inode
,
184 TP_PROTO(struct inode
*inode
),
189 __field( dev_t
, dev
)
190 __field( ino_t
, ino
)
191 __field( int, nlink
)
195 __entry
->dev
= inode
->i_sb
->s_dev
;
196 __entry
->ino
= inode
->i_ino
;
197 __entry
->nlink
= inode
->i_nlink
;
200 TP_printk("dev %d,%d ino %lu nlink %d",
201 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
202 (unsigned long) __entry
->ino
, __entry
->nlink
)
205 TRACE_EVENT(ext4_drop_inode
,
206 TP_PROTO(struct inode
*inode
, int drop
),
208 TP_ARGS(inode
, drop
),
211 __field( dev_t
, dev
)
212 __field( ino_t
, ino
)
217 __entry
->dev
= inode
->i_sb
->s_dev
;
218 __entry
->ino
= inode
->i_ino
;
219 __entry
->drop
= drop
;
222 TP_printk("dev %d,%d ino %lu drop %d",
223 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
224 (unsigned long) __entry
->ino
, __entry
->drop
)
227 TRACE_EVENT(ext4_mark_inode_dirty
,
228 TP_PROTO(struct inode
*inode
, unsigned long IP
),
233 __field( dev_t
, dev
)
234 __field( ino_t
, ino
)
235 __field(unsigned long, ip
)
239 __entry
->dev
= inode
->i_sb
->s_dev
;
240 __entry
->ino
= inode
->i_ino
;
244 TP_printk("dev %d,%d ino %lu caller %pS",
245 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
246 (unsigned long) __entry
->ino
, (void *)__entry
->ip
)
249 TRACE_EVENT(ext4_begin_ordered_truncate
,
250 TP_PROTO(struct inode
*inode
, loff_t new_size
),
252 TP_ARGS(inode
, new_size
),
255 __field( dev_t
, dev
)
256 __field( ino_t
, ino
)
257 __field( loff_t
, new_size
)
261 __entry
->dev
= inode
->i_sb
->s_dev
;
262 __entry
->ino
= inode
->i_ino
;
263 __entry
->new_size
= new_size
;
266 TP_printk("dev %d,%d ino %lu new_size %lld",
267 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
268 (unsigned long) __entry
->ino
,
272 DECLARE_EVENT_CLASS(ext4__write_begin
,
274 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
277 TP_ARGS(inode
, pos
, len
, flags
),
280 __field( dev_t
, dev
)
281 __field( ino_t
, ino
)
282 __field( loff_t
, pos
)
283 __field( unsigned int, len
)
284 __field( unsigned int, flags
)
288 __entry
->dev
= inode
->i_sb
->s_dev
;
289 __entry
->ino
= inode
->i_ino
;
292 __entry
->flags
= flags
;
295 TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
296 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
297 (unsigned long) __entry
->ino
,
298 __entry
->pos
, __entry
->len
, __entry
->flags
)
301 DEFINE_EVENT(ext4__write_begin
, ext4_write_begin
,
303 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
306 TP_ARGS(inode
, pos
, len
, flags
)
309 DEFINE_EVENT(ext4__write_begin
, ext4_da_write_begin
,
311 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
314 TP_ARGS(inode
, pos
, len
, flags
)
317 DECLARE_EVENT_CLASS(ext4__write_end
,
318 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
319 unsigned int copied
),
321 TP_ARGS(inode
, pos
, len
, copied
),
324 __field( dev_t
, dev
)
325 __field( ino_t
, ino
)
326 __field( loff_t
, pos
)
327 __field( unsigned int, len
)
328 __field( unsigned int, copied
)
332 __entry
->dev
= inode
->i_sb
->s_dev
;
333 __entry
->ino
= inode
->i_ino
;
336 __entry
->copied
= copied
;
339 TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
340 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
341 (unsigned long) __entry
->ino
,
342 __entry
->pos
, __entry
->len
, __entry
->copied
)
345 DEFINE_EVENT(ext4__write_end
, ext4_write_end
,
347 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
348 unsigned int copied
),
350 TP_ARGS(inode
, pos
, len
, copied
)
353 DEFINE_EVENT(ext4__write_end
, ext4_journalled_write_end
,
355 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
356 unsigned int copied
),
358 TP_ARGS(inode
, pos
, len
, copied
)
361 DEFINE_EVENT(ext4__write_end
, ext4_da_write_end
,
363 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
364 unsigned int copied
),
366 TP_ARGS(inode
, pos
, len
, copied
)
369 TRACE_EVENT(ext4_writepages
,
370 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
375 __field( dev_t
, dev
)
376 __field( ino_t
, ino
)
377 __field( long, nr_to_write
)
378 __field( long, pages_skipped
)
379 __field( loff_t
, range_start
)
380 __field( loff_t
, range_end
)
381 __field( pgoff_t
, writeback_index
)
382 __field( int, sync_mode
)
383 __field( char, for_kupdate
)
384 __field( char, range_cyclic
)
388 __entry
->dev
= inode
->i_sb
->s_dev
;
389 __entry
->ino
= inode
->i_ino
;
390 __entry
->nr_to_write
= wbc
->nr_to_write
;
391 __entry
->pages_skipped
= wbc
->pages_skipped
;
392 __entry
->range_start
= wbc
->range_start
;
393 __entry
->range_end
= wbc
->range_end
;
394 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
395 __entry
->sync_mode
= wbc
->sync_mode
;
396 __entry
->for_kupdate
= wbc
->for_kupdate
;
397 __entry
->range_cyclic
= wbc
->range_cyclic
;
400 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
401 "range_start %lld range_end %lld sync_mode %d "
402 "for_kupdate %d range_cyclic %d writeback_index %lu",
403 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
404 (unsigned long) __entry
->ino
, __entry
->nr_to_write
,
405 __entry
->pages_skipped
, __entry
->range_start
,
406 __entry
->range_end
, __entry
->sync_mode
,
407 __entry
->for_kupdate
, __entry
->range_cyclic
,
408 (unsigned long) __entry
->writeback_index
)
411 TRACE_EVENT(ext4_da_write_pages
,
412 TP_PROTO(struct inode
*inode
, pgoff_t first_page
,
413 struct writeback_control
*wbc
),
415 TP_ARGS(inode
, first_page
, wbc
),
418 __field( dev_t
, dev
)
419 __field( ino_t
, ino
)
420 __field( pgoff_t
, first_page
)
421 __field( long, nr_to_write
)
422 __field( int, sync_mode
)
426 __entry
->dev
= inode
->i_sb
->s_dev
;
427 __entry
->ino
= inode
->i_ino
;
428 __entry
->first_page
= first_page
;
429 __entry
->nr_to_write
= wbc
->nr_to_write
;
430 __entry
->sync_mode
= wbc
->sync_mode
;
433 TP_printk("dev %d,%d ino %lu first_page %lu nr_to_write %ld "
435 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
436 (unsigned long) __entry
->ino
, __entry
->first_page
,
437 __entry
->nr_to_write
, __entry
->sync_mode
)
440 TRACE_EVENT(ext4_da_write_pages_extent
,
441 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
),
446 __field( dev_t
, dev
)
447 __field( ino_t
, ino
)
448 __field( __u64
, lblk
)
449 __field( __u32
, len
)
450 __field( __u32
, flags
)
454 __entry
->dev
= inode
->i_sb
->s_dev
;
455 __entry
->ino
= inode
->i_ino
;
456 __entry
->lblk
= map
->m_lblk
;
457 __entry
->len
= map
->m_len
;
458 __entry
->flags
= map
->m_flags
;
461 TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s",
462 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
463 (unsigned long) __entry
->ino
, __entry
->lblk
, __entry
->len
,
464 show_mflags(__entry
->flags
))
467 TRACE_EVENT(ext4_writepages_result
,
468 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
,
469 int ret
, int pages_written
),
471 TP_ARGS(inode
, wbc
, ret
, pages_written
),
474 __field( dev_t
, dev
)
475 __field( ino_t
, ino
)
477 __field( int, pages_written
)
478 __field( long, pages_skipped
)
479 __field( pgoff_t
, writeback_index
)
480 __field( int, sync_mode
)
484 __entry
->dev
= inode
->i_sb
->s_dev
;
485 __entry
->ino
= inode
->i_ino
;
487 __entry
->pages_written
= pages_written
;
488 __entry
->pages_skipped
= wbc
->pages_skipped
;
489 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
490 __entry
->sync_mode
= wbc
->sync_mode
;
493 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
494 "sync_mode %d writeback_index %lu",
495 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
496 (unsigned long) __entry
->ino
, __entry
->ret
,
497 __entry
->pages_written
, __entry
->pages_skipped
,
499 (unsigned long) __entry
->writeback_index
)
502 DECLARE_EVENT_CLASS(ext4__page_op
,
503 TP_PROTO(struct page
*page
),
508 __field( dev_t
, dev
)
509 __field( ino_t
, ino
)
510 __field( pgoff_t
, index
)
515 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
516 __entry
->ino
= page
->mapping
->host
->i_ino
;
517 __entry
->index
= page
->index
;
520 TP_printk("dev %d,%d ino %lu page_index %lu",
521 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
522 (unsigned long) __entry
->ino
,
523 (unsigned long) __entry
->index
)
526 DEFINE_EVENT(ext4__page_op
, ext4_writepage
,
528 TP_PROTO(struct page
*page
),
533 DEFINE_EVENT(ext4__page_op
, ext4_readpage
,
535 TP_PROTO(struct page
*page
),
540 DEFINE_EVENT(ext4__page_op
, ext4_releasepage
,
542 TP_PROTO(struct page
*page
),
547 DECLARE_EVENT_CLASS(ext4_invalidatepage_op
,
548 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
550 TP_ARGS(page
, offset
, length
),
553 __field( dev_t
, dev
)
554 __field( ino_t
, ino
)
555 __field( pgoff_t
, index
)
556 __field( unsigned int, offset
)
557 __field( unsigned int, length
)
561 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
562 __entry
->ino
= page
->mapping
->host
->i_ino
;
563 __entry
->index
= page
->index
;
564 __entry
->offset
= offset
;
565 __entry
->length
= length
;
568 TP_printk("dev %d,%d ino %lu page_index %lu offset %u length %u",
569 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
570 (unsigned long) __entry
->ino
,
571 (unsigned long) __entry
->index
,
572 __entry
->offset
, __entry
->length
)
575 DEFINE_EVENT(ext4_invalidatepage_op
, ext4_invalidatepage
,
576 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
578 TP_ARGS(page
, offset
, length
)
581 DEFINE_EVENT(ext4_invalidatepage_op
, ext4_journalled_invalidatepage
,
582 TP_PROTO(struct page
*page
, unsigned int offset
, unsigned int length
),
584 TP_ARGS(page
, offset
, length
)
587 TRACE_EVENT(ext4_discard_blocks
,
588 TP_PROTO(struct super_block
*sb
, unsigned long long blk
,
589 unsigned long long count
),
591 TP_ARGS(sb
, blk
, count
),
594 __field( dev_t
, dev
)
595 __field( __u64
, blk
)
596 __field( __u64
, count
)
601 __entry
->dev
= sb
->s_dev
;
603 __entry
->count
= count
;
606 TP_printk("dev %d,%d blk %llu count %llu",
607 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
608 __entry
->blk
, __entry
->count
)
611 DECLARE_EVENT_CLASS(ext4__mb_new_pa
,
612 TP_PROTO(struct ext4_allocation_context
*ac
,
613 struct ext4_prealloc_space
*pa
),
618 __field( dev_t
, dev
)
619 __field( ino_t
, ino
)
620 __field( __u64
, pa_pstart
)
621 __field( __u64
, pa_lstart
)
622 __field( __u32
, pa_len
)
627 __entry
->dev
= ac
->ac_sb
->s_dev
;
628 __entry
->ino
= ac
->ac_inode
->i_ino
;
629 __entry
->pa_pstart
= pa
->pa_pstart
;
630 __entry
->pa_lstart
= pa
->pa_lstart
;
631 __entry
->pa_len
= pa
->pa_len
;
634 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
635 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
636 (unsigned long) __entry
->ino
,
637 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
640 DEFINE_EVENT(ext4__mb_new_pa
, ext4_mb_new_inode_pa
,
642 TP_PROTO(struct ext4_allocation_context
*ac
,
643 struct ext4_prealloc_space
*pa
),
648 DEFINE_EVENT(ext4__mb_new_pa
, ext4_mb_new_group_pa
,
650 TP_PROTO(struct ext4_allocation_context
*ac
,
651 struct ext4_prealloc_space
*pa
),
656 TRACE_EVENT(ext4_mb_release_inode_pa
,
657 TP_PROTO(struct ext4_prealloc_space
*pa
,
658 unsigned long long block
, unsigned int count
),
660 TP_ARGS(pa
, block
, count
),
663 __field( dev_t
, dev
)
664 __field( ino_t
, ino
)
665 __field( __u64
, block
)
666 __field( __u32
, count
)
671 __entry
->dev
= pa
->pa_inode
->i_sb
->s_dev
;
672 __entry
->ino
= pa
->pa_inode
->i_ino
;
673 __entry
->block
= block
;
674 __entry
->count
= count
;
677 TP_printk("dev %d,%d ino %lu block %llu count %u",
678 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
679 (unsigned long) __entry
->ino
,
680 __entry
->block
, __entry
->count
)
683 TRACE_EVENT(ext4_mb_release_group_pa
,
684 TP_PROTO(struct super_block
*sb
, struct ext4_prealloc_space
*pa
),
689 __field( dev_t
, dev
)
690 __field( __u64
, pa_pstart
)
691 __field( __u32
, pa_len
)
696 __entry
->dev
= sb
->s_dev
;
697 __entry
->pa_pstart
= pa
->pa_pstart
;
698 __entry
->pa_len
= pa
->pa_len
;
701 TP_printk("dev %d,%d pstart %llu len %u",
702 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
703 __entry
->pa_pstart
, __entry
->pa_len
)
706 TRACE_EVENT(ext4_discard_preallocations
,
707 TP_PROTO(struct inode
*inode
),
712 __field( dev_t
, dev
)
713 __field( ino_t
, ino
)
718 __entry
->dev
= inode
->i_sb
->s_dev
;
719 __entry
->ino
= inode
->i_ino
;
722 TP_printk("dev %d,%d ino %lu",
723 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
724 (unsigned long) __entry
->ino
)
727 TRACE_EVENT(ext4_mb_discard_preallocations
,
728 TP_PROTO(struct super_block
*sb
, int needed
),
733 __field( dev_t
, dev
)
734 __field( int, needed
)
739 __entry
->dev
= sb
->s_dev
;
740 __entry
->needed
= needed
;
743 TP_printk("dev %d,%d needed %d",
744 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
748 TRACE_EVENT(ext4_request_blocks
,
749 TP_PROTO(struct ext4_allocation_request
*ar
),
754 __field( dev_t
, dev
)
755 __field( ino_t
, ino
)
756 __field( unsigned int, len
)
757 __field( __u32
, logical
)
758 __field( __u32
, lleft
)
759 __field( __u32
, lright
)
760 __field( __u64
, goal
)
761 __field( __u64
, pleft
)
762 __field( __u64
, pright
)
763 __field( unsigned int, flags
)
767 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
768 __entry
->ino
= ar
->inode
->i_ino
;
769 __entry
->len
= ar
->len
;
770 __entry
->logical
= ar
->logical
;
771 __entry
->goal
= ar
->goal
;
772 __entry
->lleft
= ar
->lleft
;
773 __entry
->lright
= ar
->lright
;
774 __entry
->pleft
= ar
->pleft
;
775 __entry
->pright
= ar
->pright
;
776 __entry
->flags
= ar
->flags
;
779 TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu "
780 "lleft %u lright %u pleft %llu pright %llu ",
781 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
782 (unsigned long) __entry
->ino
, show_mballoc_flags(__entry
->flags
),
783 __entry
->len
, __entry
->logical
, __entry
->goal
,
784 __entry
->lleft
, __entry
->lright
, __entry
->pleft
,
788 TRACE_EVENT(ext4_allocate_blocks
,
789 TP_PROTO(struct ext4_allocation_request
*ar
, unsigned long long block
),
794 __field( dev_t
, dev
)
795 __field( ino_t
, ino
)
796 __field( __u64
, block
)
797 __field( unsigned int, len
)
798 __field( __u32
, logical
)
799 __field( __u32
, lleft
)
800 __field( __u32
, lright
)
801 __field( __u64
, goal
)
802 __field( __u64
, pleft
)
803 __field( __u64
, pright
)
804 __field( unsigned int, flags
)
808 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
809 __entry
->ino
= ar
->inode
->i_ino
;
810 __entry
->block
= block
;
811 __entry
->len
= ar
->len
;
812 __entry
->logical
= ar
->logical
;
813 __entry
->goal
= ar
->goal
;
814 __entry
->lleft
= ar
->lleft
;
815 __entry
->lright
= ar
->lright
;
816 __entry
->pleft
= ar
->pleft
;
817 __entry
->pright
= ar
->pright
;
818 __entry
->flags
= ar
->flags
;
821 TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u "
822 "goal %llu lleft %u lright %u pleft %llu pright %llu",
823 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
824 (unsigned long) __entry
->ino
, show_mballoc_flags(__entry
->flags
),
825 __entry
->len
, __entry
->block
, __entry
->logical
,
826 __entry
->goal
, __entry
->lleft
, __entry
->lright
,
827 __entry
->pleft
, __entry
->pright
)
830 TRACE_EVENT(ext4_free_blocks
,
831 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
834 TP_ARGS(inode
, block
, count
, flags
),
837 __field( dev_t
, dev
)
838 __field( ino_t
, ino
)
839 __field( __u64
, block
)
840 __field( unsigned long, count
)
841 __field( int, flags
)
842 __field( __u16
, mode
)
846 __entry
->dev
= inode
->i_sb
->s_dev
;
847 __entry
->ino
= inode
->i_ino
;
848 __entry
->block
= block
;
849 __entry
->count
= count
;
850 __entry
->flags
= flags
;
851 __entry
->mode
= inode
->i_mode
;
854 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s",
855 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
856 (unsigned long) __entry
->ino
,
857 __entry
->mode
, __entry
->block
, __entry
->count
,
858 show_free_flags(__entry
->flags
))
861 TRACE_EVENT(ext4_sync_file_enter
,
862 TP_PROTO(struct file
*file
, int datasync
),
864 TP_ARGS(file
, datasync
),
867 __field( dev_t
, dev
)
868 __field( ino_t
, ino
)
869 __field( ino_t
, parent
)
870 __field( int, datasync
)
874 struct dentry
*dentry
= file
->f_path
.dentry
;
876 __entry
->dev
= dentry
->d_sb
->s_dev
;
877 __entry
->ino
= d_inode(dentry
)->i_ino
;
878 __entry
->datasync
= datasync
;
879 __entry
->parent
= d_inode(dentry
->d_parent
)->i_ino
;
882 TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
883 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
884 (unsigned long) __entry
->ino
,
885 (unsigned long) __entry
->parent
, __entry
->datasync
)
888 TRACE_EVENT(ext4_sync_file_exit
,
889 TP_PROTO(struct inode
*inode
, int ret
),
894 __field( dev_t
, dev
)
895 __field( ino_t
, ino
)
900 __entry
->dev
= inode
->i_sb
->s_dev
;
901 __entry
->ino
= inode
->i_ino
;
905 TP_printk("dev %d,%d ino %lu ret %d",
906 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
907 (unsigned long) __entry
->ino
,
911 TRACE_EVENT(ext4_sync_fs
,
912 TP_PROTO(struct super_block
*sb
, int wait
),
917 __field( dev_t
, dev
)
923 __entry
->dev
= sb
->s_dev
;
924 __entry
->wait
= wait
;
927 TP_printk("dev %d,%d wait %d",
928 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
932 TRACE_EVENT(ext4_alloc_da_blocks
,
933 TP_PROTO(struct inode
*inode
),
938 __field( dev_t
, dev
)
939 __field( ino_t
, ino
)
940 __field( unsigned int, data_blocks
)
944 __entry
->dev
= inode
->i_sb
->s_dev
;
945 __entry
->ino
= inode
->i_ino
;
946 __entry
->data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
949 TP_printk("dev %d,%d ino %lu reserved_data_blocks %u",
950 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
951 (unsigned long) __entry
->ino
,
952 __entry
->data_blocks
)
955 TRACE_EVENT(ext4_mballoc_alloc
,
956 TP_PROTO(struct ext4_allocation_context
*ac
),
961 __field( dev_t
, dev
)
962 __field( ino_t
, ino
)
963 __field( __u32
, orig_logical
)
964 __field( int, orig_start
)
965 __field( __u32
, orig_group
)
966 __field( int, orig_len
)
967 __field( __u32
, goal_logical
)
968 __field( int, goal_start
)
969 __field( __u32
, goal_group
)
970 __field( int, goal_len
)
971 __field( __u32
, result_logical
)
972 __field( int, result_start
)
973 __field( __u32
, result_group
)
974 __field( int, result_len
)
975 __field( __u16
, found
)
976 __field( __u16
, groups
)
977 __field( __u16
, buddy
)
978 __field( __u16
, flags
)
979 __field( __u16
, tail
)
984 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
985 __entry
->ino
= ac
->ac_inode
->i_ino
;
986 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
987 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
988 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
989 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
990 __entry
->goal_logical
= ac
->ac_g_ex
.fe_logical
;
991 __entry
->goal_start
= ac
->ac_g_ex
.fe_start
;
992 __entry
->goal_group
= ac
->ac_g_ex
.fe_group
;
993 __entry
->goal_len
= ac
->ac_g_ex
.fe_len
;
994 __entry
->result_logical
= ac
->ac_f_ex
.fe_logical
;
995 __entry
->result_start
= ac
->ac_f_ex
.fe_start
;
996 __entry
->result_group
= ac
->ac_f_ex
.fe_group
;
997 __entry
->result_len
= ac
->ac_f_ex
.fe_len
;
998 __entry
->found
= ac
->ac_found
;
999 __entry
->flags
= ac
->ac_flags
;
1000 __entry
->groups
= ac
->ac_groups_scanned
;
1001 __entry
->buddy
= ac
->ac_buddy
;
1002 __entry
->tail
= ac
->ac_tail
;
1003 __entry
->cr
= ac
->ac_criteria
;
1006 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
1007 "result %u/%d/%u@%u blks %u grps %u cr %u flags %s "
1008 "tail %u broken %u",
1009 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1010 (unsigned long) __entry
->ino
,
1011 __entry
->orig_group
, __entry
->orig_start
,
1012 __entry
->orig_len
, __entry
->orig_logical
,
1013 __entry
->goal_group
, __entry
->goal_start
,
1014 __entry
->goal_len
, __entry
->goal_logical
,
1015 __entry
->result_group
, __entry
->result_start
,
1016 __entry
->result_len
, __entry
->result_logical
,
1017 __entry
->found
, __entry
->groups
, __entry
->cr
,
1018 show_mballoc_flags(__entry
->flags
), __entry
->tail
,
1019 __entry
->buddy
? 1 << __entry
->buddy
: 0)
1022 TRACE_EVENT(ext4_mballoc_prealloc
,
1023 TP_PROTO(struct ext4_allocation_context
*ac
),
1028 __field( dev_t
, dev
)
1029 __field( ino_t
, ino
)
1030 __field( __u32
, orig_logical
)
1031 __field( int, orig_start
)
1032 __field( __u32
, orig_group
)
1033 __field( int, orig_len
)
1034 __field( __u32
, result_logical
)
1035 __field( int, result_start
)
1036 __field( __u32
, result_group
)
1037 __field( int, result_len
)
1041 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
1042 __entry
->ino
= ac
->ac_inode
->i_ino
;
1043 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
1044 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
1045 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
1046 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
1047 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
1048 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
1049 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
1050 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
1053 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
1054 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1055 (unsigned long) __entry
->ino
,
1056 __entry
->orig_group
, __entry
->orig_start
,
1057 __entry
->orig_len
, __entry
->orig_logical
,
1058 __entry
->result_group
, __entry
->result_start
,
1059 __entry
->result_len
, __entry
->result_logical
)
1062 DECLARE_EVENT_CLASS(ext4__mballoc
,
1063 TP_PROTO(struct super_block
*sb
,
1064 struct inode
*inode
,
1066 ext4_grpblk_t start
,
1069 TP_ARGS(sb
, inode
, group
, start
, len
),
1072 __field( dev_t
, dev
)
1073 __field( ino_t
, ino
)
1074 __field( int, result_start
)
1075 __field( __u32
, result_group
)
1076 __field( int, result_len
)
1080 __entry
->dev
= sb
->s_dev
;
1081 __entry
->ino
= inode
? inode
->i_ino
: 0;
1082 __entry
->result_start
= start
;
1083 __entry
->result_group
= group
;
1084 __entry
->result_len
= len
;
1087 TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
1088 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1089 (unsigned long) __entry
->ino
,
1090 __entry
->result_group
, __entry
->result_start
,
1091 __entry
->result_len
)
1094 DEFINE_EVENT(ext4__mballoc
, ext4_mballoc_discard
,
1096 TP_PROTO(struct super_block
*sb
,
1097 struct inode
*inode
,
1099 ext4_grpblk_t start
,
1102 TP_ARGS(sb
, inode
, group
, start
, len
)
1105 DEFINE_EVENT(ext4__mballoc
, ext4_mballoc_free
,
1107 TP_PROTO(struct super_block
*sb
,
1108 struct inode
*inode
,
1110 ext4_grpblk_t start
,
1113 TP_ARGS(sb
, inode
, group
, start
, len
)
1116 TRACE_EVENT(ext4_forget
,
1117 TP_PROTO(struct inode
*inode
, int is_metadata
, __u64 block
),
1119 TP_ARGS(inode
, is_metadata
, block
),
1122 __field( dev_t
, dev
)
1123 __field( ino_t
, ino
)
1124 __field( __u64
, block
)
1125 __field( int, is_metadata
)
1126 __field( __u16
, mode
)
1130 __entry
->dev
= inode
->i_sb
->s_dev
;
1131 __entry
->ino
= inode
->i_ino
;
1132 __entry
->block
= block
;
1133 __entry
->is_metadata
= is_metadata
;
1134 __entry
->mode
= inode
->i_mode
;
1137 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
1138 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1139 (unsigned long) __entry
->ino
,
1140 __entry
->mode
, __entry
->is_metadata
, __entry
->block
)
1143 TRACE_EVENT(ext4_da_update_reserve_space
,
1144 TP_PROTO(struct inode
*inode
, int used_blocks
, int quota_claim
),
1146 TP_ARGS(inode
, used_blocks
, quota_claim
),
1149 __field( dev_t
, dev
)
1150 __field( ino_t
, ino
)
1151 __field( __u64
, i_blocks
)
1152 __field( int, used_blocks
)
1153 __field( int, reserved_data_blocks
)
1154 __field( int, quota_claim
)
1155 __field( __u16
, mode
)
1159 __entry
->dev
= inode
->i_sb
->s_dev
;
1160 __entry
->ino
= inode
->i_ino
;
1161 __entry
->i_blocks
= inode
->i_blocks
;
1162 __entry
->used_blocks
= used_blocks
;
1163 __entry
->reserved_data_blocks
=
1164 EXT4_I(inode
)->i_reserved_data_blocks
;
1165 __entry
->quota_claim
= quota_claim
;
1166 __entry
->mode
= inode
->i_mode
;
1169 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1170 "reserved_data_blocks %d quota_claim %d",
1171 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1172 (unsigned long) __entry
->ino
,
1173 __entry
->mode
, __entry
->i_blocks
,
1174 __entry
->used_blocks
, __entry
->reserved_data_blocks
,
1175 __entry
->quota_claim
)
1178 TRACE_EVENT(ext4_da_reserve_space
,
1179 TP_PROTO(struct inode
*inode
),
1184 __field( dev_t
, dev
)
1185 __field( ino_t
, ino
)
1186 __field( __u64
, i_blocks
)
1187 __field( int, reserved_data_blocks
)
1188 __field( __u16
, mode
)
1192 __entry
->dev
= inode
->i_sb
->s_dev
;
1193 __entry
->ino
= inode
->i_ino
;
1194 __entry
->i_blocks
= inode
->i_blocks
;
1195 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1196 __entry
->mode
= inode
->i_mode
;
1199 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu "
1200 "reserved_data_blocks %d",
1201 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1202 (unsigned long) __entry
->ino
,
1203 __entry
->mode
, __entry
->i_blocks
,
1204 __entry
->reserved_data_blocks
)
1207 TRACE_EVENT(ext4_da_release_space
,
1208 TP_PROTO(struct inode
*inode
, int freed_blocks
),
1210 TP_ARGS(inode
, freed_blocks
),
1213 __field( dev_t
, dev
)
1214 __field( ino_t
, ino
)
1215 __field( __u64
, i_blocks
)
1216 __field( int, freed_blocks
)
1217 __field( int, reserved_data_blocks
)
1218 __field( __u16
, mode
)
1222 __entry
->dev
= inode
->i_sb
->s_dev
;
1223 __entry
->ino
= inode
->i_ino
;
1224 __entry
->i_blocks
= inode
->i_blocks
;
1225 __entry
->freed_blocks
= freed_blocks
;
1226 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1227 __entry
->mode
= inode
->i_mode
;
1230 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1231 "reserved_data_blocks %d",
1232 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1233 (unsigned long) __entry
->ino
,
1234 __entry
->mode
, __entry
->i_blocks
,
1235 __entry
->freed_blocks
, __entry
->reserved_data_blocks
)
1238 DECLARE_EVENT_CLASS(ext4__bitmap_load
,
1239 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1244 __field( dev_t
, dev
)
1245 __field( __u32
, group
)
1250 __entry
->dev
= sb
->s_dev
;
1251 __entry
->group
= group
;
1254 TP_printk("dev %d,%d group %u",
1255 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1259 DEFINE_EVENT(ext4__bitmap_load
, ext4_mb_bitmap_load
,
1261 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1266 DEFINE_EVENT(ext4__bitmap_load
, ext4_mb_buddy_bitmap_load
,
1268 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1273 DEFINE_EVENT(ext4__bitmap_load
, ext4_read_block_bitmap_load
,
1275 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1280 DEFINE_EVENT(ext4__bitmap_load
, ext4_load_inode_bitmap
,
1282 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1287 TRACE_EVENT(ext4_direct_IO_enter
,
1288 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
1290 TP_ARGS(inode
, offset
, len
, rw
),
1293 __field( dev_t
, dev
)
1294 __field( ino_t
, ino
)
1295 __field( loff_t
, pos
)
1296 __field( unsigned long, len
)
1301 __entry
->dev
= inode
->i_sb
->s_dev
;
1302 __entry
->ino
= inode
->i_ino
;
1303 __entry
->pos
= offset
;
1308 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d",
1309 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1310 (unsigned long) __entry
->ino
,
1311 __entry
->pos
, __entry
->len
, __entry
->rw
)
1314 TRACE_EVENT(ext4_direct_IO_exit
,
1315 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
1318 TP_ARGS(inode
, offset
, len
, rw
, ret
),
1321 __field( dev_t
, dev
)
1322 __field( ino_t
, ino
)
1323 __field( loff_t
, pos
)
1324 __field( unsigned long, len
)
1330 __entry
->dev
= inode
->i_sb
->s_dev
;
1331 __entry
->ino
= inode
->i_ino
;
1332 __entry
->pos
= offset
;
1338 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
1339 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1340 (unsigned long) __entry
->ino
,
1341 __entry
->pos
, __entry
->len
,
1342 __entry
->rw
, __entry
->ret
)
1345 DECLARE_EVENT_CLASS(ext4__fallocate_mode
,
1346 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1348 TP_ARGS(inode
, offset
, len
, mode
),
1351 __field( dev_t
, dev
)
1352 __field( ino_t
, ino
)
1353 __field( loff_t
, offset
)
1354 __field( loff_t
, len
)
1355 __field( int, mode
)
1359 __entry
->dev
= inode
->i_sb
->s_dev
;
1360 __entry
->ino
= inode
->i_ino
;
1361 __entry
->offset
= offset
;
1363 __entry
->mode
= mode
;
1366 TP_printk("dev %d,%d ino %lu offset %lld len %lld mode %s",
1367 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1368 (unsigned long) __entry
->ino
,
1369 __entry
->offset
, __entry
->len
,
1370 show_falloc_mode(__entry
->mode
))
1373 DEFINE_EVENT(ext4__fallocate_mode
, ext4_fallocate_enter
,
1375 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1377 TP_ARGS(inode
, offset
, len
, mode
)
1380 DEFINE_EVENT(ext4__fallocate_mode
, ext4_punch_hole
,
1382 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1384 TP_ARGS(inode
, offset
, len
, mode
)
1387 DEFINE_EVENT(ext4__fallocate_mode
, ext4_zero_range
,
1389 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1391 TP_ARGS(inode
, offset
, len
, mode
)
1394 TRACE_EVENT(ext4_fallocate_exit
,
1395 TP_PROTO(struct inode
*inode
, loff_t offset
,
1396 unsigned int max_blocks
, int ret
),
1398 TP_ARGS(inode
, offset
, max_blocks
, ret
),
1401 __field( dev_t
, dev
)
1402 __field( ino_t
, ino
)
1403 __field( loff_t
, pos
)
1404 __field( unsigned int, blocks
)
1409 __entry
->dev
= inode
->i_sb
->s_dev
;
1410 __entry
->ino
= inode
->i_ino
;
1411 __entry
->pos
= offset
;
1412 __entry
->blocks
= max_blocks
;
1416 TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
1417 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1418 (unsigned long) __entry
->ino
,
1419 __entry
->pos
, __entry
->blocks
,
1423 TRACE_EVENT(ext4_unlink_enter
,
1424 TP_PROTO(struct inode
*parent
, struct dentry
*dentry
),
1426 TP_ARGS(parent
, dentry
),
1429 __field( dev_t
, dev
)
1430 __field( ino_t
, ino
)
1431 __field( ino_t
, parent
)
1432 __field( loff_t
, size
)
1436 __entry
->dev
= dentry
->d_sb
->s_dev
;
1437 __entry
->ino
= d_inode(dentry
)->i_ino
;
1438 __entry
->parent
= parent
->i_ino
;
1439 __entry
->size
= d_inode(dentry
)->i_size
;
1442 TP_printk("dev %d,%d ino %lu size %lld parent %lu",
1443 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1444 (unsigned long) __entry
->ino
, __entry
->size
,
1445 (unsigned long) __entry
->parent
)
1448 TRACE_EVENT(ext4_unlink_exit
,
1449 TP_PROTO(struct dentry
*dentry
, int ret
),
1451 TP_ARGS(dentry
, ret
),
1454 __field( dev_t
, dev
)
1455 __field( ino_t
, ino
)
1460 __entry
->dev
= dentry
->d_sb
->s_dev
;
1461 __entry
->ino
= d_inode(dentry
)->i_ino
;
1465 TP_printk("dev %d,%d ino %lu ret %d",
1466 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1467 (unsigned long) __entry
->ino
,
1471 DECLARE_EVENT_CLASS(ext4__truncate
,
1472 TP_PROTO(struct inode
*inode
),
1477 __field( dev_t
, dev
)
1478 __field( ino_t
, ino
)
1479 __field( __u64
, blocks
)
1483 __entry
->dev
= inode
->i_sb
->s_dev
;
1484 __entry
->ino
= inode
->i_ino
;
1485 __entry
->blocks
= inode
->i_blocks
;
1488 TP_printk("dev %d,%d ino %lu blocks %llu",
1489 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1490 (unsigned long) __entry
->ino
, __entry
->blocks
)
1493 DEFINE_EVENT(ext4__truncate
, ext4_truncate_enter
,
1495 TP_PROTO(struct inode
*inode
),
1500 DEFINE_EVENT(ext4__truncate
, ext4_truncate_exit
,
1502 TP_PROTO(struct inode
*inode
),
1507 /* 'ux' is the unwritten extent. */
1508 TRACE_EVENT(ext4_ext_convert_to_initialized_enter
,
1509 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1510 struct ext4_extent
*ux
),
1512 TP_ARGS(inode
, map
, ux
),
1515 __field( dev_t
, dev
)
1516 __field( ino_t
, ino
)
1517 __field( ext4_lblk_t
, m_lblk
)
1518 __field( unsigned, m_len
)
1519 __field( ext4_lblk_t
, u_lblk
)
1520 __field( unsigned, u_len
)
1521 __field( ext4_fsblk_t
, u_pblk
)
1525 __entry
->dev
= inode
->i_sb
->s_dev
;
1526 __entry
->ino
= inode
->i_ino
;
1527 __entry
->m_lblk
= map
->m_lblk
;
1528 __entry
->m_len
= map
->m_len
;
1529 __entry
->u_lblk
= le32_to_cpu(ux
->ee_block
);
1530 __entry
->u_len
= ext4_ext_get_actual_len(ux
);
1531 __entry
->u_pblk
= ext4_ext_pblock(ux
);
1534 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
1536 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1537 (unsigned long) __entry
->ino
,
1538 __entry
->m_lblk
, __entry
->m_len
,
1539 __entry
->u_lblk
, __entry
->u_len
, __entry
->u_pblk
)
1543 * 'ux' is the unwritten extent.
1544 * 'ix' is the initialized extent to which blocks are transferred.
1546 TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath
,
1547 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1548 struct ext4_extent
*ux
, struct ext4_extent
*ix
),
1550 TP_ARGS(inode
, map
, ux
, ix
),
1553 __field( dev_t
, dev
)
1554 __field( ino_t
, ino
)
1555 __field( ext4_lblk_t
, m_lblk
)
1556 __field( unsigned, m_len
)
1557 __field( ext4_lblk_t
, u_lblk
)
1558 __field( unsigned, u_len
)
1559 __field( ext4_fsblk_t
, u_pblk
)
1560 __field( ext4_lblk_t
, i_lblk
)
1561 __field( unsigned, i_len
)
1562 __field( ext4_fsblk_t
, i_pblk
)
1566 __entry
->dev
= inode
->i_sb
->s_dev
;
1567 __entry
->ino
= inode
->i_ino
;
1568 __entry
->m_lblk
= map
->m_lblk
;
1569 __entry
->m_len
= map
->m_len
;
1570 __entry
->u_lblk
= le32_to_cpu(ux
->ee_block
);
1571 __entry
->u_len
= ext4_ext_get_actual_len(ux
);
1572 __entry
->u_pblk
= ext4_ext_pblock(ux
);
1573 __entry
->i_lblk
= le32_to_cpu(ix
->ee_block
);
1574 __entry
->i_len
= ext4_ext_get_actual_len(ix
);
1575 __entry
->i_pblk
= ext4_ext_pblock(ix
);
1578 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
1579 "u_lblk %u u_len %u u_pblk %llu "
1580 "i_lblk %u i_len %u i_pblk %llu ",
1581 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1582 (unsigned long) __entry
->ino
,
1583 __entry
->m_lblk
, __entry
->m_len
,
1584 __entry
->u_lblk
, __entry
->u_len
, __entry
->u_pblk
,
1585 __entry
->i_lblk
, __entry
->i_len
, __entry
->i_pblk
)
1588 DECLARE_EVENT_CLASS(ext4__map_blocks_enter
,
1589 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1590 unsigned int len
, unsigned int flags
),
1592 TP_ARGS(inode
, lblk
, len
, flags
),
1595 __field( dev_t
, dev
)
1596 __field( ino_t
, ino
)
1597 __field( ext4_lblk_t
, lblk
)
1598 __field( unsigned int, len
)
1599 __field( unsigned int, flags
)
1603 __entry
->dev
= inode
->i_sb
->s_dev
;
1604 __entry
->ino
= inode
->i_ino
;
1605 __entry
->lblk
= lblk
;
1607 __entry
->flags
= flags
;
1610 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s",
1611 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1612 (unsigned long) __entry
->ino
,
1613 __entry
->lblk
, __entry
->len
, show_map_flags(__entry
->flags
))
1616 DEFINE_EVENT(ext4__map_blocks_enter
, ext4_ext_map_blocks_enter
,
1617 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1618 unsigned len
, unsigned flags
),
1620 TP_ARGS(inode
, lblk
, len
, flags
)
1623 DEFINE_EVENT(ext4__map_blocks_enter
, ext4_ind_map_blocks_enter
,
1624 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1625 unsigned len
, unsigned flags
),
1627 TP_ARGS(inode
, lblk
, len
, flags
)
1630 DECLARE_EVENT_CLASS(ext4__map_blocks_exit
,
1631 TP_PROTO(struct inode
*inode
, unsigned flags
, struct ext4_map_blocks
*map
,
1634 TP_ARGS(inode
, flags
, map
, ret
),
1637 __field( dev_t
, dev
)
1638 __field( ino_t
, ino
)
1639 __field( unsigned int, flags
)
1640 __field( ext4_fsblk_t
, pblk
)
1641 __field( ext4_lblk_t
, lblk
)
1642 __field( unsigned int, len
)
1643 __field( unsigned int, mflags
)
1648 __entry
->dev
= inode
->i_sb
->s_dev
;
1649 __entry
->ino
= inode
->i_ino
;
1650 __entry
->flags
= flags
;
1651 __entry
->pblk
= map
->m_pblk
;
1652 __entry
->lblk
= map
->m_lblk
;
1653 __entry
->len
= map
->m_len
;
1654 __entry
->mflags
= map
->m_flags
;
1658 TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u "
1660 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1661 (unsigned long) __entry
->ino
,
1662 show_map_flags(__entry
->flags
), __entry
->lblk
, __entry
->pblk
,
1663 __entry
->len
, show_mflags(__entry
->mflags
), __entry
->ret
)
1666 DEFINE_EVENT(ext4__map_blocks_exit
, ext4_ext_map_blocks_exit
,
1667 TP_PROTO(struct inode
*inode
, unsigned flags
,
1668 struct ext4_map_blocks
*map
, int ret
),
1670 TP_ARGS(inode
, flags
, map
, ret
)
1673 DEFINE_EVENT(ext4__map_blocks_exit
, ext4_ind_map_blocks_exit
,
1674 TP_PROTO(struct inode
*inode
, unsigned flags
,
1675 struct ext4_map_blocks
*map
, int ret
),
1677 TP_ARGS(inode
, flags
, map
, ret
)
1680 TRACE_EVENT(ext4_ext_load_extent
,
1681 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
),
1683 TP_ARGS(inode
, lblk
, pblk
),
1686 __field( dev_t
, dev
)
1687 __field( ino_t
, ino
)
1688 __field( ext4_fsblk_t
, pblk
)
1689 __field( ext4_lblk_t
, lblk
)
1693 __entry
->dev
= inode
->i_sb
->s_dev
;
1694 __entry
->ino
= inode
->i_ino
;
1695 __entry
->pblk
= pblk
;
1696 __entry
->lblk
= lblk
;
1699 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
1700 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1701 (unsigned long) __entry
->ino
,
1702 __entry
->lblk
, __entry
->pblk
)
1705 TRACE_EVENT(ext4_load_inode
,
1706 TP_PROTO(struct inode
*inode
),
1711 __field( dev_t
, dev
)
1712 __field( ino_t
, ino
)
1716 __entry
->dev
= inode
->i_sb
->s_dev
;
1717 __entry
->ino
= inode
->i_ino
;
1720 TP_printk("dev %d,%d ino %ld",
1721 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1722 (unsigned long) __entry
->ino
)
1725 TRACE_EVENT(ext4_journal_start
,
1726 TP_PROTO(struct super_block
*sb
, int blocks
, int rsv_blocks
,
1729 TP_ARGS(sb
, blocks
, rsv_blocks
, IP
),
1732 __field( dev_t
, dev
)
1733 __field(unsigned long, ip
)
1734 __field( int, blocks
)
1735 __field( int, rsv_blocks
)
1739 __entry
->dev
= sb
->s_dev
;
1741 __entry
->blocks
= blocks
;
1742 __entry
->rsv_blocks
= rsv_blocks
;
1745 TP_printk("dev %d,%d blocks, %d rsv_blocks, %d caller %pS",
1746 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1747 __entry
->blocks
, __entry
->rsv_blocks
, (void *)__entry
->ip
)
1750 TRACE_EVENT(ext4_journal_start_reserved
,
1751 TP_PROTO(struct super_block
*sb
, int blocks
, unsigned long IP
),
1753 TP_ARGS(sb
, blocks
, IP
),
1756 __field( dev_t
, dev
)
1757 __field(unsigned long, ip
)
1758 __field( int, blocks
)
1762 __entry
->dev
= sb
->s_dev
;
1764 __entry
->blocks
= blocks
;
1767 TP_printk("dev %d,%d blocks, %d caller %pS",
1768 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1769 __entry
->blocks
, (void *)__entry
->ip
)
1772 DECLARE_EVENT_CLASS(ext4__trim
,
1773 TP_PROTO(struct super_block
*sb
,
1775 ext4_grpblk_t start
,
1778 TP_ARGS(sb
, group
, start
, len
),
1781 __field( int, dev_major
)
1782 __field( int, dev_minor
)
1783 __field( __u32
, group
)
1784 __field( int, start
)
1789 __entry
->dev_major
= MAJOR(sb
->s_dev
);
1790 __entry
->dev_minor
= MINOR(sb
->s_dev
);
1791 __entry
->group
= group
;
1792 __entry
->start
= start
;
1796 TP_printk("dev %d,%d group %u, start %d, len %d",
1797 __entry
->dev_major
, __entry
->dev_minor
,
1798 __entry
->group
, __entry
->start
, __entry
->len
)
1801 DEFINE_EVENT(ext4__trim
, ext4_trim_extent
,
1803 TP_PROTO(struct super_block
*sb
,
1805 ext4_grpblk_t start
,
1808 TP_ARGS(sb
, group
, start
, len
)
1811 DEFINE_EVENT(ext4__trim
, ext4_trim_all_free
,
1813 TP_PROTO(struct super_block
*sb
,
1815 ext4_grpblk_t start
,
1818 TP_ARGS(sb
, group
, start
, len
)
1821 TRACE_EVENT(ext4_ext_handle_unwritten_extents
,
1822 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
, int flags
,
1823 unsigned int allocated
, ext4_fsblk_t newblock
),
1825 TP_ARGS(inode
, map
, flags
, allocated
, newblock
),
1828 __field( dev_t
, dev
)
1829 __field( ino_t
, ino
)
1830 __field( int, flags
)
1831 __field( ext4_lblk_t
, lblk
)
1832 __field( ext4_fsblk_t
, pblk
)
1833 __field( unsigned int, len
)
1834 __field( unsigned int, allocated
)
1835 __field( ext4_fsblk_t
, newblk
)
1839 __entry
->dev
= inode
->i_sb
->s_dev
;
1840 __entry
->ino
= inode
->i_ino
;
1841 __entry
->flags
= flags
;
1842 __entry
->lblk
= map
->m_lblk
;
1843 __entry
->pblk
= map
->m_pblk
;
1844 __entry
->len
= map
->m_len
;
1845 __entry
->allocated
= allocated
;
1846 __entry
->newblk
= newblock
;
1849 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s "
1850 "allocated %d newblock %llu",
1851 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1852 (unsigned long) __entry
->ino
,
1853 (unsigned) __entry
->lblk
, (unsigned long long) __entry
->pblk
,
1854 __entry
->len
, show_map_flags(__entry
->flags
),
1855 (unsigned int) __entry
->allocated
,
1856 (unsigned long long) __entry
->newblk
)
1859 TRACE_EVENT(ext4_get_implied_cluster_alloc_exit
,
1860 TP_PROTO(struct super_block
*sb
, struct ext4_map_blocks
*map
, int ret
),
1862 TP_ARGS(sb
, map
, ret
),
1865 __field( dev_t
, dev
)
1866 __field( unsigned int, flags
)
1867 __field( ext4_lblk_t
, lblk
)
1868 __field( ext4_fsblk_t
, pblk
)
1869 __field( unsigned int, len
)
1874 __entry
->dev
= sb
->s_dev
;
1875 __entry
->flags
= map
->m_flags
;
1876 __entry
->lblk
= map
->m_lblk
;
1877 __entry
->pblk
= map
->m_pblk
;
1878 __entry
->len
= map
->m_len
;
1882 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %s ret %d",
1883 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1884 __entry
->lblk
, (unsigned long long) __entry
->pblk
,
1885 __entry
->len
, show_mflags(__entry
->flags
), __entry
->ret
)
1888 TRACE_EVENT(ext4_ext_put_in_cache
,
1889 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, unsigned int len
,
1890 ext4_fsblk_t start
),
1892 TP_ARGS(inode
, lblk
, len
, start
),
1895 __field( dev_t
, dev
)
1896 __field( ino_t
, ino
)
1897 __field( ext4_lblk_t
, lblk
)
1898 __field( unsigned int, len
)
1899 __field( ext4_fsblk_t
, start
)
1903 __entry
->dev
= inode
->i_sb
->s_dev
;
1904 __entry
->ino
= inode
->i_ino
;
1905 __entry
->lblk
= lblk
;
1907 __entry
->start
= start
;
1910 TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu",
1911 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1912 (unsigned long) __entry
->ino
,
1913 (unsigned) __entry
->lblk
,
1915 (unsigned long long) __entry
->start
)
1918 TRACE_EVENT(ext4_ext_in_cache
,
1919 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, int ret
),
1921 TP_ARGS(inode
, lblk
, ret
),
1924 __field( dev_t
, dev
)
1925 __field( ino_t
, ino
)
1926 __field( ext4_lblk_t
, lblk
)
1931 __entry
->dev
= inode
->i_sb
->s_dev
;
1932 __entry
->ino
= inode
->i_ino
;
1933 __entry
->lblk
= lblk
;
1937 TP_printk("dev %d,%d ino %lu lblk %u ret %d",
1938 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1939 (unsigned long) __entry
->ino
,
1940 (unsigned) __entry
->lblk
,
1945 TRACE_EVENT(ext4_find_delalloc_range
,
1946 TP_PROTO(struct inode
*inode
, ext4_lblk_t from
, ext4_lblk_t to
,
1947 int reverse
, int found
, ext4_lblk_t found_blk
),
1949 TP_ARGS(inode
, from
, to
, reverse
, found
, found_blk
),
1952 __field( dev_t
, dev
)
1953 __field( ino_t
, ino
)
1954 __field( ext4_lblk_t
, from
)
1955 __field( ext4_lblk_t
, to
)
1956 __field( int, reverse
)
1957 __field( int, found
)
1958 __field( ext4_lblk_t
, found_blk
)
1962 __entry
->dev
= inode
->i_sb
->s_dev
;
1963 __entry
->ino
= inode
->i_ino
;
1964 __entry
->from
= from
;
1966 __entry
->reverse
= reverse
;
1967 __entry
->found
= found
;
1968 __entry
->found_blk
= found_blk
;
1971 TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d "
1973 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1974 (unsigned long) __entry
->ino
,
1975 (unsigned) __entry
->from
, (unsigned) __entry
->to
,
1976 __entry
->reverse
, __entry
->found
,
1977 (unsigned) __entry
->found_blk
)
1980 TRACE_EVENT(ext4_get_reserved_cluster_alloc
,
1981 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, unsigned int len
),
1983 TP_ARGS(inode
, lblk
, len
),
1986 __field( dev_t
, dev
)
1987 __field( ino_t
, ino
)
1988 __field( ext4_lblk_t
, lblk
)
1989 __field( unsigned int, len
)
1993 __entry
->dev
= inode
->i_sb
->s_dev
;
1994 __entry
->ino
= inode
->i_ino
;
1995 __entry
->lblk
= lblk
;
1999 TP_printk("dev %d,%d ino %lu lblk %u len %u",
2000 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2001 (unsigned long) __entry
->ino
,
2002 (unsigned) __entry
->lblk
,
2006 TRACE_EVENT(ext4_ext_show_extent
,
2007 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
,
2008 unsigned short len
),
2010 TP_ARGS(inode
, lblk
, pblk
, len
),
2013 __field( dev_t
, dev
)
2014 __field( ino_t
, ino
)
2015 __field( ext4_fsblk_t
, pblk
)
2016 __field( ext4_lblk_t
, lblk
)
2017 __field( unsigned short, len
)
2021 __entry
->dev
= inode
->i_sb
->s_dev
;
2022 __entry
->ino
= inode
->i_ino
;
2023 __entry
->pblk
= pblk
;
2024 __entry
->lblk
= lblk
;
2028 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
2029 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2030 (unsigned long) __entry
->ino
,
2031 (unsigned) __entry
->lblk
,
2032 (unsigned long long) __entry
->pblk
,
2033 (unsigned short) __entry
->len
)
2036 TRACE_EVENT(ext4_remove_blocks
,
2037 TP_PROTO(struct inode
*inode
, struct ext4_extent
*ex
,
2038 ext4_lblk_t from
, ext4_fsblk_t to
,
2039 long long partial_cluster
),
2041 TP_ARGS(inode
, ex
, from
, to
, partial_cluster
),
2044 __field( dev_t
, dev
)
2045 __field( ino_t
, ino
)
2046 __field( ext4_lblk_t
, from
)
2047 __field( ext4_lblk_t
, to
)
2048 __field( long long, partial
)
2049 __field( ext4_fsblk_t
, ee_pblk
)
2050 __field( ext4_lblk_t
, ee_lblk
)
2051 __field( unsigned short, ee_len
)
2055 __entry
->dev
= inode
->i_sb
->s_dev
;
2056 __entry
->ino
= inode
->i_ino
;
2057 __entry
->from
= from
;
2059 __entry
->partial
= partial_cluster
;
2060 __entry
->ee_pblk
= ext4_ext_pblock(ex
);
2061 __entry
->ee_lblk
= le32_to_cpu(ex
->ee_block
);
2062 __entry
->ee_len
= ext4_ext_get_actual_len(ex
);
2065 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
2066 "from %u to %u partial_cluster %lld",
2067 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2068 (unsigned long) __entry
->ino
,
2069 (unsigned) __entry
->ee_lblk
,
2070 (unsigned long long) __entry
->ee_pblk
,
2071 (unsigned short) __entry
->ee_len
,
2072 (unsigned) __entry
->from
,
2073 (unsigned) __entry
->to
,
2074 (long long) __entry
->partial
)
2077 TRACE_EVENT(ext4_ext_rm_leaf
,
2078 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
2079 struct ext4_extent
*ex
,
2080 long long partial_cluster
),
2082 TP_ARGS(inode
, start
, ex
, partial_cluster
),
2085 __field( dev_t
, dev
)
2086 __field( ino_t
, ino
)
2087 __field( long long, partial
)
2088 __field( ext4_lblk_t
, start
)
2089 __field( ext4_lblk_t
, ee_lblk
)
2090 __field( ext4_fsblk_t
, ee_pblk
)
2091 __field( short, ee_len
)
2095 __entry
->dev
= inode
->i_sb
->s_dev
;
2096 __entry
->ino
= inode
->i_ino
;
2097 __entry
->partial
= partial_cluster
;
2098 __entry
->start
= start
;
2099 __entry
->ee_lblk
= le32_to_cpu(ex
->ee_block
);
2100 __entry
->ee_pblk
= ext4_ext_pblock(ex
);
2101 __entry
->ee_len
= ext4_ext_get_actual_len(ex
);
2104 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
2105 "partial_cluster %lld",
2106 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2107 (unsigned long) __entry
->ino
,
2108 (unsigned) __entry
->start
,
2109 (unsigned) __entry
->ee_lblk
,
2110 (unsigned long long) __entry
->ee_pblk
,
2111 (unsigned short) __entry
->ee_len
,
2112 (long long) __entry
->partial
)
2115 TRACE_EVENT(ext4_ext_rm_idx
,
2116 TP_PROTO(struct inode
*inode
, ext4_fsblk_t pblk
),
2118 TP_ARGS(inode
, pblk
),
2121 __field( dev_t
, dev
)
2122 __field( ino_t
, ino
)
2123 __field( ext4_fsblk_t
, pblk
)
2127 __entry
->dev
= inode
->i_sb
->s_dev
;
2128 __entry
->ino
= inode
->i_ino
;
2129 __entry
->pblk
= pblk
;
2132 TP_printk("dev %d,%d ino %lu index_pblk %llu",
2133 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2134 (unsigned long) __entry
->ino
,
2135 (unsigned long long) __entry
->pblk
)
2138 TRACE_EVENT(ext4_ext_remove_space
,
2139 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
2140 ext4_lblk_t end
, int depth
),
2142 TP_ARGS(inode
, start
, end
, depth
),
2145 __field( dev_t
, dev
)
2146 __field( ino_t
, ino
)
2147 __field( ext4_lblk_t
, start
)
2148 __field( ext4_lblk_t
, end
)
2149 __field( int, depth
)
2153 __entry
->dev
= inode
->i_sb
->s_dev
;
2154 __entry
->ino
= inode
->i_ino
;
2155 __entry
->start
= start
;
2157 __entry
->depth
= depth
;
2160 TP_printk("dev %d,%d ino %lu since %u end %u depth %d",
2161 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2162 (unsigned long) __entry
->ino
,
2163 (unsigned) __entry
->start
,
2164 (unsigned) __entry
->end
,
2168 TRACE_EVENT(ext4_ext_remove_space_done
,
2169 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, ext4_lblk_t end
,
2170 int depth
, long long partial
, __le16 eh_entries
),
2172 TP_ARGS(inode
, start
, end
, depth
, partial
, eh_entries
),
2175 __field( dev_t
, dev
)
2176 __field( ino_t
, ino
)
2177 __field( ext4_lblk_t
, start
)
2178 __field( ext4_lblk_t
, end
)
2179 __field( int, depth
)
2180 __field( long long, partial
)
2181 __field( unsigned short, eh_entries
)
2185 __entry
->dev
= inode
->i_sb
->s_dev
;
2186 __entry
->ino
= inode
->i_ino
;
2187 __entry
->start
= start
;
2189 __entry
->depth
= depth
;
2190 __entry
->partial
= partial
;
2191 __entry
->eh_entries
= le16_to_cpu(eh_entries
);
2194 TP_printk("dev %d,%d ino %lu since %u end %u depth %d partial %lld "
2195 "remaining_entries %u",
2196 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2197 (unsigned long) __entry
->ino
,
2198 (unsigned) __entry
->start
,
2199 (unsigned) __entry
->end
,
2201 (long long) __entry
->partial
,
2202 (unsigned short) __entry
->eh_entries
)
2205 DECLARE_EVENT_CLASS(ext4__es_extent
,
2206 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
2211 __field( dev_t
, dev
)
2212 __field( ino_t
, ino
)
2213 __field( ext4_lblk_t
, lblk
)
2214 __field( ext4_lblk_t
, len
)
2215 __field( ext4_fsblk_t
, pblk
)
2216 __field( char, status
)
2220 __entry
->dev
= inode
->i_sb
->s_dev
;
2221 __entry
->ino
= inode
->i_ino
;
2222 __entry
->lblk
= es
->es_lblk
;
2223 __entry
->len
= es
->es_len
;
2224 __entry
->pblk
= ext4_es_pblock(es
);
2225 __entry
->status
= ext4_es_status(es
);
2228 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
2229 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2230 (unsigned long) __entry
->ino
,
2231 __entry
->lblk
, __entry
->len
,
2232 __entry
->pblk
, show_extent_status(__entry
->status
))
2235 DEFINE_EVENT(ext4__es_extent
, ext4_es_insert_extent
,
2236 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
2241 DEFINE_EVENT(ext4__es_extent
, ext4_es_cache_extent
,
2242 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
2247 TRACE_EVENT(ext4_es_remove_extent
,
2248 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_lblk_t len
),
2250 TP_ARGS(inode
, lblk
, len
),
2253 __field( dev_t
, dev
)
2254 __field( ino_t
, ino
)
2255 __field( loff_t
, lblk
)
2256 __field( loff_t
, len
)
2260 __entry
->dev
= inode
->i_sb
->s_dev
;
2261 __entry
->ino
= inode
->i_ino
;
2262 __entry
->lblk
= lblk
;
2266 TP_printk("dev %d,%d ino %lu es [%lld/%lld)",
2267 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2268 (unsigned long) __entry
->ino
,
2269 __entry
->lblk
, __entry
->len
)
2272 TRACE_EVENT(ext4_es_find_delayed_extent_range_enter
,
2273 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
),
2275 TP_ARGS(inode
, lblk
),
2278 __field( dev_t
, dev
)
2279 __field( ino_t
, ino
)
2280 __field( ext4_lblk_t
, lblk
)
2284 __entry
->dev
= inode
->i_sb
->s_dev
;
2285 __entry
->ino
= inode
->i_ino
;
2286 __entry
->lblk
= lblk
;
2289 TP_printk("dev %d,%d ino %lu lblk %u",
2290 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2291 (unsigned long) __entry
->ino
, __entry
->lblk
)
2294 TRACE_EVENT(ext4_es_find_delayed_extent_range_exit
,
2295 TP_PROTO(struct inode
*inode
, struct extent_status
*es
),
2300 __field( dev_t
, dev
)
2301 __field( ino_t
, ino
)
2302 __field( ext4_lblk_t
, lblk
)
2303 __field( ext4_lblk_t
, len
)
2304 __field( ext4_fsblk_t
, pblk
)
2305 __field( char, status
)
2309 __entry
->dev
= inode
->i_sb
->s_dev
;
2310 __entry
->ino
= inode
->i_ino
;
2311 __entry
->lblk
= es
->es_lblk
;
2312 __entry
->len
= es
->es_len
;
2313 __entry
->pblk
= ext4_es_pblock(es
);
2314 __entry
->status
= ext4_es_status(es
);
2317 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
2318 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2319 (unsigned long) __entry
->ino
,
2320 __entry
->lblk
, __entry
->len
,
2321 __entry
->pblk
, show_extent_status(__entry
->status
))
2324 TRACE_EVENT(ext4_es_lookup_extent_enter
,
2325 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
),
2327 TP_ARGS(inode
, lblk
),
2330 __field( dev_t
, dev
)
2331 __field( ino_t
, ino
)
2332 __field( ext4_lblk_t
, lblk
)
2336 __entry
->dev
= inode
->i_sb
->s_dev
;
2337 __entry
->ino
= inode
->i_ino
;
2338 __entry
->lblk
= lblk
;
2341 TP_printk("dev %d,%d ino %lu lblk %u",
2342 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2343 (unsigned long) __entry
->ino
, __entry
->lblk
)
2346 TRACE_EVENT(ext4_es_lookup_extent_exit
,
2347 TP_PROTO(struct inode
*inode
, struct extent_status
*es
,
2350 TP_ARGS(inode
, es
, found
),
2353 __field( dev_t
, dev
)
2354 __field( ino_t
, ino
)
2355 __field( ext4_lblk_t
, lblk
)
2356 __field( ext4_lblk_t
, len
)
2357 __field( ext4_fsblk_t
, pblk
)
2358 __field( char, status
)
2359 __field( int, found
)
2363 __entry
->dev
= inode
->i_sb
->s_dev
;
2364 __entry
->ino
= inode
->i_ino
;
2365 __entry
->lblk
= es
->es_lblk
;
2366 __entry
->len
= es
->es_len
;
2367 __entry
->pblk
= ext4_es_pblock(es
);
2368 __entry
->status
= ext4_es_status(es
);
2369 __entry
->found
= found
;
2372 TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s",
2373 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2374 (unsigned long) __entry
->ino
, __entry
->found
,
2375 __entry
->lblk
, __entry
->len
,
2376 __entry
->found
? __entry
->pblk
: 0,
2377 show_extent_status(__entry
->found
? __entry
->status
: 0))
2380 DECLARE_EVENT_CLASS(ext4__es_shrink_enter
,
2381 TP_PROTO(struct super_block
*sb
, int nr_to_scan
, int cache_cnt
),
2383 TP_ARGS(sb
, nr_to_scan
, cache_cnt
),
2386 __field( dev_t
, dev
)
2387 __field( int, nr_to_scan
)
2388 __field( int, cache_cnt
)
2392 __entry
->dev
= sb
->s_dev
;
2393 __entry
->nr_to_scan
= nr_to_scan
;
2394 __entry
->cache_cnt
= cache_cnt
;
2397 TP_printk("dev %d,%d nr_to_scan %d cache_cnt %d",
2398 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2399 __entry
->nr_to_scan
, __entry
->cache_cnt
)
2402 DEFINE_EVENT(ext4__es_shrink_enter
, ext4_es_shrink_count
,
2403 TP_PROTO(struct super_block
*sb
, int nr_to_scan
, int cache_cnt
),
2405 TP_ARGS(sb
, nr_to_scan
, cache_cnt
)
2408 DEFINE_EVENT(ext4__es_shrink_enter
, ext4_es_shrink_scan_enter
,
2409 TP_PROTO(struct super_block
*sb
, int nr_to_scan
, int cache_cnt
),
2411 TP_ARGS(sb
, nr_to_scan
, cache_cnt
)
2414 TRACE_EVENT(ext4_es_shrink_scan_exit
,
2415 TP_PROTO(struct super_block
*sb
, int nr_shrunk
, int cache_cnt
),
2417 TP_ARGS(sb
, nr_shrunk
, cache_cnt
),
2420 __field( dev_t
, dev
)
2421 __field( int, nr_shrunk
)
2422 __field( int, cache_cnt
)
2426 __entry
->dev
= sb
->s_dev
;
2427 __entry
->nr_shrunk
= nr_shrunk
;
2428 __entry
->cache_cnt
= cache_cnt
;
2431 TP_printk("dev %d,%d nr_shrunk %d cache_cnt %d",
2432 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2433 __entry
->nr_shrunk
, __entry
->cache_cnt
)
2436 TRACE_EVENT(ext4_collapse_range
,
2437 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
),
2439 TP_ARGS(inode
, offset
, len
),
2444 __field(loff_t
, offset
)
2445 __field(loff_t
, len
)
2449 __entry
->dev
= inode
->i_sb
->s_dev
;
2450 __entry
->ino
= inode
->i_ino
;
2451 __entry
->offset
= offset
;
2455 TP_printk("dev %d,%d ino %lu offset %lld len %lld",
2456 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2457 (unsigned long) __entry
->ino
,
2458 __entry
->offset
, __entry
->len
)
2461 TRACE_EVENT(ext4_insert_range
,
2462 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
),
2464 TP_ARGS(inode
, offset
, len
),
2469 __field(loff_t
, offset
)
2470 __field(loff_t
, len
)
2474 __entry
->dev
= inode
->i_sb
->s_dev
;
2475 __entry
->ino
= inode
->i_ino
;
2476 __entry
->offset
= offset
;
2480 TP_printk("dev %d,%d ino %lu offset %lld len %lld",
2481 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2482 (unsigned long) __entry
->ino
,
2483 __entry
->offset
, __entry
->len
)
2486 TRACE_EVENT(ext4_es_shrink
,
2487 TP_PROTO(struct super_block
*sb
, int nr_shrunk
, u64 scan_time
,
2488 int nr_skipped
, int retried
),
2490 TP_ARGS(sb
, nr_shrunk
, scan_time
, nr_skipped
, retried
),
2493 __field( dev_t
, dev
)
2494 __field( int, nr_shrunk
)
2495 __field( unsigned long long, scan_time
)
2496 __field( int, nr_skipped
)
2497 __field( int, retried
)
2501 __entry
->dev
= sb
->s_dev
;
2502 __entry
->nr_shrunk
= nr_shrunk
;
2503 __entry
->scan_time
= div_u64(scan_time
, 1000);
2504 __entry
->nr_skipped
= nr_skipped
;
2505 __entry
->retried
= retried
;
2508 TP_printk("dev %d,%d nr_shrunk %d, scan_time %llu "
2509 "nr_skipped %d retried %d",
2510 MAJOR(__entry
->dev
), MINOR(__entry
->dev
), __entry
->nr_shrunk
,
2511 __entry
->scan_time
, __entry
->nr_skipped
, __entry
->retried
)
2515 DECLARE_EVENT_CLASS(ext4_fsmap_class
,
2516 TP_PROTO(struct super_block
*sb
, u32 keydev
, u32 agno
, u64 bno
, u64 len
,
2518 TP_ARGS(sb
, keydev
, agno
, bno
, len
, owner
),
2521 __field(dev_t
, keydev
)
2528 __entry
->dev
= sb
->s_bdev
->bd_dev
;
2529 __entry
->keydev
= new_decode_dev(keydev
);
2530 __entry
->agno
= agno
;
2533 __entry
->owner
= owner
;
2535 TP_printk("dev %d:%d keydev %d:%d agno %u bno %llu len %llu owner %lld\n",
2536 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2537 MAJOR(__entry
->keydev
), MINOR(__entry
->keydev
),
2543 #define DEFINE_FSMAP_EVENT(name) \
2544 DEFINE_EVENT(ext4_fsmap_class, name, \
2545 TP_PROTO(struct super_block *sb, u32 keydev, u32 agno, u64 bno, u64 len, \
2547 TP_ARGS(sb, keydev, agno, bno, len, owner))
2548 DEFINE_FSMAP_EVENT(ext4_fsmap_low_key
);
2549 DEFINE_FSMAP_EVENT(ext4_fsmap_high_key
);
2550 DEFINE_FSMAP_EVENT(ext4_fsmap_mapping
);
2552 DECLARE_EVENT_CLASS(ext4_getfsmap_class
,
2553 TP_PROTO(struct super_block
*sb
, struct ext4_fsmap
*fsmap
),
2557 __field(dev_t
, keydev
)
2564 __entry
->dev
= sb
->s_bdev
->bd_dev
;
2565 __entry
->keydev
= new_decode_dev(fsmap
->fmr_device
);
2566 __entry
->block
= fsmap
->fmr_physical
;
2567 __entry
->len
= fsmap
->fmr_length
;
2568 __entry
->owner
= fsmap
->fmr_owner
;
2569 __entry
->flags
= fsmap
->fmr_flags
;
2571 TP_printk("dev %d:%d keydev %d:%d block %llu len %llu owner %lld flags 0x%llx\n",
2572 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2573 MAJOR(__entry
->keydev
), MINOR(__entry
->keydev
),
2579 #define DEFINE_GETFSMAP_EVENT(name) \
2580 DEFINE_EVENT(ext4_getfsmap_class, name, \
2581 TP_PROTO(struct super_block *sb, struct ext4_fsmap *fsmap), \
2583 DEFINE_GETFSMAP_EVENT(ext4_getfsmap_low_key
);
2584 DEFINE_GETFSMAP_EVENT(ext4_getfsmap_high_key
);
2585 DEFINE_GETFSMAP_EVENT(ext4_getfsmap_mapping
);
2587 #endif /* _TRACE_EXT4_H */
2589 /* This part must be outside protection */
2590 #include <trace/define_trace.h>