Commit 64425500 authored by Naohiro Aota's avatar Naohiro Aota Committed by David Sterba

btrfs: tracepoints: also show actual number of the outstanding extents

The btrfs_inode_mod_outstanding_extents trace event only shows the modified
number to the number of outstanding extents. It would be helpful if we can
see the resulting extent number as well.
Signed-off-by: default avatarNaohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c9e561c4
...@@ -332,7 +332,7 @@ static inline void btrfs_mod_outstanding_extents(struct btrfs_inode *inode, ...@@ -332,7 +332,7 @@ static inline void btrfs_mod_outstanding_extents(struct btrfs_inode *inode,
if (btrfs_is_free_space_inode(inode)) if (btrfs_is_free_space_inode(inode))
return; return;
trace_btrfs_inode_mod_outstanding_extents(inode->root, btrfs_ino(inode), trace_btrfs_inode_mod_outstanding_extents(inode->root, btrfs_ino(inode),
mod); mod, inode->outstanding_extents);
} }
/* /*
......
...@@ -2011,25 +2011,27 @@ DEFINE_EVENT(btrfs__prelim_ref, btrfs_prelim_ref_insert, ...@@ -2011,25 +2011,27 @@ DEFINE_EVENT(btrfs__prelim_ref, btrfs_prelim_ref_insert,
); );
TRACE_EVENT(btrfs_inode_mod_outstanding_extents, TRACE_EVENT(btrfs_inode_mod_outstanding_extents,
TP_PROTO(const struct btrfs_root *root, u64 ino, int mod), TP_PROTO(const struct btrfs_root *root, u64 ino, int mod, unsigned outstanding),
TP_ARGS(root, ino, mod), TP_ARGS(root, ino, mod, outstanding),
TP_STRUCT__entry_btrfs( TP_STRUCT__entry_btrfs(
__field( u64, root_objectid ) __field( u64, root_objectid )
__field( u64, ino ) __field( u64, ino )
__field( int, mod ) __field( int, mod )
__field( unsigned, outstanding )
), ),
TP_fast_assign_btrfs(root->fs_info, TP_fast_assign_btrfs(root->fs_info,
__entry->root_objectid = root->root_key.objectid; __entry->root_objectid = root->root_key.objectid;
__entry->ino = ino; __entry->ino = ino;
__entry->mod = mod; __entry->mod = mod;
__entry->outstanding = outstanding;
), ),
TP_printk_btrfs("root=%llu(%s) ino=%llu mod=%d", TP_printk_btrfs("root=%llu(%s) ino=%llu mod=%d outstanding=%u",
show_root_type(__entry->root_objectid), show_root_type(__entry->root_objectid),
__entry->ino, __entry->mod) __entry->ino, __entry->mod, __entry->outstanding)
); );
DECLARE_EVENT_CLASS(btrfs__block_group, DECLARE_EVENT_CLASS(btrfs__block_group,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment