Re: [PATCH v2] bcachefs: fix deadlock in journal_entry_open()
From: Kent Overstreet
Date: Fri Jan 31 2025 - 13:32:58 EST
On Sat, Feb 01, 2025 at 02:12:37AM +0800, Alan Huang wrote:
> On Jan 31, 2025, at 20:47, Jeongjun Park <aha310510@xxxxxxxxx> wrote:
> >
> > In the previous commit b3d82c2f2761, code was added to prevent journal sequence
> > overflow. Among them, the code added to journal_entry_open() uses the
> > bch2_fs_fatal_err_on() function to handle errors.
>
> At least, bch2_journal_halt could invoke bch2_journal_halt_locked.
yep
> Is it possible to release the lock before bch2_fs_fatal_err_on() ? Not familiar with journal code yet.
The control flow makes it awkward, halt_locked() looks like the cleanest
solution.