diff options
Diffstat (limited to 'libbcachefs/journal_io.c')
-rw-r--r-- | libbcachefs/journal_io.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libbcachefs/journal_io.c b/libbcachefs/journal_io.c index 734ce88b..c5458c61 100644 --- a/libbcachefs/journal_io.c +++ b/libbcachefs/journal_io.c @@ -222,6 +222,8 @@ static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca, */ dup = *_i; if (dup) { + BUG_ON(dup->j.seq != j->seq); + bool identical = bytes == vstruct_bytes(&dup->j) && !memcmp(j, &dup->j, bytes); bool not_identical = !identical && @@ -252,6 +254,7 @@ static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca, if (entry_ptr.csum_good && !identical) goto replace; + BUG_ON(dup->j.seq != j->seq); return ret; } replace: |