summaryrefslogtreecommitdiff
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2019-02-10 19:16:55 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:15 -0400
commitf7e76361c4c77941ffe0b4bb25db04642714a283 (patch)
treec7a0f37aa9cca4442496a33d3f7738965e1164ac /fs/bcachefs/recovery.c
parent6d033aa404e71710de217d63999fade2f2b0491f (diff)
downloadlwn-f7e76361c4c77941ffe0b4bb25db04642714a283.tar.gz
lwn-f7e76361c4c77941ffe0b4bb25db04642714a283.zip
bcachefs: no need to run gc when initializing new fs
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 1c09ae4f5f2f..e28917cf2cec 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -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)) {