mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
btrfs: make ordered extent tracepoint take btrfs_inode
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6d072c8e29
commit
acbf1dd0fc
@ -217,7 +217,7 @@ static int __btrfs_add_ordered_extent(struct btrfs_inode *inode, u64 file_offset
|
||||
INIT_LIST_HEAD(&entry->work_list);
|
||||
init_completion(&entry->completion);
|
||||
|
||||
trace_btrfs_ordered_extent_add(&inode->vfs_inode, entry);
|
||||
trace_btrfs_ordered_extent_add(inode, entry);
|
||||
|
||||
spin_lock_irq(&tree->lock);
|
||||
node = tree_insert(&tree->tree, file_offset,
|
||||
@ -442,7 +442,7 @@ void btrfs_put_ordered_extent(struct btrfs_ordered_extent *entry)
|
||||
struct list_head *cur;
|
||||
struct btrfs_ordered_sum *sum;
|
||||
|
||||
trace_btrfs_ordered_extent_put(entry->inode, entry);
|
||||
trace_btrfs_ordered_extent_put(BTRFS_I(entry->inode), entry);
|
||||
|
||||
if (refcount_dec_and_test(&entry->refs)) {
|
||||
ASSERT(list_empty(&entry->root_extent_list));
|
||||
@ -528,7 +528,7 @@ void btrfs_remove_ordered_extent(struct inode *inode,
|
||||
list_del_init(&entry->root_extent_list);
|
||||
root->nr_ordered_extents--;
|
||||
|
||||
trace_btrfs_ordered_extent_remove(inode, entry);
|
||||
trace_btrfs_ordered_extent_remove(BTRFS_I(inode), entry);
|
||||
|
||||
if (!root->nr_ordered_extents) {
|
||||
spin_lock(&fs_info->ordered_root_lock);
|
||||
@ -658,7 +658,7 @@ void btrfs_start_ordered_extent(struct inode *inode,
|
||||
u64 start = entry->file_offset;
|
||||
u64 end = start + entry->num_bytes - 1;
|
||||
|
||||
trace_btrfs_ordered_extent_start(inode, entry);
|
||||
trace_btrfs_ordered_extent_start(BTRFS_I(inode), entry);
|
||||
|
||||
/*
|
||||
* pages in the range can be dirty, clean or writeback. We
|
||||
|
@ -510,7 +510,7 @@ DEFINE_EVENT(
|
||||
|
||||
DECLARE_EVENT_CLASS(btrfs__ordered_extent,
|
||||
|
||||
TP_PROTO(const struct inode *inode,
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
const struct btrfs_ordered_extent *ordered),
|
||||
|
||||
TP_ARGS(inode, ordered),
|
||||
@ -529,8 +529,8 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
|
||||
__field( u64, truncated_len )
|
||||
),
|
||||
|
||||
TP_fast_assign_btrfs(btrfs_sb(inode->i_sb),
|
||||
__entry->ino = btrfs_ino(BTRFS_I(inode));
|
||||
TP_fast_assign_btrfs(inode->root->fs_info,
|
||||
__entry->ino = btrfs_ino(inode);
|
||||
__entry->file_offset = ordered->file_offset;
|
||||
__entry->start = ordered->disk_bytenr;
|
||||
__entry->len = ordered->num_bytes;
|
||||
@ -539,8 +539,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
|
||||
__entry->flags = ordered->flags;
|
||||
__entry->compress_type = ordered->compress_type;
|
||||
__entry->refs = refcount_read(&ordered->refs);
|
||||
__entry->root_objectid =
|
||||
BTRFS_I(inode)->root->root_key.objectid;
|
||||
__entry->root_objectid = inode->root->root_key.objectid;
|
||||
__entry->truncated_len = ordered->truncated_len;
|
||||
),
|
||||
|
||||
@ -563,7 +562,7 @@ DECLARE_EVENT_CLASS(btrfs__ordered_extent,
|
||||
|
||||
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add,
|
||||
|
||||
TP_PROTO(const struct inode *inode,
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
const struct btrfs_ordered_extent *ordered),
|
||||
|
||||
TP_ARGS(inode, ordered)
|
||||
@ -571,7 +570,7 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add,
|
||||
|
||||
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove,
|
||||
|
||||
TP_PROTO(const struct inode *inode,
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
const struct btrfs_ordered_extent *ordered),
|
||||
|
||||
TP_ARGS(inode, ordered)
|
||||
@ -579,7 +578,7 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove,
|
||||
|
||||
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start,
|
||||
|
||||
TP_PROTO(const struct inode *inode,
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
const struct btrfs_ordered_extent *ordered),
|
||||
|
||||
TP_ARGS(inode, ordered)
|
||||
@ -587,7 +586,7 @@ DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start,
|
||||
|
||||
DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put,
|
||||
|
||||
TP_PROTO(const struct inode *inode,
|
||||
TP_PROTO(const struct btrfs_inode *inode,
|
||||
const struct btrfs_ordered_extent *ordered),
|
||||
|
||||
TP_ARGS(inode, ordered)
|
||||
|
Loading…
Reference in New Issue
Block a user