]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
cmd_migrate: Fix fsck invocation
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 12 Jan 2024 18:10:54 +0000 (13:10 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 12 Jan 2024 20:04:09 +0000 (15:04 -0500)
It's now an error to ask for a read_write filesystem with nochanges.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
cmd_migrate.c

index 60e779e5d005b74123ded3f99d8bc31159177fa6..ea32e4ee497b7cf7ea178cced1c4ec65a0fedbe4 100644 (file)
@@ -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))