Re: [PATCH v2] f2fs: quiesce background threads during system suspend using PM notifier
From: Christoph Hellwig
Date: Fri Aug 14 2026 - 02:30:43 EST
On Mon, Aug 10, 2026 at 09:53:14AM -0700, Daeho Jeong wrote:
> On Mon, Aug 10, 2026 at 9:34 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:
> > This information was shared earlier with Daeho
> > (https://b.corp.google.com/issues/515470309#comment45): [ ... ]
This does not seem to be information available to the public.
> f2fs threads are already freezable: f2fs_gc and f2fs_discard are
> already registered with set_freezable() and call try_to_freeze().
> However, a race window exists: a thread checks freezing() (false),
> calls submit_bio(), and gets trapped inside __bio_queue_enter().
> Because it gets blocked before reaching try_to_freeze(), it triggers a
> PM freezer timeout.
This does sound very much like a block layer freezing issue.
> Point taken. Aside from this f2fs patch, I agree that addressing this
> at the block layer or PM subsystem level would be a much cleaner,
> system-wide solution.
> I’ll give more thought to how we can properly solve this race
> condition for the entire system, and I'll loop in the relevant
> PM/block maintainers if a viable generic approach emerges.
Thanks, it would be great to fix this properly.