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( umode_t
, mode
)
29 __field( blkcnt_t
, 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 %s ino %lu mode %d uid %u gid %u blocks %llu",
42 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
43 __entry
->mode
, __entry
->uid
, __entry
->gid
,
44 (unsigned long long) __entry
->blocks
)
47 TRACE_EVENT(ext4_request_inode
,
48 TP_PROTO(struct inode
*dir
, int mode
),
55 __field( umode_t
, mode
)
59 __entry
->dev
= dir
->i_sb
->s_dev
;
60 __entry
->dir
= dir
->i_ino
;
64 TP_printk("dev %s dir %lu mode %d",
65 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->dir
,
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( umode_t
, 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 %s ino %lu dir %lu mode %d",
89 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
90 (unsigned long) __entry
->dir
, __entry
->mode
)
93 TRACE_EVENT(ext4_write_begin
,
95 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
98 TP_ARGS(inode
, pos
, len
, flags
),
101 __field( dev_t
, dev
)
102 __field( ino_t
, ino
)
103 __field( loff_t
, pos
)
104 __field( unsigned int, len
)
105 __field( unsigned int, flags
)
109 __entry
->dev
= inode
->i_sb
->s_dev
;
110 __entry
->ino
= inode
->i_ino
;
113 __entry
->flags
= flags
;
116 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
117 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
118 __entry
->pos
, __entry
->len
, __entry
->flags
)
121 TRACE_EVENT(ext4_ordered_write_end
,
122 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
123 unsigned int copied
),
125 TP_ARGS(inode
, pos
, len
, copied
),
128 __field( dev_t
, dev
)
129 __field( ino_t
, ino
)
130 __field( loff_t
, pos
)
131 __field( unsigned int, len
)
132 __field( unsigned int, copied
)
136 __entry
->dev
= inode
->i_sb
->s_dev
;
137 __entry
->ino
= inode
->i_ino
;
140 __entry
->copied
= copied
;
143 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
144 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
145 __entry
->pos
, __entry
->len
, __entry
->copied
)
148 TRACE_EVENT(ext4_writeback_write_end
,
149 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
150 unsigned int copied
),
152 TP_ARGS(inode
, pos
, len
, copied
),
155 __field( dev_t
, dev
)
156 __field( ino_t
, ino
)
157 __field( loff_t
, pos
)
158 __field( unsigned int, len
)
159 __field( unsigned int, copied
)
163 __entry
->dev
= inode
->i_sb
->s_dev
;
164 __entry
->ino
= inode
->i_ino
;
167 __entry
->copied
= copied
;
170 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
171 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
172 __entry
->pos
, __entry
->len
, __entry
->copied
)
175 TRACE_EVENT(ext4_journalled_write_end
,
176 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
177 unsigned int copied
),
178 TP_ARGS(inode
, pos
, len
, copied
),
181 __field( dev_t
, dev
)
182 __field( ino_t
, ino
)
183 __field( loff_t
, pos
)
184 __field( unsigned int, len
)
185 __field( unsigned int, copied
)
189 __entry
->dev
= inode
->i_sb
->s_dev
;
190 __entry
->ino
= inode
->i_ino
;
193 __entry
->copied
= copied
;
196 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
197 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
198 __entry
->pos
, __entry
->len
, __entry
->copied
)
201 TRACE_EVENT(ext4_writepage
,
202 TP_PROTO(struct inode
*inode
, struct page
*page
),
204 TP_ARGS(inode
, page
),
207 __field( dev_t
, dev
)
208 __field( ino_t
, ino
)
209 __field( pgoff_t
, index
)
214 __entry
->dev
= inode
->i_sb
->s_dev
;
215 __entry
->ino
= inode
->i_ino
;
216 __entry
->index
= page
->index
;
219 TP_printk("dev %s ino %lu page_index %lu",
220 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
224 TRACE_EVENT(ext4_da_writepages
,
225 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
230 __field( dev_t
, dev
)
231 __field( ino_t
, ino
)
232 __field( long, nr_to_write
)
233 __field( long, pages_skipped
)
234 __field( loff_t
, range_start
)
235 __field( loff_t
, range_end
)
236 __field( char, nonblocking
)
237 __field( char, for_kupdate
)
238 __field( char, for_reclaim
)
239 __field( char, range_cyclic
)
240 __field( pgoff_t
, writeback_index
)
244 __entry
->dev
= inode
->i_sb
->s_dev
;
245 __entry
->ino
= inode
->i_ino
;
246 __entry
->nr_to_write
= wbc
->nr_to_write
;
247 __entry
->pages_skipped
= wbc
->pages_skipped
;
248 __entry
->range_start
= wbc
->range_start
;
249 __entry
->range_end
= wbc
->range_end
;
250 __entry
->nonblocking
= wbc
->nonblocking
;
251 __entry
->for_kupdate
= wbc
->for_kupdate
;
252 __entry
->for_reclaim
= wbc
->for_reclaim
;
253 __entry
->range_cyclic
= wbc
->range_cyclic
;
254 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
257 TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu",
258 jbd2_dev_to_name(__entry
->dev
),
259 (unsigned long) __entry
->ino
, __entry
->nr_to_write
,
260 __entry
->pages_skipped
, __entry
->range_start
,
261 __entry
->range_end
, __entry
->nonblocking
,
262 __entry
->for_kupdate
, __entry
->for_reclaim
,
263 __entry
->range_cyclic
,
264 (unsigned long) __entry
->writeback_index
)
267 TRACE_EVENT(ext4_da_write_pages
,
268 TP_PROTO(struct inode
*inode
, struct mpage_da_data
*mpd
),
273 __field( dev_t
, dev
)
274 __field( ino_t
, ino
)
275 __field( __u64
, b_blocknr
)
276 __field( __u32
, b_size
)
277 __field( __u32
, b_state
)
278 __field( unsigned long, first_page
)
279 __field( int, io_done
)
280 __field( int, pages_written
)
284 __entry
->dev
= inode
->i_sb
->s_dev
;
285 __entry
->ino
= inode
->i_ino
;
286 __entry
->b_blocknr
= mpd
->b_blocknr
;
287 __entry
->b_size
= mpd
->b_size
;
288 __entry
->b_state
= mpd
->b_state
;
289 __entry
->first_page
= mpd
->first_page
;
290 __entry
->io_done
= mpd
->io_done
;
291 __entry
->pages_written
= mpd
->pages_written
;
294 TP_printk("dev %s ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d",
295 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
296 __entry
->b_blocknr
, __entry
->b_size
,
297 __entry
->b_state
, __entry
->first_page
,
298 __entry
->io_done
, __entry
->pages_written
)
301 TRACE_EVENT(ext4_da_writepages_result
,
302 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
,
303 int ret
, int pages_written
),
305 TP_ARGS(inode
, wbc
, ret
, pages_written
),
308 __field( dev_t
, dev
)
309 __field( ino_t
, ino
)
311 __field( int, pages_written
)
312 __field( long, pages_skipped
)
313 __field( char, encountered_congestion
)
314 __field( char, more_io
)
315 __field( char, no_nrwrite_index_update
)
316 __field( pgoff_t
, writeback_index
)
320 __entry
->dev
= inode
->i_sb
->s_dev
;
321 __entry
->ino
= inode
->i_ino
;
323 __entry
->pages_written
= pages_written
;
324 __entry
->pages_skipped
= wbc
->pages_skipped
;
325 __entry
->encountered_congestion
= wbc
->encountered_congestion
;
326 __entry
->more_io
= wbc
->more_io
;
327 __entry
->no_nrwrite_index_update
= wbc
->no_nrwrite_index_update
;
328 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
331 TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu",
332 jbd2_dev_to_name(__entry
->dev
),
333 (unsigned long) __entry
->ino
, __entry
->ret
,
334 __entry
->pages_written
, __entry
->pages_skipped
,
335 __entry
->encountered_congestion
, __entry
->more_io
,
336 __entry
->no_nrwrite_index_update
,
337 (unsigned long) __entry
->writeback_index
)
340 TRACE_EVENT(ext4_da_write_begin
,
341 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
344 TP_ARGS(inode
, pos
, len
, flags
),
347 __field( dev_t
, dev
)
348 __field( ino_t
, ino
)
349 __field( loff_t
, pos
)
350 __field( unsigned int, len
)
351 __field( unsigned int, flags
)
355 __entry
->dev
= inode
->i_sb
->s_dev
;
356 __entry
->ino
= inode
->i_ino
;
359 __entry
->flags
= flags
;
362 TP_printk("dev %s ino %lu pos %llu len %u flags %u",
363 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
364 __entry
->pos
, __entry
->len
, __entry
->flags
)
367 TRACE_EVENT(ext4_da_write_end
,
368 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
369 unsigned int copied
),
371 TP_ARGS(inode
, pos
, len
, copied
),
374 __field( dev_t
, dev
)
375 __field( ino_t
, ino
)
376 __field( loff_t
, pos
)
377 __field( unsigned int, len
)
378 __field( unsigned int, copied
)
382 __entry
->dev
= inode
->i_sb
->s_dev
;
383 __entry
->ino
= inode
->i_ino
;
386 __entry
->copied
= copied
;
389 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
390 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
391 __entry
->pos
, __entry
->len
, __entry
->copied
)
394 TRACE_EVENT(ext4_discard_blocks
,
395 TP_PROTO(struct super_block
*sb
, unsigned long long blk
,
396 unsigned long long count
),
398 TP_ARGS(sb
, blk
, count
),
401 __field( dev_t
, dev
)
402 __field( __u64
, blk
)
403 __field( __u64
, count
)
408 __entry
->dev
= sb
->s_dev
;
410 __entry
->count
= count
;
413 TP_printk("dev %s blk %llu count %llu",
414 jbd2_dev_to_name(__entry
->dev
), __entry
->blk
, __entry
->count
)
417 TRACE_EVENT(ext4_mb_new_inode_pa
,
418 TP_PROTO(struct ext4_allocation_context
*ac
,
419 struct ext4_prealloc_space
*pa
),
424 __field( dev_t
, dev
)
425 __field( ino_t
, ino
)
426 __field( __u64
, pa_pstart
)
427 __field( __u32
, pa_len
)
428 __field( __u64
, pa_lstart
)
433 __entry
->dev
= ac
->ac_sb
->s_dev
;
434 __entry
->ino
= ac
->ac_inode
->i_ino
;
435 __entry
->pa_pstart
= pa
->pa_pstart
;
436 __entry
->pa_len
= pa
->pa_len
;
437 __entry
->pa_lstart
= pa
->pa_lstart
;
440 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
441 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
442 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
445 TRACE_EVENT(ext4_mb_new_group_pa
,
446 TP_PROTO(struct ext4_allocation_context
*ac
,
447 struct ext4_prealloc_space
*pa
),
452 __field( dev_t
, dev
)
453 __field( ino_t
, ino
)
454 __field( __u64
, pa_pstart
)
455 __field( __u32
, pa_len
)
456 __field( __u64
, pa_lstart
)
461 __entry
->dev
= ac
->ac_sb
->s_dev
;
462 __entry
->ino
= ac
->ac_inode
->i_ino
;
463 __entry
->pa_pstart
= pa
->pa_pstart
;
464 __entry
->pa_len
= pa
->pa_len
;
465 __entry
->pa_lstart
= pa
->pa_lstart
;
468 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
469 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
470 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
473 TRACE_EVENT(ext4_mb_release_inode_pa
,
474 TP_PROTO(struct ext4_allocation_context
*ac
,
475 struct ext4_prealloc_space
*pa
,
476 unsigned long long block
, unsigned int count
),
478 TP_ARGS(ac
, pa
, block
, count
),
481 __field( dev_t
, dev
)
482 __field( ino_t
, ino
)
483 __field( __u64
, block
)
484 __field( __u32
, count
)
489 __entry
->dev
= ac
->ac_sb
->s_dev
;
490 __entry
->ino
= ac
->ac_inode
->i_ino
;
491 __entry
->block
= block
;
492 __entry
->count
= count
;
495 TP_printk("dev %s ino %lu block %llu count %u",
496 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
497 __entry
->block
, __entry
->count
)
500 TRACE_EVENT(ext4_mb_release_group_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
)
515 __entry
->dev
= ac
->ac_sb
->s_dev
;
516 __entry
->ino
= ac
->ac_inode
->i_ino
;
517 __entry
->pa_pstart
= pa
->pa_pstart
;
518 __entry
->pa_len
= pa
->pa_len
;
521 TP_printk("dev %s pstart %llu len %u",
522 jbd2_dev_to_name(__entry
->dev
), __entry
->pa_pstart
, __entry
->pa_len
)
525 TRACE_EVENT(ext4_discard_preallocations
,
526 TP_PROTO(struct inode
*inode
),
531 __field( dev_t
, dev
)
532 __field( ino_t
, ino
)
537 __entry
->dev
= inode
->i_sb
->s_dev
;
538 __entry
->ino
= inode
->i_ino
;
541 TP_printk("dev %s ino %lu",
542 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
)
545 TRACE_EVENT(ext4_mb_discard_preallocations
,
546 TP_PROTO(struct super_block
*sb
, int needed
),
551 __field( dev_t
, dev
)
552 __field( int, needed
)
557 __entry
->dev
= sb
->s_dev
;
558 __entry
->needed
= needed
;
561 TP_printk("dev %s needed %d",
562 jbd2_dev_to_name(__entry
->dev
), __entry
->needed
)
565 TRACE_EVENT(ext4_request_blocks
,
566 TP_PROTO(struct ext4_allocation_request
*ar
),
571 __field( dev_t
, dev
)
572 __field( ino_t
, ino
)
573 __field( unsigned int, flags
)
574 __field( unsigned int, len
)
575 __field( __u64
, logical
)
576 __field( __u64
, goal
)
577 __field( __u64
, lleft
)
578 __field( __u64
, lright
)
579 __field( __u64
, pleft
)
580 __field( __u64
, pright
)
584 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
585 __entry
->ino
= ar
->inode
->i_ino
;
586 __entry
->flags
= ar
->flags
;
587 __entry
->len
= ar
->len
;
588 __entry
->logical
= ar
->logical
;
589 __entry
->goal
= ar
->goal
;
590 __entry
->lleft
= ar
->lleft
;
591 __entry
->lright
= ar
->lright
;
592 __entry
->pleft
= ar
->pleft
;
593 __entry
->pright
= ar
->pright
;
596 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
597 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
598 __entry
->flags
, __entry
->len
,
599 (unsigned long long) __entry
->logical
,
600 (unsigned long long) __entry
->goal
,
601 (unsigned long long) __entry
->lleft
,
602 (unsigned long long) __entry
->lright
,
603 (unsigned long long) __entry
->pleft
,
604 (unsigned long long) __entry
->pright
)
607 TRACE_EVENT(ext4_allocate_blocks
,
608 TP_PROTO(struct ext4_allocation_request
*ar
, unsigned long long block
),
613 __field( dev_t
, dev
)
614 __field( ino_t
, ino
)
615 __field( __u64
, block
)
616 __field( unsigned int, flags
)
617 __field( unsigned int, len
)
618 __field( __u64
, logical
)
619 __field( __u64
, goal
)
620 __field( __u64
, lleft
)
621 __field( __u64
, lright
)
622 __field( __u64
, pleft
)
623 __field( __u64
, pright
)
627 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
628 __entry
->ino
= ar
->inode
->i_ino
;
629 __entry
->block
= block
;
630 __entry
->flags
= ar
->flags
;
631 __entry
->len
= ar
->len
;
632 __entry
->logical
= ar
->logical
;
633 __entry
->goal
= ar
->goal
;
634 __entry
->lleft
= ar
->lleft
;
635 __entry
->lright
= ar
->lright
;
636 __entry
->pleft
= ar
->pleft
;
637 __entry
->pright
= ar
->pright
;
640 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
641 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
642 __entry
->flags
, __entry
->len
, __entry
->block
,
643 (unsigned long long) __entry
->logical
,
644 (unsigned long long) __entry
->goal
,
645 (unsigned long long) __entry
->lleft
,
646 (unsigned long long) __entry
->lright
,
647 (unsigned long long) __entry
->pleft
,
648 (unsigned long long) __entry
->pright
)
651 TRACE_EVENT(ext4_free_blocks
,
652 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
655 TP_ARGS(inode
, block
, count
, metadata
),
658 __field( dev_t
, dev
)
659 __field( ino_t
, ino
)
660 __field( __u64
, block
)
661 __field( unsigned long, count
)
662 __field( int, metadata
)
667 __entry
->dev
= inode
->i_sb
->s_dev
;
668 __entry
->ino
= inode
->i_ino
;
669 __entry
->block
= block
;
670 __entry
->count
= count
;
671 __entry
->metadata
= metadata
;
674 TP_printk("dev %s ino %lu block %llu count %lu metadata %d",
675 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
676 __entry
->block
, __entry
->count
, __entry
->metadata
)
679 TRACE_EVENT(ext4_sync_file
,
680 TP_PROTO(struct file
*file
, struct dentry
*dentry
, int datasync
),
682 TP_ARGS(file
, dentry
, datasync
),
685 __field( dev_t
, dev
)
686 __field( ino_t
, ino
)
687 __field( ino_t
, parent
)
688 __field( int, datasync
)
692 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
693 __entry
->ino
= dentry
->d_inode
->i_ino
;
694 __entry
->datasync
= datasync
;
695 __entry
->parent
= dentry
->d_parent
->d_inode
->i_ino
;
698 TP_printk("dev %s ino %ld parent %ld datasync %d ",
699 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
700 (unsigned long) __entry
->parent
, __entry
->datasync
)
703 TRACE_EVENT(ext4_sync_fs
,
704 TP_PROTO(struct super_block
*sb
, int wait
),
709 __field( dev_t
, dev
)
715 __entry
->dev
= sb
->s_dev
;
716 __entry
->wait
= wait
;
719 TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry
->dev
),
723 TRACE_EVENT(ext4_alloc_da_blocks
,
724 TP_PROTO(struct inode
*inode
),
729 __field( dev_t
, dev
)
730 __field( ino_t
, ino
)
731 __field( unsigned int, data_blocks
)
732 __field( unsigned int, meta_blocks
)
736 __entry
->dev
= inode
->i_sb
->s_dev
;
737 __entry
->ino
= inode
->i_ino
;
738 __entry
->data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
739 __entry
->meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
742 TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u",
743 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
744 __entry
->data_blocks
, __entry
->meta_blocks
)
747 TRACE_EVENT(ext4_mballoc_alloc
,
748 TP_PROTO(struct ext4_allocation_context
*ac
),
753 __field( dev_t
, dev
)
754 __field( ino_t
, ino
)
755 __field( __u16
, found
)
756 __field( __u16
, groups
)
757 __field( __u16
, buddy
)
758 __field( __u16
, flags
)
759 __field( __u16
, tail
)
761 __field( __u32
, orig_logical
)
762 __field( int, orig_start
)
763 __field( __u32
, orig_group
)
764 __field( int, orig_len
)
765 __field( __u32
, goal_logical
)
766 __field( int, goal_start
)
767 __field( __u32
, goal_group
)
768 __field( int, goal_len
)
769 __field( __u32
, result_logical
)
770 __field( int, result_start
)
771 __field( __u32
, result_group
)
772 __field( int, result_len
)
776 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
777 __entry
->ino
= ac
->ac_inode
->i_ino
;
778 __entry
->found
= ac
->ac_found
;
779 __entry
->flags
= ac
->ac_flags
;
780 __entry
->groups
= ac
->ac_groups_scanned
;
781 __entry
->buddy
= ac
->ac_buddy
;
782 __entry
->tail
= ac
->ac_tail
;
783 __entry
->cr
= ac
->ac_criteria
;
784 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
785 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
786 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
787 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
788 __entry
->goal_logical
= ac
->ac_g_ex
.fe_logical
;
789 __entry
->goal_start
= ac
->ac_g_ex
.fe_start
;
790 __entry
->goal_group
= ac
->ac_g_ex
.fe_group
;
791 __entry
->goal_len
= ac
->ac_g_ex
.fe_len
;
792 __entry
->result_logical
= ac
->ac_f_ex
.fe_logical
;
793 __entry
->result_start
= ac
->ac_f_ex
.fe_start
;
794 __entry
->result_group
= ac
->ac_f_ex
.fe_group
;
795 __entry
->result_len
= ac
->ac_f_ex
.fe_len
;
798 TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
799 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
801 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
802 __entry
->orig_group
, __entry
->orig_start
,
803 __entry
->orig_len
, __entry
->orig_logical
,
804 __entry
->goal_group
, __entry
->goal_start
,
805 __entry
->goal_len
, __entry
->goal_logical
,
806 __entry
->result_group
, __entry
->result_start
,
807 __entry
->result_len
, __entry
->result_logical
,
808 __entry
->found
, __entry
->groups
, __entry
->cr
,
809 __entry
->flags
, __entry
->tail
,
810 __entry
->buddy
? 1 << __entry
->buddy
: 0)
813 TRACE_EVENT(ext4_mballoc_prealloc
,
814 TP_PROTO(struct ext4_allocation_context
*ac
),
819 __field( dev_t
, dev
)
820 __field( ino_t
, ino
)
821 __field( __u32
, orig_logical
)
822 __field( int, orig_start
)
823 __field( __u32
, orig_group
)
824 __field( int, orig_len
)
825 __field( __u32
, result_logical
)
826 __field( int, result_start
)
827 __field( __u32
, result_group
)
828 __field( int, result_len
)
832 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
833 __entry
->ino
= ac
->ac_inode
->i_ino
;
834 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
835 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
836 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
837 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
838 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
839 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
840 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
841 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
844 TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
845 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
846 __entry
->orig_group
, __entry
->orig_start
,
847 __entry
->orig_len
, __entry
->orig_logical
,
848 __entry
->result_group
, __entry
->result_start
,
849 __entry
->result_len
, __entry
->result_logical
)
852 TRACE_EVENT(ext4_mballoc_discard
,
853 TP_PROTO(struct ext4_allocation_context
*ac
),
858 __field( dev_t
, dev
)
859 __field( ino_t
, ino
)
860 __field( __u32
, result_logical
)
861 __field( int, result_start
)
862 __field( __u32
, result_group
)
863 __field( int, result_len
)
867 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
868 __entry
->ino
= ac
->ac_inode
->i_ino
;
869 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
870 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
871 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
872 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
875 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
876 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
877 __entry
->result_group
, __entry
->result_start
,
878 __entry
->result_len
, __entry
->result_logical
)
881 TRACE_EVENT(ext4_mballoc_free
,
882 TP_PROTO(struct ext4_allocation_context
*ac
),
887 __field( dev_t
, dev
)
888 __field( ino_t
, ino
)
889 __field( __u32
, result_logical
)
890 __field( int, result_start
)
891 __field( __u32
, result_group
)
892 __field( int, result_len
)
896 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
897 __entry
->ino
= ac
->ac_inode
->i_ino
;
898 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
899 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
900 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
901 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
904 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
905 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
906 __entry
->result_group
, __entry
->result_start
,
907 __entry
->result_len
, __entry
->result_logical
)
910 #endif /* _TRACE_EXT4_H */
912 /* This part must be outside protection */
913 #include <trace/define_trace.h>