From: ebiederm@xmission.com (Eric W. Biederman)
To: Ben LaHaise <bcrl@redhat.com>
Cc: <torvalds@transmeta.com>, <viro@math.psu.edu>,
<linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>
Subject: Re: [RFD w/info-PATCH] device arguments from lookup, partion code in userspace
Date: 19 May 2001 05:37:42 -0600 [thread overview]
Message-ID: <m14ruhin7d.fsf@frodo.biederman.org> (raw)
In-Reply-To: <Pine.LNX.4.33.0105190138150.6079-100000@toomuch.toronto.redhat.com>
In-Reply-To: Ben LaHaise's message of "Sat, 19 May 2001 02:23:59 -0400 (EDT)"
Ben LaHaise <bcrl@redhat.com> writes:
> Hey folks,
>
> The work-in-progress patch for-demonstration-purposes-only below consists
> of 3 major components, and is meant to start discussion about the future
> direction of device naming and its interaction block layer. The main
> motivations here are the wasting of minor numbers for partitions, and the
> duplication of code between user and kernel space in areas such as
> partition detection, uuid location, lvm setup, mount by label, journal
> replay, and so on...
>
> 1. Generic lookup method and argument parsiing (fs/lookupargs.c)
>
> This code implements a lookup function which is for demonstration
> purposes used in fs/block_dev.c. The general idea is to pass
> additional parameters to device drivers on open via a comma
> seperated list of options following the device's name. Sample
> uses:
>
> /dev/sda/raw -> open sda in raw mode.
> /dev/sda/limit=102400 -> open sda with a limit of 100K
> /dev/sda/offset=1024,limit=2048
> -> open a device that gives a view of sda at an
> offset of 1KB to 2KB
GAhh!!!!!!
Ben please think /proc/sys. One value per ``file''.
> 3. Userspace partition code proposal
>
> Given the above two bits, here's a brief explaination of a
> proposal to move management of the partitioning scheme into
> userspace, along with portions of raid startup, lvm, uuid and
> mount by label code needed for mounting the root filesystem.
>
> Consider that the device node currently known as /dev/hda5 can
> also be viewed as /dev/hda at offset 512000 with a limit of 10GB.
> With the extensions in fs/block_dev.c, you could replace /dev/hda5
> with /dev/hda/offset=512000,limit=10240000000. Now, by putting
> the partition parsing code into a libpart and binding mount to a
> libpart, the root filesystem mounting code can be run out of an
> initrd image. The use of mount gives us the ability to mount
> filesystems by UUID, by label or other exotic schemes without
> having to add any additional code to the kernel.
But you need to use uclibc or a similar library to get the code size down
small enough, so you don't quadruple the size of your boot image.
As for wasting minors. If you are going to rework partitions they
should have dynamic device numbers. That are assigned when the
partition is discovered by the system. I admit a hot-plug partition
sounds incongruous but it should be fairly simple to implement.
If your real root is on a ``hot-plug'' device then it does look
like you need an initrd to help select your root partition. Hmm. the
code is simple enough code in the kernel shouldn't be bad. And the
interface can be simple as well.
Have:
/dev/sda/partitions/1
/dev/sda/partitions/2
/dev/sda/partitions/3
/dev/sda/partitions/4
/dev/sda/partitions/5
and also
/dev/sda/partitions/1/uuid
/dev/sda/partitions/1/label
/dev/sda/partitions/1/offset
/dev/sda/partitions/1/limit
To expose what the kernel found it's initial scan of the partitions.
For creating partitions you might want to do:
cat 1024 2048 > /dev/sda/newpartition
Though if you could do it with create that would be nicer, and writes
to offset and limit, that would be a little nicer.
Al would it work to have the lookup method for /dev/sda automatically
mount an instance of scsifs on /dev/hda (from an internal mount), and
then have dput drop that mount. I skimmed the code and it looks
possible.
Soft mounting a fs isn't strictly necessary but for the case above but
it looks simplest to keep the list of partitions permanently in the
dcache. We would also need to modify permission to take a vfsmnt
argument so your permissions to a device file could vary depending on
which device file you start with.
Eric
next prev parent reply other threads:[~2001-05-19 11:41 UTC|newest]
Thread overview: 161+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-19 6:23 [RFD w/info-PATCH] device arguments from lookup, partion code in userspace Ben LaHaise
2001-05-19 6:57 ` [RFD w/info-PATCH] device arguments from lookup, partion code inuserspace Andrew Clausen
2001-05-19 7:04 ` Alexander Viro
2001-05-19 7:23 ` Andrew Clausen
2001-05-19 8:30 ` Alexander Viro
2001-05-19 10:13 ` Andrew Clausen
2001-05-19 14:02 ` [RFD w/info-PATCH] device arguments from lookup, partion code Alan Cox
2001-05-19 16:48 ` Erik Mouw
2001-05-19 17:45 ` Aaron Lehmann
2001-05-19 19:38 ` Erik Mouw
2001-05-19 20:53 ` Steven Walter
2001-05-19 18:51 ` Richard Gooch
2001-05-20 2:18 ` Matthew Wilcox
2001-05-20 2:22 ` Richard Gooch
2001-05-20 2:34 ` Matthew Wilcox
2001-05-20 2:48 ` Richard Gooch
2001-05-20 3:26 ` Linus Torvalds
2001-05-20 10:23 ` Russell King
2001-05-20 10:35 ` Alexander Viro
2001-05-20 18:46 ` Linus Torvalds
2001-05-20 18:57 ` Russell King
2001-05-20 19:10 ` Linus Torvalds
2001-05-20 19:42 ` Alexander Viro
2001-05-20 20:07 ` Alan Cox
2001-05-20 20:33 ` Alexander Viro
2001-05-20 23:59 ` Paul Fulghum
2001-05-21 0:36 ` Alexander Viro
2001-05-21 3:08 ` Paul Fulghum
2001-05-20 20:07 ` Alan Cox
2001-05-20 23:46 ` Ingo Molnar
2001-05-21 0:32 ` Alexander Viro
2001-05-21 3:12 ` Linus Torvalds
2001-05-21 19:32 ` Kai Henningsen
2001-05-23 1:15 ` Albert D. Cahalan
2001-05-20 2:36 ` Alexander Viro
2001-05-20 2:51 ` Richard Gooch
2001-05-20 21:13 ` Pavel Machek
2001-05-21 20:20 ` Alan Cox
2001-05-21 20:41 ` Alexander Viro
2001-05-21 21:29 ` Alan Cox
2001-05-21 21:51 ` Alexander Viro
2001-05-21 21:56 ` Alan Cox
2001-05-21 22:10 ` Linus Torvalds
2001-05-21 22:22 ` Alexander Viro
2001-05-22 2:28 ` Paul Mackerras
2001-05-22 15:41 ` Oliver Xymoron
2001-05-22 13:33 ` Jan Harkes
2001-05-22 16:30 ` Linus Torvalds
2001-05-22 0:22 ` Ingo Oeser
2001-05-22 0:57 ` Matthew Wilcox
2001-05-22 1:13 ` Linus Torvalds
2001-05-22 1:18 ` Matthew Wilcox
2001-05-22 7:49 ` Alan Cox
2001-05-22 15:31 ` Matthew Wilcox
2001-05-22 15:31 ` Alan Cox
2001-05-22 15:38 ` Matthew Wilcox
2001-05-22 15:42 ` Alan Cox
2001-05-20 2:31 ` Alexander Viro
2001-05-20 16:57 ` David Woodhouse
2001-05-20 19:02 ` Linus Torvalds
2001-05-20 19:11 ` Alexander Viro
2001-05-20 19:18 ` Matthew Wilcox
2001-05-20 19:24 ` Alexander Viro
2001-05-20 19:34 ` Linus Torvalds
2001-05-20 19:27 ` Linus Torvalds
2001-05-20 19:33 ` Alexander Viro
2001-05-20 19:38 ` Linus Torvalds
2001-05-20 19:57 ` David Woodhouse
2001-05-21 13:57 ` Ingo Oeser
2001-05-19 9:11 ` [RFD w/info-PATCH] device arguments from lookup, partion code inuserspace Andrew Morton
2001-05-19 9:20 ` Alexander Viro
2001-05-19 7:58 ` Ben LaHaise
2001-05-19 8:10 ` Alexander Viro
2001-05-19 8:16 ` Ben LaHaise
2001-05-19 8:32 ` Alexander Viro
2001-05-19 9:42 ` [RFD w/info-PATCH] device arguments from lookup, partion code in userspace Christer Weinigel
2001-05-19 9:51 ` Christer Weinigel
2001-05-19 11:37 ` Eric W. Biederman [this message]
2001-05-19 14:25 ` Daniel Phillips
2001-05-21 8:14 ` Lars Marowsky-Bree
2001-05-22 9:07 ` Daniel Phillips
2001-05-19 13:53 ` Daniel Phillips
2001-05-19 13:57 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH] device arguments from lookup) Alexander Viro
2001-05-19 15:10 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device " Abramo Bagnara
2001-05-19 15:18 ` Alexander Viro
2001-05-19 16:01 ` Willem Konynenberg
2001-05-20 20:52 ` Pavel Machek
2001-05-20 20:53 ` Pavel Machek
2001-05-19 18:13 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH] device " Linus Torvalds
2001-05-19 23:19 ` Alexander Viro
2001-05-19 23:31 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device " Jeff Garzik
2001-05-19 23:32 ` Jeff Garzik
2001-05-19 23:39 ` Alexander Viro
2001-05-20 15:47 ` F_CTRLFD (was Re: Why side-effects on open(2) are evil.) Edgar Toernig
2001-05-20 16:20 ` Alexander Viro
2001-05-20 19:01 ` Edgar Toernig
2001-05-20 19:30 ` Alexander Viro
2001-05-21 17:16 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device arguments from lookup) Oliver Xymoron
2001-05-21 16:26 ` David Lang
2001-05-21 18:04 ` Oliver Xymoron
2001-05-21 20:14 ` Daniel Phillips
2001-05-22 15:24 ` Oliver Xymoron
2001-05-22 16:51 ` Daniel Phillips
2001-05-22 17:49 ` Oliver Xymoron
2001-05-22 20:22 ` Daniel Phillips
2001-05-23 4:19 ` Edgar Toernig
2001-05-23 4:50 ` Alexander Viro
2001-05-23 13:50 ` Daniel Phillips
2001-05-23 13:50 ` Daniel Phillips
2001-05-23 15:58 ` Oliver Xymoron
2001-05-24 0:23 ` Edgar Toernig
2001-05-24 7:47 ` Marko Kreen
2001-05-24 14:39 ` Oliver Xymoron
2001-05-24 15:20 ` CHR/BLK needed? was: Re: Why side-effects on open Marko Kreen
2001-05-24 17:12 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device Albert D. Cahalan
2001-05-24 17:25 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device arguments from lookup) Daniel Phillips
2001-05-24 20:59 ` Edgar Toernig
2001-05-24 21:26 ` Alexander Viro
2001-05-25 1:03 ` Daniel Phillips
2001-05-25 11:00 ` Daniel Phillips
2001-05-26 3:07 ` Edgar Toernig
2001-05-26 22:36 ` Daniel Phillips
2001-05-27 13:32 ` Edgar Toernig
2001-05-27 20:40 ` Ben LaHaise
2001-05-27 20:45 ` Daniel Phillips
2001-05-27 21:50 ` Marko Kreen
2001-05-28 1:26 ` Horst von Brand
2001-05-29 10:54 ` Daniel Phillips
2001-05-29 13:54 ` Horst von Brand
2001-05-19 23:52 ` Edgar Toernig
2001-05-20 0:18 ` Alexander Viro
2001-05-20 0:32 ` Linus Torvalds
2001-05-20 0:52 ` Jeff Garzik
2001-05-20 1:03 ` Jeff Garzik
2001-05-20 19:41 ` Why side-effects on open(2) are evil. (was Re: [RFD Alan Cox
2001-05-21 9:45 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH]device arguments from lookup) Andrew Clausen
2001-05-21 17:22 ` Oliver Xymoron
2001-05-22 18:53 ` Andreas Dilger
2001-05-24 9:20 ` Malcolm Beattie
2001-05-24 19:15 ` Andreas Dilger
2001-05-22 18:41 ` Andreas Dilger
2001-05-22 19:06 ` Linus Torvalds
2001-05-22 19:16 ` Peter J. Braam
2001-05-22 20:10 ` Andreas Dilger
2001-05-22 20:59 ` Peter J. Braam
2001-05-23 9:23 ` Stephen C. Tweedie
2001-05-24 21:07 ` Daniel Phillips
2001-05-24 22:00 ` Hans Reiser
2001-05-25 10:56 ` Daniel Phillips
2001-06-01 3:24 ` [reiserfs-list] " Hans Reiser
2001-05-23 9:13 ` Stephen C. Tweedie
2001-05-20 20:23 ` Why side-effects on open(2) are evil. (was Re: [RFD w/info-PATCH] device " Pavel Machek
2001-05-21 20:38 ` Alexander Viro
2001-05-19 18:31 ` [RFD w/info-PATCH] device arguments from lookup, partion code in userspace Linus Torvalds
-- strict thread matches above, loose matches on Subject: below --
2001-05-19 11:09 Andries.Brouwer
2001-05-19 11:43 ` Andrew Morton
2001-05-19 12:00 ` Alexander Viro
2001-05-19 15:56 ` Ben LaHaise
2001-05-21 12:43 Andries.Brouwer
2001-05-21 16:08 ` Daniel Phillips
2001-05-22 18:45 Andries.Brouwer
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=m14ruhin7d.fsf@frodo.biederman.org \
--to=ebiederm@xmission.com \
--cc=bcrl@redhat.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/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