From 7eef5f46ddbd9d5ae2152ee868b110da37279bb9 Mon Sep 17 00:00:00 2001 From: Kent Overstreet Date: Fri, 29 Jan 2021 15:33:24 -0500 Subject: [PATCH] Update bcachefs sources to ea3414eed5 fixup! bcachefs: Improve diagnostics when journal entries are missing --- .bcachefs_revision | 2 +- libbcachefs/journal_io.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.bcachefs_revision b/.bcachefs_revision index 69ea54bb..953107c2 100644 --- a/.bcachefs_revision +++ b/.bcachefs_revision @@ -1 +1 @@ -bee34d805cf75e57f9380e0ee91771b9d90b2b2d +ea3414eed52e5d90c248453e84b2dcd91c960306 diff --git a/libbcachefs/journal_io.c b/libbcachefs/journal_io.c index f5264d14..eacc9b2c 100644 --- a/libbcachefs/journal_io.c +++ b/libbcachefs/journal_io.c @@ -104,12 +104,14 @@ add: if (dup->bad) { /* we'll replace @dup: */ } else if (bad) { + i = dup; goto found; } else { fsck_err_on(bytes != vstruct_bytes(&dup->j) || memcmp(j, &dup->j, bytes), c, "found duplicate but non identical journal entries (seq %llu)", le64_to_cpu(j->seq)); + i = dup; goto found; } } @@ -133,7 +135,7 @@ add: list_add(&i->list, where); found: - for (ptr = i->ptrs; ptr < i->ptrs + i->nr_ptrs; i++) { + for (ptr = i->ptrs; ptr < i->ptrs + i->nr_ptrs; ptr++) { if (ptr->dev == ca->dev_idx) { bch_err(c, "duplicate journal entry %llu on same device", le64_to_cpu(i->j.seq));