From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: viro@zeniv.linux.org.uk, brauner@kernel.org, jack@suse.cz
Subject: [PATCH RFC 0/6] btrfs: go fs_holder_ops and add shutdown_bdev() callback
Date: Fri, 20 Jun 2025 15:17:23 +0930 [thread overview]
Message-ID: <cover.1750397889.git.wqu@suse.com> (raw)
This series is relying on another series here:
https://lore.kernel.org/linux-btrfs/cover.1750137547.git.wqu@suse.com/
That above series prepare btrfs to use fs_holder_ops, and the first
patch in this series is exactly making btrfs use that fs_holder_ops.
Then patch 2~4 implements the shutdown ioctl for btrfs.
For now the shutdown ioctl has no proper sync yet.
Patch 5 is the one affecting the generic fs_holder_ops and
super_operations, that we need a shutdown_bdev() variant, which passes
the bdev to the fs and let the fs to determine if they can continue
operation or needs to shutdown.
AKA, the shutdown_bdev() variant is for multi-devices filesystems like
btrfs and bcachefs.
And finally implement the shutdown_bdev() for btrfs, so that eventually
generic/730 can properly pass.
Reason for RFC:
There are still test failures for shutdown group, mostly due to the fact
that btrfs is not implementing the proper flags handling (e.g. currently
the shutdown never sync the fs no matter what).
But I want to get some feedback about the new
super_operations::shutdown_bdev() call back before committing too much.
Qu Wenruo (6):
btrfs: introduce a new fs state, EMERGENCY_SHUTDOWN
btrfs: reject file operations if in shutdown state
btrfs: reject delalloc ranges if the fs is shutdown
btrfs: implement shutdown ioctl
fs: introduce a shutdown_bdev super block operation
btrfs: implement shutdown_bdev super operation callback
fs/btrfs/file.c | 25 ++++++++++++++++++++++++-
fs/btrfs/fs.h | 18 ++++++++++++++++++
fs/btrfs/inode.c | 14 +++++++++++++-
fs/btrfs/ioctl.c | 21 +++++++++++++++++++++
fs/btrfs/messages.c | 1 +
fs/btrfs/reflink.c | 3 +++
fs/btrfs/super.c | 34 ++++++++++++++++++++++++++++++++++
fs/btrfs/volumes.c | 2 ++
fs/btrfs/volumes.h | 5 +++++
fs/super.c | 4 +++-
include/linux/fs.h | 10 ++++++++++
include/uapi/linux/btrfs.h | 9 +++++++++
12 files changed, 143 insertions(+), 3 deletions(-)
--
2.49.0
next reply other threads:[~2025-06-20 5:47 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 5:47 Qu Wenruo [this message]
2025-06-20 5:47 ` [PATCH RFC 1/6] btrfs: introduce a new fs state, EMERGENCY_SHUTDOWN Qu Wenruo
2025-06-20 5:47 ` [PATCH RFC 2/6] btrfs: reject file operations if in shutdown state Qu Wenruo
2025-06-20 5:47 ` [PATCH RFC 3/6] btrfs: reject delalloc ranges if the fs is shutdown Qu Wenruo
2025-06-20 5:47 ` [PATCH RFC 4/6] btrfs: implement shutdown ioctl Qu Wenruo
2025-06-20 20:20 ` kernel test robot
2025-06-20 5:47 ` [PATCH RFC 5/6] fs: introduce a shutdown_bdev super block operation Qu Wenruo
2025-06-20 15:36 ` Jan Kara
2025-06-20 22:10 ` Qu Wenruo
2025-06-23 5:15 ` Christoph Hellwig
2025-06-23 5:34 ` Qu Wenruo
2025-06-23 10:57 ` Jan Kara
2025-06-23 10:56 ` Christian Brauner
2025-06-23 13:57 ` Christoph Hellwig
2025-06-23 21:27 ` Qu Wenruo
2025-06-24 8:51 ` Christian Brauner
2025-06-24 9:06 ` Qu Wenruo
2025-06-24 9:13 ` Christian Brauner
2025-06-24 9:51 ` Qu Wenruo
2025-06-24 10:15 ` Christian Brauner
2025-06-24 21:06 ` Qu Wenruo
2025-06-24 12:34 ` Christoph Hellwig
2025-06-24 12:33 ` Christoph Hellwig
2025-06-24 12:30 ` Christoph Hellwig
2025-06-20 5:47 ` [PATCH RFC 6/6] btrfs: implement shutdown_bdev super operation callback Qu Wenruo
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=cover.1750397889.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=brauner@kernel.org \
--cc=jack@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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 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.