Searched refs:from_cblock (Results 1 – 5 of 5) sorted by relevance
/linux-4.1.27/drivers/md/ |
D | dm-cache-policy-cleaner.c | 101 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()
|
D | dm-cache-metadata.c | 633 disk_super->cache_blocks = cpu_to_le32(from_cblock(cmd->cache_blocks)); in __commit_transaction() 815 r = dm_array_get_value(&cmd->info, cmd->root, from_cblock(b), &value); in block_unmapped_or_clean() 841 (unsigned long long) from_cblock(begin)); in blocks_are_unmapped_or_clean() 845 begin = to_cblock(from_cblock(begin) + 1); in blocks_are_unmapped_or_clean() 860 if (from_cblock(new_cache_size) < from_cblock(cmd->cache_blocks)) { in dm_cache_resize() 875 r = dm_array_resize(&cmd->info, cmd->root, from_cblock(cmd->cache_blocks), in dm_cache_resize() 876 from_cblock(new_cache_size), in dm_cache_resize() 1010 r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock), in __remove() 1037 r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock), in __insert() 1209 r = dm_array_get_value(&cmd->info, cmd->root, from_cblock(cblock), &value); in __dirty() [all …]
|
D | dm-cache-target.c | 528 return test_bit(from_cblock(b), cache->dirty_bitset); in is_dirty() 533 if (!test_and_set_bit(from_cblock(cblock), cache->dirty_bitset)) { in set_dirty() 541 if (test_and_clear_bit(from_cblock(cblock), cache->dirty_bitset)) { in clear_dirty() 720 sector_t block = from_cblock(cblock); in remap_to_cache() 1043 sector_t cblock = from_cblock(mg->cblock); in issue_copy() 1719 uint64_t begin = from_cblock(req->cblocks->begin); in process_invalidation_request() 1720 uint64_t end = from_cblock(req->cblocks->end); in process_invalidation_request() 2338 dm_block_t nr_blocks = from_cblock(size); in set_cache_size() 2465 cache->dirty_bitset = alloc_bitset(from_cblock(cache->cache_size)); in cache_create() 2470 clear_bitset(cache->dirty_bitset, from_cblock(cache->cache_size)); in cache_create() [all …]
|
D | dm-cache-block-types.h | 39 static inline uint32_t from_cblock(dm_cblock_t b) in from_cblock() function
|
D | dm-cache-policy-mq.c | 374 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() 1378 if (epool_init(&mq->pre_cache_pool, from_cblock(cache_size))) { in mq_create() 1383 if (epool_init(&mq->cache_pool, from_cblock(cache_size))) { in mq_create() 1402 mq->generation_period = max((unsigned) from_cblock(cache_size), 1024U); in mq_create() 1404 mq->nr_buckets = next_power(from_cblock(cache_size) / 2, 16); in mq_create()
|