From 1d4bb7f4d144e311c6c646c11fef7928b622a48f Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Mon, 15 Jun 2020 16:27:30 -0400 Subject: [PATCH] Add an option to list_journal to list entire contents of journal --- cmd_debug.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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]... \n" "\n" "Options:\n" + " -a Read entire journal, not just dirty entries\n" " -h Display this help and exit\n" "Report bugs to "); } @@ -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);