Lines Matching defs:cache
297 struct cache { struct
307 struct dm_cache_metadata *cmd; argument
322 struct dm_dev *cache_dev; argument
331 * Size of the cache device in blocks. argument
333 dm_cblock_t cache_size; argument
338 spinlock_t invalidation_lock;
339 struct list_head invalidation_requests;
341 sector_t migration_threshold;
342 wait_queue_head_t migration_wait;
343 atomic_t nr_allocated_migrations;
349 atomic_t nr_io_migrations;
351 struct bio_list deferred_bios;
353 struct rw_semaphore quiesce_lock;
377 * cache_size entries, dirty if set argument
383 struct dm_cache_policy *policy; argument
388 struct cache_features features; argument
390 struct cache_stats stats; argument
392 bool need_tick_bio:1;
393 bool sized:1;
394 bool invalidate:1;
395 bool commit_requested:1;
396 bool loaded_mappings:1;
397 bool loaded_discards:1;
399 struct rw_semaphore background_work_lock;
401 struct batcher committer;
425 struct dm_cache_migration { argument
427 struct cache *cache; member
439 static bool writethrough_mode(struct cache *cache) in writethrough_mode()
444 static bool writeback_mode(struct cache *cache) in writeback_mode()
449 static inline bool passthrough_mode(struct cache *cache) in passthrough_mode()
456 static void wake_deferred_bio_worker(struct cache *cache) in wake_deferred_bio_worker()
461 static void wake_migration_worker(struct cache *cache) in wake_migration_worker()
471 static struct dm_bio_prison_cell_v2 *alloc_prison_cell(struct cache *cache) in alloc_prison_cell()
476 static void free_prison_cell(struct cache *cache, struct dm_bio_prison_cell_v2 *cell) in free_prison_cell()
481 static struct dm_cache_migration *alloc_migration(struct cache *cache) in alloc_migration()
497 struct cache *cache = mg->cache; in free_migration() local
562 static void defer_bio(struct cache *cache, struct bio *bio) in defer_bio()
571 static void defer_bios(struct cache *cache, struct bio_list *bios) in defer_bios()
582 static bool bio_detain_shared(struct cache *cache, dm_oblock_t oblock, struct bio *bio) in bio_detain_shared()
613 static bool is_dirty(struct cache *cache, dm_cblock_t b) in is_dirty()
618 static void set_dirty(struct cache *cache, dm_cblock_t cblock) in set_dirty()
630 static void force_set_dirty(struct cache *cache, dm_cblock_t cblock) in force_set_dirty()
637 static void force_clear_dirty(struct cache *cache, dm_cblock_t cblock) in force_clear_dirty()
649 static bool block_size_is_power_of_two(struct cache *cache) in block_size_is_power_of_two()
661 static dm_block_t oblocks_per_dblock(struct cache *cache) in oblocks_per_dblock()
673 static dm_dblock_t oblock_to_dblock(struct cache *cache, dm_oblock_t oblock) in oblock_to_dblock()
679 static void set_discard(struct cache *cache, dm_dblock_t b) in set_discard()
689 static void clear_discard(struct cache *cache, dm_dblock_t b) in clear_discard()
696 static bool is_discarded(struct cache *cache, dm_dblock_t b) in is_discarded()
707 static bool is_discarded_oblock(struct cache *cache, dm_oblock_t b) in is_discarded_oblock()
724 static void remap_to_origin(struct cache *cache, struct bio *bio) in remap_to_origin()
729 static void remap_to_cache(struct cache *cache, struct bio *bio, in remap_to_cache()
746 static void check_if_tick_bio_needed(struct cache *cache, struct bio *bio) in check_if_tick_bio_needed()
760 static void remap_to_origin_clear_discard(struct cache *cache, struct bio *bio, in remap_to_origin_clear_discard()
770 static void remap_to_cache_dirty(struct cache *cache, struct bio *bio, in remap_to_cache_dirty()
781 static dm_oblock_t get_bio_block(struct cache *cache, struct bio *bio) in get_bio_block()
793 static bool accountable_bio(struct cache *cache, struct bio *bio) in accountable_bio()
798 static void accounted_begin(struct cache *cache, struct bio *bio) in accounted_begin()
809 static void accounted_complete(struct cache *cache, struct bio *bio) in accounted_complete()
816 static void accounted_request(struct cache *cache, struct bio *bio) in accounted_request()
824 struct cache *cache = context; in issue_op() local
833 static void remap_to_origin_and_cache(struct cache *cache, struct bio *bio, in remap_to_origin_and_cache()
855 static enum cache_metadata_mode get_cache_mode(struct cache *cache) in get_cache_mode()
860 static const char *cache_device_name(struct cache *cache) in cache_device_name()
865 static void notify_mode_switch(struct cache *cache, enum cache_metadata_mode mode) in notify_mode_switch()
878 static void set_cache_mode(struct cache *cache, enum cache_metadata_mode new_mode) in set_cache_mode()
919 static void abort_transaction(struct cache *cache) in abort_transaction()
938 static void metadata_operation_failed(struct cache *cache, const char *op, int r) in metadata_operation_failed()
948 static void load_stats(struct cache *cache) in load_stats()
959 static void save_stats(struct cache *cache) in save_stats()
999 static void inc_io_migrations(struct cache *cache) in inc_io_migrations()
1004 static void dec_io_migrations(struct cache *cache) in dec_io_migrations()
1014 static void calc_discard_block_range(struct cache *cache, struct bio *bio, in calc_discard_block_range()
1030 static void prevent_background_work(struct cache *cache) in prevent_background_work()
1037 static void allow_background_work(struct cache *cache) in allow_background_work()
1044 static bool background_work_begin(struct cache *cache) in background_work_begin()
1055 static void background_work_end(struct cache *cache) in background_work_end()
1064 static bool bio_writes_complete_block(struct cache *cache, struct bio *bio) in bio_writes_complete_block()
1070 static bool optimisable_bio(struct cache *cache, struct bio *bio, dm_oblock_t block) in optimisable_bio()
1103 struct cache *cache = mg->cache; in copy() local
1119 static void bio_drop_shared_lock(struct cache *cache, struct bio *bio) in bio_drop_shared_lock()
1131 struct cache *cache = mg->cache; in overwrite_endio() local
1177 struct cache *cache = mg->cache; in mg_complete() local
1246 struct cache *cache = mg->cache; in mg_update_metadata() local
1348 struct cache *cache = mg->cache; in mg_full_copy() local
1402 struct cache *cache = mg->cache; in mg_lock_writes() local
1433 static int mg_start(struct cache *cache, struct policy_work *op, struct bio *bio) in mg_start()
1462 struct cache *cache = mg->cache; in invalidate_complete() local
1484 static int invalidate_cblock(struct cache *cache, dm_cblock_t cblock) in invalidate_cblock()
1513 struct cache *cache = mg->cache; in invalidate_remove() local
1532 struct cache *cache = mg->cache; in invalidate_lock() local
1564 static int invalidate_start(struct cache *cache, dm_cblock_t cblock, in invalidate_start()
1592 static enum busy spare_migration_bandwidth(struct cache *cache) in spare_migration_bandwidth()
1604 static void inc_hit_counter(struct cache *cache, struct bio *bio) in inc_hit_counter()
1610 static void inc_miss_counter(struct cache *cache, struct bio *bio) in inc_miss_counter()
1618 static int map_bio(struct cache *cache, struct bio *bio, dm_oblock_t block, in map_bio()
1733 static bool process_bio(struct cache *cache, struct bio *bio) in process_bio()
1746 static int commit(struct cache *cache, bool clean_shutdown) in commit()
1766 struct cache *cache = context; in commit_op() local
1776 static bool process_flush_bio(struct cache *cache, struct bio *bio) in process_flush_bio()
1789 static bool process_discard_bio(struct cache *cache, struct bio *bio) in process_discard_bio()
1815 struct cache *cache = container_of(ws, struct cache, deferred_bio_worker); in process_deferred_bios() local
1848 static void requeue_deferred_bios(struct cache *cache) in requeue_deferred_bios()
1869 struct cache *cache = container_of(to_delayed_work(ws), struct cache, waker); in do_waker() local
1881 struct cache *cache = container_of(ws, struct cache, migration_worker); in check_migrations() local
1915 static void __destroy(struct cache *cache) in __destroy()
1957 static void destroy(struct cache *cache) in destroy()
1972 struct cache *cache = ti->private; in cache_dtr() local
2280 static int process_config_option(struct cache *cache, const char *key, const char *value) in process_config_option()
2295 static int set_config_value(struct cache *cache, const char *key, const char *value) in set_config_value()
2308 static int set_config_values(struct cache *cache, int argc, const char **argv) in set_config_values()
2329 static int create_cache_policy(struct cache *cache, struct cache_args *ca, in create_cache_policy()
2372 static void set_cache_size(struct cache *cache, dm_cblock_t size) in set_cache_size()
2391 struct cache *cache; in cache_create() local
2591 static int copy_ctr_args(struct cache *cache, int argc, const char **argv) in copy_ctr_args()
2619 struct cache *cache = NULL; in cache_ctr() local
2652 struct cache *cache = ti->private; in cache_map() local
2684 struct cache *cache = ti->private; in cache_end_io() local
2702 static int write_dirty_bitset(struct cache *cache) in write_dirty_bitset()
2716 static int write_discard_bitset(struct cache *cache) in write_discard_bitset()
2743 static int write_hints(struct cache *cache) in write_hints()
2762 static bool sync_metadata(struct cache *cache) in sync_metadata()
2794 struct cache *cache = ti->private; in cache_postsuspend() local
2816 struct cache *cache = context; in load_mapping() local
2830 struct cache *cache = context; in load_filtered_mapping() local
2852 struct cache *cache; member
2862 static void discard_load_info_init(struct cache *cache, in discard_load_info_init()
2929 static dm_cblock_t get_cache_dev_size(struct cache *cache) in get_cache_dev_size()
2936 static bool can_resume(struct cache *cache) in can_resume()
2957 static bool can_resize(struct cache *cache, dm_cblock_t new_size) in can_resize()
2983 static int resize_cache_dev(struct cache *cache, dm_cblock_t new_size) in resize_cache_dev()
2999 static int truncate_oblocks(struct cache *cache) in truncate_oblocks()
3020 struct cache *cache = ti->private; in cache_preresume() local
3093 struct cache *cache = ti->private; in cache_resume() local
3100 static void emit_flags(struct cache *cache, char *result, in emit_flags()
3153 struct cache *cache = ti->private; in cache_status() local
3284 static int parse_cblock_range(struct cache *cache, const char *str, in parse_cblock_range()
3317 static int validate_cblock_range(struct cache *cache, struct cblock_range *range) in validate_cblock_range()
3349 static int request_invalidation(struct cache *cache, struct cblock_range *range) in request_invalidation()
3371 static int process_invalidate_cblocks_message(struct cache *cache, unsigned int count, in process_invalidate_cblocks_message()
3415 struct cache *cache = ti->private; in cache_message() local
3439 struct cache *cache = ti->private; in cache_iterate_devices() local
3452 static void disable_passdown_if_not_supported(struct cache *cache) in disable_passdown_if_not_supported()
3474 static void set_discard_limits(struct cache *cache, struct queue_limits *limits) in set_discard_limits()
3498 struct cache *cache = ti->private; in cache_io_hints() local