From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz, Qu Wenruo <quwenruo.btrfs@gmx.com>
Cc: "Guilherme G. Piccoli" <gpiccoli@igalia.com>,
linux-btrfs@vger.kernel.org, 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 1/2] btrfs: Introduce the virtual_fsid feature
Date: Thu, 11 May 2023 22:12:46 +0800 [thread overview]
Message-ID: <2bab0cae-d249-376f-1a5d-bd4fa4c95309@oracle.com> (raw)
In-Reply-To: <20230511115150.GX32559@suse.cz>
On 11/5/23 19:51, David Sterba wrote:
> On Mon, May 08, 2023 at 07:50:55PM +0800, Qu Wenruo wrote:
>> On 2023/5/8 19:27, Anand Jain wrote:
>>> On 05/05/2023 21:38, David Sterba wrote:
>>>> On Fri, May 05, 2023 at 03:21:35PM +0800, Qu Wenruo wrote:
>>>>> On 2023/5/5 01:07, Guilherme G. Piccoli wrote:
>>>> This is actually a good point, we can do that already. As a conterpart
>>>> to 5f58d783fd7823 ("btrfs: free device in btrfs_close_devices for a
>>>> single device filesystem") that drops single device from the list,
>>>> single fs devices wouldn't be added to the list but some checks could be
>>>> still done like superblock validation for eventual error reporting.
>>>
>>> Something similar occurred to me earlier. However, even for a single
>>> device, we need to perform the scan because there may be an unfinished
>>> replace target from a previous reboot, or a sprout Btrfs filesystem may
>>> have a single seed device. If we were to make an exception for replace
>>> targets and seed devices, it would only complicate the scan logic, which
>>> goes against our attempt to simplify it.
>>
>> If we go SINGLE_DEV compat_ro flags, then no such problem at all, we can
>> easily reject any multi-dev features from such SINGLE_DEV fs.
>
For a single device, if we remove device replacement and seeding for a
specific flag, scanning is unnecessary.
> With the scanning complications that Anand mentions the compat_ro flag
> might make more sense, with all the limitations but allowing a safe use
> of the duplicated UUIDs.
>
> The flag would have to be set at mkfs time or by btrfsune on an
> unmounted filesystem. Doing that on a mounted filesystem is possible too
> but brings problems with updating the state of scanned device,
> potentially ongoing operations like dev-replace and more.
Setting the flag at mkfs time is preferable, in my opinion. We could
still support the btrfstune method and/or online method later.
While we are here, I'm taking the opportunity to consolidate the
scattered metadata UUID checking, which has been a long-standing
goal of mine to clean up. This will make adding multi-UUID support
cleaner. If you have any ideas, please share.
Thanks, Anand
next prev parent reply other threads:[~2023-05-11 14:15 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 [this message]
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
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=2bab0cae-d249-376f-1a5d-bd4fa4c95309@oracle.com \
--to=anand.jain@oracle.com \
--cc=clm@fb.com \
--cc=dsterba@suse.com \
--cc=dsterba@suse.cz \
--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=quwenruo.btrfs@gmx.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).