Home
last modified time | relevance | path

Searched refs:from_cblock (Results 1 – 6 of 6) sorted by relevance

/linux-4.4.14/drivers/md/
Ddm-cache-policy-cleaner.c101 p->cblocks = vzalloc(sizeof(*p->cblocks) * from_cblock(cache_size)); in alloc_cache_blocks_with_hash()
103 unsigned u = from_cblock(cache_size); in alloc_cache_blocks_with_hash()
111 r = alloc_hash(&p->chash, from_cblock(cache_size)); in alloc_cache_blocks_with_hash()
129 BUG_ON(from_cblock(p->nr_cblocks_allocated) >= from_cblock(p->cache_size)); in alloc_cache_entry()
132 p->nr_cblocks_allocated = to_cblock(from_cblock(p->nr_cblocks_allocated) + 1); in alloc_cache_entry()
326 BUG_ON(!from_cblock(p->nr_cblocks_allocated)); in wb_remove_mapping()
327 p->nr_cblocks_allocated = to_cblock(from_cblock(p->nr_cblocks_allocated) - 1); in wb_remove_mapping()
Ddm-cache-metadata.c650 disk_super->cache_blocks = cpu_to_le32(from_cblock(cmd->cache_blocks)); in __commit_transaction()
834 r = dm_array_get_value(&cmd->info, cmd->root, from_cblock(b), &value); in block_unmapped_or_clean()
860 (unsigned long long) from_cblock(begin)); in blocks_are_unmapped_or_clean()
864 begin = to_cblock(from_cblock(begin) + 1); in blocks_are_unmapped_or_clean()
929 if (from_cblock(new_cache_size) < from_cblock(cmd->cache_blocks)) { in dm_cache_resize()
944 r = dm_array_resize(&cmd->info, cmd->root, from_cblock(cmd->cache_blocks), in dm_cache_resize()
945 from_cblock(new_cache_size), in dm_cache_resize()
1077 r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock), in __remove()
1104 r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock), in __insert()
1276 r = dm_array_get_value(&cmd->info, cmd->root, from_cblock(cblock), &value); in __dirty()
[all …]
Ddm-cache-policy-smq.c983 if (!test_and_set_bit(from_cblock(infer_cblock(mq, e)), mq->cache_hit_bits)) { in requeue()
1088 clear_bitset(mq->cache_hit_bits, from_cblock(mq->cache_size)); in end_cache_period()
1369 e = alloc_particular_entry(&mq->cache_alloc, from_cblock(cblock)); in smq_load_mapping()
1438 struct entry *e = get_entry(&mq->cache_alloc, from_cblock(cblock)); in __remove_cblock()
1472 unsigned nr_clean = from_cblock(mq->cache_size) - q_size(&mq->dirty); in clean_target_met()
1473 unsigned target = from_cblock(mq->cache_size) * CLEAN_TARGET_CRITICAL / 100u; in clean_target_met()
1625 calc_hotspot_params(origin_size, cache_block_size, from_cblock(cache_size), in smq_create()
1630 if (space_init(&mq->es, total_sentinels + mq->nr_hotspot_blocks + from_cblock(cache_size))) { in smq_create()
1648 total_sentinels + mq->nr_hotspot_blocks + from_cblock(cache_size)); in smq_create()
1657 if (from_cblock(cache_size)) { in smq_create()
[all …]
Ddm-cache-block-types.h39 static inline uint32_t from_cblock(dm_cblock_t b) in from_cblock() function
Ddm-cache-target.c577 return test_bit(from_cblock(b), cache->dirty_bitset); in is_dirty()
582 if (!test_and_set_bit(from_cblock(cblock), cache->dirty_bitset)) { in set_dirty()
590 if (test_and_clear_bit(from_cblock(cblock), cache->dirty_bitset)) { in clear_dirty()
773 sector_t block = from_cblock(cblock); in remap_to_cache()
1260 sector_t cblock = from_cblock(mg->cblock); in issue_copy()
2110 uint64_t begin = from_cblock(req->cblocks->begin); in process_invalidation_request()
2111 uint64_t end = from_cblock(req->cblocks->end); in process_invalidation_request()
2744 dm_block_t nr_blocks = from_cblock(size); in set_cache_size()
2878 cache->dirty_bitset = alloc_bitset(from_cblock(cache->cache_size)); in cache_create()
2883 clear_bitset(cache->dirty_bitset, from_cblock(cache->cache_size)); in cache_create()
[all …]
Ddm-cache-policy-mq.c374 struct entry *e = ep->entries + from_cblock(cblock); in alloc_particular_entry()
396 struct entry *e = ep->entries + from_cblock(cblock); in epool_find()
1213 unsigned nr_clean = from_cblock(mq->cache_size) - queue_size(&mq->cache_dirty); in clean_target_met()
1214 unsigned target = from_cblock(mq->cache_size) * CLEAN_TARGET_PERCENTAGE / 100; in clean_target_met()
1386 if (epool_init(&mq->pre_cache_pool, from_cblock(cache_size))) { in mq_create()
1391 if (epool_init(&mq->cache_pool, from_cblock(cache_size))) { in mq_create()
1410 mq->generation_period = max((unsigned) from_cblock(cache_size), 1024U); in mq_create()
1412 mq->nr_buckets = next_power(from_cblock(cache_size) / 2, 16); in mq_create()