Re: [PATCH v2 6/6] super: add filesystem freezing helpers for suspend and hibernate
From: Christian Brauner
Date: Mon Mar 31 2025 - 06:25:50 EST
On Mon, Mar 31, 2025 at 12:23:04PM +0200, Jan Kara wrote:
> On Sat 29-03-25 09:42:19, Christian Brauner wrote:
> > Allow the power subsystem to support filesystem freeze for
> > suspend and hibernate.
> >
> > Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx>
>
> One comment below. Otherwise feel free to add:
>
> Reviewed-by: Jan Kara <jack@xxxxxxx>
>
> > +void filesystems_thaw(bool hibernate)
> > +{
> > + __iterate_supers(filesystems_thaw_callback, NULL,
> > + SUPER_ITER_UNLOCKED | SUPER_ITER_REVERSE);
> > +}
>
> I think we should thaw in normal superblock order, not in reverse one? To
> thaw the bottommost filesystem first? The filesystem thaw callback can
> write to the underlying device and this could cause deadlocks...
Yep, I've fixed that already up in vfs-6.16.super yesterday.
Sorry, forgot to mention that here. Thanks for noticing!