Linux XFS filesystem development
 help / color / mirror / Atom feed
* [PATCH RFC 0/8] fs: support freeze/thaw/mark_dead/sync with shared devices
@ 2026-06-02 10:10 Christian Brauner
  2026-06-02 10:10 ` [PATCH RFC 1/8] fs, block: move blk_mode_t and fop_flags_t into <linux/types.h> Christian Brauner
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Christian Brauner @ 2026-06-02 10:10 UTC (permalink / raw)
  To: Christoph Hellwig, Jan Kara
  Cc: Jens Axboe, Alexander Viro, linux-block, linux-kernel,
	linux-fsdevel, Carlos Maiolino, linux-xfs, Chris Mason,
	David Sterba, linux-btrfs, Theodore Ts'o, linux-ext4,
	Gao Xiang, linux-erofs, Christian Brauner (Amutable)

Note, this is on the border between RFC/POC and so I haven't pushed this
through testing yet. But I don't want to waste more time on this before
showing it.

I surveyed various fs implementations because I want the ability to
extend userspace the ability to manage what devices can be onlined in a
centralized way without having to force every fs to care about this.

I realized that erofs allows sharing block devices with multiple
superblocks. Any freeze, thaw, removal, or sync on those devices will
not be communicated to the superblocks using it and our current
infrastructure is unable to deal with this.

This attempts to add the ability to go from device number to all the
superblock using that device, iterate through them one-by-one and
perform actions on them. For most fses this is a 1:1 mapping but for
erofs its a 1:many mapping.

This is not unreasonable infastructure to support in my opinion. I
played around with some ideas for this and I want to send out an RFC to
gather some early input.

Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
---
Christian Brauner (8):
      fs, block: move blk_mode_t and fop_flags_t into <linux/types.h>
      fs: add a global device to super block hash table
      fs: refuse to claim any frozen block device
      xfs: port to fs_bdev_file_open_by_path()
      btrfs: open via dedicated fs bdev helpers
      ext4: open via dedicated fs bdev helpers
      erofs: open via dedicated fs bdev helpers
      super: make fs_holder_ops private

 fs/btrfs/dev-replace.c   |   6 +-
 fs/btrfs/ioctl.c         |   4 +-
 fs/btrfs/volumes.c       |  26 ++-
 fs/erofs/data.c          |   6 +
 fs/erofs/internal.h      |  10 ++
 fs/erofs/super.c         |  66 +++++--
 fs/erofs/zdata.c         |  10 +-
 fs/ext4/super.c          |  12 +-
 fs/super.c               | 452 ++++++++++++++++++++++++++++++++---------------
 fs/xfs/xfs_buf.c         |   2 +-
 fs/xfs/xfs_super.c       |  10 +-
 include/linux/blkdev.h   |   9 -
 include/linux/fs.h       |   2 -
 include/linux/fs/super.h |   7 +
 include/linux/types.h    |   2 +
 15 files changed, 433 insertions(+), 191 deletions(-)
---
base-commit: 254f49634ee16a731174d2ae34bc50bd5f45e731
change-id: 20260602-work-super-bdev_holder_global-8cba5e52bed5


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

end of thread, other threads:[~2026-06-16 16:36 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02 10:10 [PATCH RFC 0/8] fs: support freeze/thaw/mark_dead/sync with shared devices Christian Brauner
2026-06-02 10:10 ` [PATCH RFC 1/8] fs, block: move blk_mode_t and fop_flags_t into <linux/types.h> Christian Brauner
2026-06-08  9:57   ` Jan Kara
2026-06-02 10:10 ` [PATCH RFC 2/8] fs: add a global device to super block hash table Christian Brauner
2026-06-08 10:14   ` Jan Kara
2026-06-16 12:34   ` Christoph Hellwig
2026-06-16 14:59     ` Christian Brauner
2026-06-16 15:19       ` Christian Brauner
2026-06-16 16:35     ` Gao Xiang
2026-06-02 10:10 ` [PATCH RFC 3/8] fs: refuse to claim any frozen block device Christian Brauner
2026-06-08 10:01   ` Jan Kara
2026-06-02 10:10 ` [PATCH RFC 4/8] xfs: port to fs_bdev_file_open_by_path() Christian Brauner
2026-06-08 10:15   ` Jan Kara
2026-06-02 10:10 ` [PATCH RFC 5/8] btrfs: open via dedicated fs bdev helpers Christian Brauner
2026-06-02 10:10 ` [PATCH RFC 6/8] ext4: " Christian Brauner
2026-06-08 10:18   ` Jan Kara
2026-06-02 10:10 ` [PATCH RFC 7/8] erofs: " Christian Brauner
2026-06-02 16:25   ` Gao Xiang
2026-06-03 13:42     ` Christian Brauner
2026-06-10  6:55       ` Gao Xiang
2026-06-02 10:10 ` [PATCH RFC 8/8] super: make fs_holder_ops private Christian Brauner
2026-06-08 10:18   ` Jan Kara
2026-06-02 16:12 ` [PATCH RFC 0/8] fs: support freeze/thaw/mark_dead/sync with shared devices Gao Xiang
2026-06-03  6:43 ` [syzbot ci] " syzbot ci

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox