koverstreet / bcachefs-tools

http://bcachefs.org
GNU General Public License v2.0
120 stars 89 forks source link

Fsck stalls during journal replay on slow drives #256

Closed boomshroom closed 4 months ago

boomshroom commented 4 months ago

Due to journal writes being single-threaded in the userspace implementation, if a slow disk can't keep up with the journal writes, it can lead to the writes getting too far ahead of the disk and block waiting for prior writes to complete, which they can't because they're on the same thread that's currently blocking.

This issue does not occur in the kernel implementation due to journal writes being multi-threaded (or at least have proper concurrency).

boomshroom commented 4 months ago

Fixed in commit b9e48ed, and more specifically bcachefs/85ab365, bcachefs: Fix deadlock in journal write path