Lines Matching refs:cblock
1189 work.cblock = infer_cblock(mq, e); in queue_writeback()
1220 work.cblock = infer_cblock(mq, e); in queue_demotion()
1260 work.cblock = infer_cblock(mq, e); in queue_promotion()
1367 static int __lookup(struct smq_policy *mq, dm_oblock_t oblock, dm_cblock_t *cblock, in __lookup() argument
1381 *cblock = infer_cblock(mq, e); in __lookup()
1402 static int smq_lookup(struct dm_cache_policy *p, dm_oblock_t oblock, dm_cblock_t *cblock, in smq_lookup() argument
1411 r = __lookup(mq, oblock, cblock, in smq_lookup()
1420 dm_oblock_t oblock, dm_cblock_t *cblock, in smq_lookup_with_work() argument
1430 r = __lookup(mq, oblock, cblock, data_dir, fast_copy, work, &background_queued); in smq_lookup_with_work()
1465 from_cblock(work->cblock)); in __complete_background_work()
1519 static void __smq_set_clear_dirty(struct smq_policy *mq, dm_cblock_t cblock, bool set) in __smq_set_clear_dirty() argument
1521 struct entry *e = get_entry(&mq->cache_alloc, from_cblock(cblock)); in __smq_set_clear_dirty()
1532 static void smq_set_dirty(struct dm_cache_policy *p, dm_cblock_t cblock) in smq_set_dirty() argument
1538 __smq_set_clear_dirty(mq, cblock, true); in smq_set_dirty()
1542 static void smq_clear_dirty(struct dm_cache_policy *p, dm_cblock_t cblock) in smq_clear_dirty() argument
1548 __smq_set_clear_dirty(mq, cblock, false); in smq_clear_dirty()
1552 static unsigned random_level(dm_cblock_t cblock) in random_level() argument
1554 return hash_32(from_cblock(cblock), 9) & (NR_CACHE_LEVELS - 1); in random_level()
1558 dm_oblock_t oblock, dm_cblock_t cblock, in smq_load_mapping() argument
1564 e = alloc_particular_entry(&mq->cache_alloc, from_cblock(cblock)); in smq_load_mapping()
1567 e->level = hint_valid ? min(hint, NR_CACHE_LEVELS - 1) : random_level(cblock); in smq_load_mapping()
1579 static int smq_invalidate_mapping(struct dm_cache_policy *p, dm_cblock_t cblock) in smq_invalidate_mapping() argument
1582 struct entry *e = get_entry(&mq->cache_alloc, from_cblock(cblock)); in smq_invalidate_mapping()
1594 static uint32_t smq_get_hint(struct dm_cache_policy *p, dm_cblock_t cblock) in smq_get_hint() argument
1597 struct entry *e = get_entry(&mq->cache_alloc, from_cblock(cblock)); in smq_get_hint()