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> |
| 8 | #include "../../../fs/ext4/ext4.h" |
| 9 | #include "../../../fs/ext4/mballoc.h" |
| 10 | #include <linux/tracepoint.h> |
| 11 | |
| 12 | TRACE_EVENT(ext4_free_inode, |
| 13 | TP_PROTO(struct inode *inode), |
| 14 | |
| 15 | TP_ARGS(inode), |
| 16 | |
| 17 | TP_STRUCT__entry( |
| 18 | __field( dev_t, dev ) |
| 19 | __field( ino_t, ino ) |
| 20 | __field( umode_t, mode ) |
| 21 | __field( uid_t, uid ) |
| 22 | __field( gid_t, gid ) |
| 23 | __field( blkcnt_t, blocks ) |
| 24 | ), |
| 25 | |
| 26 | TP_fast_assign( |
| 27 | __entry->dev = inode->i_sb->s_dev; |
| 28 | __entry->ino = inode->i_ino; |
| 29 | __entry->mode = inode->i_mode; |
| 30 | __entry->uid = inode->i_uid; |
| 31 | __entry->gid = inode->i_gid; |
| 32 | __entry->blocks = inode->i_blocks; |
| 33 | ), |
| 34 | |
| 35 | TP_printk("dev %s ino %lu mode %d uid %u gid %u blocks %llu", |
| 36 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->mode, |
Theodore Ts'o | 627ad9f | 2009-06-20 23:21:41 -0400 | [diff] [blame] | 37 | __entry->uid, __entry->gid, |
| 38 | (unsigned long long) __entry->blocks) |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 39 | ); |
| 40 | |
| 41 | TRACE_EVENT(ext4_request_inode, |
| 42 | TP_PROTO(struct inode *dir, int mode), |
| 43 | |
| 44 | TP_ARGS(dir, mode), |
| 45 | |
| 46 | TP_STRUCT__entry( |
| 47 | __field( dev_t, dev ) |
| 48 | __field( ino_t, dir ) |
| 49 | __field( umode_t, mode ) |
| 50 | ), |
| 51 | |
| 52 | TP_fast_assign( |
| 53 | __entry->dev = dir->i_sb->s_dev; |
| 54 | __entry->dir = dir->i_ino; |
| 55 | __entry->mode = mode; |
| 56 | ), |
| 57 | |
| 58 | TP_printk("dev %s dir %lu mode %d", |
| 59 | jbd2_dev_to_name(__entry->dev), __entry->dir, __entry->mode) |
| 60 | ); |
| 61 | |
| 62 | TRACE_EVENT(ext4_allocate_inode, |
| 63 | TP_PROTO(struct inode *inode, struct inode *dir, int mode), |
| 64 | |
| 65 | TP_ARGS(inode, dir, mode), |
| 66 | |
| 67 | TP_STRUCT__entry( |
| 68 | __field( dev_t, dev ) |
| 69 | __field( ino_t, ino ) |
| 70 | __field( ino_t, dir ) |
| 71 | __field( umode_t, mode ) |
| 72 | ), |
| 73 | |
| 74 | TP_fast_assign( |
| 75 | __entry->dev = inode->i_sb->s_dev; |
| 76 | __entry->ino = inode->i_ino; |
| 77 | __entry->dir = dir->i_ino; |
| 78 | __entry->mode = mode; |
| 79 | ), |
| 80 | |
| 81 | TP_printk("dev %s ino %lu dir %lu mode %d", |
| 82 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->dir, __entry->mode) |
| 83 | ); |
| 84 | |
| 85 | TRACE_EVENT(ext4_write_begin, |
| 86 | |
| 87 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 88 | unsigned int flags), |
| 89 | |
| 90 | TP_ARGS(inode, pos, len, flags), |
| 91 | |
| 92 | TP_STRUCT__entry( |
| 93 | __field( dev_t, dev ) |
| 94 | __field( ino_t, ino ) |
| 95 | __field( loff_t, pos ) |
| 96 | __field( unsigned int, len ) |
| 97 | __field( unsigned int, flags ) |
| 98 | ), |
| 99 | |
| 100 | TP_fast_assign( |
| 101 | __entry->dev = inode->i_sb->s_dev; |
| 102 | __entry->ino = inode->i_ino; |
| 103 | __entry->pos = pos; |
| 104 | __entry->len = len; |
| 105 | __entry->flags = flags; |
| 106 | ), |
| 107 | |
| 108 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
| 109 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, |
| 110 | __entry->flags) |
| 111 | ); |
| 112 | |
| 113 | TRACE_EVENT(ext4_ordered_write_end, |
| 114 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 115 | unsigned int copied), |
| 116 | |
| 117 | TP_ARGS(inode, pos, len, copied), |
| 118 | |
| 119 | TP_STRUCT__entry( |
| 120 | __field( dev_t, dev ) |
| 121 | __field( ino_t, ino ) |
| 122 | __field( loff_t, pos ) |
| 123 | __field( unsigned int, len ) |
| 124 | __field( unsigned int, copied ) |
| 125 | ), |
| 126 | |
| 127 | TP_fast_assign( |
| 128 | __entry->dev = inode->i_sb->s_dev; |
| 129 | __entry->ino = inode->i_ino; |
| 130 | __entry->pos = pos; |
| 131 | __entry->len = len; |
| 132 | __entry->copied = copied; |
| 133 | ), |
| 134 | |
| 135 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
| 136 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, |
| 137 | __entry->copied) |
| 138 | ); |
| 139 | |
| 140 | TRACE_EVENT(ext4_writeback_write_end, |
| 141 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 142 | unsigned int copied), |
| 143 | |
| 144 | TP_ARGS(inode, pos, len, copied), |
| 145 | |
| 146 | TP_STRUCT__entry( |
| 147 | __field( dev_t, dev ) |
| 148 | __field( ino_t, ino ) |
| 149 | __field( loff_t, pos ) |
| 150 | __field( unsigned int, len ) |
| 151 | __field( unsigned int, copied ) |
| 152 | ), |
| 153 | |
| 154 | TP_fast_assign( |
| 155 | __entry->dev = inode->i_sb->s_dev; |
| 156 | __entry->ino = inode->i_ino; |
| 157 | __entry->pos = pos; |
| 158 | __entry->len = len; |
| 159 | __entry->copied = copied; |
| 160 | ), |
| 161 | |
| 162 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
| 163 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, |
| 164 | __entry->copied) |
| 165 | ); |
| 166 | |
| 167 | TRACE_EVENT(ext4_journalled_write_end, |
| 168 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 169 | unsigned int copied), |
| 170 | TP_ARGS(inode, pos, len, copied), |
| 171 | |
| 172 | TP_STRUCT__entry( |
| 173 | __field( dev_t, dev ) |
| 174 | __field( ino_t, ino ) |
| 175 | __field( loff_t, pos ) |
| 176 | __field( unsigned int, len ) |
| 177 | __field( unsigned int, copied ) |
| 178 | ), |
| 179 | |
| 180 | TP_fast_assign( |
| 181 | __entry->dev = inode->i_sb->s_dev; |
| 182 | __entry->ino = inode->i_ino; |
| 183 | __entry->pos = pos; |
| 184 | __entry->len = len; |
| 185 | __entry->copied = copied; |
| 186 | ), |
| 187 | |
| 188 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
| 189 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, |
| 190 | __entry->copied) |
| 191 | ); |
| 192 | |
Aneesh Kumar K.V | 43ce1d2 | 2009-06-14 17:58:45 -0400 | [diff] [blame] | 193 | TRACE_EVENT(ext4_writepage, |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 194 | TP_PROTO(struct inode *inode, struct page *page), |
| 195 | |
| 196 | TP_ARGS(inode, page), |
| 197 | |
| 198 | TP_STRUCT__entry( |
| 199 | __field( dev_t, dev ) |
| 200 | __field( ino_t, ino ) |
| 201 | __field( pgoff_t, index ) |
| 202 | |
| 203 | ), |
| 204 | |
| 205 | TP_fast_assign( |
| 206 | __entry->dev = inode->i_sb->s_dev; |
| 207 | __entry->ino = inode->i_ino; |
| 208 | __entry->index = page->index; |
| 209 | ), |
| 210 | |
| 211 | TP_printk("dev %s ino %lu page_index %lu", |
| 212 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->index) |
| 213 | ); |
| 214 | |
| 215 | TRACE_EVENT(ext4_da_writepages, |
| 216 | TP_PROTO(struct inode *inode, struct writeback_control *wbc), |
| 217 | |
| 218 | TP_ARGS(inode, wbc), |
| 219 | |
| 220 | TP_STRUCT__entry( |
| 221 | __field( dev_t, dev ) |
| 222 | __field( ino_t, ino ) |
| 223 | __field( long, nr_to_write ) |
| 224 | __field( long, pages_skipped ) |
| 225 | __field( loff_t, range_start ) |
| 226 | __field( loff_t, range_end ) |
| 227 | __field( char, nonblocking ) |
| 228 | __field( char, for_kupdate ) |
| 229 | __field( char, for_reclaim ) |
| 230 | __field( char, for_writepages ) |
| 231 | __field( char, range_cyclic ) |
| 232 | ), |
| 233 | |
| 234 | TP_fast_assign( |
| 235 | __entry->dev = inode->i_sb->s_dev; |
| 236 | __entry->ino = inode->i_ino; |
| 237 | __entry->nr_to_write = wbc->nr_to_write; |
| 238 | __entry->pages_skipped = wbc->pages_skipped; |
| 239 | __entry->range_start = wbc->range_start; |
| 240 | __entry->range_end = wbc->range_end; |
| 241 | __entry->nonblocking = wbc->nonblocking; |
| 242 | __entry->for_kupdate = wbc->for_kupdate; |
| 243 | __entry->for_reclaim = wbc->for_reclaim; |
| 244 | __entry->for_writepages = wbc->for_writepages; |
| 245 | __entry->range_cyclic = wbc->range_cyclic; |
| 246 | ), |
| 247 | |
| 248 | TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", |
| 249 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, |
| 250 | __entry->pages_skipped, __entry->range_start, |
| 251 | __entry->range_end, __entry->nonblocking, |
| 252 | __entry->for_kupdate, __entry->for_reclaim, |
| 253 | __entry->for_writepages, __entry->range_cyclic) |
| 254 | ); |
| 255 | |
| 256 | TRACE_EVENT(ext4_da_writepages_result, |
| 257 | TP_PROTO(struct inode *inode, struct writeback_control *wbc, |
| 258 | int ret, int pages_written), |
| 259 | |
| 260 | TP_ARGS(inode, wbc, ret, pages_written), |
| 261 | |
| 262 | TP_STRUCT__entry( |
| 263 | __field( dev_t, dev ) |
| 264 | __field( ino_t, ino ) |
| 265 | __field( int, ret ) |
| 266 | __field( int, pages_written ) |
| 267 | __field( long, pages_skipped ) |
| 268 | __field( char, encountered_congestion ) |
| 269 | __field( char, more_io ) |
| 270 | __field( char, no_nrwrite_index_update ) |
| 271 | ), |
| 272 | |
| 273 | TP_fast_assign( |
| 274 | __entry->dev = inode->i_sb->s_dev; |
| 275 | __entry->ino = inode->i_ino; |
| 276 | __entry->ret = ret; |
| 277 | __entry->pages_written = pages_written; |
| 278 | __entry->pages_skipped = wbc->pages_skipped; |
| 279 | __entry->encountered_congestion = wbc->encountered_congestion; |
| 280 | __entry->more_io = wbc->more_io; |
| 281 | __entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update; |
| 282 | ), |
| 283 | |
| 284 | TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld congestion %d more_io %d no_nrwrite_index_update %d", |
| 285 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->ret, |
| 286 | __entry->pages_written, __entry->pages_skipped, |
| 287 | __entry->encountered_congestion, __entry->more_io, |
| 288 | __entry->no_nrwrite_index_update) |
| 289 | ); |
| 290 | |
| 291 | TRACE_EVENT(ext4_da_write_begin, |
| 292 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 293 | unsigned int flags), |
| 294 | |
| 295 | TP_ARGS(inode, pos, len, flags), |
| 296 | |
| 297 | TP_STRUCT__entry( |
| 298 | __field( dev_t, dev ) |
| 299 | __field( ino_t, ino ) |
| 300 | __field( loff_t, pos ) |
| 301 | __field( unsigned int, len ) |
| 302 | __field( unsigned int, flags ) |
| 303 | ), |
| 304 | |
| 305 | TP_fast_assign( |
| 306 | __entry->dev = inode->i_sb->s_dev; |
| 307 | __entry->ino = inode->i_ino; |
| 308 | __entry->pos = pos; |
| 309 | __entry->len = len; |
| 310 | __entry->flags = flags; |
| 311 | ), |
| 312 | |
| 313 | TP_printk("dev %s ino %lu pos %llu len %u flags %u", |
| 314 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, |
| 315 | __entry->flags) |
| 316 | ); |
| 317 | |
| 318 | TRACE_EVENT(ext4_da_write_end, |
| 319 | TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, |
| 320 | unsigned int copied), |
| 321 | |
| 322 | TP_ARGS(inode, pos, len, copied), |
| 323 | |
| 324 | TP_STRUCT__entry( |
| 325 | __field( dev_t, dev ) |
| 326 | __field( ino_t, ino ) |
| 327 | __field( loff_t, pos ) |
| 328 | __field( unsigned int, len ) |
| 329 | __field( unsigned int, copied ) |
| 330 | ), |
| 331 | |
| 332 | TP_fast_assign( |
| 333 | __entry->dev = inode->i_sb->s_dev; |
| 334 | __entry->ino = inode->i_ino; |
| 335 | __entry->pos = pos; |
| 336 | __entry->len = len; |
| 337 | __entry->copied = copied; |
| 338 | ), |
| 339 | |
| 340 | TP_printk("dev %s ino %lu pos %llu len %u copied %u", |
| 341 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pos, __entry->len, |
| 342 | __entry->copied) |
| 343 | ); |
| 344 | |
Theodore Ts'o | 9bffad1 | 2009-06-17 11:48:11 -0400 | [diff] [blame] | 345 | TRACE_EVENT(ext4_discard_blocks, |
| 346 | TP_PROTO(struct super_block *sb, unsigned long long blk, |
| 347 | unsigned long long count), |
| 348 | |
| 349 | TP_ARGS(sb, blk, count), |
| 350 | |
| 351 | TP_STRUCT__entry( |
| 352 | __field( dev_t, dev ) |
| 353 | __field( __u64, blk ) |
| 354 | __field( __u64, count ) |
| 355 | |
| 356 | ), |
| 357 | |
| 358 | TP_fast_assign( |
| 359 | __entry->dev = sb->s_dev; |
| 360 | __entry->blk = blk; |
| 361 | __entry->count = count; |
| 362 | ), |
| 363 | |
| 364 | TP_printk("dev %s blk %llu count %llu", |
| 365 | jbd2_dev_to_name(__entry->dev), __entry->blk, __entry->count) |
| 366 | ); |
| 367 | |
| 368 | TRACE_EVENT(ext4_mb_new_inode_pa, |
| 369 | TP_PROTO(struct ext4_allocation_context *ac, |
| 370 | struct ext4_prealloc_space *pa), |
| 371 | |
| 372 | TP_ARGS(ac, pa), |
| 373 | |
| 374 | TP_STRUCT__entry( |
| 375 | __field( dev_t, dev ) |
| 376 | __field( ino_t, ino ) |
| 377 | __field( __u64, pa_pstart ) |
| 378 | __field( __u32, pa_len ) |
| 379 | __field( __u64, pa_lstart ) |
| 380 | |
| 381 | ), |
| 382 | |
| 383 | TP_fast_assign( |
| 384 | __entry->dev = ac->ac_sb->s_dev; |
| 385 | __entry->ino = ac->ac_inode->i_ino; |
| 386 | __entry->pa_pstart = pa->pa_pstart; |
| 387 | __entry->pa_len = pa->pa_len; |
| 388 | __entry->pa_lstart = pa->pa_lstart; |
| 389 | ), |
| 390 | |
| 391 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
| 392 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, |
| 393 | __entry->pa_len, __entry->pa_lstart) |
| 394 | ); |
| 395 | |
| 396 | TRACE_EVENT(ext4_mb_new_group_pa, |
| 397 | TP_PROTO(struct ext4_allocation_context *ac, |
| 398 | struct ext4_prealloc_space *pa), |
| 399 | |
| 400 | TP_ARGS(ac, pa), |
| 401 | |
| 402 | TP_STRUCT__entry( |
| 403 | __field( dev_t, dev ) |
| 404 | __field( ino_t, ino ) |
| 405 | __field( __u64, pa_pstart ) |
| 406 | __field( __u32, pa_len ) |
| 407 | __field( __u64, pa_lstart ) |
| 408 | |
| 409 | ), |
| 410 | |
| 411 | TP_fast_assign( |
| 412 | __entry->dev = ac->ac_sb->s_dev; |
| 413 | __entry->ino = ac->ac_inode->i_ino; |
| 414 | __entry->pa_pstart = pa->pa_pstart; |
| 415 | __entry->pa_len = pa->pa_len; |
| 416 | __entry->pa_lstart = pa->pa_lstart; |
| 417 | ), |
| 418 | |
| 419 | TP_printk("dev %s ino %lu pstart %llu len %u lstart %llu", |
| 420 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->pa_pstart, |
| 421 | __entry->pa_len, __entry->pa_lstart) |
| 422 | ); |
| 423 | |
| 424 | TRACE_EVENT(ext4_mb_release_inode_pa, |
| 425 | TP_PROTO(struct ext4_allocation_context *ac, |
| 426 | struct ext4_prealloc_space *pa, |
| 427 | unsigned long long block, unsigned int count), |
| 428 | |
| 429 | TP_ARGS(ac, pa, block, count), |
| 430 | |
| 431 | TP_STRUCT__entry( |
| 432 | __field( dev_t, dev ) |
| 433 | __field( ino_t, ino ) |
| 434 | __field( __u64, block ) |
| 435 | __field( __u32, count ) |
| 436 | |
| 437 | ), |
| 438 | |
| 439 | TP_fast_assign( |
| 440 | __entry->dev = ac->ac_sb->s_dev; |
| 441 | __entry->ino = ac->ac_inode->i_ino; |
| 442 | __entry->block = block; |
| 443 | __entry->count = count; |
| 444 | ), |
| 445 | |
| 446 | TP_printk("dev %s ino %lu block %llu count %u", |
| 447 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, |
| 448 | __entry->count) |
| 449 | ); |
| 450 | |
| 451 | TRACE_EVENT(ext4_mb_release_group_pa, |
| 452 | TP_PROTO(struct ext4_allocation_context *ac, |
| 453 | struct ext4_prealloc_space *pa), |
| 454 | |
| 455 | TP_ARGS(ac, pa), |
| 456 | |
| 457 | TP_STRUCT__entry( |
| 458 | __field( dev_t, dev ) |
| 459 | __field( ino_t, ino ) |
| 460 | __field( __u64, pa_pstart ) |
| 461 | __field( __u32, pa_len ) |
| 462 | |
| 463 | ), |
| 464 | |
| 465 | TP_fast_assign( |
| 466 | __entry->dev = ac->ac_sb->s_dev; |
| 467 | __entry->ino = ac->ac_inode->i_ino; |
| 468 | __entry->pa_pstart = pa->pa_pstart; |
| 469 | __entry->pa_len = pa->pa_len; |
| 470 | ), |
| 471 | |
| 472 | TP_printk("dev %s pstart %llu len %u", |
| 473 | jbd2_dev_to_name(__entry->dev), __entry->pa_pstart, __entry->pa_len) |
| 474 | ); |
| 475 | |
| 476 | TRACE_EVENT(ext4_discard_preallocations, |
| 477 | TP_PROTO(struct inode *inode), |
| 478 | |
| 479 | TP_ARGS(inode), |
| 480 | |
| 481 | TP_STRUCT__entry( |
| 482 | __field( dev_t, dev ) |
| 483 | __field( ino_t, ino ) |
| 484 | |
| 485 | ), |
| 486 | |
| 487 | TP_fast_assign( |
| 488 | __entry->dev = inode->i_sb->s_dev; |
| 489 | __entry->ino = inode->i_ino; |
| 490 | ), |
| 491 | |
| 492 | TP_printk("dev %s ino %lu", |
| 493 | jbd2_dev_to_name(__entry->dev), __entry->ino) |
| 494 | ); |
| 495 | |
| 496 | TRACE_EVENT(ext4_mb_discard_preallocations, |
| 497 | TP_PROTO(struct super_block *sb, int needed), |
| 498 | |
| 499 | TP_ARGS(sb, needed), |
| 500 | |
| 501 | TP_STRUCT__entry( |
| 502 | __field( dev_t, dev ) |
| 503 | __field( int, needed ) |
| 504 | |
| 505 | ), |
| 506 | |
| 507 | TP_fast_assign( |
| 508 | __entry->dev = sb->s_dev; |
| 509 | __entry->needed = needed; |
| 510 | ), |
| 511 | |
| 512 | TP_printk("dev %s needed %d", |
| 513 | jbd2_dev_to_name(__entry->dev), __entry->needed) |
| 514 | ); |
| 515 | |
| 516 | TRACE_EVENT(ext4_request_blocks, |
| 517 | TP_PROTO(struct ext4_allocation_request *ar), |
| 518 | |
| 519 | TP_ARGS(ar), |
| 520 | |
| 521 | TP_STRUCT__entry( |
| 522 | __field( dev_t, dev ) |
| 523 | __field( ino_t, ino ) |
| 524 | __field( unsigned int, flags ) |
| 525 | __field( unsigned int, len ) |
| 526 | __field( __u64, logical ) |
| 527 | __field( __u64, goal ) |
| 528 | __field( __u64, lleft ) |
| 529 | __field( __u64, lright ) |
| 530 | __field( __u64, pleft ) |
| 531 | __field( __u64, pright ) |
| 532 | ), |
| 533 | |
| 534 | TP_fast_assign( |
| 535 | __entry->dev = ar->inode->i_sb->s_dev; |
| 536 | __entry->ino = ar->inode->i_ino; |
| 537 | __entry->flags = ar->flags; |
| 538 | __entry->len = ar->len; |
| 539 | __entry->logical = ar->logical; |
| 540 | __entry->goal = ar->goal; |
| 541 | __entry->lleft = ar->lleft; |
| 542 | __entry->lright = ar->lright; |
| 543 | __entry->pleft = ar->pleft; |
| 544 | __entry->pright = ar->pright; |
| 545 | ), |
| 546 | |
| 547 | TP_printk("dev %s ino %lu flags %u len %u lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
| 548 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, |
| 549 | __entry->len, |
| 550 | (unsigned long long) __entry->logical, |
| 551 | (unsigned long long) __entry->goal, |
| 552 | (unsigned long long) __entry->lleft, |
| 553 | (unsigned long long) __entry->lright, |
| 554 | (unsigned long long) __entry->pleft, |
| 555 | (unsigned long long) __entry->pright) |
| 556 | ); |
| 557 | |
| 558 | TRACE_EVENT(ext4_allocate_blocks, |
| 559 | TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), |
| 560 | |
| 561 | TP_ARGS(ar, block), |
| 562 | |
| 563 | TP_STRUCT__entry( |
| 564 | __field( dev_t, dev ) |
| 565 | __field( ino_t, ino ) |
| 566 | __field( __u64, block ) |
| 567 | __field( unsigned int, flags ) |
| 568 | __field( unsigned int, len ) |
| 569 | __field( __u64, logical ) |
| 570 | __field( __u64, goal ) |
| 571 | __field( __u64, lleft ) |
| 572 | __field( __u64, lright ) |
| 573 | __field( __u64, pleft ) |
| 574 | __field( __u64, pright ) |
| 575 | ), |
| 576 | |
| 577 | TP_fast_assign( |
| 578 | __entry->dev = ar->inode->i_sb->s_dev; |
| 579 | __entry->ino = ar->inode->i_ino; |
| 580 | __entry->block = block; |
| 581 | __entry->flags = ar->flags; |
| 582 | __entry->len = ar->len; |
| 583 | __entry->logical = ar->logical; |
| 584 | __entry->goal = ar->goal; |
| 585 | __entry->lleft = ar->lleft; |
| 586 | __entry->lright = ar->lright; |
| 587 | __entry->pleft = ar->pleft; |
| 588 | __entry->pright = ar->pright; |
| 589 | ), |
| 590 | |
| 591 | TP_printk("dev %s ino %lu flags %u len %u block %llu lblk %llu goal %llu lleft %llu lright %llu pleft %llu pright %llu ", |
| 592 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->flags, |
| 593 | __entry->len, __entry->block, |
| 594 | (unsigned long long) __entry->logical, |
| 595 | (unsigned long long) __entry->goal, |
| 596 | (unsigned long long) __entry->lleft, |
| 597 | (unsigned long long) __entry->lright, |
| 598 | (unsigned long long) __entry->pleft, |
| 599 | (unsigned long long) __entry->pright) |
| 600 | ); |
| 601 | |
| 602 | TRACE_EVENT(ext4_free_blocks, |
| 603 | TP_PROTO(struct inode *inode, __u64 block, unsigned long count, |
| 604 | int metadata), |
| 605 | |
| 606 | TP_ARGS(inode, block, count, metadata), |
| 607 | |
| 608 | TP_STRUCT__entry( |
| 609 | __field( dev_t, dev ) |
| 610 | __field( ino_t, ino ) |
| 611 | __field( __u64, block ) |
| 612 | __field( unsigned long, count ) |
| 613 | __field( int, metadata ) |
| 614 | |
| 615 | ), |
| 616 | |
| 617 | TP_fast_assign( |
| 618 | __entry->dev = inode->i_sb->s_dev; |
| 619 | __entry->ino = inode->i_ino; |
| 620 | __entry->block = block; |
| 621 | __entry->count = count; |
| 622 | __entry->metadata = metadata; |
| 623 | ), |
| 624 | |
| 625 | TP_printk("dev %s ino %lu block %llu count %lu metadata %d", |
| 626 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->block, |
| 627 | __entry->count, __entry->metadata) |
| 628 | ); |
| 629 | |
| 630 | TRACE_EVENT(ext4_sync_file, |
| 631 | TP_PROTO(struct file *file, struct dentry *dentry, int datasync), |
| 632 | |
| 633 | TP_ARGS(file, dentry, datasync), |
| 634 | |
| 635 | TP_STRUCT__entry( |
| 636 | __field( dev_t, dev ) |
| 637 | __field( ino_t, ino ) |
| 638 | __field( ino_t, parent ) |
| 639 | __field( int, datasync ) |
| 640 | ), |
| 641 | |
| 642 | TP_fast_assign( |
| 643 | __entry->dev = dentry->d_inode->i_sb->s_dev; |
| 644 | __entry->ino = dentry->d_inode->i_ino; |
| 645 | __entry->datasync = datasync; |
| 646 | __entry->parent = dentry->d_parent->d_inode->i_ino; |
| 647 | ), |
| 648 | |
| 649 | TP_printk("dev %s ino %ld parent %ld datasync %d ", |
| 650 | jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->parent, |
| 651 | __entry->datasync) |
| 652 | ); |
| 653 | |
| 654 | TRACE_EVENT(ext4_sync_fs, |
| 655 | TP_PROTO(struct super_block *sb, int wait), |
| 656 | |
| 657 | TP_ARGS(sb, wait), |
| 658 | |
| 659 | TP_STRUCT__entry( |
| 660 | __field( dev_t, dev ) |
| 661 | __field( int, wait ) |
| 662 | |
| 663 | ), |
| 664 | |
| 665 | TP_fast_assign( |
| 666 | __entry->dev = sb->s_dev; |
| 667 | __entry->wait = wait; |
| 668 | ), |
| 669 | |
| 670 | TP_printk("dev %s wait %d", jbd2_dev_to_name(__entry->dev), |
| 671 | __entry->wait) |
| 672 | ); |
| 673 | |
| 674 | #endif /* _TRACE_EXT4_H */ |
| 675 | |
| 676 | /* This part must be outside protection */ |
| 677 | #include <trace/define_trace.h> |