Commit f7e76361 authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: no need to run gc when initializing new fs

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 6d033aa4
...@@ -407,16 +407,11 @@ int bch2_fs_initialize(struct bch_fs *c) ...@@ -407,16 +407,11 @@ int bch2_fs_initialize(struct bch_fs *c)
mutex_unlock(&c->sb_lock); mutex_unlock(&c->sb_lock);
set_bit(BCH_FS_ALLOC_READ_DONE, &c->flags); 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++) for (i = 0; i < BTREE_ID_NR; i++)
bch2_btree_root_alloc(c, 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"; err = "unable to allocate journal buckets";
for_each_online_member(ca, c, i) for_each_online_member(ca, c, i)
if (bch2_dev_journal_alloc(ca)) { if (bch2_dev_journal_alloc(ca)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment