diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-02-18 17:39:42 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:16 -0400 |
commit | d16b4a77a5c64fca52ff637c22668b679b47ef22 (patch) | |
tree | 7c5260d0bf950ee04a8bb6495b82ca7f6ea7a8f3 /fs/bcachefs/journal_types.h | |
parent | ecf37a4a80ec029d640b9c18f87880d4ec4a726f (diff) | |
download | linux-d16b4a77a5c64fca52ff637c22668b679b47ef22.tar.gz linux-d16b4a77a5c64fca52ff637c22668b679b47ef22.tar.bz2 linux-d16b4a77a5c64fca52ff637c22668b679b47ef22.zip |
bcachefs: Assorted journal refactoring
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r-- | fs/bcachefs/journal_types.h | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h index e952eb06eff5..3372e87be124 100644 --- a/fs/bcachefs/journal_types.h +++ b/fs/bcachefs/journal_types.h @@ -22,8 +22,10 @@ struct journal_buf { struct closure_waitlist wait; - unsigned size; - unsigned disk_sectors; + unsigned buf_size; /* size in bytes of @data */ + unsigned sectors; /* maximum size for current entry */ + unsigned disk_sectors; /* maximum size entry could have been, if + buf_size was bigger */ unsigned u64s_reserved; /* bloom filter: */ unsigned long has_inode[1024 / sizeof(unsigned long)]; @@ -129,9 +131,14 @@ struct journal { unsigned long flags; union journal_res_state reservations; + + /* Max size of current journal entry */ unsigned cur_entry_u64s; - unsigned prev_buf_sectors; - unsigned cur_buf_sectors; + unsigned cur_entry_sectors; + + /* Reserved space in journal entry to be used just prior to write */ + unsigned entry_u64s_reserved; + unsigned buf_size_want; /* @@ -159,9 +166,6 @@ struct journal { u64 seq_ondisk; u64 last_seq_ondisk; - /* Reserved space in journal entry to be used just prior to write */ - unsigned entry_u64s_reserved; - /* * FIFO of journal entries whose btree updates have not yet been * written out. |