diff options
-rw-r--r-- | fs/ext4/mballoc.c | 4 | ||||
-rw-r--r-- | include/trace/events/ext4.h | 20 |
2 files changed, 14 insertions, 10 deletions
diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index 3dfad95f0f98..8b3b9344a595 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c | |||
@@ -3575,7 +3575,7 @@ ext4_mb_release_inode_pa(struct ext4_buddy *e4b, struct buffer_head *bitmap_bh, | |||
3575 | trace_ext4_mballoc_discard(ac); | 3575 | trace_ext4_mballoc_discard(ac); |
3576 | } | 3576 | } |
3577 | 3577 | ||
3578 | trace_ext4_mb_release_inode_pa(ac, pa, grp_blk_start + bit, | 3578 | trace_ext4_mb_release_inode_pa(sb, ac, pa, grp_blk_start + bit, |
3579 | next - bit); | 3579 | next - bit); |
3580 | mb_free_blocks(pa->pa_inode, e4b, bit, next - bit); | 3580 | mb_free_blocks(pa->pa_inode, e4b, bit, next - bit); |
3581 | bit = next + 1; | 3581 | bit = next + 1; |
@@ -3606,7 +3606,7 @@ ext4_mb_release_group_pa(struct ext4_buddy *e4b, | |||
3606 | ext4_group_t group; | 3606 | ext4_group_t group; |
3607 | ext4_grpblk_t bit; | 3607 | ext4_grpblk_t bit; |
3608 | 3608 | ||
3609 | trace_ext4_mb_release_group_pa(ac, pa); | 3609 | trace_ext4_mb_release_group_pa(sb, ac, pa); |
3610 | BUG_ON(pa->pa_deleted == 0); | 3610 | BUG_ON(pa->pa_deleted == 0); |
3611 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); | 3611 | ext4_get_group_no_and_offset(sb, pa->pa_pstart, &group, &bit); |
3612 | BUG_ON(group != e4b->bd_group && pa->pa_len != 0); | 3612 | BUG_ON(group != e4b->bd_group && pa->pa_len != 0); |
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index f3865c7b4166..01e9e0076a92 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h | |||
@@ -395,11 +395,12 @@ DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, | |||
395 | ); | 395 | ); |
396 | 396 | ||
397 | TRACE_EVENT(ext4_mb_release_inode_pa, | 397 | TRACE_EVENT(ext4_mb_release_inode_pa, |
398 | TP_PROTO(struct ext4_allocation_context *ac, | 398 | TP_PROTO(struct super_block *sb, |
399 | struct ext4_allocation_context *ac, | ||
399 | struct ext4_prealloc_space *pa, | 400 | struct ext4_prealloc_space *pa, |
400 | unsigned long long block, unsigned int count), | 401 | unsigned long long block, unsigned int count), |
401 | 402 | ||
402 | TP_ARGS(ac, pa, block, count), | 403 | TP_ARGS(sb, ac, pa, block, count), |
403 | 404 | ||
404 | TP_STRUCT__entry( | 405 | TP_STRUCT__entry( |
405 | __field( dev_t, dev ) | 406 | __field( dev_t, dev ) |
@@ -410,8 +411,9 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
410 | ), | 411 | ), |
411 | 412 | ||
412 | TP_fast_assign( | 413 | TP_fast_assign( |
413 | __entry->dev = ac->ac_sb->s_dev; | 414 | __entry->dev = sb->s_dev; |
414 | __entry->ino = ac->ac_inode->i_ino; | 415 | __entry->ino = (ac && ac->ac_inode) ? |
416 | ac->ac_inode->i_ino : 0; | ||
415 | __entry->block = block; | 417 | __entry->block = block; |
416 | __entry->count = count; | 418 | __entry->count = count; |
417 | ), | 419 | ), |
@@ -422,10 +424,11 @@ TRACE_EVENT(ext4_mb_release_inode_pa, | |||
422 | ); | 424 | ); |
423 | 425 | ||
424 | TRACE_EVENT(ext4_mb_release_group_pa, | 426 | TRACE_EVENT(ext4_mb_release_group_pa, |
425 | TP_PROTO(struct ext4_allocation_context *ac, | 427 | TP_PROTO(struct super_block *sb, |
428 | struct ext4_allocation_context *ac, | ||
426 | struct ext4_prealloc_space *pa), | 429 | struct ext4_prealloc_space *pa), |
427 | 430 | ||
428 | TP_ARGS(ac, pa), | 431 | TP_ARGS(sb, ac, pa), |
429 | 432 | ||
430 | TP_STRUCT__entry( | 433 | TP_STRUCT__entry( |
431 | __field( dev_t, dev ) | 434 | __field( dev_t, dev ) |
@@ -436,8 +439,9 @@ TRACE_EVENT(ext4_mb_release_group_pa, | |||
436 | ), | 439 | ), |
437 | 440 | ||
438 | TP_fast_assign( | 441 | TP_fast_assign( |
439 | __entry->dev = ac->ac_sb->s_dev; | 442 | __entry->dev = sb->s_dev; |
440 | __entry->ino = ac->ac_inode->i_ino; | 443 | __entry->ino = (ac && ac->ac_inode) ? |
444 | ac->ac_inode->i_ino : 0; | ||
441 | __entry->pa_pstart = pa->pa_pstart; | 445 | __entry->pa_pstart = pa->pa_pstart; |
442 | __entry->pa_len = pa->pa_len; | 446 | __entry->pa_len = pa->pa_len; |
443 | ), | 447 | ), |