Lines Matching full: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); in __bch_invalidate_one_bucket()
157 fifo_push(&ca->free_inc, b - ca->buckets); in bch_invalidate_one_bucket()
161 * Determines what order we're going to reuse buckets, smallest bucket_prio()
226 b = ca->buckets + ca->fifo_last_bucket++; in invalidate_buckets_fifo()
252 b = ca->buckets + n; in invalidate_buckets_random()
325 * First, we pull buckets off of the unused and free_inc lists, in bch_allocator_thread()
349 * We've run out of free buckets, we need to find some buckets in bch_allocator_thread()
445 b = ca->buckets + r; in bch_bucket_alloc()
507 k->ptr[0] = MAKE_PTR(ca->buckets[b].gen, in __bch_bucket_alloc_set()
541 * We keep multiple buckets open for writes, and try to segregate different
552 * dirty sectors mixed with dirty sectors of cached device, such buckets will
559 * data to the same buckets it'd get invalidated at the same time.
683 * k takes refcounts on the buckets it points to until it's inserted in bch_alloc_sectors()