diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-01 15:45:36 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-01 15:45:36 -0500 |
commit | 87f685d12948bf89a791f3472dd9c244ea7d6c28 (patch) | |
tree | ad3cc66ebf347d4b5c67dd5fa396ac8bb77c3021 /libbcachefs/journal.h | |
parent | fd1b84975b960d5e42963bed2c18b8c63d8abce7 (diff) |
Update bcachefs sources to 8ffb42b3d0 bcachefs: Finish writing journal after journal error
Diffstat (limited to 'libbcachefs/journal.h')
-rw-r--r-- | libbcachefs/journal.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libbcachefs/journal.h b/libbcachefs/journal.h index 0a3fb8a0..1bb0e00d 100644 --- a/libbcachefs/journal.h +++ b/libbcachefs/journal.h @@ -141,6 +141,11 @@ static inline u64 journal_cur_seq(struct journal *j) return j->pin.back - 1; } +static inline u64 journal_last_unwritten_seq(struct journal *j) +{ + return j->seq_ondisk + 1; +} + void bch2_journal_set_has_inum(struct journal *, u64, u64); static inline int journal_state_count(union journal_res_state s, int idx) @@ -261,9 +266,6 @@ static inline void bch2_journal_buf_put(struct journal *j, unsigned idx) .buf3_count = idx == 3, }).v, &j->reservations.counter); - EBUG_ON(((s.idx - idx) & 3) > - ((s.idx - s.unwritten_idx) & 3)); - if (!journal_state_count(s, idx) && idx == s.unwritten_idx) __bch2_journal_buf_put(j); } |