From 0988fc7bda79feff046056f032fd149ab08e03d1 Mon Sep 17 00:00:00 2001 From: David Sterba Date: Fri, 28 Oct 2022 02:55:51 +0200 Subject: btrfs: switch extent_io_tree::private_data to btrfs_inode and rename The extent_io_tree::private_data was meant to be a preparatory work for the metadata inode rework but that never materialized. Now it's used only for an inode so it's better to change the appropriate type and rename it. Reviewed-by: Anand Jain Signed-off-by: David Sterba --- include/trace/events/btrfs.h | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'include/trace/events') diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index ed50e81174bf..0bce0b4ff2fa 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -1993,12 +1993,11 @@ TRACE_EVENT(btrfs_set_extent_bit, TP_fast_assign_btrfs(tree->fs_info, __entry->owner = tree->owner; - if (tree->private_data) { - const struct inode *inode = tree->private_data; + if (tree->inode) { + const struct btrfs_inode *inode = tree->inode; - __entry->ino = btrfs_ino(BTRFS_I(inode)); - __entry->rootid = - BTRFS_I(inode)->root->root_key.objectid; + __entry->ino = btrfs_ino(inode); + __entry->rootid = inode->root->root_key.objectid; } else { __entry->ino = 0; __entry->rootid = 0; @@ -2032,12 +2031,11 @@ TRACE_EVENT(btrfs_clear_extent_bit, TP_fast_assign_btrfs(tree->fs_info, __entry->owner = tree->owner; - if (tree->private_data) { - const struct inode *inode = tree->private_data; + if (tree->inode) { + const struct btrfs_inode *inode = tree->inode; - __entry->ino = btrfs_ino(BTRFS_I(inode)); - __entry->rootid = - BTRFS_I(inode)->root->root_key.objectid; + __entry->ino = btrfs_ino(inode); + __entry->rootid = inode->root->root_key.objectid; } else { __entry->ino = 0; __entry->rootid = 0; @@ -2072,12 +2070,11 @@ TRACE_EVENT(btrfs_convert_extent_bit, TP_fast_assign_btrfs(tree->fs_info, __entry->owner = tree->owner; - if (tree->private_data) { - const struct inode *inode = tree->private_data; + if (tree->inode) { + const struct btrfs_inode *inode = tree->inode; - __entry->ino = btrfs_ino(BTRFS_I(inode)); - __entry->rootid = - BTRFS_I(inode)->root->root_key.objectid; + __entry->ino = btrfs_ino(inode); + __entry->rootid = inode->root->root_key.objectid; } else { __entry->ino = 0; __entry->rootid = 0; -- cgit v1.2.3