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
;
12 struct ext4_prealloc_space
;
13 struct ext4_inode_info
;
16 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
18 TRACE_EVENT(ext4_free_inode
,
19 TP_PROTO(struct inode
*inode
),
26 __field( __u16
, mode
)
29 __field( __u64
, blocks
)
33 __entry
->dev
= inode
->i_sb
->s_dev
;
34 __entry
->ino
= inode
->i_ino
;
35 __entry
->mode
= inode
->i_mode
;
36 __entry
->uid
= inode
->i_uid
;
37 __entry
->gid
= inode
->i_gid
;
38 __entry
->blocks
= inode
->i_blocks
;
41 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
42 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
43 (unsigned long) __entry
->ino
, __entry
->mode
,
44 __entry
->uid
, __entry
->gid
, __entry
->blocks
)
47 TRACE_EVENT(ext4_request_inode
,
48 TP_PROTO(struct inode
*dir
, int mode
),
55 __field( __u16
, mode
)
59 __entry
->dev
= dir
->i_sb
->s_dev
;
60 __entry
->dir
= dir
->i_ino
;
64 TP_printk("dev %d,%d dir %lu mode 0%o",
65 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
66 (unsigned long) __entry
->dir
, __entry
->mode
)
69 TRACE_EVENT(ext4_allocate_inode
,
70 TP_PROTO(struct inode
*inode
, struct inode
*dir
, int mode
),
72 TP_ARGS(inode
, dir
, mode
),
78 __field( __u16
, mode
)
82 __entry
->dev
= inode
->i_sb
->s_dev
;
83 __entry
->ino
= inode
->i_ino
;
84 __entry
->dir
= dir
->i_ino
;
88 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
89 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
90 (unsigned long) __entry
->ino
,
91 (unsigned long) __entry
->dir
, __entry
->mode
)
94 TRACE_EVENT(ext4_evict_inode
,
95 TP_PROTO(struct inode
*inode
),
100 __field( dev_t
, dev
)
101 __field( ino_t
, ino
)
102 __field( int, nlink
)
106 __entry
->dev
= inode
->i_sb
->s_dev
;
107 __entry
->ino
= inode
->i_ino
;
108 __entry
->nlink
= inode
->i_nlink
;
111 TP_printk("dev %d,%d ino %lu nlink %d",
112 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
113 (unsigned long) __entry
->ino
, __entry
->nlink
)
116 TRACE_EVENT(ext4_drop_inode
,
117 TP_PROTO(struct inode
*inode
, int drop
),
119 TP_ARGS(inode
, drop
),
122 __field( dev_t
, dev
)
123 __field( ino_t
, ino
)
128 __entry
->dev
= inode
->i_sb
->s_dev
;
129 __entry
->ino
= inode
->i_ino
;
130 __entry
->drop
= drop
;
133 TP_printk("dev %d,%d ino %lu drop %d",
134 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
135 (unsigned long) __entry
->ino
, __entry
->drop
)
138 TRACE_EVENT(ext4_mark_inode_dirty
,
139 TP_PROTO(struct inode
*inode
, unsigned long IP
),
144 __field( dev_t
, dev
)
145 __field( ino_t
, ino
)
146 __field(unsigned long, ip
)
150 __entry
->dev
= inode
->i_sb
->s_dev
;
151 __entry
->ino
= inode
->i_ino
;
155 TP_printk("dev %d,%d ino %lu caller %pF",
156 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
157 (unsigned long) __entry
->ino
, (void *)__entry
->ip
)
160 TRACE_EVENT(ext4_begin_ordered_truncate
,
161 TP_PROTO(struct inode
*inode
, loff_t new_size
),
163 TP_ARGS(inode
, new_size
),
166 __field( dev_t
, dev
)
167 __field( ino_t
, ino
)
168 __field( loff_t
, new_size
)
172 __entry
->dev
= inode
->i_sb
->s_dev
;
173 __entry
->ino
= inode
->i_ino
;
174 __entry
->new_size
= new_size
;
177 TP_printk("dev %d,%d ino %lu new_size %lld",
178 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
179 (unsigned long) __entry
->ino
,
183 DECLARE_EVENT_CLASS(ext4__write_begin
,
185 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
188 TP_ARGS(inode
, pos
, len
, flags
),
191 __field( dev_t
, dev
)
192 __field( ino_t
, ino
)
193 __field( loff_t
, pos
)
194 __field( unsigned int, len
)
195 __field( unsigned int, flags
)
199 __entry
->dev
= inode
->i_sb
->s_dev
;
200 __entry
->ino
= inode
->i_ino
;
203 __entry
->flags
= flags
;
206 TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
207 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
208 (unsigned long) __entry
->ino
,
209 __entry
->pos
, __entry
->len
, __entry
->flags
)
212 DEFINE_EVENT(ext4__write_begin
, ext4_write_begin
,
214 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
217 TP_ARGS(inode
, pos
, len
, flags
)
220 DEFINE_EVENT(ext4__write_begin
, ext4_da_write_begin
,
222 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
225 TP_ARGS(inode
, pos
, len
, flags
)
228 DECLARE_EVENT_CLASS(ext4__write_end
,
229 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
230 unsigned int copied
),
232 TP_ARGS(inode
, pos
, len
, copied
),
235 __field( dev_t
, dev
)
236 __field( ino_t
, ino
)
237 __field( loff_t
, pos
)
238 __field( unsigned int, len
)
239 __field( unsigned int, copied
)
243 __entry
->dev
= inode
->i_sb
->s_dev
;
244 __entry
->ino
= inode
->i_ino
;
247 __entry
->copied
= copied
;
250 TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
251 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
252 (unsigned long) __entry
->ino
,
253 __entry
->pos
, __entry
->len
, __entry
->copied
)
256 DEFINE_EVENT(ext4__write_end
, ext4_ordered_write_end
,
258 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
259 unsigned int copied
),
261 TP_ARGS(inode
, pos
, len
, copied
)
264 DEFINE_EVENT(ext4__write_end
, ext4_writeback_write_end
,
266 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
267 unsigned int copied
),
269 TP_ARGS(inode
, pos
, len
, copied
)
272 DEFINE_EVENT(ext4__write_end
, ext4_journalled_write_end
,
274 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
275 unsigned int copied
),
277 TP_ARGS(inode
, pos
, len
, copied
)
280 DEFINE_EVENT(ext4__write_end
, ext4_da_write_end
,
282 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
283 unsigned int copied
),
285 TP_ARGS(inode
, pos
, len
, copied
)
288 TRACE_EVENT(ext4_da_writepages
,
289 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
294 __field( dev_t
, dev
)
295 __field( ino_t
, ino
)
296 __field( long, nr_to_write
)
297 __field( long, pages_skipped
)
298 __field( loff_t
, range_start
)
299 __field( loff_t
, range_end
)
300 __field( int, sync_mode
)
301 __field( char, for_kupdate
)
302 __field( char, range_cyclic
)
303 __field( pgoff_t
, writeback_index
)
307 __entry
->dev
= inode
->i_sb
->s_dev
;
308 __entry
->ino
= inode
->i_ino
;
309 __entry
->nr_to_write
= wbc
->nr_to_write
;
310 __entry
->pages_skipped
= wbc
->pages_skipped
;
311 __entry
->range_start
= wbc
->range_start
;
312 __entry
->range_end
= wbc
->range_end
;
313 __entry
->sync_mode
= wbc
->sync_mode
;
314 __entry
->for_kupdate
= wbc
->for_kupdate
;
315 __entry
->range_cyclic
= wbc
->range_cyclic
;
316 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
319 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
320 "range_start %lld range_end %lld sync_mode %d"
321 "for_kupdate %d range_cyclic %d writeback_index %lu",
322 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
323 (unsigned long) __entry
->ino
, __entry
->nr_to_write
,
324 __entry
->pages_skipped
, __entry
->range_start
,
325 __entry
->range_end
, __entry
->sync_mode
,
326 __entry
->for_kupdate
, __entry
->range_cyclic
,
327 (unsigned long) __entry
->writeback_index
)
330 TRACE_EVENT(ext4_da_write_pages
,
331 TP_PROTO(struct inode
*inode
, struct mpage_da_data
*mpd
),
336 __field( dev_t
, dev
)
337 __field( ino_t
, ino
)
338 __field( __u64
, b_blocknr
)
339 __field( __u32
, b_size
)
340 __field( __u32
, b_state
)
341 __field( unsigned long, first_page
)
342 __field( int, io_done
)
343 __field( int, pages_written
)
344 __field( int, sync_mode
)
348 __entry
->dev
= inode
->i_sb
->s_dev
;
349 __entry
->ino
= inode
->i_ino
;
350 __entry
->b_blocknr
= mpd
->b_blocknr
;
351 __entry
->b_size
= mpd
->b_size
;
352 __entry
->b_state
= mpd
->b_state
;
353 __entry
->first_page
= mpd
->first_page
;
354 __entry
->io_done
= mpd
->io_done
;
355 __entry
->pages_written
= mpd
->pages_written
;
356 __entry
->sync_mode
= mpd
->wbc
->sync_mode
;
359 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x "
360 "first_page %lu io_done %d pages_written %d sync_mode %d",
361 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
362 (unsigned long) __entry
->ino
,
363 __entry
->b_blocknr
, __entry
->b_size
,
364 __entry
->b_state
, __entry
->first_page
,
365 __entry
->io_done
, __entry
->pages_written
,
370 TRACE_EVENT(ext4_da_writepages_result
,
371 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
,
372 int ret
, int pages_written
),
374 TP_ARGS(inode
, wbc
, ret
, pages_written
),
377 __field( dev_t
, dev
)
378 __field( ino_t
, ino
)
380 __field( int, pages_written
)
381 __field( long, pages_skipped
)
382 __field( int, sync_mode
)
383 __field( pgoff_t
, writeback_index
)
387 __entry
->dev
= inode
->i_sb
->s_dev
;
388 __entry
->ino
= inode
->i_ino
;
390 __entry
->pages_written
= pages_written
;
391 __entry
->pages_skipped
= wbc
->pages_skipped
;
392 __entry
->sync_mode
= wbc
->sync_mode
;
393 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
396 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
397 "sync_mode %d writeback_index %lu",
398 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
399 (unsigned long) __entry
->ino
, __entry
->ret
,
400 __entry
->pages_written
, __entry
->pages_skipped
,
402 (unsigned long) __entry
->writeback_index
)
405 DECLARE_EVENT_CLASS(ext4__page_op
,
406 TP_PROTO(struct page
*page
),
411 __field( pgoff_t
, index
)
412 __field( ino_t
, ino
)
413 __field( dev_t
, dev
)
418 __entry
->index
= page
->index
;
419 __entry
->ino
= page
->mapping
->host
->i_ino
;
420 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
423 TP_printk("dev %d,%d ino %lu page_index %lu",
424 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
425 (unsigned long) __entry
->ino
,
426 (unsigned long) __entry
->index
)
429 DEFINE_EVENT(ext4__page_op
, ext4_writepage
,
431 TP_PROTO(struct page
*page
),
436 DEFINE_EVENT(ext4__page_op
, ext4_readpage
,
438 TP_PROTO(struct page
*page
),
443 DEFINE_EVENT(ext4__page_op
, ext4_releasepage
,
445 TP_PROTO(struct page
*page
),
450 TRACE_EVENT(ext4_invalidatepage
,
451 TP_PROTO(struct page
*page
, unsigned long offset
),
453 TP_ARGS(page
, offset
),
456 __field( pgoff_t
, index
)
457 __field( unsigned long, offset
)
458 __field( ino_t
, ino
)
459 __field( dev_t
, dev
)
464 __entry
->index
= page
->index
;
465 __entry
->offset
= offset
;
466 __entry
->ino
= page
->mapping
->host
->i_ino
;
467 __entry
->dev
= page
->mapping
->host
->i_sb
->s_dev
;
470 TP_printk("dev %d,%d ino %lu page_index %lu offset %lu",
471 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
472 (unsigned long) __entry
->ino
,
473 (unsigned long) __entry
->index
, __entry
->offset
)
476 TRACE_EVENT(ext4_discard_blocks
,
477 TP_PROTO(struct super_block
*sb
, unsigned long long blk
,
478 unsigned long long count
),
480 TP_ARGS(sb
, blk
, count
),
483 __field( dev_t
, dev
)
484 __field( __u64
, blk
)
485 __field( __u64
, count
)
490 __entry
->dev
= sb
->s_dev
;
492 __entry
->count
= count
;
495 TP_printk("dev %d,%d blk %llu count %llu",
496 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
497 __entry
->blk
, __entry
->count
)
500 DECLARE_EVENT_CLASS(ext4__mb_new_pa
,
501 TP_PROTO(struct ext4_allocation_context
*ac
,
502 struct ext4_prealloc_space
*pa
),
507 __field( dev_t
, dev
)
508 __field( ino_t
, ino
)
509 __field( __u64
, pa_pstart
)
510 __field( __u32
, pa_len
)
511 __field( __u64
, pa_lstart
)
516 __entry
->dev
= ac
->ac_sb
->s_dev
;
517 __entry
->ino
= ac
->ac_inode
->i_ino
;
518 __entry
->pa_pstart
= pa
->pa_pstart
;
519 __entry
->pa_len
= pa
->pa_len
;
520 __entry
->pa_lstart
= pa
->pa_lstart
;
523 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
524 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
525 (unsigned long) __entry
->ino
,
526 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
529 DEFINE_EVENT(ext4__mb_new_pa
, ext4_mb_new_inode_pa
,
531 TP_PROTO(struct ext4_allocation_context
*ac
,
532 struct ext4_prealloc_space
*pa
),
537 DEFINE_EVENT(ext4__mb_new_pa
, ext4_mb_new_group_pa
,
539 TP_PROTO(struct ext4_allocation_context
*ac
,
540 struct ext4_prealloc_space
*pa
),
545 TRACE_EVENT(ext4_mb_release_inode_pa
,
546 TP_PROTO(struct ext4_prealloc_space
*pa
,
547 unsigned long long block
, unsigned int count
),
549 TP_ARGS(pa
, block
, count
),
552 __field( dev_t
, dev
)
553 __field( ino_t
, ino
)
554 __field( __u64
, block
)
555 __field( __u32
, count
)
560 __entry
->dev
= pa
->pa_inode
->i_sb
->s_dev
;
561 __entry
->ino
= pa
->pa_inode
->i_ino
;
562 __entry
->block
= block
;
563 __entry
->count
= count
;
566 TP_printk("dev %d,%d ino %lu block %llu count %u",
567 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
568 (unsigned long) __entry
->ino
,
569 __entry
->block
, __entry
->count
)
572 TRACE_EVENT(ext4_mb_release_group_pa
,
573 TP_PROTO(struct ext4_prealloc_space
*pa
),
578 __field( dev_t
, dev
)
579 __field( __u64
, pa_pstart
)
580 __field( __u32
, pa_len
)
585 __entry
->dev
= pa
->pa_inode
->i_sb
->s_dev
;
586 __entry
->pa_pstart
= pa
->pa_pstart
;
587 __entry
->pa_len
= pa
->pa_len
;
590 TP_printk("dev %d,%d pstart %llu len %u",
591 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
592 __entry
->pa_pstart
, __entry
->pa_len
)
595 TRACE_EVENT(ext4_discard_preallocations
,
596 TP_PROTO(struct inode
*inode
),
601 __field( dev_t
, dev
)
602 __field( ino_t
, ino
)
607 __entry
->dev
= inode
->i_sb
->s_dev
;
608 __entry
->ino
= inode
->i_ino
;
611 TP_printk("dev %d,%d ino %lu",
612 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
613 (unsigned long) __entry
->ino
)
616 TRACE_EVENT(ext4_mb_discard_preallocations
,
617 TP_PROTO(struct super_block
*sb
, int needed
),
622 __field( dev_t
, dev
)
623 __field( int, needed
)
628 __entry
->dev
= sb
->s_dev
;
629 __entry
->needed
= needed
;
632 TP_printk("dev %d,%d needed %d",
633 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
637 TRACE_EVENT(ext4_request_blocks
,
638 TP_PROTO(struct ext4_allocation_request
*ar
),
643 __field( dev_t
, dev
)
644 __field( ino_t
, ino
)
645 __field( unsigned int, flags
)
646 __field( unsigned int, len
)
647 __field( __u32
, logical
)
648 __field( __u32
, lleft
)
649 __field( __u32
, lright
)
650 __field( __u64
, goal
)
651 __field( __u64
, pleft
)
652 __field( __u64
, pright
)
656 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
657 __entry
->ino
= ar
->inode
->i_ino
;
658 __entry
->flags
= ar
->flags
;
659 __entry
->len
= ar
->len
;
660 __entry
->logical
= ar
->logical
;
661 __entry
->goal
= ar
->goal
;
662 __entry
->lleft
= ar
->lleft
;
663 __entry
->lright
= ar
->lright
;
664 __entry
->pleft
= ar
->pleft
;
665 __entry
->pright
= ar
->pright
;
668 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu "
669 "lleft %u lright %u pleft %llu pright %llu ",
670 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
671 (unsigned long) __entry
->ino
, __entry
->flags
,
672 __entry
->len
, __entry
->logical
, __entry
->goal
,
673 __entry
->lleft
, __entry
->lright
, __entry
->pleft
,
677 TRACE_EVENT(ext4_allocate_blocks
,
678 TP_PROTO(struct ext4_allocation_request
*ar
, unsigned long long block
),
683 __field( dev_t
, dev
)
684 __field( ino_t
, ino
)
685 __field( __u64
, block
)
686 __field( unsigned int, flags
)
687 __field( unsigned int, len
)
688 __field( __u32
, logical
)
689 __field( __u32
, lleft
)
690 __field( __u32
, lright
)
691 __field( __u64
, goal
)
692 __field( __u64
, pleft
)
693 __field( __u64
, pright
)
697 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
698 __entry
->ino
= ar
->inode
->i_ino
;
699 __entry
->block
= block
;
700 __entry
->flags
= ar
->flags
;
701 __entry
->len
= ar
->len
;
702 __entry
->logical
= ar
->logical
;
703 __entry
->goal
= ar
->goal
;
704 __entry
->lleft
= ar
->lleft
;
705 __entry
->lright
= ar
->lright
;
706 __entry
->pleft
= ar
->pleft
;
707 __entry
->pright
= ar
->pright
;
710 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u "
711 "goal %llu lleft %u lright %u pleft %llu pright %llu",
712 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
713 (unsigned long) __entry
->ino
, __entry
->flags
,
714 __entry
->len
, __entry
->block
, __entry
->logical
,
715 __entry
->goal
, __entry
->lleft
, __entry
->lright
,
716 __entry
->pleft
, __entry
->pright
)
719 TRACE_EVENT(ext4_free_blocks
,
720 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
723 TP_ARGS(inode
, block
, count
, flags
),
726 __field( dev_t
, dev
)
727 __field( ino_t
, ino
)
728 __field( __u16
, mode
)
729 __field( __u64
, block
)
730 __field( unsigned long, count
)
731 __field( int, flags
)
735 __entry
->dev
= inode
->i_sb
->s_dev
;
736 __entry
->ino
= inode
->i_ino
;
737 __entry
->mode
= inode
->i_mode
;
738 __entry
->block
= block
;
739 __entry
->count
= count
;
740 __entry
->flags
= flags
;
743 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
744 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
745 (unsigned long) __entry
->ino
,
746 __entry
->mode
, __entry
->block
, __entry
->count
,
750 TRACE_EVENT(ext4_sync_file_enter
,
751 TP_PROTO(struct file
*file
, int datasync
),
753 TP_ARGS(file
, datasync
),
756 __field( dev_t
, dev
)
757 __field( ino_t
, ino
)
758 __field( ino_t
, parent
)
759 __field( int, datasync
)
763 struct dentry
*dentry
= file
->f_path
.dentry
;
765 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
766 __entry
->ino
= dentry
->d_inode
->i_ino
;
767 __entry
->datasync
= datasync
;
768 __entry
->parent
= dentry
->d_parent
->d_inode
->i_ino
;
771 TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
772 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
773 (unsigned long) __entry
->ino
,
774 (unsigned long) __entry
->parent
, __entry
->datasync
)
777 TRACE_EVENT(ext4_sync_file_exit
,
778 TP_PROTO(struct inode
*inode
, int ret
),
784 __field( ino_t
, ino
)
785 __field( dev_t
, dev
)
790 __entry
->ino
= inode
->i_ino
;
791 __entry
->dev
= inode
->i_sb
->s_dev
;
794 TP_printk("dev %d,%d ino %lu ret %d",
795 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
796 (unsigned long) __entry
->ino
,
800 TRACE_EVENT(ext4_sync_fs
,
801 TP_PROTO(struct super_block
*sb
, int wait
),
806 __field( dev_t
, dev
)
812 __entry
->dev
= sb
->s_dev
;
813 __entry
->wait
= wait
;
816 TP_printk("dev %d,%d wait %d",
817 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
821 TRACE_EVENT(ext4_alloc_da_blocks
,
822 TP_PROTO(struct inode
*inode
),
827 __field( dev_t
, dev
)
828 __field( ino_t
, ino
)
829 __field( unsigned int, data_blocks
)
830 __field( unsigned int, meta_blocks
)
834 __entry
->dev
= inode
->i_sb
->s_dev
;
835 __entry
->ino
= inode
->i_ino
;
836 __entry
->data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
837 __entry
->meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
840 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
841 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
842 (unsigned long) __entry
->ino
,
843 __entry
->data_blocks
, __entry
->meta_blocks
)
846 TRACE_EVENT(ext4_mballoc_alloc
,
847 TP_PROTO(struct ext4_allocation_context
*ac
),
852 __field( dev_t
, dev
)
853 __field( ino_t
, ino
)
854 __field( __u16
, found
)
855 __field( __u16
, groups
)
856 __field( __u16
, buddy
)
857 __field( __u16
, flags
)
858 __field( __u16
, tail
)
860 __field( __u32
, orig_logical
)
861 __field( int, orig_start
)
862 __field( __u32
, orig_group
)
863 __field( int, orig_len
)
864 __field( __u32
, goal_logical
)
865 __field( int, goal_start
)
866 __field( __u32
, goal_group
)
867 __field( int, goal_len
)
868 __field( __u32
, result_logical
)
869 __field( int, result_start
)
870 __field( __u32
, result_group
)
871 __field( int, result_len
)
875 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
876 __entry
->ino
= ac
->ac_inode
->i_ino
;
877 __entry
->found
= ac
->ac_found
;
878 __entry
->flags
= ac
->ac_flags
;
879 __entry
->groups
= ac
->ac_groups_scanned
;
880 __entry
->buddy
= ac
->ac_buddy
;
881 __entry
->tail
= ac
->ac_tail
;
882 __entry
->cr
= ac
->ac_criteria
;
883 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
884 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
885 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
886 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
887 __entry
->goal_logical
= ac
->ac_g_ex
.fe_logical
;
888 __entry
->goal_start
= ac
->ac_g_ex
.fe_start
;
889 __entry
->goal_group
= ac
->ac_g_ex
.fe_group
;
890 __entry
->goal_len
= ac
->ac_g_ex
.fe_len
;
891 __entry
->result_logical
= ac
->ac_f_ex
.fe_logical
;
892 __entry
->result_start
= ac
->ac_f_ex
.fe_start
;
893 __entry
->result_group
= ac
->ac_f_ex
.fe_group
;
894 __entry
->result_len
= ac
->ac_f_ex
.fe_len
;
897 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
898 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
900 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
901 (unsigned long) __entry
->ino
,
902 __entry
->orig_group
, __entry
->orig_start
,
903 __entry
->orig_len
, __entry
->orig_logical
,
904 __entry
->goal_group
, __entry
->goal_start
,
905 __entry
->goal_len
, __entry
->goal_logical
,
906 __entry
->result_group
, __entry
->result_start
,
907 __entry
->result_len
, __entry
->result_logical
,
908 __entry
->found
, __entry
->groups
, __entry
->cr
,
909 __entry
->flags
, __entry
->tail
,
910 __entry
->buddy
? 1 << __entry
->buddy
: 0)
913 TRACE_EVENT(ext4_mballoc_prealloc
,
914 TP_PROTO(struct ext4_allocation_context
*ac
),
919 __field( dev_t
, dev
)
920 __field( ino_t
, ino
)
921 __field( __u32
, orig_logical
)
922 __field( int, orig_start
)
923 __field( __u32
, orig_group
)
924 __field( int, orig_len
)
925 __field( __u32
, result_logical
)
926 __field( int, result_start
)
927 __field( __u32
, result_group
)
928 __field( int, result_len
)
932 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
933 __entry
->ino
= ac
->ac_inode
->i_ino
;
934 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
935 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
936 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
937 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
938 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
939 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
940 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
941 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
944 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
945 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
946 (unsigned long) __entry
->ino
,
947 __entry
->orig_group
, __entry
->orig_start
,
948 __entry
->orig_len
, __entry
->orig_logical
,
949 __entry
->result_group
, __entry
->result_start
,
950 __entry
->result_len
, __entry
->result_logical
)
953 DECLARE_EVENT_CLASS(ext4__mballoc
,
954 TP_PROTO(struct super_block
*sb
,
960 TP_ARGS(sb
, inode
, group
, start
, len
),
963 __field( dev_t
, dev
)
964 __field( ino_t
, ino
)
965 __field( int, result_start
)
966 __field( __u32
, result_group
)
967 __field( int, result_len
)
971 __entry
->dev
= sb
->s_dev
;
972 __entry
->ino
= inode
? inode
->i_ino
: 0;
973 __entry
->result_start
= start
;
974 __entry
->result_group
= group
;
975 __entry
->result_len
= len
;
978 TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
979 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
980 (unsigned long) __entry
->ino
,
981 __entry
->result_group
, __entry
->result_start
,
985 DEFINE_EVENT(ext4__mballoc
, ext4_mballoc_discard
,
987 TP_PROTO(struct super_block
*sb
,
993 TP_ARGS(sb
, inode
, group
, start
, len
)
996 DEFINE_EVENT(ext4__mballoc
, ext4_mballoc_free
,
998 TP_PROTO(struct super_block
*sb
,
1001 ext4_grpblk_t start
,
1004 TP_ARGS(sb
, inode
, group
, start
, len
)
1007 TRACE_EVENT(ext4_forget
,
1008 TP_PROTO(struct inode
*inode
, int is_metadata
, __u64 block
),
1010 TP_ARGS(inode
, is_metadata
, block
),
1013 __field( dev_t
, dev
)
1014 __field( ino_t
, ino
)
1015 __field( __u16
, mode
)
1016 __field( int, is_metadata
)
1017 __field( __u64
, block
)
1021 __entry
->dev
= inode
->i_sb
->s_dev
;
1022 __entry
->ino
= inode
->i_ino
;
1023 __entry
->mode
= inode
->i_mode
;
1024 __entry
->is_metadata
= is_metadata
;
1025 __entry
->block
= block
;
1028 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
1029 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1030 (unsigned long) __entry
->ino
,
1031 __entry
->mode
, __entry
->is_metadata
, __entry
->block
)
1034 TRACE_EVENT(ext4_da_update_reserve_space
,
1035 TP_PROTO(struct inode
*inode
, int used_blocks
),
1037 TP_ARGS(inode
, used_blocks
),
1040 __field( dev_t
, dev
)
1041 __field( ino_t
, ino
)
1042 __field( __u16
, mode
)
1043 __field( __u64
, i_blocks
)
1044 __field( int, used_blocks
)
1045 __field( int, reserved_data_blocks
)
1046 __field( int, reserved_meta_blocks
)
1047 __field( int, allocated_meta_blocks
)
1051 __entry
->dev
= inode
->i_sb
->s_dev
;
1052 __entry
->ino
= inode
->i_ino
;
1053 __entry
->mode
= inode
->i_mode
;
1054 __entry
->i_blocks
= inode
->i_blocks
;
1055 __entry
->used_blocks
= used_blocks
;
1056 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1057 __entry
->reserved_meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
1058 __entry
->allocated_meta_blocks
= EXT4_I(inode
)->i_allocated_meta_blocks
;
1061 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1062 "reserved_data_blocks %d reserved_meta_blocks %d "
1063 "allocated_meta_blocks %d",
1064 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1065 (unsigned long) __entry
->ino
,
1066 __entry
->mode
, __entry
->i_blocks
,
1067 __entry
->used_blocks
, __entry
->reserved_data_blocks
,
1068 __entry
->reserved_meta_blocks
, __entry
->allocated_meta_blocks
)
1071 TRACE_EVENT(ext4_da_reserve_space
,
1072 TP_PROTO(struct inode
*inode
, int md_needed
),
1074 TP_ARGS(inode
, md_needed
),
1077 __field( dev_t
, dev
)
1078 __field( ino_t
, ino
)
1079 __field( __u16
, mode
)
1080 __field( __u64
, i_blocks
)
1081 __field( int, md_needed
)
1082 __field( int, reserved_data_blocks
)
1083 __field( int, reserved_meta_blocks
)
1087 __entry
->dev
= inode
->i_sb
->s_dev
;
1088 __entry
->ino
= inode
->i_ino
;
1089 __entry
->mode
= inode
->i_mode
;
1090 __entry
->i_blocks
= inode
->i_blocks
;
1091 __entry
->md_needed
= md_needed
;
1092 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1093 __entry
->reserved_meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
1096 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
1097 "reserved_data_blocks %d reserved_meta_blocks %d",
1098 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1099 (unsigned long) __entry
->ino
,
1100 __entry
->mode
, __entry
->i_blocks
,
1101 __entry
->md_needed
, __entry
->reserved_data_blocks
,
1102 __entry
->reserved_meta_blocks
)
1105 TRACE_EVENT(ext4_da_release_space
,
1106 TP_PROTO(struct inode
*inode
, int freed_blocks
),
1108 TP_ARGS(inode
, freed_blocks
),
1111 __field( dev_t
, dev
)
1112 __field( ino_t
, ino
)
1113 __field( __u16
, mode
)
1114 __field( __u64
, i_blocks
)
1115 __field( int, freed_blocks
)
1116 __field( int, reserved_data_blocks
)
1117 __field( int, reserved_meta_blocks
)
1118 __field( int, allocated_meta_blocks
)
1122 __entry
->dev
= inode
->i_sb
->s_dev
;
1123 __entry
->ino
= inode
->i_ino
;
1124 __entry
->mode
= inode
->i_mode
;
1125 __entry
->i_blocks
= inode
->i_blocks
;
1126 __entry
->freed_blocks
= freed_blocks
;
1127 __entry
->reserved_data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
1128 __entry
->reserved_meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
1129 __entry
->allocated_meta_blocks
= EXT4_I(inode
)->i_allocated_meta_blocks
;
1132 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1133 "reserved_data_blocks %d reserved_meta_blocks %d "
1134 "allocated_meta_blocks %d",
1135 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1136 (unsigned long) __entry
->ino
,
1137 __entry
->mode
, __entry
->i_blocks
,
1138 __entry
->freed_blocks
, __entry
->reserved_data_blocks
,
1139 __entry
->reserved_meta_blocks
, __entry
->allocated_meta_blocks
)
1142 DECLARE_EVENT_CLASS(ext4__bitmap_load
,
1143 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1148 __field( dev_t
, dev
)
1149 __field( __u32
, group
)
1154 __entry
->dev
= sb
->s_dev
;
1155 __entry
->group
= group
;
1158 TP_printk("dev %d,%d group %u",
1159 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1163 DEFINE_EVENT(ext4__bitmap_load
, ext4_mb_bitmap_load
,
1165 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1170 DEFINE_EVENT(ext4__bitmap_load
, ext4_mb_buddy_bitmap_load
,
1172 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1177 DEFINE_EVENT(ext4__bitmap_load
, ext4_read_block_bitmap_load
,
1179 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1184 DEFINE_EVENT(ext4__bitmap_load
, ext4_load_inode_bitmap
,
1186 TP_PROTO(struct super_block
*sb
, unsigned long group
),
1191 TRACE_EVENT(ext4_direct_IO_enter
,
1192 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
, int rw
),
1194 TP_ARGS(inode
, offset
, len
, rw
),
1197 __field( ino_t
, ino
)
1198 __field( dev_t
, dev
)
1199 __field( loff_t
, pos
)
1200 __field( unsigned long, len
)
1205 __entry
->ino
= inode
->i_ino
;
1206 __entry
->dev
= inode
->i_sb
->s_dev
;
1207 __entry
->pos
= offset
;
1212 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d",
1213 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1214 (unsigned long) __entry
->ino
,
1215 __entry
->pos
, __entry
->len
, __entry
->rw
)
1218 TRACE_EVENT(ext4_direct_IO_exit
,
1219 TP_PROTO(struct inode
*inode
, loff_t offset
, unsigned long len
,
1222 TP_ARGS(inode
, offset
, len
, rw
, ret
),
1225 __field( ino_t
, ino
)
1226 __field( dev_t
, dev
)
1227 __field( loff_t
, pos
)
1228 __field( unsigned long, len
)
1234 __entry
->ino
= inode
->i_ino
;
1235 __entry
->dev
= inode
->i_sb
->s_dev
;
1236 __entry
->pos
= offset
;
1242 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
1243 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1244 (unsigned long) __entry
->ino
,
1245 __entry
->pos
, __entry
->len
,
1246 __entry
->rw
, __entry
->ret
)
1249 TRACE_EVENT(ext4_fallocate_enter
,
1250 TP_PROTO(struct inode
*inode
, loff_t offset
, loff_t len
, int mode
),
1252 TP_ARGS(inode
, offset
, len
, mode
),
1255 __field( ino_t
, ino
)
1256 __field( dev_t
, dev
)
1257 __field( loff_t
, pos
)
1258 __field( loff_t
, len
)
1259 __field( int, mode
)
1263 __entry
->ino
= inode
->i_ino
;
1264 __entry
->dev
= inode
->i_sb
->s_dev
;
1265 __entry
->pos
= offset
;
1267 __entry
->mode
= mode
;
1270 TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d",
1271 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1272 (unsigned long) __entry
->ino
, __entry
->pos
,
1273 __entry
->len
, __entry
->mode
)
1276 TRACE_EVENT(ext4_fallocate_exit
,
1277 TP_PROTO(struct inode
*inode
, loff_t offset
,
1278 unsigned int max_blocks
, int ret
),
1280 TP_ARGS(inode
, offset
, max_blocks
, ret
),
1283 __field( ino_t
, ino
)
1284 __field( dev_t
, dev
)
1285 __field( loff_t
, pos
)
1286 __field( unsigned int, blocks
)
1291 __entry
->ino
= inode
->i_ino
;
1292 __entry
->dev
= inode
->i_sb
->s_dev
;
1293 __entry
->pos
= offset
;
1294 __entry
->blocks
= max_blocks
;
1298 TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
1299 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1300 (unsigned long) __entry
->ino
,
1301 __entry
->pos
, __entry
->blocks
,
1305 TRACE_EVENT(ext4_unlink_enter
,
1306 TP_PROTO(struct inode
*parent
, struct dentry
*dentry
),
1308 TP_ARGS(parent
, dentry
),
1311 __field( ino_t
, parent
)
1312 __field( ino_t
, ino
)
1313 __field( loff_t
, size
)
1314 __field( dev_t
, dev
)
1318 __entry
->parent
= parent
->i_ino
;
1319 __entry
->ino
= dentry
->d_inode
->i_ino
;
1320 __entry
->size
= dentry
->d_inode
->i_size
;
1321 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
1324 TP_printk("dev %d,%d ino %lu size %lld parent %lu",
1325 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1326 (unsigned long) __entry
->ino
, __entry
->size
,
1327 (unsigned long) __entry
->parent
)
1330 TRACE_EVENT(ext4_unlink_exit
,
1331 TP_PROTO(struct dentry
*dentry
, int ret
),
1333 TP_ARGS(dentry
, ret
),
1336 __field( ino_t
, ino
)
1337 __field( dev_t
, dev
)
1342 __entry
->ino
= dentry
->d_inode
->i_ino
;
1343 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
1347 TP_printk("dev %d,%d ino %lu ret %d",
1348 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1349 (unsigned long) __entry
->ino
,
1353 DECLARE_EVENT_CLASS(ext4__truncate
,
1354 TP_PROTO(struct inode
*inode
),
1359 __field( ino_t
, ino
)
1360 __field( dev_t
, dev
)
1361 __field( __u64
, blocks
)
1365 __entry
->ino
= inode
->i_ino
;
1366 __entry
->dev
= inode
->i_sb
->s_dev
;
1367 __entry
->blocks
= inode
->i_blocks
;
1370 TP_printk("dev %d,%d ino %lu blocks %llu",
1371 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1372 (unsigned long) __entry
->ino
, __entry
->blocks
)
1375 DEFINE_EVENT(ext4__truncate
, ext4_truncate_enter
,
1377 TP_PROTO(struct inode
*inode
),
1382 DEFINE_EVENT(ext4__truncate
, ext4_truncate_exit
,
1384 TP_PROTO(struct inode
*inode
),
1389 DECLARE_EVENT_CLASS(ext4__map_blocks_enter
,
1390 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1391 unsigned int len
, unsigned int flags
),
1393 TP_ARGS(inode
, lblk
, len
, flags
),
1396 __field( ino_t
, ino
)
1397 __field( dev_t
, dev
)
1398 __field( ext4_lblk_t
, lblk
)
1399 __field( unsigned int, len
)
1400 __field( unsigned int, flags
)
1404 __entry
->ino
= inode
->i_ino
;
1405 __entry
->dev
= inode
->i_sb
->s_dev
;
1406 __entry
->lblk
= lblk
;
1408 __entry
->flags
= flags
;
1411 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u",
1412 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1413 (unsigned long) __entry
->ino
,
1414 __entry
->lblk
, __entry
->len
, __entry
->flags
)
1417 DEFINE_EVENT(ext4__map_blocks_enter
, ext4_ext_map_blocks_enter
,
1418 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1419 unsigned len
, unsigned flags
),
1421 TP_ARGS(inode
, lblk
, len
, flags
)
1424 DEFINE_EVENT(ext4__map_blocks_enter
, ext4_ind_map_blocks_enter
,
1425 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1426 unsigned len
, unsigned flags
),
1428 TP_ARGS(inode
, lblk
, len
, flags
)
1431 DECLARE_EVENT_CLASS(ext4__map_blocks_exit
,
1432 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1433 ext4_fsblk_t pblk
, unsigned int len
, int ret
),
1435 TP_ARGS(inode
, lblk
, pblk
, len
, ret
),
1438 __field( ino_t
, ino
)
1439 __field( dev_t
, dev
)
1440 __field( ext4_lblk_t
, lblk
)
1441 __field( ext4_fsblk_t
, pblk
)
1442 __field( unsigned int, len
)
1447 __entry
->ino
= inode
->i_ino
;
1448 __entry
->dev
= inode
->i_sb
->s_dev
;
1449 __entry
->lblk
= lblk
;
1450 __entry
->pblk
= pblk
;
1455 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d",
1456 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1457 (unsigned long) __entry
->ino
,
1458 __entry
->lblk
, __entry
->pblk
,
1459 __entry
->len
, __entry
->ret
)
1462 DEFINE_EVENT(ext4__map_blocks_exit
, ext4_ext_map_blocks_exit
,
1463 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1464 ext4_fsblk_t pblk
, unsigned len
, int ret
),
1466 TP_ARGS(inode
, lblk
, pblk
, len
, ret
)
1469 DEFINE_EVENT(ext4__map_blocks_exit
, ext4_ind_map_blocks_exit
,
1470 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
,
1471 ext4_fsblk_t pblk
, unsigned len
, int ret
),
1473 TP_ARGS(inode
, lblk
, pblk
, len
, ret
)
1476 TRACE_EVENT(ext4_ext_load_extent
,
1477 TP_PROTO(struct inode
*inode
, ext4_lblk_t lblk
, ext4_fsblk_t pblk
),
1479 TP_ARGS(inode
, lblk
, pblk
),
1482 __field( ino_t
, ino
)
1483 __field( dev_t
, dev
)
1484 __field( ext4_lblk_t
, lblk
)
1485 __field( ext4_fsblk_t
, pblk
)
1489 __entry
->ino
= inode
->i_ino
;
1490 __entry
->dev
= inode
->i_sb
->s_dev
;
1491 __entry
->lblk
= lblk
;
1492 __entry
->pblk
= pblk
;
1495 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
1496 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1497 (unsigned long) __entry
->ino
,
1498 __entry
->lblk
, __entry
->pblk
)
1501 TRACE_EVENT(ext4_load_inode
,
1502 TP_PROTO(struct inode
*inode
),
1507 __field( ino_t
, ino
)
1508 __field( dev_t
, dev
)
1512 __entry
->ino
= inode
->i_ino
;
1513 __entry
->dev
= inode
->i_sb
->s_dev
;
1516 TP_printk("dev %d,%d ino %ld",
1517 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1518 (unsigned long) __entry
->ino
)
1521 TRACE_EVENT(ext4_journal_start
,
1522 TP_PROTO(struct super_block
*sb
, int nblocks
, unsigned long IP
),
1524 TP_ARGS(sb
, nblocks
, IP
),
1527 __field( dev_t
, dev
)
1528 __field( int, nblocks
)
1529 __field(unsigned long, ip
)
1533 __entry
->dev
= sb
->s_dev
;
1534 __entry
->nblocks
= nblocks
;
1538 TP_printk("dev %d,%d nblocks %d caller %pF",
1539 MAJOR(__entry
->dev
), MINOR(__entry
->dev
),
1540 __entry
->nblocks
, (void *)__entry
->ip
)
1543 DECLARE_EVENT_CLASS(ext4__trim
,
1544 TP_PROTO(struct super_block
*sb
,
1546 ext4_grpblk_t start
,
1549 TP_ARGS(sb
, group
, start
, len
),
1552 __field( int, dev_major
)
1553 __field( int, dev_minor
)
1554 __field( __u32
, group
)
1555 __field( int, start
)
1560 __entry
->dev_major
= MAJOR(sb
->s_dev
);
1561 __entry
->dev_minor
= MINOR(sb
->s_dev
);
1562 __entry
->group
= group
;
1563 __entry
->start
= start
;
1567 TP_printk("dev %d,%d group %u, start %d, len %d",
1568 __entry
->dev_major
, __entry
->dev_minor
,
1569 __entry
->group
, __entry
->start
, __entry
->len
)
1572 DEFINE_EVENT(ext4__trim
, ext4_trim_extent
,
1574 TP_PROTO(struct super_block
*sb
,
1576 ext4_grpblk_t start
,
1579 TP_ARGS(sb
, group
, start
, len
)
1582 DEFINE_EVENT(ext4__trim
, ext4_trim_all_free
,
1584 TP_PROTO(struct super_block
*sb
,
1586 ext4_grpblk_t start
,
1589 TP_ARGS(sb
, group
, start
, len
)
1592 #endif /* _TRACE_EXT4_H */
1594 /* This part must be outside protection */
1595 #include <trace/define_trace.h>