]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
btrfs: use own btree inode io_tree owner id
authorQu Wenruo <wqu@suse.com>
Tue, 15 Sep 2020 05:35:27 +0000 (13:35 +0800)
committerDavid Sterba <dsterba@suse.com>
Wed, 7 Oct 2020 10:13:22 +0000 (12:13 +0200)
Btree inode is special compared to all other inode extent io_trees,
although it has a btrfs inode, it doesn't have the track_uptodate bit at
all.

This means a lot of things like extent locking doesn't even need to be
applied to btree io tree.

Since it's so special, adds a new owner value for it to make debuging a
little easier.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c
fs/btrfs/extent-io-tree.h
include/trace/events/btrfs.h

index 53b588a7e1509b5b7e9e2021af28772d73e207d8..ebc110231f30ba192073b09c0a85ca548535bdef 100644 (file)
@@ -2062,7 +2062,7 @@ static void btrfs_init_btree_inode(struct btrfs_fs_info *fs_info)
 
        RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node);
        extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree,
-                           IO_TREE_INODE_IO, inode);
+                           IO_TREE_BTREE_INODE_IO, inode);
        BTRFS_I(inode)->io_tree.track_uptodate = false;
        extent_map_tree_init(&BTRFS_I(inode)->extent_tree);
 
index 250b8cbaaf97ac53cb1a9752f7d095fbb0b21018..53e7b5b5d6ad2b9af958f2d86ed25f102fb10589 100644 (file)
@@ -40,6 +40,7 @@ struct io_failure_record;
 enum {
        IO_TREE_FS_PINNED_EXTENTS,
        IO_TREE_FS_EXCLUDED_EXTENTS,
+       IO_TREE_BTREE_INODE_IO,
        IO_TREE_INODE_IO,
        IO_TREE_INODE_IO_FAILURE,
        IO_TREE_RELOC_BLOCKS,
index 8d311062d3765336f398f7257437ec12f2c35054..ecd24c719de4d3e2c24230941038d2ed20b86977 100644 (file)
@@ -79,6 +79,7 @@ struct btrfs_space_info;
 #define IO_TREE_OWNER                                              \
        EM( IO_TREE_FS_PINNED_EXTENTS,    "PINNED_EXTENTS")         \
        EM( IO_TREE_FS_EXCLUDED_EXTENTS,  "EXCLUDED_EXTENTS")       \
+       EM( IO_TREE_BTREE_INODE_IO,       "BTREE_INODE_IO")         \
        EM( IO_TREE_INODE_IO,             "INODE_IO")               \
        EM( IO_TREE_INODE_IO_FAILURE,     "INODE_IO_FAILURE")       \
        EM( IO_TREE_RELOC_BLOCKS,         "RELOC_BLOCKS")           \