aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2011-03-02 03:50:21 -0500
committerLi Zefan <lizf@cn.fujitsu.com>2011-04-25 04:45:59 -0400
commit92c423118105e1c8c1587367a26eeb3277bda89a (patch)
treefff00ab60c0e2b82b0ab5a997ce311e13390bfa9
parentf65647c29b14f5a32ff6f3237b0ef3b375ed5a79 (diff)
Btrfs: Remove unused btrfs_block_group_free_space()
We've already recorded the value in block_group->frees_space. Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
-rw-r--r--fs/btrfs/free-space-cache.c15
-rw-r--r--fs/btrfs/free-space-cache.h1
2 files changed, 0 insertions, 16 deletions
diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 11d2e9cea09e..3af64c6ea9df 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -1685,21 +1685,6 @@ void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
1685 "\n", count); 1685 "\n", count);
1686} 1686}
1687 1687
1688u64 btrfs_block_group_free_space(struct btrfs_block_group_cache *block_group)
1689{
1690 struct btrfs_free_space *info;
1691 struct rb_node *n;
1692 u64 ret = 0;
1693
1694 for (n = rb_first(&block_group->free_space_offset); n;
1695 n = rb_next(n)) {
1696 info = rb_entry(n, struct btrfs_free_space, offset_index);
1697 ret += info->bytes;
1698 }
1699
1700 return ret;
1701}
1702
1703/* 1688/*
1704 * for a given cluster, put all of its extents back into the free 1689 * for a given cluster, put all of its extents back into the free
1705 * space cache. If the block group passed doesn't match the block group 1690 * space cache. If the block group passed doesn't match the block group
diff --git a/fs/btrfs/free-space-cache.h b/fs/btrfs/free-space-cache.h
index 65c3b935289f..12b2b5165f8a 100644
--- a/fs/btrfs/free-space-cache.h
+++ b/fs/btrfs/free-space-cache.h
@@ -55,7 +55,6 @@ u64 btrfs_find_space_for_alloc(struct btrfs_block_group_cache *block_group,
55 u64 offset, u64 bytes, u64 empty_size); 55 u64 offset, u64 bytes, u64 empty_size);
56void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group, 56void btrfs_dump_free_space(struct btrfs_block_group_cache *block_group,
57 u64 bytes); 57 u64 bytes);
58u64 btrfs_block_group_free_space(struct btrfs_block_group_cache *block_group);
59int btrfs_find_space_cluster(struct btrfs_trans_handle *trans, 58int btrfs_find_space_cluster(struct btrfs_trans_handle *trans,
60 struct btrfs_root *root, 59 struct btrfs_root *root,
61 struct btrfs_block_group_cache *block_group, 60 struct btrfs_block_group_cache *block_group,