Commit 8325cd1e authored by Kent Overstreet's avatar Kent Overstreet Committed by Kent Overstreet

bcachefs: Don't do upgrades in nochanges mode

nochanges mode is often used for getting data off of otherwise
nonrecoverable filesystems, which is often because of errors hit during
fsck.

Don't force version upgrade & fsck in nochanges mode, so that it's more
likely to mount.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
parent f124345e
......@@ -1081,6 +1081,7 @@ int bch2_fs_recovery(struct bch_fs *c)
set_bit(BCH_FS_REBUILD_REPLICAS, &c->flags);
}
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");
c->opts.version_upgrade = true;
......@@ -1091,6 +1092,7 @@ int bch2_fs_recovery(struct bch_fs *c)
c->opts.version_upgrade = true;
c->opts.fsck = true;
}
}
ret = bch2_blacklist_table_initialize(c);
if (ret) {
......
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