diff options
-rw-r--r-- | fs/bcachefs/journal_io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 1ad1f180940f..58c314a5cdac 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -226,6 +226,14 @@ nocompact: */ dup = *_i; if (dup) { + if (dup->j.seq != j->seq) { + bch_err(c, "dup seq %llu != slot seq %llu, base seq %llu\n", + le64_to_cpu(dup->j.seq), + le64_to_cpu(j->seq), + c->journal_entries_base_seq); + BUG(); + } + bool identical = bytes == vstruct_bytes(&dup->j) && !memcmp(j, &dup->j, bytes); bool not_identical = !identical && @@ -256,6 +264,7 @@ nocompact: if (entry_ptr.csum_good && !identical) goto replace; + BUG_ON(dup->j.seq != j->seq); return ret; } replace: |