Commit 7b439738 authored by David Sterba's avatar David Sterba

btrfs: switch extent_io_tree::track_uptodate to bool

This patch is split from the following one "btrfs: Introduce
extent_io_tree::owner to distinguish different io_trees" from Qu, so the
different changes are not mixed together.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent c258d6e3
...@@ -2142,7 +2142,7 @@ static void btrfs_init_btree_inode(struct btrfs_fs_info *fs_info) ...@@ -2142,7 +2142,7 @@ static void btrfs_init_btree_inode(struct btrfs_fs_info *fs_info)
RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node); RB_CLEAR_NODE(&BTRFS_I(inode)->rb_node);
extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, inode); extent_io_tree_init(fs_info, &BTRFS_I(inode)->io_tree, inode);
BTRFS_I(inode)->io_tree.track_uptodate = 0; BTRFS_I(inode)->io_tree.track_uptodate = false;
extent_map_tree_init(&BTRFS_I(inode)->extent_tree); extent_map_tree_init(&BTRFS_I(inode)->extent_tree);
BTRFS_I(inode)->io_tree.ops = &btree_extent_io_ops; BTRFS_I(inode)->io_tree.ops = &btree_extent_io_ops;
......
...@@ -111,7 +111,7 @@ struct extent_io_tree { ...@@ -111,7 +111,7 @@ struct extent_io_tree {
struct btrfs_fs_info *fs_info; struct btrfs_fs_info *fs_info;
void *private_data; void *private_data;
u64 dirty_bytes; u64 dirty_bytes;
int track_uptodate; bool track_uptodate;
spinlock_t lock; spinlock_t lock;
const struct extent_io_ops *ops; const struct extent_io_ops *ops;
}; };
......
...@@ -9184,8 +9184,8 @@ struct inode *btrfs_alloc_inode(struct super_block *sb) ...@@ -9184,8 +9184,8 @@ struct inode *btrfs_alloc_inode(struct super_block *sb)
extent_map_tree_init(&ei->extent_tree); extent_map_tree_init(&ei->extent_tree);
extent_io_tree_init(fs_info, &ei->io_tree, inode); extent_io_tree_init(fs_info, &ei->io_tree, inode);
extent_io_tree_init(fs_info, &ei->io_failure_tree, inode); extent_io_tree_init(fs_info, &ei->io_failure_tree, inode);
ei->io_tree.track_uptodate = 1; ei->io_tree.track_uptodate = true;
ei->io_failure_tree.track_uptodate = 1; ei->io_failure_tree.track_uptodate = true;
atomic_set(&ei->sync_writers, 0); atomic_set(&ei->sync_writers, 0);
mutex_init(&ei->log_mutex); mutex_init(&ei->log_mutex);
mutex_init(&ei->delalloc_mutex); mutex_init(&ei->delalloc_mutex);
......
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