Linux 3.12.39
[linux/fpc-iii.git] / include / trace / events / ext4.h
blob197d3125df2aff526e7a69205c5ee7393b53221a
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 extent_status;
19 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
21 #define show_mballoc_flags(flags) __print_flags(flags, "|", \
22 { EXT4_MB_HINT_MERGE, "HINT_MERGE" }, \
23 { EXT4_MB_HINT_RESERVED, "HINT_RESV" }, \
24 { EXT4_MB_HINT_METADATA, "HINT_MDATA" }, \
25 { EXT4_MB_HINT_FIRST, "HINT_FIRST" }, \
26 { EXT4_MB_HINT_BEST, "HINT_BEST" }, \
27 { EXT4_MB_HINT_DATA, "HINT_DATA" }, \
28 { EXT4_MB_HINT_NOPREALLOC, "HINT_NOPREALLOC" }, \
29 { EXT4_MB_HINT_GROUP_ALLOC, "HINT_GRP_ALLOC" }, \
30 { EXT4_MB_HINT_GOAL_ONLY, "HINT_GOAL_ONLY" }, \
31 { EXT4_MB_HINT_TRY_GOAL, "HINT_TRY_GOAL" }, \
32 { EXT4_MB_DELALLOC_RESERVED, "DELALLOC_RESV" }, \
33 { EXT4_MB_STREAM_ALLOC, "STREAM_ALLOC" }, \
34 { EXT4_MB_USE_ROOT_BLOCKS, "USE_ROOT_BLKS" }, \
35 { EXT4_MB_USE_RESERVED, "USE_RESV" })
37 #define show_map_flags(flags) __print_flags(flags, "|", \
38 { EXT4_GET_BLOCKS_CREATE, "CREATE" }, \
39 { EXT4_GET_BLOCKS_UNINIT_EXT, "UNINIT" }, \
40 { EXT4_GET_BLOCKS_DELALLOC_RESERVE, "DELALLOC" }, \
41 { EXT4_GET_BLOCKS_PRE_IO, "PRE_IO" }, \
42 { EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \
43 { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \
44 { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \
45 { EXT4_GET_BLOCKS_KEEP_SIZE, "KEEP_SIZE" }, \
46 { EXT4_GET_BLOCKS_NO_LOCK, "NO_LOCK" }, \
47 { EXT4_GET_BLOCKS_NO_PUT_HOLE, "NO_PUT_HOLE" })
49 #define show_mflags(flags) __print_flags(flags, "", \
50 { EXT4_MAP_NEW, "N" }, \
51 { EXT4_MAP_MAPPED, "M" }, \
52 { EXT4_MAP_UNWRITTEN, "U" }, \
53 { EXT4_MAP_BOUNDARY, "B" }, \
54 { EXT4_MAP_UNINIT, "u" }, \
55 { EXT4_MAP_FROM_CLUSTER, "C" })
57 #define show_free_flags(flags) __print_flags(flags, "|", \
58 { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \
59 { EXT4_FREE_BLOCKS_FORGET, "FORGET" }, \
60 { EXT4_FREE_BLOCKS_VALIDATED, "VALIDATED" }, \
61 { EXT4_FREE_BLOCKS_NO_QUOT_UPDATE, "NO_QUOTA" }, \
62 { EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER,"1ST_CLUSTER" },\
63 { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" })
65 #define show_extent_status(status) __print_flags(status, "", \
66 { EXTENT_STATUS_WRITTEN, "W" }, \
67 { EXTENT_STATUS_UNWRITTEN, "U" }, \
68 { EXTENT_STATUS_DELAYED, "D" }, \
69 { EXTENT_STATUS_HOLE, "H" })
72 TRACE_EVENT(ext4_free_inode,
73 TP_PROTO(struct inode *inode),
75 TP_ARGS(inode),
77 TP_STRUCT__entry(
78 __field( dev_t, dev )
79 __field( ino_t, ino )
80 __field( uid_t, uid )
81 __field( gid_t, gid )
82 __field( __u64, blocks )
83 __field( __u16, mode )
86 TP_fast_assign(
87 __entry->dev = inode->i_sb->s_dev;
88 __entry->ino = inode->i_ino;
89 __entry->uid = i_uid_read(inode);
90 __entry->gid = i_gid_read(inode);
91 __entry->blocks = inode->i_blocks;
92 __entry->mode = inode->i_mode;
95 TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
96 MAJOR(__entry->dev), MINOR(__entry->dev),
97 (unsigned long) __entry->ino, __entry->mode,
98 __entry->uid, __entry->gid, __entry->blocks)
101 TRACE_EVENT(ext4_request_inode,
102 TP_PROTO(struct inode *dir, int mode),
104 TP_ARGS(dir, mode),
106 TP_STRUCT__entry(
107 __field( dev_t, dev )
108 __field( ino_t, dir )
109 __field( __u16, mode )
112 TP_fast_assign(
113 __entry->dev = dir->i_sb->s_dev;
114 __entry->dir = dir->i_ino;
115 __entry->mode = mode;
118 TP_printk("dev %d,%d dir %lu mode 0%o",
119 MAJOR(__entry->dev), MINOR(__entry->dev),
120 (unsigned long) __entry->dir, __entry->mode)
123 TRACE_EVENT(ext4_allocate_inode,
124 TP_PROTO(struct inode *inode, struct inode *dir, int mode),
126 TP_ARGS(inode, dir, mode),
128 TP_STRUCT__entry(
129 __field( dev_t, dev )
130 __field( ino_t, ino )
131 __field( ino_t, dir )
132 __field( __u16, mode )
135 TP_fast_assign(
136 __entry->dev = inode->i_sb->s_dev;
137 __entry->ino = inode->i_ino;
138 __entry->dir = dir->i_ino;
139 __entry->mode = mode;
142 TP_printk("dev %d,%d ino %lu dir %lu mode 0%o",
143 MAJOR(__entry->dev), MINOR(__entry->dev),
144 (unsigned long) __entry->ino,
145 (unsigned long) __entry->dir, __entry->mode)
148 TRACE_EVENT(ext4_evict_inode,
149 TP_PROTO(struct inode *inode),
151 TP_ARGS(inode),
153 TP_STRUCT__entry(
154 __field( dev_t, dev )
155 __field( ino_t, ino )
156 __field( int, nlink )
159 TP_fast_assign(
160 __entry->dev = inode->i_sb->s_dev;
161 __entry->ino = inode->i_ino;
162 __entry->nlink = inode->i_nlink;
165 TP_printk("dev %d,%d ino %lu nlink %d",
166 MAJOR(__entry->dev), MINOR(__entry->dev),
167 (unsigned long) __entry->ino, __entry->nlink)
170 TRACE_EVENT(ext4_drop_inode,
171 TP_PROTO(struct inode *inode, int drop),
173 TP_ARGS(inode, drop),
175 TP_STRUCT__entry(
176 __field( dev_t, dev )
177 __field( ino_t, ino )
178 __field( int, drop )
181 TP_fast_assign(
182 __entry->dev = inode->i_sb->s_dev;
183 __entry->ino = inode->i_ino;
184 __entry->drop = drop;
187 TP_printk("dev %d,%d ino %lu drop %d",
188 MAJOR(__entry->dev), MINOR(__entry->dev),
189 (unsigned long) __entry->ino, __entry->drop)
192 TRACE_EVENT(ext4_mark_inode_dirty,
193 TP_PROTO(struct inode *inode, unsigned long IP),
195 TP_ARGS(inode, IP),
197 TP_STRUCT__entry(
198 __field( dev_t, dev )
199 __field( ino_t, ino )
200 __field(unsigned long, ip )
203 TP_fast_assign(
204 __entry->dev = inode->i_sb->s_dev;
205 __entry->ino = inode->i_ino;
206 __entry->ip = IP;
209 TP_printk("dev %d,%d ino %lu caller %pF",
210 MAJOR(__entry->dev), MINOR(__entry->dev),
211 (unsigned long) __entry->ino, (void *)__entry->ip)
214 TRACE_EVENT(ext4_begin_ordered_truncate,
215 TP_PROTO(struct inode *inode, loff_t new_size),
217 TP_ARGS(inode, new_size),
219 TP_STRUCT__entry(
220 __field( dev_t, dev )
221 __field( ino_t, ino )
222 __field( loff_t, new_size )
225 TP_fast_assign(
226 __entry->dev = inode->i_sb->s_dev;
227 __entry->ino = inode->i_ino;
228 __entry->new_size = new_size;
231 TP_printk("dev %d,%d ino %lu new_size %lld",
232 MAJOR(__entry->dev), MINOR(__entry->dev),
233 (unsigned long) __entry->ino,
234 __entry->new_size)
237 DECLARE_EVENT_CLASS(ext4__write_begin,
239 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
240 unsigned int flags),
242 TP_ARGS(inode, pos, len, flags),
244 TP_STRUCT__entry(
245 __field( dev_t, dev )
246 __field( ino_t, ino )
247 __field( loff_t, pos )
248 __field( unsigned int, len )
249 __field( unsigned int, flags )
252 TP_fast_assign(
253 __entry->dev = inode->i_sb->s_dev;
254 __entry->ino = inode->i_ino;
255 __entry->pos = pos;
256 __entry->len = len;
257 __entry->flags = flags;
260 TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u",
261 MAJOR(__entry->dev), MINOR(__entry->dev),
262 (unsigned long) __entry->ino,
263 __entry->pos, __entry->len, __entry->flags)
266 DEFINE_EVENT(ext4__write_begin, ext4_write_begin,
268 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
269 unsigned int flags),
271 TP_ARGS(inode, pos, len, flags)
274 DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin,
276 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
277 unsigned int flags),
279 TP_ARGS(inode, pos, len, flags)
282 DECLARE_EVENT_CLASS(ext4__write_end,
283 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
284 unsigned int copied),
286 TP_ARGS(inode, pos, len, copied),
288 TP_STRUCT__entry(
289 __field( dev_t, dev )
290 __field( ino_t, ino )
291 __field( loff_t, pos )
292 __field( unsigned int, len )
293 __field( unsigned int, copied )
296 TP_fast_assign(
297 __entry->dev = inode->i_sb->s_dev;
298 __entry->ino = inode->i_ino;
299 __entry->pos = pos;
300 __entry->len = len;
301 __entry->copied = copied;
304 TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u",
305 MAJOR(__entry->dev), MINOR(__entry->dev),
306 (unsigned long) __entry->ino,
307 __entry->pos, __entry->len, __entry->copied)
310 DEFINE_EVENT(ext4__write_end, ext4_write_end,
312 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
313 unsigned int copied),
315 TP_ARGS(inode, pos, len, copied)
318 DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
320 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
321 unsigned int copied),
323 TP_ARGS(inode, pos, len, copied)
326 DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
328 TP_PROTO(struct inode *inode, loff_t pos, unsigned int len,
329 unsigned int copied),
331 TP_ARGS(inode, pos, len, copied)
334 TRACE_EVENT(ext4_writepages,
335 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
337 TP_ARGS(inode, wbc),
339 TP_STRUCT__entry(
340 __field( dev_t, dev )
341 __field( ino_t, ino )
342 __field( long, nr_to_write )
343 __field( long, pages_skipped )
344 __field( loff_t, range_start )
345 __field( loff_t, range_end )
346 __field( pgoff_t, writeback_index )
347 __field( int, sync_mode )
348 __field( char, for_kupdate )
349 __field( char, range_cyclic )
352 TP_fast_assign(
353 __entry->dev = inode->i_sb->s_dev;
354 __entry->ino = inode->i_ino;
355 __entry->nr_to_write = wbc->nr_to_write;
356 __entry->pages_skipped = wbc->pages_skipped;
357 __entry->range_start = wbc->range_start;
358 __entry->range_end = wbc->range_end;
359 __entry->writeback_index = inode->i_mapping->writeback_index;
360 __entry->sync_mode = wbc->sync_mode;
361 __entry->for_kupdate = wbc->for_kupdate;
362 __entry->range_cyclic = wbc->range_cyclic;
365 TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
366 "range_start %lld range_end %lld sync_mode %d "
367 "for_kupdate %d range_cyclic %d writeback_index %lu",
368 MAJOR(__entry->dev), MINOR(__entry->dev),
369 (unsigned long) __entry->ino, __entry->nr_to_write,
370 __entry->pages_skipped, __entry->range_start,
371 __entry->range_end, __entry->sync_mode,
372 __entry->for_kupdate, __entry->range_cyclic,
373 (unsigned long) __entry->writeback_index)
376 TRACE_EVENT(ext4_da_write_pages,
377 TP_PROTO(struct inode *inode, pgoff_t first_page,
378 struct writeback_control *wbc),
380 TP_ARGS(inode, first_page, wbc),
382 TP_STRUCT__entry(
383 __field( dev_t, dev )
384 __field( ino_t, ino )
385 __field( pgoff_t, first_page )
386 __field( long, nr_to_write )
387 __field( int, sync_mode )
390 TP_fast_assign(
391 __entry->dev = inode->i_sb->s_dev;
392 __entry->ino = inode->i_ino;
393 __entry->first_page = first_page;
394 __entry->nr_to_write = wbc->nr_to_write;
395 __entry->sync_mode = wbc->sync_mode;
398 TP_printk("dev %d,%d ino %lu first_page %lu nr_to_write %ld "
399 "sync_mode %d",
400 MAJOR(__entry->dev), MINOR(__entry->dev),
401 (unsigned long) __entry->ino, __entry->first_page,
402 __entry->nr_to_write, __entry->sync_mode)
405 TRACE_EVENT(ext4_da_write_pages_extent,
406 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map),
408 TP_ARGS(inode, map),
410 TP_STRUCT__entry(
411 __field( dev_t, dev )
412 __field( ino_t, ino )
413 __field( __u64, lblk )
414 __field( __u32, len )
415 __field( __u32, flags )
418 TP_fast_assign(
419 __entry->dev = inode->i_sb->s_dev;
420 __entry->ino = inode->i_ino;
421 __entry->lblk = map->m_lblk;
422 __entry->len = map->m_len;
423 __entry->flags = map->m_flags;
426 TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s",
427 MAJOR(__entry->dev), MINOR(__entry->dev),
428 (unsigned long) __entry->ino, __entry->lblk, __entry->len,
429 show_mflags(__entry->flags))
432 TRACE_EVENT(ext4_writepages_result,
433 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
434 int ret, int pages_written),
436 TP_ARGS(inode, wbc, ret, pages_written),
438 TP_STRUCT__entry(
439 __field( dev_t, dev )
440 __field( ino_t, ino )
441 __field( int, ret )
442 __field( int, pages_written )
443 __field( long, pages_skipped )
444 __field( pgoff_t, writeback_index )
445 __field( int, sync_mode )
448 TP_fast_assign(
449 __entry->dev = inode->i_sb->s_dev;
450 __entry->ino = inode->i_ino;
451 __entry->ret = ret;
452 __entry->pages_written = pages_written;
453 __entry->pages_skipped = wbc->pages_skipped;
454 __entry->writeback_index = inode->i_mapping->writeback_index;
455 __entry->sync_mode = wbc->sync_mode;
458 TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
459 "sync_mode %d writeback_index %lu",
460 MAJOR(__entry->dev), MINOR(__entry->dev),
461 (unsigned long) __entry->ino, __entry->ret,
462 __entry->pages_written, __entry->pages_skipped,
463 __entry->sync_mode,
464 (unsigned long) __entry->writeback_index)
467 DECLARE_EVENT_CLASS(ext4__page_op,
468 TP_PROTO(struct page *page),
470 TP_ARGS(page),
472 TP_STRUCT__entry(
473 __field( dev_t, dev )
474 __field( ino_t, ino )
475 __field( pgoff_t, index )
479 TP_fast_assign(
480 __entry->dev = page->mapping->host->i_sb->s_dev;
481 __entry->ino = page->mapping->host->i_ino;
482 __entry->index = page->index;
485 TP_printk("dev %d,%d ino %lu page_index %lu",
486 MAJOR(__entry->dev), MINOR(__entry->dev),
487 (unsigned long) __entry->ino,
488 (unsigned long) __entry->index)
491 DEFINE_EVENT(ext4__page_op, ext4_writepage,
493 TP_PROTO(struct page *page),
495 TP_ARGS(page)
498 DEFINE_EVENT(ext4__page_op, ext4_readpage,
500 TP_PROTO(struct page *page),
502 TP_ARGS(page)
505 DEFINE_EVENT(ext4__page_op, ext4_releasepage,
507 TP_PROTO(struct page *page),
509 TP_ARGS(page)
512 DECLARE_EVENT_CLASS(ext4_invalidatepage_op,
513 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
515 TP_ARGS(page, offset, length),
517 TP_STRUCT__entry(
518 __field( dev_t, dev )
519 __field( ino_t, ino )
520 __field( pgoff_t, index )
521 __field( unsigned int, offset )
522 __field( unsigned int, length )
525 TP_fast_assign(
526 __entry->dev = page->mapping->host->i_sb->s_dev;
527 __entry->ino = page->mapping->host->i_ino;
528 __entry->index = page->index;
529 __entry->offset = offset;
530 __entry->length = length;
533 TP_printk("dev %d,%d ino %lu page_index %lu offset %u length %u",
534 MAJOR(__entry->dev), MINOR(__entry->dev),
535 (unsigned long) __entry->ino,
536 (unsigned long) __entry->index,
537 __entry->offset, __entry->length)
540 DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage,
541 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
543 TP_ARGS(page, offset, length)
546 DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
547 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
549 TP_ARGS(page, offset, length)
552 TRACE_EVENT(ext4_discard_blocks,
553 TP_PROTO(struct super_block *sb, unsigned long long blk,
554 unsigned long long count),
556 TP_ARGS(sb, blk, count),
558 TP_STRUCT__entry(
559 __field( dev_t, dev )
560 __field( __u64, blk )
561 __field( __u64, count )
565 TP_fast_assign(
566 __entry->dev = sb->s_dev;
567 __entry->blk = blk;
568 __entry->count = count;
571 TP_printk("dev %d,%d blk %llu count %llu",
572 MAJOR(__entry->dev), MINOR(__entry->dev),
573 __entry->blk, __entry->count)
576 DECLARE_EVENT_CLASS(ext4__mb_new_pa,
577 TP_PROTO(struct ext4_allocation_context *ac,
578 struct ext4_prealloc_space *pa),
580 TP_ARGS(ac, pa),
582 TP_STRUCT__entry(
583 __field( dev_t, dev )
584 __field( ino_t, ino )
585 __field( __u64, pa_pstart )
586 __field( __u64, pa_lstart )
587 __field( __u32, pa_len )
591 TP_fast_assign(
592 __entry->dev = ac->ac_sb->s_dev;
593 __entry->ino = ac->ac_inode->i_ino;
594 __entry->pa_pstart = pa->pa_pstart;
595 __entry->pa_lstart = pa->pa_lstart;
596 __entry->pa_len = pa->pa_len;
599 TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu",
600 MAJOR(__entry->dev), MINOR(__entry->dev),
601 (unsigned long) __entry->ino,
602 __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart)
605 DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa,
607 TP_PROTO(struct ext4_allocation_context *ac,
608 struct ext4_prealloc_space *pa),
610 TP_ARGS(ac, pa)
613 DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
615 TP_PROTO(struct ext4_allocation_context *ac,
616 struct ext4_prealloc_space *pa),
618 TP_ARGS(ac, pa)
621 TRACE_EVENT(ext4_mb_release_inode_pa,
622 TP_PROTO(struct ext4_prealloc_space *pa,
623 unsigned long long block, unsigned int count),
625 TP_ARGS(pa, block, count),
627 TP_STRUCT__entry(
628 __field( dev_t, dev )
629 __field( ino_t, ino )
630 __field( __u64, block )
631 __field( __u32, count )
635 TP_fast_assign(
636 __entry->dev = pa->pa_inode->i_sb->s_dev;
637 __entry->ino = pa->pa_inode->i_ino;
638 __entry->block = block;
639 __entry->count = count;
642 TP_printk("dev %d,%d ino %lu block %llu count %u",
643 MAJOR(__entry->dev), MINOR(__entry->dev),
644 (unsigned long) __entry->ino,
645 __entry->block, __entry->count)
648 TRACE_EVENT(ext4_mb_release_group_pa,
649 TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa),
651 TP_ARGS(sb, pa),
653 TP_STRUCT__entry(
654 __field( dev_t, dev )
655 __field( __u64, pa_pstart )
656 __field( __u32, pa_len )
660 TP_fast_assign(
661 __entry->dev = sb->s_dev;
662 __entry->pa_pstart = pa->pa_pstart;
663 __entry->pa_len = pa->pa_len;
666 TP_printk("dev %d,%d pstart %llu len %u",
667 MAJOR(__entry->dev), MINOR(__entry->dev),
668 __entry->pa_pstart, __entry->pa_len)
671 TRACE_EVENT(ext4_discard_preallocations,
672 TP_PROTO(struct inode *inode),
674 TP_ARGS(inode),
676 TP_STRUCT__entry(
677 __field( dev_t, dev )
678 __field( ino_t, ino )
682 TP_fast_assign(
683 __entry->dev = inode->i_sb->s_dev;
684 __entry->ino = inode->i_ino;
687 TP_printk("dev %d,%d ino %lu",
688 MAJOR(__entry->dev), MINOR(__entry->dev),
689 (unsigned long) __entry->ino)
692 TRACE_EVENT(ext4_mb_discard_preallocations,
693 TP_PROTO(struct super_block *sb, int needed),
695 TP_ARGS(sb, needed),
697 TP_STRUCT__entry(
698 __field( dev_t, dev )
699 __field( int, needed )
703 TP_fast_assign(
704 __entry->dev = sb->s_dev;
705 __entry->needed = needed;
708 TP_printk("dev %d,%d needed %d",
709 MAJOR(__entry->dev), MINOR(__entry->dev),
710 __entry->needed)
713 TRACE_EVENT(ext4_request_blocks,
714 TP_PROTO(struct ext4_allocation_request *ar),
716 TP_ARGS(ar),
718 TP_STRUCT__entry(
719 __field( dev_t, dev )
720 __field( ino_t, ino )
721 __field( unsigned int, len )
722 __field( __u32, logical )
723 __field( __u32, lleft )
724 __field( __u32, lright )
725 __field( __u64, goal )
726 __field( __u64, pleft )
727 __field( __u64, pright )
728 __field( unsigned int, flags )
731 TP_fast_assign(
732 __entry->dev = ar->inode->i_sb->s_dev;
733 __entry->ino = ar->inode->i_ino;
734 __entry->len = ar->len;
735 __entry->logical = ar->logical;
736 __entry->goal = ar->goal;
737 __entry->lleft = ar->lleft;
738 __entry->lright = ar->lright;
739 __entry->pleft = ar->pleft;
740 __entry->pright = ar->pright;
741 __entry->flags = ar->flags;
744 TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu "
745 "lleft %u lright %u pleft %llu pright %llu ",
746 MAJOR(__entry->dev), MINOR(__entry->dev),
747 (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
748 __entry->len, __entry->logical, __entry->goal,
749 __entry->lleft, __entry->lright, __entry->pleft,
750 __entry->pright)
753 TRACE_EVENT(ext4_allocate_blocks,
754 TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block),
756 TP_ARGS(ar, block),
758 TP_STRUCT__entry(
759 __field( dev_t, dev )
760 __field( ino_t, ino )
761 __field( __u64, block )
762 __field( unsigned int, len )
763 __field( __u32, logical )
764 __field( __u32, lleft )
765 __field( __u32, lright )
766 __field( __u64, goal )
767 __field( __u64, pleft )
768 __field( __u64, pright )
769 __field( unsigned int, flags )
772 TP_fast_assign(
773 __entry->dev = ar->inode->i_sb->s_dev;
774 __entry->ino = ar->inode->i_ino;
775 __entry->block = block;
776 __entry->len = ar->len;
777 __entry->logical = ar->logical;
778 __entry->goal = ar->goal;
779 __entry->lleft = ar->lleft;
780 __entry->lright = ar->lright;
781 __entry->pleft = ar->pleft;
782 __entry->pright = ar->pright;
783 __entry->flags = ar->flags;
786 TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u "
787 "goal %llu lleft %u lright %u pleft %llu pright %llu",
788 MAJOR(__entry->dev), MINOR(__entry->dev),
789 (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
790 __entry->len, __entry->block, __entry->logical,
791 __entry->goal, __entry->lleft, __entry->lright,
792 __entry->pleft, __entry->pright)
795 TRACE_EVENT(ext4_free_blocks,
796 TP_PROTO(struct inode *inode, __u64 block, unsigned long count,
797 int flags),
799 TP_ARGS(inode, block, count, flags),
801 TP_STRUCT__entry(
802 __field( dev_t, dev )
803 __field( ino_t, ino )
804 __field( __u64, block )
805 __field( unsigned long, count )
806 __field( int, flags )
807 __field( __u16, mode )
810 TP_fast_assign(
811 __entry->dev = inode->i_sb->s_dev;
812 __entry->ino = inode->i_ino;
813 __entry->block = block;
814 __entry->count = count;
815 __entry->flags = flags;
816 __entry->mode = inode->i_mode;
819 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s",
820 MAJOR(__entry->dev), MINOR(__entry->dev),
821 (unsigned long) __entry->ino,
822 __entry->mode, __entry->block, __entry->count,
823 show_free_flags(__entry->flags))
826 TRACE_EVENT(ext4_sync_file_enter,
827 TP_PROTO(struct file *file, int datasync),
829 TP_ARGS(file, datasync),
831 TP_STRUCT__entry(
832 __field( dev_t, dev )
833 __field( ino_t, ino )
834 __field( ino_t, parent )
835 __field( int, datasync )
838 TP_fast_assign(
839 struct dentry *dentry = file->f_path.dentry;
841 __entry->dev = dentry->d_inode->i_sb->s_dev;
842 __entry->ino = dentry->d_inode->i_ino;
843 __entry->datasync = datasync;
844 __entry->parent = dentry->d_parent->d_inode->i_ino;
847 TP_printk("dev %d,%d ino %lu parent %lu datasync %d ",
848 MAJOR(__entry->dev), MINOR(__entry->dev),
849 (unsigned long) __entry->ino,
850 (unsigned long) __entry->parent, __entry->datasync)
853 TRACE_EVENT(ext4_sync_file_exit,
854 TP_PROTO(struct inode *inode, int ret),
856 TP_ARGS(inode, ret),
858 TP_STRUCT__entry(
859 __field( dev_t, dev )
860 __field( ino_t, ino )
861 __field( int, ret )
864 TP_fast_assign(
865 __entry->dev = inode->i_sb->s_dev;
866 __entry->ino = inode->i_ino;
867 __entry->ret = ret;
870 TP_printk("dev %d,%d ino %lu ret %d",
871 MAJOR(__entry->dev), MINOR(__entry->dev),
872 (unsigned long) __entry->ino,
873 __entry->ret)
876 TRACE_EVENT(ext4_sync_fs,
877 TP_PROTO(struct super_block *sb, int wait),
879 TP_ARGS(sb, wait),
881 TP_STRUCT__entry(
882 __field( dev_t, dev )
883 __field( int, wait )
887 TP_fast_assign(
888 __entry->dev = sb->s_dev;
889 __entry->wait = wait;
892 TP_printk("dev %d,%d wait %d",
893 MAJOR(__entry->dev), MINOR(__entry->dev),
894 __entry->wait)
897 TRACE_EVENT(ext4_alloc_da_blocks,
898 TP_PROTO(struct inode *inode),
900 TP_ARGS(inode),
902 TP_STRUCT__entry(
903 __field( dev_t, dev )
904 __field( ino_t, ino )
905 __field( unsigned int, data_blocks )
906 __field( unsigned int, meta_blocks )
909 TP_fast_assign(
910 __entry->dev = inode->i_sb->s_dev;
911 __entry->ino = inode->i_ino;
912 __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
913 __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
916 TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u",
917 MAJOR(__entry->dev), MINOR(__entry->dev),
918 (unsigned long) __entry->ino,
919 __entry->data_blocks, __entry->meta_blocks)
922 TRACE_EVENT(ext4_mballoc_alloc,
923 TP_PROTO(struct ext4_allocation_context *ac),
925 TP_ARGS(ac),
927 TP_STRUCT__entry(
928 __field( dev_t, dev )
929 __field( ino_t, ino )
930 __field( __u32, orig_logical )
931 __field( int, orig_start )
932 __field( __u32, orig_group )
933 __field( int, orig_len )
934 __field( __u32, goal_logical )
935 __field( int, goal_start )
936 __field( __u32, goal_group )
937 __field( int, goal_len )
938 __field( __u32, result_logical )
939 __field( int, result_start )
940 __field( __u32, result_group )
941 __field( int, result_len )
942 __field( __u16, found )
943 __field( __u16, groups )
944 __field( __u16, buddy )
945 __field( __u16, flags )
946 __field( __u16, tail )
947 __field( __u8, cr )
950 TP_fast_assign(
951 __entry->dev = ac->ac_inode->i_sb->s_dev;
952 __entry->ino = ac->ac_inode->i_ino;
953 __entry->orig_logical = ac->ac_o_ex.fe_logical;
954 __entry->orig_start = ac->ac_o_ex.fe_start;
955 __entry->orig_group = ac->ac_o_ex.fe_group;
956 __entry->orig_len = ac->ac_o_ex.fe_len;
957 __entry->goal_logical = ac->ac_g_ex.fe_logical;
958 __entry->goal_start = ac->ac_g_ex.fe_start;
959 __entry->goal_group = ac->ac_g_ex.fe_group;
960 __entry->goal_len = ac->ac_g_ex.fe_len;
961 __entry->result_logical = ac->ac_f_ex.fe_logical;
962 __entry->result_start = ac->ac_f_ex.fe_start;
963 __entry->result_group = ac->ac_f_ex.fe_group;
964 __entry->result_len = ac->ac_f_ex.fe_len;
965 __entry->found = ac->ac_found;
966 __entry->flags = ac->ac_flags;
967 __entry->groups = ac->ac_groups_scanned;
968 __entry->buddy = ac->ac_buddy;
969 __entry->tail = ac->ac_tail;
970 __entry->cr = ac->ac_criteria;
973 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
974 "result %u/%d/%u@%u blks %u grps %u cr %u flags %s "
975 "tail %u broken %u",
976 MAJOR(__entry->dev), MINOR(__entry->dev),
977 (unsigned long) __entry->ino,
978 __entry->orig_group, __entry->orig_start,
979 __entry->orig_len, __entry->orig_logical,
980 __entry->goal_group, __entry->goal_start,
981 __entry->goal_len, __entry->goal_logical,
982 __entry->result_group, __entry->result_start,
983 __entry->result_len, __entry->result_logical,
984 __entry->found, __entry->groups, __entry->cr,
985 show_mballoc_flags(__entry->flags), __entry->tail,
986 __entry->buddy ? 1 << __entry->buddy : 0)
989 TRACE_EVENT(ext4_mballoc_prealloc,
990 TP_PROTO(struct ext4_allocation_context *ac),
992 TP_ARGS(ac),
994 TP_STRUCT__entry(
995 __field( dev_t, dev )
996 __field( ino_t, ino )
997 __field( __u32, orig_logical )
998 __field( int, orig_start )
999 __field( __u32, orig_group )
1000 __field( int, orig_len )
1001 __field( __u32, result_logical )
1002 __field( int, result_start )
1003 __field( __u32, result_group )
1004 __field( int, result_len )
1007 TP_fast_assign(
1008 __entry->dev = ac->ac_inode->i_sb->s_dev;
1009 __entry->ino = ac->ac_inode->i_ino;
1010 __entry->orig_logical = ac->ac_o_ex.fe_logical;
1011 __entry->orig_start = ac->ac_o_ex.fe_start;
1012 __entry->orig_group = ac->ac_o_ex.fe_group;
1013 __entry->orig_len = ac->ac_o_ex.fe_len;
1014 __entry->result_logical = ac->ac_b_ex.fe_logical;
1015 __entry->result_start = ac->ac_b_ex.fe_start;
1016 __entry->result_group = ac->ac_b_ex.fe_group;
1017 __entry->result_len = ac->ac_b_ex.fe_len;
1020 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
1021 MAJOR(__entry->dev), MINOR(__entry->dev),
1022 (unsigned long) __entry->ino,
1023 __entry->orig_group, __entry->orig_start,
1024 __entry->orig_len, __entry->orig_logical,
1025 __entry->result_group, __entry->result_start,
1026 __entry->result_len, __entry->result_logical)
1029 DECLARE_EVENT_CLASS(ext4__mballoc,
1030 TP_PROTO(struct super_block *sb,
1031 struct inode *inode,
1032 ext4_group_t group,
1033 ext4_grpblk_t start,
1034 ext4_grpblk_t len),
1036 TP_ARGS(sb, inode, group, start, len),
1038 TP_STRUCT__entry(
1039 __field( dev_t, dev )
1040 __field( ino_t, ino )
1041 __field( int, result_start )
1042 __field( __u32, result_group )
1043 __field( int, result_len )
1046 TP_fast_assign(
1047 __entry->dev = sb->s_dev;
1048 __entry->ino = inode ? inode->i_ino : 0;
1049 __entry->result_start = start;
1050 __entry->result_group = group;
1051 __entry->result_len = len;
1054 TP_printk("dev %d,%d inode %lu extent %u/%d/%d ",
1055 MAJOR(__entry->dev), MINOR(__entry->dev),
1056 (unsigned long) __entry->ino,
1057 __entry->result_group, __entry->result_start,
1058 __entry->result_len)
1061 DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard,
1063 TP_PROTO(struct super_block *sb,
1064 struct inode *inode,
1065 ext4_group_t group,
1066 ext4_grpblk_t start,
1067 ext4_grpblk_t len),
1069 TP_ARGS(sb, inode, group, start, len)
1072 DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free,
1074 TP_PROTO(struct super_block *sb,
1075 struct inode *inode,
1076 ext4_group_t group,
1077 ext4_grpblk_t start,
1078 ext4_grpblk_t len),
1080 TP_ARGS(sb, inode, group, start, len)
1083 TRACE_EVENT(ext4_forget,
1084 TP_PROTO(struct inode *inode, int is_metadata, __u64 block),
1086 TP_ARGS(inode, is_metadata, block),
1088 TP_STRUCT__entry(
1089 __field( dev_t, dev )
1090 __field( ino_t, ino )
1091 __field( __u64, block )
1092 __field( int, is_metadata )
1093 __field( __u16, mode )
1096 TP_fast_assign(
1097 __entry->dev = inode->i_sb->s_dev;
1098 __entry->ino = inode->i_ino;
1099 __entry->block = block;
1100 __entry->is_metadata = is_metadata;
1101 __entry->mode = inode->i_mode;
1104 TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
1105 MAJOR(__entry->dev), MINOR(__entry->dev),
1106 (unsigned long) __entry->ino,
1107 __entry->mode, __entry->is_metadata, __entry->block)
1110 TRACE_EVENT(ext4_da_update_reserve_space,
1111 TP_PROTO(struct inode *inode, int used_blocks, int quota_claim),
1113 TP_ARGS(inode, used_blocks, quota_claim),
1115 TP_STRUCT__entry(
1116 __field( dev_t, dev )
1117 __field( ino_t, ino )
1118 __field( __u64, i_blocks )
1119 __field( int, used_blocks )
1120 __field( int, reserved_data_blocks )
1121 __field( int, reserved_meta_blocks )
1122 __field( int, allocated_meta_blocks )
1123 __field( int, quota_claim )
1124 __field( __u16, mode )
1127 TP_fast_assign(
1128 __entry->dev = inode->i_sb->s_dev;
1129 __entry->ino = inode->i_ino;
1130 __entry->i_blocks = inode->i_blocks;
1131 __entry->used_blocks = used_blocks;
1132 __entry->reserved_data_blocks =
1133 EXT4_I(inode)->i_reserved_data_blocks;
1134 __entry->reserved_meta_blocks =
1135 EXT4_I(inode)->i_reserved_meta_blocks;
1136 __entry->allocated_meta_blocks =
1137 EXT4_I(inode)->i_allocated_meta_blocks;
1138 __entry->quota_claim = quota_claim;
1139 __entry->mode = inode->i_mode;
1142 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1143 "reserved_data_blocks %d reserved_meta_blocks %d "
1144 "allocated_meta_blocks %d quota_claim %d",
1145 MAJOR(__entry->dev), MINOR(__entry->dev),
1146 (unsigned long) __entry->ino,
1147 __entry->mode, __entry->i_blocks,
1148 __entry->used_blocks, __entry->reserved_data_blocks,
1149 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks,
1150 __entry->quota_claim)
1153 TRACE_EVENT(ext4_da_reserve_space,
1154 TP_PROTO(struct inode *inode, int md_needed),
1156 TP_ARGS(inode, md_needed),
1158 TP_STRUCT__entry(
1159 __field( dev_t, dev )
1160 __field( ino_t, ino )
1161 __field( __u64, i_blocks )
1162 __field( int, md_needed )
1163 __field( int, reserved_data_blocks )
1164 __field( int, reserved_meta_blocks )
1165 __field( __u16, mode )
1168 TP_fast_assign(
1169 __entry->dev = inode->i_sb->s_dev;
1170 __entry->ino = inode->i_ino;
1171 __entry->i_blocks = inode->i_blocks;
1172 __entry->md_needed = md_needed;
1173 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
1174 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
1175 __entry->mode = inode->i_mode;
1178 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
1179 "reserved_data_blocks %d reserved_meta_blocks %d",
1180 MAJOR(__entry->dev), MINOR(__entry->dev),
1181 (unsigned long) __entry->ino,
1182 __entry->mode, __entry->i_blocks,
1183 __entry->md_needed, __entry->reserved_data_blocks,
1184 __entry->reserved_meta_blocks)
1187 TRACE_EVENT(ext4_da_release_space,
1188 TP_PROTO(struct inode *inode, int freed_blocks),
1190 TP_ARGS(inode, freed_blocks),
1192 TP_STRUCT__entry(
1193 __field( dev_t, dev )
1194 __field( ino_t, ino )
1195 __field( __u64, i_blocks )
1196 __field( int, freed_blocks )
1197 __field( int, reserved_data_blocks )
1198 __field( int, reserved_meta_blocks )
1199 __field( int, allocated_meta_blocks )
1200 __field( __u16, mode )
1203 TP_fast_assign(
1204 __entry->dev = inode->i_sb->s_dev;
1205 __entry->ino = inode->i_ino;
1206 __entry->i_blocks = inode->i_blocks;
1207 __entry->freed_blocks = freed_blocks;
1208 __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks;
1209 __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks;
1210 __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks;
1211 __entry->mode = inode->i_mode;
1214 TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1215 "reserved_data_blocks %d reserved_meta_blocks %d "
1216 "allocated_meta_blocks %d",
1217 MAJOR(__entry->dev), MINOR(__entry->dev),
1218 (unsigned long) __entry->ino,
1219 __entry->mode, __entry->i_blocks,
1220 __entry->freed_blocks, __entry->reserved_data_blocks,
1221 __entry->reserved_meta_blocks, __entry->allocated_meta_blocks)
1224 DECLARE_EVENT_CLASS(ext4__bitmap_load,
1225 TP_PROTO(struct super_block *sb, unsigned long group),
1227 TP_ARGS(sb, group),
1229 TP_STRUCT__entry(
1230 __field( dev_t, dev )
1231 __field( __u32, group )
1235 TP_fast_assign(
1236 __entry->dev = sb->s_dev;
1237 __entry->group = group;
1240 TP_printk("dev %d,%d group %u",
1241 MAJOR(__entry->dev), MINOR(__entry->dev),
1242 __entry->group)
1245 DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load,
1247 TP_PROTO(struct super_block *sb, unsigned long group),
1249 TP_ARGS(sb, group)
1252 DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
1254 TP_PROTO(struct super_block *sb, unsigned long group),
1256 TP_ARGS(sb, group)
1259 DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load,
1261 TP_PROTO(struct super_block *sb, unsigned long group),
1263 TP_ARGS(sb, group)
1266 DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap,
1268 TP_PROTO(struct super_block *sb, unsigned long group),
1270 TP_ARGS(sb, group)
1273 TRACE_EVENT(ext4_direct_IO_enter,
1274 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw),
1276 TP_ARGS(inode, offset, len, rw),
1278 TP_STRUCT__entry(
1279 __field( dev_t, dev )
1280 __field( ino_t, ino )
1281 __field( loff_t, pos )
1282 __field( unsigned long, len )
1283 __field( int, rw )
1286 TP_fast_assign(
1287 __entry->dev = inode->i_sb->s_dev;
1288 __entry->ino = inode->i_ino;
1289 __entry->pos = offset;
1290 __entry->len = len;
1291 __entry->rw = rw;
1294 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d",
1295 MAJOR(__entry->dev), MINOR(__entry->dev),
1296 (unsigned long) __entry->ino,
1297 __entry->pos, __entry->len, __entry->rw)
1300 TRACE_EVENT(ext4_direct_IO_exit,
1301 TP_PROTO(struct inode *inode, loff_t offset, unsigned long len,
1302 int rw, int ret),
1304 TP_ARGS(inode, offset, len, rw, ret),
1306 TP_STRUCT__entry(
1307 __field( dev_t, dev )
1308 __field( ino_t, ino )
1309 __field( loff_t, pos )
1310 __field( unsigned long, len )
1311 __field( int, rw )
1312 __field( int, ret )
1315 TP_fast_assign(
1316 __entry->dev = inode->i_sb->s_dev;
1317 __entry->ino = inode->i_ino;
1318 __entry->pos = offset;
1319 __entry->len = len;
1320 __entry->rw = rw;
1321 __entry->ret = ret;
1324 TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
1325 MAJOR(__entry->dev), MINOR(__entry->dev),
1326 (unsigned long) __entry->ino,
1327 __entry->pos, __entry->len,
1328 __entry->rw, __entry->ret)
1331 TRACE_EVENT(ext4_fallocate_enter,
1332 TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode),
1334 TP_ARGS(inode, offset, len, mode),
1336 TP_STRUCT__entry(
1337 __field( dev_t, dev )
1338 __field( ino_t, ino )
1339 __field( loff_t, pos )
1340 __field( loff_t, len )
1341 __field( int, mode )
1344 TP_fast_assign(
1345 __entry->dev = inode->i_sb->s_dev;
1346 __entry->ino = inode->i_ino;
1347 __entry->pos = offset;
1348 __entry->len = len;
1349 __entry->mode = mode;
1352 TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d",
1353 MAJOR(__entry->dev), MINOR(__entry->dev),
1354 (unsigned long) __entry->ino, __entry->pos,
1355 __entry->len, __entry->mode)
1358 TRACE_EVENT(ext4_fallocate_exit,
1359 TP_PROTO(struct inode *inode, loff_t offset,
1360 unsigned int max_blocks, int ret),
1362 TP_ARGS(inode, offset, max_blocks, ret),
1364 TP_STRUCT__entry(
1365 __field( dev_t, dev )
1366 __field( ino_t, ino )
1367 __field( loff_t, pos )
1368 __field( unsigned int, blocks )
1369 __field( int, ret )
1372 TP_fast_assign(
1373 __entry->dev = inode->i_sb->s_dev;
1374 __entry->ino = inode->i_ino;
1375 __entry->pos = offset;
1376 __entry->blocks = max_blocks;
1377 __entry->ret = ret;
1380 TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d",
1381 MAJOR(__entry->dev), MINOR(__entry->dev),
1382 (unsigned long) __entry->ino,
1383 __entry->pos, __entry->blocks,
1384 __entry->ret)
1387 TRACE_EVENT(ext4_punch_hole,
1388 TP_PROTO(struct inode *inode, loff_t offset, loff_t len),
1390 TP_ARGS(inode, offset, len),
1392 TP_STRUCT__entry(
1393 __field( dev_t, dev )
1394 __field( ino_t, ino )
1395 __field( loff_t, offset )
1396 __field( loff_t, len )
1399 TP_fast_assign(
1400 __entry->dev = inode->i_sb->s_dev;
1401 __entry->ino = inode->i_ino;
1402 __entry->offset = offset;
1403 __entry->len = len;
1406 TP_printk("dev %d,%d ino %lu offset %lld len %lld",
1407 MAJOR(__entry->dev), MINOR(__entry->dev),
1408 (unsigned long) __entry->ino,
1409 __entry->offset, __entry->len)
1412 TRACE_EVENT(ext4_unlink_enter,
1413 TP_PROTO(struct inode *parent, struct dentry *dentry),
1415 TP_ARGS(parent, dentry),
1417 TP_STRUCT__entry(
1418 __field( dev_t, dev )
1419 __field( ino_t, ino )
1420 __field( ino_t, parent )
1421 __field( loff_t, size )
1424 TP_fast_assign(
1425 __entry->dev = dentry->d_inode->i_sb->s_dev;
1426 __entry->ino = dentry->d_inode->i_ino;
1427 __entry->parent = parent->i_ino;
1428 __entry->size = dentry->d_inode->i_size;
1431 TP_printk("dev %d,%d ino %lu size %lld parent %lu",
1432 MAJOR(__entry->dev), MINOR(__entry->dev),
1433 (unsigned long) __entry->ino, __entry->size,
1434 (unsigned long) __entry->parent)
1437 TRACE_EVENT(ext4_unlink_exit,
1438 TP_PROTO(struct dentry *dentry, int ret),
1440 TP_ARGS(dentry, ret),
1442 TP_STRUCT__entry(
1443 __field( dev_t, dev )
1444 __field( ino_t, ino )
1445 __field( int, ret )
1448 TP_fast_assign(
1449 __entry->dev = dentry->d_inode->i_sb->s_dev;
1450 __entry->ino = dentry->d_inode->i_ino;
1451 __entry->ret = ret;
1454 TP_printk("dev %d,%d ino %lu ret %d",
1455 MAJOR(__entry->dev), MINOR(__entry->dev),
1456 (unsigned long) __entry->ino,
1457 __entry->ret)
1460 DECLARE_EVENT_CLASS(ext4__truncate,
1461 TP_PROTO(struct inode *inode),
1463 TP_ARGS(inode),
1465 TP_STRUCT__entry(
1466 __field( dev_t, dev )
1467 __field( ino_t, ino )
1468 __field( __u64, blocks )
1471 TP_fast_assign(
1472 __entry->dev = inode->i_sb->s_dev;
1473 __entry->ino = inode->i_ino;
1474 __entry->blocks = inode->i_blocks;
1477 TP_printk("dev %d,%d ino %lu blocks %llu",
1478 MAJOR(__entry->dev), MINOR(__entry->dev),
1479 (unsigned long) __entry->ino, __entry->blocks)
1482 DEFINE_EVENT(ext4__truncate, ext4_truncate_enter,
1484 TP_PROTO(struct inode *inode),
1486 TP_ARGS(inode)
1489 DEFINE_EVENT(ext4__truncate, ext4_truncate_exit,
1491 TP_PROTO(struct inode *inode),
1493 TP_ARGS(inode)
1496 /* 'ux' is the uninitialized extent. */
1497 TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
1498 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1499 struct ext4_extent *ux),
1501 TP_ARGS(inode, map, ux),
1503 TP_STRUCT__entry(
1504 __field( dev_t, dev )
1505 __field( ino_t, ino )
1506 __field( ext4_lblk_t, m_lblk )
1507 __field( unsigned, m_len )
1508 __field( ext4_lblk_t, u_lblk )
1509 __field( unsigned, u_len )
1510 __field( ext4_fsblk_t, u_pblk )
1513 TP_fast_assign(
1514 __entry->dev = inode->i_sb->s_dev;
1515 __entry->ino = inode->i_ino;
1516 __entry->m_lblk = map->m_lblk;
1517 __entry->m_len = map->m_len;
1518 __entry->u_lblk = le32_to_cpu(ux->ee_block);
1519 __entry->u_len = ext4_ext_get_actual_len(ux);
1520 __entry->u_pblk = ext4_ext_pblock(ux);
1523 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
1524 "u_pblk %llu",
1525 MAJOR(__entry->dev), MINOR(__entry->dev),
1526 (unsigned long) __entry->ino,
1527 __entry->m_lblk, __entry->m_len,
1528 __entry->u_lblk, __entry->u_len, __entry->u_pblk)
1532 * 'ux' is the uninitialized extent.
1533 * 'ix' is the initialized extent to which blocks are transferred.
1535 TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
1536 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map,
1537 struct ext4_extent *ux, struct ext4_extent *ix),
1539 TP_ARGS(inode, map, ux, ix),
1541 TP_STRUCT__entry(
1542 __field( dev_t, dev )
1543 __field( ino_t, ino )
1544 __field( ext4_lblk_t, m_lblk )
1545 __field( unsigned, m_len )
1546 __field( ext4_lblk_t, u_lblk )
1547 __field( unsigned, u_len )
1548 __field( ext4_fsblk_t, u_pblk )
1549 __field( ext4_lblk_t, i_lblk )
1550 __field( unsigned, i_len )
1551 __field( ext4_fsblk_t, i_pblk )
1554 TP_fast_assign(
1555 __entry->dev = inode->i_sb->s_dev;
1556 __entry->ino = inode->i_ino;
1557 __entry->m_lblk = map->m_lblk;
1558 __entry->m_len = map->m_len;
1559 __entry->u_lblk = le32_to_cpu(ux->ee_block);
1560 __entry->u_len = ext4_ext_get_actual_len(ux);
1561 __entry->u_pblk = ext4_ext_pblock(ux);
1562 __entry->i_lblk = le32_to_cpu(ix->ee_block);
1563 __entry->i_len = ext4_ext_get_actual_len(ix);
1564 __entry->i_pblk = ext4_ext_pblock(ix);
1567 TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u "
1568 "u_lblk %u u_len %u u_pblk %llu "
1569 "i_lblk %u i_len %u i_pblk %llu ",
1570 MAJOR(__entry->dev), MINOR(__entry->dev),
1571 (unsigned long) __entry->ino,
1572 __entry->m_lblk, __entry->m_len,
1573 __entry->u_lblk, __entry->u_len, __entry->u_pblk,
1574 __entry->i_lblk, __entry->i_len, __entry->i_pblk)
1577 DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
1578 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1579 unsigned int len, unsigned int flags),
1581 TP_ARGS(inode, lblk, len, flags),
1583 TP_STRUCT__entry(
1584 __field( dev_t, dev )
1585 __field( ino_t, ino )
1586 __field( ext4_lblk_t, lblk )
1587 __field( unsigned int, len )
1588 __field( unsigned int, flags )
1591 TP_fast_assign(
1592 __entry->dev = inode->i_sb->s_dev;
1593 __entry->ino = inode->i_ino;
1594 __entry->lblk = lblk;
1595 __entry->len = len;
1596 __entry->flags = flags;
1599 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s",
1600 MAJOR(__entry->dev), MINOR(__entry->dev),
1601 (unsigned long) __entry->ino,
1602 __entry->lblk, __entry->len, show_map_flags(__entry->flags))
1605 DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
1606 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1607 unsigned len, unsigned flags),
1609 TP_ARGS(inode, lblk, len, flags)
1612 DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1613 TP_PROTO(struct inode *inode, ext4_lblk_t lblk,
1614 unsigned len, unsigned flags),
1616 TP_ARGS(inode, lblk, len, flags)
1619 DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
1620 TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map,
1621 int ret),
1623 TP_ARGS(inode, flags, map, ret),
1625 TP_STRUCT__entry(
1626 __field( dev_t, dev )
1627 __field( ino_t, ino )
1628 __field( unsigned int, flags )
1629 __field( ext4_fsblk_t, pblk )
1630 __field( ext4_lblk_t, lblk )
1631 __field( unsigned int, len )
1632 __field( unsigned int, mflags )
1633 __field( int, ret )
1636 TP_fast_assign(
1637 __entry->dev = inode->i_sb->s_dev;
1638 __entry->ino = inode->i_ino;
1639 __entry->flags = flags;
1640 __entry->pblk = map->m_pblk;
1641 __entry->lblk = map->m_lblk;
1642 __entry->len = map->m_len;
1643 __entry->mflags = map->m_flags;
1644 __entry->ret = ret;
1647 TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u "
1648 "mflags %s ret %d",
1649 MAJOR(__entry->dev), MINOR(__entry->dev),
1650 (unsigned long) __entry->ino,
1651 show_map_flags(__entry->flags), __entry->lblk, __entry->pblk,
1652 __entry->len, show_mflags(__entry->mflags), __entry->ret)
1655 DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1656 TP_PROTO(struct inode *inode, unsigned flags,
1657 struct ext4_map_blocks *map, int ret),
1659 TP_ARGS(inode, flags, map, ret)
1662 DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1663 TP_PROTO(struct inode *inode, unsigned flags,
1664 struct ext4_map_blocks *map, int ret),
1666 TP_ARGS(inode, flags, map, ret)
1669 TRACE_EVENT(ext4_ext_load_extent,
1670 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk),
1672 TP_ARGS(inode, lblk, pblk),
1674 TP_STRUCT__entry(
1675 __field( dev_t, dev )
1676 __field( ino_t, ino )
1677 __field( ext4_fsblk_t, pblk )
1678 __field( ext4_lblk_t, lblk )
1681 TP_fast_assign(
1682 __entry->dev = inode->i_sb->s_dev;
1683 __entry->ino = inode->i_ino;
1684 __entry->pblk = pblk;
1685 __entry->lblk = lblk;
1688 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu",
1689 MAJOR(__entry->dev), MINOR(__entry->dev),
1690 (unsigned long) __entry->ino,
1691 __entry->lblk, __entry->pblk)
1694 TRACE_EVENT(ext4_load_inode,
1695 TP_PROTO(struct inode *inode),
1697 TP_ARGS(inode),
1699 TP_STRUCT__entry(
1700 __field( dev_t, dev )
1701 __field( ino_t, ino )
1704 TP_fast_assign(
1705 __entry->dev = inode->i_sb->s_dev;
1706 __entry->ino = inode->i_ino;
1709 TP_printk("dev %d,%d ino %ld",
1710 MAJOR(__entry->dev), MINOR(__entry->dev),
1711 (unsigned long) __entry->ino)
1714 TRACE_EVENT(ext4_journal_start,
1715 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1716 unsigned long IP),
1718 TP_ARGS(sb, blocks, rsv_blocks, IP),
1720 TP_STRUCT__entry(
1721 __field( dev_t, dev )
1722 __field(unsigned long, ip )
1723 __field( int, blocks )
1724 __field( int, rsv_blocks )
1727 TP_fast_assign(
1728 __entry->dev = sb->s_dev;
1729 __entry->ip = IP;
1730 __entry->blocks = blocks;
1731 __entry->rsv_blocks = rsv_blocks;
1734 TP_printk("dev %d,%d blocks, %d rsv_blocks, %d caller %pF",
1735 MAJOR(__entry->dev), MINOR(__entry->dev),
1736 __entry->blocks, __entry->rsv_blocks, (void *)__entry->ip)
1739 TRACE_EVENT(ext4_journal_start_reserved,
1740 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1742 TP_ARGS(sb, blocks, IP),
1744 TP_STRUCT__entry(
1745 __field( dev_t, dev )
1746 __field(unsigned long, ip )
1747 __field( int, blocks )
1750 TP_fast_assign(
1751 __entry->dev = sb->s_dev;
1752 __entry->ip = IP;
1753 __entry->blocks = blocks;
1756 TP_printk("dev %d,%d blocks, %d caller %pF",
1757 MAJOR(__entry->dev), MINOR(__entry->dev),
1758 __entry->blocks, (void *)__entry->ip)
1761 DECLARE_EVENT_CLASS(ext4__trim,
1762 TP_PROTO(struct super_block *sb,
1763 ext4_group_t group,
1764 ext4_grpblk_t start,
1765 ext4_grpblk_t len),
1767 TP_ARGS(sb, group, start, len),
1769 TP_STRUCT__entry(
1770 __field( int, dev_major )
1771 __field( int, dev_minor )
1772 __field( __u32, group )
1773 __field( int, start )
1774 __field( int, len )
1777 TP_fast_assign(
1778 __entry->dev_major = MAJOR(sb->s_dev);
1779 __entry->dev_minor = MINOR(sb->s_dev);
1780 __entry->group = group;
1781 __entry->start = start;
1782 __entry->len = len;
1785 TP_printk("dev %d,%d group %u, start %d, len %d",
1786 __entry->dev_major, __entry->dev_minor,
1787 __entry->group, __entry->start, __entry->len)
1790 DEFINE_EVENT(ext4__trim, ext4_trim_extent,
1792 TP_PROTO(struct super_block *sb,
1793 ext4_group_t group,
1794 ext4_grpblk_t start,
1795 ext4_grpblk_t len),
1797 TP_ARGS(sb, group, start, len)
1800 DEFINE_EVENT(ext4__trim, ext4_trim_all_free,
1802 TP_PROTO(struct super_block *sb,
1803 ext4_group_t group,
1804 ext4_grpblk_t start,
1805 ext4_grpblk_t len),
1807 TP_ARGS(sb, group, start, len)
1810 TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
1811 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int flags,
1812 unsigned int allocated, ext4_fsblk_t newblock),
1814 TP_ARGS(inode, map, flags, allocated, newblock),
1816 TP_STRUCT__entry(
1817 __field( dev_t, dev )
1818 __field( ino_t, ino )
1819 __field( int, flags )
1820 __field( ext4_lblk_t, lblk )
1821 __field( ext4_fsblk_t, pblk )
1822 __field( unsigned int, len )
1823 __field( unsigned int, allocated )
1824 __field( ext4_fsblk_t, newblk )
1827 TP_fast_assign(
1828 __entry->dev = inode->i_sb->s_dev;
1829 __entry->ino = inode->i_ino;
1830 __entry->flags = flags;
1831 __entry->lblk = map->m_lblk;
1832 __entry->pblk = map->m_pblk;
1833 __entry->len = map->m_len;
1834 __entry->allocated = allocated;
1835 __entry->newblk = newblock;
1838 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s "
1839 "allocated %d newblock %llu",
1840 MAJOR(__entry->dev), MINOR(__entry->dev),
1841 (unsigned long) __entry->ino,
1842 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
1843 __entry->len, show_map_flags(__entry->flags),
1844 (unsigned int) __entry->allocated,
1845 (unsigned long long) __entry->newblk)
1848 TRACE_EVENT(ext4_get_implied_cluster_alloc_exit,
1849 TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret),
1851 TP_ARGS(sb, map, ret),
1853 TP_STRUCT__entry(
1854 __field( dev_t, dev )
1855 __field( unsigned int, flags )
1856 __field( ext4_lblk_t, lblk )
1857 __field( ext4_fsblk_t, pblk )
1858 __field( unsigned int, len )
1859 __field( int, ret )
1862 TP_fast_assign(
1863 __entry->dev = sb->s_dev;
1864 __entry->flags = map->m_flags;
1865 __entry->lblk = map->m_lblk;
1866 __entry->pblk = map->m_pblk;
1867 __entry->len = map->m_len;
1868 __entry->ret = ret;
1871 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %s ret %d",
1872 MAJOR(__entry->dev), MINOR(__entry->dev),
1873 __entry->lblk, (unsigned long long) __entry->pblk,
1874 __entry->len, show_mflags(__entry->flags), __entry->ret)
1877 TRACE_EVENT(ext4_ext_put_in_cache,
1878 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len,
1879 ext4_fsblk_t start),
1881 TP_ARGS(inode, lblk, len, start),
1883 TP_STRUCT__entry(
1884 __field( dev_t, dev )
1885 __field( ino_t, ino )
1886 __field( ext4_lblk_t, lblk )
1887 __field( unsigned int, len )
1888 __field( ext4_fsblk_t, start )
1891 TP_fast_assign(
1892 __entry->dev = inode->i_sb->s_dev;
1893 __entry->ino = inode->i_ino;
1894 __entry->lblk = lblk;
1895 __entry->len = len;
1896 __entry->start = start;
1899 TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu",
1900 MAJOR(__entry->dev), MINOR(__entry->dev),
1901 (unsigned long) __entry->ino,
1902 (unsigned) __entry->lblk,
1903 __entry->len,
1904 (unsigned long long) __entry->start)
1907 TRACE_EVENT(ext4_ext_in_cache,
1908 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret),
1910 TP_ARGS(inode, lblk, ret),
1912 TP_STRUCT__entry(
1913 __field( dev_t, dev )
1914 __field( ino_t, ino )
1915 __field( ext4_lblk_t, lblk )
1916 __field( int, ret )
1919 TP_fast_assign(
1920 __entry->dev = inode->i_sb->s_dev;
1921 __entry->ino = inode->i_ino;
1922 __entry->lblk = lblk;
1923 __entry->ret = ret;
1926 TP_printk("dev %d,%d ino %lu lblk %u ret %d",
1927 MAJOR(__entry->dev), MINOR(__entry->dev),
1928 (unsigned long) __entry->ino,
1929 (unsigned) __entry->lblk,
1930 __entry->ret)
1934 TRACE_EVENT(ext4_find_delalloc_range,
1935 TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to,
1936 int reverse, int found, ext4_lblk_t found_blk),
1938 TP_ARGS(inode, from, to, reverse, found, found_blk),
1940 TP_STRUCT__entry(
1941 __field( dev_t, dev )
1942 __field( ino_t, ino )
1943 __field( ext4_lblk_t, from )
1944 __field( ext4_lblk_t, to )
1945 __field( int, reverse )
1946 __field( int, found )
1947 __field( ext4_lblk_t, found_blk )
1950 TP_fast_assign(
1951 __entry->dev = inode->i_sb->s_dev;
1952 __entry->ino = inode->i_ino;
1953 __entry->from = from;
1954 __entry->to = to;
1955 __entry->reverse = reverse;
1956 __entry->found = found;
1957 __entry->found_blk = found_blk;
1960 TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d "
1961 "(blk = %u)",
1962 MAJOR(__entry->dev), MINOR(__entry->dev),
1963 (unsigned long) __entry->ino,
1964 (unsigned) __entry->from, (unsigned) __entry->to,
1965 __entry->reverse, __entry->found,
1966 (unsigned) __entry->found_blk)
1969 TRACE_EVENT(ext4_get_reserved_cluster_alloc,
1970 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len),
1972 TP_ARGS(inode, lblk, len),
1974 TP_STRUCT__entry(
1975 __field( dev_t, dev )
1976 __field( ino_t, ino )
1977 __field( ext4_lblk_t, lblk )
1978 __field( unsigned int, len )
1981 TP_fast_assign(
1982 __entry->dev = inode->i_sb->s_dev;
1983 __entry->ino = inode->i_ino;
1984 __entry->lblk = lblk;
1985 __entry->len = len;
1988 TP_printk("dev %d,%d ino %lu lblk %u len %u",
1989 MAJOR(__entry->dev), MINOR(__entry->dev),
1990 (unsigned long) __entry->ino,
1991 (unsigned) __entry->lblk,
1992 __entry->len)
1995 TRACE_EVENT(ext4_ext_show_extent,
1996 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk,
1997 unsigned short len),
1999 TP_ARGS(inode, lblk, pblk, len),
2001 TP_STRUCT__entry(
2002 __field( dev_t, dev )
2003 __field( ino_t, ino )
2004 __field( ext4_fsblk_t, pblk )
2005 __field( ext4_lblk_t, lblk )
2006 __field( unsigned short, len )
2009 TP_fast_assign(
2010 __entry->dev = inode->i_sb->s_dev;
2011 __entry->ino = inode->i_ino;
2012 __entry->pblk = pblk;
2013 __entry->lblk = lblk;
2014 __entry->len = len;
2017 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u",
2018 MAJOR(__entry->dev), MINOR(__entry->dev),
2019 (unsigned long) __entry->ino,
2020 (unsigned) __entry->lblk,
2021 (unsigned long long) __entry->pblk,
2022 (unsigned short) __entry->len)
2025 TRACE_EVENT(ext4_remove_blocks,
2026 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
2027 ext4_lblk_t from, ext4_fsblk_t to,
2028 long long partial_cluster),
2030 TP_ARGS(inode, ex, from, to, partial_cluster),
2032 TP_STRUCT__entry(
2033 __field( dev_t, dev )
2034 __field( ino_t, ino )
2035 __field( ext4_lblk_t, from )
2036 __field( ext4_lblk_t, to )
2037 __field( long long, partial )
2038 __field( ext4_fsblk_t, ee_pblk )
2039 __field( ext4_lblk_t, ee_lblk )
2040 __field( unsigned short, ee_len )
2043 TP_fast_assign(
2044 __entry->dev = inode->i_sb->s_dev;
2045 __entry->ino = inode->i_ino;
2046 __entry->from = from;
2047 __entry->to = to;
2048 __entry->partial = partial_cluster;
2049 __entry->ee_pblk = ext4_ext_pblock(ex);
2050 __entry->ee_lblk = le32_to_cpu(ex->ee_block);
2051 __entry->ee_len = ext4_ext_get_actual_len(ex);
2054 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
2055 "from %u to %u partial_cluster %lld",
2056 MAJOR(__entry->dev), MINOR(__entry->dev),
2057 (unsigned long) __entry->ino,
2058 (unsigned) __entry->ee_lblk,
2059 (unsigned long long) __entry->ee_pblk,
2060 (unsigned short) __entry->ee_len,
2061 (unsigned) __entry->from,
2062 (unsigned) __entry->to,
2063 (long long) __entry->partial)
2066 TRACE_EVENT(ext4_ext_rm_leaf,
2067 TP_PROTO(struct inode *inode, ext4_lblk_t start,
2068 struct ext4_extent *ex,
2069 long long partial_cluster),
2071 TP_ARGS(inode, start, ex, partial_cluster),
2073 TP_STRUCT__entry(
2074 __field( dev_t, dev )
2075 __field( ino_t, ino )
2076 __field( long long, partial )
2077 __field( ext4_lblk_t, start )
2078 __field( ext4_lblk_t, ee_lblk )
2079 __field( ext4_fsblk_t, ee_pblk )
2080 __field( short, ee_len )
2083 TP_fast_assign(
2084 __entry->dev = inode->i_sb->s_dev;
2085 __entry->ino = inode->i_ino;
2086 __entry->partial = partial_cluster;
2087 __entry->start = start;
2088 __entry->ee_lblk = le32_to_cpu(ex->ee_block);
2089 __entry->ee_pblk = ext4_ext_pblock(ex);
2090 __entry->ee_len = ext4_ext_get_actual_len(ex);
2093 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
2094 "partial_cluster %lld",
2095 MAJOR(__entry->dev), MINOR(__entry->dev),
2096 (unsigned long) __entry->ino,
2097 (unsigned) __entry->start,
2098 (unsigned) __entry->ee_lblk,
2099 (unsigned long long) __entry->ee_pblk,
2100 (unsigned short) __entry->ee_len,
2101 (long long) __entry->partial)
2104 TRACE_EVENT(ext4_ext_rm_idx,
2105 TP_PROTO(struct inode *inode, ext4_fsblk_t pblk),
2107 TP_ARGS(inode, pblk),
2109 TP_STRUCT__entry(
2110 __field( dev_t, dev )
2111 __field( ino_t, ino )
2112 __field( ext4_fsblk_t, pblk )
2115 TP_fast_assign(
2116 __entry->dev = inode->i_sb->s_dev;
2117 __entry->ino = inode->i_ino;
2118 __entry->pblk = pblk;
2121 TP_printk("dev %d,%d ino %lu index_pblk %llu",
2122 MAJOR(__entry->dev), MINOR(__entry->dev),
2123 (unsigned long) __entry->ino,
2124 (unsigned long long) __entry->pblk)
2127 TRACE_EVENT(ext4_ext_remove_space,
2128 TP_PROTO(struct inode *inode, ext4_lblk_t start,
2129 ext4_lblk_t end, int depth),
2131 TP_ARGS(inode, start, end, depth),
2133 TP_STRUCT__entry(
2134 __field( dev_t, dev )
2135 __field( ino_t, ino )
2136 __field( ext4_lblk_t, start )
2137 __field( ext4_lblk_t, end )
2138 __field( int, depth )
2141 TP_fast_assign(
2142 __entry->dev = inode->i_sb->s_dev;
2143 __entry->ino = inode->i_ino;
2144 __entry->start = start;
2145 __entry->end = end;
2146 __entry->depth = depth;
2149 TP_printk("dev %d,%d ino %lu since %u end %u depth %d",
2150 MAJOR(__entry->dev), MINOR(__entry->dev),
2151 (unsigned long) __entry->ino,
2152 (unsigned) __entry->start,
2153 (unsigned) __entry->end,
2154 __entry->depth)
2157 TRACE_EVENT(ext4_ext_remove_space_done,
2158 TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
2159 int depth, long long partial, __le16 eh_entries),
2161 TP_ARGS(inode, start, end, depth, partial, eh_entries),
2163 TP_STRUCT__entry(
2164 __field( dev_t, dev )
2165 __field( ino_t, ino )
2166 __field( ext4_lblk_t, start )
2167 __field( ext4_lblk_t, end )
2168 __field( int, depth )
2169 __field( long long, partial )
2170 __field( unsigned short, eh_entries )
2173 TP_fast_assign(
2174 __entry->dev = inode->i_sb->s_dev;
2175 __entry->ino = inode->i_ino;
2176 __entry->start = start;
2177 __entry->end = end;
2178 __entry->depth = depth;
2179 __entry->partial = partial;
2180 __entry->eh_entries = le16_to_cpu(eh_entries);
2183 TP_printk("dev %d,%d ino %lu since %u end %u depth %d partial %lld "
2184 "remaining_entries %u",
2185 MAJOR(__entry->dev), MINOR(__entry->dev),
2186 (unsigned long) __entry->ino,
2187 (unsigned) __entry->start,
2188 (unsigned) __entry->end,
2189 __entry->depth,
2190 (long long) __entry->partial,
2191 (unsigned short) __entry->eh_entries)
2194 DECLARE_EVENT_CLASS(ext4__es_extent,
2195 TP_PROTO(struct inode *inode, struct extent_status *es),
2197 TP_ARGS(inode, es),
2199 TP_STRUCT__entry(
2200 __field( dev_t, dev )
2201 __field( ino_t, ino )
2202 __field( ext4_lblk_t, lblk )
2203 __field( ext4_lblk_t, len )
2204 __field( ext4_fsblk_t, pblk )
2205 __field( char, status )
2208 TP_fast_assign(
2209 __entry->dev = inode->i_sb->s_dev;
2210 __entry->ino = inode->i_ino;
2211 __entry->lblk = es->es_lblk;
2212 __entry->len = es->es_len;
2213 __entry->pblk = ext4_es_pblock(es);
2214 __entry->status = ext4_es_status(es);
2217 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
2218 MAJOR(__entry->dev), MINOR(__entry->dev),
2219 (unsigned long) __entry->ino,
2220 __entry->lblk, __entry->len,
2221 __entry->pblk, show_extent_status(__entry->status))
2224 DEFINE_EVENT(ext4__es_extent, ext4_es_insert_extent,
2225 TP_PROTO(struct inode *inode, struct extent_status *es),
2227 TP_ARGS(inode, es)
2230 DEFINE_EVENT(ext4__es_extent, ext4_es_cache_extent,
2231 TP_PROTO(struct inode *inode, struct extent_status *es),
2233 TP_ARGS(inode, es)
2236 TRACE_EVENT(ext4_es_remove_extent,
2237 TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_lblk_t len),
2239 TP_ARGS(inode, lblk, len),
2241 TP_STRUCT__entry(
2242 __field( dev_t, dev )
2243 __field( ino_t, ino )
2244 __field( loff_t, lblk )
2245 __field( loff_t, len )
2248 TP_fast_assign(
2249 __entry->dev = inode->i_sb->s_dev;
2250 __entry->ino = inode->i_ino;
2251 __entry->lblk = lblk;
2252 __entry->len = len;
2255 TP_printk("dev %d,%d ino %lu es [%lld/%lld)",
2256 MAJOR(__entry->dev), MINOR(__entry->dev),
2257 (unsigned long) __entry->ino,
2258 __entry->lblk, __entry->len)
2261 TRACE_EVENT(ext4_es_find_delayed_extent_range_enter,
2262 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
2264 TP_ARGS(inode, lblk),
2266 TP_STRUCT__entry(
2267 __field( dev_t, dev )
2268 __field( ino_t, ino )
2269 __field( ext4_lblk_t, lblk )
2272 TP_fast_assign(
2273 __entry->dev = inode->i_sb->s_dev;
2274 __entry->ino = inode->i_ino;
2275 __entry->lblk = lblk;
2278 TP_printk("dev %d,%d ino %lu lblk %u",
2279 MAJOR(__entry->dev), MINOR(__entry->dev),
2280 (unsigned long) __entry->ino, __entry->lblk)
2283 TRACE_EVENT(ext4_es_find_delayed_extent_range_exit,
2284 TP_PROTO(struct inode *inode, struct extent_status *es),
2286 TP_ARGS(inode, es),
2288 TP_STRUCT__entry(
2289 __field( dev_t, dev )
2290 __field( ino_t, ino )
2291 __field( ext4_lblk_t, lblk )
2292 __field( ext4_lblk_t, len )
2293 __field( ext4_fsblk_t, pblk )
2294 __field( char, status )
2297 TP_fast_assign(
2298 __entry->dev = inode->i_sb->s_dev;
2299 __entry->ino = inode->i_ino;
2300 __entry->lblk = es->es_lblk;
2301 __entry->len = es->es_len;
2302 __entry->pblk = ext4_es_pblock(es);
2303 __entry->status = ext4_es_status(es);
2306 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
2307 MAJOR(__entry->dev), MINOR(__entry->dev),
2308 (unsigned long) __entry->ino,
2309 __entry->lblk, __entry->len,
2310 __entry->pblk, show_extent_status(__entry->status))
2313 TRACE_EVENT(ext4_es_lookup_extent_enter,
2314 TP_PROTO(struct inode *inode, ext4_lblk_t lblk),
2316 TP_ARGS(inode, lblk),
2318 TP_STRUCT__entry(
2319 __field( dev_t, dev )
2320 __field( ino_t, ino )
2321 __field( ext4_lblk_t, lblk )
2324 TP_fast_assign(
2325 __entry->dev = inode->i_sb->s_dev;
2326 __entry->ino = inode->i_ino;
2327 __entry->lblk = lblk;
2330 TP_printk("dev %d,%d ino %lu lblk %u",
2331 MAJOR(__entry->dev), MINOR(__entry->dev),
2332 (unsigned long) __entry->ino, __entry->lblk)
2335 TRACE_EVENT(ext4_es_lookup_extent_exit,
2336 TP_PROTO(struct inode *inode, struct extent_status *es,
2337 int found),
2339 TP_ARGS(inode, es, found),
2341 TP_STRUCT__entry(
2342 __field( dev_t, dev )
2343 __field( ino_t, ino )
2344 __field( ext4_lblk_t, lblk )
2345 __field( ext4_lblk_t, len )
2346 __field( ext4_fsblk_t, pblk )
2347 __field( char, status )
2348 __field( int, found )
2351 TP_fast_assign(
2352 __entry->dev = inode->i_sb->s_dev;
2353 __entry->ino = inode->i_ino;
2354 __entry->lblk = es->es_lblk;
2355 __entry->len = es->es_len;
2356 __entry->pblk = ext4_es_pblock(es);
2357 __entry->status = ext4_es_status(es);
2358 __entry->found = found;
2361 TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s",
2362 MAJOR(__entry->dev), MINOR(__entry->dev),
2363 (unsigned long) __entry->ino, __entry->found,
2364 __entry->lblk, __entry->len,
2365 __entry->found ? __entry->pblk : 0,
2366 show_extent_status(__entry->found ? __entry->status : 0))
2369 TRACE_EVENT(ext4_es_shrink_enter,
2370 TP_PROTO(struct super_block *sb, int nr_to_scan, int cache_cnt),
2372 TP_ARGS(sb, nr_to_scan, cache_cnt),
2374 TP_STRUCT__entry(
2375 __field( dev_t, dev )
2376 __field( int, nr_to_scan )
2377 __field( int, cache_cnt )
2380 TP_fast_assign(
2381 __entry->dev = sb->s_dev;
2382 __entry->nr_to_scan = nr_to_scan;
2383 __entry->cache_cnt = cache_cnt;
2386 TP_printk("dev %d,%d nr_to_scan %d cache_cnt %d",
2387 MAJOR(__entry->dev), MINOR(__entry->dev),
2388 __entry->nr_to_scan, __entry->cache_cnt)
2391 TRACE_EVENT(ext4_es_shrink_exit,
2392 TP_PROTO(struct super_block *sb, int shrunk_nr, int cache_cnt),
2394 TP_ARGS(sb, shrunk_nr, cache_cnt),
2396 TP_STRUCT__entry(
2397 __field( dev_t, dev )
2398 __field( int, shrunk_nr )
2399 __field( int, cache_cnt )
2402 TP_fast_assign(
2403 __entry->dev = sb->s_dev;
2404 __entry->shrunk_nr = shrunk_nr;
2405 __entry->cache_cnt = cache_cnt;
2408 TP_printk("dev %d,%d shrunk_nr %d cache_cnt %d",
2409 MAJOR(__entry->dev), MINOR(__entry->dev),
2410 __entry->shrunk_nr, __entry->cache_cnt)
2413 #endif /* _TRACE_EXT4_H */
2415 /* This part must be outside protection */
2416 #include <trace/define_trace.h>