From: Anand Jain <anand.jain@oracle.com>
To: "Guilherme G. Piccoli" <gpiccoli@igalia.com>,
David Sterba <dsterba@suse.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] btrfs: support cloned-device mount capability
Date: Sat, 7 Oct 2023 13:31:58 +0530 [thread overview]
Message-ID: <dfc68882-ac04-4b11-9ac6-505341e0517c@oracle.com> (raw)
In-Reply-To: <55f1b487-af24-8f67-8e72-37d493c5025c@igalia.com>
On 10/6/23 15:42, Guilherme G. Piccoli wrote:
> Hi Anand / David, I was out at a conference and some holidays, so missed
> this patch. Is this a replacement of the temp-fsid approach?
>
> So, to clarify a bit the inner workings of this patch: we don't have the
> temp-fsid superblock flag anymore?
While btrfs doesn't need this superblock flag internally, we may
consider adding it for improved usability with other Btrfs features.
> Also, we can mount multiple
> partitions holding the same filesystem at the same time, given the
> nature of the patch (that generates the random fsid based on devt as per
> my superficial understanding) - right?
Indeed, devt remains unique to the partition we've utilized for a
similar purpose prior to this patch. Are there any devices lacking
a distinct devt value?
> And we don't use the
> metadata_uuid field here anymore,
Btrfs has always assigned fs_devices::metadata_uuid to either fsid
or metadata_uuid.
> i.e., we kinda "lose" the original fsid?
How? Have you tested to confirm?
> If that approaches is considered better than mine and works fine for the
> Steam Deck use case,
> I'm glad in having that!
As you have a use case to verify, can you indeed confirm whether
it works?
> But I would like at least
> to understand why it was preferred over the temp-fsid one, and what are
> the differences we can expect (need a flag to mkfs or can use btrfstune
> for that, for example).
The in-memory disk-super hack in the original patch is essentially a
workaround. This led to the necessity of restricting devices using
metadata_uuid from being used as temp-fsid device. A more appropriate
approach is to enhance device_list_add() to intelligently manage
duplicate disk-super entries by checking devt and permitting them
to mount if unique. This solution deviates from the original patch
and simultaneously addresses the subvol-mount corruption issue
observed in the original implementation.
The additional adjustments [1], such as sysfs interface, the constraints
on device additions, and the limitations on seed devices, are
supplementary patches essential to the comprehensive solution.
[1] [PATCH 0/4] btrfs: sysfs and unsupported temp-fsid features for
clones
However, the superblock temp-fsid flag isn't inherently necessary
within btrfs internals. Nevertheless, it can be considered for addition
if it makes the usability of other btrfs features with temp-fsid more
seamless.
Thanks, Anand
next prev parent reply other threads:[~2023-10-07 8:02 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-28 1:09 [PATCH 0/2] btrfs: support cloned-device mount capability Anand Jain
2023-09-28 1:09 ` [PATCH 1/2] btrfs: add helper function find_fsid_by_disk Anand Jain
2023-10-02 11:45 ` David Sterba
2023-10-03 0:57 ` Anand Jain
2023-09-28 1:09 ` [PATCH 2/2] btrfs: support cloned-device mount capability Anand Jain
2023-10-02 12:57 ` David Sterba
2023-10-02 22:41 ` Anand Jain
2023-10-02 12:52 ` [PATCH 0/2] " Anand Jain
2023-10-02 13:00 ` David Sterba
2023-10-03 1:13 ` Anand Jain
2023-10-06 7:42 ` Guilherme G. Piccoli
2023-10-07 8:01 ` Anand Jain [this message]
2023-10-18 14:15 ` Guilherme G. Piccoli
2023-10-19 2:13 ` Anand Jain
2023-10-19 8:15 ` 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=dfc68882-ac04-4b11-9ac6-505341e0517c@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.com \
--cc=gpiccoli@igalia.com \
--cc=linux-btrfs@vger.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).