Lines Matching refs:p
16 static inline int policy_lookup(struct dm_cache_policy *p, dm_oblock_t oblock, dm_cblock_t *cblock, in policy_lookup() argument
19 return p->lookup(p, oblock, cblock, data_dir, fast_copy, background_queued); in policy_lookup()
22 static inline int policy_lookup_with_work(struct dm_cache_policy *p, in policy_lookup_with_work() argument
27 if (!p->lookup_with_work) { in policy_lookup_with_work()
29 return p->lookup(p, oblock, cblock, data_dir, fast_copy, NULL); in policy_lookup_with_work()
32 return p->lookup_with_work(p, oblock, cblock, data_dir, fast_copy, work); in policy_lookup_with_work()
35 static inline int policy_get_background_work(struct dm_cache_policy *p, in policy_get_background_work() argument
38 return p->get_background_work(p, idle, result); in policy_get_background_work()
41 static inline void policy_complete_background_work(struct dm_cache_policy *p, in policy_complete_background_work() argument
45 return p->complete_background_work(p, work, success); in policy_complete_background_work()
48 static inline void policy_set_dirty(struct dm_cache_policy *p, dm_cblock_t cblock) in policy_set_dirty() argument
50 p->set_dirty(p, cblock); in policy_set_dirty()
53 static inline void policy_clear_dirty(struct dm_cache_policy *p, dm_cblock_t cblock) in policy_clear_dirty() argument
55 p->clear_dirty(p, cblock); in policy_clear_dirty()
58 static inline int policy_load_mapping(struct dm_cache_policy *p, in policy_load_mapping() argument
62 return p->load_mapping(p, oblock, cblock, dirty, hint, hint_valid); in policy_load_mapping()
65 static inline int policy_invalidate_mapping(struct dm_cache_policy *p, in policy_invalidate_mapping() argument
68 return p->invalidate_mapping(p, cblock); in policy_invalidate_mapping()
71 static inline uint32_t policy_get_hint(struct dm_cache_policy *p, in policy_get_hint() argument
74 return p->get_hint ? p->get_hint(p, cblock) : 0; in policy_get_hint()
77 static inline dm_cblock_t policy_residency(struct dm_cache_policy *p) in policy_residency() argument
79 return p->residency(p); in policy_residency()
82 static inline void policy_tick(struct dm_cache_policy *p, bool can_block) in policy_tick() argument
84 if (p->tick) in policy_tick()
85 return p->tick(p, can_block); in policy_tick()
88 static inline int policy_emit_config_values(struct dm_cache_policy *p, char *result, in policy_emit_config_values() argument
93 if (p->emit_config_values) in policy_emit_config_values()
94 return p->emit_config_values(p, result, maxlen, sz_ptr); in policy_emit_config_values()
101 static inline int policy_set_config_value(struct dm_cache_policy *p, in policy_set_config_value() argument
104 return p->set_config_value ? p->set_config_value(p, key, value) : -EINVAL; in policy_set_config_value()
107 static inline void policy_allow_migrations(struct dm_cache_policy *p, bool allow) in policy_allow_migrations() argument
109 return p->allow_migrations(p, allow); in policy_allow_migrations()
154 void dm_cache_policy_destroy(struct dm_cache_policy *p);
159 const char *dm_cache_policy_get_name(struct dm_cache_policy *p);
161 const unsigned int *dm_cache_policy_get_version(struct dm_cache_policy *p);
163 size_t dm_cache_policy_get_hint_size(struct dm_cache_policy *p);