Linux filesystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org, lsf-pc@lists.linux-foundation.org
Subject: Re: [LSF/MM/BPF TOPIC] Filesystem Suspend Resume
Date: Thu, 20 Mar 2025 13:04:28 -0400	[thread overview]
Message-ID: <8ebb5d18b812cec5f8bee668858d63eefe7ad906.camel@HansenPartnership.com> (raw)
In-Reply-To: <Z9xG2l8lm7ha3Pf2@infradead.org>

On Thu, 2025-03-20 at 09:48 -0700, Christoph Hellwig wrote:
> On Thu, Mar 20, 2025 at 11:36:17AM -0400, James Bottomley wrote:
> > Part of the thought here is that other filesystems might possibly
> > want suspend resume hooks as well, although not for the reasons
> > efivarfs does:  Hibernate is a particularly risky operation and
> > resume may not work leading to a full reboot and filesystem
> > inconsistencies. In many ways, a failed resume is exactly like a
> > system crash, for which filesystems already make specific
> > guarantees.  However, it is a crash for which they could, if they
> > had power management hooks, be forewarned and possibly make the
> > filesystem cleaner for eventual full restore. Things like
> > guaranteeing that uncommitted data would be preserved even
> > if a resume failed, which isn't something we guarantee across a
> > crash today.
> 
> We finally got hibernate to freeze file system on suspend, which is
> the right thing for the above reasons.

Agreed, so perhaps there are no other reasons a real filesystem would
like to know.

> This might not work quite as well for virtual file systems tied to an
> actualy resource like efivarsfs, so you might just register a fake
> device to get the system suspend/resume notifications for it.  Or
> whatever better way the PM and device model maintainers things that
> suites, but definitively something that isn't a file system
> interface.

Yes, we register a blocking notifier for power management via
register_pm_notifier() so no device is involved (useful because we
don't have one).  The notifier is unregistered in ->kill_sb() which is
why we get "interesting" deadlock possibilities.

Regards,

James


  reply	other threads:[~2025-03-20 17:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 15:36 [LSF/MM/BPF TOPIC] Filesystem Suspend Resume James Bottomley
2025-03-20 16:48 ` Christoph Hellwig
2025-03-20 17:04   ` James Bottomley [this message]
2025-03-20 18:15   ` James Bottomley
2025-03-21  5:23     ` Christoph Hellwig
2025-03-21 12:34       ` James Bottomley
2025-03-21 17:00         ` James Bottomley
2025-03-21 17:17           ` Lukas Wunner
2025-03-21 18:20             ` James Bottomley
2025-03-24 11:38           ` [Lsf-pc] " Jan Kara
2025-03-24 14:34             ` James Bottomley
2025-03-24 19:28               ` Jan Kara
2025-03-27 14:55                 ` Eric Sandeen
2025-03-27 17:30                   ` Jan Kara
2025-03-24 20:56               ` Dave Chinner
2025-03-24 20:50             ` Dave Chinner
2025-03-24 21:02               ` James Bottomley
2025-03-24 21:07                 ` Dave Chinner
2025-03-25 13:42                   ` Jan Kara
2025-03-26  2:36                     ` James Bottomley
2025-03-26 14:59                       ` Jan Kara
2025-03-26 15:25                         ` James Bottomley
2025-03-27 14:28                           ` James Bottomley
2025-03-20 17:00 ` Kent Overstreet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8ebb5d18b812cec5f8bee668858d63eefe7ad906.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox