[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250326112220.1988619-1-mcgrof@kernel.org>
Date: Wed, 26 Mar 2025 04:22:14 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: jack@...e.cz,
hch@...radead.org,
James.Bottomley@...senPartnership.com,
david@...morbit.com,
rafael@...nel.org,
djwong@...nel.org,
pavel@...nel.org,
song@...nel.org
Cc: linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org,
gost.dev@...sung.com,
Luis Chamberlain <mcgrof@...nel.org>
Subject: [RFC 0/6] fs: automatic kernel fs freeze / thaw
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
Powered by blists - more mailing lists