summaryrefslogtreecommitdiffstats
path: root/fs/bcachefs/recovery.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-03-07 12:30:49 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-10 15:09:59 -0400
commit6fa30fe7f79592ae2ba6e44fa1e7589942c58abe (patch)
tree664d3e5e6c941fb40e81146300a7b0f7d6a5b4f1 /fs/bcachefs/recovery.c
parentf8cdf65b51f036d77edece8a175447dd41be63ca (diff)
downloadlinux-stable-6fa30fe7f79592ae2ba6e44fa1e7589942c58abe.tar.gz
linux-stable-6fa30fe7f79592ae2ba6e44fa1e7589942c58abe.tar.bz2
linux-stable-6fa30fe7f79592ae2ba6e44fa1e7589942c58abe.zip
bcachefs: journal_seq_blacklist_add() now handles entries being added out of order
bch2_journal_seq_blacklist_add() was bugged when the new entry overlapped with multiple existing entries, and it also assumed new entries are being added in increasing order. This is true on any sane filesystem, but when trying to recover from very badly mangled filesystems we might end up with the journal sequence number rewinding vs. what the blacklist list knows about - easiest to just handle that here. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/recovery.c')
-rw-r--r--fs/bcachefs/recovery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/bcachefs/recovery.c b/fs/bcachefs/recovery.c
index 21e13bb4335b..1aa21adc7ee5 100644
--- a/fs/bcachefs/recovery.c
+++ b/fs/bcachefs/recovery.c
@@ -950,7 +950,7 @@ use_clean:
bch2_journal_seq_blacklist_add(c,
blacklist_seq, journal_seq);
if (ret) {
- bch_err(c, "error creating new journal seq blacklist entry");
+ bch_err_msg(c, ret, "error creating new journal seq blacklist entry");
goto err;
}
}