diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2023-11-02 21:06:52 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-01-01 11:47:41 -0500 |
commit | b05c0e9370bec71c62df690250f451e58e8ed2a4 (patch) | |
tree | e6362bd4fdb2397dbf028de19272b7d7edb0f6a3 /fs/bcachefs/journal_types.h | |
parent | 0ba9375a111a88e47733b679f6affb7f6492de4c (diff) |
bcachefs: journal->buf_lock
Add a new lock for synchronizing between journal IO path and btree write
buffer flush.
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 | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h index 4ffae252e01e..5c8d3a8ec4df 100644 --- a/fs/bcachefs/journal_types.h +++ b/fs/bcachefs/journal_types.h @@ -182,6 +182,12 @@ struct journal { darray_u64 early_journal_entries; /* + * Protects journal_buf->data, when accessing without a jorunal + * reservation: for synchronization between the btree write buffer code + * and the journal write path: + */ + struct mutex buf_lock; + /* * Two journal entries -- one is currently open for new entries, the * other is possibly being written out. */ |