summaryrefslogtreecommitdiff
path: root/free-space-cache.c
diff options
context:
space:
mode:
authorQu Wenruo <quwenruo@cn.fujitsu.com>2014-12-19 14:13:11 +0800
committerDavid Sterba <dsterba@suse.cz>2014-12-19 15:05:01 +0100
commit97bf00f5955e9431b1d07c2b3040b20d33b9b33b (patch)
tree68ab720a82c902cb58b4e999ebbc54f718ffb16b /free-space-cache.c
parentfc42d7f1df4d6cf43ad73fb3f688819eede48cbf (diff)
btrfs-progs: Remove a unused function offset_to_bitmap()
Fix the following clang warning: free-space-cache.c:464:19: warning: unused function 'offset_to_bitmap' [-Wunused-function] static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl, ^ 1 warning generated. Signed-off-by: Qu Wenruo <quwenruo@cn.fujitsu.com> Reviewed-by: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com> Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'free-space-cache.c')
-rw-r--r--free-space-cache.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/free-space-cache.c b/free-space-cache.c
index 220449ec..99ad4200 100644
--- a/free-space-cache.c
+++ b/free-space-cache.c
@@ -461,22 +461,6 @@ static inline unsigned long bytes_to_bits(u64 bytes, u32 unit)
return (unsigned long)(bytes / unit);
}
-static inline u64 offset_to_bitmap(struct btrfs_free_space_ctl *ctl,
- u64 offset)
-{
- u64 bitmap_start;
- u64 bytes_per_bitmap;
- u32 sectorsize = ctl->sectorsize;
-
- bytes_per_bitmap = BITS_PER_BITMAP(sectorsize) * ctl->unit;
- bitmap_start = offset - ctl->start;
- bitmap_start = bitmap_start / bytes_per_bitmap;
- bitmap_start *= bytes_per_bitmap;
- bitmap_start += ctl->start;
-
- return bitmap_start;
-}
-
static int tree_insert_offset(struct rb_root *root, u64 offset,
struct rb_node *node, int bitmap)
{