Lines Matching refs:buckets

7  * Allocation in bcache is done in terms of buckets:
17 * of buckets on disk, with a pointer to them in the journal header.
25 * batch this up: We fill up the free_inc list with freshly invalidated buckets,
26 * call prio_write(), and when prio_write() finishes we pull buckets off the
31 * smaller freelist, and buckets on that list are always ready to be used.
36 * There is another freelist, because sometimes we have buckets that we know
38 * priorities to be rewritten. These come from freed btree nodes and buckets
40 * them (because they were overwritten). That's the unused list - buckets on the
57 * buckets are ready.
59 * invalidate_buckets_(lru|fifo)() find buckets that are available to be
119 * Background allocation thread: scans for buckets to be invalidated,
121 * then optionally issues discard commands to the newly free buckets, then puts
146 trace_bcache_invalidate(ca, b - ca->buckets);
157 fifo_push(&ca->free_inc, b - ca->buckets);
161 * Determines what order we're going to reuse buckets, smallest bucket_prio()
226 b = ca->buckets + ca->fifo_last_bucket++;
252 b = ca->buckets + n;
325 * First, we pull buckets off of the unused and free_inc lists,
349 * We've run out of free buckets, we need to find some buckets
445 b = ca->buckets + r;
508 k->ptr[0] = MAKE_PTR(ca->buckets[b].gen,
542 * We keep multiple buckets open for writes, and try to segregate different
553 * dirty sectors mixed with dirty sectors of cached device, such buckets will
560 * data to the same buckets it'd get invalidated at the same time.
684 * k takes refcounts on the buckets it points to until it's inserted