tracing: Convert some ext4 events to DEFINE_TRACE
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / include / trace / events / ext4.h
blob318f76535bd44c888d2a1045f0f4a520d3c5799a
1 #undef TRACE_SYSTEM
2 #define TRACE_SYSTEM ext4
4 #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
5 #define _TRACE_EXT4_H
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;
14 struct mpage_da_data;
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),
21 TP_ARGS(inode),
23 TP_STRUCT__entry(
24 __field( dev_t, dev )
25 __field( ino_t, ino )
26 __field( umode_t, mode )
27 __field( uid_t, uid )
28 __field( gid_t, gid )
29 __field( blkcnt_t, blocks )
32 TP_fast_assign(
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),
50 TP_ARGS(dir, mode),
52 TP_STRUCT__entry(
53 __field( dev_t, dev )
54 __field( ino_t, dir )
55 __field( umode_t, mode )
58 TP_fast_assign(
59 __entry->dev = dir->i_sb->s_dev;
60 __entry->dir = dir->i_ino;
61 __entry->mode = mode;
64 TP_printk("dev %s dir %lu mode %d",
65 jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir,
66 __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),
74 TP_STRUCT__entry(
75 __field( dev_t, dev )
76 __field( ino_t, ino )
77 __field( ino_t, dir )
78 __field( umode_t, mode )
81 TP_fast_assign(
82 __entry->dev = inode->i_sb->s_dev;
83 __entry->ino = inode->i_ino;
84 __entry->dir = dir->i_ino;
85 __entry->mode = mode;
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,
96 unsigned int flags),
98 TP_ARGS(inode, pos, len, flags),
100 TP_STRUCT__entry(
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 )
108 TP_fast_assign(
109 __entry->dev = inode->i_sb->s_dev;
110 __entry->ino = inode->i_ino;
111 __entry->pos = pos;
112 __entry->len = len;
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,
124 unsigned int flags),
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,
132 unsigned int flags),
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),
143 TP_STRUCT__entry(
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 )
151 TP_fast_assign(
152 __entry->dev = inode->i_sb->s_dev;
153 __entry->ino = inode->i_ino;
154 __entry->pos = pos;
155 __entry->len = len;
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),
201 TP_STRUCT__entry(
202 __field( dev_t, dev )
203 __field( ino_t, ino )
204 __field( pgoff_t, index )
208 TP_fast_assign(
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,
216 __entry->index)
219 TRACE_EVENT(ext4_da_writepages,
220 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
222 TP_ARGS(inode, wbc),
224 TP_STRUCT__entry(
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 )
238 TP_fast_assign(
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),
265 TP_ARGS(inode, mpd),
267 TP_STRUCT__entry(
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 )
278 TP_fast_assign(
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),
302 TP_STRUCT__entry(
303 __field( dev_t, dev )
304 __field( ino_t, ino )
305 __field( int, ret )
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 )
314 TP_fast_assign(
315 __entry->dev = inode->i_sb->s_dev;
316 __entry->ino = inode->i_ino;
317 __entry->ret = ret;
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),
341 TP_STRUCT__entry(
342 __field( dev_t, dev )
343 __field( __u64, blk )
344 __field( __u64, count )
348 TP_fast_assign(
349 __entry->dev = sb->s_dev;
350 __entry->blk = blk;
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),
362 TP_ARGS(ac, pa),
364 TP_STRUCT__entry(
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 )
373 TP_fast_assign(
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),
390 TP_ARGS(ac, pa),
392 TP_STRUCT__entry(
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 )
401 TP_fast_assign(
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),
421 TP_STRUCT__entry(
422 __field( dev_t, dev )
423 __field( ino_t, ino )
424 __field( __u64, block )
425 __field( __u32, count )
429 TP_fast_assign(
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),
445 TP_ARGS(ac, pa),
447 TP_STRUCT__entry(
448 __field( dev_t, dev )
449 __field( ino_t, ino )
450 __field( __u64, pa_pstart )
451 __field( __u32, pa_len )
455 TP_fast_assign(
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),
469 TP_ARGS(inode),
471 TP_STRUCT__entry(
472 __field( dev_t, dev )
473 __field( ino_t, ino )
477 TP_fast_assign(
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),
489 TP_ARGS(sb, needed),
491 TP_STRUCT__entry(
492 __field( dev_t, dev )
493 __field( int, needed )
497 TP_fast_assign(
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),
509 TP_ARGS(ar),
511 TP_STRUCT__entry(
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 )
524 TP_fast_assign(
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),
551 TP_ARGS(ar, block),
553 TP_STRUCT__entry(
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 )
567 TP_fast_assign(
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,
594 int metadata),
596 TP_ARGS(inode, block, count, metadata),
598 TP_STRUCT__entry(
599 __field( dev_t, dev )
600 __field( ino_t, ino )
601 __field( __u64, block )
602 __field( unsigned long, count )
603 __field( int, metadata )
607 TP_fast_assign(
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),
625 TP_STRUCT__entry(
626 __field( dev_t, dev )
627 __field( ino_t, ino )
628 __field( ino_t, parent )
629 __field( int, datasync )
632 TP_fast_assign(
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),
647 TP_ARGS(sb, wait),
649 TP_STRUCT__entry(
650 __field( dev_t, dev )
651 __field( int, wait )
655 TP_fast_assign(
656 __entry->dev = sb->s_dev;
657 __entry->wait = wait;
660 TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev),
661 __entry->wait)
664 TRACE_EVENT(ext4_alloc_da_blocks,
665 TP_PROTO(struct inode *inode),
667 TP_ARGS(inode),
669 TP_STRUCT__entry(
670 __field( dev_t, dev )
671 __field( ino_t, ino )
672 __field( unsigned int, data_blocks )
673 __field( unsigned int, meta_blocks )
676 TP_fast_assign(
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),
691 TP_ARGS(ac),
693 TP_STRUCT__entry(
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 )
701 __field( __u8, cr )
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 )
716 TP_fast_assign(
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 "
741 "tail %u broken %u",
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),
757 TP_ARGS(ac),
759 TP_STRUCT__entry(
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 )
772 TP_fast_assign(
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),
796 TP_ARGS(ac),
798 TP_STRUCT__entry(
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 )
807 TP_fast_assign(
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),
825 TP_ARGS(ac),
827 TP_STRUCT__entry(
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 )
836 TP_fast_assign(
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>