From: "Kay Sievers" <kay.sievers@vrfy.org>
To: "Andreas Dilger" <adilger@sun.com>
Cc: "Chris Mason" <chris.mason@oracle.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Stephen Rothwell" <sfr@canb.auug.org.au>,
linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: Btrfs trees for linux-next
Date: Mon, 15 Dec 2008 23:55:20 +0100 [thread overview]
Message-ID: <ac3eb2510812151455h27b790av9579b670edbca7ab@mail.gmail.com> (raw)
In-Reply-To: <20081215210323.GB5000@webber.adilger.int>
On Mon, Dec 15, 2008 at 22:03, Andreas Dilger <adilger@sun.com> wrote:
> On Dec 11, 2008 09:43 -0500, Chris Mason wrote:
>> The multi-device code uses a very simple brute force scan from userland
>> to populate the list of devices that belong to a given FS. Kay Sievers
>> has some ideas on hotplug magic to make this less dumb. (The scan isn't
>> required for single device filesystems).
>
> This should use libblkid to do the scanning of the devices, and it can
> cache the results for efficiency. Best would be to have the same LABEL+UUID
> for all devices in the same filesystem, and then once any of these devices
> are found the mount.btrfs code can query the rest of the devices to find
> the remaining parts of the filesystem.
Which is another way to do something you should not do that way in the
first place, just with a library instead of your own code.
Brute-force scanning /dev with a single thread will not work reliably
in many setups we need to support. Sure, it's good to have it for a
rescue system, it will work fine or your workstation, but definitely
not for boxes with many devices where you don't know how they behave.
Just do:
$ modprobe scsi_debug max_luns=8 num_parts=2
$ echo 1 > /sys/module/scsi_debug/parameters/every_nth
$ echo 4 > /sys/module/scsi_debug/parameters/opts
$ ls -l /sys/class/block/ | wc -l
45
and then call any binary doing /dev scanning, and wait (in this case)
for ~2 hours to return.
Also, the blkid cache file uses major/minor numbers or kernel device
names, which will also not help in many setups we have to support
today.
The original btrfs topic, leading to this, is here:
http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg01048.html
Thanks,
Kay
next prev parent reply other threads:[~2008-12-15 22:55 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-20 12:18 Btrfs trees for linux-next Chris Mason
2008-12-11 2:34 ` Chris Mason
2008-12-11 3:14 ` Stephen Rothwell
2008-12-11 4:06 ` Andrew Morton
2008-12-11 5:55 ` Stephen Rothwell
2008-12-11 14:43 ` Chris Mason
2008-12-15 21:03 ` Andreas Dilger
2008-12-15 22:55 ` Kay Sievers [this message]
2008-12-16 1:37 ` Chris Mason
2008-12-16 1:39 ` Kay Sievers
2008-12-17 13:23 ` Notes on support for multiple devices for a single filesystem Christoph Hellwig
2008-12-17 14:50 ` Kay Sievers
2008-12-17 15:08 ` Christoph Hellwig
2008-12-17 15:33 ` Kay Sievers
2008-12-17 14:53 ` Chris Mason
2008-12-17 19:53 ` Andrew Morton
2008-12-17 20:58 ` Chris Mason
2008-12-17 21:20 ` Kay Sievers
2008-12-17 21:26 ` Chris Mason
2008-12-17 21:27 ` Jeff Garzik
2008-12-18 21:22 ` Bryan Henderson
2008-12-17 21:24 ` Andreas Dilger
2008-12-17 21:30 ` Jeff Garzik
2008-12-17 21:41 ` Chris Mason
2008-12-22 1:59 ` Liu Hui
2008-12-17 22:04 ` Andreas Dilger
2008-12-17 22:19 ` Dave Kleikamp
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=ac3eb2510812151455h27b790av9579b670edbca7ab@mail.gmail.com \
--to=kay.sievers@vrfy.org \
--cc=adilger@sun.com \
--cc=akpm@linux-foundation.org \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/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).