/drivers/md/ |
D | dm-cache-policy-internal.h | 15 static inline int policy_lookup(struct dm_cache_policy *p, dm_oblock_t oblock, dm_cblock_t *cblock, in policy_lookup() argument 18 return p->lookup(p, oblock, cblock, data_dir, fast_copy, background_queued); in policy_lookup() 22 dm_oblock_t oblock, dm_cblock_t *cblock, in policy_lookup_with_work() argument 28 return p->lookup(p, oblock, cblock, data_dir, fast_copy, NULL); in policy_lookup_with_work() 31 return p->lookup_with_work(p, oblock, cblock, data_dir, fast_copy, work); in policy_lookup_with_work() 47 static inline void policy_set_dirty(struct dm_cache_policy *p, dm_cblock_t cblock) in policy_set_dirty() argument 49 p->set_dirty(p, cblock); in policy_set_dirty() 52 static inline void policy_clear_dirty(struct dm_cache_policy *p, dm_cblock_t cblock) in policy_clear_dirty() argument 54 p->clear_dirty(p, cblock); in policy_clear_dirty() 58 dm_oblock_t oblock, dm_cblock_t cblock, in policy_load_mapping() argument [all …]
|
D | dm-cache-policy.h | 32 dm_cblock_t cblock; member 56 int (*lookup)(struct dm_cache_policy *p, dm_oblock_t oblock, dm_cblock_t *cblock, 69 dm_oblock_t oblock, dm_cblock_t *cblock, 88 void (*set_dirty)(struct dm_cache_policy *p, dm_cblock_t cblock); 89 void (*clear_dirty)(struct dm_cache_policy *p, dm_cblock_t cblock); 96 dm_cblock_t cblock, bool dirty, 103 int (*invalidate_mapping)(struct dm_cache_policy *p, dm_cblock_t cblock); 109 uint32_t (*get_hint)(struct dm_cache_policy *p, dm_cblock_t cblock);
|
D | dm-cache-target.c | 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 [all …]
|
D | dm-cache-policy-smq.c | 1196 work.cblock = infer_cblock(mq, e); in queue_writeback() 1227 work.cblock = infer_cblock(mq, e); in queue_demotion() 1267 work.cblock = infer_cblock(mq, e); in queue_promotion() 1374 static int __lookup(struct smq_policy *mq, dm_oblock_t oblock, dm_cblock_t *cblock, in __lookup() argument 1388 *cblock = infer_cblock(mq, e); in __lookup() 1409 static int smq_lookup(struct dm_cache_policy *p, dm_oblock_t oblock, dm_cblock_t *cblock, in smq_lookup() argument 1418 r = __lookup(mq, oblock, cblock, in smq_lookup() 1427 dm_oblock_t oblock, dm_cblock_t *cblock, in smq_lookup_with_work() argument 1437 r = __lookup(mq, oblock, cblock, data_dir, fast_copy, work, &background_queued); in smq_lookup_with_work() 1472 from_cblock(work->cblock)); in __complete_background_work() [all …]
|
D | dm-cache-metadata.h | 86 int dm_cache_remove_mapping(struct dm_cache_metadata *cmd, dm_cblock_t cblock); 87 int dm_cache_insert_mapping(struct dm_cache_metadata *cmd, dm_cblock_t cblock, dm_oblock_t oblock); 91 dm_cblock_t cblock, bool dirty,
|
D | dm-cache-metadata.c | 1224 static int __remove(struct dm_cache_metadata *cmd, dm_cblock_t cblock) in __remove() argument 1230 r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock), in __remove() 1239 int dm_cache_remove_mapping(struct dm_cache_metadata *cmd, dm_cblock_t cblock) in dm_cache_remove_mapping() argument 1244 r = __remove(cmd, cblock); in dm_cache_remove_mapping() 1251 dm_cblock_t cblock, dm_oblock_t oblock) in __insert() argument 1257 r = dm_array_set_value(&cmd->info, cmd->root, from_cblock(cblock), in __insert() 1267 dm_cblock_t cblock, dm_oblock_t oblock) in dm_cache_insert_mapping() argument 1272 r = __insert(cmd, cblock, oblock); in dm_cache_insert_mapping() 1512 static int __dump_mapping(void *context, uint64_t cblock, void *leaf) in __dump_mapping() argument 1547 static int __dirty(struct dm_cache_metadata *cmd, dm_cblock_t cblock, bool dirty) in __dirty() argument [all …]
|