Searched refs:nr_buckets (Results 1 - 4 of 4) sorted by relevance

/linux-4.4.14/drivers/md/
H A Ddm-region-hash.c68 unsigned nr_buckets; member in struct:dm_region_hash
170 unsigned nr_buckets, max_buckets; dm_region_hash_create() local
178 for (nr_buckets = 128u; nr_buckets < max_buckets; nr_buckets <<= 1) dm_region_hash_create()
180 nr_buckets >>= 1; dm_region_hash_create()
198 rh->mask = nr_buckets - 1; dm_region_hash_create()
199 rh->nr_buckets = nr_buckets; dm_region_hash_create()
204 rh->buckets = vmalloc(nr_buckets * sizeof(*rh->buckets)); dm_region_hash_create()
211 for (i = 0; i < nr_buckets; i++) dm_region_hash_create()
241 for (h = 0; h < rh->nr_buckets; h++) { dm_region_hash_destroy()
H A Ddm-cache-policy-cleaner.c35 unsigned nr_buckets; member in struct:hash
85 hash->nr_buckets = next_power(elts >> 4, 16); alloc_hash()
86 hash->hash_bits = __ffs(hash->nr_buckets); alloc_hash()
87 hash->table = vzalloc(sizeof(*hash->table) * hash->nr_buckets); alloc_hash()
H A Ddm-cache-policy-smq.c565 unsigned i, nr_buckets; h_init() local
568 nr_buckets = roundup_pow_of_two(max(nr_entries / 4u, 16u)); h_init()
569 ht->hash_bits = __ffs(nr_buckets); h_init()
571 ht->buckets = vmalloc(sizeof(*ht->buckets) * nr_buckets); h_init()
575 for (i = 0; i < nr_buckets; i++) h_init()
H A Ddm-cache-policy-mq.c479 unsigned nr_buckets; member in struct:mq_policy
1412 mq->nr_buckets = next_power(from_cblock(cache_size) / 2, 16); mq_create()
1413 mq->hash_bits = __ffs(mq->nr_buckets); mq_create()
1414 mq->table = vzalloc(sizeof(*mq->table) * mq->nr_buckets); mq_create()

Completed in 148 milliseconds