diff options
author | Qu Wenruo <wqu@suse.com> | 2020-03-03 06:14:41 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2020-05-25 11:25:19 +0200 |
commit | 584fb12187f087f4909f74fa91dbb61856107684 (patch) | |
tree | a8a5af4244f74ea536f31c20fbcf199c95debd7c /fs/btrfs/relocation.c | |
parent | btrfs: rename tree_entry to rb_simple_node and export it (diff) | |
download | linux-584fb12187f087f4909f74fa91dbb61856107684.tar.xz linux-584fb12187f087f4909f74fa91dbb61856107684.zip |
btrfs: backref: rename and move backref_cache_init()
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/relocation.c')
-rw-r--r-- | fs/btrfs/relocation.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c index 09076ac21590..f0726b212c2f 100644 --- a/fs/btrfs/relocation.c +++ b/fs/btrfs/relocation.c @@ -178,22 +178,6 @@ static void mapping_tree_init(struct mapping_tree *tree) spin_lock_init(&tree->lock); } -static void backref_cache_init(struct btrfs_fs_info *fs_info, - struct btrfs_backref_cache *cache, int is_reloc) -{ - int i; - cache->rb_root = RB_ROOT; - for (i = 0; i < BTRFS_MAX_LEVEL; i++) - INIT_LIST_HEAD(&cache->pending[i]); - INIT_LIST_HEAD(&cache->changed); - INIT_LIST_HEAD(&cache->detached); - INIT_LIST_HEAD(&cache->leaves); - INIT_LIST_HEAD(&cache->pending_edge); - INIT_LIST_HEAD(&cache->useless_node); - cache->fs_info = fs_info; - cache->is_reloc = is_reloc; -} - static void backref_cache_cleanup(struct btrfs_backref_cache *cache) { struct btrfs_backref_node *node; @@ -4231,7 +4215,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); - backref_cache_init(fs_info, &rc->backref_cache, 1); + btrfs_backref_init_cache(fs_info, &rc->backref_cache, 1); mapping_tree_init(&rc->reloc_root_tree); extent_io_tree_init(fs_info, &rc->processed_blocks, IO_TREE_RELOC_BLOCKS, NULL); |