set_free_space_tree_thresholds() is never used, just remove it to solve
the missing-prototypes warning from make W=1.
Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
Reviewed-by: Nikolay Borisov <nborisov@xxxxxxxx>
---
free-space-tree.c | 29 -----------------------------
1 file changed, 29 deletions(-)
diff --git a/free-space-tree.c b/free-space-tree.c
index b3ffa90f704c..af141e6e611a 100644
--- a/free-space-tree.c
+++ b/free-space-tree.c
@@ -24,35 +24,6 @@
#include "bitops.h"
#include "internal.h"
-void set_free_space_tree_thresholds(struct btrfs_block_group_cache *cache,
- u64 sectorsize)
-{
- u32 bitmap_range;
- size_t bitmap_size;
- u64 num_bitmaps, total_bitmap_size;
-
- /*
- * We convert to bitmaps when the disk space required for using extents
- * exceeds that required for using bitmaps.
- */
- bitmap_range = sectorsize * BTRFS_FREE_SPACE_BITMAP_BITS;
- num_bitmaps = div_u64(cache->key.offset + bitmap_range - 1,
- bitmap_range);
- bitmap_size = sizeof(struct btrfs_item) + BTRFS_FREE_SPACE_BITMAP_SIZE;
- total_bitmap_size = num_bitmaps * bitmap_size;
- cache->bitmap_high_thresh = div_u64(total_bitmap_size,
- sizeof(struct btrfs_item));
-
- /*
- * We allow for a small buffer between the high threshold and low
- * threshold to avoid thrashing back and forth between the two formats.
- */
- if (cache->bitmap_high_thresh > 100)
- cache->bitmap_low_thresh = cache->bitmap_high_thresh - 100;
- else
- cache->bitmap_low_thresh = 0;
-}
-
static struct btrfs_free_space_info *
search_free_space_info(struct btrfs_trans_handle *trans,
struct btrfs_fs_info *fs_info,
--
2.19.2