All of lore.kernel.org
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Filesystem Suspend Resume
@ 2025-03-20 15:36 James Bottomley
  2025-03-20 16:48 ` Christoph Hellwig
  2025-03-20 17:00 ` Kent Overstreet
  0 siblings, 2 replies; 24+ messages in thread
From: James Bottomley @ 2025-03-20 15:36 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: lsf-pc

[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


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2025-03-27 17:31 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.