19bffad1eSTheodore Ts'o #undef TRACE_SYSTEM 29bffad1eSTheodore Ts'o #define TRACE_SYSTEM ext4 39bffad1eSTheodore Ts'o 4d0b6e04aSLi Zefan #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) 5d0b6e04aSLi Zefan #define _TRACE_EXT4_H 6d0b6e04aSLi Zefan 79bffad1eSTheodore Ts'o #include <linux/writeback.h> 89bffad1eSTheodore Ts'o #include <linux/tracepoint.h> 99bffad1eSTheodore Ts'o 103661d286STheodore Ts'o struct ext4_allocation_context; 113661d286STheodore Ts'o struct ext4_allocation_request; 123661d286STheodore Ts'o struct ext4_prealloc_space; 13fb40ba0dSTheodore Ts'o struct ext4_inode_info; 140ef12249SJosh Stone struct mpage_da_data; 15fb40ba0dSTheodore Ts'o 16fb40ba0dSTheodore Ts'o #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) 173661d286STheodore Ts'o 189bffad1eSTheodore Ts'o TRACE_EVENT(ext4_free_inode, 199bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode), 209bffad1eSTheodore Ts'o 219bffad1eSTheodore Ts'o TP_ARGS(inode), 229bffad1eSTheodore Ts'o 239bffad1eSTheodore Ts'o TP_STRUCT__entry( 240562e0baSJiaying Zhang __field( dev_t, dev ) 259bffad1eSTheodore Ts'o __field( ino_t, ino ) 269bffad1eSTheodore Ts'o __field( umode_t, mode ) 279bffad1eSTheodore Ts'o __field( uid_t, uid ) 289bffad1eSTheodore Ts'o __field( gid_t, gid ) 299bffad1eSTheodore Ts'o __field( blkcnt_t, blocks ) 309bffad1eSTheodore Ts'o ), 319bffad1eSTheodore Ts'o 329bffad1eSTheodore Ts'o TP_fast_assign( 330562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 349bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 359bffad1eSTheodore Ts'o __entry->mode = inode->i_mode; 369bffad1eSTheodore Ts'o __entry->uid = inode->i_uid; 379bffad1eSTheodore Ts'o __entry->gid = inode->i_gid; 389bffad1eSTheodore Ts'o __entry->blocks = inode->i_blocks; 399bffad1eSTheodore Ts'o ), 409bffad1eSTheodore Ts'o 41a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", 420562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 430562e0baSJiaying Zhang (unsigned long) __entry->ino, 440562e0baSJiaying Zhang __entry->mode, __entry->uid, __entry->gid, 45627ad9fdSTheodore Ts'o (unsigned long long) __entry->blocks) 469bffad1eSTheodore Ts'o ); 479bffad1eSTheodore Ts'o 489bffad1eSTheodore Ts'o TRACE_EVENT(ext4_request_inode, 499bffad1eSTheodore Ts'o TP_PROTO(struct inode *dir, int mode), 509bffad1eSTheodore Ts'o 519bffad1eSTheodore Ts'o TP_ARGS(dir, mode), 529bffad1eSTheodore Ts'o 539bffad1eSTheodore Ts'o TP_STRUCT__entry( 540562e0baSJiaying Zhang __field( dev_t, dev ) 559bffad1eSTheodore Ts'o __field( ino_t, dir ) 569bffad1eSTheodore Ts'o __field( umode_t, mode ) 579bffad1eSTheodore Ts'o ), 589bffad1eSTheodore Ts'o 599bffad1eSTheodore Ts'o TP_fast_assign( 600562e0baSJiaying Zhang __entry->dev = dir->i_sb->s_dev; 619bffad1eSTheodore Ts'o __entry->dir = dir->i_ino; 629bffad1eSTheodore Ts'o __entry->mode = mode; 639bffad1eSTheodore Ts'o ), 649bffad1eSTheodore Ts'o 65a269029dSTheodore Ts'o TP_printk("dev %d,%d dir %lu mode 0%o", 660562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 67a269029dSTheodore Ts'o (unsigned long) __entry->dir, __entry->mode) 689bffad1eSTheodore Ts'o ); 699bffad1eSTheodore Ts'o 709bffad1eSTheodore Ts'o TRACE_EVENT(ext4_allocate_inode, 719bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, struct inode *dir, int mode), 729bffad1eSTheodore Ts'o 739bffad1eSTheodore Ts'o TP_ARGS(inode, dir, mode), 749bffad1eSTheodore Ts'o 759bffad1eSTheodore Ts'o TP_STRUCT__entry( 760562e0baSJiaying Zhang __field( dev_t, dev ) 779bffad1eSTheodore Ts'o __field( ino_t, ino ) 789bffad1eSTheodore Ts'o __field( ino_t, dir ) 799bffad1eSTheodore Ts'o __field( umode_t, mode ) 809bffad1eSTheodore Ts'o ), 819bffad1eSTheodore Ts'o 829bffad1eSTheodore Ts'o TP_fast_assign( 830562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 849bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 859bffad1eSTheodore Ts'o __entry->dir = dir->i_ino; 869bffad1eSTheodore Ts'o __entry->mode = mode; 879bffad1eSTheodore Ts'o ), 889bffad1eSTheodore Ts'o 89a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu dir %lu mode 0%o", 900562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 91a269029dSTheodore Ts'o (unsigned long) __entry->ino, 92a3710fd1STheodore Ts'o (unsigned long) __entry->dir, __entry->mode) 939bffad1eSTheodore Ts'o ); 949bffad1eSTheodore Ts'o 957ff9c073STheodore Ts'o TRACE_EVENT(ext4_evict_inode, 967ff9c073STheodore Ts'o TP_PROTO(struct inode *inode), 977ff9c073STheodore Ts'o 987ff9c073STheodore Ts'o TP_ARGS(inode), 997ff9c073STheodore Ts'o 1007ff9c073STheodore Ts'o TP_STRUCT__entry( 1010562e0baSJiaying Zhang __field( dev_t, dev ) 1027ff9c073STheodore Ts'o __field( ino_t, ino ) 1037ff9c073STheodore Ts'o __field( int, nlink ) 1047ff9c073STheodore Ts'o ), 1057ff9c073STheodore Ts'o 1067ff9c073STheodore Ts'o TP_fast_assign( 1070562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1087ff9c073STheodore Ts'o __entry->ino = inode->i_ino; 1097ff9c073STheodore Ts'o __entry->nlink = inode->i_nlink; 1107ff9c073STheodore Ts'o ), 1117ff9c073STheodore Ts'o 1127ff9c073STheodore Ts'o TP_printk("dev %d,%d ino %lu nlink %d", 1130562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1147ff9c073STheodore Ts'o (unsigned long) __entry->ino, __entry->nlink) 1157ff9c073STheodore Ts'o ); 1167ff9c073STheodore Ts'o 1177ff9c073STheodore Ts'o TRACE_EVENT(ext4_drop_inode, 1187ff9c073STheodore Ts'o TP_PROTO(struct inode *inode, int drop), 1197ff9c073STheodore Ts'o 1207ff9c073STheodore Ts'o TP_ARGS(inode, drop), 1217ff9c073STheodore Ts'o 1227ff9c073STheodore Ts'o TP_STRUCT__entry( 1230562e0baSJiaying Zhang __field( dev_t, dev ) 1247ff9c073STheodore Ts'o __field( ino_t, ino ) 1257ff9c073STheodore Ts'o __field( int, drop ) 1267ff9c073STheodore Ts'o ), 1277ff9c073STheodore Ts'o 1287ff9c073STheodore Ts'o TP_fast_assign( 1290562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1307ff9c073STheodore Ts'o __entry->ino = inode->i_ino; 1317ff9c073STheodore Ts'o __entry->drop = drop; 1327ff9c073STheodore Ts'o ), 1337ff9c073STheodore Ts'o 1347ff9c073STheodore Ts'o TP_printk("dev %d,%d ino %lu drop %d", 1350562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1367ff9c073STheodore Ts'o (unsigned long) __entry->ino, __entry->drop) 1377ff9c073STheodore Ts'o ); 1387ff9c073STheodore Ts'o 1397ff9c073STheodore Ts'o TRACE_EVENT(ext4_mark_inode_dirty, 1407ff9c073STheodore Ts'o TP_PROTO(struct inode *inode, unsigned long IP), 1417ff9c073STheodore Ts'o 1427ff9c073STheodore Ts'o TP_ARGS(inode, IP), 1437ff9c073STheodore Ts'o 1447ff9c073STheodore Ts'o TP_STRUCT__entry( 1450562e0baSJiaying Zhang __field( dev_t, dev ) 1467ff9c073STheodore Ts'o __field( ino_t, ino ) 1477ff9c073STheodore Ts'o __field(unsigned long, ip ) 1487ff9c073STheodore Ts'o ), 1497ff9c073STheodore Ts'o 1507ff9c073STheodore Ts'o TP_fast_assign( 1510562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1527ff9c073STheodore Ts'o __entry->ino = inode->i_ino; 1537ff9c073STheodore Ts'o __entry->ip = IP; 1547ff9c073STheodore Ts'o ), 1557ff9c073STheodore Ts'o 1567ff9c073STheodore Ts'o TP_printk("dev %d,%d ino %lu caller %pF", 1570562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1587ff9c073STheodore Ts'o (unsigned long) __entry->ino, (void *)__entry->ip) 1597ff9c073STheodore Ts'o ); 1607ff9c073STheodore Ts'o 1617ff9c073STheodore Ts'o TRACE_EVENT(ext4_begin_ordered_truncate, 1627ff9c073STheodore Ts'o TP_PROTO(struct inode *inode, loff_t new_size), 1637ff9c073STheodore Ts'o 1647ff9c073STheodore Ts'o TP_ARGS(inode, new_size), 1657ff9c073STheodore Ts'o 1667ff9c073STheodore Ts'o TP_STRUCT__entry( 1670562e0baSJiaying Zhang __field( dev_t, dev ) 1687ff9c073STheodore Ts'o __field( ino_t, ino ) 1697ff9c073STheodore Ts'o __field( loff_t, new_size ) 1707ff9c073STheodore Ts'o ), 1717ff9c073STheodore Ts'o 1727ff9c073STheodore Ts'o TP_fast_assign( 1730562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1747ff9c073STheodore Ts'o __entry->ino = inode->i_ino; 1757ff9c073STheodore Ts'o __entry->new_size = new_size; 1767ff9c073STheodore Ts'o ), 1777ff9c073STheodore Ts'o 1787ff9c073STheodore Ts'o TP_printk("dev %d,%d ino %lu new_size %lld", 1790562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1807ff9c073STheodore Ts'o (unsigned long) __entry->ino, 1817ff9c073STheodore Ts'o (long long) __entry->new_size) 1827ff9c073STheodore Ts'o ); 1837ff9c073STheodore Ts'o 184b5eb34c3SLi Zefan DECLARE_EVENT_CLASS(ext4__write_begin, 1859bffad1eSTheodore Ts'o 1869bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 1879bffad1eSTheodore Ts'o unsigned int flags), 1889bffad1eSTheodore Ts'o 1899bffad1eSTheodore Ts'o TP_ARGS(inode, pos, len, flags), 1909bffad1eSTheodore Ts'o 1919bffad1eSTheodore Ts'o TP_STRUCT__entry( 1920562e0baSJiaying Zhang __field( dev_t, dev ) 1939bffad1eSTheodore Ts'o __field( ino_t, ino ) 1949bffad1eSTheodore Ts'o __field( loff_t, pos ) 1959bffad1eSTheodore Ts'o __field( unsigned int, len ) 1969bffad1eSTheodore Ts'o __field( unsigned int, flags ) 1979bffad1eSTheodore Ts'o ), 1989bffad1eSTheodore Ts'o 1999bffad1eSTheodore Ts'o TP_fast_assign( 2000562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 2019bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 2029bffad1eSTheodore Ts'o __entry->pos = pos; 2039bffad1eSTheodore Ts'o __entry->len = len; 2049bffad1eSTheodore Ts'o __entry->flags = flags; 2059bffad1eSTheodore Ts'o ), 2069bffad1eSTheodore Ts'o 207a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu pos %llu len %u flags %u", 2080562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 209a269029dSTheodore Ts'o (unsigned long) __entry->ino, 210a3710fd1STheodore Ts'o __entry->pos, __entry->len, __entry->flags) 2119bffad1eSTheodore Ts'o ); 2129bffad1eSTheodore Ts'o 213b5eb34c3SLi Zefan DEFINE_EVENT(ext4__write_begin, ext4_write_begin, 214b5eb34c3SLi Zefan 215b5eb34c3SLi Zefan TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 216b5eb34c3SLi Zefan unsigned int flags), 217b5eb34c3SLi Zefan 218b5eb34c3SLi Zefan TP_ARGS(inode, pos, len, flags) 219b5eb34c3SLi Zefan ); 220b5eb34c3SLi Zefan 221b5eb34c3SLi Zefan DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, 222b5eb34c3SLi Zefan 223b5eb34c3SLi Zefan TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 224b5eb34c3SLi Zefan unsigned int flags), 225b5eb34c3SLi Zefan 226b5eb34c3SLi Zefan TP_ARGS(inode, pos, len, flags) 227b5eb34c3SLi Zefan ); 228b5eb34c3SLi Zefan 229b5eb34c3SLi Zefan DECLARE_EVENT_CLASS(ext4__write_end, 2309bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 2319bffad1eSTheodore Ts'o unsigned int copied), 2329bffad1eSTheodore Ts'o 2339bffad1eSTheodore Ts'o TP_ARGS(inode, pos, len, copied), 2349bffad1eSTheodore Ts'o 2359bffad1eSTheodore Ts'o TP_STRUCT__entry( 2360562e0baSJiaying Zhang __field( dev_t, dev ) 2379bffad1eSTheodore Ts'o __field( ino_t, ino ) 2389bffad1eSTheodore Ts'o __field( loff_t, pos ) 2399bffad1eSTheodore Ts'o __field( unsigned int, len ) 2409bffad1eSTheodore Ts'o __field( unsigned int, copied ) 2419bffad1eSTheodore Ts'o ), 2429bffad1eSTheodore Ts'o 2439bffad1eSTheodore Ts'o TP_fast_assign( 2440562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 2459bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 2469bffad1eSTheodore Ts'o __entry->pos = pos; 2479bffad1eSTheodore Ts'o __entry->len = len; 2489bffad1eSTheodore Ts'o __entry->copied = copied; 2499bffad1eSTheodore Ts'o ), 2509bffad1eSTheodore Ts'o 251a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu pos %llu len %u copied %u", 2520562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 2530562e0baSJiaying Zhang (unsigned long) __entry->ino, 2540562e0baSJiaying Zhang __entry->pos, __entry->len, __entry->copied) 2559bffad1eSTheodore Ts'o ); 2569bffad1eSTheodore Ts'o 257b5eb34c3SLi Zefan DEFINE_EVENT(ext4__write_end, ext4_ordered_write_end, 258b5eb34c3SLi Zefan 2599bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 2609bffad1eSTheodore Ts'o unsigned int copied), 2619bffad1eSTheodore Ts'o 262b5eb34c3SLi Zefan TP_ARGS(inode, pos, len, copied) 2639bffad1eSTheodore Ts'o ); 2649bffad1eSTheodore Ts'o 265b5eb34c3SLi Zefan DEFINE_EVENT(ext4__write_end, ext4_writeback_write_end, 266b5eb34c3SLi Zefan 2679bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 2689bffad1eSTheodore Ts'o unsigned int copied), 2699bffad1eSTheodore Ts'o 270b5eb34c3SLi Zefan TP_ARGS(inode, pos, len, copied) 271b5eb34c3SLi Zefan ); 2729bffad1eSTheodore Ts'o 273b5eb34c3SLi Zefan DEFINE_EVENT(ext4__write_end, ext4_journalled_write_end, 2749bffad1eSTheodore Ts'o 275b5eb34c3SLi Zefan TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 276b5eb34c3SLi Zefan unsigned int copied), 277b5eb34c3SLi Zefan 278b5eb34c3SLi Zefan TP_ARGS(inode, pos, len, copied) 279b5eb34c3SLi Zefan ); 280b5eb34c3SLi Zefan 281b5eb34c3SLi Zefan DEFINE_EVENT(ext4__write_end, ext4_da_write_end, 282b5eb34c3SLi Zefan 283b5eb34c3SLi Zefan TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, 284b5eb34c3SLi Zefan unsigned int copied), 285b5eb34c3SLi Zefan 286b5eb34c3SLi Zefan TP_ARGS(inode, pos, len, copied) 2879bffad1eSTheodore Ts'o ); 2889bffad1eSTheodore Ts'o 28943ce1d23SAneesh Kumar K.V TRACE_EVENT(ext4_writepage, 2909bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, struct page *page), 2919bffad1eSTheodore Ts'o 2929bffad1eSTheodore Ts'o TP_ARGS(inode, page), 2939bffad1eSTheodore Ts'o 2949bffad1eSTheodore Ts'o TP_STRUCT__entry( 2950562e0baSJiaying Zhang __field( dev_t, dev ) 2969bffad1eSTheodore Ts'o __field( ino_t, ino ) 2979bffad1eSTheodore Ts'o __field( pgoff_t, index ) 2989bffad1eSTheodore Ts'o 2999bffad1eSTheodore Ts'o ), 3009bffad1eSTheodore Ts'o 3019bffad1eSTheodore Ts'o TP_fast_assign( 3020562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 3039bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 3049bffad1eSTheodore Ts'o __entry->index = page->index; 3059bffad1eSTheodore Ts'o ), 3069bffad1eSTheodore Ts'o 307a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu page_index %lu", 3080562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 309a269029dSTheodore Ts'o (unsigned long) __entry->ino, __entry->index) 3109bffad1eSTheodore Ts'o ); 3119bffad1eSTheodore Ts'o 3129bffad1eSTheodore Ts'o TRACE_EVENT(ext4_da_writepages, 3139bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, struct writeback_control *wbc), 3149bffad1eSTheodore Ts'o 3159bffad1eSTheodore Ts'o TP_ARGS(inode, wbc), 3169bffad1eSTheodore Ts'o 3179bffad1eSTheodore Ts'o TP_STRUCT__entry( 3180562e0baSJiaying Zhang __field( dev_t, dev ) 3199bffad1eSTheodore Ts'o __field( ino_t, ino ) 3209bffad1eSTheodore Ts'o __field( long, nr_to_write ) 3219bffad1eSTheodore Ts'o __field( long, pages_skipped ) 3229bffad1eSTheodore Ts'o __field( loff_t, range_start ) 3239bffad1eSTheodore Ts'o __field( loff_t, range_end ) 3240562e0baSJiaying Zhang __field( int, sync_mode ) 3259bffad1eSTheodore Ts'o __field( char, for_kupdate ) 3269bffad1eSTheodore Ts'o __field( char, range_cyclic ) 32755138e0bSTheodore Ts'o __field( pgoff_t, writeback_index ) 3289bffad1eSTheodore Ts'o ), 3299bffad1eSTheodore Ts'o 3309bffad1eSTheodore Ts'o TP_fast_assign( 3310562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 3329bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 3339bffad1eSTheodore Ts'o __entry->nr_to_write = wbc->nr_to_write; 3349bffad1eSTheodore Ts'o __entry->pages_skipped = wbc->pages_skipped; 3359bffad1eSTheodore Ts'o __entry->range_start = wbc->range_start; 3369bffad1eSTheodore Ts'o __entry->range_end = wbc->range_end; 3370562e0baSJiaying Zhang __entry->sync_mode = wbc->sync_mode; 3389bffad1eSTheodore Ts'o __entry->for_kupdate = wbc->for_kupdate; 3399bffad1eSTheodore Ts'o __entry->range_cyclic = wbc->range_cyclic; 34055138e0bSTheodore Ts'o __entry->writeback_index = inode->i_mapping->writeback_index; 3419bffad1eSTheodore Ts'o ), 3429bffad1eSTheodore Ts'o 343a107e5a3STheodore Ts'o TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " 3440562e0baSJiaying Zhang "range_start %llu range_end %llu sync_mode %d" 3450562e0baSJiaying Zhang "for_kupdate %d range_cyclic %d writeback_index %lu", 3460562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 347a3710fd1STheodore Ts'o (unsigned long) __entry->ino, __entry->nr_to_write, 3489bffad1eSTheodore Ts'o __entry->pages_skipped, __entry->range_start, 3490562e0baSJiaying Zhang __entry->range_end, __entry->sync_mode, 3500562e0baSJiaying Zhang __entry->for_kupdate, __entry->range_cyclic, 35155138e0bSTheodore Ts'o (unsigned long) __entry->writeback_index) 3529bffad1eSTheodore Ts'o ); 3539bffad1eSTheodore Ts'o 354b3a3ca8cSTheodore Ts'o TRACE_EVENT(ext4_da_write_pages, 355b3a3ca8cSTheodore Ts'o TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), 356b3a3ca8cSTheodore Ts'o 357b3a3ca8cSTheodore Ts'o TP_ARGS(inode, mpd), 358b3a3ca8cSTheodore Ts'o 359b3a3ca8cSTheodore Ts'o TP_STRUCT__entry( 3600562e0baSJiaying Zhang __field( dev_t, dev ) 361b3a3ca8cSTheodore Ts'o __field( ino_t, ino ) 362b3a3ca8cSTheodore Ts'o __field( __u64, b_blocknr ) 363b3a3ca8cSTheodore Ts'o __field( __u32, b_size ) 364b3a3ca8cSTheodore Ts'o __field( __u32, b_state ) 365b3a3ca8cSTheodore Ts'o __field( unsigned long, first_page ) 366b3a3ca8cSTheodore Ts'o __field( int, io_done ) 367b3a3ca8cSTheodore Ts'o __field( int, pages_written ) 3680562e0baSJiaying Zhang __field( int, sync_mode ) 369b3a3ca8cSTheodore Ts'o ), 370b3a3ca8cSTheodore Ts'o 371b3a3ca8cSTheodore Ts'o TP_fast_assign( 3720562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 373b3a3ca8cSTheodore Ts'o __entry->ino = inode->i_ino; 374b3a3ca8cSTheodore Ts'o __entry->b_blocknr = mpd->b_blocknr; 375b3a3ca8cSTheodore Ts'o __entry->b_size = mpd->b_size; 376b3a3ca8cSTheodore Ts'o __entry->b_state = mpd->b_state; 377b3a3ca8cSTheodore Ts'o __entry->first_page = mpd->first_page; 378b3a3ca8cSTheodore Ts'o __entry->io_done = mpd->io_done; 379b3a3ca8cSTheodore Ts'o __entry->pages_written = mpd->pages_written; 3800562e0baSJiaying Zhang __entry->sync_mode = mpd->wbc->sync_mode; 381b3a3ca8cSTheodore Ts'o ), 382b3a3ca8cSTheodore Ts'o 3830562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " 3840562e0baSJiaying Zhang "first_page %lu io_done %d pages_written %d sync_mode %d", 3850562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 386a269029dSTheodore Ts'o (unsigned long) __entry->ino, 387b3a3ca8cSTheodore Ts'o __entry->b_blocknr, __entry->b_size, 388b3a3ca8cSTheodore Ts'o __entry->b_state, __entry->first_page, 3890562e0baSJiaying Zhang __entry->io_done, __entry->pages_written, 3900562e0baSJiaying Zhang __entry->sync_mode 3910562e0baSJiaying Zhang ) 392b3a3ca8cSTheodore Ts'o ); 393b3a3ca8cSTheodore Ts'o 3949bffad1eSTheodore Ts'o TRACE_EVENT(ext4_da_writepages_result, 3959bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, struct writeback_control *wbc, 3969bffad1eSTheodore Ts'o int ret, int pages_written), 3979bffad1eSTheodore Ts'o 3989bffad1eSTheodore Ts'o TP_ARGS(inode, wbc, ret, pages_written), 3999bffad1eSTheodore Ts'o 4009bffad1eSTheodore Ts'o TP_STRUCT__entry( 4010562e0baSJiaying Zhang __field( dev_t, dev ) 4029bffad1eSTheodore Ts'o __field( ino_t, ino ) 4039bffad1eSTheodore Ts'o __field( int, ret ) 4049bffad1eSTheodore Ts'o __field( int, pages_written ) 4059bffad1eSTheodore Ts'o __field( long, pages_skipped ) 4060562e0baSJiaying Zhang __field( int, sync_mode ) 40755138e0bSTheodore Ts'o __field( pgoff_t, writeback_index ) 4089bffad1eSTheodore Ts'o ), 4099bffad1eSTheodore Ts'o 4109bffad1eSTheodore Ts'o TP_fast_assign( 4110562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 4129bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 4139bffad1eSTheodore Ts'o __entry->ret = ret; 4149bffad1eSTheodore Ts'o __entry->pages_written = pages_written; 4159bffad1eSTheodore Ts'o __entry->pages_skipped = wbc->pages_skipped; 4160562e0baSJiaying Zhang __entry->sync_mode = wbc->sync_mode; 41755138e0bSTheodore Ts'o __entry->writeback_index = inode->i_mapping->writeback_index; 4189bffad1eSTheodore Ts'o ), 4199bffad1eSTheodore Ts'o 4200562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " 421b7a2441fSWu Fengguang "sync_mode %d writeback_index %lu", 4220562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 423a3710fd1STheodore Ts'o (unsigned long) __entry->ino, __entry->ret, 4249bffad1eSTheodore Ts'o __entry->pages_written, __entry->pages_skipped, 425b7a2441fSWu Fengguang __entry->sync_mode, 42655138e0bSTheodore Ts'o (unsigned long) __entry->writeback_index) 4279bffad1eSTheodore Ts'o ); 4289bffad1eSTheodore Ts'o 4290562e0baSJiaying Zhang DECLARE_EVENT_CLASS(ext4__page_op, 4300562e0baSJiaying Zhang TP_PROTO(struct page *page), 4310562e0baSJiaying Zhang 4320562e0baSJiaying Zhang TP_ARGS(page), 4330562e0baSJiaying Zhang 4340562e0baSJiaying Zhang TP_STRUCT__entry( 4350562e0baSJiaying Zhang __field( pgoff_t, index ) 4360562e0baSJiaying Zhang __field( ino_t, ino ) 4370562e0baSJiaying Zhang __field( dev_t, dev ) 4380562e0baSJiaying Zhang 4390562e0baSJiaying Zhang ), 4400562e0baSJiaying Zhang 4410562e0baSJiaying Zhang TP_fast_assign( 4420562e0baSJiaying Zhang __entry->index = page->index; 4430562e0baSJiaying Zhang __entry->ino = page->mapping->host->i_ino; 4440562e0baSJiaying Zhang __entry->dev = page->mapping->host->i_sb->s_dev; 4450562e0baSJiaying Zhang ), 4460562e0baSJiaying Zhang 4470562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu page_index %lu", 4480562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 4490562e0baSJiaying Zhang (unsigned long) __entry->ino, 4500562e0baSJiaying Zhang __entry->index) 4510562e0baSJiaying Zhang ); 4520562e0baSJiaying Zhang 4530562e0baSJiaying Zhang DEFINE_EVENT(ext4__page_op, ext4_readpage, 4540562e0baSJiaying Zhang 4550562e0baSJiaying Zhang TP_PROTO(struct page *page), 4560562e0baSJiaying Zhang 4570562e0baSJiaying Zhang TP_ARGS(page) 4580562e0baSJiaying Zhang ); 4590562e0baSJiaying Zhang 4600562e0baSJiaying Zhang DEFINE_EVENT(ext4__page_op, ext4_releasepage, 4610562e0baSJiaying Zhang 4620562e0baSJiaying Zhang TP_PROTO(struct page *page), 4630562e0baSJiaying Zhang 4640562e0baSJiaying Zhang TP_ARGS(page) 4650562e0baSJiaying Zhang ); 4660562e0baSJiaying Zhang 4670562e0baSJiaying Zhang TRACE_EVENT(ext4_invalidatepage, 4680562e0baSJiaying Zhang TP_PROTO(struct page *page, unsigned long offset), 4690562e0baSJiaying Zhang 4700562e0baSJiaying Zhang TP_ARGS(page, offset), 4710562e0baSJiaying Zhang 4720562e0baSJiaying Zhang TP_STRUCT__entry( 4730562e0baSJiaying Zhang __field( pgoff_t, index ) 4740562e0baSJiaying Zhang __field( unsigned long, offset ) 4750562e0baSJiaying Zhang __field( ino_t, ino ) 4760562e0baSJiaying Zhang __field( dev_t, dev ) 4770562e0baSJiaying Zhang 4780562e0baSJiaying Zhang ), 4790562e0baSJiaying Zhang 4800562e0baSJiaying Zhang TP_fast_assign( 4810562e0baSJiaying Zhang __entry->index = page->index; 4820562e0baSJiaying Zhang __entry->offset = offset; 4830562e0baSJiaying Zhang __entry->ino = page->mapping->host->i_ino; 4840562e0baSJiaying Zhang __entry->dev = page->mapping->host->i_sb->s_dev; 4850562e0baSJiaying Zhang ), 4860562e0baSJiaying Zhang 4870562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", 4880562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 4890562e0baSJiaying Zhang (unsigned long) __entry->ino, 4900562e0baSJiaying Zhang __entry->index, __entry->offset) 4910562e0baSJiaying Zhang ); 4920562e0baSJiaying Zhang 4939bffad1eSTheodore Ts'o TRACE_EVENT(ext4_discard_blocks, 4949bffad1eSTheodore Ts'o TP_PROTO(struct super_block *sb, unsigned long long blk, 4959bffad1eSTheodore Ts'o unsigned long long count), 4969bffad1eSTheodore Ts'o 4979bffad1eSTheodore Ts'o TP_ARGS(sb, blk, count), 4989bffad1eSTheodore Ts'o 4999bffad1eSTheodore Ts'o TP_STRUCT__entry( 5000562e0baSJiaying Zhang __field( dev_t, dev ) 5019bffad1eSTheodore Ts'o __field( __u64, blk ) 5029bffad1eSTheodore Ts'o __field( __u64, count ) 5039bffad1eSTheodore Ts'o 5049bffad1eSTheodore Ts'o ), 5059bffad1eSTheodore Ts'o 5069bffad1eSTheodore Ts'o TP_fast_assign( 5070562e0baSJiaying Zhang __entry->dev = sb->s_dev; 5089bffad1eSTheodore Ts'o __entry->blk = blk; 5099bffad1eSTheodore Ts'o __entry->count = count; 5109bffad1eSTheodore Ts'o ), 5119bffad1eSTheodore Ts'o 512a269029dSTheodore Ts'o TP_printk("dev %d,%d blk %llu count %llu", 5130562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 514a269029dSTheodore Ts'o __entry->blk, __entry->count) 5159bffad1eSTheodore Ts'o ); 5169bffad1eSTheodore Ts'o 517f084db93SLi Zefan DECLARE_EVENT_CLASS(ext4__mb_new_pa, 5189bffad1eSTheodore Ts'o TP_PROTO(struct ext4_allocation_context *ac, 5199bffad1eSTheodore Ts'o struct ext4_prealloc_space *pa), 5209bffad1eSTheodore Ts'o 5219bffad1eSTheodore Ts'o TP_ARGS(ac, pa), 5229bffad1eSTheodore Ts'o 5239bffad1eSTheodore Ts'o TP_STRUCT__entry( 5240562e0baSJiaying Zhang __field( dev_t, dev ) 5259bffad1eSTheodore Ts'o __field( ino_t, ino ) 5269bffad1eSTheodore Ts'o __field( __u64, pa_pstart ) 5279bffad1eSTheodore Ts'o __field( __u32, pa_len ) 5289bffad1eSTheodore Ts'o __field( __u64, pa_lstart ) 5299bffad1eSTheodore Ts'o 5309bffad1eSTheodore Ts'o ), 5319bffad1eSTheodore Ts'o 5329bffad1eSTheodore Ts'o TP_fast_assign( 5330562e0baSJiaying Zhang __entry->dev = ac->ac_sb->s_dev; 5349bffad1eSTheodore Ts'o __entry->ino = ac->ac_inode->i_ino; 5359bffad1eSTheodore Ts'o __entry->pa_pstart = pa->pa_pstart; 5369bffad1eSTheodore Ts'o __entry->pa_len = pa->pa_len; 5379bffad1eSTheodore Ts'o __entry->pa_lstart = pa->pa_lstart; 5389bffad1eSTheodore Ts'o ), 5399bffad1eSTheodore Ts'o 540a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", 5410562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 5420562e0baSJiaying Zhang (unsigned long) __entry->ino, 5430562e0baSJiaying Zhang __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) 5449bffad1eSTheodore Ts'o ); 5459bffad1eSTheodore Ts'o 546f084db93SLi Zefan DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, 547f084db93SLi Zefan 5489bffad1eSTheodore Ts'o TP_PROTO(struct ext4_allocation_context *ac, 5499bffad1eSTheodore Ts'o struct ext4_prealloc_space *pa), 5509bffad1eSTheodore Ts'o 551f084db93SLi Zefan TP_ARGS(ac, pa) 552f084db93SLi Zefan ); 5539bffad1eSTheodore Ts'o 554f084db93SLi Zefan DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, 5559bffad1eSTheodore Ts'o 556f084db93SLi Zefan TP_PROTO(struct ext4_allocation_context *ac, 557f084db93SLi Zefan struct ext4_prealloc_space *pa), 5589bffad1eSTheodore Ts'o 559f084db93SLi Zefan TP_ARGS(ac, pa) 5609bffad1eSTheodore Ts'o ); 5619bffad1eSTheodore Ts'o 5629bffad1eSTheodore Ts'o TRACE_EVENT(ext4_mb_release_inode_pa, 563e5880d76STheodore Ts'o TP_PROTO(struct super_block *sb, 5643e1e5f50SEric Sandeen struct inode *inode, 5659bffad1eSTheodore Ts'o struct ext4_prealloc_space *pa, 5669bffad1eSTheodore Ts'o unsigned long long block, unsigned int count), 5679bffad1eSTheodore Ts'o 5683e1e5f50SEric Sandeen TP_ARGS(sb, inode, pa, block, count), 5699bffad1eSTheodore Ts'o 5709bffad1eSTheodore Ts'o TP_STRUCT__entry( 5710562e0baSJiaying Zhang __field( dev_t, dev ) 5729bffad1eSTheodore Ts'o __field( ino_t, ino ) 5739bffad1eSTheodore Ts'o __field( __u64, block ) 5749bffad1eSTheodore Ts'o __field( __u32, count ) 5759bffad1eSTheodore Ts'o 5769bffad1eSTheodore Ts'o ), 5779bffad1eSTheodore Ts'o 5789bffad1eSTheodore Ts'o TP_fast_assign( 5790562e0baSJiaying Zhang __entry->dev = sb->s_dev; 5803e1e5f50SEric Sandeen __entry->ino = inode->i_ino; 5819bffad1eSTheodore Ts'o __entry->block = block; 5829bffad1eSTheodore Ts'o __entry->count = count; 5839bffad1eSTheodore Ts'o ), 5849bffad1eSTheodore Ts'o 585a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu block %llu count %u", 5860562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 5870562e0baSJiaying Zhang (unsigned long) __entry->ino, 5880562e0baSJiaying Zhang __entry->block, __entry->count) 5899bffad1eSTheodore Ts'o ); 5909bffad1eSTheodore Ts'o 5919bffad1eSTheodore Ts'o TRACE_EVENT(ext4_mb_release_group_pa, 592e5880d76STheodore Ts'o TP_PROTO(struct super_block *sb, 5939bffad1eSTheodore Ts'o struct ext4_prealloc_space *pa), 5949bffad1eSTheodore Ts'o 5953e1e5f50SEric Sandeen TP_ARGS(sb, pa), 5969bffad1eSTheodore Ts'o 5979bffad1eSTheodore Ts'o TP_STRUCT__entry( 5980562e0baSJiaying Zhang __field( dev_t, dev ) 5999bffad1eSTheodore Ts'o __field( __u64, pa_pstart ) 6009bffad1eSTheodore Ts'o __field( __u32, pa_len ) 6019bffad1eSTheodore Ts'o 6029bffad1eSTheodore Ts'o ), 6039bffad1eSTheodore Ts'o 6049bffad1eSTheodore Ts'o TP_fast_assign( 6050562e0baSJiaying Zhang __entry->dev = sb->s_dev; 6069bffad1eSTheodore Ts'o __entry->pa_pstart = pa->pa_pstart; 6079bffad1eSTheodore Ts'o __entry->pa_len = pa->pa_len; 6089bffad1eSTheodore Ts'o ), 6099bffad1eSTheodore Ts'o 610a269029dSTheodore Ts'o TP_printk("dev %d,%d pstart %llu len %u", 6110562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 612a269029dSTheodore Ts'o __entry->pa_pstart, __entry->pa_len) 6139bffad1eSTheodore Ts'o ); 6149bffad1eSTheodore Ts'o 6159bffad1eSTheodore Ts'o TRACE_EVENT(ext4_discard_preallocations, 6169bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode), 6179bffad1eSTheodore Ts'o 6189bffad1eSTheodore Ts'o TP_ARGS(inode), 6199bffad1eSTheodore Ts'o 6209bffad1eSTheodore Ts'o TP_STRUCT__entry( 6210562e0baSJiaying Zhang __field( dev_t, dev ) 6229bffad1eSTheodore Ts'o __field( ino_t, ino ) 6239bffad1eSTheodore Ts'o 6249bffad1eSTheodore Ts'o ), 6259bffad1eSTheodore Ts'o 6269bffad1eSTheodore Ts'o TP_fast_assign( 6270562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 6289bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 6299bffad1eSTheodore Ts'o ), 6309bffad1eSTheodore Ts'o 631a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu", 6320562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 633a269029dSTheodore Ts'o (unsigned long) __entry->ino) 6349bffad1eSTheodore Ts'o ); 6359bffad1eSTheodore Ts'o 6369bffad1eSTheodore Ts'o TRACE_EVENT(ext4_mb_discard_preallocations, 6379bffad1eSTheodore Ts'o TP_PROTO(struct super_block *sb, int needed), 6389bffad1eSTheodore Ts'o 6399bffad1eSTheodore Ts'o TP_ARGS(sb, needed), 6409bffad1eSTheodore Ts'o 6419bffad1eSTheodore Ts'o TP_STRUCT__entry( 6420562e0baSJiaying Zhang __field( dev_t, dev ) 6439bffad1eSTheodore Ts'o __field( int, needed ) 6449bffad1eSTheodore Ts'o 6459bffad1eSTheodore Ts'o ), 6469bffad1eSTheodore Ts'o 6479bffad1eSTheodore Ts'o TP_fast_assign( 6480562e0baSJiaying Zhang __entry->dev = sb->s_dev; 6499bffad1eSTheodore Ts'o __entry->needed = needed; 6509bffad1eSTheodore Ts'o ), 6519bffad1eSTheodore Ts'o 652a269029dSTheodore Ts'o TP_printk("dev %d,%d needed %d", 6530562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 6540562e0baSJiaying Zhang __entry->needed) 6559bffad1eSTheodore Ts'o ); 6569bffad1eSTheodore Ts'o 6579bffad1eSTheodore Ts'o TRACE_EVENT(ext4_request_blocks, 6589bffad1eSTheodore Ts'o TP_PROTO(struct ext4_allocation_request *ar), 6599bffad1eSTheodore Ts'o 6609bffad1eSTheodore Ts'o TP_ARGS(ar), 6619bffad1eSTheodore Ts'o 6629bffad1eSTheodore Ts'o TP_STRUCT__entry( 6630562e0baSJiaying Zhang __field( dev_t, dev ) 6649bffad1eSTheodore Ts'o __field( ino_t, ino ) 6659bffad1eSTheodore Ts'o __field( unsigned int, flags ) 6669bffad1eSTheodore Ts'o __field( unsigned int, len ) 6679bffad1eSTheodore Ts'o __field( __u64, logical ) 6689bffad1eSTheodore Ts'o __field( __u64, goal ) 6699bffad1eSTheodore Ts'o __field( __u64, lleft ) 6709bffad1eSTheodore Ts'o __field( __u64, lright ) 6719bffad1eSTheodore Ts'o __field( __u64, pleft ) 6729bffad1eSTheodore Ts'o __field( __u64, pright ) 6739bffad1eSTheodore Ts'o ), 6749bffad1eSTheodore Ts'o 6759bffad1eSTheodore Ts'o TP_fast_assign( 6760562e0baSJiaying Zhang __entry->dev = ar->inode->i_sb->s_dev; 6779bffad1eSTheodore Ts'o __entry->ino = ar->inode->i_ino; 6789bffad1eSTheodore Ts'o __entry->flags = ar->flags; 6799bffad1eSTheodore Ts'o __entry->len = ar->len; 6809bffad1eSTheodore Ts'o __entry->logical = ar->logical; 6819bffad1eSTheodore Ts'o __entry->goal = ar->goal; 6829bffad1eSTheodore Ts'o __entry->lleft = ar->lleft; 6839bffad1eSTheodore Ts'o __entry->lright = ar->lright; 6849bffad1eSTheodore Ts'o __entry->pleft = ar->pleft; 6859bffad1eSTheodore Ts'o __entry->pright = ar->pright; 6869bffad1eSTheodore Ts'o ), 6879bffad1eSTheodore Ts'o 6880562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu flags %u len %u lblk %llu goal %llu " 6890562e0baSJiaying Zhang "lleft %llu lright %llu pleft %llu pright %llu ", 6900562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 691a269029dSTheodore Ts'o (unsigned long) __entry->ino, 692a3710fd1STheodore Ts'o __entry->flags, __entry->len, 6939bffad1eSTheodore Ts'o (unsigned long long) __entry->logical, 6949bffad1eSTheodore Ts'o (unsigned long long) __entry->goal, 6959bffad1eSTheodore Ts'o (unsigned long long) __entry->lleft, 6969bffad1eSTheodore Ts'o (unsigned long long) __entry->lright, 6979bffad1eSTheodore Ts'o (unsigned long long) __entry->pleft, 6989bffad1eSTheodore Ts'o (unsigned long long) __entry->pright) 6999bffad1eSTheodore Ts'o ); 7009bffad1eSTheodore Ts'o 7019bffad1eSTheodore Ts'o TRACE_EVENT(ext4_allocate_blocks, 7029bffad1eSTheodore Ts'o TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), 7039bffad1eSTheodore Ts'o 7049bffad1eSTheodore Ts'o TP_ARGS(ar, block), 7059bffad1eSTheodore Ts'o 7069bffad1eSTheodore Ts'o TP_STRUCT__entry( 7070562e0baSJiaying Zhang __field( dev_t, dev ) 7089bffad1eSTheodore Ts'o __field( ino_t, ino ) 7099bffad1eSTheodore Ts'o __field( __u64, block ) 7109bffad1eSTheodore Ts'o __field( unsigned int, flags ) 7119bffad1eSTheodore Ts'o __field( unsigned int, len ) 7129bffad1eSTheodore Ts'o __field( __u64, logical ) 7139bffad1eSTheodore Ts'o __field( __u64, goal ) 7149bffad1eSTheodore Ts'o __field( __u64, lleft ) 7159bffad1eSTheodore Ts'o __field( __u64, lright ) 7169bffad1eSTheodore Ts'o __field( __u64, pleft ) 7179bffad1eSTheodore Ts'o __field( __u64, pright ) 7189bffad1eSTheodore Ts'o ), 7199bffad1eSTheodore Ts'o 7209bffad1eSTheodore Ts'o TP_fast_assign( 7210562e0baSJiaying Zhang __entry->dev = ar->inode->i_sb->s_dev; 7229bffad1eSTheodore Ts'o __entry->ino = ar->inode->i_ino; 7239bffad1eSTheodore Ts'o __entry->block = block; 7249bffad1eSTheodore Ts'o __entry->flags = ar->flags; 7259bffad1eSTheodore Ts'o __entry->len = ar->len; 7269bffad1eSTheodore Ts'o __entry->logical = ar->logical; 7279bffad1eSTheodore Ts'o __entry->goal = ar->goal; 7289bffad1eSTheodore Ts'o __entry->lleft = ar->lleft; 7299bffad1eSTheodore Ts'o __entry->lright = ar->lright; 7309bffad1eSTheodore Ts'o __entry->pleft = ar->pleft; 7319bffad1eSTheodore Ts'o __entry->pright = ar->pright; 7329bffad1eSTheodore Ts'o ), 7339bffad1eSTheodore Ts'o 7340562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %llu " 7350562e0baSJiaying Zhang "goal %llu lleft %llu lright %llu pleft %llu pright %llu", 7360562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 7370562e0baSJiaying Zhang (unsigned long) __entry->ino, 7380562e0baSJiaying Zhang __entry->flags, __entry->len, __entry->block, 7399bffad1eSTheodore Ts'o (unsigned long long) __entry->logical, 7409bffad1eSTheodore Ts'o (unsigned long long) __entry->goal, 7419bffad1eSTheodore Ts'o (unsigned long long) __entry->lleft, 7429bffad1eSTheodore Ts'o (unsigned long long) __entry->lright, 7439bffad1eSTheodore Ts'o (unsigned long long) __entry->pleft, 7449bffad1eSTheodore Ts'o (unsigned long long) __entry->pright) 7459bffad1eSTheodore Ts'o ); 7469bffad1eSTheodore Ts'o 7479bffad1eSTheodore Ts'o TRACE_EVENT(ext4_free_blocks, 7489bffad1eSTheodore Ts'o TP_PROTO(struct inode *inode, __u64 block, unsigned long count, 749e6362609STheodore Ts'o int flags), 7509bffad1eSTheodore Ts'o 751e6362609STheodore Ts'o TP_ARGS(inode, block, count, flags), 7529bffad1eSTheodore Ts'o 7539bffad1eSTheodore Ts'o TP_STRUCT__entry( 7540562e0baSJiaying Zhang __field( dev_t, dev ) 7559bffad1eSTheodore Ts'o __field( ino_t, ino ) 756e6362609STheodore Ts'o __field( umode_t, mode ) 7579bffad1eSTheodore Ts'o __field( __u64, block ) 7589bffad1eSTheodore Ts'o __field( unsigned long, count ) 759e6362609STheodore Ts'o __field( int, flags ) 7609bffad1eSTheodore Ts'o ), 7619bffad1eSTheodore Ts'o 7629bffad1eSTheodore Ts'o TP_fast_assign( 7630562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 7649bffad1eSTheodore Ts'o __entry->ino = inode->i_ino; 765e6362609STheodore Ts'o __entry->mode = inode->i_mode; 7669bffad1eSTheodore Ts'o __entry->block = block; 7679bffad1eSTheodore Ts'o __entry->count = count; 768e6362609STheodore Ts'o __entry->flags = flags; 7699bffad1eSTheodore Ts'o ), 7709bffad1eSTheodore Ts'o 771a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", 7720562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 773a269029dSTheodore Ts'o (unsigned long) __entry->ino, 774e6362609STheodore Ts'o __entry->mode, __entry->block, __entry->count, 775e6362609STheodore Ts'o __entry->flags) 7769bffad1eSTheodore Ts'o ); 7779bffad1eSTheodore Ts'o 7780562e0baSJiaying Zhang TRACE_EVENT(ext4_sync_file_enter, 7797ea80859SChristoph Hellwig TP_PROTO(struct file *file, int datasync), 7809bffad1eSTheodore Ts'o 7817ea80859SChristoph Hellwig TP_ARGS(file, datasync), 7829bffad1eSTheodore Ts'o 7839bffad1eSTheodore Ts'o TP_STRUCT__entry( 7840562e0baSJiaying Zhang __field( dev_t, dev ) 7859bffad1eSTheodore Ts'o __field( ino_t, ino ) 7869bffad1eSTheodore Ts'o __field( ino_t, parent ) 7879bffad1eSTheodore Ts'o __field( int, datasync ) 7889bffad1eSTheodore Ts'o ), 7899bffad1eSTheodore Ts'o 7909bffad1eSTheodore Ts'o TP_fast_assign( 7917ea80859SChristoph Hellwig struct dentry *dentry = file->f_path.dentry; 7927ea80859SChristoph Hellwig 7930562e0baSJiaying Zhang __entry->dev = dentry->d_inode->i_sb->s_dev; 7949bffad1eSTheodore Ts'o __entry->ino = dentry->d_inode->i_ino; 7959bffad1eSTheodore Ts'o __entry->datasync = datasync; 7969bffad1eSTheodore Ts'o __entry->parent = dentry->d_parent->d_inode->i_ino; 7979bffad1eSTheodore Ts'o ), 7989bffad1eSTheodore Ts'o 799a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %ld parent %ld datasync %d ", 8000562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 801a269029dSTheodore Ts'o (unsigned long) __entry->ino, 802a3710fd1STheodore Ts'o (unsigned long) __entry->parent, __entry->datasync) 8039bffad1eSTheodore Ts'o ); 8049bffad1eSTheodore Ts'o 8050562e0baSJiaying Zhang TRACE_EVENT(ext4_sync_file_exit, 8060562e0baSJiaying Zhang TP_PROTO(struct inode *inode, int ret), 8070562e0baSJiaying Zhang 8080562e0baSJiaying Zhang TP_ARGS(inode, ret), 8090562e0baSJiaying Zhang 8100562e0baSJiaying Zhang TP_STRUCT__entry( 8110562e0baSJiaying Zhang __field( int, ret ) 8120562e0baSJiaying Zhang __field( ino_t, ino ) 8130562e0baSJiaying Zhang __field( dev_t, dev ) 8140562e0baSJiaying Zhang ), 8150562e0baSJiaying Zhang 8160562e0baSJiaying Zhang TP_fast_assign( 8170562e0baSJiaying Zhang __entry->ret = ret; 8180562e0baSJiaying Zhang __entry->ino = inode->i_ino; 8190562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 8200562e0baSJiaying Zhang ), 8210562e0baSJiaying Zhang 8220562e0baSJiaying Zhang TP_printk("dev %d,%d ino %ld ret %d", 8230562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 8240562e0baSJiaying Zhang (unsigned long) __entry->ino, 8250562e0baSJiaying Zhang __entry->ret) 8260562e0baSJiaying Zhang ); 8270562e0baSJiaying Zhang 8289bffad1eSTheodore Ts'o TRACE_EVENT(ext4_sync_fs, 8299bffad1eSTheodore Ts'o TP_PROTO(struct super_block *sb, int wait), 8309bffad1eSTheodore Ts'o 8319bffad1eSTheodore Ts'o TP_ARGS(sb, wait), 8329bffad1eSTheodore Ts'o 8339bffad1eSTheodore Ts'o TP_STRUCT__entry( 8340562e0baSJiaying Zhang __field( dev_t, dev ) 8359bffad1eSTheodore Ts'o __field( int, wait ) 8369bffad1eSTheodore Ts'o 8379bffad1eSTheodore Ts'o ), 8389bffad1eSTheodore Ts'o 8399bffad1eSTheodore Ts'o TP_fast_assign( 8400562e0baSJiaying Zhang __entry->dev = sb->s_dev; 8419bffad1eSTheodore Ts'o __entry->wait = wait; 8429bffad1eSTheodore Ts'o ), 8439bffad1eSTheodore Ts'o 8440562e0baSJiaying Zhang TP_printk("dev %d,%d wait %d", 8450562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 8460562e0baSJiaying Zhang __entry->wait) 8479bffad1eSTheodore Ts'o ); 8489bffad1eSTheodore Ts'o 849fb40ba0dSTheodore Ts'o TRACE_EVENT(ext4_alloc_da_blocks, 850fb40ba0dSTheodore Ts'o TP_PROTO(struct inode *inode), 851fb40ba0dSTheodore Ts'o 852fb40ba0dSTheodore Ts'o TP_ARGS(inode), 853fb40ba0dSTheodore Ts'o 854fb40ba0dSTheodore Ts'o TP_STRUCT__entry( 8550562e0baSJiaying Zhang __field( dev_t, dev ) 856fb40ba0dSTheodore Ts'o __field( ino_t, ino ) 857fb40ba0dSTheodore Ts'o __field( unsigned int, data_blocks ) 858fb40ba0dSTheodore Ts'o __field( unsigned int, meta_blocks ) 859fb40ba0dSTheodore Ts'o ), 860fb40ba0dSTheodore Ts'o 861fb40ba0dSTheodore Ts'o TP_fast_assign( 8620562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 863fb40ba0dSTheodore Ts'o __entry->ino = inode->i_ino; 864fb40ba0dSTheodore Ts'o __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 865fb40ba0dSTheodore Ts'o __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 866fb40ba0dSTheodore Ts'o ), 867fb40ba0dSTheodore Ts'o 868a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", 8690562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 870a269029dSTheodore Ts'o (unsigned long) __entry->ino, 871fb40ba0dSTheodore Ts'o __entry->data_blocks, __entry->meta_blocks) 872fb40ba0dSTheodore Ts'o ); 873fb40ba0dSTheodore Ts'o 874296c355cSTheodore Ts'o TRACE_EVENT(ext4_mballoc_alloc, 875296c355cSTheodore Ts'o TP_PROTO(struct ext4_allocation_context *ac), 876296c355cSTheodore Ts'o 877296c355cSTheodore Ts'o TP_ARGS(ac), 878296c355cSTheodore Ts'o 879296c355cSTheodore Ts'o TP_STRUCT__entry( 8800562e0baSJiaying Zhang __field( dev_t, dev ) 881296c355cSTheodore Ts'o __field( ino_t, ino ) 882296c355cSTheodore Ts'o __field( __u16, found ) 883296c355cSTheodore Ts'o __field( __u16, groups ) 884296c355cSTheodore Ts'o __field( __u16, buddy ) 885296c355cSTheodore Ts'o __field( __u16, flags ) 886296c355cSTheodore Ts'o __field( __u16, tail ) 887296c355cSTheodore Ts'o __field( __u8, cr ) 888296c355cSTheodore Ts'o __field( __u32, orig_logical ) 889296c355cSTheodore Ts'o __field( int, orig_start ) 890296c355cSTheodore Ts'o __field( __u32, orig_group ) 891296c355cSTheodore Ts'o __field( int, orig_len ) 892296c355cSTheodore Ts'o __field( __u32, goal_logical ) 893296c355cSTheodore Ts'o __field( int, goal_start ) 894296c355cSTheodore Ts'o __field( __u32, goal_group ) 895296c355cSTheodore Ts'o __field( int, goal_len ) 896296c355cSTheodore Ts'o __field( __u32, result_logical ) 897296c355cSTheodore Ts'o __field( int, result_start ) 898296c355cSTheodore Ts'o __field( __u32, result_group ) 899296c355cSTheodore Ts'o __field( int, result_len ) 900296c355cSTheodore Ts'o ), 901296c355cSTheodore Ts'o 902296c355cSTheodore Ts'o TP_fast_assign( 9030562e0baSJiaying Zhang __entry->dev = ac->ac_inode->i_sb->s_dev; 904296c355cSTheodore Ts'o __entry->ino = ac->ac_inode->i_ino; 905296c355cSTheodore Ts'o __entry->found = ac->ac_found; 906296c355cSTheodore Ts'o __entry->flags = ac->ac_flags; 907296c355cSTheodore Ts'o __entry->groups = ac->ac_groups_scanned; 908296c355cSTheodore Ts'o __entry->buddy = ac->ac_buddy; 909296c355cSTheodore Ts'o __entry->tail = ac->ac_tail; 910296c355cSTheodore Ts'o __entry->cr = ac->ac_criteria; 911296c355cSTheodore Ts'o __entry->orig_logical = ac->ac_o_ex.fe_logical; 912296c355cSTheodore Ts'o __entry->orig_start = ac->ac_o_ex.fe_start; 913296c355cSTheodore Ts'o __entry->orig_group = ac->ac_o_ex.fe_group; 914296c355cSTheodore Ts'o __entry->orig_len = ac->ac_o_ex.fe_len; 915296c355cSTheodore Ts'o __entry->goal_logical = ac->ac_g_ex.fe_logical; 916296c355cSTheodore Ts'o __entry->goal_start = ac->ac_g_ex.fe_start; 917296c355cSTheodore Ts'o __entry->goal_group = ac->ac_g_ex.fe_group; 918296c355cSTheodore Ts'o __entry->goal_len = ac->ac_g_ex.fe_len; 919296c355cSTheodore Ts'o __entry->result_logical = ac->ac_f_ex.fe_logical; 920296c355cSTheodore Ts'o __entry->result_start = ac->ac_f_ex.fe_start; 921296c355cSTheodore Ts'o __entry->result_group = ac->ac_f_ex.fe_group; 922296c355cSTheodore Ts'o __entry->result_len = ac->ac_f_ex.fe_len; 923296c355cSTheodore Ts'o ), 924296c355cSTheodore Ts'o 925a269029dSTheodore Ts'o TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " 926296c355cSTheodore Ts'o "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " 927296c355cSTheodore Ts'o "tail %u broken %u", 9280562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 929a269029dSTheodore Ts'o (unsigned long) __entry->ino, 930296c355cSTheodore Ts'o __entry->orig_group, __entry->orig_start, 931296c355cSTheodore Ts'o __entry->orig_len, __entry->orig_logical, 932296c355cSTheodore Ts'o __entry->goal_group, __entry->goal_start, 933296c355cSTheodore Ts'o __entry->goal_len, __entry->goal_logical, 934296c355cSTheodore Ts'o __entry->result_group, __entry->result_start, 935296c355cSTheodore Ts'o __entry->result_len, __entry->result_logical, 936296c355cSTheodore Ts'o __entry->found, __entry->groups, __entry->cr, 937296c355cSTheodore Ts'o __entry->flags, __entry->tail, 938296c355cSTheodore Ts'o __entry->buddy ? 1 << __entry->buddy : 0) 939296c355cSTheodore Ts'o ); 940296c355cSTheodore Ts'o 941296c355cSTheodore Ts'o TRACE_EVENT(ext4_mballoc_prealloc, 942296c355cSTheodore Ts'o TP_PROTO(struct ext4_allocation_context *ac), 943296c355cSTheodore Ts'o 944296c355cSTheodore Ts'o TP_ARGS(ac), 945296c355cSTheodore Ts'o 946296c355cSTheodore Ts'o TP_STRUCT__entry( 9470562e0baSJiaying Zhang __field( dev_t, dev ) 948296c355cSTheodore Ts'o __field( ino_t, ino ) 949296c355cSTheodore Ts'o __field( __u32, orig_logical ) 950296c355cSTheodore Ts'o __field( int, orig_start ) 951296c355cSTheodore Ts'o __field( __u32, orig_group ) 952296c355cSTheodore Ts'o __field( int, orig_len ) 953296c355cSTheodore Ts'o __field( __u32, result_logical ) 954296c355cSTheodore Ts'o __field( int, result_start ) 955296c355cSTheodore Ts'o __field( __u32, result_group ) 956296c355cSTheodore Ts'o __field( int, result_len ) 957296c355cSTheodore Ts'o ), 958296c355cSTheodore Ts'o 959296c355cSTheodore Ts'o TP_fast_assign( 9600562e0baSJiaying Zhang __entry->dev = ac->ac_inode->i_sb->s_dev; 961296c355cSTheodore Ts'o __entry->ino = ac->ac_inode->i_ino; 962296c355cSTheodore Ts'o __entry->orig_logical = ac->ac_o_ex.fe_logical; 963296c355cSTheodore Ts'o __entry->orig_start = ac->ac_o_ex.fe_start; 964296c355cSTheodore Ts'o __entry->orig_group = ac->ac_o_ex.fe_group; 965296c355cSTheodore Ts'o __entry->orig_len = ac->ac_o_ex.fe_len; 966296c355cSTheodore Ts'o __entry->result_logical = ac->ac_b_ex.fe_logical; 967296c355cSTheodore Ts'o __entry->result_start = ac->ac_b_ex.fe_start; 968296c355cSTheodore Ts'o __entry->result_group = ac->ac_b_ex.fe_group; 969296c355cSTheodore Ts'o __entry->result_len = ac->ac_b_ex.fe_len; 970296c355cSTheodore Ts'o ), 971296c355cSTheodore Ts'o 972a269029dSTheodore Ts'o TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", 9730562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 974a269029dSTheodore Ts'o (unsigned long) __entry->ino, 975296c355cSTheodore Ts'o __entry->orig_group, __entry->orig_start, 976296c355cSTheodore Ts'o __entry->orig_len, __entry->orig_logical, 977296c355cSTheodore Ts'o __entry->result_group, __entry->result_start, 978296c355cSTheodore Ts'o __entry->result_len, __entry->result_logical) 979296c355cSTheodore Ts'o ); 980296c355cSTheodore Ts'o 981f084db93SLi Zefan DECLARE_EVENT_CLASS(ext4__mballoc, 9823e1e5f50SEric Sandeen TP_PROTO(struct super_block *sb, 9833e1e5f50SEric Sandeen struct inode *inode, 9843e1e5f50SEric Sandeen ext4_group_t group, 9853e1e5f50SEric Sandeen ext4_grpblk_t start, 9863e1e5f50SEric Sandeen ext4_grpblk_t len), 987296c355cSTheodore Ts'o 9883e1e5f50SEric Sandeen TP_ARGS(sb, inode, group, start, len), 989296c355cSTheodore Ts'o 990296c355cSTheodore Ts'o TP_STRUCT__entry( 9910562e0baSJiaying Zhang __field( dev_t, dev ) 992296c355cSTheodore Ts'o __field( ino_t, ino ) 993296c355cSTheodore Ts'o __field( int, result_start ) 994296c355cSTheodore Ts'o __field( __u32, result_group ) 995296c355cSTheodore Ts'o __field( int, result_len ) 996296c355cSTheodore Ts'o ), 997296c355cSTheodore Ts'o 998296c355cSTheodore Ts'o TP_fast_assign( 9990562e0baSJiaying Zhang __entry->dev = sb->s_dev; 10003e1e5f50SEric Sandeen __entry->ino = inode ? inode->i_ino : 0; 10013e1e5f50SEric Sandeen __entry->result_start = start; 10023e1e5f50SEric Sandeen __entry->result_group = group; 10033e1e5f50SEric Sandeen __entry->result_len = len; 1004296c355cSTheodore Ts'o ), 1005296c355cSTheodore Ts'o 1006a269029dSTheodore Ts'o TP_printk("dev %d,%d inode %lu extent %u/%d/%u ", 10070562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1008a269029dSTheodore Ts'o (unsigned long) __entry->ino, 1009296c355cSTheodore Ts'o __entry->result_group, __entry->result_start, 10103e1e5f50SEric Sandeen __entry->result_len) 1011296c355cSTheodore Ts'o ); 1012296c355cSTheodore Ts'o 1013f084db93SLi Zefan DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, 1014f084db93SLi Zefan 10153e1e5f50SEric Sandeen TP_PROTO(struct super_block *sb, 10163e1e5f50SEric Sandeen struct inode *inode, 10173e1e5f50SEric Sandeen ext4_group_t group, 10183e1e5f50SEric Sandeen ext4_grpblk_t start, 10193e1e5f50SEric Sandeen ext4_grpblk_t len), 1020296c355cSTheodore Ts'o 10213e1e5f50SEric Sandeen TP_ARGS(sb, inode, group, start, len) 1022f084db93SLi Zefan ); 1023296c355cSTheodore Ts'o 1024f084db93SLi Zefan DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, 1025296c355cSTheodore Ts'o 10263e1e5f50SEric Sandeen TP_PROTO(struct super_block *sb, 10273e1e5f50SEric Sandeen struct inode *inode, 10283e1e5f50SEric Sandeen ext4_group_t group, 10293e1e5f50SEric Sandeen ext4_grpblk_t start, 10303e1e5f50SEric Sandeen ext4_grpblk_t len), 1031296c355cSTheodore Ts'o 10323e1e5f50SEric Sandeen TP_ARGS(sb, inode, group, start, len) 1033296c355cSTheodore Ts'o ); 1034296c355cSTheodore Ts'o 1035beac2da7STheodore Ts'o TRACE_EVENT(ext4_forget, 1036beac2da7STheodore Ts'o TP_PROTO(struct inode *inode, int is_metadata, __u64 block), 1037beac2da7STheodore Ts'o 1038beac2da7STheodore Ts'o TP_ARGS(inode, is_metadata, block), 1039beac2da7STheodore Ts'o 1040beac2da7STheodore Ts'o TP_STRUCT__entry( 10410562e0baSJiaying Zhang __field( dev_t, dev ) 1042beac2da7STheodore Ts'o __field( ino_t, ino ) 1043beac2da7STheodore Ts'o __field( umode_t, mode ) 1044beac2da7STheodore Ts'o __field( int, is_metadata ) 1045beac2da7STheodore Ts'o __field( __u64, block ) 1046beac2da7STheodore Ts'o ), 1047beac2da7STheodore Ts'o 1048beac2da7STheodore Ts'o TP_fast_assign( 10490562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1050beac2da7STheodore Ts'o __entry->ino = inode->i_ino; 1051beac2da7STheodore Ts'o __entry->mode = inode->i_mode; 1052beac2da7STheodore Ts'o __entry->is_metadata = is_metadata; 1053beac2da7STheodore Ts'o __entry->block = block; 1054beac2da7STheodore Ts'o ), 1055beac2da7STheodore Ts'o 1056a269029dSTheodore Ts'o TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", 10570562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 10580562e0baSJiaying Zhang (unsigned long) __entry->ino, 10590562e0baSJiaying Zhang __entry->mode, __entry->is_metadata, __entry->block) 1060beac2da7STheodore Ts'o ); 1061beac2da7STheodore Ts'o 1062f8ec9d68STheodore Ts'o TRACE_EVENT(ext4_da_update_reserve_space, 1063f8ec9d68STheodore Ts'o TP_PROTO(struct inode *inode, int used_blocks), 1064f8ec9d68STheodore Ts'o 1065f8ec9d68STheodore Ts'o TP_ARGS(inode, used_blocks), 1066f8ec9d68STheodore Ts'o 1067f8ec9d68STheodore Ts'o TP_STRUCT__entry( 10680562e0baSJiaying Zhang __field( dev_t, dev ) 1069f8ec9d68STheodore Ts'o __field( ino_t, ino ) 1070f8ec9d68STheodore Ts'o __field( umode_t, mode ) 1071f8ec9d68STheodore Ts'o __field( __u64, i_blocks ) 1072f8ec9d68STheodore Ts'o __field( int, used_blocks ) 1073f8ec9d68STheodore Ts'o __field( int, reserved_data_blocks ) 1074f8ec9d68STheodore Ts'o __field( int, reserved_meta_blocks ) 1075f8ec9d68STheodore Ts'o __field( int, allocated_meta_blocks ) 1076f8ec9d68STheodore Ts'o ), 1077f8ec9d68STheodore Ts'o 1078f8ec9d68STheodore Ts'o TP_fast_assign( 10790562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1080f8ec9d68STheodore Ts'o __entry->ino = inode->i_ino; 1081f8ec9d68STheodore Ts'o __entry->mode = inode->i_mode; 1082f8ec9d68STheodore Ts'o __entry->i_blocks = inode->i_blocks; 1083f8ec9d68STheodore Ts'o __entry->used_blocks = used_blocks; 1084f8ec9d68STheodore Ts'o __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 1085f8ec9d68STheodore Ts'o __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 1086f8ec9d68STheodore Ts'o __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1087f8ec9d68STheodore Ts'o ), 1088f8ec9d68STheodore Ts'o 10890562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " 10900562e0baSJiaying Zhang "reserved_data_blocks %d reserved_meta_blocks %d " 10910562e0baSJiaying Zhang "allocated_meta_blocks %d", 10920562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 10930562e0baSJiaying Zhang (unsigned long) __entry->ino, 10940562e0baSJiaying Zhang __entry->mode, (unsigned long long) __entry->i_blocks, 1095f8ec9d68STheodore Ts'o __entry->used_blocks, __entry->reserved_data_blocks, 1096f8ec9d68STheodore Ts'o __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1097f8ec9d68STheodore Ts'o ); 1098f8ec9d68STheodore Ts'o 1099f8ec9d68STheodore Ts'o TRACE_EVENT(ext4_da_reserve_space, 1100f8ec9d68STheodore Ts'o TP_PROTO(struct inode *inode, int md_needed), 1101f8ec9d68STheodore Ts'o 1102f8ec9d68STheodore Ts'o TP_ARGS(inode, md_needed), 1103f8ec9d68STheodore Ts'o 1104f8ec9d68STheodore Ts'o TP_STRUCT__entry( 11050562e0baSJiaying Zhang __field( dev_t, dev ) 1106f8ec9d68STheodore Ts'o __field( ino_t, ino ) 1107f8ec9d68STheodore Ts'o __field( umode_t, mode ) 1108f8ec9d68STheodore Ts'o __field( __u64, i_blocks ) 1109f8ec9d68STheodore Ts'o __field( int, md_needed ) 1110f8ec9d68STheodore Ts'o __field( int, reserved_data_blocks ) 1111f8ec9d68STheodore Ts'o __field( int, reserved_meta_blocks ) 1112f8ec9d68STheodore Ts'o ), 1113f8ec9d68STheodore Ts'o 1114f8ec9d68STheodore Ts'o TP_fast_assign( 11150562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1116f8ec9d68STheodore Ts'o __entry->ino = inode->i_ino; 1117f8ec9d68STheodore Ts'o __entry->mode = inode->i_mode; 1118f8ec9d68STheodore Ts'o __entry->i_blocks = inode->i_blocks; 1119f8ec9d68STheodore Ts'o __entry->md_needed = md_needed; 1120f8ec9d68STheodore Ts'o __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 1121f8ec9d68STheodore Ts'o __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 1122f8ec9d68STheodore Ts'o ), 1123f8ec9d68STheodore Ts'o 11240562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " 11250562e0baSJiaying Zhang "reserved_data_blocks %d reserved_meta_blocks %d", 11260562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1127a269029dSTheodore Ts'o (unsigned long) __entry->ino, 1128f8ec9d68STheodore Ts'o __entry->mode, (unsigned long long) __entry->i_blocks, 1129f8ec9d68STheodore Ts'o __entry->md_needed, __entry->reserved_data_blocks, 1130f8ec9d68STheodore Ts'o __entry->reserved_meta_blocks) 1131f8ec9d68STheodore Ts'o ); 1132f8ec9d68STheodore Ts'o 1133f8ec9d68STheodore Ts'o TRACE_EVENT(ext4_da_release_space, 1134f8ec9d68STheodore Ts'o TP_PROTO(struct inode *inode, int freed_blocks), 1135f8ec9d68STheodore Ts'o 1136f8ec9d68STheodore Ts'o TP_ARGS(inode, freed_blocks), 1137f8ec9d68STheodore Ts'o 1138f8ec9d68STheodore Ts'o TP_STRUCT__entry( 11390562e0baSJiaying Zhang __field( dev_t, dev ) 1140f8ec9d68STheodore Ts'o __field( ino_t, ino ) 1141f8ec9d68STheodore Ts'o __field( umode_t, mode ) 1142f8ec9d68STheodore Ts'o __field( __u64, i_blocks ) 1143f8ec9d68STheodore Ts'o __field( int, freed_blocks ) 1144f8ec9d68STheodore Ts'o __field( int, reserved_data_blocks ) 1145f8ec9d68STheodore Ts'o __field( int, reserved_meta_blocks ) 1146f8ec9d68STheodore Ts'o __field( int, allocated_meta_blocks ) 1147f8ec9d68STheodore Ts'o ), 1148f8ec9d68STheodore Ts'o 1149f8ec9d68STheodore Ts'o TP_fast_assign( 11500562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 1151f8ec9d68STheodore Ts'o __entry->ino = inode->i_ino; 1152f8ec9d68STheodore Ts'o __entry->mode = inode->i_mode; 1153f8ec9d68STheodore Ts'o __entry->i_blocks = inode->i_blocks; 1154f8ec9d68STheodore Ts'o __entry->freed_blocks = freed_blocks; 1155f8ec9d68STheodore Ts'o __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; 1156f8ec9d68STheodore Ts'o __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; 1157f8ec9d68STheodore Ts'o __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; 1158f8ec9d68STheodore Ts'o ), 1159f8ec9d68STheodore Ts'o 11600562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " 11610562e0baSJiaying Zhang "reserved_data_blocks %d reserved_meta_blocks %d " 11620562e0baSJiaying Zhang "allocated_meta_blocks %d", 11630562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 1164a269029dSTheodore Ts'o (unsigned long) __entry->ino, 1165f8ec9d68STheodore Ts'o __entry->mode, (unsigned long long) __entry->i_blocks, 1166f8ec9d68STheodore Ts'o __entry->freed_blocks, __entry->reserved_data_blocks, 1167f8ec9d68STheodore Ts'o __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) 1168f8ec9d68STheodore Ts'o ); 1169f8ec9d68STheodore Ts'o 1170f307333eSTheodore Ts'o DECLARE_EVENT_CLASS(ext4__bitmap_load, 1171f307333eSTheodore Ts'o TP_PROTO(struct super_block *sb, unsigned long group), 1172f307333eSTheodore Ts'o 1173f307333eSTheodore Ts'o TP_ARGS(sb, group), 1174f307333eSTheodore Ts'o 1175f307333eSTheodore Ts'o TP_STRUCT__entry( 11760562e0baSJiaying Zhang __field( dev_t, dev ) 1177f307333eSTheodore Ts'o __field( __u32, group ) 1178f307333eSTheodore Ts'o 1179f307333eSTheodore Ts'o ), 1180f307333eSTheodore Ts'o 1181f307333eSTheodore Ts'o TP_fast_assign( 11820562e0baSJiaying Zhang __entry->dev = sb->s_dev; 1183f307333eSTheodore Ts'o __entry->group = group; 1184f307333eSTheodore Ts'o ), 1185f307333eSTheodore Ts'o 1186a269029dSTheodore Ts'o TP_printk("dev %d,%d group %u", 11870562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 11880562e0baSJiaying Zhang __entry->group) 1189f307333eSTheodore Ts'o ); 1190f307333eSTheodore Ts'o 1191f307333eSTheodore Ts'o DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, 1192f307333eSTheodore Ts'o 1193f307333eSTheodore Ts'o TP_PROTO(struct super_block *sb, unsigned long group), 1194f307333eSTheodore Ts'o 1195f307333eSTheodore Ts'o TP_ARGS(sb, group) 1196f307333eSTheodore Ts'o ); 1197f307333eSTheodore Ts'o 1198f307333eSTheodore Ts'o DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, 1199f307333eSTheodore Ts'o 1200f307333eSTheodore Ts'o TP_PROTO(struct super_block *sb, unsigned long group), 1201f307333eSTheodore Ts'o 1202f307333eSTheodore Ts'o TP_ARGS(sb, group) 1203f307333eSTheodore Ts'o ); 1204f8ec9d68STheodore Ts'o 12050562e0baSJiaying Zhang DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, 12060562e0baSJiaying Zhang 12070562e0baSJiaying Zhang TP_PROTO(struct super_block *sb, unsigned long group), 12080562e0baSJiaying Zhang 12090562e0baSJiaying Zhang TP_ARGS(sb, group) 12100562e0baSJiaying Zhang ); 12110562e0baSJiaying Zhang 12120562e0baSJiaying Zhang DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, 12130562e0baSJiaying Zhang 12140562e0baSJiaying Zhang TP_PROTO(struct super_block *sb, unsigned long group), 12150562e0baSJiaying Zhang 12160562e0baSJiaying Zhang TP_ARGS(sb, group) 12170562e0baSJiaying Zhang ); 12180562e0baSJiaying Zhang 12190562e0baSJiaying Zhang TRACE_EVENT(ext4_direct_IO_enter, 12200562e0baSJiaying Zhang TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), 12210562e0baSJiaying Zhang 12220562e0baSJiaying Zhang TP_ARGS(inode, offset, len, rw), 12230562e0baSJiaying Zhang 12240562e0baSJiaying Zhang TP_STRUCT__entry( 12250562e0baSJiaying Zhang __field( ino_t, ino ) 12260562e0baSJiaying Zhang __field( dev_t, dev ) 12270562e0baSJiaying Zhang __field( loff_t, pos ) 12280562e0baSJiaying Zhang __field( unsigned long, len ) 12290562e0baSJiaying Zhang __field( int, rw ) 12300562e0baSJiaying Zhang ), 12310562e0baSJiaying Zhang 12320562e0baSJiaying Zhang TP_fast_assign( 12330562e0baSJiaying Zhang __entry->ino = inode->i_ino; 12340562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 12350562e0baSJiaying Zhang __entry->pos = offset; 12360562e0baSJiaying Zhang __entry->len = len; 12370562e0baSJiaying Zhang __entry->rw = rw; 12380562e0baSJiaying Zhang ), 12390562e0baSJiaying Zhang 12400562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d", 12410562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 12420562e0baSJiaying Zhang (unsigned long) __entry->ino, 12430562e0baSJiaying Zhang (unsigned long long) __entry->pos, __entry->len, __entry->rw) 12440562e0baSJiaying Zhang ); 12450562e0baSJiaying Zhang 12460562e0baSJiaying Zhang TRACE_EVENT(ext4_direct_IO_exit, 12470562e0baSJiaying Zhang TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw, int ret), 12480562e0baSJiaying Zhang 12490562e0baSJiaying Zhang TP_ARGS(inode, offset, len, rw, ret), 12500562e0baSJiaying Zhang 12510562e0baSJiaying Zhang TP_STRUCT__entry( 12520562e0baSJiaying Zhang __field( ino_t, ino ) 12530562e0baSJiaying Zhang __field( dev_t, dev ) 12540562e0baSJiaying Zhang __field( loff_t, pos ) 12550562e0baSJiaying Zhang __field( unsigned long, len ) 12560562e0baSJiaying Zhang __field( int, rw ) 12570562e0baSJiaying Zhang __field( int, ret ) 12580562e0baSJiaying Zhang ), 12590562e0baSJiaying Zhang 12600562e0baSJiaying Zhang TP_fast_assign( 12610562e0baSJiaying Zhang __entry->ino = inode->i_ino; 12620562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 12630562e0baSJiaying Zhang __entry->pos = offset; 12640562e0baSJiaying Zhang __entry->len = len; 12650562e0baSJiaying Zhang __entry->rw = rw; 12660562e0baSJiaying Zhang __entry->ret = ret; 12670562e0baSJiaying Zhang ), 12680562e0baSJiaying Zhang 12690562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d", 12700562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 12710562e0baSJiaying Zhang (unsigned long) __entry->ino, 12720562e0baSJiaying Zhang (unsigned long long) __entry->pos, __entry->len, 12730562e0baSJiaying Zhang __entry->rw, __entry->ret) 12740562e0baSJiaying Zhang ); 12750562e0baSJiaying Zhang 12760562e0baSJiaying Zhang TRACE_EVENT(ext4_fallocate_enter, 12770562e0baSJiaying Zhang TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), 12780562e0baSJiaying Zhang 12790562e0baSJiaying Zhang TP_ARGS(inode, offset, len, mode), 12800562e0baSJiaying Zhang 12810562e0baSJiaying Zhang TP_STRUCT__entry( 12820562e0baSJiaying Zhang __field( ino_t, ino ) 12830562e0baSJiaying Zhang __field( dev_t, dev ) 12840562e0baSJiaying Zhang __field( loff_t, pos ) 12850562e0baSJiaying Zhang __field( loff_t, len ) 12860562e0baSJiaying Zhang __field( int, mode ) 12870562e0baSJiaying Zhang ), 12880562e0baSJiaying Zhang 12890562e0baSJiaying Zhang TP_fast_assign( 12900562e0baSJiaying Zhang __entry->ino = inode->i_ino; 12910562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 12920562e0baSJiaying Zhang __entry->pos = offset; 12930562e0baSJiaying Zhang __entry->len = len; 12940562e0baSJiaying Zhang __entry->mode = mode; 12950562e0baSJiaying Zhang ), 12960562e0baSJiaying Zhang 12970562e0baSJiaying Zhang TP_printk("dev %d,%d ino %ld pos %llu len %llu mode %d", 12980562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 12990562e0baSJiaying Zhang (unsigned long) __entry->ino, 13000562e0baSJiaying Zhang (unsigned long long) __entry->pos, 13010562e0baSJiaying Zhang (unsigned long long) __entry->len, __entry->mode) 13020562e0baSJiaying Zhang ); 13030562e0baSJiaying Zhang 13040562e0baSJiaying Zhang TRACE_EVENT(ext4_fallocate_exit, 13050562e0baSJiaying Zhang TP_PROTO(struct inode *inode, loff_t offset, unsigned int max_blocks, int ret), 13060562e0baSJiaying Zhang 13070562e0baSJiaying Zhang TP_ARGS(inode, offset, max_blocks, ret), 13080562e0baSJiaying Zhang 13090562e0baSJiaying Zhang TP_STRUCT__entry( 13100562e0baSJiaying Zhang __field( ino_t, ino ) 13110562e0baSJiaying Zhang __field( dev_t, dev ) 13120562e0baSJiaying Zhang __field( loff_t, pos ) 13130562e0baSJiaying Zhang __field( unsigned, blocks ) 13140562e0baSJiaying Zhang __field( int, ret ) 13150562e0baSJiaying Zhang ), 13160562e0baSJiaying Zhang 13170562e0baSJiaying Zhang TP_fast_assign( 13180562e0baSJiaying Zhang __entry->ino = inode->i_ino; 13190562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 13200562e0baSJiaying Zhang __entry->pos = offset; 13210562e0baSJiaying Zhang __entry->blocks = max_blocks; 13220562e0baSJiaying Zhang __entry->ret = ret; 13230562e0baSJiaying Zhang ), 13240562e0baSJiaying Zhang 13250562e0baSJiaying Zhang TP_printk("dev %d,%d ino %ld pos %llu blocks %d ret %d", 13260562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 13270562e0baSJiaying Zhang (unsigned long) __entry->ino, 13280562e0baSJiaying Zhang (unsigned long long) __entry->pos, __entry->blocks, 13290562e0baSJiaying Zhang __entry->ret) 13300562e0baSJiaying Zhang ); 13310562e0baSJiaying Zhang 13320562e0baSJiaying Zhang TRACE_EVENT(ext4_unlink_enter, 13330562e0baSJiaying Zhang TP_PROTO(struct inode *parent, struct dentry *dentry), 13340562e0baSJiaying Zhang 13350562e0baSJiaying Zhang TP_ARGS(parent, dentry), 13360562e0baSJiaying Zhang 13370562e0baSJiaying Zhang TP_STRUCT__entry( 13380562e0baSJiaying Zhang __field( ino_t, parent ) 13390562e0baSJiaying Zhang __field( ino_t, ino ) 13400562e0baSJiaying Zhang __field( loff_t, size ) 13410562e0baSJiaying Zhang __field( dev_t, dev ) 13420562e0baSJiaying Zhang ), 13430562e0baSJiaying Zhang 13440562e0baSJiaying Zhang TP_fast_assign( 13450562e0baSJiaying Zhang __entry->parent = parent->i_ino; 13460562e0baSJiaying Zhang __entry->ino = dentry->d_inode->i_ino; 13470562e0baSJiaying Zhang __entry->size = dentry->d_inode->i_size; 13480562e0baSJiaying Zhang __entry->dev = dentry->d_inode->i_sb->s_dev; 13490562e0baSJiaying Zhang ), 13500562e0baSJiaying Zhang 13510562e0baSJiaying Zhang TP_printk("dev %d,%d ino %ld size %lld parent %ld", 13520562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 13530562e0baSJiaying Zhang (unsigned long) __entry->ino, __entry->size, 13540562e0baSJiaying Zhang (unsigned long) __entry->parent) 13550562e0baSJiaying Zhang ); 13560562e0baSJiaying Zhang 13570562e0baSJiaying Zhang TRACE_EVENT(ext4_unlink_exit, 13580562e0baSJiaying Zhang TP_PROTO(struct dentry *dentry, int ret), 13590562e0baSJiaying Zhang 13600562e0baSJiaying Zhang TP_ARGS(dentry, ret), 13610562e0baSJiaying Zhang 13620562e0baSJiaying Zhang TP_STRUCT__entry( 13630562e0baSJiaying Zhang __field( ino_t, ino ) 13640562e0baSJiaying Zhang __field( dev_t, dev ) 13650562e0baSJiaying Zhang __field( int, ret ) 13660562e0baSJiaying Zhang ), 13670562e0baSJiaying Zhang 13680562e0baSJiaying Zhang TP_fast_assign( 13690562e0baSJiaying Zhang __entry->ino = dentry->d_inode->i_ino; 13700562e0baSJiaying Zhang __entry->dev = dentry->d_inode->i_sb->s_dev; 13710562e0baSJiaying Zhang __entry->ret = ret; 13720562e0baSJiaying Zhang ), 13730562e0baSJiaying Zhang 13740562e0baSJiaying Zhang TP_printk("dev %d,%d ino %ld ret %d", 13750562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 13760562e0baSJiaying Zhang (unsigned long) __entry->ino, 13770562e0baSJiaying Zhang __entry->ret) 13780562e0baSJiaying Zhang ); 13790562e0baSJiaying Zhang 13800562e0baSJiaying Zhang DECLARE_EVENT_CLASS(ext4__truncate, 13810562e0baSJiaying Zhang TP_PROTO(struct inode *inode), 13820562e0baSJiaying Zhang 13830562e0baSJiaying Zhang TP_ARGS(inode), 13840562e0baSJiaying Zhang 13850562e0baSJiaying Zhang TP_STRUCT__entry( 13860562e0baSJiaying Zhang __field( ino_t, ino ) 13870562e0baSJiaying Zhang __field( dev_t, dev ) 13880562e0baSJiaying Zhang __field( blkcnt_t, blocks ) 13890562e0baSJiaying Zhang ), 13900562e0baSJiaying Zhang 13910562e0baSJiaying Zhang TP_fast_assign( 13920562e0baSJiaying Zhang __entry->ino = inode->i_ino; 13930562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 13940562e0baSJiaying Zhang __entry->blocks = inode->i_blocks; 13950562e0baSJiaying Zhang ), 13960562e0baSJiaying Zhang 13970562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu blocks %lu", 13980562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 13990562e0baSJiaying Zhang (unsigned long) __entry->ino, (unsigned long) __entry->blocks) 14000562e0baSJiaying Zhang ); 14010562e0baSJiaying Zhang 14020562e0baSJiaying Zhang DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, 14030562e0baSJiaying Zhang 14040562e0baSJiaying Zhang TP_PROTO(struct inode *inode), 14050562e0baSJiaying Zhang 14060562e0baSJiaying Zhang TP_ARGS(inode) 14070562e0baSJiaying Zhang ); 14080562e0baSJiaying Zhang 14090562e0baSJiaying Zhang DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, 14100562e0baSJiaying Zhang 14110562e0baSJiaying Zhang TP_PROTO(struct inode *inode), 14120562e0baSJiaying Zhang 14130562e0baSJiaying Zhang TP_ARGS(inode) 14140562e0baSJiaying Zhang ); 14150562e0baSJiaying Zhang 14160562e0baSJiaying Zhang DECLARE_EVENT_CLASS(ext4__map_blocks_enter, 14170562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 14180562e0baSJiaying Zhang unsigned len, unsigned flags), 14190562e0baSJiaying Zhang 14200562e0baSJiaying Zhang TP_ARGS(inode, lblk, len, flags), 14210562e0baSJiaying Zhang 14220562e0baSJiaying Zhang TP_STRUCT__entry( 14230562e0baSJiaying Zhang __field( ino_t, ino ) 14240562e0baSJiaying Zhang __field( dev_t, dev ) 14250562e0baSJiaying Zhang __field( ext4_lblk_t, lblk ) 14260562e0baSJiaying Zhang __field( unsigned, len ) 14270562e0baSJiaying Zhang __field( unsigned, flags ) 14280562e0baSJiaying Zhang ), 14290562e0baSJiaying Zhang 14300562e0baSJiaying Zhang TP_fast_assign( 14310562e0baSJiaying Zhang __entry->ino = inode->i_ino; 14320562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 14330562e0baSJiaying Zhang __entry->lblk = lblk; 14340562e0baSJiaying Zhang __entry->len = len; 14350562e0baSJiaying Zhang __entry->flags = flags; 14360562e0baSJiaying Zhang ), 14370562e0baSJiaying Zhang 14380562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", 14390562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 14400562e0baSJiaying Zhang (unsigned long) __entry->ino, 14410562e0baSJiaying Zhang (unsigned) __entry->lblk, __entry->len, __entry->flags) 14420562e0baSJiaying Zhang ); 14430562e0baSJiaying Zhang 14440562e0baSJiaying Zhang DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, 14450562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 14460562e0baSJiaying Zhang unsigned len, unsigned flags), 14470562e0baSJiaying Zhang 14480562e0baSJiaying Zhang TP_ARGS(inode, lblk, len, flags) 14490562e0baSJiaying Zhang ); 14500562e0baSJiaying Zhang 14510562e0baSJiaying Zhang DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, 14520562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 14530562e0baSJiaying Zhang unsigned len, unsigned flags), 14540562e0baSJiaying Zhang 14550562e0baSJiaying Zhang TP_ARGS(inode, lblk, len, flags) 14560562e0baSJiaying Zhang ); 14570562e0baSJiaying Zhang 14580562e0baSJiaying Zhang DECLARE_EVENT_CLASS(ext4__map_blocks_exit, 14590562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 14600562e0baSJiaying Zhang ext4_fsblk_t pblk, unsigned len, int ret), 14610562e0baSJiaying Zhang 14620562e0baSJiaying Zhang TP_ARGS(inode, lblk, pblk, len, ret), 14630562e0baSJiaying Zhang 14640562e0baSJiaying Zhang TP_STRUCT__entry( 14650562e0baSJiaying Zhang __field( ino_t, ino ) 14660562e0baSJiaying Zhang __field( dev_t, dev ) 14670562e0baSJiaying Zhang __field( ext4_lblk_t, lblk ) 14680562e0baSJiaying Zhang __field( ext4_fsblk_t, pblk ) 14690562e0baSJiaying Zhang __field( unsigned, len ) 14700562e0baSJiaying Zhang __field( int, ret ) 14710562e0baSJiaying Zhang ), 14720562e0baSJiaying Zhang 14730562e0baSJiaying Zhang TP_fast_assign( 14740562e0baSJiaying Zhang __entry->ino = inode->i_ino; 14750562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 14760562e0baSJiaying Zhang __entry->lblk = lblk; 14770562e0baSJiaying Zhang __entry->pblk = pblk; 14780562e0baSJiaying Zhang __entry->len = len; 14790562e0baSJiaying Zhang __entry->ret = ret; 14800562e0baSJiaying Zhang ), 14810562e0baSJiaying Zhang 14820562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", 14830562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 14840562e0baSJiaying Zhang (unsigned long) __entry->ino, 14850562e0baSJiaying Zhang (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, 14860562e0baSJiaying Zhang __entry->len, __entry->ret) 14870562e0baSJiaying Zhang ); 14880562e0baSJiaying Zhang 14890562e0baSJiaying Zhang DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, 14900562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 14910562e0baSJiaying Zhang ext4_fsblk_t pblk, unsigned len, int ret), 14920562e0baSJiaying Zhang 14930562e0baSJiaying Zhang TP_ARGS(inode, lblk, pblk, len, ret) 14940562e0baSJiaying Zhang ); 14950562e0baSJiaying Zhang 14960562e0baSJiaying Zhang DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, 14970562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, 14980562e0baSJiaying Zhang ext4_fsblk_t pblk, unsigned len, int ret), 14990562e0baSJiaying Zhang 15000562e0baSJiaying Zhang TP_ARGS(inode, lblk, pblk, len, ret) 15010562e0baSJiaying Zhang ); 15020562e0baSJiaying Zhang 15030562e0baSJiaying Zhang TRACE_EVENT(ext4_ext_load_extent, 15040562e0baSJiaying Zhang TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), 15050562e0baSJiaying Zhang 15060562e0baSJiaying Zhang TP_ARGS(inode, lblk, pblk), 15070562e0baSJiaying Zhang 15080562e0baSJiaying Zhang TP_STRUCT__entry( 15090562e0baSJiaying Zhang __field( ino_t, ino ) 15100562e0baSJiaying Zhang __field( dev_t, dev ) 15110562e0baSJiaying Zhang __field( ext4_lblk_t, lblk ) 15120562e0baSJiaying Zhang __field( ext4_fsblk_t, pblk ) 15130562e0baSJiaying Zhang ), 15140562e0baSJiaying Zhang 15150562e0baSJiaying Zhang TP_fast_assign( 15160562e0baSJiaying Zhang __entry->ino = inode->i_ino; 15170562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 15180562e0baSJiaying Zhang __entry->lblk = lblk; 15190562e0baSJiaying Zhang __entry->pblk = pblk; 15200562e0baSJiaying Zhang ), 15210562e0baSJiaying Zhang 15220562e0baSJiaying Zhang TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", 15230562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 15240562e0baSJiaying Zhang (unsigned long) __entry->ino, 15250562e0baSJiaying Zhang (unsigned) __entry->lblk, (unsigned long long) __entry->pblk) 15260562e0baSJiaying Zhang ); 15270562e0baSJiaying Zhang 15280562e0baSJiaying Zhang TRACE_EVENT(ext4_load_inode, 15290562e0baSJiaying Zhang TP_PROTO(struct inode *inode), 15300562e0baSJiaying Zhang 15310562e0baSJiaying Zhang TP_ARGS(inode), 15320562e0baSJiaying Zhang 15330562e0baSJiaying Zhang TP_STRUCT__entry( 15340562e0baSJiaying Zhang __field( ino_t, ino ) 15350562e0baSJiaying Zhang __field( dev_t, dev ) 15360562e0baSJiaying Zhang ), 15370562e0baSJiaying Zhang 15380562e0baSJiaying Zhang TP_fast_assign( 15390562e0baSJiaying Zhang __entry->ino = inode->i_ino; 15400562e0baSJiaying Zhang __entry->dev = inode->i_sb->s_dev; 15410562e0baSJiaying Zhang ), 15420562e0baSJiaying Zhang 15430562e0baSJiaying Zhang TP_printk("dev %d,%d ino %ld", 15440562e0baSJiaying Zhang MAJOR(__entry->dev), MINOR(__entry->dev), 15450562e0baSJiaying Zhang (unsigned long) __entry->ino) 15460562e0baSJiaying Zhang ); 15470562e0baSJiaying Zhang 15489bffad1eSTheodore Ts'o #endif /* _TRACE_EXT4_H */ 15499bffad1eSTheodore Ts'o 15509bffad1eSTheodore Ts'o /* This part must be outside protection */ 15519bffad1eSTheodore Ts'o #include <trace/define_trace.h> 1552