Lines Matching defs:ca
190 static unsigned int bucket_heap_top(struct cache *ca)
194 return (b = heap_peek(&ca->heap)) ? GC_SECTORS_USED(b) : 0;
199 struct cache *ca = c->cache;
209 reserve_sectors = ca->sb.bucket_size *
210 fifo_used(&ca->free[RESERVE_MOVINGGC]);
212 ca->heap.used = 0;
214 for_each_bucket(b, ca) {
217 GC_SECTORS_USED(b) == ca->sb.bucket_size ||
221 if (!heap_full(&ca->heap)) {
223 heap_add(&ca->heap, b, bucket_cmp);
224 } else if (bucket_cmp(b, heap_peek(&ca->heap))) {
225 sectors_to_move -= bucket_heap_top(ca);
228 ca->heap.data[0] = b;
229 heap_sift(&ca->heap, 0, bucket_cmp);
234 heap_pop(&ca->heap, b, bucket_cmp);
238 while (heap_pop(&ca->heap, b, bucket_cmp))