2 #define TRACE_SYSTEM ext4
4 #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
19 #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode))
38 __entry->uid = i_uid_read(inode);
39 __entry->gid = i_gid_read(inode);
44 TP_printk(
"dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu",
73 TP_PROTO(
struct inode *inode,
struct inode *dir,
int mode),
91 TP_printk(
"dev %d,%d ino %lu dir %lu mode 0%o",
120 TP_PROTO(
struct inode *inode,
int drop),
142 TP_PROTO(
struct inode *inode,
unsigned long IP),
158 TP_printk(
"dev %d,%d ino %lu caller %pF",
164 TP_PROTO(
struct inode *inode, loff_t new_size),
180 TP_printk(
"dev %d,%d ino %lu new_size %lld",
188 TP_PROTO(
struct inode *inode, loff_t
pos,
unsigned int len,
191 TP_ARGS(inode, pos, len, flags),
209 TP_printk(
"dev %d,%d ino %lu pos %lld len %u flags %u",
217 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
220 TP_ARGS(inode, pos, len, flags)
225 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
228 TP_ARGS(inode, pos, len, flags)
232 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
233 unsigned int copied),
235 TP_ARGS(inode, pos, len, copied),
242 __field(
unsigned int, copied )
253 TP_printk(
"dev %d,%d ino %lu pos %lld len %u copied %u",
261 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
262 unsigned int copied),
264 TP_ARGS(inode, pos, len, copied)
269 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
270 unsigned int copied),
272 TP_ARGS(inode, pos, len, copied)
275 DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end,
277 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
278 unsigned int copied),
280 TP_ARGS(inode, pos, len, copied)
285 TP_PROTO(
struct inode *inode, loff_t pos,
unsigned int len,
286 unsigned int copied),
288 TP_ARGS(inode, pos, len, copied)
322 TP_printk(
"dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld "
323 "range_start %lld range_end %lld sync_mode %d "
324 "for_kupdate %d range_cyclic %d writeback_index %lu",
330 (
unsigned long)
__entry->writeback_index)
344 __field(
unsigned long, first_page )
362 TP_printk(
"dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x "
363 "first_page %lu io_done %d pages_written %d sync_mode %d",
375 int ret,
int pages_written),
377 TP_ARGS(inode, wbc, ret, pages_written),
393 __entry->pages_written = pages_written;
399 TP_printk(
"dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld "
400 "sync_mode %d writeback_index %lu",
405 (
unsigned long)
__entry->writeback_index)
426 TP_printk(
"dev %d,%d ino %lu page_index %lu",
429 (
unsigned long)
__entry->index)
462 __field(
unsigned long, offset )
473 TP_printk(
"dev %d,%d ino %lu page_index %lu offset %lu",
481 unsigned long long count),
498 TP_printk(
"dev %d,%d blk %llu count %llu",
526 TP_printk(
"dev %d,%d ino %lu pstart %llu len %u lstart %llu",
550 unsigned long long block,
unsigned int count),
569 TP_printk(
"dev %d,%d ino %lu block %llu count %u",
593 TP_printk(
"dev %d,%d pstart %llu len %u",
671 TP_printk(
"dev %d,%d ino %lu flags %u len %u lblk %u goal %llu "
672 "lleft %u lright %u pleft %llu pright %llu ",
713 TP_printk(
"dev %d,%d ino %lu flags %u len %u block %llu lblk %u "
714 "goal %llu lleft %u lright %u pleft %llu pright %llu",
723 TP_PROTO(
struct inode *inode,
__u64 block,
unsigned long count,
726 TP_ARGS(inode, block, count, flags),
732 __field(
unsigned long, count )
746 TP_printk(
"dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d",
774 TP_printk(
"dev %d,%d ino %lu parent %lu datasync %d ",
781 TP_PROTO(
struct inode *inode,
int ret),
832 __field(
unsigned int, data_blocks )
833 __field(
unsigned int, meta_blocks )
839 __entry->data_blocks =
EXT4_I(inode)->i_reserved_data_blocks;
840 __entry->meta_blocks =
EXT4_I(inode)->i_reserved_meta_blocks;
843 TP_printk(
"dev %d,%d ino %lu data_blocks %u meta_blocks %u",
900 TP_printk(
"dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u "
901 "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x "
947 TP_printk(
"dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u",
963 TP_ARGS(sb, inode, group, start, len),
981 TP_printk(
"dev %d,%d inode %lu extent %u/%d/%d ",
996 TP_ARGS(sb, inode, group, start, len)
1002 struct inode *inode,
1007 TP_ARGS(sb, inode, group, start, len)
1011 TP_PROTO(
struct inode *inode,
int is_metadata,
__u64 block),
1013 TP_ARGS(inode, is_metadata, block),
1027 __entry->is_metadata = is_metadata;
1031 TP_printk(
"dev %d,%d ino %lu mode 0%o is_metadata %d block %llu",
1038 TP_PROTO(
struct inode *inode,
int used_blocks,
int quota_claim),
1040 TP_ARGS(inode, used_blocks, quota_claim),
1047 __field(
int, reserved_data_blocks )
1048 __field(
int, reserved_meta_blocks )
1049 __field(
int, allocated_meta_blocks )
1058 __entry->used_blocks = used_blocks;
1059 __entry->reserved_data_blocks =
1060 EXT4_I(inode)->i_reserved_data_blocks;
1061 __entry->reserved_meta_blocks =
1062 EXT4_I(inode)->i_reserved_meta_blocks;
1063 __entry->allocated_meta_blocks =
1064 EXT4_I(inode)->i_allocated_meta_blocks;
1065 __entry->quota_claim = quota_claim;
1069 TP_printk(
"dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d "
1070 "reserved_data_blocks %d reserved_meta_blocks %d "
1071 "allocated_meta_blocks %d quota_claim %d",
1081 TP_PROTO(
struct inode *inode,
int md_needed),
1090 __field(
int, reserved_data_blocks )
1091 __field(
int, reserved_meta_blocks )
1099 __entry->md_needed = md_needed;
1100 __entry->reserved_data_blocks =
EXT4_I(inode)->i_reserved_data_blocks;
1101 __entry->reserved_meta_blocks =
EXT4_I(inode)->i_reserved_meta_blocks;
1105 TP_printk(
"dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d "
1106 "reserved_data_blocks %d reserved_meta_blocks %d",
1111 __entry->reserved_meta_blocks)
1115 TP_PROTO(
struct inode *inode,
int freed_blocks),
1124 __field(
int, reserved_data_blocks )
1125 __field(
int, reserved_meta_blocks )
1126 __field(
int, allocated_meta_blocks )
1134 __entry->freed_blocks = freed_blocks;
1135 __entry->reserved_data_blocks =
EXT4_I(inode)->i_reserved_data_blocks;
1136 __entry->reserved_meta_blocks =
EXT4_I(inode)->i_reserved_meta_blocks;
1137 __entry->allocated_meta_blocks =
EXT4_I(inode)->i_allocated_meta_blocks;
1141 TP_printk(
"dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d "
1142 "reserved_data_blocks %d reserved_meta_blocks %d "
1143 "allocated_meta_blocks %d",
1179 DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load,
1186 DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load,
1193 DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap,
1201 TP_PROTO(
struct inode *inode, loff_t offset,
unsigned long len,
int rw),
1203 TP_ARGS(inode, offset, len, rw),
1221 TP_printk(
"dev %d,%d ino %lu pos %lld len %lu rw %d",
1228 TP_PROTO(
struct inode *inode, loff_t offset,
unsigned long len,
1231 TP_ARGS(inode, offset, len, rw, ret),
1251 TP_printk(
"dev %d,%d ino %lu pos %lld len %lu rw %d ret %d",
1259 TP_PROTO(
struct inode *inode, loff_t offset, loff_t len,
int mode),
1261 TP_ARGS(inode, offset, len, mode),
1279 TP_printk(
"dev %d,%d ino %lu pos %lld len %lld mode %d",
1286 TP_PROTO(
struct inode *inode, loff_t offset,
1287 unsigned int max_blocks,
int ret),
1289 TP_ARGS(inode, offset, max_blocks, ret),
1295 __field(
unsigned int, blocks )
1307 TP_printk(
"dev %d,%d ino %lu pos %lld blocks %u ret %d",
1333 TP_printk(
"dev %d,%d ino %lu size %lld parent %lu",
1336 (
unsigned long)
__entry->parent)
1340 TP_PROTO(
struct dentry *dentry,
int ret),
1379 TP_printk(
"dev %d,%d ino %lu blocks %llu",
1399 TRACE_EVENT(ext4_ext_convert_to_initialized_enter,
1421 __entry->u_len = ext4_ext_get_actual_len(ux);
1422 __entry->u_pblk = ext4_ext_pblock(ux);
1425 TP_printk(
"dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u "
1437 TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath,
1462 __entry->u_len = ext4_ext_get_actual_len(ux);
1463 __entry->u_pblk = ext4_ext_pblock(ux);
1465 __entry->i_len = ext4_ext_get_actual_len(ix);
1466 __entry->i_pblk = ext4_ext_pblock(ix);
1469 TP_printk(
"dev %d,%d ino %lu m_lblk %u m_len %u "
1470 "u_lblk %u u_len %u u_pblk %llu "
1471 "i_lblk %u i_len %u i_pblk %llu ",
1481 unsigned int len,
unsigned int flags),
1483 TP_ARGS(inode, lblk, len, flags),
1490 __field(
unsigned int, flags )
1501 TP_printk(
"dev %d,%d ino %lu lblk %u len %u flags %u",
1507 DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter,
1509 unsigned len,
unsigned flags),
1511 TP_ARGS(inode, lblk, len, flags)
1514 DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter,
1516 unsigned len,
unsigned flags),
1518 TP_ARGS(inode, lblk, len, flags)
1525 TP_ARGS(inode, lblk, pblk, len, ret),
1545 TP_printk(
"dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d",
1552 DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit,
1556 TP_ARGS(inode, lblk, pblk, len, ret)
1559 DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit,
1563 TP_ARGS(inode, lblk, pblk, len, ret)
1585 TP_printk(
"dev %d,%d ino %lu lblk %u pblk %llu",
1628 TP_printk(
"dev %d,%d nblocks %d caller %pF",
1639 TP_ARGS(sb, group, start, len),
1657 TP_printk(
"dev %d,%d group %u, start %d, len %d",
1669 TP_ARGS(sb, group, start, len)
1679 TP_ARGS(sb, group, start, len)
1682 TRACE_EVENT(ext4_ext_handle_uninitialized_extents,
1686 TP_ARGS(inode, map, allocated, newblock),
1695 __field(
unsigned int, allocated )
1706 __entry->allocated = allocated;
1710 TP_printk(
"dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d"
1711 "allocated %d newblock %llu",
1716 (
unsigned int)
__entry->allocated,
1717 (
unsigned long long)
__entry->newblk)
1727 __field(
unsigned int, flags )
1743 TP_printk(
"dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d",
1753 TP_ARGS(inode, lblk, len, start),
1771 TP_printk(
"dev %d,%d ino %lu lblk %u len %u start %llu",
1776 (
unsigned long long)
__entry->start)
1798 TP_printk(
"dev %d,%d ino %lu lblk %u ret %d",
1810 TP_ARGS(inode, from, to, reverse, found, found_blk),
1829 __entry->found_blk = found_blk;
1832 TP_printk(
"dev %d,%d ino %lu from %u to %u reverse %d found %d "
1838 (
unsigned)
__entry->found_blk)
1860 TP_printk(
"dev %d,%d ino %lu lblk %u len %u",
1869 unsigned short len),
1871 TP_ARGS(inode, lblk, pblk, len),
1878 __field(
unsigned short, len )
1889 TP_printk(
"dev %d,%d ino %lu lblk %u pblk %llu len %u",
1893 (
unsigned long long)
__entry->pblk,
1894 (
unsigned short)
__entry->len)
1902 TP_ARGS(inode, ex, from, to, partial_cluster),
1920 __entry->partial = partial_cluster;
1921 __entry->ee_pblk = ext4_ext_pblock(ex);
1923 __entry->ee_len = ext4_ext_get_actual_len(ex);
1926 TP_printk(
"dev %d,%d ino %lu extent [%u(%llu), %u]"
1927 "from %u to %u partial_cluster %u",
1932 (
unsigned short)
__entry->ee_len,
1942 TP_ARGS(inode, start, ex, partial_cluster),
1957 __entry->partial = partial_cluster;
1960 __entry->ee_pblk = ext4_ext_pblock(ex);
1961 __entry->ee_len = ext4_ext_get_actual_len(ex);
1964 TP_printk(
"dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]"
1965 "partial_cluster %u",
1970 (
unsigned long long)
__entry->ee_pblk,
1992 TP_printk(
"dev %d,%d ino %lu index_pblk %llu",
1995 (
unsigned long long)
__entry->pblk)
2017 TP_printk(
"dev %d,%d ino %lu since %u depth %d",
2028 TP_ARGS(inode, start, depth, partial, eh_entries),
2036 __field(
unsigned short, eh_entries )
2045 __entry->eh_entries = eh_entries;
2048 TP_printk(
"dev %d,%d ino %lu since %u depth %d partial %u "
2049 "remaining_entries %u",
2055 (
unsigned short)
__entry->eh_entries)