From 076216c16b2cbf5ab774fa34a83e6ef5b9429a4b Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 12 Jan 2024 13:10:54 -0500 Subject: [PATCH] cmd_migrate: Fix fsck invocation It's now an error to ask for a read_write filesystem with nochanges. Signed-off-by: Kent Overstreet --- cmd_migrate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd_migrate.c b/cmd_migrate.c index 60e779e5..ea32e4ee 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))