Skip to content

RFC vfs freeze/thaw on suspend/resume

James Bottomley linux-efi linux-fsdevel linux-pm lkml llvm oe-kbuild-all 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 20 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4locking/percpu-rwsem: add freezable alternative to down_readinclude/linux/percpu-rwsem.h kernel/locking/percpu-rwsem.c+24 -97 replies
2/4vfs: make sb_start_write freezableinclude/linux/fs.h+2 -11 reply
3/4fs/super.c: introduce reverse superblock iterator and use it in emergency remountfs/super.c+29 -1997 replies
4/4vfs: add filesystem freeze/thaw callbacks for power managementfs/super.c include/linux/fs.h kernel/power/hibernate.c +1 more+82 -010 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchJan KaraArd Biesheuvel
1/4
2/4R-b
3/4R-b R-b R-b R-b R-b R-b R-b R-b R-b A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC PATCH 0/4] vfs freeze/thaw on suspend/resume

This sequence is posted as an RFC because it needs to be combined with Luis' patch set:

https://lore.kernel.org/linux-fsdevel/[email protected]/

In particular I've done nothing to replace the kthread freezing in filesystems. I can say that this works flawlessly on 6.14 with my limited test rig (I only have access to my laptop while at LSF/MM). My test VM is ext4 root with a file on the root attached to a loop device and mounted (to test nesting) while running a fio workload on the upper ext4.

The rwsem rework is absolutely necessary because without it hibernate immediately fails because systemd-journald tries to record the kernel messages and gets blocked in sb_start_write() on TASK_INTERRUPTIBLE which inhibits hibernation.

My goal in doing this is to be able to add a thaw_super() callback to efivarfs and remove our deadlock prone pm notifier.

Regards,

James

---

James Bottomley (4):
locking/percpu-rwsem: add freezable alternative to down_read
vfs: make sb_start_write freezable
fs/super.c: introduce reverse superblock iterator and use it in
emergency remount
vfs: add filesystem freeze/thaw callbacks for power management

 fs/super.c                    | 109 ++++++++++++++++++++++++++++------
 include/linux/fs.h            |   8 ++-
 include/linux/percpu-rwsem.h  |  20 +++++--
 kernel/locking/percpu-rwsem.c |  13 ++--
 kernel/power/hibernate.c      |  12 ++++
 kernel/power/suspend.c        |   4 ++
 6 files changed, 137 insertions(+), 29 deletions(-)
Signature · 1 line
2.43.0