summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-cache-target.c
diff options
context:
space:
mode:
authorJoe Thornber <ejt@redhat.com>2015-05-15 16:22:02 +0200
committerMike Snitzer <snitzer@redhat.com>2015-05-29 20:19:05 +0200
commit451b9e0071b2833744db7f518115bc085bc7b23c (patch)
tree40f56515e7d9f5c125e6b4d088729737b648c466 /drivers/md/dm-cache-target.c
parentdm cache: pass a new 'critical' flag to the policies when requesting writebac... (diff)
downloadlinux-451b9e0071b2833744db7f518115bc085bc7b23c.tar.xz
linux-451b9e0071b2833744db7f518115bc085bc7b23c.zip
dm cache: pull out some bitset utility functions for reuse
Signed-off-by: Joe Thornber <ejt@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Diffstat (limited to 'drivers/md/dm-cache-target.c')
-rw-r--r--drivers/md/dm-cache-target.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/md/dm-cache-target.c b/drivers/md/dm-cache-target.c
index 5a9cd2c5a359..5d3b20b91ba3 100644
--- a/drivers/md/dm-cache-target.c
+++ b/drivers/md/dm-cache-target.c
@@ -111,30 +111,6 @@ static void iot_io_end(struct io_tracker *iot, sector_t len)
/*----------------------------------------------------------------*/
-static size_t bitset_size_in_bytes(unsigned nr_entries)
-{
- return sizeof(unsigned long) * dm_div_up(nr_entries, BITS_PER_LONG);
-}
-
-static unsigned long *alloc_bitset(unsigned nr_entries)
-{
- size_t s = bitset_size_in_bytes(nr_entries);
- return vzalloc(s);
-}
-
-static void clear_bitset(void *bitset, unsigned nr_entries)
-{
- size_t s = bitset_size_in_bytes(nr_entries);
- memset(bitset, 0, s);
-}
-
-static void free_bitset(unsigned long *bits)
-{
- vfree(bits);
-}
-
-/*----------------------------------------------------------------*/
-
/*
* There are a couple of places where we let a bio run, but want to do some
* work before calling its endio function. We do this by temporarily