Lines Matching refs:buckets
42 * To do this, we first divide the cache device up into buckets. A bucket is the
47 * it. The gens and priorities for all the buckets are stored contiguously and
48 * packed on disk (in a linked list of buckets - aside from the superblock, all
49 * of bcache's metadata is stored in buckets).
56 * The generation is used for invalidating buckets. Each pointer also has an 8
62 * Bcache is entirely COW - we never write twice to a bucket, even buckets that
113 * (If buckets are really big we'll only use part of the bucket for a btree node
143 * Thus, the primary purpose of garbage collection is to find buckets to reuse.
145 * allocation can reuse buckets sooner when they've been mostly overwritten.
432 * When allocating new buckets, prio_write() gets first dibs - since we
434 * prio_last_buckets[] contains the last buckets we wrote priorities to
436 * buckets allocated for the next prio write.
444 * free_inc: Incoming buckets - these are buckets that currently have
456 struct bucket *buckets;
461 * If nonzero, we know we aren't going to find any buckets to invalidate
618 * When we invalidate buckets, we use both the priority and the amount
619 * of good data to determine which buckets to reuse first - to weight
626 * max(gen - last_gc) for all buckets. When it gets too big we have to
695 /* List of buckets we're currently writing data to */
821 return c->cache->buckets + PTR_BUCKET_NR(c, k, ptr);
889 for (b = (ca)->buckets + (ca)->sb.first_bucket; \
890 b < (ca)->buckets + (ca)->sb.nbuckets; b++)