From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH v2 13/13] btrfs-progs: free-space-tree: Remove unsued function
Date: Wed, 5 Dec 2018 14:40:18 +0800 [thread overview]
Message-ID: <20181205064018.27755-14-wqu@suse.com> (raw)
In-Reply-To: <20181205064018.27755-1-wqu@suse.com>
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@suse.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
---
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
prev parent reply other threads:[~2018-12-05 6:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-05 6:40 [PATCH v2 00/13] btrfs-progs: Make W=1 great (no "again") Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 01/13] btrfs-progs: Makefile.extrawarn: Import cc-disable-warning Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 02/13] btrfs-progs: fix gcc8 default build warning caused by '-Wformat-truncation' Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 03/13] btrfs-progs: Makefile.extrawarn: Don't warn on sign compare Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 04/13] btrfs-progs: Fix Wempty-body warning Qu Wenruo
2018-12-13 18:59 ` David Sterba
2018-12-13 23:54 ` Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 05/13] btrfs-progs: Fix Wimplicit-fallthrough warning Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 06/13] btrfs-progs: Fix Wsuggest-attribute=format warning Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 07/13] btrfs-progs: Fix Wmaybe-uninitialized warning Qu Wenruo
2018-12-05 13:40 ` David Sterba
2018-12-05 14:03 ` Qu Wenruo
2019-01-15 17:42 ` David Sterba
2018-12-05 6:40 ` [PATCH v2 08/13] btrfs-progs: Fix Wtype-limits warning Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 09/13] btrfs-progs: Fix missing-prototypes warning caused by non-static functions Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 10/13] btrfs-progs: Move btrfs_check_nodesize to fsfeatures.c to fix missing-prototypes warning Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 11/13] btrfs-progs: Introduce rescue.h to resolve missing-prototypes for chunk and super rescue Qu Wenruo
2018-12-05 6:40 ` [PATCH v2 12/13] btrfs-progs: Add utils.h include to solve missing-prototypes warning Qu Wenruo
2018-12-05 6:40 ` Qu Wenruo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181205064018.27755-14-wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).