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 <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2022-10-28 02:55:51 +02:00
parent 35da5a7ede
commit 0988fc7bda
4 changed files with 31 additions and 33 deletions

View File

@@ -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;