bcachefs: Don't stop copygc thread on device resize
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 24 Nov 2023 05:54:43 +0000 (00:54 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 24 Nov 2023 07:30:32 +0000 (02:30 -0500)
copygc no longer has to scan the buckets, so it's no longer a problem if
the number of buckets is changing while it's running.

This also fixes a bug where we forgot to restart copygc.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/buckets.c

index 58d8c6ffd955429d9f13207ddf04c1f687a68b2e..61e4cc09ad831b56de3b4405c01e9cc9d4d6530b 100644 (file)
@@ -2091,8 +2091,6 @@ int bch2_dev_buckets_resize(struct bch_fs *c, struct bch_dev *ca, u64 nbuckets)
        bucket_gens->first_bucket = ca->mi.first_bucket;
        bucket_gens->nbuckets   = nbuckets;
 
-       bch2_copygc_stop(c);
-
        if (resize) {
                down_write(&c->gc_lock);
                down_write(&ca->bucket_lock);