Skip to content

Commit

Permalink
cmd_dump: Also set read_only
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Kent Overstreet committed Aug 11, 2023
1 parent ae23e45 commit bcee032
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cmd_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit bcee032

Please sign in to comment.