Re: [LSF/MM/BPF TOPIC] Filesystem Suspend Resume

James Bottomley
2025-03-21T18:21:01Z

On Fri, 2025-03-21 at 18:17 +0100, Lukas Wunner wrote:
> On Fri, Mar 21, 2025 at 01:00:24PM -0400, James Bottomley wrote:
> > There's a final wrinkle in that if I plumb efivarfs into all this,
> > it needs to know whether it was a hibernate or suspend, but I can
> > add that as an extra freeze_holder flag.
>
> Perhaps system_entering_hibernation() does what you need?

efivarfs needs to know on the resume path, unfortunately, which that
call doesn't seem to work for. Also filesystems would have to suspend
before devices ... i.e. before this is set even in the suspend path,
but I suppose it would be possible to design a flag that has the width
of scope required (which would be about the same amount of work as
simply adding the extra flags to communicate what the freeze or thaw
are for).

Regards,

James