]> git.sesse.net Git - bcachefs-tools-debian/blobdiff - libbcachefs/movinggc.c
Update bcachefs sources to 15f6e66e86 bcachefs: pass around bset_tree less
[bcachefs-tools-debian] / libbcachefs / movinggc.c
index 7bef456110f1e1132ce812e2a15e3c8cc8940e85..d414ee94cc2c3677da2468c512f4871911c25a30 100644 (file)
@@ -227,16 +227,10 @@ static int bch2_copygc_thread(void *arg)
 
                last = atomic_long_read(&clock->now);
 
-               reserve = div64_u64((ca->mi.nbuckets - ca->mi.first_bucket) *
-                                ca->mi.bucket_size *
-                                c->opts.gc_reserve_percent, 200);
+               reserve = ca->copygc_threshold;
 
                usage = bch2_dev_usage_read(c, ca);
 
-               /*
-                * don't start copygc until less than half the gc reserve is
-                * available:
-                */
                available = __dev_buckets_available(ca, usage) *
                        ca->mi.bucket_size;
                if (available > reserve) {