Lines Matching defs:list_mode
65 * dm_buffer->list_mode
348 unsigned char list_mode; /* LIST_* */
573 static inline unsigned long cache_count(struct dm_buffer_cache *bc, int list_mode)
575 return bc->lru[list_mode].count;
680 static struct dm_buffer *__cache_evict(struct dm_buffer_cache *bc, int list_mode,
688 le = lru_evict(&bc->lru[list_mode], __evict_pred, &w, bc->no_sleep);
699 static struct dm_buffer *cache_evict(struct dm_buffer_cache *bc, int list_mode,
706 b = __cache_evict(bc, list_mode, pred, context, &lh);
717 static void cache_mark(struct dm_buffer_cache *bc, struct dm_buffer *b, int list_mode)
720 if (list_mode != b->list_mode) {
721 lru_remove(&bc->lru[b->list_mode], &b->lru);
722 b->list_mode = list_mode;
723 lru_insert(&bc->lru[b->list_mode], &b->lru);
747 b->list_mode = new_mode;
748 lru_insert(&bc->lru[b->list_mode], &b->lru);
780 static void __cache_iterate(struct dm_buffer_cache *bc, int list_mode,
783 struct lru *lru = &bc->lru[list_mode];
808 static void cache_iterate(struct dm_buffer_cache *bc, int list_mode,
814 __cache_iterate(bc, list_mode, fn, context, &lh);
855 if (WARN_ON_ONCE(b->list_mode >= LIST_SIZE))
862 lru_insert(&bc->lru[b->list_mode], &b->lru);
887 lru_remove(&bc->lru[b->list_mode], &b->lru);
943 lru_remove(&bc->lru[b->list_mode], &b->lru);
1506 if (WARN_ON_ONCE(b->list_mode != LIST_CLEAN))
1521 if (WARN_ON_ONCE(b->list_mode != LIST_DIRTY))
1792 b->list_mode = LIST_CLEAN;
2309 (unsigned long long)b->block, atomic_read(&b->hold_count), b->list_mode);
2682 int list_mode, unsigned long max_count)
2689 b = cache_evict(&c->cache, list_mode, select_for_evict, params);