Lines Matching refs:buckets_in_flight

30 struct buckets_in_flight {  struct
47 static void move_bucket_in_flight_add(struct buckets_in_flight *list, struct move_bucket *b) in move_bucket_in_flight_add() argument
98 static void move_bucket_free(struct buckets_in_flight *list, in move_bucket_free()
108 struct buckets_in_flight *list, in move_buckets_wait()
133 static bool bucket_in_flight(struct buckets_in_flight *list, in bucket_in_flight()
140 struct buckets_in_flight *buckets_in_flight) in bch2_copygc_get_buckets() argument
144 size_t nr_to_get = max_t(size_t, 16U, buckets_in_flight->nr / 4); in bch2_copygc_get_buckets()
148 move_buckets_wait(ctxt, buckets_in_flight, false); in bch2_copygc_get_buckets()
172 else if (bucket_in_flight(buckets_in_flight, b.k)) in bch2_copygc_get_buckets()
182 ret2 = darray_push(&buckets_in_flight->to_evacuate, b_i); in bch2_copygc_get_buckets()
188 ret2 = rhashtable_lookup_insert_fast(buckets_in_flight->table, &b_i->hash, in bch2_copygc_get_buckets()
195 ret2 = buckets_in_flight->to_evacuate.nr >= nr_to_get; in bch2_copygc_get_buckets()
201 buckets_in_flight->nr, buckets_in_flight->sectors, in bch2_copygc_get_buckets()
202 saw, in_flight, not_movable, buckets_in_flight->to_evacuate.nr, sectors, nr_to_get, ret); in bch2_copygc_get_buckets()
209 struct buckets_in_flight *buckets_in_flight, in bch2_copygc() argument
221 ret = bch2_copygc_get_buckets(ctxt, buckets_in_flight); in bch2_copygc()
225 darray_for_each(buckets_in_flight->to_evacuate, i) { in bch2_copygc()
232 move_bucket_in_flight_add(buckets_in_flight, b); in bch2_copygc()
250 trace_and_count(c, copygc, c, buckets_in_flight->to_evacuate.nr, sectors_seen, sectors_moved); in bch2_copygc()
252 darray_for_each(buckets_in_flight->to_evacuate, i) in bch2_copygc()
254 move_bucket_free(buckets_in_flight, *i); in bch2_copygc()
255 darray_exit(&buckets_in_flight->to_evacuate); in bch2_copygc()
350 struct buckets_in_flight buckets = {}; in bch2_copygc_thread()