btrfs: switch btrfs_backref_cache::is_reloc to bool
authorDavid Sterba <dsterba@suse.com>
Fri, 22 Sep 2023 11:07:23 +0000 (13:07 +0200)
committerDavid Sterba <dsterba@suse.com>
Thu, 12 Oct 2023 14:44:13 +0000 (16:44 +0200)
The btrfs_backref_cache::is_reloc is an indicator variable and should
use a bool type.

Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/backref.c
fs/btrfs/backref.h
fs/btrfs/relocation.c

index 0cde873bdee2b9ff8cc2030facd425a3cdd8f65d..0dc91bf654b5606136258ca2718d0ae84b34d223 100644 (file)
@@ -3001,7 +3001,7 @@ int btrfs_backref_iter_next(struct btrfs_backref_iter *iter)
 }
 
 void btrfs_backref_init_cache(struct btrfs_fs_info *fs_info,
-                             struct btrfs_backref_cache *cache, int is_reloc)
+                             struct btrfs_backref_cache *cache, bool is_reloc)
 {
        int i;
 
index 3b077d10bbc0d5f75701c70a9a2d41b8f714856d..83a9a34e948e03e06c004afa1d843486296eb977 100644 (file)
@@ -440,11 +440,11 @@ struct btrfs_backref_cache {
         * Reloction backref cache require more info for reloc root compared
         * to generic backref cache.
         */
-       unsigned int is_reloc;
+       bool is_reloc;
 };
 
 void btrfs_backref_init_cache(struct btrfs_fs_info *fs_info,
-                             struct btrfs_backref_cache *cache, int is_reloc);
+                             struct btrfs_backref_cache *cache, bool is_reloc);
 struct btrfs_backref_node *btrfs_backref_alloc_node(
                struct btrfs_backref_cache *cache, u64 bytenr, int level);
 struct btrfs_backref_edge *btrfs_backref_alloc_edge(
index 3e662cadecafdde7c4b13e34c0259ad606e5545f..75463377f418e072fa575dc46a37e0177b87eacd 100644 (file)
@@ -4016,7 +4016,7 @@ static struct reloc_control *alloc_reloc_control(struct btrfs_fs_info *fs_info)
 
        INIT_LIST_HEAD(&rc->reloc_roots);
        INIT_LIST_HEAD(&rc->dirty_subvol_roots);
-       btrfs_backref_init_cache(fs_info, &rc->backref_cache, 1);
+       btrfs_backref_init_cache(fs_info, &rc->backref_cache, true);
        rc->reloc_root_tree.rb_root = RB_ROOT;
        spin_lock_init(&rc->reloc_root_tree.lock);
        extent_io_tree_init(fs_info, &rc->processed_blocks, IO_TREE_RELOC_BLOCKS);