public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [RFD w/info-PATCH] device arguments from lookup, partion code in userspace
@ 2001-05-19 11:09 Andries.Brouwer
  2001-05-19 11:43 ` Andrew Morton
  0 siblings, 1 reply; 78+ messages in thread
From: Andries.Brouwer @ 2001-05-19 11:09 UTC (permalink / raw)
  To: bcrl, torvalds; +Cc: linux-fsdevel, linux-kernel, viro

    From: Ben LaHaise <bcrl@redhat.com>

    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.

    I'm going to stop writing this now.  I need sleep...

Hmm. You know that I wrote this long ago?
And that it has been part of the kernel for a long time?
And that there are user space utilities that use it?

In util-linux, look at the partx subdirectory.
In the kernel, read drivers/block/blkpg.c.

Andries

^ permalink raw reply	[flat|nested] 78+ messages in thread
* Re: [RFD w/info-PATCH] device arguments from lookup, partion code  inuserspace
@ 2001-05-19  8:30 Alexander Viro
  2001-05-19 14:02 ` [RFD w/info-PATCH] device arguments from lookup, partion code Alan Cox
  0 siblings, 1 reply; 78+ messages in thread
From: Alexander Viro @ 2001-05-19  8:30 UTC (permalink / raw)
  To: Andrew Clausen; +Cc: Ben LaHaise, torvalds, linux-kernel, linux-fsdevel



On Sat, 19 May 2001, Andrew Clausen wrote:

> Alexander Viro wrote:
> > On Sat, 19 May 2001, Andrew Clausen wrote:
> > 
> > > (1) these issues are independent.  The partition parsing could
> > > be done in user space, today, by blkpg, if I read the code correctly
> > > ;-)  (there's an ioctl for [un]registering partitions)  Never
> > > tried it though ;-)
> > 
> > ioctls are even more evil than encoding limits into the name.
> 
> Why?  Encoding sounds funky... you don't get normal
> ls behaviour, etc.

ioctls are evil, period. At least with these names you can use normal
scripting and don't need any special tools. Every ioctl means a binary
that has no business to exist.

> What about partition editing on other OSs?  There's no reason
> why fdisk/parted/etc. should be Linux only.  Why should the kernel
> need to know how to write partition tables?

It needs to read them. Writing doesn't add much. I'd rather see
trivial partitioning tools that consist only of UI code in case
of Linux.

> Also, different partition table formats have different alignment
> constraints (which is relevant for creating partitions).  These
> mainly need to be respected for other braindead OS's and/or BIOSes.
> 
> Communicating those between user/kernel space doesn't excite me.

So don't communicate them.
 
> Libtool & friends deals with version skew (ugly, but it works...)

With statically linked binaries? How?
 
> You can write wrappers for libraries.

Uh-huh. And you can write them for ioctls. We had been busily doing that
for years. Results are not pretty, to put it very mildly.

OK, let me put it that way: I know how to do it in the kernel with
no code duplication and less impact on userland. BTW, most of the
code can very well sit in the userland, but that's another story
(userland filesystems). Anyway, there's only one way to settle such
stuff - sit down and write the patch. Which is what I'm going to do.


^ permalink raw reply	[flat|nested] 78+ messages in thread

end of thread, other threads:[~2001-05-23  1:17 UTC | newest]

Thread overview: 78+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-19 11:09 [RFD w/info-PATCH] device arguments from lookup, partion code in userspace Andries.Brouwer
2001-05-19 11:43 ` Andrew Morton
2001-05-19 12:00   ` Alexander Viro
2001-05-19 12:06     ` [RFD w/info-PATCH] device arguments from lookup, partion codein userspace Andrew Morton
2001-05-19 15:56     ` [RFD w/info-PATCH] device arguments from lookup, partion code in userspace Ben LaHaise
2001-05-19 16:25       ` [RFD w/info-PATCH] device arguments from lookup, partion code Alan Cox
2001-05-19 16:36         ` Alexander Viro
2001-05-19 16:44         ` Matthew Wilcox
2001-05-19 18:01         ` Nicolas Pitre
2001-05-19 18:34         ` Linus Torvalds
2001-05-19 22:34           ` Ingo Oeser
2001-05-19 23:42             ` Alexander Viro
2001-05-20  0:11               ` Alan Cox
2001-05-20 17:10             ` Padraig Brady
2001-05-20 19:53         ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2001-05-19  8:30 [RFD w/info-PATCH] device arguments from lookup, partion code inuserspace Alexander Viro
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox