Lines Matching refs:policy

38 struct policy {  struct
39 struct dm_cache_policy policy; member
66 static struct policy *to_policy(struct dm_cache_policy *p) in to_policy() argument
68 return container_of(p, struct policy, policy); in to_policy()
97 static int alloc_cache_blocks_with_hash(struct policy *p, dm_cblock_t cache_size) in alloc_cache_blocks_with_hash()
119 static void free_cache_blocks_and_hash(struct policy *p) in free_cache_blocks_and_hash()
125 static struct wb_cache_entry *alloc_cache_entry(struct policy *p) in alloc_cache_entry()
140 static struct wb_cache_entry *lookup_cache_entry(struct policy *p, dm_oblock_t oblock) in lookup_cache_entry()
159 static void insert_cache_hash_entry(struct policy *p, struct wb_cache_entry *e) in insert_cache_hash_entry()
177 struct policy *p = to_policy(pe); in wb_map()
204 struct policy *p = to_policy(pe); in wb_lookup()
226 struct policy *p = to_policy(pe); in __set_clear_dirty()
249 struct policy *p = to_policy(pe); in wb_set_dirty()
259 struct policy *p = to_policy(pe); in wb_clear_dirty()
267 static void add_cache_entry(struct policy *p, struct wb_cache_entry *e) in add_cache_entry()
281 struct policy *p = to_policy(pe); in wb_load_mapping()
299 struct policy *p = to_policy(pe); in wb_destroy()
305 static struct wb_cache_entry *__wb_force_remove_mapping(struct policy *p, dm_oblock_t oblock) in __wb_force_remove_mapping()
319 struct policy *p = to_policy(pe); in wb_remove_mapping()
334 struct policy *p = to_policy(pe); in wb_force_mapping()
345 static struct wb_cache_entry *get_next_dirty_entry(struct policy *p) in get_next_dirty_entry()
366 struct policy *p = to_policy(pe); in wb_writeback_work()
390 static void init_policy_functions(struct policy *p) in init_policy_functions()
392 p->policy.destroy = wb_destroy; in init_policy_functions()
393 p->policy.map = wb_map; in init_policy_functions()
394 p->policy.lookup = wb_lookup; in init_policy_functions()
395 p->policy.set_dirty = wb_set_dirty; in init_policy_functions()
396 p->policy.clear_dirty = wb_clear_dirty; in init_policy_functions()
397 p->policy.load_mapping = wb_load_mapping; in init_policy_functions()
398 p->policy.walk_mappings = NULL; in init_policy_functions()
399 p->policy.remove_mapping = wb_remove_mapping; in init_policy_functions()
400 p->policy.writeback_work = wb_writeback_work; in init_policy_functions()
401 p->policy.force_mapping = wb_force_mapping; in init_policy_functions()
402 p->policy.residency = wb_residency; in init_policy_functions()
403 p->policy.tick = NULL; in init_policy_functions()
411 struct policy *p = kzalloc(sizeof(*p), GFP_KERNEL); in wb_create()
428 return &p->policy; in wb_create()