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
416 struct cache {
492 * Flag bits, for how the cache set is shutting down, and what phase it's at:
498 * CACHE_SET_STOPPING always gets set first when we're closing down a cache set;
502 * CACHE_SET_RUNNING means all cache devices have been registered and journal
505 * CACHE_SET_IO_DISABLE is set when bcache is stopping the whold cache set, all
527 struct cache *cache;
544 /* For the btree cache */
547 /* For the btree cache and anything allocation related */
573 * btree_cache_freeable effectively is a small cache - we use it because
587 * allocation fails, we can cannibalize another node in the btree cache
644 * finished, but read hit rate dropped due to clean data on cache is
658 /* Counts how many sectors bio_insert has added to the cache */
807 return s & (c->cache->sb.bucket_size - 1);
821 return c->cache->buckets + PTR_BUCKET_NR(c, k, ptr);
840 return (PTR_DEV(k, i) < MAX_CACHES_PER_SET) && c->cache;
929 struct cache *ca = c->cache;
964 void bch_count_io_errors(struct cache *ca, blk_status_t error,
977 uint8_t bch_inc_gen(struct cache *ca, struct bucket *b);
980 bool bch_can_invalidate_bucket(struct cache *ca, struct bucket *b);
981 void __bch_invalidate_one_bucket(struct cache *ca, struct bucket *b);
983 void __bch_bucket_free(struct cache *ca, struct bucket *b);
986 long bch_bucket_alloc(struct cache *ca, unsigned int reserve, bool wait);
999 int bch_prio_write(struct cache *ca, bool wait);
1040 int bch_cache_allocator_start(struct cache *ca);