diff options
-rw-r--r-- | fs/bcachefs/super.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/fs/bcachefs/super.c b/fs/bcachefs/super.c index 3f674bf061ff..c7fd54ebc7b4 100644 --- a/fs/bcachefs/super.c +++ b/fs/bcachefs/super.c @@ -327,26 +327,12 @@ static int bch2_fs_read_write_late(struct bch_fs *c) { int ret; - ret = bch2_gc_thread_start(c); - if (ret) { - bch_err(c, "error starting gc thread"); - return ret; - } - - ret = bch2_copygc_start(c); - if (ret) { - bch_err(c, "error starting copygc thread"); - return ret; - } - ret = bch2_rebalance_start(c); if (ret) { bch_err(c, "error starting rebalance thread"); return ret; } - schedule_work(&c->ec_stripe_delete_work); - return 0; } @@ -385,6 +371,20 @@ static int __bch2_fs_read_write(struct bch_fs *c, bool early) bch2_dev_allocator_add(c, ca); bch2_recalc_capacity(c); + ret = bch2_gc_thread_start(c); + if (ret) { + bch_err(c, "error starting gc thread"); + return ret; + } + + ret = bch2_copygc_start(c); + if (ret) { + bch_err(c, "error starting copygc thread"); + return ret; + } + + schedule_work(&c->ec_stripe_delete_work); + bch2_do_discards(c); bch2_do_invalidates(c); |