From: Kent Overstreet Date: Fri, 12 Jan 2024 18:10:54 +0000 (-0500) Subject: cmd_migrate: Fix fsck invocation X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=076216c16b2cbf5ab774fa34a83e6ef5b9429a4b;p=bcachefs-tools-debian cmd_migrate: Fix fsck invocation It's now an error to ask for a read_write filesystem with nochanges. Signed-off-by: Kent Overstreet --- diff --git a/cmd_migrate.c b/cmd_migrate.c index 60e779e..ea32e4e 100644 --- a/cmd_migrate.c +++ b/cmd_migrate.c @@ -699,7 +699,7 @@ static int migrate_fs(const char *fs_path, find_superblock_space(extents, format_opts, &dev); struct bch_sb *sb = bch2_format(fs_opt_strs, - fs_opts,format_opts, &dev, 1); + fs_opts, format_opts, &dev, 1); u64 sb_offset = le64_to_cpu(sb->layout.sb_offset[0]); if (format_opts.passphrase) @@ -733,6 +733,7 @@ static int migrate_fs(const char *fs_path, printf("Migrate complete, running fsck:\n"); opt_set(opts, nostart, false); opt_set(opts, nochanges, true); + opt_set(opts, read_only, true); c = bch2_fs_open(path, 1, opts); if (IS_ERR(c))