From: Luis Chamberlain <mcgrof@kernel.org>
To: jack@suse.cz, hch@infradead.org,
James.Bottomley@HansenPartnership.com, david@fromorbit.com,
rafael@kernel.org, djwong@kernel.org, pavel@kernel.org,
song@kernel.org
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
gost.dev@samsung.com, Luis Chamberlain <mcgrof@kernel.org>
Subject: [RFC 0/6] fs: automatic kernel fs freeze / thaw
Date: Wed, 26 Mar 2025 04:22:14 -0700 [thread overview]
Message-ID: <20250326112220.1988619-1-mcgrof@kernel.org> (raw)
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
next reply other threads:[~2025-03-26 11:22 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 11:22 Luis Chamberlain [this message]
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
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=20250326112220.1988619-1-mcgrof@kernel.org \
--to=mcgrof@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=david@fromorbit.com \
--cc=djwong@kernel.org \
--cc=gost.dev@samsung.com \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=song@kernel.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;
as well as URLs for NNTP newsgroup(s).