From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Chris Mason" <chris.mason@oracle.com>
Cc: linux-btrfs@vger.kernel.org, Greg <greg@kroah.com>
Subject: Re: btrfs and hotplug, auto-assembly, auto-setup, ...
Date: Thu, 11 Dec 2008 03:08:14 +0100 [thread overview]
Message-ID: <ac3eb2510812101808p4a2d3c12n70eddee64dc87106@mail.gmail.com> (raw)
In-Reply-To: <1228959014.21376.6.camel@think.oraclecorp.com>
On Thu, Dec 11, 2008 at 02:30, Chris Mason <chris.mason@oracle.com> wrote:
> On Tue, 2008-12-09 at 19:02 +0100, Kay Sievers wrote:
>> At a first look, it looks very promising, and I really like the idea
>> that the state of the (possibly incomplete) device tree is kept in the
>> kernel, and not somewhere in a file in userspace, like we usually see
>> for all sorts of multi-volume/multi-device setups. It should make
>> things much easier as usual.
>>
>
> I hope so, at least its the only way I can keep my brain wrapped around
> it.
Yeah, it makes a lot of sense.
>> Like with every other subsystem, people will expect btrfs to just work
>> with hotpluggable devices, without much configuration and explicit
>> setup after device connect. To assemble a mountable volume, we will
>> need to find the (possibly several independent) devices containing the
>> btrfs data.
>
> I did somewhat have hotplug in mind, there is btrfsctl -a to scan all
> of /dev and btrfsctl -A to scan a single device.
That works fine here. We just need to offer some non-sequential
scanning for some setups, to be reliable. But that should be fine, if
we find a way to plug the information together.
> Now that I have something close to a stable super block location and
> magic, I think the plan below is pretty good. The majority of my plan
> here was to make a simple ioctl that hotplug could trigger, and let
> someone who knew hotplug better make suggetions on the best way to
> present the information.
I have the btrfs detection code in udev since while, to be able to
test it, and I'm tracking the changes.
After the metadata is finalized, I will come up with a few working
examples how we could make this information easily available, and
possible integrate it into the tools, and we can decide what we think
is the best.
One thing I like to check now, if I got it correctly - the volume that
gets mounted has:
btrfs_super_block.fsid (the volume, may be used for mount-by-label)
btrfs_super_block.label (the volume, may be used for mount-by-label)
The devices the volume is assembled from, which can be several, have:
btrfs_super_block.dev_item.uuid (the device uuid, not used in userspace)
btrfs_super_block.dev_item.fsid (the volume uuid, matches
btrfs_super_block.fsid)
Is this correct?
Thanks,
Kay
next prev parent reply other threads:[~2008-12-11 2:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 18:02 btrfs and hotplug, auto-assembly, auto-setup, Kay Sievers
2008-12-11 1:30 ` Chris Mason
2008-12-11 2:08 ` Kay Sievers [this message]
2008-12-11 13:14 ` Chris Mason
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=ac3eb2510812101808p4a2d3c12n70eddee64dc87106@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=chris.mason@oracle.com \
--cc=greg@kroah.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