Lines Matching defs:cache

8  * Bcache mostly works with cache sets, cache devices, and backing devices.
10 * Support for multiple cache devices hasn't quite been finished off yet, but
11 * it's about 95% plumbed through. A cache set and its cache devices is sort of
13 * about individual cache devices, the main abstraction is the cache set.
15 * Multiple cache devices is intended to give us the ability to mirror dirty
19 * cache set. When you register a newly formatted backing device it'll come up
21 * a cache set at runtime - while it's mounted and in use. Detaching implicitly
24 * A cache set can have multiple (many) backing devices attached to it.
39 * efficient way of deleting things from the cache so we can write new things to
42 * To do this, we first divide the cache device up into buckets. A bucket is the
52 * we allocate it or on cache it, and every so often we decrement the priority
73 * invalidating the cache).
80 * Pointers contain the cache device id, the offset on that device, and an 8 bit
83 * Index lookups are not fully abstracted - cache lookups in particular are
96 * data into the cache after a cache miss, and for background writeback, and for
161 * write until we've updated the index on disk, otherwise the cache would be
311 /* Refcount on the cache set. Always nonzero when we're caching. */
316 * Device might not be running if it's dirty and the cache set hasn't
329 * data in the cache. Protected by writeback_lock; must have an
408 struct cache {
486 * Flag bits, for how the cache set is shutting down, and what phase it's at:
492 * CACHE_SET_STOPPING always gets set first when we're closing down a cache set;
496 * CACHE_SET_RUNNING means all cache devices have been registered and journal
499 * CACHE_SET_IO_DISABLE is set when bcache is stopping the whold cache set, all
521 struct cache *cache;
538 /* For the btree cache */
541 /* For the btree cache and anything allocation related */
567 * btree_cache_freeable effectively is a small cache - we use it because
581 * allocation fails, we can cannibalize another node in the btree cache
638 * finished, but read hit rate dropped due to clean data on cache is
652 /* Counts how many sectors bio_insert has added to the cache */
801 return s & (c->cache->sb.bucket_size - 1);
804 static inline struct cache *PTR_CACHE(struct cache_set *c,
808 return c->cache;
930 struct cache *ca = c->cache;
965 void bch_count_io_errors(struct cache *ca, blk_status_t error,
978 uint8_t bch_inc_gen(struct cache *ca, struct bucket *b);
981 bool bch_can_invalidate_bucket(struct cache *ca, struct bucket *b);
982 void __bch_invalidate_one_bucket(struct cache *ca, struct bucket *b);
984 void __bch_bucket_free(struct cache *ca, struct bucket *b);
987 long bch_bucket_alloc(struct cache *ca, unsigned int reserve, bool wait);
1000 int bch_prio_write(struct cache *ca, bool wait);
1041 int bch_cache_allocator_start(struct cache *ca);