bcachefs: Avoid taking journal lock unnecessarily
authorKent Overstreet <kent.overstreet@linux.dev>
Wed, 31 Jan 2024 16:28:13 +0000 (11:28 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 10 Mar 2024 19:34:08 +0000 (15:34 -0400)
commite6fab655e6f59d1b50ee9e97c727a6f6f84b0f1d
tree4d6d898e2a1e3a5082bbe608ac12e616f34e3b84
parentbdec47f57f26248a6fba67803c2ee44484534735
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>
fs/bcachefs/journal.c
fs/bcachefs/journal_types.h