From: Anand Jain <anand.jain@oracle.com>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>,
linux-btrfs@vger.kernel.org
Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
linux-fsdevel@vger.kernel.org, kernel@gpiccoli.net,
kernel-dev@igalia.com, vivek@collabora.com,
ludovico.denittis@collabora.com, johns@valvesoftware.com,
nborisov@suse.com
Subject: Re: [PATCH 0/2] Supporting same fsid filesystems mounting on btrfs
Date: Fri, 5 May 2023 13:16:17 +0800 [thread overview]
Message-ID: <b8f55fc3-80b3-be46-933a-4cfbd3c76a71@oracle.com> (raw)
In-Reply-To: <20230504170708.787361-1-gpiccoli@igalia.com>
On 5/5/23 01:07, Guilherme G. Piccoli wrote:
> 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/c702fe27-8da9-505b-6e27-713edacf723a@igalia.com/
Confused about your requirement: 2 identical filesystems mounted
simultaneously or just one at a time? Latter works. Bugs were fixed.
Have you considered using the btrfs seed device feature to avoid
sacrificing 50% capacity? Create read-only seed device as golden image,
add writable device on top. Example:
$ btrfstune -S1 /dev/rdonly-golden-img
$ mount /dev/rdonly-golden-img /btrfs
$ btrfs dev add /dev/rw-dev /btrfs
$ mount -o remount,rw /dev/rw-dev /btrfs
To switch golden image:
$ btrfs dev del /dev/rdonly-golden-img /btrfs
$ umount /btrfs
$ btrfstune -S1 /dev/rw-dev
Thanks, Anand
> 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(-)
>
next prev parent reply other threads:[~2023-05-05 5:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-04 17:07 [PATCH 0/2] Supporting same fsid filesystems mounting on btrfs Guilherme G. Piccoli
2023-05-04 17:07 ` [PATCH 1/2] btrfs: Introduce the virtual_fsid feature Guilherme G. Piccoli
2023-05-05 7:21 ` Qu Wenruo
2023-05-05 13:38 ` David Sterba
2023-05-08 11:27 ` Anand Jain
2023-05-08 11:50 ` Qu Wenruo
2023-05-11 11:51 ` David Sterba
2023-05-11 14:12 ` Anand Jain
2023-05-14 21:25 ` Guilherme G. Piccoli
2023-05-05 15:51 ` Guilherme G. Piccoli
2023-05-05 22:15 ` Qu Wenruo
2023-05-08 22:49 ` Guilherme G. Piccoli
2023-05-05 17:34 ` Goffredo Baroncelli
2023-05-05 22:31 ` Qu Wenruo
2023-05-06 17:30 ` Goffredo Baroncelli
2023-05-06 23:00 ` Qu Wenruo
2023-07-05 22:52 ` Guilherme G. Piccoli
2023-07-06 0:53 ` Qu Wenruo
2023-07-06 22:32 ` Guilherme G. Piccoli
2023-05-05 13:18 ` David Sterba
2023-05-05 16:18 ` Guilherme G. Piccoli
2023-05-05 23:00 ` David Sterba
2023-05-08 22:59 ` Guilherme G. Piccoli
2023-05-08 23:18 ` Qu Wenruo
2023-05-08 23:49 ` Guilherme G. Piccoli
2023-05-09 0:02 ` Qu Wenruo
2023-05-04 17:07 ` [PATCH 2/2] btrfs: Add module parameter to enable non-mount scan skipping Guilherme G. Piccoli
2023-05-04 19:28 ` [PATCH 0/2] Supporting same fsid filesystems mounting on btrfs Goffredo Baroncelli
2023-05-04 20:10 ` Guilherme G. Piccoli
2023-05-04 21:09 ` Goffredo Baroncelli
2023-05-05 16:21 ` Guilherme G. Piccoli
2023-05-05 5:16 ` Anand Jain [this message]
2023-05-05 16:27 ` Guilherme G. Piccoli
2023-05-05 17:37 ` Goffredo Baroncelli
2023-05-05 18:15 ` Vivek Dasmohapatra
2023-05-07 23:10 ` Dave Chinner
2023-05-08 22:45 ` Guilherme G. Piccoli
2023-08-03 15:47 ` Guilherme G. Piccoli
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=b8f55fc3-80b3-be46-933a-4cfbd3c76a71@oracle.com \
--to=anand.jain@oracle.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=gpiccoli@igalia.com \
--cc=johns@valvesoftware.com \
--cc=josef@toxicpanda.com \
--cc=kernel-dev@igalia.com \
--cc=kernel@gpiccoli.net \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ludovico.denittis@collabora.com \
--cc=nborisov@suse.com \
--cc=vivek@collabora.com \
/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).