aboutsummaryrefslogtreecommitdiffstats
path: root/include/trace/events/ext4.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/trace/events/ext4.h')
-rw-r--r--include/trace/events/ext4.h304
1 files changed, 206 insertions, 98 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index 8ee15b97cd38..2068db241f22 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -19,6 +19,57 @@ struct extent_status;
19 19
20#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) 20#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
21 21
22#define show_mballoc_flags(flags) __print_flags(flags, "|", \
23 { EXT4_MB_HINT_MERGE, "HINT_MERGE" }, \
24 { EXT4_MB_HINT_RESERVED, "HINT_RESV" }, \
25 { EXT4_MB_HINT_METADATA, "HINT_MDATA" }, \
26 { EXT4_MB_HINT_FIRST, "HINT_FIRST" }, \
27 { EXT4_MB_HINT_BEST, "HINT_BEST" }, \
28 { EXT4_MB_HINT_DATA, "HINT_DATA" }, \
29 { EXT4_MB_HINT_NOPREALLOC, "HINT_NOPREALLOC" }, \
30 { EXT4_MB_HINT_GROUP_ALLOC, "HINT_GRP_ALLOC" }, \
31 { EXT4_MB_HINT_GOAL_ONLY, "HINT_GOAL_ONLY" }, \
32 { EXT4_MB_HINT_TRY_GOAL, "HINT_TRY_GOAL" }, \
33 { EXT4_MB_DELALLOC_RESERVED, "DELALLOC_RESV" }, \
34 { EXT4_MB_STREAM_ALLOC, "STREAM_ALLOC" }, \
35 { EXT4_MB_USE_ROOT_BLOCKS, "USE_ROOT_BLKS" }, \
36 { EXT4_MB_USE_RESERVED, "USE_RESV" })
37
38#define show_map_flags(flags) __print_flags(flags, "|", \
39 { EXT4_GET_BLOCKS_CREATE, "CREATE" }, \
40 { EXT4_GET_BLOCKS_UNINIT_EXT, "UNINIT" }, \
41 { EXT4_GET_BLOCKS_DELALLOC_RESERVE, "DELALLOC" }, \
42 { EXT4_GET_BLOCKS_PRE_IO, "PRE_IO" }, \
43 { EXT4_GET_BLOCKS_CONVERT, "CONVERT" }, \
44 { EXT4_GET_BLOCKS_METADATA_NOFAIL, "METADATA_NOFAIL" }, \
45 { EXT4_GET_BLOCKS_NO_NORMALIZE, "NO_NORMALIZE" }, \
46 { EXT4_GET_BLOCKS_KEEP_SIZE, "KEEP_SIZE" }, \
47 { EXT4_GET_BLOCKS_NO_LOCK, "NO_LOCK" }, \
48 { EXT4_GET_BLOCKS_NO_PUT_HOLE, "NO_PUT_HOLE" })
49
50#define show_mflags(flags) __print_flags(flags, "", \
51 { EXT4_MAP_NEW, "N" }, \
52 { EXT4_MAP_MAPPED, "M" }, \
53 { EXT4_MAP_UNWRITTEN, "U" }, \
54 { EXT4_MAP_BOUNDARY, "B" }, \
55 { EXT4_MAP_UNINIT, "u" }, \
56 { EXT4_MAP_FROM_CLUSTER, "C" })
57
58#define show_free_flags(flags) __print_flags(flags, "|", \
59 { EXT4_FREE_BLOCKS_METADATA, "METADATA" }, \
60 { EXT4_FREE_BLOCKS_FORGET, "FORGET" }, \
61 { EXT4_FREE_BLOCKS_VALIDATED, "VALIDATED" }, \
62 { EXT4_FREE_BLOCKS_NO_QUOT_UPDATE, "NO_QUOTA" }, \
63 { EXT4_FREE_BLOCKS_NOFREE_FIRST_CLUSTER,"1ST_CLUSTER" },\
64 { EXT4_FREE_BLOCKS_NOFREE_LAST_CLUSTER, "LAST_CLUSTER" })
65
66#define show_extent_status(status) __print_flags(status, "", \
67 { (1 << 3), "W" }, \
68 { (1 << 2), "U" }, \
69 { (1 << 1), "D" }, \
70 { (1 << 0), "H" })
71
72
22TRACE_EVENT(ext4_free_inode, 73TRACE_EVENT(ext4_free_inode,
23 TP_PROTO(struct inode *inode), 74 TP_PROTO(struct inode *inode),
24 75
@@ -281,7 +332,7 @@ DEFINE_EVENT(ext4__write_end, ext4_da_write_end,
281 TP_ARGS(inode, pos, len, copied) 332 TP_ARGS(inode, pos, len, copied)
282); 333);
283 334
284TRACE_EVENT(ext4_da_writepages, 335TRACE_EVENT(ext4_writepages,
285 TP_PROTO(struct inode *inode, struct writeback_control *wbc), 336 TP_PROTO(struct inode *inode, struct writeback_control *wbc),
286 337
287 TP_ARGS(inode, wbc), 338 TP_ARGS(inode, wbc),
@@ -324,46 +375,62 @@ TRACE_EVENT(ext4_da_writepages,
324); 375);
325 376
326TRACE_EVENT(ext4_da_write_pages, 377TRACE_EVENT(ext4_da_write_pages,
327 TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), 378 TP_PROTO(struct inode *inode, pgoff_t first_page,
379 struct writeback_control *wbc),
328 380
329 TP_ARGS(inode, mpd), 381 TP_ARGS(inode, first_page, wbc),
330 382
331 TP_STRUCT__entry( 383 TP_STRUCT__entry(
332 __field( dev_t, dev ) 384 __field( dev_t, dev )
333 __field( ino_t, ino ) 385 __field( ino_t, ino )
334 __field( __u64, b_blocknr ) 386 __field( pgoff_t, first_page )
335 __field( __u32, b_size ) 387 __field( long, nr_to_write )
336 __field( __u32, b_state ) 388 __field( int, sync_mode )
337 __field( unsigned long, first_page )
338 __field( int, io_done )
339 __field( int, pages_written )
340 __field( int, sync_mode )
341 ), 389 ),
342 390
343 TP_fast_assign( 391 TP_fast_assign(
344 __entry->dev = inode->i_sb->s_dev; 392 __entry->dev = inode->i_sb->s_dev;
345 __entry->ino = inode->i_ino; 393 __entry->ino = inode->i_ino;
346 __entry->b_blocknr = mpd->b_blocknr; 394 __entry->first_page = first_page;
347 __entry->b_size = mpd->b_size; 395 __entry->nr_to_write = wbc->nr_to_write;
348 __entry->b_state = mpd->b_state; 396 __entry->sync_mode = wbc->sync_mode;
349 __entry->first_page = mpd->first_page;
350 __entry->io_done = mpd->io_done;
351 __entry->pages_written = mpd->pages_written;
352 __entry->sync_mode = mpd->wbc->sync_mode;
353 ), 397 ),
354 398
355 TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " 399 TP_printk("dev %d,%d ino %lu first_page %lu nr_to_write %ld "
356 "first_page %lu io_done %d pages_written %d sync_mode %d", 400 "sync_mode %d",
357 MAJOR(__entry->dev), MINOR(__entry->dev), 401 MAJOR(__entry->dev), MINOR(__entry->dev),
358 (unsigned long) __entry->ino, 402 (unsigned long) __entry->ino, __entry->first_page,
359 __entry->b_blocknr, __entry->b_size, 403 __entry->nr_to_write, __entry->sync_mode)
360 __entry->b_state, __entry->first_page,
361 __entry->io_done, __entry->pages_written,
362 __entry->sync_mode
363 )
364); 404);
365 405
366TRACE_EVENT(ext4_da_writepages_result, 406TRACE_EVENT(ext4_da_write_pages_extent,
407 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map),
408
409 TP_ARGS(inode, map),
410
411 TP_STRUCT__entry(
412 __field( dev_t, dev )
413 __field( ino_t, ino )
414 __field( __u64, lblk )
415 __field( __u32, len )
416 __field( __u32, flags )
417 ),
418
419 TP_fast_assign(
420 __entry->dev = inode->i_sb->s_dev;
421 __entry->ino = inode->i_ino;
422 __entry->lblk = map->m_lblk;
423 __entry->len = map->m_len;
424 __entry->flags = map->m_flags;
425 ),
426
427 TP_printk("dev %d,%d ino %lu lblk %llu len %u flags %s",
428 MAJOR(__entry->dev), MINOR(__entry->dev),
429 (unsigned long) __entry->ino, __entry->lblk, __entry->len,
430 show_mflags(__entry->flags))
431);
432
433TRACE_EVENT(ext4_writepages_result,
367 TP_PROTO(struct inode *inode, struct writeback_control *wbc, 434 TP_PROTO(struct inode *inode, struct writeback_control *wbc,
368 int ret, int pages_written), 435 int ret, int pages_written),
369 436
@@ -444,16 +511,16 @@ DEFINE_EVENT(ext4__page_op, ext4_releasepage,
444); 511);
445 512
446DECLARE_EVENT_CLASS(ext4_invalidatepage_op, 513DECLARE_EVENT_CLASS(ext4_invalidatepage_op,
447 TP_PROTO(struct page *page, unsigned long offset), 514 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
448 515
449 TP_ARGS(page, offset), 516 TP_ARGS(page, offset, length),
450 517
451 TP_STRUCT__entry( 518 TP_STRUCT__entry(
452 __field( dev_t, dev ) 519 __field( dev_t, dev )
453 __field( ino_t, ino ) 520 __field( ino_t, ino )
454 __field( pgoff_t, index ) 521 __field( pgoff_t, index )
455 __field( unsigned long, offset ) 522 __field( unsigned int, offset )
456 523 __field( unsigned int, length )
457 ), 524 ),
458 525
459 TP_fast_assign( 526 TP_fast_assign(
@@ -461,24 +528,26 @@ DECLARE_EVENT_CLASS(ext4_invalidatepage_op,
461 __entry->ino = page->mapping->host->i_ino; 528 __entry->ino = page->mapping->host->i_ino;
462 __entry->index = page->index; 529 __entry->index = page->index;
463 __entry->offset = offset; 530 __entry->offset = offset;
531 __entry->length = length;
464 ), 532 ),
465 533
466 TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", 534 TP_printk("dev %d,%d ino %lu page_index %lu offset %u length %u",
467 MAJOR(__entry->dev), MINOR(__entry->dev), 535 MAJOR(__entry->dev), MINOR(__entry->dev),
468 (unsigned long) __entry->ino, 536 (unsigned long) __entry->ino,
469 (unsigned long) __entry->index, __entry->offset) 537 (unsigned long) __entry->index,
538 __entry->offset, __entry->length)
470); 539);
471 540
472DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage, 541DEFINE_EVENT(ext4_invalidatepage_op, ext4_invalidatepage,
473 TP_PROTO(struct page *page, unsigned long offset), 542 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
474 543
475 TP_ARGS(page, offset) 544 TP_ARGS(page, offset, length)
476); 545);
477 546
478DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage, 547DEFINE_EVENT(ext4_invalidatepage_op, ext4_journalled_invalidatepage,
479 TP_PROTO(struct page *page, unsigned long offset), 548 TP_PROTO(struct page *page, unsigned int offset, unsigned int length),
480 549
481 TP_ARGS(page, offset) 550 TP_ARGS(page, offset, length)
482); 551);
483 552
484TRACE_EVENT(ext4_discard_blocks, 553TRACE_EVENT(ext4_discard_blocks,
@@ -673,10 +742,10 @@ TRACE_EVENT(ext4_request_blocks,
673 __entry->flags = ar->flags; 742 __entry->flags = ar->flags;
674 ), 743 ),
675 744
676 TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu " 745 TP_printk("dev %d,%d ino %lu flags %s len %u lblk %u goal %llu "
677 "lleft %u lright %u pleft %llu pright %llu ", 746 "lleft %u lright %u pleft %llu pright %llu ",
678 MAJOR(__entry->dev), MINOR(__entry->dev), 747 MAJOR(__entry->dev), MINOR(__entry->dev),
679 (unsigned long) __entry->ino, __entry->flags, 748 (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
680 __entry->len, __entry->logical, __entry->goal, 749 __entry->len, __entry->logical, __entry->goal,
681 __entry->lleft, __entry->lright, __entry->pleft, 750 __entry->lleft, __entry->lright, __entry->pleft,
682 __entry->pright) 751 __entry->pright)
@@ -715,10 +784,10 @@ TRACE_EVENT(ext4_allocate_blocks,
715 __entry->flags = ar->flags; 784 __entry->flags = ar->flags;
716 ), 785 ),
717 786
718 TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u " 787 TP_printk("dev %d,%d ino %lu flags %s len %u block %llu lblk %u "
719 "goal %llu lleft %u lright %u pleft %llu pright %llu", 788 "goal %llu lleft %u lright %u pleft %llu pright %llu",
720 MAJOR(__entry->dev), MINOR(__entry->dev), 789 MAJOR(__entry->dev), MINOR(__entry->dev),
721 (unsigned long) __entry->ino, __entry->flags, 790 (unsigned long) __entry->ino, show_mballoc_flags(__entry->flags),
722 __entry->len, __entry->block, __entry->logical, 791 __entry->len, __entry->block, __entry->logical,
723 __entry->goal, __entry->lleft, __entry->lright, 792 __entry->goal, __entry->lleft, __entry->lright,
724 __entry->pleft, __entry->pright) 793 __entry->pleft, __entry->pright)
@@ -748,11 +817,11 @@ TRACE_EVENT(ext4_free_blocks,
748 __entry->mode = inode->i_mode; 817 __entry->mode = inode->i_mode;
749 ), 818 ),
750 819
751 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", 820 TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %s",
752 MAJOR(__entry->dev), MINOR(__entry->dev), 821 MAJOR(__entry->dev), MINOR(__entry->dev),
753 (unsigned long) __entry->ino, 822 (unsigned long) __entry->ino,
754 __entry->mode, __entry->block, __entry->count, 823 __entry->mode, __entry->block, __entry->count,
755 __entry->flags) 824 show_free_flags(__entry->flags))
756); 825);
757 826
758TRACE_EVENT(ext4_sync_file_enter, 827TRACE_EVENT(ext4_sync_file_enter,
@@ -903,7 +972,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
903 ), 972 ),
904 973
905 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " 974 TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
906 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " 975 "result %u/%d/%u@%u blks %u grps %u cr %u flags %s "
907 "tail %u broken %u", 976 "tail %u broken %u",
908 MAJOR(__entry->dev), MINOR(__entry->dev), 977 MAJOR(__entry->dev), MINOR(__entry->dev),
909 (unsigned long) __entry->ino, 978 (unsigned long) __entry->ino,
@@ -914,7 +983,7 @@ TRACE_EVENT(ext4_mballoc_alloc,
914 __entry->result_group, __entry->result_start, 983 __entry->result_group, __entry->result_start,
915 __entry->result_len, __entry->result_logical, 984 __entry->result_len, __entry->result_logical,
916 __entry->found, __entry->groups, __entry->cr, 985 __entry->found, __entry->groups, __entry->cr,
917 __entry->flags, __entry->tail, 986 show_mballoc_flags(__entry->flags), __entry->tail,
918 __entry->buddy ? 1 << __entry->buddy : 0) 987 __entry->buddy ? 1 << __entry->buddy : 0)
919); 988);
920 989
@@ -1528,10 +1597,10 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_enter,
1528 __entry->flags = flags; 1597 __entry->flags = flags;
1529 ), 1598 ),
1530 1599
1531 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", 1600 TP_printk("dev %d,%d ino %lu lblk %u len %u flags %s",
1532 MAJOR(__entry->dev), MINOR(__entry->dev), 1601 MAJOR(__entry->dev), MINOR(__entry->dev),
1533 (unsigned long) __entry->ino, 1602 (unsigned long) __entry->ino,
1534 __entry->lblk, __entry->len, __entry->flags) 1603 __entry->lblk, __entry->len, show_map_flags(__entry->flags))
1535); 1604);
1536 1605
1537DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, 1606DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
@@ -1549,47 +1618,53 @@ DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1549); 1618);
1550 1619
1551DECLARE_EVENT_CLASS(ext4__map_blocks_exit, 1620DECLARE_EVENT_CLASS(ext4__map_blocks_exit,
1552 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), 1621 TP_PROTO(struct inode *inode, unsigned flags, struct ext4_map_blocks *map,
1622 int ret),
1553 1623
1554 TP_ARGS(inode, map, ret), 1624 TP_ARGS(inode, flags, map, ret),
1555 1625
1556 TP_STRUCT__entry( 1626 TP_STRUCT__entry(
1557 __field( dev_t, dev ) 1627 __field( dev_t, dev )
1558 __field( ino_t, ino ) 1628 __field( ino_t, ino )
1629 __field( unsigned int, flags )
1559 __field( ext4_fsblk_t, pblk ) 1630 __field( ext4_fsblk_t, pblk )
1560 __field( ext4_lblk_t, lblk ) 1631 __field( ext4_lblk_t, lblk )
1561 __field( unsigned int, len ) 1632 __field( unsigned int, len )
1562 __field( unsigned int, flags ) 1633 __field( unsigned int, mflags )
1563 __field( int, ret ) 1634 __field( int, ret )
1564 ), 1635 ),
1565 1636
1566 TP_fast_assign( 1637 TP_fast_assign(
1567 __entry->dev = inode->i_sb->s_dev; 1638 __entry->dev = inode->i_sb->s_dev;
1568 __entry->ino = inode->i_ino; 1639 __entry->ino = inode->i_ino;
1640 __entry->flags = flags;
1569 __entry->pblk = map->m_pblk; 1641 __entry->pblk = map->m_pblk;
1570 __entry->lblk = map->m_lblk; 1642 __entry->lblk = map->m_lblk;
1571 __entry->len = map->m_len; 1643 __entry->len = map->m_len;
1572 __entry->flags = map->m_flags; 1644 __entry->mflags = map->m_flags;
1573 __entry->ret = ret; 1645 __entry->ret = ret;
1574 ), 1646 ),
1575 1647
1576 TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u flags %x ret %d", 1648 TP_printk("dev %d,%d ino %lu flags %s lblk %u pblk %llu len %u "
1649 "mflags %s ret %d",
1577 MAJOR(__entry->dev), MINOR(__entry->dev), 1650 MAJOR(__entry->dev), MINOR(__entry->dev),
1578 (unsigned long) __entry->ino, 1651 (unsigned long) __entry->ino,
1579 __entry->lblk, __entry->pblk, 1652 show_map_flags(__entry->flags), __entry->lblk, __entry->pblk,
1580 __entry->len, __entry->flags, __entry->ret) 1653 __entry->len, show_mflags(__entry->mflags), __entry->ret)
1581); 1654);
1582 1655
1583DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, 1656DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1584 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), 1657 TP_PROTO(struct inode *inode, unsigned flags,
1658 struct ext4_map_blocks *map, int ret),
1585 1659
1586 TP_ARGS(inode, map, ret) 1660 TP_ARGS(inode, flags, map, ret)
1587); 1661);
1588 1662
1589DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, 1663DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1590 TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), 1664 TP_PROTO(struct inode *inode, unsigned flags,
1665 struct ext4_map_blocks *map, int ret),
1591 1666
1592 TP_ARGS(inode, map, ret) 1667 TP_ARGS(inode, flags, map, ret)
1593); 1668);
1594 1669
1595TRACE_EVENT(ext4_ext_load_extent, 1670TRACE_EVENT(ext4_ext_load_extent,
@@ -1638,25 +1713,50 @@ TRACE_EVENT(ext4_load_inode,
1638); 1713);
1639 1714
1640TRACE_EVENT(ext4_journal_start, 1715TRACE_EVENT(ext4_journal_start,
1641 TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP), 1716 TP_PROTO(struct super_block *sb, int blocks, int rsv_blocks,
1717 unsigned long IP),
1642 1718
1643 TP_ARGS(sb, nblocks, IP), 1719 TP_ARGS(sb, blocks, rsv_blocks, IP),
1644 1720
1645 TP_STRUCT__entry( 1721 TP_STRUCT__entry(
1646 __field( dev_t, dev ) 1722 __field( dev_t, dev )
1647 __field(unsigned long, ip ) 1723 __field(unsigned long, ip )
1648 __field( int, nblocks ) 1724 __field( int, blocks )
1725 __field( int, rsv_blocks )
1649 ), 1726 ),
1650 1727
1651 TP_fast_assign( 1728 TP_fast_assign(
1652 __entry->dev = sb->s_dev; 1729 __entry->dev = sb->s_dev;
1653 __entry->ip = IP; 1730 __entry->ip = IP;
1654 __entry->nblocks = nblocks; 1731 __entry->blocks = blocks;
1732 __entry->rsv_blocks = rsv_blocks;
1655 ), 1733 ),
1656 1734
1657 TP_printk("dev %d,%d nblocks %d caller %pF", 1735 TP_printk("dev %d,%d blocks, %d rsv_blocks, %d caller %pF",
1658 MAJOR(__entry->dev), MINOR(__entry->dev), 1736 MAJOR(__entry->dev), MINOR(__entry->dev),
1659 __entry->nblocks, (void *)__entry->ip) 1737 __entry->blocks, __entry->rsv_blocks, (void *)__entry->ip)
1738);
1739
1740TRACE_EVENT(ext4_journal_start_reserved,
1741 TP_PROTO(struct super_block *sb, int blocks, unsigned long IP),
1742
1743 TP_ARGS(sb, blocks, IP),
1744
1745 TP_STRUCT__entry(
1746 __field( dev_t, dev )
1747 __field(unsigned long, ip )
1748 __field( int, blocks )
1749 ),
1750
1751 TP_fast_assign(
1752 __entry->dev = sb->s_dev;
1753 __entry->ip = IP;
1754 __entry->blocks = blocks;
1755 ),
1756
1757 TP_printk("dev %d,%d blocks, %d caller %pF",
1758 MAJOR(__entry->dev), MINOR(__entry->dev),
1759 __entry->blocks, (void *)__entry->ip)
1660); 1760);
1661 1761
1662DECLARE_EVENT_CLASS(ext4__trim, 1762DECLARE_EVENT_CLASS(ext4__trim,
@@ -1736,12 +1836,12 @@ TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
1736 __entry->newblk = newblock; 1836 __entry->newblk = newblock;
1737 ), 1837 ),
1738 1838
1739 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %x " 1839 TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %s "
1740 "allocated %d newblock %llu", 1840 "allocated %d newblock %llu",
1741 MAJOR(__entry->dev), MINOR(__entry->dev), 1841 MAJOR(__entry->dev), MINOR(__entry->dev),
1742 (unsigned long) __entry->ino, 1842 (unsigned long) __entry->ino,
1743 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, 1843 (unsigned) __entry->lblk, (unsigned long long) __entry->pblk,
1744 __entry->len, __entry->flags, 1844 __entry->len, show_map_flags(__entry->flags),
1745 (unsigned int) __entry->allocated, 1845 (unsigned int) __entry->allocated,
1746 (unsigned long long) __entry->newblk) 1846 (unsigned long long) __entry->newblk)
1747); 1847);
@@ -1769,10 +1869,10 @@ TRACE_EVENT(ext4_get_implied_cluster_alloc_exit,
1769 __entry->ret = ret; 1869 __entry->ret = ret;
1770 ), 1870 ),
1771 1871
1772 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d", 1872 TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %s ret %d",
1773 MAJOR(__entry->dev), MINOR(__entry->dev), 1873 MAJOR(__entry->dev), MINOR(__entry->dev),
1774 __entry->lblk, (unsigned long long) __entry->pblk, 1874 __entry->lblk, (unsigned long long) __entry->pblk,
1775 __entry->len, __entry->flags, __entry->ret) 1875 __entry->len, show_mflags(__entry->flags), __entry->ret)
1776); 1876);
1777 1877
1778TRACE_EVENT(ext4_ext_put_in_cache, 1878TRACE_EVENT(ext4_ext_put_in_cache,
@@ -1926,7 +2026,7 @@ TRACE_EVENT(ext4_ext_show_extent,
1926TRACE_EVENT(ext4_remove_blocks, 2026TRACE_EVENT(ext4_remove_blocks,
1927 TP_PROTO(struct inode *inode, struct ext4_extent *ex, 2027 TP_PROTO(struct inode *inode, struct ext4_extent *ex,
1928 ext4_lblk_t from, ext4_fsblk_t to, 2028 ext4_lblk_t from, ext4_fsblk_t to,
1929 ext4_fsblk_t partial_cluster), 2029 long long partial_cluster),
1930 2030
1931 TP_ARGS(inode, ex, from, to, partial_cluster), 2031 TP_ARGS(inode, ex, from, to, partial_cluster),
1932 2032
@@ -1935,7 +2035,7 @@ TRACE_EVENT(ext4_remove_blocks,
1935 __field( ino_t, ino ) 2035 __field( ino_t, ino )
1936 __field( ext4_lblk_t, from ) 2036 __field( ext4_lblk_t, from )
1937 __field( ext4_lblk_t, to ) 2037 __field( ext4_lblk_t, to )
1938 __field( ext4_fsblk_t, partial ) 2038 __field( long long, partial )
1939 __field( ext4_fsblk_t, ee_pblk ) 2039 __field( ext4_fsblk_t, ee_pblk )
1940 __field( ext4_lblk_t, ee_lblk ) 2040 __field( ext4_lblk_t, ee_lblk )
1941 __field( unsigned short, ee_len ) 2041 __field( unsigned short, ee_len )
@@ -1953,7 +2053,7 @@ TRACE_EVENT(ext4_remove_blocks,
1953 ), 2053 ),
1954 2054
1955 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" 2055 TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]"
1956 "from %u to %u partial_cluster %u", 2056 "from %u to %u partial_cluster %lld",
1957 MAJOR(__entry->dev), MINOR(__entry->dev), 2057 MAJOR(__entry->dev), MINOR(__entry->dev),
1958 (unsigned long) __entry->ino, 2058 (unsigned long) __entry->ino,
1959 (unsigned) __entry->ee_lblk, 2059 (unsigned) __entry->ee_lblk,
@@ -1961,19 +2061,20 @@ TRACE_EVENT(ext4_remove_blocks,
1961 (unsigned short) __entry->ee_len, 2061 (unsigned short) __entry->ee_len,
1962 (unsigned) __entry->from, 2062 (unsigned) __entry->from,
1963 (unsigned) __entry->to, 2063 (unsigned) __entry->to,
1964 (unsigned) __entry->partial) 2064 (long long) __entry->partial)
1965); 2065);
1966 2066
1967TRACE_EVENT(ext4_ext_rm_leaf, 2067TRACE_EVENT(ext4_ext_rm_leaf,
1968 TP_PROTO(struct inode *inode, ext4_lblk_t start, 2068 TP_PROTO(struct inode *inode, ext4_lblk_t start,
1969 struct ext4_extent *ex, ext4_fsblk_t partial_cluster), 2069 struct ext4_extent *ex,
2070 long long partial_cluster),
1970 2071
1971 TP_ARGS(inode, start, ex, partial_cluster), 2072 TP_ARGS(inode, start, ex, partial_cluster),
1972 2073
1973 TP_STRUCT__entry( 2074 TP_STRUCT__entry(
1974 __field( dev_t, dev ) 2075 __field( dev_t, dev )
1975 __field( ino_t, ino ) 2076 __field( ino_t, ino )
1976 __field( ext4_fsblk_t, partial ) 2077 __field( long long, partial )
1977 __field( ext4_lblk_t, start ) 2078 __field( ext4_lblk_t, start )
1978 __field( ext4_lblk_t, ee_lblk ) 2079 __field( ext4_lblk_t, ee_lblk )
1979 __field( ext4_fsblk_t, ee_pblk ) 2080 __field( ext4_fsblk_t, ee_pblk )
@@ -1991,14 +2092,14 @@ TRACE_EVENT(ext4_ext_rm_leaf,
1991 ), 2092 ),
1992 2093
1993 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" 2094 TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
1994 "partial_cluster %u", 2095 "partial_cluster %lld",
1995 MAJOR(__entry->dev), MINOR(__entry->dev), 2096 MAJOR(__entry->dev), MINOR(__entry->dev),
1996 (unsigned long) __entry->ino, 2097 (unsigned long) __entry->ino,
1997 (unsigned) __entry->start, 2098 (unsigned) __entry->start,
1998 (unsigned) __entry->ee_lblk, 2099 (unsigned) __entry->ee_lblk,
1999 (unsigned long long) __entry->ee_pblk, 2100 (unsigned long long) __entry->ee_pblk,
2000 (unsigned short) __entry->ee_len, 2101 (unsigned short) __entry->ee_len,
2001 (unsigned) __entry->partial) 2102 (long long) __entry->partial)
2002); 2103);
2003 2104
2004TRACE_EVENT(ext4_ext_rm_idx, 2105TRACE_EVENT(ext4_ext_rm_idx,
@@ -2025,14 +2126,16 @@ TRACE_EVENT(ext4_ext_rm_idx,
2025); 2126);
2026 2127
2027TRACE_EVENT(ext4_ext_remove_space, 2128TRACE_EVENT(ext4_ext_remove_space,
2028 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), 2129 TP_PROTO(struct inode *inode, ext4_lblk_t start,
2130 ext4_lblk_t end, int depth),
2029 2131
2030 TP_ARGS(inode, start, depth), 2132 TP_ARGS(inode, start, end, depth),
2031 2133
2032 TP_STRUCT__entry( 2134 TP_STRUCT__entry(
2033 __field( dev_t, dev ) 2135 __field( dev_t, dev )
2034 __field( ino_t, ino ) 2136 __field( ino_t, ino )
2035 __field( ext4_lblk_t, start ) 2137 __field( ext4_lblk_t, start )
2138 __field( ext4_lblk_t, end )
2036 __field( int, depth ) 2139 __field( int, depth )
2037 ), 2140 ),
2038 2141
@@ -2040,28 +2143,31 @@ TRACE_EVENT(ext4_ext_remove_space,
2040 __entry->dev = inode->i_sb->s_dev; 2143 __entry->dev = inode->i_sb->s_dev;
2041 __entry->ino = inode->i_ino; 2144 __entry->ino = inode->i_ino;
2042 __entry->start = start; 2145 __entry->start = start;
2146 __entry->end = end;
2043 __entry->depth = depth; 2147 __entry->depth = depth;
2044 ), 2148 ),
2045 2149
2046 TP_printk("dev %d,%d ino %lu since %u depth %d", 2150 TP_printk("dev %d,%d ino %lu since %u end %u depth %d",
2047 MAJOR(__entry->dev), MINOR(__entry->dev), 2151 MAJOR(__entry->dev), MINOR(__entry->dev),
2048 (unsigned long) __entry->ino, 2152 (unsigned long) __entry->ino,
2049 (unsigned) __entry->start, 2153 (unsigned) __entry->start,
2154 (unsigned) __entry->end,
2050 __entry->depth) 2155 __entry->depth)
2051); 2156);
2052 2157
2053TRACE_EVENT(ext4_ext_remove_space_done, 2158TRACE_EVENT(ext4_ext_remove_space_done,
2054 TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, 2159 TP_PROTO(struct inode *inode, ext4_lblk_t start, ext4_lblk_t end,
2055 ext4_lblk_t partial, __le16 eh_entries), 2160 int depth, long long partial, __le16 eh_entries),
2056 2161
2057 TP_ARGS(inode, start, depth, partial, eh_entries), 2162 TP_ARGS(inode, start, end, depth, partial, eh_entries),
2058 2163
2059 TP_STRUCT__entry( 2164 TP_STRUCT__entry(
2060 __field( dev_t, dev ) 2165 __field( dev_t, dev )
2061 __field( ino_t, ino ) 2166 __field( ino_t, ino )
2062 __field( ext4_lblk_t, start ) 2167 __field( ext4_lblk_t, start )
2168 __field( ext4_lblk_t, end )
2063 __field( int, depth ) 2169 __field( int, depth )
2064 __field( ext4_lblk_t, partial ) 2170 __field( long long, partial )
2065 __field( unsigned short, eh_entries ) 2171 __field( unsigned short, eh_entries )
2066 ), 2172 ),
2067 2173
@@ -2069,18 +2175,20 @@ TRACE_EVENT(ext4_ext_remove_space_done,
2069 __entry->dev = inode->i_sb->s_dev; 2175 __entry->dev = inode->i_sb->s_dev;
2070 __entry->ino = inode->i_ino; 2176 __entry->ino = inode->i_ino;
2071 __entry->start = start; 2177 __entry->start = start;
2178 __entry->end = end;
2072 __entry->depth = depth; 2179 __entry->depth = depth;
2073 __entry->partial = partial; 2180 __entry->partial = partial;
2074 __entry->eh_entries = le16_to_cpu(eh_entries); 2181 __entry->eh_entries = le16_to_cpu(eh_entries);
2075 ), 2182 ),
2076 2183
2077 TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " 2184 TP_printk("dev %d,%d ino %lu since %u end %u depth %d partial %lld "
2078 "remaining_entries %u", 2185 "remaining_entries %u",
2079 MAJOR(__entry->dev), MINOR(__entry->dev), 2186 MAJOR(__entry->dev), MINOR(__entry->dev),
2080 (unsigned long) __entry->ino, 2187 (unsigned long) __entry->ino,
2081 (unsigned) __entry->start, 2188 (unsigned) __entry->start,
2189 (unsigned) __entry->end,
2082 __entry->depth, 2190 __entry->depth,
2083 (unsigned) __entry->partial, 2191 (long long) __entry->partial,
2084 (unsigned short) __entry->eh_entries) 2192 (unsigned short) __entry->eh_entries)
2085); 2193);
2086 2194
@@ -2095,7 +2203,7 @@ TRACE_EVENT(ext4_es_insert_extent,
2095 __field( ext4_lblk_t, lblk ) 2203 __field( ext4_lblk_t, lblk )
2096 __field( ext4_lblk_t, len ) 2204 __field( ext4_lblk_t, len )
2097 __field( ext4_fsblk_t, pblk ) 2205 __field( ext4_fsblk_t, pblk )
2098 __field( unsigned long long, status ) 2206 __field( char, status )
2099 ), 2207 ),
2100 2208
2101 TP_fast_assign( 2209 TP_fast_assign(
@@ -2104,14 +2212,14 @@ TRACE_EVENT(ext4_es_insert_extent,
2104 __entry->lblk = es->es_lblk; 2212 __entry->lblk = es->es_lblk;
2105 __entry->len = es->es_len; 2213 __entry->len = es->es_len;
2106 __entry->pblk = ext4_es_pblock(es); 2214 __entry->pblk = ext4_es_pblock(es);
2107 __entry->status = ext4_es_status(es); 2215 __entry->status = ext4_es_status(es) >> 60;
2108 ), 2216 ),
2109 2217
2110 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %llx", 2218 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
2111 MAJOR(__entry->dev), MINOR(__entry->dev), 2219 MAJOR(__entry->dev), MINOR(__entry->dev),
2112 (unsigned long) __entry->ino, 2220 (unsigned long) __entry->ino,
2113 __entry->lblk, __entry->len, 2221 __entry->lblk, __entry->len,
2114 __entry->pblk, __entry->status) 2222 __entry->pblk, show_extent_status(__entry->status))
2115); 2223);
2116 2224
2117TRACE_EVENT(ext4_es_remove_extent, 2225TRACE_EVENT(ext4_es_remove_extent,
@@ -2172,7 +2280,7 @@ TRACE_EVENT(ext4_es_find_delayed_extent_range_exit,
2172 __field( ext4_lblk_t, lblk ) 2280 __field( ext4_lblk_t, lblk )
2173 __field( ext4_lblk_t, len ) 2281 __field( ext4_lblk_t, len )
2174 __field( ext4_fsblk_t, pblk ) 2282 __field( ext4_fsblk_t, pblk )
2175 __field( unsigned long long, status ) 2283 __field( char, status )
2176 ), 2284 ),
2177 2285
2178 TP_fast_assign( 2286 TP_fast_assign(
@@ -2181,14 +2289,14 @@ TRACE_EVENT(ext4_es_find_delayed_extent_range_exit,
2181 __entry->lblk = es->es_lblk; 2289 __entry->lblk = es->es_lblk;
2182 __entry->len = es->es_len; 2290 __entry->len = es->es_len;
2183 __entry->pblk = ext4_es_pblock(es); 2291 __entry->pblk = ext4_es_pblock(es);
2184 __entry->status = ext4_es_status(es); 2292 __entry->status = ext4_es_status(es) >> 60;
2185 ), 2293 ),
2186 2294
2187 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %llx", 2295 TP_printk("dev %d,%d ino %lu es [%u/%u) mapped %llu status %s",
2188 MAJOR(__entry->dev), MINOR(__entry->dev), 2296 MAJOR(__entry->dev), MINOR(__entry->dev),
2189 (unsigned long) __entry->ino, 2297 (unsigned long) __entry->ino,
2190 __entry->lblk, __entry->len, 2298 __entry->lblk, __entry->len,
2191 __entry->pblk, __entry->status) 2299 __entry->pblk, show_extent_status(__entry->status))
2192); 2300);
2193 2301
2194TRACE_EVENT(ext4_es_lookup_extent_enter, 2302TRACE_EVENT(ext4_es_lookup_extent_enter,
@@ -2225,7 +2333,7 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
2225 __field( ext4_lblk_t, lblk ) 2333 __field( ext4_lblk_t, lblk )
2226 __field( ext4_lblk_t, len ) 2334 __field( ext4_lblk_t, len )
2227 __field( ext4_fsblk_t, pblk ) 2335 __field( ext4_fsblk_t, pblk )
2228 __field( unsigned long long, status ) 2336 __field( char, status )
2229 __field( int, found ) 2337 __field( int, found )
2230 ), 2338 ),
2231 2339
@@ -2235,16 +2343,16 @@ TRACE_EVENT(ext4_es_lookup_extent_exit,
2235 __entry->lblk = es->es_lblk; 2343 __entry->lblk = es->es_lblk;
2236 __entry->len = es->es_len; 2344 __entry->len = es->es_len;
2237 __entry->pblk = ext4_es_pblock(es); 2345 __entry->pblk = ext4_es_pblock(es);
2238 __entry->status = ext4_es_status(es); 2346 __entry->status = ext4_es_status(es) >> 60;
2239 __entry->found = found; 2347 __entry->found = found;
2240 ), 2348 ),
2241 2349
2242 TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %llx", 2350 TP_printk("dev %d,%d ino %lu found %d [%u/%u) %llu %s",
2243 MAJOR(__entry->dev), MINOR(__entry->dev), 2351 MAJOR(__entry->dev), MINOR(__entry->dev),
2244 (unsigned long) __entry->ino, __entry->found, 2352 (unsigned long) __entry->ino, __entry->found,
2245 __entry->lblk, __entry->len, 2353 __entry->lblk, __entry->len,
2246 __entry->found ? __entry->pblk : 0, 2354 __entry->found ? __entry->pblk : 0,
2247 __entry->found ? __entry->status : 0) 2355 show_extent_status(__entry->found ? __entry->status : 0))
2248); 2356);
2249 2357
2250TRACE_EVENT(ext4_es_shrink_enter, 2358TRACE_EVENT(ext4_es_shrink_enter,