diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-19 01:31:37 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-02-19 01:31:37 -0500 |
commit | a5cf18ffd43106b3db3c23d6dbe72f92c07e9f11 (patch) | |
tree | eb08b7bad834e7cbb883d0ccac34ca241d0e9cfd /cmd_debug.c | |
parent | 8d1c88c30d81c21beae92cc759d4248c2c7bf295 (diff) |
list_journal: also print where entries were written
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'cmd_debug.c')
-rw-r--r-- | cmd_debug.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/cmd_debug.c b/cmd_debug.c index 6ff58a96..9238e8be 100644 --- a/cmd_debug.c +++ b/cmd_debug.c @@ -597,19 +597,25 @@ int cmd_list_journal(int argc, char *argv[]) struct jset_entry *entry; list_for_each_entry(p, &c->journal_entries, list) { - printf("journal entry %8llu\n" - " version %8u\n" - " last seq %8llu\n" + char _buf[4096]; + struct printbuf buf = PBUF(_buf); + + bch2_journal_ptrs_to_text(&buf, c, p); + + printf("journal entry %llu\n" + " version %u\n" + " last seq %llu\n" + " written at %s\n" , le64_to_cpu(p->j.seq), le32_to_cpu(p->j.version), - le64_to_cpu(p->j.last_seq)); + le64_to_cpu(p->j.last_seq), + _buf); vstruct_for_each(&p->j, entry) { - char _buf[4096]; - struct printbuf buf = PBUF(_buf); + buf = PBUF(_buf); - printbuf_indent_push(&buf, 2); + printbuf_indent_push(&buf, 4); bch2_journal_entry_to_text(&buf, c, entry); printf("%s\n", _buf); } |