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 DECLARE_EVENT_CLASS(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 DEFINE_EVENT(ext4__write_begin
, ext4_write_begin
,
123 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
126 TP_ARGS(inode
, pos
, len
, flags
)
129 DEFINE_EVENT(ext4__write_begin
, ext4_da_write_begin
,
131 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
134 TP_ARGS(inode
, pos
, len
, flags
)
137 DECLARE_EVENT_CLASS(ext4__write_end
,
138 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
139 unsigned int copied
),
141 TP_ARGS(inode
, pos
, len
, copied
),
144 __field( dev_t
, dev
)
145 __field( ino_t
, ino
)
146 __field( loff_t
, pos
)
147 __field( unsigned int, len
)
148 __field( unsigned int, copied
)
152 __entry
->dev
= inode
->i_sb
->s_dev
;
153 __entry
->ino
= inode
->i_ino
;
156 __entry
->copied
= copied
;
159 TP_printk("dev %s ino %lu pos %llu len %u copied %u",
160 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
161 __entry
->pos
, __entry
->len
, __entry
->copied
)
164 DEFINE_EVENT(ext4__write_end
, ext4_ordered_write_end
,
166 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
167 unsigned int copied
),
169 TP_ARGS(inode
, pos
, len
, copied
)
172 DEFINE_EVENT(ext4__write_end
, ext4_writeback_write_end
,
174 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
175 unsigned int copied
),
177 TP_ARGS(inode
, pos
, len
, copied
)
180 DEFINE_EVENT(ext4__write_end
, ext4_journalled_write_end
,
182 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
183 unsigned int copied
),
185 TP_ARGS(inode
, pos
, len
, copied
)
188 DEFINE_EVENT(ext4__write_end
, ext4_da_write_end
,
190 TP_PROTO(struct inode
*inode
, loff_t pos
, unsigned int len
,
191 unsigned int copied
),
193 TP_ARGS(inode
, pos
, len
, copied
)
196 TRACE_EVENT(ext4_writepage
,
197 TP_PROTO(struct inode
*inode
, struct page
*page
),
199 TP_ARGS(inode
, page
),
202 __field( dev_t
, dev
)
203 __field( ino_t
, ino
)
204 __field( pgoff_t
, index
)
209 __entry
->dev
= inode
->i_sb
->s_dev
;
210 __entry
->ino
= inode
->i_ino
;
211 __entry
->index
= page
->index
;
214 TP_printk("dev %s ino %lu page_index %lu",
215 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
219 TRACE_EVENT(ext4_da_writepages
,
220 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
),
225 __field( dev_t
, dev
)
226 __field( ino_t
, ino
)
227 __field( long, nr_to_write
)
228 __field( long, pages_skipped
)
229 __field( loff_t
, range_start
)
230 __field( loff_t
, range_end
)
231 __field( char, nonblocking
)
232 __field( char, for_kupdate
)
233 __field( char, for_reclaim
)
234 __field( char, range_cyclic
)
235 __field( pgoff_t
, writeback_index
)
239 __entry
->dev
= inode
->i_sb
->s_dev
;
240 __entry
->ino
= inode
->i_ino
;
241 __entry
->nr_to_write
= wbc
->nr_to_write
;
242 __entry
->pages_skipped
= wbc
->pages_skipped
;
243 __entry
->range_start
= wbc
->range_start
;
244 __entry
->range_end
= wbc
->range_end
;
245 __entry
->nonblocking
= wbc
->nonblocking
;
246 __entry
->for_kupdate
= wbc
->for_kupdate
;
247 __entry
->for_reclaim
= wbc
->for_reclaim
;
248 __entry
->range_cyclic
= wbc
->range_cyclic
;
249 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
252 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",
253 jbd2_dev_to_name(__entry
->dev
),
254 (unsigned long) __entry
->ino
, __entry
->nr_to_write
,
255 __entry
->pages_skipped
, __entry
->range_start
,
256 __entry
->range_end
, __entry
->nonblocking
,
257 __entry
->for_kupdate
, __entry
->for_reclaim
,
258 __entry
->range_cyclic
,
259 (unsigned long) __entry
->writeback_index
)
262 TRACE_EVENT(ext4_da_write_pages
,
263 TP_PROTO(struct inode
*inode
, struct mpage_da_data
*mpd
),
268 __field( dev_t
, dev
)
269 __field( ino_t
, ino
)
270 __field( __u64
, b_blocknr
)
271 __field( __u32
, b_size
)
272 __field( __u32
, b_state
)
273 __field( unsigned long, first_page
)
274 __field( int, io_done
)
275 __field( int, pages_written
)
279 __entry
->dev
= inode
->i_sb
->s_dev
;
280 __entry
->ino
= inode
->i_ino
;
281 __entry
->b_blocknr
= mpd
->b_blocknr
;
282 __entry
->b_size
= mpd
->b_size
;
283 __entry
->b_state
= mpd
->b_state
;
284 __entry
->first_page
= mpd
->first_page
;
285 __entry
->io_done
= mpd
->io_done
;
286 __entry
->pages_written
= mpd
->pages_written
;
289 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",
290 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
291 __entry
->b_blocknr
, __entry
->b_size
,
292 __entry
->b_state
, __entry
->first_page
,
293 __entry
->io_done
, __entry
->pages_written
)
296 TRACE_EVENT(ext4_da_writepages_result
,
297 TP_PROTO(struct inode
*inode
, struct writeback_control
*wbc
,
298 int ret
, int pages_written
),
300 TP_ARGS(inode
, wbc
, ret
, pages_written
),
303 __field( dev_t
, dev
)
304 __field( ino_t
, ino
)
306 __field( int, pages_written
)
307 __field( long, pages_skipped
)
308 __field( char, encountered_congestion
)
309 __field( char, more_io
)
310 __field( char, no_nrwrite_index_update
)
311 __field( pgoff_t
, writeback_index
)
315 __entry
->dev
= inode
->i_sb
->s_dev
;
316 __entry
->ino
= inode
->i_ino
;
318 __entry
->pages_written
= pages_written
;
319 __entry
->pages_skipped
= wbc
->pages_skipped
;
320 __entry
->encountered_congestion
= wbc
->encountered_congestion
;
321 __entry
->more_io
= wbc
->more_io
;
322 __entry
->no_nrwrite_index_update
= wbc
->no_nrwrite_index_update
;
323 __entry
->writeback_index
= inode
->i_mapping
->writeback_index
;
326 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",
327 jbd2_dev_to_name(__entry
->dev
),
328 (unsigned long) __entry
->ino
, __entry
->ret
,
329 __entry
->pages_written
, __entry
->pages_skipped
,
330 __entry
->encountered_congestion
, __entry
->more_io
,
331 __entry
->no_nrwrite_index_update
,
332 (unsigned long) __entry
->writeback_index
)
335 TRACE_EVENT(ext4_discard_blocks
,
336 TP_PROTO(struct super_block
*sb
, unsigned long long blk
,
337 unsigned long long count
),
339 TP_ARGS(sb
, blk
, count
),
342 __field( dev_t
, dev
)
343 __field( __u64
, blk
)
344 __field( __u64
, count
)
349 __entry
->dev
= sb
->s_dev
;
351 __entry
->count
= count
;
354 TP_printk("dev %s blk %llu count %llu",
355 jbd2_dev_to_name(__entry
->dev
), __entry
->blk
, __entry
->count
)
358 TRACE_EVENT(ext4_mb_new_inode_pa
,
359 TP_PROTO(struct ext4_allocation_context
*ac
,
360 struct ext4_prealloc_space
*pa
),
365 __field( dev_t
, dev
)
366 __field( ino_t
, ino
)
367 __field( __u64
, pa_pstart
)
368 __field( __u32
, pa_len
)
369 __field( __u64
, pa_lstart
)
374 __entry
->dev
= ac
->ac_sb
->s_dev
;
375 __entry
->ino
= ac
->ac_inode
->i_ino
;
376 __entry
->pa_pstart
= pa
->pa_pstart
;
377 __entry
->pa_len
= pa
->pa_len
;
378 __entry
->pa_lstart
= pa
->pa_lstart
;
381 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
382 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
383 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
386 TRACE_EVENT(ext4_mb_new_group_pa
,
387 TP_PROTO(struct ext4_allocation_context
*ac
,
388 struct ext4_prealloc_space
*pa
),
393 __field( dev_t
, dev
)
394 __field( ino_t
, ino
)
395 __field( __u64
, pa_pstart
)
396 __field( __u32
, pa_len
)
397 __field( __u64
, pa_lstart
)
402 __entry
->dev
= ac
->ac_sb
->s_dev
;
403 __entry
->ino
= ac
->ac_inode
->i_ino
;
404 __entry
->pa_pstart
= pa
->pa_pstart
;
405 __entry
->pa_len
= pa
->pa_len
;
406 __entry
->pa_lstart
= pa
->pa_lstart
;
409 TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu",
410 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
411 __entry
->pa_pstart
, __entry
->pa_len
, __entry
->pa_lstart
)
414 TRACE_EVENT(ext4_mb_release_inode_pa
,
415 TP_PROTO(struct ext4_allocation_context
*ac
,
416 struct ext4_prealloc_space
*pa
,
417 unsigned long long block
, unsigned int count
),
419 TP_ARGS(ac
, pa
, block
, count
),
422 __field( dev_t
, dev
)
423 __field( ino_t
, ino
)
424 __field( __u64
, block
)
425 __field( __u32
, count
)
430 __entry
->dev
= ac
->ac_sb
->s_dev
;
431 __entry
->ino
= ac
->ac_inode
->i_ino
;
432 __entry
->block
= block
;
433 __entry
->count
= count
;
436 TP_printk("dev %s ino %lu block %llu count %u",
437 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
438 __entry
->block
, __entry
->count
)
441 TRACE_EVENT(ext4_mb_release_group_pa
,
442 TP_PROTO(struct ext4_allocation_context
*ac
,
443 struct ext4_prealloc_space
*pa
),
448 __field( dev_t
, dev
)
449 __field( ino_t
, ino
)
450 __field( __u64
, pa_pstart
)
451 __field( __u32
, pa_len
)
456 __entry
->dev
= ac
->ac_sb
->s_dev
;
457 __entry
->ino
= ac
->ac_inode
->i_ino
;
458 __entry
->pa_pstart
= pa
->pa_pstart
;
459 __entry
->pa_len
= pa
->pa_len
;
462 TP_printk("dev %s pstart %llu len %u",
463 jbd2_dev_to_name(__entry
->dev
), __entry
->pa_pstart
, __entry
->pa_len
)
466 TRACE_EVENT(ext4_discard_preallocations
,
467 TP_PROTO(struct inode
*inode
),
472 __field( dev_t
, dev
)
473 __field( ino_t
, ino
)
478 __entry
->dev
= inode
->i_sb
->s_dev
;
479 __entry
->ino
= inode
->i_ino
;
482 TP_printk("dev %s ino %lu",
483 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
)
486 TRACE_EVENT(ext4_mb_discard_preallocations
,
487 TP_PROTO(struct super_block
*sb
, int needed
),
492 __field( dev_t
, dev
)
493 __field( int, needed
)
498 __entry
->dev
= sb
->s_dev
;
499 __entry
->needed
= needed
;
502 TP_printk("dev %s needed %d",
503 jbd2_dev_to_name(__entry
->dev
), __entry
->needed
)
506 TRACE_EVENT(ext4_request_blocks
,
507 TP_PROTO(struct ext4_allocation_request
*ar
),
512 __field( dev_t
, dev
)
513 __field( ino_t
, ino
)
514 __field( unsigned int, flags
)
515 __field( unsigned int, len
)
516 __field( __u64
, logical
)
517 __field( __u64
, goal
)
518 __field( __u64
, lleft
)
519 __field( __u64
, lright
)
520 __field( __u64
, pleft
)
521 __field( __u64
, pright
)
525 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
526 __entry
->ino
= ar
->inode
->i_ino
;
527 __entry
->flags
= ar
->flags
;
528 __entry
->len
= ar
->len
;
529 __entry
->logical
= ar
->logical
;
530 __entry
->goal
= ar
->goal
;
531 __entry
->lleft
= ar
->lleft
;
532 __entry
->lright
= ar
->lright
;
533 __entry
->pleft
= ar
->pleft
;
534 __entry
->pright
= ar
->pright
;
537 TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
538 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
539 __entry
->flags
, __entry
->len
,
540 (unsigned long long) __entry
->logical
,
541 (unsigned long long) __entry
->goal
,
542 (unsigned long long) __entry
->lleft
,
543 (unsigned long long) __entry
->lright
,
544 (unsigned long long) __entry
->pleft
,
545 (unsigned long long) __entry
->pright
)
548 TRACE_EVENT(ext4_allocate_blocks
,
549 TP_PROTO(struct ext4_allocation_request
*ar
, unsigned long long block
),
554 __field( dev_t
, dev
)
555 __field( ino_t
, ino
)
556 __field( __u64
, block
)
557 __field( unsigned int, flags
)
558 __field( unsigned int, len
)
559 __field( __u64
, logical
)
560 __field( __u64
, goal
)
561 __field( __u64
, lleft
)
562 __field( __u64
, lright
)
563 __field( __u64
, pleft
)
564 __field( __u64
, pright
)
568 __entry
->dev
= ar
->inode
->i_sb
->s_dev
;
569 __entry
->ino
= ar
->inode
->i_ino
;
570 __entry
->block
= block
;
571 __entry
->flags
= ar
->flags
;
572 __entry
->len
= ar
->len
;
573 __entry
->logical
= ar
->logical
;
574 __entry
->goal
= ar
->goal
;
575 __entry
->lleft
= ar
->lleft
;
576 __entry
->lright
= ar
->lright
;
577 __entry
->pleft
= ar
->pleft
;
578 __entry
->pright
= ar
->pright
;
581 TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ",
582 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
583 __entry
->flags
, __entry
->len
, __entry
->block
,
584 (unsigned long long) __entry
->logical
,
585 (unsigned long long) __entry
->goal
,
586 (unsigned long long) __entry
->lleft
,
587 (unsigned long long) __entry
->lright
,
588 (unsigned long long) __entry
->pleft
,
589 (unsigned long long) __entry
->pright
)
592 TRACE_EVENT(ext4_free_blocks
,
593 TP_PROTO(struct inode
*inode
, __u64 block
, unsigned long count
,
596 TP_ARGS(inode
, block
, count
, metadata
),
599 __field( dev_t
, dev
)
600 __field( ino_t
, ino
)
601 __field( __u64
, block
)
602 __field( unsigned long, count
)
603 __field( int, metadata
)
608 __entry
->dev
= inode
->i_sb
->s_dev
;
609 __entry
->ino
= inode
->i_ino
;
610 __entry
->block
= block
;
611 __entry
->count
= count
;
612 __entry
->metadata
= metadata
;
615 TP_printk("dev %s ino %lu block %llu count %lu metadata %d",
616 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
617 __entry
->block
, __entry
->count
, __entry
->metadata
)
620 TRACE_EVENT(ext4_sync_file
,
621 TP_PROTO(struct file
*file
, struct dentry
*dentry
, int datasync
),
623 TP_ARGS(file
, dentry
, datasync
),
626 __field( dev_t
, dev
)
627 __field( ino_t
, ino
)
628 __field( ino_t
, parent
)
629 __field( int, datasync
)
633 __entry
->dev
= dentry
->d_inode
->i_sb
->s_dev
;
634 __entry
->ino
= dentry
->d_inode
->i_ino
;
635 __entry
->datasync
= datasync
;
636 __entry
->parent
= dentry
->d_parent
->d_inode
->i_ino
;
639 TP_printk("dev %s ino %ld parent %ld datasync %d ",
640 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
641 (unsigned long) __entry
->parent
, __entry
->datasync
)
644 TRACE_EVENT(ext4_sync_fs
,
645 TP_PROTO(struct super_block
*sb
, int wait
),
650 __field( dev_t
, dev
)
656 __entry
->dev
= sb
->s_dev
;
657 __entry
->wait
= wait
;
660 TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry
->dev
),
664 TRACE_EVENT(ext4_alloc_da_blocks
,
665 TP_PROTO(struct inode
*inode
),
670 __field( dev_t
, dev
)
671 __field( ino_t
, ino
)
672 __field( unsigned int, data_blocks
)
673 __field( unsigned int, meta_blocks
)
677 __entry
->dev
= inode
->i_sb
->s_dev
;
678 __entry
->ino
= inode
->i_ino
;
679 __entry
->data_blocks
= EXT4_I(inode
)->i_reserved_data_blocks
;
680 __entry
->meta_blocks
= EXT4_I(inode
)->i_reserved_meta_blocks
;
683 TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u",
684 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
685 __entry
->data_blocks
, __entry
->meta_blocks
)
688 TRACE_EVENT(ext4_mballoc_alloc
,
689 TP_PROTO(struct ext4_allocation_context
*ac
),
694 __field( dev_t
, dev
)
695 __field( ino_t
, ino
)
696 __field( __u16
, found
)
697 __field( __u16
, groups
)
698 __field( __u16
, buddy
)
699 __field( __u16
, flags
)
700 __field( __u16
, tail
)
702 __field( __u32
, orig_logical
)
703 __field( int, orig_start
)
704 __field( __u32
, orig_group
)
705 __field( int, orig_len
)
706 __field( __u32
, goal_logical
)
707 __field( int, goal_start
)
708 __field( __u32
, goal_group
)
709 __field( int, goal_len
)
710 __field( __u32
, result_logical
)
711 __field( int, result_start
)
712 __field( __u32
, result_group
)
713 __field( int, result_len
)
717 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
718 __entry
->ino
= ac
->ac_inode
->i_ino
;
719 __entry
->found
= ac
->ac_found
;
720 __entry
->flags
= ac
->ac_flags
;
721 __entry
->groups
= ac
->ac_groups_scanned
;
722 __entry
->buddy
= ac
->ac_buddy
;
723 __entry
->tail
= ac
->ac_tail
;
724 __entry
->cr
= ac
->ac_criteria
;
725 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
726 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
727 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
728 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
729 __entry
->goal_logical
= ac
->ac_g_ex
.fe_logical
;
730 __entry
->goal_start
= ac
->ac_g_ex
.fe_start
;
731 __entry
->goal_group
= ac
->ac_g_ex
.fe_group
;
732 __entry
->goal_len
= ac
->ac_g_ex
.fe_len
;
733 __entry
->result_logical
= ac
->ac_f_ex
.fe_logical
;
734 __entry
->result_start
= ac
->ac_f_ex
.fe_start
;
735 __entry
->result_group
= ac
->ac_f_ex
.fe_group
;
736 __entry
->result_len
= ac
->ac_f_ex
.fe_len
;
739 TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
740 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
742 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
743 __entry
->orig_group
, __entry
->orig_start
,
744 __entry
->orig_len
, __entry
->orig_logical
,
745 __entry
->goal_group
, __entry
->goal_start
,
746 __entry
->goal_len
, __entry
->goal_logical
,
747 __entry
->result_group
, __entry
->result_start
,
748 __entry
->result_len
, __entry
->result_logical
,
749 __entry
->found
, __entry
->groups
, __entry
->cr
,
750 __entry
->flags
, __entry
->tail
,
751 __entry
->buddy
? 1 << __entry
->buddy
: 0)
754 TRACE_EVENT(ext4_mballoc_prealloc
,
755 TP_PROTO(struct ext4_allocation_context
*ac
),
760 __field( dev_t
, dev
)
761 __field( ino_t
, ino
)
762 __field( __u32
, orig_logical
)
763 __field( int, orig_start
)
764 __field( __u32
, orig_group
)
765 __field( int, orig_len
)
766 __field( __u32
, result_logical
)
767 __field( int, result_start
)
768 __field( __u32
, result_group
)
769 __field( int, result_len
)
773 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
774 __entry
->ino
= ac
->ac_inode
->i_ino
;
775 __entry
->orig_logical
= ac
->ac_o_ex
.fe_logical
;
776 __entry
->orig_start
= ac
->ac_o_ex
.fe_start
;
777 __entry
->orig_group
= ac
->ac_o_ex
.fe_group
;
778 __entry
->orig_len
= ac
->ac_o_ex
.fe_len
;
779 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
780 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
781 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
782 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
785 TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
786 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
787 __entry
->orig_group
, __entry
->orig_start
,
788 __entry
->orig_len
, __entry
->orig_logical
,
789 __entry
->result_group
, __entry
->result_start
,
790 __entry
->result_len
, __entry
->result_logical
)
793 TRACE_EVENT(ext4_mballoc_discard
,
794 TP_PROTO(struct ext4_allocation_context
*ac
),
799 __field( dev_t
, dev
)
800 __field( ino_t
, ino
)
801 __field( __u32
, result_logical
)
802 __field( int, result_start
)
803 __field( __u32
, result_group
)
804 __field( int, result_len
)
808 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
809 __entry
->ino
= ac
->ac_inode
->i_ino
;
810 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
811 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
812 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
813 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
816 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
817 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
818 __entry
->result_group
, __entry
->result_start
,
819 __entry
->result_len
, __entry
->result_logical
)
822 TRACE_EVENT(ext4_mballoc_free
,
823 TP_PROTO(struct ext4_allocation_context
*ac
),
828 __field( dev_t
, dev
)
829 __field( ino_t
, ino
)
830 __field( __u32
, result_logical
)
831 __field( int, result_start
)
832 __field( __u32
, result_group
)
833 __field( int, result_len
)
837 __entry
->dev
= ac
->ac_inode
->i_sb
->s_dev
;
838 __entry
->ino
= ac
->ac_inode
->i_ino
;
839 __entry
->result_logical
= ac
->ac_b_ex
.fe_logical
;
840 __entry
->result_start
= ac
->ac_b_ex
.fe_start
;
841 __entry
->result_group
= ac
->ac_b_ex
.fe_group
;
842 __entry
->result_len
= ac
->ac_b_ex
.fe_len
;
845 TP_printk("dev %s inode %lu extent %u/%d/%u@%u ",
846 jbd2_dev_to_name(__entry
->dev
), (unsigned long) __entry
->ino
,
847 __entry
->result_group
, __entry
->result_start
,
848 __entry
->result_len
, __entry
->result_logical
)
851 #endif /* _TRACE_EXT4_H */
853 /* This part must be outside protection */
854 #include <trace/define_trace.h>