diff options
author | Zheng Liu <wenqing.lz@taobao.com> | 2012-11-08 14:34:04 -0500 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-11-08 14:34:04 -0500 |
commit | 19b303d8b5a0e8150a4697c01ca03e75a0a17469 (patch) | |
tree | 1b9ea24684bb2f1be1682c95170846e21857fc0b /include/trace | |
parent | b5645534ce84c21695c2f82d4d4f67cf2a67229a (diff) |
ext4: print map->m_flags in trace_ext4_ext/ind_map_blocks_exit
When we use trace_ext4_ext/ind_map_blocks_exit, print the value of
map->m_flags in order that we can understand the extent's current
status.
Reviewed-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: Zheng Liu <wenqing.lz@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/ext4.h | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 25914e3002c7..d2a125a6db8b 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -1519,10 +1519,9 @@ DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, | |||
1519 | ); | 1519 | ); |
1520 | 1520 | ||
1521 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, | 1521 | DECLARE_EVENT_CLASS(ext4__map_blocks_exit, |
1522 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | 1522 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), |
1523 | ext4_fsblk_t pblk, unsigned int len, int ret), | ||
1524 | 1523 | ||
1525 | TP_ARGS(inode, lblk, pblk, len, ret), | 1524 | TP_ARGS(inode, map, ret), |
1526 | 1525 | ||
1527 | TP_STRUCT__entry( | 1526 | TP_STRUCT__entry( |
1528 | __field( dev_t, dev ) | 1527 | __field( dev_t, dev ) |
@@ -1530,37 +1529,37 @@ DECLARE_EVENT_CLASS(ext4__map_blocks_exit, | |||
1530 | __field( ext4_fsblk_t, pblk ) | 1529 | __field( ext4_fsblk_t, pblk ) |
1531 | __field( ext4_lblk_t, lblk ) | 1530 | __field( ext4_lblk_t, lblk ) |
1532 | __field( unsigned int, len ) | 1531 | __field( unsigned int, len ) |
1532 | __field( unsigned int, flags ) | ||
1533 | __field( int, ret ) | 1533 | __field( int, ret ) |
1534 | ), | 1534 | ), |
1535 | 1535 | ||
1536 | TP_fast_assign( | 1536 | TP_fast_assign( |
1537 | __entry->dev = inode->i_sb->s_dev; | 1537 | __entry->dev = inode->i_sb->s_dev; |
1538 | __entry->ino = inode->i_ino; | 1538 | __entry->ino = inode->i_ino; |
1539 | __entry->pblk = pblk; | 1539 | __entry->pblk = map->m_pblk; |
1540 | __entry->lblk = lblk; | 1540 | __entry->lblk = map->m_lblk; |
1541 | __entry->len = len; | 1541 | __entry->len = map->m_len; |
1542 | __entry->flags = map->m_flags; | ||
1542 | __entry->ret = ret; | 1543 | __entry->ret = ret; |
1543 | ), | 1544 | ), |
1544 | 1545 | ||
1545 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", | 1546 | TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u flags %x ret %d", |
1546 | MAJOR(__entry->dev), MINOR(__entry->dev), | 1547 | MAJOR(__entry->dev), MINOR(__entry->dev), |
1547 | (unsigned long) __entry->ino, | 1548 | (unsigned long) __entry->ino, |
1548 | __entry->lblk, __entry->pblk, | 1549 | __entry->lblk, __entry->pblk, |
1549 | __entry->len, __entry->ret) | 1550 | __entry->len, __entry->flags, __entry->ret) |
1550 | ); | 1551 | ); |
1551 | 1552 | ||
1552 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, | 1553 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, |
1553 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | 1554 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), |
1554 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1555 | 1555 | ||
1556 | TP_ARGS(inode, lblk, pblk, len, ret) | 1556 | TP_ARGS(inode, map, ret) |
1557 | ); | 1557 | ); |
1558 | 1558 | ||
1559 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, | 1559 | DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, |
1560 | TP_PROTO(struct inode *inode, ext4_lblk_t lblk, | 1560 | TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, int ret), |
1561 | ext4_fsblk_t pblk, unsigned len, int ret), | ||
1562 | 1561 | ||
1563 | TP_ARGS(inode, lblk, pblk, len, ret) | 1562 | TP_ARGS(inode, map, ret) |
1564 | ); | 1563 | ); |
1565 | 1564 | ||
1566 | TRACE_EVENT(ext4_ext_load_extent, | 1565 | TRACE_EVENT(ext4_ext_load_extent, |