From: Anand Jain <anand.jain@oracle.com>
To: dsterba@suse.cz
Cc: linux-btrfs@vger.kernel.org,
"Guilherme G . Piccoli" <gpiccoli@igalia.com>
Subject: Re: [PATCH 2/2] btrfs: support cloned-device mount capability
Date: Tue, 3 Oct 2023 06:41:30 +0800 [thread overview]
Message-ID: <7dc8e662-ae00-498f-d42d-93727f811417@oracle.com> (raw)
In-Reply-To: <20231002125739.GN13697@twin.jikos.cz>
On 02/10/2023 20:57, David Sterba wrote:
> On Thu, Sep 28, 2023 at 09:09:47AM +0800, Anand Jain wrote:
>> Guilherme's previous work [1] aimed at the mounting of cloned devices
>> using a superblock flag SINGLE_DEV during mkfs.
>> [1] https://lore.kernel.org/linux-btrfs/20230831001544.3379273-1-gpiccoli@igalia.com/
The link should go at SOB with prefix Link:.
>>
>> Building upon this work, here is in memory only approach. As it mounts
>> we determine if the same fsid is already mounted if then we generate a
>> random temp fsid which shall be used the mount, in memory only not
>> written to the disk. We distinguish devices by devt.
>>
>> Example:
>> $ fallocate -l 300m ./disk1.img :0
>> $ mkfs.btrfs -f ./disk1.img :0
>> $ cp ./disk1.img ./disk2.img :0
>> $ cp ./disk1.img ./disk3.img :0
>> $ mount -o loop ./disk1.img /btrfs :0
>> $ mount -o ./disk2.img /btrfs1 :0
>> $ mount -o ./disk3.img /btrfs2 :0
>
> I'm confused what the ":0" are supposed to mean, is it some artifact of
> your editor?
Oh, sorry for the confusion. It is the return status of the command.
I have some local scripts to collect the output. Could you pls remove
":0", or I'll if there is a reroll.
Thanks, Anand
>
>>
>> $ btrfs fi show -m :0
>> Label: none uuid: 4a212b48-1bec-46a5-938a-783c8c1f0b02
>> Total devices 1 FS bytes used 144.00KiB
>> devid 1 size 300.00MiB used 88.00MiB path /dev/loop0
>>
>> Label: none uuid: adabf2fe-5515-4ad0-95b4-7b1609218c16
>> Total devices 1 FS bytes used 144.00KiB
>> devid 1 size 300.00MiB used 88.00MiB path /dev/loop1
>>
>> Label: none uuid: 1d77d0df-7d92-439e-adbd-20b9b86fdedb
>> Total devices 1 FS bytes used 144.00KiB
>> devid 1 size 300.00MiB used 88.00MiB path /dev/loop2
>>
>> Co-developed-by: Guilherme G. Piccoli <gpiccoli@igalia.com>
>> Signed-off-by: Anand Jain <anand.jain@oracle.com>
next prev parent reply other threads:[~2023-10-02 22:41 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 [this message]
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
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=7dc8e662-ae00-498f-d42d-93727f811417@oracle.com \
--to=anand.jain@oracle.com \
--cc=dsterba@suse.cz \
--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).