Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM ext4 |
| 3 | |
Li Zefan | d0b6e04 | 2009-07-13 10:33:21 +0800 | [diff] [blame] | 4 | #if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_EXT4_H |
| 6 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 7 | #include <linux/writeback.h> |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 8 | #include <linux/tracepoint.h> |
| 9 | |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 10 | struct ext4_allocation_context; |
| 11 | struct ext4_allocation_request; |
| 12 | struct ext4_prealloc_space; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 13 | struct ext4_inode_info; |
Josh Stone | 0ef1224 | 2009-09-30 00:51:22 -0400 | [diff] [blame] | 14 | struct mpage_da_data; |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 15 | |
| 16 | #define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) |
Theodore Ts'o | 3661d28 | 2009-09-14 22:59:50 -0400 | [diff] [blame] | 17 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 18 | TRACE_EVENT(ext4_free_inode, |
| 19 | TP_PROTO(struct inode *inode), |
| 20 | |
| 21 | TP_ARGS(inode), |
| 22 | |
| 23 | TP_STRUCT__entry( |
| 24 | __field( dev_t, dev ) |
| 25 | __field( ino_t, ino ) |
| 26 | __field( umode_t, mode ) |
| 27 | __field( uid_t, uid ) |
| 28 | __field( gid_t, gid ) |
| 29 | __field( blkcnt_t, blocks ) |
| 30 | ), |
| 31 | |
| 32 | TP_fast_assign( |
| 33 | __entry->dev = inode->i_sb->s_dev; |
| 34 | __entry->ino = inode->i_ino; |
| 35 | __entry->mode = inode->i_mode; |
| 36 | __entry->uid = inode->i_uid; |
| 37 | __entry->gid = inode->i_gid; |
| 38 | __entry->blocks = inode->i_blocks; |
| 39 | ), |
| 40 | |
| 41 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 42 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 43 | __entry->mode, __entry->uid, __entry->gid, |
Theodore Ts'o | 627ad9f | 2009-06-20 23:21:41 -0400 | [diff] [blame] | 44 | (unsigned long long) __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 45 | ); |
| 46 | |
| 47 | TRACE_EVENT(ext4_request_inode, |
| 48 | TP_PROTO(struct inode *dir, int mode), |
| 49 | |
| 50 | TP_ARGS(dir, mode), |
| 51 | |
| 52 | TP_STRUCT__entry( |
| 53 | __field( dev_t, dev ) |
| 54 | __field( ino_t, dir ) |
| 55 | __field( umode_t, mode ) |
| 56 | ), |
| 57 | |
| 58 | TP_fast_assign( |
| 59 | __entry->dev = dir->i_sb->s_dev; |
| 60 | __entry->dir = dir->i_ino; |
| 61 | __entry->mode = mode; |
| 62 | ), |
| 63 | |
| 64 | TP_printk("dev %s dir %lu mode %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 65 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->dir, |
| 66 | __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 67 | ); |
| 68 | |
| 69 | TRACE_EVENT(ext4_allocate_inode, |
| 70 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 71 | |
| 72 | TP_ARGS(inode, dir, mode), |
| 73 | |
| 74 | TP_STRUCT__entry( |
| 75 | __field( dev_t, dev ) |
| 76 | __field( ino_t, ino ) |
| 77 | __field( ino_t, dir ) |
| 78 | __field( umode_t, mode ) |
| 79 | ), |
| 80 | |
| 81 | TP_fast_assign( |
| 82 | __entry->dev = inode->i_sb->s_dev; |
| 83 | __entry->ino = inode->i_ino; |
| 84 | __entry->dir = dir->i_ino; |
| 85 | __entry->mode = mode; |
| 86 | ), |
| 87 | |
| 88 | TP_printk("dev %s ino %lu dir %lu mode %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 89 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 90 | (unsigned long) __entry->dir, __entry->mode) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 91 | ); |
| 92 | |
| 93 | TRACE_EVENT(ext4_write_begin, |
| 94 | |
| 95 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 96 | unsigned int flags), |
| 97 | |
| 98 | TP_ARGS(inode, pos, len, flags), |
| 99 | |
| 100 | TP_STRUCT__entry( |
| 101 | __field( dev_t, dev ) |
| 102 | __field( ino_t, ino ) |
| 103 | __field( loff_t, pos ) |
| 104 | __field( unsigned int, len ) |
| 105 | __field( unsigned int, flags ) |
| 106 | ), |
| 107 | |
| 108 | TP_fast_assign( |
| 109 | __entry->dev = inode->i_sb->s_dev; |
| 110 | __entry->ino = inode->i_ino; |
| 111 | __entry->pos = pos; |
| 112 | __entry->len = len; |
| 113 | __entry->flags = flags; |
| 114 | ), |
| 115 | |
| 116 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 117 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 118 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 119 | ); |
| 120 | |
| 121 | TRACE_EVENT(ext4_ordered_write_end, |
| 122 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 123 | unsigned int copied), |
| 124 | |
| 125 | TP_ARGS(inode, pos, len, copied), |
| 126 | |
| 127 | TP_STRUCT__entry( |
| 128 | __field( dev_t, dev ) |
| 129 | __field( ino_t, ino ) |
| 130 | __field( loff_t, pos ) |
| 131 | __field( unsigned int, len ) |
| 132 | __field( unsigned int, copied ) |
| 133 | ), |
| 134 | |
| 135 | TP_fast_assign( |
| 136 | __entry->dev = inode->i_sb->s_dev; |
| 137 | __entry->ino = inode->i_ino; |
| 138 | __entry->pos = pos; |
| 139 | __entry->len = len; |
| 140 | __entry->copied = copied; |
| 141 | ), |
| 142 | |
| 143 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 144 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 145 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 146 | ); |
| 147 | |
| 148 | TRACE_EVENT(ext4_writeback_write_end, |
| 149 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 150 | unsigned int copied), |
| 151 | |
| 152 | TP_ARGS(inode, pos, len, copied), |
| 153 | |
| 154 | TP_STRUCT__entry( |
| 155 | __field( dev_t, dev ) |
| 156 | __field( ino_t, ino ) |
| 157 | __field( loff_t, pos ) |
| 158 | __field( unsigned int, len ) |
| 159 | __field( unsigned int, copied ) |
| 160 | ), |
| 161 | |
| 162 | TP_fast_assign( |
| 163 | __entry->dev = inode->i_sb->s_dev; |
| 164 | __entry->ino = inode->i_ino; |
| 165 | __entry->pos = pos; |
| 166 | __entry->len = len; |
| 167 | __entry->copied = copied; |
| 168 | ), |
| 169 | |
| 170 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 171 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 172 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 173 | ); |
| 174 | |
| 175 | TRACE_EVENT(ext4_journalled_write_end, |
| 176 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 177 | unsigned int copied), |
| 178 | TP_ARGS(inode, pos, len, copied), |
| 179 | |
| 180 | TP_STRUCT__entry( |
| 181 | __field( dev_t, dev ) |
| 182 | __field( ino_t, ino ) |
| 183 | __field( loff_t, pos ) |
| 184 | __field( unsigned int, len ) |
| 185 | __field( unsigned int, copied ) |
| 186 | ), |
| 187 | |
| 188 | TP_fast_assign( |
| 189 | __entry->dev = inode->i_sb->s_dev; |
| 190 | __entry->ino = inode->i_ino; |
| 191 | __entry->pos = pos; |
| 192 | __entry->len = len; |
| 193 | __entry->copied = copied; |
| 194 | ), |
| 195 | |
| 196 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 197 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 198 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 199 | ); |
| 200 | |
Aneesh Kumar K.V | 43ce1d2 | 2009-06-14 17:58:45 -0400 | [diff] [blame] | 201 | TRACE_EVENT(ext4_writepage, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 202 | TP_PROTO(struct inode *inode, struct page *page), |
| 203 | |
| 204 | TP_ARGS(inode, page), |
| 205 | |
| 206 | TP_STRUCT__entry( |
| 207 | __field( dev_t, dev ) |
| 208 | __field( ino_t, ino ) |
| 209 | __field( pgoff_t, index ) |
| 210 | |
| 211 | ), |
| 212 | |
| 213 | TP_fast_assign( |
| 214 | __entry->dev = inode->i_sb->s_dev; |
| 215 | __entry->ino = inode->i_ino; |
| 216 | __entry->index = page->index; |
| 217 | ), |
| 218 | |
| 219 | TP_printk("dev %s ino %lu page_index %lu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 220 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 221 | __entry->index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 222 | ); |
| 223 | |
| 224 | TRACE_EVENT(ext4_da_writepages, |
| 225 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 226 | |
| 227 | TP_ARGS(inode, wbc), |
| 228 | |
| 229 | TP_STRUCT__entry( |
| 230 | __field( dev_t, dev ) |
| 231 | __field( ino_t, ino ) |
| 232 | __field( long, nr_to_write ) |
| 233 | __field( long, pages_skipped ) |
| 234 | __field( loff_t, range_start ) |
| 235 | __field( loff_t, range_end ) |
| 236 | __field( char, nonblocking ) |
| 237 | __field( char, for_kupdate ) |
| 238 | __field( char, for_reclaim ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 239 | __field( char, range_cyclic ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 240 | __field( pgoff_t, writeback_index ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 241 | ), |
| 242 | |
| 243 | TP_fast_assign( |
| 244 | __entry->dev = inode->i_sb->s_dev; |
| 245 | __entry->ino = inode->i_ino; |
| 246 | __entry->nr_to_write = wbc->nr_to_write; |
| 247 | __entry->pages_skipped = wbc->pages_skipped; |
| 248 | __entry->range_start = wbc->range_start; |
| 249 | __entry->range_end = wbc->range_end; |
| 250 | __entry->nonblocking = wbc->nonblocking; |
| 251 | __entry->for_kupdate = wbc->for_kupdate; |
| 252 | __entry->for_reclaim = wbc->for_reclaim; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 253 | __entry->range_cyclic = wbc->range_cyclic; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 254 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 255 | ), |
| 256 | |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 257 | TP_printk("dev %s ino %lu nr_to_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d writeback_index %lu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 258 | jbd2_dev_to_name(__entry->dev), |
| 259 | (unsigned long) __entry->ino, __entry->nr_to_write, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 260 | __entry->pages_skipped, __entry->range_start, |
| 261 | __entry->range_end, __entry->nonblocking, |
| 262 | __entry->for_kupdate, __entry->for_reclaim, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 263 | __entry->range_cyclic, |
| 264 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 265 | ); |
| 266 | |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 267 | TRACE_EVENT(ext4_da_write_pages, |
| 268 | TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), |
| 269 | |
| 270 | TP_ARGS(inode, mpd), |
| 271 | |
| 272 | TP_STRUCT__entry( |
| 273 | __field( dev_t, dev ) |
| 274 | __field( ino_t, ino ) |
| 275 | __field( __u64, b_blocknr ) |
| 276 | __field( __u32, b_size ) |
| 277 | __field( __u32, b_state ) |
| 278 | __field( unsigned long, first_page ) |
| 279 | __field( int, io_done ) |
| 280 | __field( int, pages_written ) |
| 281 | ), |
| 282 | |
| 283 | TP_fast_assign( |
| 284 | __entry->dev = inode->i_sb->s_dev; |
| 285 | __entry->ino = inode->i_ino; |
| 286 | __entry->b_blocknr = mpd->b_blocknr; |
| 287 | __entry->b_size = mpd->b_size; |
| 288 | __entry->b_state = mpd->b_state; |
| 289 | __entry->first_page = mpd->first_page; |
| 290 | __entry->io_done = mpd->io_done; |
| 291 | __entry->pages_written = mpd->pages_written; |
| 292 | ), |
| 293 | |
| 294 | TP_printk("dev %s ino %lu b_blocknr %llu b_size %u b_state 0x%04x first_page %lu io_done %d pages_written %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 295 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
Theodore Ts'o | b3a3ca8 | 2009-08-31 23:13:11 -0400 | [diff] [blame] | 296 | __entry->b_blocknr, __entry->b_size, |
| 297 | __entry->b_state, __entry->first_page, |
| 298 | __entry->io_done, __entry->pages_written) |
| 299 | ); |
| 300 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 301 | TRACE_EVENT(ext4_da_writepages_result, |
| 302 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 303 | int ret, int pages_written), |
| 304 | |
| 305 | TP_ARGS(inode, wbc, ret, pages_written), |
| 306 | |
| 307 | TP_STRUCT__entry( |
| 308 | __field( dev_t, dev ) |
| 309 | __field( ino_t, ino ) |
| 310 | __field( int, ret ) |
| 311 | __field( int, pages_written ) |
| 312 | __field( long, pages_skipped ) |
| 313 | __field( char, encountered_congestion ) |
| 314 | __field( char, more_io ) |
| 315 | __field( char, no_nrwrite_index_update ) |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 316 | __field( pgoff_t, writeback_index ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 317 | ), |
| 318 | |
| 319 | TP_fast_assign( |
| 320 | __entry->dev = inode->i_sb->s_dev; |
| 321 | __entry->ino = inode->i_ino; |
| 322 | __entry->ret = ret; |
| 323 | __entry->pages_written = pages_written; |
| 324 | __entry->pages_skipped = wbc->pages_skipped; |
| 325 | __entry->encountered_congestion = wbc->encountered_congestion; |
| 326 | __entry->more_io = wbc->more_io; |
| 327 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 328 | __entry->writeback_index = inode->i_mapping->writeback_index; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 329 | ), |
| 330 | |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 331 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d writeback_index %lu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 332 | jbd2_dev_to_name(__entry->dev), |
| 333 | (unsigned long) __entry->ino, __entry->ret, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 334 | __entry->pages_written, __entry->pages_skipped, |
| 335 | __entry->encountered_congestion, __entry->more_io, |
Theodore Ts'o | 55138e0b | 2009-09-29 13:31:31 -0400 | [diff] [blame] | 336 | __entry->no_nrwrite_index_update, |
| 337 | (unsigned long) __entry->writeback_index) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 338 | ); |
| 339 | |
| 340 | TRACE_EVENT(ext4_da_write_begin, |
| 341 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 342 | unsigned int flags), |
| 343 | |
| 344 | TP_ARGS(inode, pos, len, flags), |
| 345 | |
| 346 | TP_STRUCT__entry( |
| 347 | __field( dev_t, dev ) |
| 348 | __field( ino_t, ino ) |
| 349 | __field( loff_t, pos ) |
| 350 | __field( unsigned int, len ) |
| 351 | __field( unsigned int, flags ) |
| 352 | ), |
| 353 | |
| 354 | TP_fast_assign( |
| 355 | __entry->dev = inode->i_sb->s_dev; |
| 356 | __entry->ino = inode->i_ino; |
| 357 | __entry->pos = pos; |
| 358 | __entry->len = len; |
| 359 | __entry->flags = flags; |
| 360 | ), |
| 361 | |
| 362 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 363 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 364 | __entry->pos, __entry->len, __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 365 | ); |
| 366 | |
| 367 | TRACE_EVENT(ext4_da_write_end, |
| 368 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 369 | unsigned int copied), |
| 370 | |
| 371 | TP_ARGS(inode, pos, len, copied), |
| 372 | |
| 373 | TP_STRUCT__entry( |
| 374 | __field( dev_t, dev ) |
| 375 | __field( ino_t, ino ) |
| 376 | __field( loff_t, pos ) |
| 377 | __field( unsigned int, len ) |
| 378 | __field( unsigned int, copied ) |
| 379 | ), |
| 380 | |
| 381 | TP_fast_assign( |
| 382 | __entry->dev = inode->i_sb->s_dev; |
| 383 | __entry->ino = inode->i_ino; |
| 384 | __entry->pos = pos; |
| 385 | __entry->len = len; |
| 386 | __entry->copied = copied; |
| 387 | ), |
| 388 | |
| 389 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 390 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 391 | __entry->pos, __entry->len, __entry->copied) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 392 | ); |
| 393 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 394 | TRACE_EVENT(ext4_discard_blocks, |
| 395 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 396 | unsigned long long count), |
| 397 | |
| 398 | TP_ARGS(sb, blk, count), |
| 399 | |
| 400 | TP_STRUCT__entry( |
| 401 | __field( dev_t, dev ) |
| 402 | __field( __u64, blk ) |
| 403 | __field( __u64, count ) |
| 404 | |
| 405 | ), |
| 406 | |
| 407 | TP_fast_assign( |
| 408 | __entry->dev = sb->s_dev; |
| 409 | __entry->blk = blk; |
| 410 | __entry->count = count; |
| 411 | ), |
| 412 | |
| 413 | TP_printk("dev %s blk %llu count %llu", |
| 414 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) |
| 415 | ); |
| 416 | |
| 417 | TRACE_EVENT(ext4_mb_new_inode_pa, |
| 418 | TP_PROTO(struct ext4_allocation_context *ac, |
| 419 | struct ext4_prealloc_space *pa), |
| 420 | |
| 421 | TP_ARGS(ac, pa), |
| 422 | |
| 423 | TP_STRUCT__entry( |
| 424 | __field( dev_t, dev ) |
| 425 | __field( ino_t, ino ) |
| 426 | __field( __u64, pa_pstart ) |
| 427 | __field( __u32, pa_len ) |
| 428 | __field( __u64, pa_lstart ) |
| 429 | |
| 430 | ), |
| 431 | |
| 432 | TP_fast_assign( |
| 433 | __entry->dev = ac->ac_sb->s_dev; |
| 434 | __entry->ino = ac->ac_inode->i_ino; |
| 435 | __entry->pa_pstart = pa->pa_pstart; |
| 436 | __entry->pa_len = pa->pa_len; |
| 437 | __entry->pa_lstart = pa->pa_lstart; |
| 438 | ), |
| 439 | |
| 440 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 441 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 442 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 443 | ); |
| 444 | |
| 445 | TRACE_EVENT(ext4_mb_new_group_pa, |
| 446 | TP_PROTO(struct ext4_allocation_context *ac, |
| 447 | struct ext4_prealloc_space *pa), |
| 448 | |
| 449 | TP_ARGS(ac, pa), |
| 450 | |
| 451 | TP_STRUCT__entry( |
| 452 | __field( dev_t, dev ) |
| 453 | __field( ino_t, ino ) |
| 454 | __field( __u64, pa_pstart ) |
| 455 | __field( __u32, pa_len ) |
| 456 | __field( __u64, pa_lstart ) |
| 457 | |
| 458 | ), |
| 459 | |
| 460 | TP_fast_assign( |
| 461 | __entry->dev = ac->ac_sb->s_dev; |
| 462 | __entry->ino = ac->ac_inode->i_ino; |
| 463 | __entry->pa_pstart = pa->pa_pstart; |
| 464 | __entry->pa_len = pa->pa_len; |
| 465 | __entry->pa_lstart = pa->pa_lstart; |
| 466 | ), |
| 467 | |
| 468 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 469 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 470 | __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 471 | ); |
| 472 | |
| 473 | TRACE_EVENT(ext4_mb_release_inode_pa, |
| 474 | TP_PROTO(struct ext4_allocation_context *ac, |
| 475 | struct ext4_prealloc_space *pa, |
| 476 | unsigned long long block, unsigned int count), |
| 477 | |
| 478 | TP_ARGS(ac, pa, block, count), |
| 479 | |
| 480 | TP_STRUCT__entry( |
| 481 | __field( dev_t, dev ) |
| 482 | __field( ino_t, ino ) |
| 483 | __field( __u64, block ) |
| 484 | __field( __u32, count ) |
| 485 | |
| 486 | ), |
| 487 | |
| 488 | TP_fast_assign( |
| 489 | __entry->dev = ac->ac_sb->s_dev; |
| 490 | __entry->ino = ac->ac_inode->i_ino; |
| 491 | __entry->block = block; |
| 492 | __entry->count = count; |
| 493 | ), |
| 494 | |
| 495 | TP_printk("dev %s ino %lu block %llu count %u", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 496 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 497 | __entry->block, __entry->count) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 498 | ); |
| 499 | |
| 500 | TRACE_EVENT(ext4_mb_release_group_pa, |
| 501 | TP_PROTO(struct ext4_allocation_context *ac, |
| 502 | struct ext4_prealloc_space *pa), |
| 503 | |
| 504 | TP_ARGS(ac, pa), |
| 505 | |
| 506 | TP_STRUCT__entry( |
| 507 | __field( dev_t, dev ) |
| 508 | __field( ino_t, ino ) |
| 509 | __field( __u64, pa_pstart ) |
| 510 | __field( __u32, pa_len ) |
| 511 | |
| 512 | ), |
| 513 | |
| 514 | TP_fast_assign( |
| 515 | __entry->dev = ac->ac_sb->s_dev; |
| 516 | __entry->ino = ac->ac_inode->i_ino; |
| 517 | __entry->pa_pstart = pa->pa_pstart; |
| 518 | __entry->pa_len = pa->pa_len; |
| 519 | ), |
| 520 | |
| 521 | TP_printk("dev %s pstart %llu len %u", |
| 522 | jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) |
| 523 | ); |
| 524 | |
| 525 | TRACE_EVENT(ext4_discard_preallocations, |
| 526 | TP_PROTO(struct inode *inode), |
| 527 | |
| 528 | TP_ARGS(inode), |
| 529 | |
| 530 | TP_STRUCT__entry( |
| 531 | __field( dev_t, dev ) |
| 532 | __field( ino_t, ino ) |
| 533 | |
| 534 | ), |
| 535 | |
| 536 | TP_fast_assign( |
| 537 | __entry->dev = inode->i_sb->s_dev; |
| 538 | __entry->ino = inode->i_ino; |
| 539 | ), |
| 540 | |
| 541 | TP_printk("dev %s ino %lu", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 542 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 543 | ); |
| 544 | |
| 545 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 546 | TP_PROTO(struct super_block *sb, int needed), |
| 547 | |
| 548 | TP_ARGS(sb, needed), |
| 549 | |
| 550 | TP_STRUCT__entry( |
| 551 | __field( dev_t, dev ) |
| 552 | __field( int, needed ) |
| 553 | |
| 554 | ), |
| 555 | |
| 556 | TP_fast_assign( |
| 557 | __entry->dev = sb->s_dev; |
| 558 | __entry->needed = needed; |
| 559 | ), |
| 560 | |
| 561 | TP_printk("dev %s needed %d", |
| 562 | jbd2_dev_to_name(__entry->dev), __entry->needed) |
| 563 | ); |
| 564 | |
| 565 | TRACE_EVENT(ext4_request_blocks, |
| 566 | TP_PROTO(struct ext4_allocation_request *ar), |
| 567 | |
| 568 | TP_ARGS(ar), |
| 569 | |
| 570 | TP_STRUCT__entry( |
| 571 | __field( dev_t, dev ) |
| 572 | __field( ino_t, ino ) |
| 573 | __field( unsigned int, flags ) |
| 574 | __field( unsigned int, len ) |
| 575 | __field( __u64, logical ) |
| 576 | __field( __u64, goal ) |
| 577 | __field( __u64, lleft ) |
| 578 | __field( __u64, lright ) |
| 579 | __field( __u64, pleft ) |
| 580 | __field( __u64, pright ) |
| 581 | ), |
| 582 | |
| 583 | TP_fast_assign( |
| 584 | __entry->dev = ar->inode->i_sb->s_dev; |
| 585 | __entry->ino = ar->inode->i_ino; |
| 586 | __entry->flags = ar->flags; |
| 587 | __entry->len = ar->len; |
| 588 | __entry->logical = ar->logical; |
| 589 | __entry->goal = ar->goal; |
| 590 | __entry->lleft = ar->lleft; |
| 591 | __entry->lright = ar->lright; |
| 592 | __entry->pleft = ar->pleft; |
| 593 | __entry->pright = ar->pright; |
| 594 | ), |
| 595 | |
| 596 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 597 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 598 | __entry->flags, __entry->len, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 599 | (unsigned long long) __entry->logical, |
| 600 | (unsigned long long) __entry->goal, |
| 601 | (unsigned long long) __entry->lleft, |
| 602 | (unsigned long long) __entry->lright, |
| 603 | (unsigned long long) __entry->pleft, |
| 604 | (unsigned long long) __entry->pright) |
| 605 | ); |
| 606 | |
| 607 | TRACE_EVENT(ext4_allocate_blocks, |
| 608 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 609 | |
| 610 | TP_ARGS(ar, block), |
| 611 | |
| 612 | TP_STRUCT__entry( |
| 613 | __field( dev_t, dev ) |
| 614 | __field( ino_t, ino ) |
| 615 | __field( __u64, block ) |
| 616 | __field( unsigned int, flags ) |
| 617 | __field( unsigned int, len ) |
| 618 | __field( __u64, logical ) |
| 619 | __field( __u64, goal ) |
| 620 | __field( __u64, lleft ) |
| 621 | __field( __u64, lright ) |
| 622 | __field( __u64, pleft ) |
| 623 | __field( __u64, pright ) |
| 624 | ), |
| 625 | |
| 626 | TP_fast_assign( |
| 627 | __entry->dev = ar->inode->i_sb->s_dev; |
| 628 | __entry->ino = ar->inode->i_ino; |
| 629 | __entry->block = block; |
| 630 | __entry->flags = ar->flags; |
| 631 | __entry->len = ar->len; |
| 632 | __entry->logical = ar->logical; |
| 633 | __entry->goal = ar->goal; |
| 634 | __entry->lleft = ar->lleft; |
| 635 | __entry->lright = ar->lright; |
| 636 | __entry->pleft = ar->pleft; |
| 637 | __entry->pright = ar->pright; |
| 638 | ), |
| 639 | |
| 640 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 641 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 642 | __entry->flags, __entry->len, __entry->block, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 643 | (unsigned long long) __entry->logical, |
| 644 | (unsigned long long) __entry->goal, |
| 645 | (unsigned long long) __entry->lleft, |
| 646 | (unsigned long long) __entry->lright, |
| 647 | (unsigned long long) __entry->pleft, |
| 648 | (unsigned long long) __entry->pright) |
| 649 | ); |
| 650 | |
| 651 | TRACE_EVENT(ext4_free_blocks, |
| 652 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 653 | int flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 654 | |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 655 | TP_ARGS(inode, block, count, flags), |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 656 | |
| 657 | TP_STRUCT__entry( |
| 658 | __field( dev_t, dev ) |
| 659 | __field( ino_t, ino ) |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 660 | __field( umode_t, mode ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 661 | __field( __u64, block ) |
| 662 | __field( unsigned long, count ) |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 663 | __field( int, flags ) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 664 | ), |
| 665 | |
| 666 | TP_fast_assign( |
| 667 | __entry->dev = inode->i_sb->s_dev; |
| 668 | __entry->ino = inode->i_ino; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 669 | __entry->mode = inode->i_mode; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 670 | __entry->block = block; |
| 671 | __entry->count = count; |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 672 | __entry->flags = flags; |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 673 | ), |
| 674 | |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 675 | TP_printk("dev %s ino %lu mode 0%o block %llu count %lu flags %d", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 676 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
Theodore Ts'o | e636260 | 2009-11-23 07:17:05 -0500 | [diff] [blame^] | 677 | __entry->mode, __entry->block, __entry->count, |
| 678 | __entry->flags) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 679 | ); |
| 680 | |
| 681 | TRACE_EVENT(ext4_sync_file, |
| 682 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), |
| 683 | |
| 684 | TP_ARGS(file, dentry, datasync), |
| 685 | |
| 686 | TP_STRUCT__entry( |
| 687 | __field( dev_t, dev ) |
| 688 | __field( ino_t, ino ) |
| 689 | __field( ino_t, parent ) |
| 690 | __field( int, datasync ) |
| 691 | ), |
| 692 | |
| 693 | TP_fast_assign( |
| 694 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 695 | __entry->ino = dentry->d_inode->i_ino; |
| 696 | __entry->datasync = datasync; |
| 697 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
| 698 | ), |
| 699 | |
| 700 | TP_printk("dev %s ino %ld parent %ld datasync %d ", |
Theodore Ts'o | a3710fd | 2009-09-17 08:50:18 -0400 | [diff] [blame] | 701 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 702 | (unsigned long) __entry->parent, __entry->datasync) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 703 | ); |
| 704 | |
| 705 | TRACE_EVENT(ext4_sync_fs, |
| 706 | TP_PROTO(struct super_block *sb, int wait), |
| 707 | |
| 708 | TP_ARGS(sb, wait), |
| 709 | |
| 710 | TP_STRUCT__entry( |
| 711 | __field( dev_t, dev ) |
| 712 | __field( int, wait ) |
| 713 | |
| 714 | ), |
| 715 | |
| 716 | TP_fast_assign( |
| 717 | __entry->dev = sb->s_dev; |
| 718 | __entry->wait = wait; |
| 719 | ), |
| 720 | |
| 721 | TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), |
| 722 | __entry->wait) |
| 723 | ); |
| 724 | |
Theodore Ts'o | fb40ba0 | 2009-09-16 19:30:40 -0400 | [diff] [blame] | 725 | TRACE_EVENT(ext4_alloc_da_blocks, |
| 726 | TP_PROTO(struct inode *inode), |
| 727 | |
| 728 | TP_ARGS(inode), |
| 729 | |
| 730 | TP_STRUCT__entry( |
| 731 | __field( dev_t, dev ) |
| 732 | __field( ino_t, ino ) |
| 733 | __field( unsigned int, data_blocks ) |
| 734 | __field( unsigned int, meta_blocks ) |
| 735 | ), |
| 736 | |
| 737 | TP_fast_assign( |
| 738 | __entry->dev = inode->i_sb->s_dev; |
| 739 | __entry->ino = inode->i_ino; |
| 740 | __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; |
| 741 | __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; |
| 742 | ), |
| 743 | |
| 744 | TP_printk("dev %s ino %lu data_blocks %u meta_blocks %u", |
| 745 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 746 | __entry->data_blocks, __entry->meta_blocks) |
| 747 | ); |
| 748 | |
Theodore Ts'o | 296c355 | 2009-09-30 00:32:42 -0400 | [diff] [blame] | 749 | TRACE_EVENT(ext4_mballoc_alloc, |
| 750 | TP_PROTO(struct ext4_allocation_context *ac), |
| 751 | |
| 752 | TP_ARGS(ac), |
| 753 | |
| 754 | TP_STRUCT__entry( |
| 755 | __field( dev_t, dev ) |
| 756 | __field( ino_t, ino ) |
| 757 | __field( __u16, found ) |
| 758 | __field( __u16, groups ) |
| 759 | __field( __u16, buddy ) |
| 760 | __field( __u16, flags ) |
| 761 | __field( __u16, tail ) |
| 762 | __field( __u8, cr ) |
| 763 | __field( __u32, orig_logical ) |
| 764 | __field( int, orig_start ) |
| 765 | __field( __u32, orig_group ) |
| 766 | __field( int, orig_len ) |
| 767 | __field( __u32, goal_logical ) |
| 768 | __field( int, goal_start ) |
| 769 | __field( __u32, goal_group ) |
| 770 | __field( int, goal_len ) |
| 771 | __field( __u32, result_logical ) |
| 772 | __field( int, result_start ) |
| 773 | __field( __u32, result_group ) |
| 774 | __field( int, result_len ) |
| 775 | ), |
| 776 | |
| 777 | TP_fast_assign( |
| 778 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
| 779 | __entry->ino = ac->ac_inode->i_ino; |
| 780 | __entry->found = ac->ac_found; |
| 781 | __entry->flags = ac->ac_flags; |
| 782 | __entry->groups = ac->ac_groups_scanned; |
| 783 | __entry->buddy = ac->ac_buddy; |
| 784 | __entry->tail = ac->ac_tail; |
| 785 | __entry->cr = ac->ac_criteria; |
| 786 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 787 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 788 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 789 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 790 | __entry->goal_logical = ac->ac_g_ex.fe_logical; |
| 791 | __entry->goal_start = ac->ac_g_ex.fe_start; |
| 792 | __entry->goal_group = ac->ac_g_ex.fe_group; |
| 793 | __entry->goal_len = ac->ac_g_ex.fe_len; |
| 794 | __entry->result_logical = ac->ac_f_ex.fe_logical; |
| 795 | __entry->result_start = ac->ac_f_ex.fe_start; |
| 796 | __entry->result_group = ac->ac_f_ex.fe_group; |
| 797 | __entry->result_len = ac->ac_f_ex.fe_len; |
| 798 | ), |
| 799 | |
| 800 | TP_printk("dev %s inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " |
| 801 | "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " |
| 802 | "tail %u broken %u", |
| 803 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 804 | __entry->orig_group, __entry->orig_start, |
| 805 | __entry->orig_len, __entry->orig_logical, |
| 806 | __entry->goal_group, __entry->goal_start, |
| 807 | __entry->goal_len, __entry->goal_logical, |
| 808 | __entry->result_group, __entry->result_start, |
| 809 | __entry->result_len, __entry->result_logical, |
| 810 | __entry->found, __entry->groups, __entry->cr, |
| 811 | __entry->flags, __entry->tail, |
| 812 | __entry->buddy ? 1 << __entry->buddy : 0) |
| 813 | ); |
| 814 | |
| 815 | TRACE_EVENT(ext4_mballoc_prealloc, |
| 816 | TP_PROTO(struct ext4_allocation_context *ac), |
| 817 | |
| 818 | TP_ARGS(ac), |
| 819 | |
| 820 | TP_STRUCT__entry( |
| 821 | __field( dev_t, dev ) |
| 822 | __field( ino_t, ino ) |
| 823 | __field( __u32, orig_logical ) |
| 824 | __field( int, orig_start ) |
| 825 | __field( __u32, orig_group ) |
| 826 | __field( int, orig_len ) |
| 827 | __field( __u32, result_logical ) |
| 828 | __field( int, result_start ) |
| 829 | __field( __u32, result_group ) |
| 830 | __field( int, result_len ) |
| 831 | ), |
| 832 | |
| 833 | TP_fast_assign( |
| 834 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
| 835 | __entry->ino = ac->ac_inode->i_ino; |
| 836 | __entry->orig_logical = ac->ac_o_ex.fe_logical; |
| 837 | __entry->orig_start = ac->ac_o_ex.fe_start; |
| 838 | __entry->orig_group = ac->ac_o_ex.fe_group; |
| 839 | __entry->orig_len = ac->ac_o_ex.fe_len; |
| 840 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 841 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 842 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 843 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 844 | ), |
| 845 | |
| 846 | TP_printk("dev %s inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", |
| 847 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 848 | __entry->orig_group, __entry->orig_start, |
| 849 | __entry->orig_len, __entry->orig_logical, |
| 850 | __entry->result_group, __entry->result_start, |
| 851 | __entry->result_len, __entry->result_logical) |
| 852 | ); |
| 853 | |
| 854 | TRACE_EVENT(ext4_mballoc_discard, |
| 855 | TP_PROTO(struct ext4_allocation_context *ac), |
| 856 | |
| 857 | TP_ARGS(ac), |
| 858 | |
| 859 | TP_STRUCT__entry( |
| 860 | __field( dev_t, dev ) |
| 861 | __field( ino_t, ino ) |
| 862 | __field( __u32, result_logical ) |
| 863 | __field( int, result_start ) |
| 864 | __field( __u32, result_group ) |
| 865 | __field( int, result_len ) |
| 866 | ), |
| 867 | |
| 868 | TP_fast_assign( |
| 869 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
| 870 | __entry->ino = ac->ac_inode->i_ino; |
| 871 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 872 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 873 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 874 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 875 | ), |
| 876 | |
| 877 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", |
| 878 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 879 | __entry->result_group, __entry->result_start, |
| 880 | __entry->result_len, __entry->result_logical) |
| 881 | ); |
| 882 | |
| 883 | TRACE_EVENT(ext4_mballoc_free, |
| 884 | TP_PROTO(struct ext4_allocation_context *ac), |
| 885 | |
| 886 | TP_ARGS(ac), |
| 887 | |
| 888 | TP_STRUCT__entry( |
| 889 | __field( dev_t, dev ) |
| 890 | __field( ino_t, ino ) |
| 891 | __field( __u32, result_logical ) |
| 892 | __field( int, result_start ) |
| 893 | __field( __u32, result_group ) |
| 894 | __field( int, result_len ) |
| 895 | ), |
| 896 | |
| 897 | TP_fast_assign( |
| 898 | __entry->dev = ac->ac_inode->i_sb->s_dev; |
| 899 | __entry->ino = ac->ac_inode->i_ino; |
| 900 | __entry->result_logical = ac->ac_b_ex.fe_logical; |
| 901 | __entry->result_start = ac->ac_b_ex.fe_start; |
| 902 | __entry->result_group = ac->ac_b_ex.fe_group; |
| 903 | __entry->result_len = ac->ac_b_ex.fe_len; |
| 904 | ), |
| 905 | |
| 906 | TP_printk("dev %s inode %lu extent %u/%d/%u@%u ", |
| 907 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 908 | __entry->result_group, __entry->result_start, |
| 909 | __entry->result_len, __entry->result_logical) |
| 910 | ); |
| 911 | |
Theodore Ts'o | beac2da | 2009-11-23 07:25:08 -0500 | [diff] [blame] | 912 | TRACE_EVENT(ext4_forget, |
| 913 | TP_PROTO(struct inode *inode, int is_metadata, __u64 block), |
| 914 | |
| 915 | TP_ARGS(inode, is_metadata, block), |
| 916 | |
| 917 | TP_STRUCT__entry( |
| 918 | __field( dev_t, dev ) |
| 919 | __field( ino_t, ino ) |
| 920 | __field( umode_t, mode ) |
| 921 | __field( int, is_metadata ) |
| 922 | __field( __u64, block ) |
| 923 | ), |
| 924 | |
| 925 | TP_fast_assign( |
| 926 | __entry->dev = inode->i_sb->s_dev; |
| 927 | __entry->ino = inode->i_ino; |
| 928 | __entry->mode = inode->i_mode; |
| 929 | __entry->is_metadata = is_metadata; |
| 930 | __entry->block = block; |
| 931 | ), |
| 932 | |
| 933 | TP_printk("dev %s ino %lu mode %d is_metadata %d block %llu", |
| 934 | jbd2_dev_to_name(__entry->dev), (unsigned long) __entry->ino, |
| 935 | __entry->mode, __entry->is_metadata, __entry->block) |
| 936 | ); |
| 937 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 938 | #endif /* _TRACE_EXT4_H */ |
| 939 | |
| 940 | /* This part must be outside protection */ |
| 941 | #include <trace/define_trace.h> |