Skip to content
Commit 85ab365f authored by Kent Overstreet's avatar Kent Overstreet
Browse files

bcachefs: Fix deadlock in journal write path



bch2_journal_write() was incorrectly waiting on earlier journal writes
synchronously; this usually worked because most of the time we'd be
running in the context of a thread that did a journal_buf_put(), but
sometimes we'd be running out of the same workqueue that completes those
prior journal writes.

Additionally, this makes sure to punt to a workqueue before submitting
preflushes - we really don't want to be calling submit_bio() in the main
transaction commit path.

Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent adfe9357
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment