summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-12 13:10:54 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-12 15:04:09 -0500
commit076216c16b2cbf5ab774fa34a83e6ef5b9429a4b (patch)
treea43d6eddf3b639b0731c76540d600c0a9ef85536
parentb6afe1bed4fe47bc4e820ab17cbe8161a3b62c8e (diff)
cmd_migrate: Fix fsck invocation
It's now an error to ask for a read_write filesystem with nochanges. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
-rw-r--r--cmd_migrate.c3
1 files changed, 2 insertions, 1 deletions
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))