Skip to content

Supporting same fsid filesystems mounting on btrfs

Guilherme G. Piccoli linux-btrfs linux-fsdevel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 35 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: Introduce the virtual_fsid featurefs/btrfs/disk-io.c fs/btrfs/ioctl.c fs/btrfs/super.c +2 more+139 -2724 replies
2/2btrfs: Add module parameter to enable non-mount scan skippingfs/btrfs/super.c fs/btrfs/super.h fs/btrfs/volumes.c +1 more+38 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Supporting same fsid filesystems mounting on btrfs

Hi folks, this is an attempt of supporting same fsid mounting on btrfs. Currently, we cannot reliably mount same fsid filesystems even one at a time in btrfs, but if users want to mount them at the same time, it's pretty much impossible. Other filesystems like ext4 are capable of that.

The goal is to allow systems with A/B partitioning scheme (like the Steam Deck console or various mobile devices) to be able to hold the same filesystem image in both partitions; it also allows to have block device level check for filesystem integrity - this is used in the Steam Deck image installation, to check if the current read-only image is pristine. A bit more details are provided in the following ML thread:

https://lore.kernel.org/linux-btrfs/[email protected]/

The mechanism used to achieve it is based in the metadata_uuid feature, leveraging such code infrastructure for that. The patches are based on kernel 6.3 and were tested both in a virtual machine as well as in the Steam Deck. Comments, suggestions and overall feedback is greatly appreciated - thanks in advance!

Cheers,

Guilherme

Guilherme G. Piccoli (2):
btrfs: Introduce the virtual_fsid feature
btrfs: Add module parameter to enable non-mount scan skipping

 fs/btrfs/disk-io.c |  22 +++++++--
 fs/btrfs/ioctl.c   |  18 ++++++++
 fs/btrfs/super.c   |  41 ++++++++++++-----
 fs/btrfs/super.h   |   1 +
 fs/btrfs/volumes.c | 111 +++++++++++++++++++++++++++++++++++++++------
 fs/btrfs/volumes.h |  11 ++++-
 6 files changed, 174 insertions(+), 30 deletions(-)
Signature · 1 line
2.40.0