diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-07 20:56:27 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-04-07 20:56:33 -0400 |
commit | 7f77afa955e81da5a55b55e22e7e6f9fee1709a5 (patch) | |
tree | 8e5dc5c72c5255eb8e0897d1c0cc0f068a63bcef /libbcachefs/recovery.c | |
parent | 58867de5bdb2395ae18f802bdbfd9d1724b90356 (diff) |
Update bcachefs sources to d3da360412 bcachefs: Fold bucket_state in to BCH_DATA_TYPES()
Diffstat (limited to 'libbcachefs/recovery.c')
-rw-r--r-- | libbcachefs/recovery.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libbcachefs/recovery.c b/libbcachefs/recovery.c index 88ed8030..ac75f44d 100644 --- a/libbcachefs/recovery.c +++ b/libbcachefs/recovery.c @@ -713,7 +713,6 @@ static int journal_replay_entry_early(struct bch_fs *c, unsigned i, nr_types = jset_entry_dev_usage_nr_types(u); ca->usage_base->buckets_ec = le64_to_cpu(u->buckets_ec); - ca->usage_base->buckets_unavailable = le64_to_cpu(u->buckets_unavailable); for (i = 0; i < min_t(unsigned, nr_types, BCH_DATA_NR); i++) { ca->usage_base->d[i].buckets = le64_to_cpu(u->d[i].buckets); @@ -1080,18 +1079,11 @@ int bch2_fs_recovery(struct bch_fs *c) } if (!c->opts.nochanges) { - if (c->sb.version < bcachefs_metadata_version_inode_backpointers) { - bch_info(c, "version prior to inode backpointers, upgrade and fsck required"); + if (c->sb.version < bcachefs_metadata_version_new_data_types) { + bch_info(c, "version prior to new_data_types, upgrade and fsck required"); c->opts.version_upgrade = true; c->opts.fsck = true; c->opts.fix_errors = FSCK_OPT_YES; - } else if (c->sb.version < bcachefs_metadata_version_subvol_dirent) { - bch_info(c, "filesystem version is prior to subvol_dirent - upgrading"); - c->opts.version_upgrade = true; - c->opts.fsck = true; - } else if (c->sb.version < bcachefs_metadata_version_alloc_v4) { - bch_info(c, "filesystem version is prior to alloc_v4 - upgrading"); - c->opts.version_upgrade = true; } } @@ -1436,6 +1428,9 @@ int bch2_fs_initialize(struct bch_fs *c) for (i = 0; i < BTREE_ID_NR; i++) bch2_btree_root_alloc(c, i); + for_each_online_member(ca, c, i) + bch2_dev_usage_init(ca); + err = "unable to allocate journal buckets"; for_each_online_member(ca, c, i) { ret = bch2_dev_journal_alloc(ca); |