summaryrefslogtreecommitdiff
path: root/libbcachefs/journal_io.c
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2025-08-18 12:46:57 -0400
committerKent Overstreet <kent.overstreet@linux.dev>2025-08-18 12:49:11 -0400
commitca482e7fd8c517cae6d2cb2a120acb398073bb37 (patch)
tree369ece75004ff5dd13179d75fc70bf0973f4fb08 /libbcachefs/journal_io.c
parent459060f76370c043e8b05d988270d557cebaed76 (diff)
Update bcachefs sources to 62003adb7cbd bcachefs: Add v2 ioctls that return error strings
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'libbcachefs/journal_io.c')
-rw-r--r--libbcachefs/journal_io.c3
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: