]> git.sesse.net Git - bcachefs-tools-debian/commitdiff
cmd_dump: Also set read_only
authorKent Overstreet <kent.overstreet@linux.dev>
Fri, 11 Aug 2023 22:17:07 +0000 (18:17 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Fri, 11 Aug 2023 22:32:23 +0000 (18:32 -0400)
In nochanges mode, without read_only, we can go into a fake rw mode
where we allow writes but hold them in memory.

That's not what we want for the dump tool - this fixes a bug where btree
nodes don't always get dumped correctly.

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

index e1f0a5aa6d198f7f70b2fce505610d63c6b6b17f..bf570dc68c87049cdf9a24888b04dd01e135fe3b 100644 (file)
@@ -122,6 +122,7 @@ int cmd_dump(int argc, char *argv[])
        bool force = false, entire_journal = true;
        int fd, opt;
 
+       opt_set(opts, read_only,        true);
        opt_set(opts, nochanges,        true);
        opt_set(opts, norecovery,       true);
        opt_set(opts, degraded,         true);