summaryrefslogtreecommitdiff
path: root/c_src
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-06-07 19:04:07 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-06-07 19:17:53 -0400
commit529d14db49276c199782680931c411b984c733cf (patch)
treede1f311aafd0b12a62257c047050d9110f6d9888 /c_src
parentf4aa18bea1348602c165642f3a9680aee0c6706c (diff)
cmd_list_journal: Fix assertion pop
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'c_src')
-rw-r--r--c_src/cmd_list_journal.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/c_src/cmd_list_journal.c b/c_src/cmd_list_journal.c
index a7878fd3..f708ed57 100644
--- a/c_src/cmd_list_journal.c
+++ b/c_src/cmd_list_journal.c
@@ -367,11 +367,18 @@ static void journal_replay_print(struct bch_fs *c,
entry = t_end;
- if (f.filtering &&
- entry_is_non_transaction(entry))
+ if (entry_is_non_transaction(entry))
break;
}
+ while (entry < end &&
+ vstruct_next(entry) <= end &&
+ !entry_is_transaction_start(entry)) {
+ if (!f.filtering)
+ print_one_entry(&buf, c, f, p, blacklisted, &printed_header, entry);
+ entry = vstruct_next(entry);
+ }
+
if (buf.buf) {
if (blacklisted)
star_start_of_lines(buf.buf);
@@ -389,7 +396,7 @@ static void list_journal_usage(void)
" -a Read entire journal, not just dirty entries\n"
" -n, --nr-entries=nr Number of journal entries to print, starting from the most recent\n"
" -b, --btree=(+|-)btree1,btree2 Filter keys matching or not updating btree(s)\n"
- " -t, --transaction=(+|-)fn1,fn2 Filter transactions matching or not matching fn(s)"
+ " -t, --transaction=(+|-)fn1,fn2 Filter transactions matching or not matching fn(s)\n"
" -k, --key=(+-1)bbpos1,bbpos2x Filter transactions updating bbpos\n"
" Or entries not matching the range bbpos-bbpos\n"
" -v, --verbose Verbose mode\n"