• Home
  • Raw
  • Download

Lines Matching refs:cblock

609 static void set_dirty(struct cache *cache, dm_cblock_t cblock)  in set_dirty()  argument
611 if (!test_and_set_bit(from_cblock(cblock), cache->dirty_bitset)) { in set_dirty()
613 policy_set_dirty(cache->policy, cblock); in set_dirty()
621 static void force_set_dirty(struct cache *cache, dm_cblock_t cblock) in force_set_dirty() argument
623 if (!test_and_set_bit(from_cblock(cblock), cache->dirty_bitset)) in force_set_dirty()
625 policy_set_dirty(cache->policy, cblock); in force_set_dirty()
628 static void force_clear_dirty(struct cache *cache, dm_cblock_t cblock) in force_clear_dirty() argument
630 if (test_and_clear_bit(from_cblock(cblock), cache->dirty_bitset)) { in force_clear_dirty()
635 policy_clear_dirty(cache->policy, cblock); in force_clear_dirty()
717 dm_cblock_t cblock) in remap_to_cache() argument
720 sector_t block = from_cblock(cblock); in remap_to_cache()
758 dm_oblock_t oblock, dm_cblock_t cblock) in remap_to_cache_dirty() argument
761 remap_to_cache(cache, bio, cblock); in remap_to_cache_dirty()
763 set_dirty(cache, cblock); in remap_to_cache_dirty()
820 dm_oblock_t oblock, dm_cblock_t cblock) in remap_to_origin_and_cache() argument
833 remap_to_cache(cache, bio, cblock); in remap_to_origin_and_cache()
1092 c_region.sector = from_cblock(mg->op->cblock) * cache->sectors_per_block; in copy()
1137 remap_to_cache(mg->cache, bio, mg->op->cblock); in overwrite()
1161 dm_cblock_t cblock = op->cblock; in mg_complete() local
1173 force_set_dirty(cache, cblock); in mg_complete()
1181 force_clear_dirty(cache, cblock); in mg_complete()
1191 force_clear_dirty(cache, cblock); in mg_complete()
1198 force_clear_dirty(cache, cblock); in mg_complete()
1232 r = dm_cache_insert_mapping(cache->cmd, op->cblock, op->oblock); in mg_update_metadata()
1245 r = dm_cache_remove_mapping(cache->cmd, op->cblock); in mg_update_metadata()
1333 if ((!is_policy_promote && !is_dirty(cache, op->cblock)) || in mg_full_copy()
1461 static int invalidate_cblock(struct cache *cache, dm_cblock_t cblock) in invalidate_cblock() argument
1463 int r = policy_invalidate_mapping(cache->policy, cblock); in invalidate_cblock()
1465 r = dm_cache_remove_mapping(cache->cmd, cblock); in invalidate_cblock()
1539 static int invalidate_start(struct cache *cache, dm_cblock_t cblock, in invalidate_start() argument
1550 mg->invalidate_cblock = cblock; in invalidate_start()
1596 dm_cblock_t cblock; in map_bio() local
1617 r = policy_lookup_with_work(cache->policy, block, &cblock, data_dir, true, &op); in map_bio()
1632 r = policy_lookup(cache->policy, block, &cblock, data_dir, false, &background_queued); in map_bio()
1676 invalidate_start(cache, cblock, block, bio); in map_bio()
1681 !is_dirty(cache, cblock)) { in map_bio()
1682 remap_to_origin_and_cache(cache, bio, block, cblock); in map_bio()
1685 remap_to_cache_dirty(cache, bio, block, cblock); in map_bio()
2767 static int load_mapping(void *context, dm_oblock_t oblock, dm_cblock_t cblock, in load_mapping() argument
2773 set_bit(from_cblock(cblock), cache->dirty_bitset); in load_mapping()
2776 clear_bit(from_cblock(cblock), cache->dirty_bitset); in load_mapping()
2778 return policy_load_mapping(cache->policy, oblock, cblock, dirty, hint, hint_valid); in load_mapping()