btrfs-progs: cleanups after block group cache refactoring

btrfs_fs_info::block_group_cache and the bit BLOCK_GROUP_DIRY are not
used anymore, so is the block_group_state_bits().  Remove them.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Su Yue <Damenly_Su@gmx.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Su Yue 2019-12-18 13:18:49 +08:00 committed by David Sterba
parent b1bd3cd93f
commit fac618e0eb
4 changed files with 0 additions and 17 deletions

View File

@ -1150,7 +1150,6 @@ struct btrfs_fs_info {
struct extent_io_tree extent_cache;
struct extent_io_tree free_space_cache;
struct extent_io_tree block_group_cache;
struct extent_io_tree pinned_extents;
struct extent_io_tree extent_ins;
struct extent_io_tree *excluded_extents;

View File

@ -794,7 +794,6 @@ struct btrfs_fs_info *btrfs_new_fs_info(int writable, u64 sb_bytenr)
extent_io_tree_init(&fs_info->extent_cache);
extent_io_tree_init(&fs_info->free_space_cache);
extent_io_tree_init(&fs_info->block_group_cache);
extent_io_tree_init(&fs_info->pinned_extents);
extent_io_tree_init(&fs_info->extent_ins);
@ -1069,7 +1068,6 @@ void btrfs_cleanup_all_caches(struct btrfs_fs_info *fs_info)
free_mapping_cache_tree(&fs_info->mapping_tree.cache_tree);
extent_io_tree_cleanup(&fs_info->extent_cache);
extent_io_tree_cleanup(&fs_info->free_space_cache);
extent_io_tree_cleanup(&fs_info->block_group_cache);
extent_io_tree_cleanup(&fs_info->pinned_extents);
extent_io_tree_cleanup(&fs_info->extent_ins);
}

View File

@ -329,18 +329,6 @@ wrapped:
goto again;
}
static int block_group_state_bits(u64 flags)
{
int bits = 0;
if (flags & BTRFS_BLOCK_GROUP_DATA)
bits |= BLOCK_GROUP_DATA;
if (flags & BTRFS_BLOCK_GROUP_METADATA)
bits |= BLOCK_GROUP_METADATA;
if (flags & BTRFS_BLOCK_GROUP_SYSTEM)
bits |= BLOCK_GROUP_SYSTEM;
return bits;
}
static struct btrfs_block_group_cache *
btrfs_find_block_group(struct btrfs_root *root, struct btrfs_block_group_cache
*hint, u64 search_start, int data, int owner)

View File

@ -47,8 +47,6 @@
#define BLOCK_GROUP_METADATA (1U << 2)
#define BLOCK_GROUP_SYSTEM (1U << 4)
#define BLOCK_GROUP_DIRTY (1U)
/*
* The extent buffer bitmap operations are done with byte granularity instead of
* word granularity for two reasons: