Lines Matching refs:bucket_gens
1255 struct bucket_gens *buckets = in bucket_gens_free_rcu()
1256 container_of(rcu, struct bucket_gens, rcu); in bucket_gens_free_rcu()
1263 struct bucket_gens *bucket_gens = NULL, *old_bucket_gens = NULL; in bch2_dev_buckets_resize() local
1264 bool resize = ca->bucket_gens != NULL; in bch2_dev_buckets_resize()
1269 if (!(bucket_gens = kvmalloc(sizeof(struct bucket_gens) + nbuckets, in bch2_dev_buckets_resize()
1275 bucket_gens->first_bucket = ca->mi.first_bucket; in bch2_dev_buckets_resize()
1276 bucket_gens->nbuckets = nbuckets; in bch2_dev_buckets_resize()
1277 bucket_gens->nbuckets_minus_first = in bch2_dev_buckets_resize()
1278 bucket_gens->nbuckets - bucket_gens->first_bucket; in bch2_dev_buckets_resize()
1285 old_bucket_gens = rcu_dereference_protected(ca->bucket_gens, 1); in bch2_dev_buckets_resize()
1288 size_t n = min(bucket_gens->nbuckets, old_bucket_gens->nbuckets); in bch2_dev_buckets_resize()
1290 memcpy(bucket_gens->b, in bch2_dev_buckets_resize()
1295 rcu_assign_pointer(ca->bucket_gens, bucket_gens); in bch2_dev_buckets_resize()
1296 bucket_gens = old_bucket_gens; in bch2_dev_buckets_resize()
1307 if (bucket_gens) in bch2_dev_buckets_resize()
1308 call_rcu(&bucket_gens->rcu, bucket_gens_free_rcu); in bch2_dev_buckets_resize()
1316 kvfree(rcu_dereference_protected(ca->bucket_gens, 1)); in bch2_dev_buckets_free()