Linux filesystem development
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: linux-fsdevel@vger.kernel.org
Cc: lsf-pc@lists.linux-foundation.org
Subject: [LSF/MM/BPF TOPIC] Filesystem Suspend Resume
Date: Thu, 20 Mar 2025 11:36:17 -0400	[thread overview]
Message-ID: <0a76e074ef262ca857c61175dd3d0dc06b67ec42.camel@HansenPartnership.com> (raw)

[Note: this got scheduled because I suggested it as a topic on the
application form.  I'm still not convinced it's that relevant and it
could become a lightning talk instead if there's not much interest]

This came up as a problem because efivarfs needs a hibernate hook.  The
specific efivarfs problem is that when the kernel is running, it owns
the EFI runtime interface, so nothing can update variables without
going through the kernel and so the cache of efivarfs (held in the
variable dentries) reflects exactly the state of the underlying
variables.  However, when the system is hibernated, other OSs could
boot and alter EFI variables, so the exact cache correspondence
guarantee is broken and efivarfs needs to resync the variable store on
resume from hibernate.

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.

The other reason for discussing this is that adding power management
hooks directly to efivarfs resulted in a lot of deadlock potential
(discussion of which is already on linux-fsdevel), which could
potentially be lessened by making it part of the VFS API.  If other
filesystems think they might use it in future, we should discuss how
this could work.

Regards,

James


             reply	other threads:[~2025-03-20 15:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-20 15:36 James Bottomley [this message]
2025-03-20 16:48 ` [LSF/MM/BPF TOPIC] Filesystem Suspend Resume Christoph Hellwig
2025-03-20 17:04   ` James Bottomley
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=0a76e074ef262ca857c61175dd3d0dc06b67ec42.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --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