bcachefs: no need to run gc when initializing new fs

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
Kent Overstreet
2019-02-10 19:16:55 -05:00
committed by Kent Overstreet
parent 6d033aa404
commit f7e76361c4

View File

@@ -407,16 +407,11 @@ int bch2_fs_initialize(struct bch_fs *c)
mutex_unlock(&c->sb_lock);
set_bit(BCH_FS_ALLOC_READ_DONE, &c->flags);
set_bit(BCH_FS_INITIAL_GC_DONE, &c->flags);
for (i = 0; i < BTREE_ID_NR; i++)
bch2_btree_root_alloc(c, i);
ret = bch2_gc(c, &journal, true);
if (ret)
goto err;
set_bit(BCH_FS_INITIAL_GC_DONE, &c->flags);
err = "unable to allocate journal buckets";
for_each_online_member(ca, c, i)
if (bch2_dev_journal_alloc(ca)) {