summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-06-15 16:27:30 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2020-06-15 16:27:30 -0400
commit1d4bb7f4d144e311c6c646c11fef7928b622a48f (patch)
tree32f4ab26258db683f57ec23822873bdaff29dddf
parent05408b6f8fea54bf53e68a4ef24291214970f6d0 (diff)
Add an option to list_journal to list entire contents of journal
-rw-r--r--cmd_debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmd_debug.c b/cmd_debug.c
index 6a493679..aa06e8c5 100644
--- a/cmd_debug.c
+++ b/cmd_debug.c
@@ -400,6 +400,7 @@ static void list_journal_usage(void)
"Usage: bcachefs list_journal [OPTION]... <devices>\n"
"\n"
"Options:\n"
+ " -a Read entire journal, not just dirty entries\n"
" -h Display this help and exit\n"
"Report bugs to <linux-bcache@vger.kernel.org>");
}
@@ -416,8 +417,11 @@ int cmd_list_journal(int argc, char *argv[])
opt_set(opts, fix_errors, FSCK_OPT_YES);
opt_set(opts, keep_journal, true);
- while ((opt = getopt(argc, argv, "h")) != -1)
+ while ((opt = getopt(argc, argv, "ah")) != -1)
switch (opt) {
+ case 'a':
+ opt_set(opts, read_entire_journal, true);
+ break;
case 'h':
list_journal_usage();
exit(EXIT_SUCCESS);