linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC 0/6] fs: automatic kernel fs freeze / thaw
@ 2025-03-26 11:22 Luis Chamberlain
  2025-03-26 11:22 ` [RFC 1/6] fs: add frozen sb state helpers Luis Chamberlain
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: Luis Chamberlain @ 2025-03-26 11:22 UTC (permalink / raw)
  To: jack, hch, James.Bottomley, david, rafael, djwong, pavel, song
  Cc: linux-fsdevel, linux-kernel, gost.dev, Luis Chamberlain

Based on discussions at LSFMM, on where are we at with automatic fs
suspend / resume. I did a quick check and most of the complexities from
the last series I tried from 2023-03 [0] are now resolved, namely the
following patches are no longer needed as Christian did the work for
this already:

  fs: unify locking semantics for fs freeze / thaw
  fs: distinguish between user initiated freeze and kernel  initiated freeze
  fs: move !SB_BORN check early on freeze and add for thaw

So the only thing left to do is add an fs flag for a sanity check that
the fs doesn't use rely on ktrhead freezing, and enable it for
filesystems which have done that work. This adds the work for
a few filesystems. If regressions are found we can simply remove
FS_AUTOFREEZE from the fs.

I did a quick boot test with this on my laptop and suspend doesn't work,
its not clear if this was an artifact of me trying this on linux-next or
what, I can try without my patches on next to see if next actually
suspends without them. And so, we gotta figure out if there's something
stupid still to fix, or something broken with these changes I overlooked
on the rebase.

[0] https://web.git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/log/?h=20230507-fs-freeze

Luis Chamberlain (6):
  fs: add frozen sb state helpers
  fs: add iterate_supers_excl() and iterate_supers_reverse_excl()
  fs: add automatic kernel fs freeze / thaw and remove kthread freezing
  ext4: replace kthread freezing with auto fs freezing
  btrfs: replace kthread freezing with auto fs freezing
  xfs: replace kthread freezing with auto fs freezing

 fs/btrfs/disk-io.c     |   4 +-
 fs/btrfs/scrub.c       |   2 +-
 fs/btrfs/super.c       |   2 +-
 fs/ext4/ext4_jbd2.c    |   2 +-
 fs/ext4/mballoc.c      |   2 +-
 fs/ext4/super.c        |   9 +--
 fs/gfs2/sys.c          |   2 +-
 fs/quota/quota.c       |   3 +-
 fs/super.c             | 149 +++++++++++++++++++++++++++++++++++++++--
 fs/xfs/xfs_discard.c   |   2 +-
 fs/xfs/xfs_log.c       |   3 +-
 fs/xfs/xfs_log_cil.c   |   2 +-
 fs/xfs/xfs_mru_cache.c |   2 +-
 fs/xfs/xfs_pwork.c     |   2 +-
 fs/xfs/xfs_super.c     |  16 ++---
 fs/xfs/xfs_trans.c     |   3 +-
 fs/xfs/xfs_trans_ail.c |   3 -
 fs/xfs/xfs_zone_gc.c   |   2 -
 include/linux/fs.h     |  38 +++++++++++
 kernel/power/process.c |  15 ++++-
 20 files changed, 223 insertions(+), 40 deletions(-)

-- 
2.47.2


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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-26 11:22 [RFC 0/6] fs: automatic kernel fs freeze / thaw Luis Chamberlain
2025-03-26 11:22 ` [RFC 1/6] fs: add frozen sb state helpers Luis Chamberlain
2025-03-26 11:22 ` [RFC 2/6] fs: add iterate_supers_excl() and iterate_supers_reverse_excl() Luis Chamberlain
2025-03-26 13:17   ` Christian Brauner
2025-03-26 11:22 ` [RFC 3/6] fs: add automatic kernel fs freeze / thaw and remove kthread freezing Luis Chamberlain
2025-03-26 11:53   ` James Bottomley
2025-03-26 14:09     ` Christian Brauner
2025-03-26 14:37       ` James Bottomley
2025-03-26 11:22 ` [RFC 4/6] ext4: replace kthread freezing with auto fs freezing Luis Chamberlain
2025-03-26 17:57   ` Jan Kara
2025-03-26 11:22 ` [RFC 5/6] btrfs: " Luis Chamberlain
2025-03-26 11:22 ` [RFC 6/6] xfs: " Luis Chamberlain
2025-03-26 11:42 ` [RFC 0/6] fs: automatic kernel fs freeze / thaw Luis Chamberlain
2025-03-26 12:27   ` James Bottomley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).