Lines Matching defs:cache

178 struct cache {  struct
182 struct dm_cache_metadata *cmd; argument
197 struct dm_dev *cache_dev; argument
206 * Size of the cache device in blocks. argument
208 dm_cblock_t cache_size; argument
213 uint32_t sectors_per_block;
214 int sectors_per_block_shift;
238 * cache_size entries, dirty if set argument
240 atomic_t nr_dirty;
241 unsigned long *dirty_bitset;
269 struct dm_cache_policy *policy; argument
282 struct cache_features features; argument
284 struct cache_stats stats; argument
301 * structure and the 'cache' member must be the first as it argument
304 struct cache *cache; member
311 struct cache *cache; member
341 static void wake_worker(struct cache *cache) in wake_worker()
348 static struct dm_bio_prison_cell *alloc_prison_cell(struct cache *cache) in alloc_prison_cell()
354 static void free_prison_cell(struct cache *cache, struct dm_bio_prison_cell *cell) in free_prison_cell()
359 static struct dm_cache_migration *alloc_migration(struct cache *cache) in alloc_migration()
380 static int prealloc_data_structs(struct cache *cache, struct prealloc *p) in prealloc_data_structs()
403 static void prealloc_free_structs(struct cache *cache, struct prealloc *p) in prealloc_free_structs()
479 static int bio_detain_range(struct cache *cache, dm_oblock_t oblock_begin, dm_oblock_t oblock_end, in bio_detain_range()
495 static int bio_detain(struct cache *cache, dm_oblock_t oblock, in bio_detain()
505 static int get_cell(struct cache *cache, in get_cell()
526 static bool is_dirty(struct cache *cache, dm_cblock_t b) in is_dirty()
531 static void set_dirty(struct cache *cache, dm_oblock_t oblock, dm_cblock_t cblock) in set_dirty()
539 static void clear_dirty(struct cache *cache, dm_oblock_t oblock, dm_cblock_t cblock) in clear_dirty()
550 static bool block_size_is_power_of_two(struct cache *cache) in block_size_is_power_of_two()
566 static dm_block_t oblocks_per_dblock(struct cache *cache) in oblocks_per_dblock()
578 static dm_dblock_t oblock_to_dblock(struct cache *cache, dm_oblock_t oblock) in oblock_to_dblock()
584 static dm_oblock_t dblock_to_oblock(struct cache *cache, dm_dblock_t dblock) in dblock_to_oblock()
589 static void set_discard(struct cache *cache, dm_dblock_t b) in set_discard()
601 static void clear_discard(struct cache *cache, dm_dblock_t b) in clear_discard()
610 static bool is_discarded(struct cache *cache, dm_dblock_t b) in is_discarded()
622 static bool is_discarded_oblock(struct cache *cache, dm_oblock_t b) in is_discarded_oblock()
637 static void load_stats(struct cache *cache) in load_stats()
648 static void save_stats(struct cache *cache) in save_stats()
685 static size_t get_per_bio_data_size(struct cache *cache) in get_per_bio_data_size()
711 static void remap_to_origin(struct cache *cache, struct bio *bio) in remap_to_origin()
716 static void remap_to_cache(struct cache *cache, struct bio *bio, in remap_to_cache()
733 static void check_if_tick_bio_needed(struct cache *cache, struct bio *bio) in check_if_tick_bio_needed()
748 static void remap_to_origin_clear_discard(struct cache *cache, struct bio *bio, in remap_to_origin_clear_discard()
757 static void remap_to_cache_dirty(struct cache *cache, struct bio *bio, in remap_to_cache_dirty()
768 static dm_oblock_t get_bio_block(struct cache *cache, struct bio *bio) in get_bio_block()
780 static int bio_triggers_commit(struct cache *cache, struct bio *bio) in bio_triggers_commit()
789 static void inc_ds(struct cache *cache, struct bio *bio, in inc_ds()
801 static void issue(struct cache *cache, struct bio *bio) in issue()
820 static void inc_and_issue(struct cache *cache, struct bio *bio, struct dm_bio_prison_cell *cell) in inc_and_issue()
826 static void defer_writethrough_bio(struct cache *cache, struct bio *bio) in defer_writethrough_bio()
865 static void remap_to_origin_then_cache(struct cache *cache, struct bio *bio, in remap_to_origin_then_cache()
884 static void inc_io_migrations(struct cache *cache) in inc_io_migrations()
889 static void dec_io_migrations(struct cache *cache) in dec_io_migrations()
894 static void __cell_defer(struct cache *cache, struct dm_bio_prison_cell *cell, in __cell_defer()
902 static void cell_defer(struct cache *cache, struct dm_bio_prison_cell *cell, in cell_defer()
922 struct cache *cache = mg->cache; in migration_failure() local
948 struct cache *cache = mg->cache; in migration_success_pre_commit() local
984 struct cache *cache = mg->cache; in migration_success_post_commit() local
1026 struct cache *cache = mg->cache; in copy_complete() local
1042 struct cache *cache = mg->cache; in issue_copy() local
1071 struct cache *cache = mg->cache; in overwrite_endio() local
1105 static bool bio_writes_complete_block(struct cache *cache, struct bio *bio) in bio_writes_complete_block()
1117 static void calc_discard_block_range(struct cache *cache, struct bio *bio, in calc_discard_block_range()
1150 struct cache *cache = mg->cache; in issue_copy_or_discard() local
1183 static void process_migrations(struct cache *cache, struct list_head *head, in process_migrations()
1207 struct cache *cache = mg->cache; in queue_quiesced_migration() local
1216 static void queue_quiesced_migrations(struct cache *cache, struct list_head *work) in queue_quiesced_migrations()
1229 static void check_for_quiesced_migrations(struct cache *cache, in check_for_quiesced_migrations()
1250 static void promote(struct cache *cache, struct prealloc *structs, in promote()
1274 static void writeback(struct cache *cache, struct prealloc *structs, in writeback()
1298 static void demote_then_promote(struct cache *cache, struct prealloc *structs, in demote_then_promote()
1329 static void invalidate(struct cache *cache, struct prealloc *structs, in invalidate()
1353 static void discard(struct cache *cache, struct prealloc *structs, in discard()
1376 static void defer_bio(struct cache *cache, struct bio *bio) in defer_bio()
1387 static void process_flush_bio(struct cache *cache, struct bio *bio) in process_flush_bio()
1406 static void process_discard_bio(struct cache *cache, struct prealloc *structs, in process_discard_bio()
1429 static bool spare_migration_bandwidth(struct cache *cache) in spare_migration_bandwidth()
1436 static void inc_hit_counter(struct cache *cache, struct bio *bio) in inc_hit_counter()
1442 static void inc_miss_counter(struct cache *cache, struct bio *bio) in inc_miss_counter()
1452 struct cache *cache; member
1474 static void process_bio(struct cache *cache, struct prealloc *structs, in process_bio()
1579 static int need_commit_due_to_time(struct cache *cache) in need_commit_due_to_time()
1585 static int commit_if_needed(struct cache *cache) in commit_if_needed()
1600 static void process_deferred_bios(struct cache *cache) in process_deferred_bios()
1641 static void process_deferred_flush_bios(struct cache *cache, bool submit_bios) in process_deferred_flush_bios()
1661 static void process_deferred_writethrough_bios(struct cache *cache) in process_deferred_writethrough_bios()
1681 static void writeback_some_dirty_blocks(struct cache *cache) in writeback_some_dirty_blocks()
1716 static void process_invalidation_request(struct cache *cache, struct invalidation_request *req) in process_invalidation_request()
1749 static void process_invalidation_requests(struct cache *cache) in process_invalidation_requests()
1766 static bool is_quiescing(struct cache *cache) in is_quiescing()
1771 static void ack_quiescing(struct cache *cache) in ack_quiescing()
1779 static void wait_for_quiescing_ack(struct cache *cache) in wait_for_quiescing_ack()
1784 static void start_quiescing(struct cache *cache) in start_quiescing()
1790 static void stop_quiescing(struct cache *cache) in stop_quiescing()
1796 static void wait_for_migrations(struct cache *cache) in wait_for_migrations()
1801 static void stop_worker(struct cache *cache) in stop_worker()
1807 static void requeue_deferred_io(struct cache *cache) in requeue_deferred_io()
1820 static int more_work(struct cache *cache) in more_work()
1838 struct cache *cache = container_of(ws, struct cache, worker); in do_worker() local
1876 struct cache *cache = container_of(to_delayed_work(ws), struct cache, waker); in do_waker() local
1892 struct cache *cache = container_of(cb, struct cache, callbacks); in cache_is_congested() local
1906 static void destroy(struct cache *cache) in destroy()
1955 struct cache *cache = ti->private; in cache_dtr() local
2245 static int process_config_option(struct cache *cache, const char *key, const char *value) in process_config_option()
2260 static int set_config_value(struct cache *cache, const char *key, const char *value) in set_config_value()
2273 static int set_config_values(struct cache *cache, int argc, const char **argv) in set_config_values()
2294 static int create_cache_policy(struct cache *cache, struct cache_args *ca, in create_cache_policy()
2336 static void set_cache_size(struct cache *cache, dm_cblock_t size) in set_cache_size()
2355 struct cache *cache; in cache_create() local
2546 static int copy_ctr_args(struct cache *cache, int argc, const char **argv) in copy_ctr_args()
2574 struct cache *cache = NULL; in cache_ctr() local
2604 static int __cache_map(struct cache *cache, struct bio *bio, struct dm_bio_prison_cell **cell) in __cache_map()
2724 struct cache *cache = ti->private; in cache_map() local
2737 struct cache *cache = ti->private; in cache_end_io() local
2755 static int write_dirty_bitset(struct cache *cache) in write_dirty_bitset()
2769 static int write_discard_bitset(struct cache *cache) in write_discard_bitset()
2793 static bool sync_metadata(struct cache *cache) in sync_metadata()
2825 struct cache *cache = ti->private; in cache_postsuspend() local
2840 struct cache *cache = context; in load_mapping() local
2861 struct cache *cache; member
2871 static void discard_load_info_init(struct cache *cache, in discard_load_info_init()
2938 static dm_cblock_t get_cache_dev_size(struct cache *cache) in get_cache_dev_size()
2945 static bool can_resize(struct cache *cache, dm_cblock_t new_size) in can_resize()
2965 static int resize_cache_dev(struct cache *cache, dm_cblock_t new_size) in resize_cache_dev()
2983 struct cache *cache = ti->private; in cache_preresume() local
3042 struct cache *cache = ti->private; in cache_resume() local
3068 struct cache *cache = ti->private; in cache_status() local
3161 static int parse_cblock_range(struct cache *cache, const char *str, in parse_cblock_range()
3198 static int validate_cblock_range(struct cache *cache, struct cblock_range *range) in validate_cblock_range()
3222 static int request_invalidation(struct cache *cache, struct cblock_range *range) in request_invalidation()
3241 static int process_invalidate_cblocks_message(struct cache *cache, unsigned count, in process_invalidate_cblocks_message()
3283 struct cache *cache = ti->private; in cache_message() local
3301 struct cache *cache = ti->private; in cache_iterate_devices() local
3320 struct cache *cache = ti->private; in cache_bvec_merge() local
3330 static void set_discard_limits(struct cache *cache, struct queue_limits *limits) in set_discard_limits()
3342 struct cache *cache = ti->private; in cache_io_hints() local