@@ -1146,7 +1146,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;
@@ -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);
}
@@ -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)
@@ -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: