Lines Matching refs:dm_buffer

326 struct dm_buffer {  struct
357 void (*end_io)(struct dm_buffer *b, blk_status_t bs); argument
523 static inline struct dm_buffer *le_to_buffer(struct lru_entry *le) in le_to_buffer()
525 return container_of(le, struct dm_buffer, lru); in le_to_buffer()
528 static struct dm_buffer *list_to_buffer(struct list_head *l) in list_to_buffer()
589 static struct dm_buffer *__cache_get(const struct rb_root *root, sector_t block) in __cache_get()
592 struct dm_buffer *b; in __cache_get()
595 b = container_of(n, struct dm_buffer, node); in __cache_get()
606 static void __cache_inc_buffer(struct dm_buffer *b) in __cache_inc_buffer()
612 static struct dm_buffer *cache_get(struct dm_buffer_cache *bc, sector_t block) in cache_get()
614 struct dm_buffer *b; in cache_get()
633 static bool cache_put(struct dm_buffer_cache *bc, struct dm_buffer *b) in cache_put()
647 typedef enum evict_result (*b_predicate)(struct dm_buffer *, void *);
667 struct dm_buffer *b = le_to_buffer(le); in __evict_pred()
677 static struct dm_buffer *__cache_evict(struct dm_buffer_cache *bc, int list_mode, in __cache_evict()
683 struct dm_buffer *b; in __cache_evict()
696 static struct dm_buffer *cache_evict(struct dm_buffer_cache *bc, int list_mode, in cache_evict()
699 struct dm_buffer *b; in cache_evict()
714 static void cache_mark(struct dm_buffer_cache *bc, struct dm_buffer *b, int list_mode) in cache_mark()
735 struct dm_buffer *b; in __cache_mark_many()
775 typedef enum it_action (*iter_fn)(struct dm_buffer *b, void *context);
788 struct dm_buffer *b = le_to_buffer(le); in __cache_iterate()
826 static bool __cache_insert(struct rb_root *root, struct dm_buffer *b) in __cache_insert()
829 struct dm_buffer *found; in __cache_insert()
832 found = container_of(*new, struct dm_buffer, node); in __cache_insert()
848 static bool cache_insert(struct dm_buffer_cache *bc, struct dm_buffer *b) in cache_insert()
873 static bool cache_remove(struct dm_buffer_cache *bc, struct dm_buffer *b) in cache_remove()
894 typedef void (*b_release)(struct dm_buffer *);
896 static struct dm_buffer *__find_next(struct rb_root *root, sector_t block) in __find_next()
899 struct dm_buffer *b; in __find_next()
900 struct dm_buffer *best = NULL; in __find_next()
903 b = container_of(n, struct dm_buffer, node); in __find_next()
924 struct dm_buffer *b; in __remove_range()
988 void (*alloc_callback)(struct dm_buffer *buf);
989 void (*write_callback)(struct dm_buffer *buf);
1092 static void buffer_record_stack(struct dm_buffer *b) in buffer_record_stack()
1100 static void adjust_total_allocated(struct dm_buffer *b, bool unlink) in adjust_total_allocated()
1226 static struct dm_buffer *alloc_buffer(struct dm_bufio_client *c, gfp_t gfp_mask) in alloc_buffer()
1228 struct dm_buffer *b = kmem_cache_alloc(c->slab_buffer, gfp_mask); in alloc_buffer()
1251 static void free_buffer(struct dm_buffer *b) in free_buffer()
1286 struct dm_buffer *b = context; in dmio_complete()
1291 static void use_dmio(struct dm_buffer *b, enum req_op op, sector_t sector, in use_dmio()
1323 struct dm_buffer *b = bio->bi_private; in bio_complete()
1331 static void use_bio(struct dm_buffer *b, enum req_op op, sector_t sector, in use_bio()
1371 static void submit_io(struct dm_buffer *b, enum req_op op, unsigned short ioprio, in submit_io()
1372 void (*end_io)(struct dm_buffer *, blk_status_t)) in submit_io() argument
1418 static void write_endio(struct dm_buffer *b, blk_status_t status) in write_endio()
1446 static void __write_dirty_buffer(struct dm_buffer *b, in __write_dirty_buffer()
1470 struct dm_buffer *b = in __flush_write_list()
1471 list_entry(write_list->next, struct dm_buffer, write_list); in __flush_write_list()
1484 static void __make_buffer_clean(struct dm_buffer *b) in __make_buffer_clean()
1497 static enum evict_result is_clean(struct dm_buffer *b, void *context) in is_clean()
1516 static enum evict_result is_dirty(struct dm_buffer *b, void *context) in is_dirty()
1531 static struct dm_buffer *__get_unclaimed_buffer(struct dm_bufio_client *c) in __get_unclaimed_buffer()
1533 struct dm_buffer *b; in __get_unclaimed_buffer()
1594 static struct dm_buffer *__alloc_buffer_wait_no_callback(struct dm_bufio_client *c, enum new_flag n… in __alloc_buffer_wait_no_callback()
1596 struct dm_buffer *b; in __alloc_buffer_wait_no_callback()
1647 static struct dm_buffer *__alloc_buffer_wait(struct dm_bufio_client *c, enum new_flag nf) in __alloc_buffer_wait()
1649 struct dm_buffer *b = __alloc_buffer_wait_no_callback(c, nf); in __alloc_buffer_wait()
1663 static void __free_buffer_wake(struct dm_buffer *b) in __free_buffer_wake()
1683 static enum evict_result cleaned(struct dm_buffer *b, void *context) in cleaned()
1704 static enum it_action write_one(struct dm_buffer *b, void *context) in write_one()
1743 static void cache_put_and_wake(struct dm_bufio_client *c, struct dm_buffer *b) in cache_put_and_wake()
1758 static struct dm_buffer *__bufio_new(struct dm_bufio_client *c, sector_t block, in __bufio_new()
1762 struct dm_buffer *b, *new_b = NULL; in __bufio_new()
1835 static void read_endio(struct dm_buffer *b, blk_status_t status) in read_endio()
1855 enum new_flag nf, struct dm_buffer **bp, in new_read()
1859 struct dm_buffer *b; in new_read()
1928 struct dm_buffer **bp) in dm_bufio_get()
1935 struct dm_buffer **bp, unsigned short ioprio) in __dm_bufio_read()
1944 struct dm_buffer **bp) in dm_bufio_read()
1951 struct dm_buffer **bp, unsigned short ioprio) in dm_bufio_read_with_ioprio()
1958 struct dm_buffer **bp) in dm_bufio_new()
1982 struct dm_buffer *b; in __dm_bufio_prefetch()
2034 void dm_bufio_release(struct dm_buffer *b) in dm_bufio_release()
2063 void dm_bufio_mark_partial_buffer_dirty(struct dm_buffer *b, in dm_bufio_mark_partial_buffer_dirty()
2090 void dm_bufio_mark_buffer_dirty(struct dm_buffer *b) in dm_bufio_mark_buffer_dirty()
2119 struct dm_buffer *b = le_to_buffer(e); in is_writing()
2142 struct dm_buffer *b = le_to_buffer(e); in dm_bufio_write_dirty_buffers()
2227 struct dm_buffer *b; in forget_buffer()
2258 static enum evict_result idle(struct dm_buffer *b, void *context) in idle()
2305 sector_t dm_bufio_get_block_number(struct dm_buffer *b) in dm_bufio_get_block_number()
2311 void *dm_bufio_get_block_data(struct dm_buffer *b) in dm_bufio_get_block_data()
2317 void *dm_bufio_get_aux_data(struct dm_buffer *b) in dm_bufio_get_aux_data()
2323 struct dm_bufio_client *dm_bufio_get_client(struct dm_buffer *b) in dm_bufio_get_client()
2329 static enum it_action warn_leak(struct dm_buffer *b, void *context) in warn_leak()
2348 struct dm_buffer *b; in drop_buffers()
2395 struct dm_buffer *b; in __scan()
2467 void (*alloc_callback)(struct dm_buffer *), in dm_bufio_client_create() argument
2468 void (*write_callback)(struct dm_buffer *), in dm_bufio_client_create() argument
2541 c->slab_buffer = kmem_cache_create(slab_name, sizeof(struct dm_buffer) + aux_size, in dm_bufio_client_create()
2549 struct dm_buffer *b = alloc_buffer(c, GFP_KERNEL); in dm_bufio_client_create()
2586 struct dm_buffer *b = list_to_buffer(c->reserved_buffers.next); in dm_bufio_client_create()
2628 struct dm_buffer *b = list_to_buffer(c->reserved_buffers.next); in dm_bufio_client_destroy()
2677 static bool older_than(struct dm_buffer *b, unsigned long age_hz) in older_than()
2702 static enum evict_result select_for_evict(struct dm_buffer *b, void *context) in select_for_evict()
2723 struct dm_buffer *b; in __evict_many()