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