Lines Matching defs:cache
219 struct cache { struct
223 struct dm_cache_metadata *cmd; argument
238 struct dm_dev *cache_dev; argument
247 * Size of the cache device in blocks. argument
249 dm_cblock_t cache_size; argument
254 uint32_t sectors_per_block;
255 int sectors_per_block_shift;
280 * cache_size entries, dirty if set argument
282 atomic_t nr_dirty;
283 unsigned long *dirty_bitset;
311 struct dm_cache_policy *policy; argument
324 struct cache_features features; argument
326 struct cache_stats stats; argument
346 * structure and the 'cache' member must be the first as it argument
349 struct cache *cache; member
356 struct cache *cache; member
388 static void wake_worker(struct cache *cache) in wake_worker()
395 static struct dm_bio_prison_cell *alloc_prison_cell(struct cache *cache) in alloc_prison_cell()
401 static void free_prison_cell(struct cache *cache, struct dm_bio_prison_cell *cell) in free_prison_cell()
406 static struct dm_cache_migration *alloc_migration(struct cache *cache) in alloc_migration()
421 struct cache *cache = mg->cache; in free_migration() local
429 static int prealloc_data_structs(struct cache *cache, struct prealloc *p) in prealloc_data_structs()
452 static void prealloc_free_structs(struct cache *cache, struct prealloc *p) in prealloc_free_structs()
528 static int bio_detain_range(struct cache *cache, dm_oblock_t oblock_begin, dm_oblock_t oblock_end, in bio_detain_range()
544 static int bio_detain(struct cache *cache, dm_oblock_t oblock, in bio_detain()
554 static int get_cell(struct cache *cache, in get_cell()
575 static bool is_dirty(struct cache *cache, dm_cblock_t b) in is_dirty()
580 static void set_dirty(struct cache *cache, dm_oblock_t oblock, dm_cblock_t cblock) in set_dirty()
588 static void clear_dirty(struct cache *cache, dm_oblock_t oblock, dm_cblock_t cblock) in clear_dirty()
599 static bool block_size_is_power_of_two(struct cache *cache) in block_size_is_power_of_two()
615 static dm_block_t oblocks_per_dblock(struct cache *cache) in oblocks_per_dblock()
627 static dm_dblock_t oblock_to_dblock(struct cache *cache, dm_oblock_t oblock) in oblock_to_dblock()
633 static dm_oblock_t dblock_to_oblock(struct cache *cache, dm_dblock_t dblock) in dblock_to_oblock()
638 static void set_discard(struct cache *cache, dm_dblock_t b) in set_discard()
650 static void clear_discard(struct cache *cache, dm_dblock_t b) in clear_discard()
659 static bool is_discarded(struct cache *cache, dm_dblock_t b) in is_discarded()
671 static bool is_discarded_oblock(struct cache *cache, dm_oblock_t b) in is_discarded_oblock()
686 static void load_stats(struct cache *cache) in load_stats()
697 static void save_stats(struct cache *cache) in save_stats()
737 static size_t get_per_bio_data_size(struct cache *cache) in get_per_bio_data_size()
764 static void remap_to_origin(struct cache *cache, struct bio *bio) in remap_to_origin()
769 static void remap_to_cache(struct cache *cache, struct bio *bio, in remap_to_cache()
786 static void check_if_tick_bio_needed(struct cache *cache, struct bio *bio) in check_if_tick_bio_needed()
801 static void remap_to_origin_clear_discard(struct cache *cache, struct bio *bio, in remap_to_origin_clear_discard()
810 static void remap_to_cache_dirty(struct cache *cache, struct bio *bio, in remap_to_cache_dirty()
821 static dm_oblock_t get_bio_block(struct cache *cache, struct bio *bio) in get_bio_block()
833 static int bio_triggers_commit(struct cache *cache, struct bio *bio) in bio_triggers_commit()
842 static void inc_ds(struct cache *cache, struct bio *bio, in inc_ds()
854 static bool accountable_bio(struct cache *cache, struct bio *bio) in accountable_bio()
860 static void accounted_begin(struct cache *cache, struct bio *bio) in accounted_begin()
871 static void accounted_complete(struct cache *cache, struct bio *bio) in accounted_complete()
879 static void accounted_request(struct cache *cache, struct bio *bio) in accounted_request()
885 static void issue(struct cache *cache, struct bio *bio) in issue()
904 static void inc_and_issue(struct cache *cache, struct bio *bio, struct dm_bio_prison_cell *cell) in inc_and_issue()
910 static void defer_writethrough_bio(struct cache *cache, struct bio *bio) in defer_writethrough_bio()
949 static void remap_to_origin_then_cache(struct cache *cache, struct bio *bio, in remap_to_origin_then_cache()
965 static enum cache_metadata_mode get_cache_mode(struct cache *cache) in get_cache_mode()
970 static const char *cache_device_name(struct cache *cache) in cache_device_name()
975 static void notify_mode_switch(struct cache *cache, enum cache_metadata_mode mode) in notify_mode_switch()
988 static void set_cache_mode(struct cache *cache, enum cache_metadata_mode new_mode) in set_cache_mode()
1028 static void abort_transaction(struct cache *cache) in abort_transaction()
1047 static void metadata_operation_failed(struct cache *cache, const char *op, int r) in metadata_operation_failed()
1061 static void inc_io_migrations(struct cache *cache) in inc_io_migrations()
1066 static void dec_io_migrations(struct cache *cache) in dec_io_migrations()
1076 static void __cell_defer(struct cache *cache, struct dm_bio_prison_cell *cell) in __cell_defer()
1088 static void cell_defer(struct cache *cache, struct dm_bio_prison_cell *cell, bool holder) in cell_defer()
1108 static void cell_error_with_code(struct cache *cache, struct dm_bio_prison_cell *cell, int err) in cell_error_with_code()
1114 static void cell_requeue(struct cache *cache, struct dm_bio_prison_cell *cell) in cell_requeue()
1121 struct cache *cache = mg->cache; in free_io_migration() local
1130 struct cache *cache = mg->cache; in migration_failure() local
1158 struct cache *cache = mg->cache; in migration_success_pre_commit() local
1200 struct cache *cache = mg->cache; in migration_success_post_commit() local
1243 struct cache *cache = mg->cache; in copy_complete() local
1259 struct cache *cache = mg->cache; in issue_copy() local
1288 struct cache *cache = mg->cache; in overwrite_endio() local
1322 static bool bio_writes_complete_block(struct cache *cache, struct bio *bio) in bio_writes_complete_block()
1334 static void calc_discard_block_range(struct cache *cache, struct bio *bio, in calc_discard_block_range()
1352 struct cache *cache = mg->cache; in issue_discard() local
1369 struct cache *cache = mg->cache; in issue_copy_or_discard() local
1402 static void process_migrations(struct cache *cache, struct list_head *head, in process_migrations()
1426 struct cache *cache = mg->cache; in queue_quiesced_migration() local
1435 static void queue_quiesced_migrations(struct cache *cache, struct list_head *work) in queue_quiesced_migrations()
1448 static void check_for_quiesced_migrations(struct cache *cache, in check_for_quiesced_migrations()
1469 static void promote(struct cache *cache, struct prealloc *structs, in promote()
1493 static void writeback(struct cache *cache, struct prealloc *structs, in writeback()
1517 static void demote_then_promote(struct cache *cache, struct prealloc *structs, in demote_then_promote()
1548 static void invalidate(struct cache *cache, struct prealloc *structs, in invalidate()
1572 static void discard(struct cache *cache, struct prealloc *structs, in discard()
1595 static void defer_bio(struct cache *cache, struct bio *bio) in defer_bio()
1606 static void process_flush_bio(struct cache *cache, struct bio *bio) in process_flush_bio()
1625 static void process_discard_bio(struct cache *cache, struct prealloc *structs, in process_discard_bio()
1648 static bool spare_migration_bandwidth(struct cache *cache) in spare_migration_bandwidth()
1655 static void inc_hit_counter(struct cache *cache, struct bio *bio) in inc_hit_counter()
1661 static void inc_miss_counter(struct cache *cache, struct bio *bio) in inc_miss_counter()
1670 struct cache *cache; member
1680 struct cache *cache = detail->cache; in inc_fn() local
1701 static void remap_cell_to_origin_clear_discard(struct cache *cache, in remap_cell_to_origin_clear_discard()
1736 static void remap_cell_to_cache_dirty(struct cache *cache, struct dm_bio_prison_cell *cell, in remap_cell_to_cache_dirty()
1776 struct cache *cache; member
1798 static void process_cell(struct cache *cache, struct prealloc *structs, in process_cell()
1894 static void process_bio(struct cache *cache, struct prealloc *structs, in process_bio()
1914 static int need_commit_due_to_time(struct cache *cache) in need_commit_due_to_time()
1923 static int commit(struct cache *cache, bool clean_shutdown) in commit()
1938 static int commit_if_needed(struct cache *cache) in commit_if_needed()
1952 static void process_deferred_bios(struct cache *cache) in process_deferred_bios()
1996 static void process_deferred_cells(struct cache *cache) in process_deferred_cells()
2033 static void process_deferred_flush_bios(struct cache *cache, bool submit_bios) in process_deferred_flush_bios()
2053 static void process_deferred_writethrough_bios(struct cache *cache) in process_deferred_writethrough_bios()
2073 static void writeback_some_dirty_blocks(struct cache *cache) in writeback_some_dirty_blocks()
2107 static void process_invalidation_request(struct cache *cache, struct invalidation_request *req) in process_invalidation_request()
2142 static void process_invalidation_requests(struct cache *cache) in process_invalidation_requests()
2159 static bool is_quiescing(struct cache *cache) in is_quiescing()
2164 static void ack_quiescing(struct cache *cache) in ack_quiescing()
2172 static void wait_for_quiescing_ack(struct cache *cache) in wait_for_quiescing_ack()
2177 static void start_quiescing(struct cache *cache) in start_quiescing()
2183 static void stop_quiescing(struct cache *cache) in stop_quiescing()
2189 static void wait_for_migrations(struct cache *cache) in wait_for_migrations()
2194 static void stop_worker(struct cache *cache) in stop_worker()
2200 static void requeue_deferred_cells(struct cache *cache) in requeue_deferred_cells()
2215 static void requeue_deferred_bios(struct cache *cache) in requeue_deferred_bios()
2230 static int more_work(struct cache *cache) in more_work()
2249 struct cache *cache = container_of(ws, struct cache, worker); in do_worker() local
2283 struct cache *cache = container_of(to_delayed_work(ws), struct cache, waker); in do_waker() local
2299 struct cache *cache = container_of(cb, struct cache, callbacks); in cache_is_congested() local
2313 static void destroy(struct cache *cache) in destroy()
2361 struct cache *cache = ti->private; in cache_dtr() local
2651 static int process_config_option(struct cache *cache, const char *key, const char *value) in process_config_option()
2666 static int set_config_value(struct cache *cache, const char *key, const char *value) in set_config_value()
2679 static int set_config_values(struct cache *cache, int argc, const char **argv) in set_config_values()
2700 static int create_cache_policy(struct cache *cache, struct cache_args *ca, in create_cache_policy()
2742 static void set_cache_size(struct cache *cache, dm_cblock_t size) in set_cache_size()
2761 struct cache *cache; in cache_create() local
2961 static int copy_ctr_args(struct cache *cache, int argc, const char **argv) in copy_ctr_args()
2989 struct cache *cache = NULL; in cache_ctr() local
3023 struct cache *cache = ti->private; in cache_map() local
3154 struct cache *cache = ti->private; in cache_end_io() local
3173 static int write_dirty_bitset(struct cache *cache) in write_dirty_bitset()
3192 static int write_discard_bitset(struct cache *cache) in write_discard_bitset()
3219 static int write_hints(struct cache *cache) in write_hints()
3238 static bool sync_metadata(struct cache *cache) in sync_metadata()
3270 struct cache *cache = ti->private; in cache_postsuspend() local
3287 struct cache *cache = context; in load_mapping() local
3308 struct cache *cache; member
3318 static void discard_load_info_init(struct cache *cache, in discard_load_info_init()
3385 static dm_cblock_t get_cache_dev_size(struct cache *cache) in get_cache_dev_size()
3392 static bool can_resize(struct cache *cache, dm_cblock_t new_size) in can_resize()
3413 static int resize_cache_dev(struct cache *cache, dm_cblock_t new_size) in resize_cache_dev()
3432 struct cache *cache = ti->private; in cache_preresume() local
3493 struct cache *cache = ti->private; in cache_resume() local
3519 struct cache *cache = ti->private; in cache_status() local
3630 static int parse_cblock_range(struct cache *cache, const char *str, in parse_cblock_range()
3667 static int validate_cblock_range(struct cache *cache, struct cblock_range *range) in validate_cblock_range()
3694 static int request_invalidation(struct cache *cache, struct cblock_range *range) in request_invalidation()
3713 static int process_invalidate_cblocks_message(struct cache *cache, unsigned count, in process_invalidate_cblocks_message()
3756 struct cache *cache = ti->private; in cache_message() local
3780 struct cache *cache = ti->private; in cache_iterate_devices() local
3789 static void set_discard_limits(struct cache *cache, struct queue_limits *limits) in set_discard_limits()
3801 struct cache *cache = ti->private; in cache_io_hints() local