Lines Matching refs:wc_entry

82 struct wc_entry {  struct
116 struct wc_entry *current_free; argument
154 struct wc_entry *entries;
226 struct wc_entry **wc_list;
228 struct wc_entry *wc_list_inline[WB_LIST_INLINE];
235 struct wc_entry *e;
393 static struct wc_memory_entry *memory_entry(struct dm_writecache *wc, struct wc_entry *e) in memory_entry()
398 static void *memory_data(struct dm_writecache *wc, struct wc_entry *e) in memory_data()
403 static sector_t cache_sector(struct dm_writecache *wc, struct wc_entry *e) in cache_sector()
409 static uint64_t read_original_sector(struct dm_writecache *wc, struct wc_entry *e) in read_original_sector()
418 static uint64_t read_seq_count(struct dm_writecache *wc, struct wc_entry *e) in read_seq_count()
427 static void clear_seq_count(struct dm_writecache *wc, struct wc_entry *e) in clear_seq_count()
435 static void write_original_sector_seq_count(struct dm_writecache *wc, struct wc_entry *e, in write_original_sector_seq_count()
607 static struct wc_entry *writecache_find_entry(struct dm_writecache *wc, in writecache_find_entry()
610 struct wc_entry *e; in writecache_find_entry()
617 e = container_of(node, struct wc_entry, rb_node); in writecache_find_entry()
633 e = container_of(node, struct wc_entry, rb_node); in writecache_find_entry()
639 struct wc_entry *e2; in writecache_find_entry()
647 e2 = container_of(node, struct wc_entry, rb_node); in writecache_find_entry()
654 static void writecache_insert_entry(struct dm_writecache *wc, struct wc_entry *ins) in writecache_insert_entry()
656 struct wc_entry *e; in writecache_insert_entry()
660 e = container_of(*node, struct wc_entry, rb_node); in writecache_insert_entry()
673 static void writecache_unlink(struct dm_writecache *wc, struct wc_entry *e) in writecache_unlink()
679 static void writecache_add_to_freelist(struct dm_writecache *wc, struct wc_entry *e) in writecache_add_to_freelist()
717 static struct wc_entry *writecache_pop_from_freelist(struct dm_writecache *wc, sector_t expected_se… in writecache_pop_from_freelist()
719 struct wc_entry *e; in writecache_pop_from_freelist()
733 wc->current_free = next ? container_of(next, struct wc_entry, rb_node) : NULL; in writecache_pop_from_freelist()
737 e = container_of(wc->freelist.next, struct wc_entry, lru); in writecache_pop_from_freelist()
749 static void writecache_free_entry(struct dm_writecache *wc, struct wc_entry *e) in writecache_free_entry()
782 static void writecache_flush_entry(struct dm_writecache *wc, struct wc_entry *e) in writecache_flush_entry()
789 static bool writecache_entry_is_committed(struct dm_writecache *wc, struct wc_entry *e) in writecache_entry_is_committed()
796 struct wc_entry *e, *e2; in writecache_flush()
805 e = container_of(wc->lru.next, struct wc_entry, lru); in writecache_flush()
818 e2 = container_of(e->lru.next, struct wc_entry, lru); in writecache_flush()
841 e2 = container_of(rb_node, struct wc_entry, rb_node); in writecache_flush()
850 e = container_of(e->lru.prev, struct wc_entry, lru); in writecache_flush()
883 struct wc_entry *e; in writecache_discard()
909 e = container_of(node, struct wc_entry, rb_node); in writecache_discard()
965 wc->entries = vmalloc(array_size(sizeof(struct wc_entry), wc->n_blocks)); in writecache_alloc_entries()
969 struct wc_entry *e = &wc->entries[b]; in writecache_alloc_entries()
1042 struct wc_entry *e = &wc->entries[b]; in writecache_resume()
1065 struct wc_entry *e = &wc->entries[b]; in writecache_resume()
1075 struct wc_entry *old; in writecache_resume()
1340 struct wc_entry *e) in writecache_map_remap_origin()
1353 struct wc_entry *e; in writecache_map_read()
1383 struct wc_entry *e, bool search_used) in writecache_bio_copy_ssd()
1391 struct wc_entry *f = writecache_pop_from_freelist(wc, current_cache_sec); in writecache_bio_copy_ssd()
1400 struct wc_entry *f; in writecache_bio_copy_ssd()
1405 f = container_of(next, struct wc_entry, rb_node); in writecache_bio_copy_ssd()
1438 struct wc_entry *e; in writecache_map_write()
1686 struct wc_entry *e; in __writecache_endio_pmem()
1724 struct wc_entry *e; in __writecache_endio_ssd()
1797 static bool wc_add_block(struct writeback_struct *wb, struct wc_entry *e) in wc_add_block()
1832 struct wc_entry *e, *f; in __writecache_writeback_pmem()
1839 e = container_of(wbl->list.prev, struct wc_entry, lru); in __writecache_writeback_pmem()
1852 wb->wc_list = kmalloc_array(max_pages, sizeof(struct wc_entry *), in __writecache_writeback_pmem()
1867 f = container_of(wbl->list.prev, struct wc_entry, lru); in __writecache_writeback_pmem()
1896 struct wc_entry *e, *f; in __writecache_writeback_ssd()
1904 e = container_of(wbl->list.prev, struct wc_entry, lru); in __writecache_writeback_ssd()
1923 f = container_of(wbl->list.prev, struct wc_entry, lru); in __writecache_writeback_ssd()
1947 struct wc_entry *f, *g, *e = NULL; in writecache_writeback()
1997 (jiffies - container_of(wc->lru.prev, struct wc_entry, lru)->age >= in writecache_writeback()
2011 e = container_of(rb_first(&wc->tree), struct wc_entry, rb_node); in writecache_writeback()
2015 e = container_of(wc->lru.prev, struct wc_entry, lru); in writecache_writeback()
2022 f = container_of(node, struct wc_entry, rb_node); in writecache_writeback()
2043 g = container_of(next_node, struct wc_entry, rb_node); in writecache_writeback()
2077 g = container_of(next_node, struct wc_entry, rb_node); in writecache_writeback()
2118 struct wc_entry e; in calculate_memory_size()