summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2020-11-14 16:04:30 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2023-10-22 17:08:47 -0400
commit158eecb88ed3100bef01917913a26e9aad152417 (patch)
treebb4415aab11da01943240b2ab97c6e6b16cb59cb /fs/bcachefs/journal_types.h
parent1676a398d37bffa29824f132a29f2836282940f3 (diff)
bcachefs: Assorted journal refactoring
Improved the way we track various state by adding j->err_seq, which records the first journal sequence number that encountered an error being written, and j->last_empty_seq, which records the most recent journal entry that was completely empty. Also, use the low bits of the journal sequence number to index the corresponding journal_buf. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r--fs/bcachefs/journal_types.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h
index 6d0ee8e42da1..22ff7f8081c6 100644
--- a/fs/bcachefs/journal_types.h
+++ b/fs/bcachefs/journal_types.h
@@ -127,7 +127,6 @@ enum {
JOURNAL_STARTED,
JOURNAL_RECLAIM_STARTED,
JOURNAL_NEED_WRITE,
- JOURNAL_NOT_EMPTY,
JOURNAL_MAY_GET_UNRESERVED,
};
@@ -181,6 +180,8 @@ struct journal {
/* seq, last_seq from the most recent journal entry successfully written */
u64 seq_ondisk;
u64 last_seq_ondisk;
+ u64 err_seq;
+ u64 last_empty_seq;
/*
* FIFO of journal entries whose btree updates have not yet been