Lines Matching refs:list_mode
348 unsigned char list_mode; /* LIST_* */ member
570 static inline unsigned long cache_count(struct dm_buffer_cache *bc, int list_mode) in cache_count() argument
572 return bc->lru[list_mode].count; in cache_count()
677 static struct dm_buffer *__cache_evict(struct dm_buffer_cache *bc, int list_mode, in __cache_evict() argument
685 le = lru_evict(&bc->lru[list_mode], __evict_pred, &w, bc->no_sleep); in __cache_evict()
696 static struct dm_buffer *cache_evict(struct dm_buffer_cache *bc, int list_mode, in cache_evict() argument
703 b = __cache_evict(bc, list_mode, pred, context, &lh); in cache_evict()
714 static void cache_mark(struct dm_buffer_cache *bc, struct dm_buffer *b, int list_mode) in cache_mark() argument
717 if (list_mode != b->list_mode) { in cache_mark()
718 lru_remove(&bc->lru[b->list_mode], &b->lru); in cache_mark()
719 b->list_mode = list_mode; in cache_mark()
720 lru_insert(&bc->lru[b->list_mode], &b->lru); in cache_mark()
744 b->list_mode = new_mode; in __cache_mark_many()
745 lru_insert(&bc->lru[b->list_mode], &b->lru); in __cache_mark_many()
777 static void __cache_iterate(struct dm_buffer_cache *bc, int list_mode, in __cache_iterate() argument
780 struct lru *lru = &bc->lru[list_mode]; in __cache_iterate()
805 static void cache_iterate(struct dm_buffer_cache *bc, int list_mode, in cache_iterate() argument
811 __cache_iterate(bc, list_mode, fn, context, &lh); in cache_iterate()
852 if (WARN_ON_ONCE(b->list_mode >= LIST_SIZE)) in cache_insert()
859 lru_insert(&bc->lru[b->list_mode], &b->lru); in cache_insert()
884 lru_remove(&bc->lru[b->list_mode], &b->lru); in cache_remove()
940 lru_remove(&bc->lru[b->list_mode], &b->lru); in __remove_range()
1506 if (WARN_ON_ONCE(b->list_mode != LIST_CLEAN)) in is_clean()
1521 if (WARN_ON_ONCE(b->list_mode != LIST_DIRTY)) in is_dirty()
1792 b->list_mode = LIST_CLEAN; in __bufio_new()
2336 (unsigned long long)b->block, atomic_read(&b->hold_count), b->list_mode); in warn_leak()
2719 int list_mode, unsigned long max_count) in __evict_many() argument
2726 b = cache_evict(&c->cache, list_mode, select_for_evict, params); in __evict_many()