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
;
19 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
21 TRACE_EVENT(ext4_free_inode
,
22 TP_PROTO(struct inode
*inode
),
29 __field( __u16
, mode
)
32 __field( __u64
, blocks
)
36 __entry
->dev
= inode
->i_sb
->s_dev
;
37 __entry
->ino
= inode
->i_ino
;
38 __entry
->mode
= inode
->i_mode
;
39 __entry
->uid
= i_uid_read(inode
);
40 __entry
->gid
= i_gid_read(inode
);
41 __entry
->blocks
= inode
->i_blocks
;
44 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
45 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
46 (unsigned long) __entry
->ino
, __entry
->mode
,
47 __entry
->uid
, __entry
->gid
, __entry
->blocks
)
50 TRACE_EVENT(ext4_request_inode
,
51 TP_PROTO(struct inode
*dir
, int mode
),
58 __field( __u16
, mode
)
62 __entry
->dev
= dir
->i_sb
->s_dev
;
63 __entry
->dir
= dir
->i_ino
;
67 TP_printk("dev %d,%d dir %lu mode 0%o",
68 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
69 (unsigned long) __entry
->dir
, __entry
->mode
)
72 TRACE_EVENT(ext4_allocate_inode
,
73 TP_PROTO(struct inode
*inode
, struct inode
*dir
, int mode
),
75 TP_ARGS(inode
, dir
, mode
),
81 __field( __u16
, mode
)
85 __entry
->dev
= inode
->i_sb
->s_dev
;
86 __entry
->ino
= inode
->i_ino
;
87 __entry
->dir
= dir
->i_ino
;
91 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
92 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
93 (unsigned long) __entry
->ino
,
94 (unsigned long) __entry
->dir
, __entry
->mode
)
97 TRACE_EVENT(ext4_evict_inode
,
98 TP_PROTO(struct inode
*inode
),
103 __field( dev_t
, dev
)
104 __field( ino_t
, ino
)
105 __field( int, nlink
)
109 __entry
->dev
= inode
->i_sb
->s_dev
;
110 __entry
->ino
= inode
->i_ino
;
111 __entry
->nlink
= inode
->i_nlink
;
114 TP_printk("dev %d,%d ino %lu nlink %d",
115 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
116 (unsigned long) __entry
->ino
, __entry
->nlink
)
119 TRACE_EVENT(ext4_drop_inode
,
120 TP_PROTO(struct inode
*inode
, int drop
),
122 TP_ARGS(inode
, drop
),
125 __field( dev_t
, dev
)
126 __field( ino_t
, ino
)
131 __entry
->dev
= inode
->i_sb
->s_dev
;
132 __entry
->ino
= inode
->i_ino
;
133 __entry
->drop
= drop
;
136 TP_printk("dev %d,%d ino %lu drop %d",
137 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
138 (unsigned long) __entry
->ino
, __entry
->drop
)
141 TRACE_EVENT(ext4_mark_inode_dirty
,
142 TP_PROTO(struct inode
*inode
, unsigned long IP
),
147 __field( dev_t
, dev
)
148 __field( ino_t
, ino
)
149 __field(unsigned long, ip
)
153 __entry
->dev
= inode
->i_sb
->s_dev
;
154 __entry
->ino
= inode
->i_ino
;
158 TP_printk("dev %d,%d ino %lu caller %pF",
159 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
160 (unsigned long) __entry
->ino
, (void *)__entry
->ip
)
163 TRACE_EVENT(ext4_begin_ordered_truncate
,
164 TP_PROTO(struct inode
*inode
, loff_t new_size
),
166 TP_ARGS(inode
, new_size
),
169 __field( dev_t
, dev
)
170 __field( ino_t
, ino
)
171 __field( loff_t
, new_size
)
175 __entry
->dev
= inode
->i_sb
->s_dev
;
176 __entry
->ino
= inode
->i_ino
;
177 __entry
->new_size
= new_size
;
180 TP_printk("dev %d,%d ino %lu new_size %lld",
181 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
182 (unsigned long) __entry
->ino
,
186 DECLARE_EVENT_CLASS(ext4__write_begin
,
188 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
191 TP_ARGS(inode
, pos
, len
, flags
),
194 __field( dev_t
, dev
)
195 __field( ino_t
, ino
)
196 __field( loff_t
, pos
)
197 __field( unsigned int, len
)
198 __field( unsigned int, flags
)
202 __entry
->dev
= inode
->i_sb
->s_dev
;
203 __entry
->ino
= inode
->i_ino
;
206 __entry
->flags
= flags
;
209 TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
210 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
211 (unsigned long) __entry
->ino
,
212 __entry
->pos
, __entry
->len
, __entry
->flags
)
215 DEFINE_EVENT(ext4__write_begin
, ext4_write_begin
,
217 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
220 TP_ARGS(inode
, pos
, len
, flags
)
223 DEFINE_EVENT(ext4__write_begin
, ext4_da_write_begin
,
225 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
228 TP_ARGS(inode
, pos
, len
, flags
)
231 DECLARE_EVENT_CLASS(ext4__write_end
,
232 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
233 unsigned int copied
),
235 TP_ARGS(inode
, pos
, len
, copied
),
238 __field( dev_t
, dev
)
239 __field( ino_t
, ino
)
240 __field( loff_t
, pos
)
241 __field( unsigned int, len
)
242 __field( unsigned int, copied
)
246 __entry
->dev
= inode
->i_sb
->s_dev
;
247 __entry
->ino
= inode
->i_ino
;
250 __entry
->copied
= copied
;
253 TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
254 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
255 (unsigned long) __entry
->ino
,
256 __entry
->pos
, __entry
->len
, __entry
->copied
)
259 DEFINE_EVENT(ext4__write_end
, ext4_ordered_write_end
,
261 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
262 unsigned int copied
),
264 TP_ARGS(inode
, pos
, len
, copied
)
267 DEFINE_EVENT(ext4__write_end
, ext4_writeback_write_end
,
269 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
270 unsigned int copied
),
272 TP_ARGS(inode
, pos
, len
, copied
)
275 DEFINE_EVENT(ext4__write_end
, ext4_journalled_write_end
,
277 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
278 unsigned int copied
),
280 TP_ARGS(inode
, pos
, len
, copied
)
283 DEFINE_EVENT(ext4__write_end
, ext4_da_write_end
,
285 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
286 unsigned int copied
),
288 TP_ARGS(inode
, pos
, len
, copied
)
291 TRACE_EVENT(ext4_da_writepages
,
292 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
297 __field( dev_t
, dev
)
298 __field( ino_t
, ino
)
299 __field( long, nr_to_write
)
300 __field( long, pages_skipped
)
301 __field( loff_t
, range_start
)
302 __field( loff_t
, range_end
)
303 __field( int, sync_mode
)
304 __field( char, for_kupdate
)
305 __field( char, range_cyclic
)
306 __field( pgoff_t
, writeback_index
)
310 __entry
->dev
= inode
->i_sb
->s_dev
;
311 __entry
->ino
= inode
->i_ino
;
312 __entry
->nr_to_write
= wbc
->nr_to_write
;
313 __entry
->pages_skipped
= wbc
->pages_skipped
;
314 __entry
->range_start
= wbc
->range_start
;
315 __entry
->range_end
= wbc
->range_end
;
316 __entry
->sync_mode
= wbc
->sync_mode
;
317 __entry
->for_kupdate
= wbc
->for_kupdate
;
318 __entry
->range_cyclic
= wbc
->range_cyclic
;
319 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
322 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
323 "range_start %lld range_end %lld sync_mode %d"
324 "for_kupdate %d range_cyclic %d writeback_index %lu",
325 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
326 (unsigned long) __entry
->ino
, __entry
->nr_to_write
,
327 __entry
->pages_skipped
, __entry
->range_start
,
328 __entry
->range_end
, __entry
->sync_mode
,
329 __entry
->for_kupdate
, __entry
->range_cyclic
,
330 (unsigned long) __entry
->writeback_index
)
333 TRACE_EVENT(ext4_da_write_pages
,
334 TP_PROTO(struct inode
*inode
, struct mpage_da_data
*mpd
),
339 __field( dev_t
, dev
)
340 __field( ino_t
, ino
)
341 __field( __u64
, b_blocknr
)
342 __field( __u32
, b_size
)
343 __field( __u32
, b_state
)
344 __field( unsigned long, first_page
)
345 __field( int, io_done
)
346 __field( int, pages_written
)
347 __field( int, sync_mode
)
351 __entry
->dev
= inode
->i_sb
->s_dev
;
352 __entry
->ino
= inode
->i_ino
;
353 __entry
->b_blocknr
= mpd
->b_blocknr
;
354 __entry
->b_size
= mpd
->b_size
;
355 __entry
->b_state
= mpd
->b_state
;
356 __entry
->first_page
= mpd
->first_page
;
357 __entry
->io_done
= mpd
->io_done
;
358 __entry
->pages_written
= mpd
->pages_written
;
359 __entry
->sync_mode
= mpd
->wbc
->sync_mode
;
362 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x "
363 "first_page %lu io_done %d pages_written %d sync_mode %d",
364 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
365 (unsigned long) __entry
->ino
,
366 __entry
->b_blocknr
, __entry
->b_size
,
367 __entry
->b_state
, __entry
->first_page
,
368 __entry
->io_done
, __entry
->pages_written
,
373 TRACE_EVENT(ext4_da_writepages_result
,
374 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
,
375 int ret
, int pages_written
),
377 TP_ARGS(inode
, wbc
, ret
, pages_written
),
380 __field( dev_t
, dev
)
381 __field( ino_t
, ino
)
383 __field( int, pages_written
)
384 __field( long, pages_skipped
)
385 __field( int, sync_mode
)
386 __field( pgoff_t
, writeback_index
)
390 __entry
->dev
= inode
->i_sb
->s_dev
;
391 __entry
->ino
= inode
->i_ino
;
393 __entry
->pages_written
= pages_written
;
394 __entry
->pages_skipped
= wbc
->pages_skipped
;
395 __entry
->sync_mode
= wbc
->sync_mode
;
396 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
399 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
400 "sync_mode %d writeback_index %lu",
401 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
402 (unsigned long) __entry
->ino
, __entry
->ret
,
403 __entry
->pages_written
, __entry
->pages_skipped
,
405 (unsigned long) __entry
->writeback_index
)
408 DECLARE_EVENT_CLASS(ext4__page_op
,
409 TP_PROTO(struct page
*page
),
414 __field( pgoff_t
, index
)
415 __field( ino_t
, ino
)
416 __field( dev_t
, dev
)
421 __entry
->index
= page
->index
;
422 __entry
->ino
= page
->mapping
->host
->i_ino
;
423 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
426 TP_printk("dev %d,%d ino %lu page_index %lu",
427 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
428 (unsigned long) __entry
->ino
,
429 (unsigned long) __entry
->index
)
432 DEFINE_EVENT(ext4__page_op
, ext4_writepage
,
434 TP_PROTO(struct page
*page
),
439 DEFINE_EVENT(ext4__page_op
, ext4_readpage
,
441 TP_PROTO(struct page
*page
),
446 DEFINE_EVENT(ext4__page_op
, ext4_releasepage
,
448 TP_PROTO(struct page
*page
),
453 TRACE_EVENT(ext4_invalidatepage
,
454 TP_PROTO(struct page
*page
, unsigned long offset
),
456 TP_ARGS(page
, offset
),
459 __field( pgoff_t
, index
)
460 __field( unsigned long, offset
)
461 __field( ino_t
, ino
)
462 __field( dev_t
, dev
)
467 __entry
->index
= page
->index
;
468 __entry
->offset
= offset
;
469 __entry
->ino
= page
->mapping
->host
->i_ino
;
470 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
473 TP_printk("dev %d,%d ino %lu page_index %lu offset %lu",
474 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
475 (unsigned long) __entry
->ino
,
476 (unsigned long) __entry
->index
, __entry
->offset
)
479 TRACE_EVENT(ext4_discard_blocks
,
480 TP_PROTO(struct super_block
*sb
, unsigned long long blk
,
481 unsigned long long count
),
483 TP_ARGS(sb
, blk
, count
),
486 __field( dev_t
, dev
)
487 __field( __u64
, blk
)
488 __field( __u64
, count
)
493 __entry
->dev
= sb
->s_dev
;
495 __entry
->count
= count
;
498 TP_printk("dev %d,%d blk %llu count %llu",
499 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
500 __entry
->blk
, __entry
->count
)
503 DECLARE_EVENT_CLASS(ext4__mb_new_pa
,
504 TP_PROTO(struct ext4_allocation_context
*ac
,
505 struct ext4_prealloc_space
*pa
),
510 __field( dev_t
, dev
)
511 __field( ino_t
, ino
)
512 __field( __u64
, pa_pstart
)
513 __field( __u32
, pa_len
)
514 __field( __u64
, pa_lstart
)
519 __entry
->dev
= ac
->ac_sb
->s_dev
;
520 __entry
->ino
= ac
->ac_inode
->i_ino
;
521 __entry
->pa_pstart
= pa
->pa_pstart
;
522 __entry
->pa_len
= pa
->pa_len
;
523 __entry
->pa_lstart
= pa
->pa_lstart
;
526 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
527 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
528 (unsigned long) __entry
->ino
,
529 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
532 DEFINE_EVENT(ext4__mb_new_pa
, ext4_mb_new_inode_pa
,
534 TP_PROTO(struct ext4_allocation_context
*ac
,
535 struct ext4_prealloc_space
*pa
),
540 DEFINE_EVENT(ext4__mb_new_pa
, ext4_mb_new_group_pa
,
542 TP_PROTO(struct ext4_allocation_context
*ac
,
543 struct ext4_prealloc_space
*pa
),
548 TRACE_EVENT(ext4_mb_release_inode_pa
,
549 TP_PROTO(struct ext4_prealloc_space
*pa
,
550 unsigned long long block
, unsigned int count
),
552 TP_ARGS(pa
, block
, count
),
555 __field( dev_t
, dev
)
556 __field( ino_t
, ino
)
557 __field( __u64
, block
)
558 __field( __u32
, count
)
563 __entry
->dev
= pa
->pa_inode
->i_sb
->s_dev
;
564 __entry
->ino
= pa
->pa_inode
->i_ino
;
565 __entry
->block
= block
;
566 __entry
->count
= count
;
569 TP_printk("dev %d,%d ino %lu block %llu count %u",
570 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
571 (unsigned long) __entry
->ino
,
572 __entry
->block
, __entry
->count
)
575 TRACE_EVENT(ext4_mb_release_group_pa
,
576 TP_PROTO(struct super_block
*sb
, struct ext4_prealloc_space
*pa
),
581 __field( dev_t
, dev
)
582 __field( __u64
, pa_pstart
)
583 __field( __u32
, pa_len
)
588 __entry
->dev
= sb
->s_dev
;
589 __entry
->pa_pstart
= pa
->pa_pstart
;
590 __entry
->pa_len
= pa
->pa_len
;
593 TP_printk("dev %d,%d pstart %llu len %u",
594 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
595 __entry
->pa_pstart
, __entry
->pa_len
)
598 TRACE_EVENT(ext4_discard_preallocations
,
599 TP_PROTO(struct inode
*inode
),
604 __field( dev_t
, dev
)
605 __field( ino_t
, ino
)
610 __entry
->dev
= inode
->i_sb
->s_dev
;
611 __entry
->ino
= inode
->i_ino
;
614 TP_printk("dev %d,%d ino %lu",
615 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
616 (unsigned long) __entry
->ino
)
619 TRACE_EVENT(ext4_mb_discard_preallocations
,
620 TP_PROTO(struct super_block
*sb
, int needed
),
625 __field( dev_t
, dev
)
626 __field( int, needed
)
631 __entry
->dev
= sb
->s_dev
;
632 __entry
->needed
= needed
;
635 TP_printk("dev %d,%d needed %d",
636 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
640 TRACE_EVENT(ext4_request_blocks
,
641 TP_PROTO(struct ext4_allocation_request
*ar
),
646 __field( dev_t
, dev
)
647 __field( ino_t
, ino
)
648 __field( unsigned int, flags
)
649 __field( unsigned int, len
)
650 __field( __u32
, logical
)
651 __field( __u32
, lleft
)
652 __field( __u32
, lright
)
653 __field( __u64
, goal
)
654 __field( __u64
, pleft
)
655 __field( __u64
, pright
)
659 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
660 __entry
->ino
= ar
->inode
->i_ino
;
661 __entry
->flags
= ar
->flags
;
662 __entry
->len
= ar
->len
;
663 __entry
->logical
= ar
->logical
;
664 __entry
->goal
= ar
->goal
;
665 __entry
->lleft
= ar
->lleft
;
666 __entry
->lright
= ar
->lright
;
667 __entry
->pleft
= ar
->pleft
;
668 __entry
->pright
= ar
->pright
;
671 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu "
672 "lleft %u lright %u pleft %llu pright %llu ",
673 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
674 (unsigned long) __entry
->ino
, __entry
->flags
,
675 __entry
->len
, __entry
->logical
, __entry
->goal
,
676 __entry
->lleft
, __entry
->lright
, __entry
->pleft
,
680 TRACE_EVENT(ext4_allocate_blocks
,
681 TP_PROTO(struct ext4_allocation_request
*ar
, unsigned long long block
),
686 __field( dev_t
, dev
)
687 __field( ino_t
, ino
)
688 __field( __u64
, block
)
689 __field( unsigned int, flags
)
690 __field( unsigned int, len
)
691 __field( __u32
, logical
)
692 __field( __u32
, lleft
)
693 __field( __u32
, lright
)
694 __field( __u64
, goal
)
695 __field( __u64
, pleft
)
696 __field( __u64
, pright
)
700 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
701 __entry
->ino
= ar
->inode
->i_ino
;
702 __entry
->block
= block
;
703 __entry
->flags
= ar
->flags
;
704 __entry
->len
= ar
->len
;
705 __entry
->logical
= ar
->logical
;
706 __entry
->goal
= ar
->goal
;
707 __entry
->lleft
= ar
->lleft
;
708 __entry
->lright
= ar
->lright
;
709 __entry
->pleft
= ar
->pleft
;
710 __entry
->pright
= ar
->pright
;
713 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u "
714 "goal %llu lleft %u lright %u pleft %llu pright %llu",
715 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
716 (unsigned long) __entry
->ino
, __entry
->flags
,
717 __entry
->len
, __entry
->block
, __entry
->logical
,
718 __entry
->goal
, __entry
->lleft
, __entry
->lright
,
719 __entry
->pleft
, __entry
->pright
)
722 TRACE_EVENT(ext4_free_blocks
,
723 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
726 TP_ARGS(inode
, block
, count
, flags
),
729 __field( dev_t
, dev
)
730 __field( ino_t
, ino
)
731 __field( __u16
, mode
)
732 __field( __u64
, block
)
733 __field( unsigned long, count
)
734 __field( int, flags
)
738 __entry
->dev
= inode
->i_sb
->s_dev
;
739 __entry
->ino
= inode
->i_ino
;
740 __entry
->mode
= inode
->i_mode
;
741 __entry
->block
= block
;
742 __entry
->count
= count
;
743 __entry
->flags
= flags
;
746 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
747 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
748 (unsigned long) __entry
->ino
,
749 __entry
->mode
, __entry
->block
, __entry
->count
,
753 TRACE_EVENT(ext4_sync_file_enter
,
754 TP_PROTO(struct file
*file
, int datasync
),
756 TP_ARGS(file
, datasync
),
759 __field( dev_t
, dev
)
760 __field( ino_t
, ino
)
761 __field( ino_t
, parent
)
762 __field( int, datasync
)
766 struct dentry
*dentry
= file
->f_path
.dentry
;
768 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
769 __entry
->ino
= dentry
->d_inode
->i_ino
;
770 __entry
->datasync
= datasync
;
771 __entry
->parent
= dentry
->d_parent
->d_inode
->i_ino
;
774 TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
775 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
776 (unsigned long) __entry
->ino
,
777 (unsigned long) __entry
->parent
, __entry
->datasync
)
780 TRACE_EVENT(ext4_sync_file_exit
,
781 TP_PROTO(struct inode
*inode
, int ret
),
787 __field( ino_t
, ino
)
788 __field( dev_t
, dev
)
793 __entry
->ino
= inode
->i_ino
;
794 __entry
->dev
= inode
->i_sb
->s_dev
;
797 TP_printk("dev %d,%d ino %lu ret %d",
798 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
799 (unsigned long) __entry
->ino
,
803 TRACE_EVENT(ext4_sync_fs
,
804 TP_PROTO(struct super_block
*sb
, int wait
),
809 __field( dev_t
, dev
)
815 __entry
->dev
= sb
->s_dev
;
816 __entry
->wait
= wait
;
819 TP_printk("dev %d,%d wait %d",
820 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
824 TRACE_EVENT(ext4_alloc_da_blocks
,
825 TP_PROTO(struct inode
*inode
),
830 __field( dev_t
, dev
)
831 __field( ino_t
, ino
)
832 __field( unsigned int, data_blocks
)
833 __field( unsigned int, meta_blocks
)
837 __entry
->dev
= inode
->i_sb
->s_dev
;
838 __entry
->ino
= inode
->i_ino
;
839 __entry
->data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
840 __entry
->meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
843 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
844 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
845 (unsigned long) __entry
->ino
,
846 __entry
->data_blocks
, __entry
->meta_blocks
)
849 TRACE_EVENT(ext4_mballoc_alloc
,
850 TP_PROTO(struct ext4_allocation_context
*ac
),
855 __field( dev_t
, dev
)
856 __field( ino_t
, ino
)
857 __field( __u16
, found
)
858 __field( __u16
, groups
)
859 __field( __u16
, buddy
)
860 __field( __u16
, flags
)
861 __field( __u16
, tail
)
863 __field( __u32
, orig_logical
)
864 __field( int, orig_start
)
865 __field( __u32
, orig_group
)
866 __field( int, orig_len
)
867 __field( __u32
, goal_logical
)
868 __field( int, goal_start
)
869 __field( __u32
, goal_group
)
870 __field( int, goal_len
)
871 __field( __u32
, result_logical
)
872 __field( int, result_start
)
873 __field( __u32
, result_group
)
874 __field( int, result_len
)
878 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
879 __entry
->ino
= ac
->ac_inode
->i_ino
;
880 __entry
->found
= ac
->ac_found
;
881 __entry
->flags
= ac
->ac_flags
;
882 __entry
->groups
= ac
->ac_groups_scanned
;
883 __entry
->buddy
= ac
->ac_buddy
;
884 __entry
->tail
= ac
->ac_tail
;
885 __entry
->cr
= ac
->ac_criteria
;
886 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
887 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
888 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
889 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
890 __entry
->goal_logical
= ac
->ac_g_ex
.fe_logical
;
891 __entry
->goal_start
= ac
->ac_g_ex
.fe_start
;
892 __entry
->goal_group
= ac
->ac_g_ex
.fe_group
;
893 __entry
->goal_len
= ac
->ac_g_ex
.fe_len
;
894 __entry
->result_logical
= ac
->ac_f_ex
.fe_logical
;
895 __entry
->result_start
= ac
->ac_f_ex
.fe_start
;
896 __entry
->result_group
= ac
->ac_f_ex
.fe_group
;
897 __entry
->result_len
= ac
->ac_f_ex
.fe_len
;
900 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
901 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
903 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
904 (unsigned long) __entry
->ino
,
905 __entry
->orig_group
, __entry
->orig_start
,
906 __entry
->orig_len
, __entry
->orig_logical
,
907 __entry
->goal_group
, __entry
->goal_start
,
908 __entry
->goal_len
, __entry
->goal_logical
,
909 __entry
->result_group
, __entry
->result_start
,
910 __entry
->result_len
, __entry
->result_logical
,
911 __entry
->found
, __entry
->groups
, __entry
->cr
,
912 __entry
->flags
, __entry
->tail
,
913 __entry
->buddy
? 1 << __entry
->buddy
: 0)
916 TRACE_EVENT(ext4_mballoc_prealloc
,
917 TP_PROTO(struct ext4_allocation_context
*ac
),
922 __field( dev_t
, dev
)
923 __field( ino_t
, ino
)
924 __field( __u32
, orig_logical
)
925 __field( int, orig_start
)
926 __field( __u32
, orig_group
)
927 __field( int, orig_len
)
928 __field( __u32
, result_logical
)
929 __field( int, result_start
)
930 __field( __u32
, result_group
)
931 __field( int, result_len
)
935 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
936 __entry
->ino
= ac
->ac_inode
->i_ino
;
937 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
938 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
939 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
940 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
941 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
942 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
943 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
944 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
947 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
948 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
949 (unsigned long) __entry
->ino
,
950 __entry
->orig_group
, __entry
->orig_start
,
951 __entry
->orig_len
, __entry
->orig_logical
,
952 __entry
->result_group
, __entry
->result_start
,
953 __entry
->result_len
, __entry
->result_logical
)
956 DECLARE_EVENT_CLASS(ext4__mballoc
,
957 TP_PROTO(struct super_block
*sb
,
963 TP_ARGS(sb
, inode
, group
, start
, len
),
966 __field( dev_t
, dev
)
967 __field( ino_t
, ino
)
968 __field( int, result_start
)
969 __field( __u32
, result_group
)
970 __field( int, result_len
)
974 __entry
->dev
= sb
->s_dev
;
975 __entry
->ino
= inode
? inode
->i_ino
: 0;
976 __entry
->result_start
= start
;
977 __entry
->result_group
= group
;
978 __entry
->result_len
= len
;
981 TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
982 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
983 (unsigned long) __entry
->ino
,
984 __entry
->result_group
, __entry
->result_start
,
988 DEFINE_EVENT(ext4__mballoc
, ext4_mballoc_discard
,
990 TP_PROTO(struct super_block
*sb
,
996 TP_ARGS(sb
, inode
, group
, start
, len
)
999 DEFINE_EVENT(ext4__mballoc
, ext4_mballoc_free
,
1001 TP_PROTO(struct super_block
*sb
,
1002 struct inode
*inode
,
1004 ext4_grpblk_t start
,
1007 TP_ARGS(sb
, inode
, group
, start
, len
)
1010 TRACE_EVENT(ext4_forget
,
1011 TP_PROTO(struct inode
*inode
, int is_metadata
, __u64 block
),
1013 TP_ARGS(inode
, is_metadata
, block
),
1016 __field( dev_t
, dev
)
1017 __field( ino_t
, ino
)
1018 __field( __u16
, mode
)
1019 __field( int, is_metadata
)
1020 __field( __u64
, block
)
1024 __entry
->dev
= inode
->i_sb
->s_dev
;
1025 __entry
->ino
= inode
->i_ino
;
1026 __entry
->mode
= inode
->i_mode
;
1027 __entry
->is_metadata
= is_metadata
;
1028 __entry
->block
= block
;
1031 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
1032 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1033 (unsigned long) __entry
->ino
,
1034 __entry
->mode
, __entry
->is_metadata
, __entry
->block
)
1037 TRACE_EVENT(ext4_da_update_reserve_space
,
1038 TP_PROTO(struct inode
*inode
, int used_blocks
, int quota_claim
),
1040 TP_ARGS(inode
, used_blocks
, quota_claim
),
1043 __field( dev_t
, dev
)
1044 __field( ino_t
, ino
)
1045 __field( __u16
, mode
)
1046 __field( __u64
, i_blocks
)
1047 __field( int, used_blocks
)
1048 __field( int, reserved_data_blocks
)
1049 __field( int, reserved_meta_blocks
)
1050 __field( int, allocated_meta_blocks
)
1051 __field( int, quota_claim
)
1055 __entry
->dev
= inode
->i_sb
->s_dev
;
1056 __entry
->ino
= inode
->i_ino
;
1057 __entry
->mode
= inode
->i_mode
;
1058 __entry
->i_blocks
= inode
->i_blocks
;
1059 __entry
->used_blocks
= used_blocks
;
1060 __entry
->reserved_data_blocks
=
1061 EXT4_I(inode
)->i_reserved_data_blocks
;
1062 __entry
->reserved_meta_blocks
=
1063 EXT4_I(inode
)->i_reserved_meta_blocks
;
1064 __entry
->allocated_meta_blocks
=
1065 EXT4_I(inode
)->i_allocated_meta_blocks
;
1066 __entry
->quota_claim
= quota_claim
;
1069 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1070 "reserved_data_blocks %d reserved_meta_blocks %d "
1071 "allocated_meta_blocks %d quota_claim %d",
1072 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1073 (unsigned long) __entry
->ino
,
1074 __entry
->mode
, __entry
->i_blocks
,
1075 __entry
->used_blocks
, __entry
->reserved_data_blocks
,
1076 __entry
->reserved_meta_blocks
, __entry
->allocated_meta_blocks
,
1077 __entry
->quota_claim
)
1080 TRACE_EVENT(ext4_da_reserve_space
,
1081 TP_PROTO(struct inode
*inode
, int md_needed
),
1083 TP_ARGS(inode
, md_needed
),
1086 __field( dev_t
, dev
)
1087 __field( ino_t
, ino
)
1088 __field( __u16
, mode
)
1089 __field( __u64
, i_blocks
)
1090 __field( int, md_needed
)
1091 __field( int, reserved_data_blocks
)
1092 __field( int, reserved_meta_blocks
)
1096 __entry
->dev
= inode
->i_sb
->s_dev
;
1097 __entry
->ino
= inode
->i_ino
;
1098 __entry
->mode
= inode
->i_mode
;
1099 __entry
->i_blocks
= inode
->i_blocks
;
1100 __entry
->md_needed
= md_needed
;
1101 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1102 __entry
->reserved_meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
1105 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
1106 "reserved_data_blocks %d reserved_meta_blocks %d",
1107 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1108 (unsigned long) __entry
->ino
,
1109 __entry
->mode
, __entry
->i_blocks
,
1110 __entry
->md_needed
, __entry
->reserved_data_blocks
,
1111 __entry
->reserved_meta_blocks
)
1114 TRACE_EVENT(ext4_da_release_space
,
1115 TP_PROTO(struct inode
*inode
, int freed_blocks
),
1117 TP_ARGS(inode
, freed_blocks
),
1120 __field( dev_t
, dev
)
1121 __field( ino_t
, ino
)
1122 __field( __u16
, mode
)
1123 __field( __u64
, i_blocks
)
1124 __field( int, freed_blocks
)
1125 __field( int, reserved_data_blocks
)
1126 __field( int, reserved_meta_blocks
)
1127 __field( int, allocated_meta_blocks
)
1131 __entry
->dev
= inode
->i_sb
->s_dev
;
1132 __entry
->ino
= inode
->i_ino
;
1133 __entry
->mode
= inode
->i_mode
;
1134 __entry
->i_blocks
= inode
->i_blocks
;
1135 __entry
->freed_blocks
= freed_blocks
;
1136 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1137 __entry
->reserved_meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
1138 __entry
->allocated_meta_blocks
= EXT4_I(inode
)->i_allocated_meta_blocks
;
1141 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1142 "reserved_data_blocks %d reserved_meta_blocks %d "
1143 "allocated_meta_blocks %d",
1144 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1145 (unsigned long) __entry
->ino
,
1146 __entry
->mode
, __entry
->i_blocks
,
1147 __entry
->freed_blocks
, __entry
->reserved_data_blocks
,
1148 __entry
->reserved_meta_blocks
, __entry
->allocated_meta_blocks
)
1151 DECLARE_EVENT_CLASS(ext4__bitmap_load
,
1152 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1157 __field( dev_t
, dev
)
1158 __field( __u32
, group
)
1163 __entry
->dev
= sb
->s_dev
;
1164 __entry
->group
= group
;
1167 TP_printk("dev %d,%d group %u",
1168 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1172 DEFINE_EVENT(ext4__bitmap_load
, ext4_mb_bitmap_load
,
1174 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1179 DEFINE_EVENT(ext4__bitmap_load
, ext4_mb_buddy_bitmap_load
,
1181 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1186 DEFINE_EVENT(ext4__bitmap_load
, ext4_read_block_bitmap_load
,
1188 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1193 DEFINE_EVENT(ext4__bitmap_load
, ext4_load_inode_bitmap
,
1195 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1200 TRACE_EVENT(ext4_direct_IO_enter
,
1201 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
1203 TP_ARGS(inode
, offset
, len
, rw
),
1206 __field( ino_t
, ino
)
1207 __field( dev_t
, dev
)
1208 __field( loff_t
, pos
)
1209 __field( unsigned long, len
)
1214 __entry
->ino
= inode
->i_ino
;
1215 __entry
->dev
= inode
->i_sb
->s_dev
;
1216 __entry
->pos
= offset
;
1221 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d",
1222 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1223 (unsigned long) __entry
->ino
,
1224 __entry
->pos
, __entry
->len
, __entry
->rw
)
1227 TRACE_EVENT(ext4_direct_IO_exit
,
1228 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
1231 TP_ARGS(inode
, offset
, len
, rw
, ret
),
1234 __field( ino_t
, ino
)
1235 __field( dev_t
, dev
)
1236 __field( loff_t
, pos
)
1237 __field( unsigned long, len
)
1243 __entry
->ino
= inode
->i_ino
;
1244 __entry
->dev
= inode
->i_sb
->s_dev
;
1245 __entry
->pos
= offset
;
1251 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
1252 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1253 (unsigned long) __entry
->ino
,
1254 __entry
->pos
, __entry
->len
,
1255 __entry
->rw
, __entry
->ret
)
1258 TRACE_EVENT(ext4_fallocate_enter
,
1259 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1261 TP_ARGS(inode
, offset
, len
, mode
),
1264 __field( ino_t
, ino
)
1265 __field( dev_t
, dev
)
1266 __field( loff_t
, pos
)
1267 __field( loff_t
, len
)
1268 __field( int, mode
)
1272 __entry
->ino
= inode
->i_ino
;
1273 __entry
->dev
= inode
->i_sb
->s_dev
;
1274 __entry
->pos
= offset
;
1276 __entry
->mode
= mode
;
1279 TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d",
1280 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1281 (unsigned long) __entry
->ino
, __entry
->pos
,
1282 __entry
->len
, __entry
->mode
)
1285 TRACE_EVENT(ext4_fallocate_exit
,
1286 TP_PROTO(struct inode
*inode
, loff_t offset
,
1287 unsigned int max_blocks
, int ret
),
1289 TP_ARGS(inode
, offset
, max_blocks
, ret
),
1292 __field( ino_t
, ino
)
1293 __field( dev_t
, dev
)
1294 __field( loff_t
, pos
)
1295 __field( unsigned int, blocks
)
1300 __entry
->ino
= inode
->i_ino
;
1301 __entry
->dev
= inode
->i_sb
->s_dev
;
1302 __entry
->pos
= offset
;
1303 __entry
->blocks
= max_blocks
;
1307 TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
1308 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1309 (unsigned long) __entry
->ino
,
1310 __entry
->pos
, __entry
->blocks
,
1314 TRACE_EVENT(ext4_unlink_enter
,
1315 TP_PROTO(struct inode
*parent
, struct dentry
*dentry
),
1317 TP_ARGS(parent
, dentry
),
1320 __field( ino_t
, parent
)
1321 __field( ino_t
, ino
)
1322 __field( loff_t
, size
)
1323 __field( dev_t
, dev
)
1327 __entry
->parent
= parent
->i_ino
;
1328 __entry
->ino
= dentry
->d_inode
->i_ino
;
1329 __entry
->size
= dentry
->d_inode
->i_size
;
1330 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
1333 TP_printk("dev %d,%d ino %lu size %lld parent %lu",
1334 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1335 (unsigned long) __entry
->ino
, __entry
->size
,
1336 (unsigned long) __entry
->parent
)
1339 TRACE_EVENT(ext4_unlink_exit
,
1340 TP_PROTO(struct dentry
*dentry
, int ret
),
1342 TP_ARGS(dentry
, ret
),
1345 __field( ino_t
, ino
)
1346 __field( dev_t
, dev
)
1351 __entry
->ino
= dentry
->d_inode
->i_ino
;
1352 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
1356 TP_printk("dev %d,%d ino %lu ret %d",
1357 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1358 (unsigned long) __entry
->ino
,
1362 DECLARE_EVENT_CLASS(ext4__truncate
,
1363 TP_PROTO(struct inode
*inode
),
1368 __field( ino_t
, ino
)
1369 __field( dev_t
, dev
)
1370 __field( __u64
, blocks
)
1374 __entry
->ino
= inode
->i_ino
;
1375 __entry
->dev
= inode
->i_sb
->s_dev
;
1376 __entry
->blocks
= inode
->i_blocks
;
1379 TP_printk("dev %d,%d ino %lu blocks %llu",
1380 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1381 (unsigned long) __entry
->ino
, __entry
->blocks
)
1384 DEFINE_EVENT(ext4__truncate
, ext4_truncate_enter
,
1386 TP_PROTO(struct inode
*inode
),
1391 DEFINE_EVENT(ext4__truncate
, ext4_truncate_exit
,
1393 TP_PROTO(struct inode
*inode
),
1398 /* 'ux' is the uninitialized extent. */
1399 TRACE_EVENT(ext4_ext_convert_to_initialized_enter
,
1400 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1401 struct ext4_extent
*ux
),
1403 TP_ARGS(inode
, map
, ux
),
1406 __field( ino_t
, ino
)
1407 __field( dev_t
, dev
)
1408 __field( ext4_lblk_t
, m_lblk
)
1409 __field( unsigned, m_len
)
1410 __field( ext4_lblk_t
, u_lblk
)
1411 __field( unsigned, u_len
)
1412 __field( ext4_fsblk_t
, u_pblk
)
1416 __entry
->ino
= inode
->i_ino
;
1417 __entry
->dev
= inode
->i_sb
->s_dev
;
1418 __entry
->m_lblk
= map
->m_lblk
;
1419 __entry
->m_len
= map
->m_len
;
1420 __entry
->u_lblk
= le32_to_cpu(ux
->ee_block
);
1421 __entry
->u_len
= ext4_ext_get_actual_len(ux
);
1422 __entry
->u_pblk
= ext4_ext_pblock(ux
);
1425 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
1427 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1428 (unsigned long) __entry
->ino
,
1429 __entry
->m_lblk
, __entry
->m_len
,
1430 __entry
->u_lblk
, __entry
->u_len
, __entry
->u_pblk
)
1434 * 'ux' is the uninitialized extent.
1435 * 'ix' is the initialized extent to which blocks are transferred.
1437 TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath
,
1438 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1439 struct ext4_extent
*ux
, struct ext4_extent
*ix
),
1441 TP_ARGS(inode
, map
, ux
, ix
),
1444 __field( ino_t
, ino
)
1445 __field( dev_t
, dev
)
1446 __field( ext4_lblk_t
, m_lblk
)
1447 __field( unsigned, m_len
)
1448 __field( ext4_lblk_t
, u_lblk
)
1449 __field( unsigned, u_len
)
1450 __field( ext4_fsblk_t
, u_pblk
)
1451 __field( ext4_lblk_t
, i_lblk
)
1452 __field( unsigned, i_len
)
1453 __field( ext4_fsblk_t
, i_pblk
)
1457 __entry
->ino
= inode
->i_ino
;
1458 __entry
->dev
= inode
->i_sb
->s_dev
;
1459 __entry
->m_lblk
= map
->m_lblk
;
1460 __entry
->m_len
= map
->m_len
;
1461 __entry
->u_lblk
= le32_to_cpu(ux
->ee_block
);
1462 __entry
->u_len
= ext4_ext_get_actual_len(ux
);
1463 __entry
->u_pblk
= ext4_ext_pblock(ux
);
1464 __entry
->i_lblk
= le32_to_cpu(ix
->ee_block
);
1465 __entry
->i_len
= ext4_ext_get_actual_len(ix
);
1466 __entry
->i_pblk
= ext4_ext_pblock(ix
);
1469 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
1470 "u_lblk %u u_len %u u_pblk %llu "
1471 "i_lblk %u i_len %u i_pblk %llu ",
1472 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1473 (unsigned long) __entry
->ino
,
1474 __entry
->m_lblk
, __entry
->m_len
,
1475 __entry
->u_lblk
, __entry
->u_len
, __entry
->u_pblk
,
1476 __entry
->i_lblk
, __entry
->i_len
, __entry
->i_pblk
)
1479 DECLARE_EVENT_CLASS(ext4__map_blocks_enter
,
1480 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1481 unsigned int len
, unsigned int flags
),
1483 TP_ARGS(inode
, lblk
, len
, flags
),
1486 __field( ino_t
, ino
)
1487 __field( dev_t
, dev
)
1488 __field( ext4_lblk_t
, lblk
)
1489 __field( unsigned int, len
)
1490 __field( unsigned int, flags
)
1494 __entry
->ino
= inode
->i_ino
;
1495 __entry
->dev
= inode
->i_sb
->s_dev
;
1496 __entry
->lblk
= lblk
;
1498 __entry
->flags
= flags
;
1501 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u",
1502 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1503 (unsigned long) __entry
->ino
,
1504 __entry
->lblk
, __entry
->len
, __entry
->flags
)
1507 DEFINE_EVENT(ext4__map_blocks_enter
, ext4_ext_map_blocks_enter
,
1508 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1509 unsigned len
, unsigned flags
),
1511 TP_ARGS(inode
, lblk
, len
, flags
)
1514 DEFINE_EVENT(ext4__map_blocks_enter
, ext4_ind_map_blocks_enter
,
1515 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1516 unsigned len
, unsigned flags
),
1518 TP_ARGS(inode
, lblk
, len
, flags
)
1521 DECLARE_EVENT_CLASS(ext4__map_blocks_exit
,
1522 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1523 ext4_fsblk_t pblk
, unsigned int len
, int ret
),
1525 TP_ARGS(inode
, lblk
, pblk
, len
, ret
),
1528 __field( ino_t
, ino
)
1529 __field( dev_t
, dev
)
1530 __field( ext4_lblk_t
, lblk
)
1531 __field( ext4_fsblk_t
, pblk
)
1532 __field( unsigned int, len
)
1537 __entry
->ino
= inode
->i_ino
;
1538 __entry
->dev
= inode
->i_sb
->s_dev
;
1539 __entry
->lblk
= lblk
;
1540 __entry
->pblk
= pblk
;
1545 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d",
1546 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1547 (unsigned long) __entry
->ino
,
1548 __entry
->lblk
, __entry
->pblk
,
1549 __entry
->len
, __entry
->ret
)
1552 DEFINE_EVENT(ext4__map_blocks_exit
, ext4_ext_map_blocks_exit
,
1553 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1554 ext4_fsblk_t pblk
, unsigned len
, int ret
),
1556 TP_ARGS(inode
, lblk
, pblk
, len
, ret
)
1559 DEFINE_EVENT(ext4__map_blocks_exit
, ext4_ind_map_blocks_exit
,
1560 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1561 ext4_fsblk_t pblk
, unsigned len
, int ret
),
1563 TP_ARGS(inode
, lblk
, pblk
, len
, ret
)
1566 TRACE_EVENT(ext4_ext_load_extent
,
1567 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
),
1569 TP_ARGS(inode
, lblk
, pblk
),
1572 __field( ino_t
, ino
)
1573 __field( dev_t
, dev
)
1574 __field( ext4_lblk_t
, lblk
)
1575 __field( ext4_fsblk_t
, pblk
)
1579 __entry
->ino
= inode
->i_ino
;
1580 __entry
->dev
= inode
->i_sb
->s_dev
;
1581 __entry
->lblk
= lblk
;
1582 __entry
->pblk
= pblk
;
1585 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
1586 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1587 (unsigned long) __entry
->ino
,
1588 __entry
->lblk
, __entry
->pblk
)
1591 TRACE_EVENT(ext4_load_inode
,
1592 TP_PROTO(struct inode
*inode
),
1597 __field( ino_t
, ino
)
1598 __field( dev_t
, dev
)
1602 __entry
->ino
= inode
->i_ino
;
1603 __entry
->dev
= inode
->i_sb
->s_dev
;
1606 TP_printk("dev %d,%d ino %ld",
1607 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1608 (unsigned long) __entry
->ino
)
1611 TRACE_EVENT(ext4_journal_start
,
1612 TP_PROTO(struct super_block
*sb
, int nblocks
, unsigned long IP
),
1614 TP_ARGS(sb
, nblocks
, IP
),
1617 __field( dev_t
, dev
)
1618 __field( int, nblocks
)
1619 __field(unsigned long, ip
)
1623 __entry
->dev
= sb
->s_dev
;
1624 __entry
->nblocks
= nblocks
;
1628 TP_printk("dev %d,%d nblocks %d caller %pF",
1629 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1630 __entry
->nblocks
, (void *)__entry
->ip
)
1633 DECLARE_EVENT_CLASS(ext4__trim
,
1634 TP_PROTO(struct super_block
*sb
,
1636 ext4_grpblk_t start
,
1639 TP_ARGS(sb
, group
, start
, len
),
1642 __field( int, dev_major
)
1643 __field( int, dev_minor
)
1644 __field( __u32
, group
)
1645 __field( int, start
)
1650 __entry
->dev_major
= MAJOR(sb
->s_dev
);
1651 __entry
->dev_minor
= MINOR(sb
->s_dev
);
1652 __entry
->group
= group
;
1653 __entry
->start
= start
;
1657 TP_printk("dev %d,%d group %u, start %d, len %d",
1658 __entry
->dev_major
, __entry
->dev_minor
,
1659 __entry
->group
, __entry
->start
, __entry
->len
)
1662 DEFINE_EVENT(ext4__trim
, ext4_trim_extent
,
1664 TP_PROTO(struct super_block
*sb
,
1666 ext4_grpblk_t start
,
1669 TP_ARGS(sb
, group
, start
, len
)
1672 DEFINE_EVENT(ext4__trim
, ext4_trim_all_free
,
1674 TP_PROTO(struct super_block
*sb
,
1676 ext4_grpblk_t start
,
1679 TP_ARGS(sb
, group
, start
, len
)
1682 TRACE_EVENT(ext4_ext_handle_uninitialized_extents
,
1683 TP_PROTO(struct inode
*inode
, struct ext4_map_blocks
*map
,
1684 unsigned int allocated
, ext4_fsblk_t newblock
),
1686 TP_ARGS(inode
, map
, allocated
, newblock
),
1689 __field( ino_t
, ino
)
1690 __field( dev_t
, dev
)
1691 __field( ext4_lblk_t
, lblk
)
1692 __field( ext4_fsblk_t
, pblk
)
1693 __field( unsigned int, len
)
1694 __field( int, flags
)
1695 __field( unsigned int, allocated
)
1696 __field( ext4_fsblk_t
, newblk
)
1700 __entry
->ino
= inode
->i_ino
;
1701 __entry
->dev
= inode
->i_sb
->s_dev
;
1702 __entry
->lblk
= map
->m_lblk
;
1703 __entry
->pblk
= map
->m_pblk
;
1704 __entry
->len
= map
->m_len
;
1705 __entry
->flags
= map
->m_flags
;
1706 __entry
->allocated
= allocated
;
1707 __entry
->newblk
= newblock
;
1710 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d"
1711 "allocated %d newblock %llu",
1712 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1713 (unsigned long) __entry
->ino
,
1714 (unsigned) __entry
->lblk
, (unsigned long long) __entry
->pblk
,
1715 __entry
->len
, __entry
->flags
,
1716 (unsigned int) __entry
->allocated
,
1717 (unsigned long long) __entry
->newblk
)
1720 TRACE_EVENT(ext4_get_implied_cluster_alloc_exit
,
1721 TP_PROTO(struct super_block
*sb
, struct ext4_map_blocks
*map
, int ret
),
1723 TP_ARGS(sb
, map
, ret
),
1726 __field( dev_t
, dev
)
1727 __field( ext4_lblk_t
, lblk
)
1728 __field( ext4_fsblk_t
, pblk
)
1729 __field( unsigned int, len
)
1730 __field( unsigned int, flags
)
1735 __entry
->dev
= sb
->s_dev
;
1736 __entry
->lblk
= map
->m_lblk
;
1737 __entry
->pblk
= map
->m_pblk
;
1738 __entry
->len
= map
->m_len
;
1739 __entry
->flags
= map
->m_flags
;
1743 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d",
1744 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1745 __entry
->lblk
, (unsigned long long) __entry
->pblk
,
1746 __entry
->len
, __entry
->flags
, __entry
->ret
)
1749 TRACE_EVENT(ext4_ext_put_in_cache
,
1750 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, unsigned int len
,
1751 ext4_fsblk_t start
),
1753 TP_ARGS(inode
, lblk
, len
, start
),
1756 __field( ino_t
, ino
)
1757 __field( dev_t
, dev
)
1758 __field( ext4_lblk_t
, lblk
)
1759 __field( unsigned int, len
)
1760 __field( ext4_fsblk_t
, start
)
1764 __entry
->ino
= inode
->i_ino
;
1765 __entry
->dev
= inode
->i_sb
->s_dev
;
1766 __entry
->lblk
= lblk
;
1768 __entry
->start
= start
;
1771 TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu",
1772 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1773 (unsigned long) __entry
->ino
,
1774 (unsigned) __entry
->lblk
,
1776 (unsigned long long) __entry
->start
)
1779 TRACE_EVENT(ext4_ext_in_cache
,
1780 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, int ret
),
1782 TP_ARGS(inode
, lblk
, ret
),
1785 __field( ino_t
, ino
)
1786 __field( dev_t
, dev
)
1787 __field( ext4_lblk_t
, lblk
)
1792 __entry
->ino
= inode
->i_ino
;
1793 __entry
->dev
= inode
->i_sb
->s_dev
;
1794 __entry
->lblk
= lblk
;
1798 TP_printk("dev %d,%d ino %lu lblk %u ret %d",
1799 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1800 (unsigned long) __entry
->ino
,
1801 (unsigned) __entry
->lblk
,
1806 TRACE_EVENT(ext4_find_delalloc_range
,
1807 TP_PROTO(struct inode
*inode
, ext4_lblk_t from
, ext4_lblk_t to
,
1808 int reverse
, int found
, ext4_lblk_t found_blk
),
1810 TP_ARGS(inode
, from
, to
, reverse
, found
, found_blk
),
1813 __field( ino_t
, ino
)
1814 __field( dev_t
, dev
)
1815 __field( ext4_lblk_t
, from
)
1816 __field( ext4_lblk_t
, to
)
1817 __field( int, reverse
)
1818 __field( int, found
)
1819 __field( ext4_lblk_t
, found_blk
)
1823 __entry
->ino
= inode
->i_ino
;
1824 __entry
->dev
= inode
->i_sb
->s_dev
;
1825 __entry
->from
= from
;
1827 __entry
->reverse
= reverse
;
1828 __entry
->found
= found
;
1829 __entry
->found_blk
= found_blk
;
1832 TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d "
1834 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1835 (unsigned long) __entry
->ino
,
1836 (unsigned) __entry
->from
, (unsigned) __entry
->to
,
1837 __entry
->reverse
, __entry
->found
,
1838 (unsigned) __entry
->found_blk
)
1841 TRACE_EVENT(ext4_get_reserved_cluster_alloc
,
1842 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, unsigned int len
),
1844 TP_ARGS(inode
, lblk
, len
),
1847 __field( ino_t
, ino
)
1848 __field( dev_t
, dev
)
1849 __field( ext4_lblk_t
, lblk
)
1850 __field( unsigned int, len
)
1854 __entry
->ino
= inode
->i_ino
;
1855 __entry
->dev
= inode
->i_sb
->s_dev
;
1856 __entry
->lblk
= lblk
;
1860 TP_printk("dev %d,%d ino %lu lblk %u len %u",
1861 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1862 (unsigned long) __entry
->ino
,
1863 (unsigned) __entry
->lblk
,
1867 TRACE_EVENT(ext4_ext_show_extent
,
1868 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
,
1869 unsigned short len
),
1871 TP_ARGS(inode
, lblk
, pblk
, len
),
1874 __field( ino_t
, ino
)
1875 __field( dev_t
, dev
)
1876 __field( ext4_lblk_t
, lblk
)
1877 __field( ext4_fsblk_t
, pblk
)
1878 __field( unsigned short, len
)
1882 __entry
->ino
= inode
->i_ino
;
1883 __entry
->dev
= inode
->i_sb
->s_dev
;
1884 __entry
->lblk
= lblk
;
1885 __entry
->pblk
= pblk
;
1889 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
1890 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1891 (unsigned long) __entry
->ino
,
1892 (unsigned) __entry
->lblk
,
1893 (unsigned long long) __entry
->pblk
,
1894 (unsigned short) __entry
->len
)
1897 TRACE_EVENT(ext4_remove_blocks
,
1898 TP_PROTO(struct inode
*inode
, struct ext4_extent
*ex
,
1899 ext4_lblk_t from
, ext4_fsblk_t to
,
1900 ext4_fsblk_t partial_cluster
),
1902 TP_ARGS(inode
, ex
, from
, to
, partial_cluster
),
1905 __field( ino_t
, ino
)
1906 __field( dev_t
, dev
)
1907 __field( ext4_lblk_t
, ee_lblk
)
1908 __field( ext4_fsblk_t
, ee_pblk
)
1909 __field( unsigned short, ee_len
)
1910 __field( ext4_lblk_t
, from
)
1911 __field( ext4_lblk_t
, to
)
1912 __field( ext4_fsblk_t
, partial
)
1916 __entry
->ino
= inode
->i_ino
;
1917 __entry
->dev
= inode
->i_sb
->s_dev
;
1918 __entry
->ee_lblk
= cpu_to_le32(ex
->ee_block
);
1919 __entry
->ee_pblk
= ext4_ext_pblock(ex
);
1920 __entry
->ee_len
= ext4_ext_get_actual_len(ex
);
1921 __entry
->from
= from
;
1923 __entry
->partial
= partial_cluster
;
1926 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
1927 "from %u to %u partial_cluster %u",
1928 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1929 (unsigned long) __entry
->ino
,
1930 (unsigned) __entry
->ee_lblk
,
1931 (unsigned long long) __entry
->ee_pblk
,
1932 (unsigned short) __entry
->ee_len
,
1933 (unsigned) __entry
->from
,
1934 (unsigned) __entry
->to
,
1935 (unsigned) __entry
->partial
)
1938 TRACE_EVENT(ext4_ext_rm_leaf
,
1939 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
,
1940 struct ext4_extent
*ex
, ext4_fsblk_t partial_cluster
),
1942 TP_ARGS(inode
, start
, ex
, partial_cluster
),
1945 __field( ino_t
, ino
)
1946 __field( dev_t
, dev
)
1947 __field( ext4_lblk_t
, start
)
1948 __field( ext4_lblk_t
, ee_lblk
)
1949 __field( ext4_fsblk_t
, ee_pblk
)
1950 __field( short, ee_len
)
1951 __field( ext4_fsblk_t
, partial
)
1955 __entry
->ino
= inode
->i_ino
;
1956 __entry
->dev
= inode
->i_sb
->s_dev
;
1957 __entry
->start
= start
;
1958 __entry
->ee_lblk
= le32_to_cpu(ex
->ee_block
);
1959 __entry
->ee_pblk
= ext4_ext_pblock(ex
);
1960 __entry
->ee_len
= ext4_ext_get_actual_len(ex
);
1961 __entry
->partial
= partial_cluster
;
1964 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
1965 "partial_cluster %u",
1966 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1967 (unsigned long) __entry
->ino
,
1968 (unsigned) __entry
->start
,
1969 (unsigned) __entry
->ee_lblk
,
1970 (unsigned long long) __entry
->ee_pblk
,
1971 (unsigned short) __entry
->ee_len
,
1972 (unsigned) __entry
->partial
)
1975 TRACE_EVENT(ext4_ext_rm_idx
,
1976 TP_PROTO(struct inode
*inode
, ext4_fsblk_t pblk
),
1978 TP_ARGS(inode
, pblk
),
1981 __field( ino_t
, ino
)
1982 __field( dev_t
, dev
)
1983 __field( ext4_fsblk_t
, pblk
)
1987 __entry
->ino
= inode
->i_ino
;
1988 __entry
->dev
= inode
->i_sb
->s_dev
;
1989 __entry
->pblk
= pblk
;
1992 TP_printk("dev %d,%d ino %lu index_pblk %llu",
1993 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1994 (unsigned long) __entry
->ino
,
1995 (unsigned long long) __entry
->pblk
)
1998 TRACE_EVENT(ext4_ext_remove_space
,
1999 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, int depth
),
2001 TP_ARGS(inode
, start
, depth
),
2004 __field( ino_t
, ino
)
2005 __field( dev_t
, dev
)
2006 __field( ext4_lblk_t
, start
)
2007 __field( int, depth
)
2011 __entry
->ino
= inode
->i_ino
;
2012 __entry
->dev
= inode
->i_sb
->s_dev
;
2013 __entry
->start
= start
;
2014 __entry
->depth
= depth
;
2017 TP_printk("dev %d,%d ino %lu since %u depth %d",
2018 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2019 (unsigned long) __entry
->ino
,
2020 (unsigned) __entry
->start
,
2024 TRACE_EVENT(ext4_ext_remove_space_done
,
2025 TP_PROTO(struct inode
*inode
, ext4_lblk_t start
, int depth
,
2026 ext4_lblk_t partial
, unsigned short eh_entries
),
2028 TP_ARGS(inode
, start
, depth
, partial
, eh_entries
),
2031 __field( ino_t
, ino
)
2032 __field( dev_t
, dev
)
2033 __field( ext4_lblk_t
, start
)
2034 __field( int, depth
)
2035 __field( ext4_lblk_t
, partial
)
2036 __field( unsigned short, eh_entries
)
2040 __entry
->ino
= inode
->i_ino
;
2041 __entry
->dev
= inode
->i_sb
->s_dev
;
2042 __entry
->start
= start
;
2043 __entry
->depth
= depth
;
2044 __entry
->partial
= partial
;
2045 __entry
->eh_entries
= eh_entries
;
2048 TP_printk("dev %d,%d ino %lu since %u depth %d partial %u "
2049 "remaining_entries %u",
2050 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
2051 (unsigned long) __entry
->ino
,
2052 (unsigned) __entry
->start
,
2054 (unsigned) __entry
->partial
,
2055 (unsigned short) __entry
->eh_entries
)
2058 #endif /* _TRACE_EXT4_H */
2060 /* This part must be outside protection */
2061 #include <trace/define_trace.h>