summaryrefslogtreecommitdiff
path: root/fs/bcachefs/journal_types.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-01-31 11:28:13 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-10 15:34:08 -0400
commite6fab655e6f59d1b50ee9e97c727a6f6f84b0f1d (patch)
tree4d6d898e2a1e3a5082bbe608ac12e616f34e3b84 /fs/bcachefs/journal_types.h
parentbdec47f57f26248a6fba67803c2ee44484534735 (diff)
bcachefs: Avoid taking journal lock unnecessarily
Previously, any time we failed to get a journal reservation we'd retry, with the journal lock held; but this isn't necessary given wait_event()/wake_up() ordering. This avoids performance cliffs when the journal starts to get backed up and lock contention shoots up. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/journal_types.h')
-rw-r--r--fs/bcachefs/journal_types.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bcachefs/journal_types.h b/fs/bcachefs/journal_types.h
index 2ca5d5014cf6..1493c262eaf4 100644
--- a/fs/bcachefs/journal_types.h
+++ b/fs/bcachefs/journal_types.h
@@ -134,6 +134,7 @@ enum journal_flags {
/* Reasons we may fail to get a journal reservation: */
#define JOURNAL_ERRORS() \
x(ok) \
+ x(retry) \
x(blocked) \
x(max_in_flight) \
x(journal_full) \