diff options
Diffstat (limited to 'fs/bcachefs/journal_io.c')
-rw-r--r-- | fs/bcachefs/journal_io.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/fs/bcachefs/journal_io.c b/fs/bcachefs/journal_io.c index 9a75f5d2733c..f33b2c2d13c0 100644 --- a/fs/bcachefs/journal_io.c +++ b/fs/bcachefs/journal_io.c @@ -191,27 +191,6 @@ static int journal_entry_add(struct bch_fs *c, struct bch_dev *ca, } } - /* Drop overwrites, log entries if we don't need them: */ - if (!c->opts.retain_recovery_info && - !c->opts.journal_rewind) { - vstruct_for_each_safe(j, src) - if (vstruct_end(src) > vstruct_end(j)) - goto nocompact; - - struct jset_entry *dst = j->start; - vstruct_for_each_safe(j, src) { - if (src->type == BCH_JSET_ENTRY_log || - src->type == BCH_JSET_ENTRY_overwrite) - continue; - - memcpy(dst, src, vstruct_bytes(src)); - dst = vstruct_next(dst); - } - - j->u64s = cpu_to_le32((u64 *) dst - j->_data); - bytes = vstruct_bytes(j); - } -nocompact: jlist->last_seq = max(jlist->last_seq, last_seq); if (seq < c->journal_entries_base_seq || @@ -230,14 +209,6 @@ 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 && @@ -268,7 +239,6 @@ nocompact: if (entry_ptr.csum_good && !identical) goto replace; - BUG_ON(dup->j.seq != j->seq); return ret; } replace: @@ -291,7 +261,6 @@ replace: darray_push(&i->ptrs, entry_ptr); } - BUG_ON(le64_to_cpu(i->j.seq) != seq); *_i = i; fsck_err: return ret; |