atom feed32 messages in org.freebsd.freebsd-currentRe: Current is Really Broken(tm)
FromSent OnAttachments
Alfred PerlsteinSep 23, 1998 1:38 am 
Jordan K. HubbardSep 23, 1998 2:29 am 
Alfred PerlsteinSep 23, 1998 3:42 am 
Peter WemmSep 23, 1998 4:24 am 
Jordan K. HubbardSep 23, 1998 4:35 am 
Bruce EvansSep 23, 1998 5:02 pm 
Terry LambertSep 23, 1998 6:03 pm 
David HollandSep 24, 1998 1:52 pm 
Archie CobbsSep 24, 1998 6:20 pm 
Bruce EvansSep 25, 1998 6:37 pm 
Poul-Henning KampSep 25, 1998 11:31 pm 
Justin T. GibbsSep 26, 1998 9:52 am 
Poul-Henning KampSep 26, 1998 10:32 am 
David HollandSep 26, 1998 7:45 pm 
David HollandSep 26, 1998 8:03 pm 
Poul-Henning KampSep 26, 1998 10:56 pm 
David HollandSep 26, 1998 11:59 pm 
Poul-Henning KampSep 27, 1998 12:21 am 
Greg LeheySep 27, 1998 1:11 am 
Greg LeheySep 27, 1998 1:26 am 
David HollandSep 27, 1998 1:32 am 
Terry LambertSep 27, 1998 1:58 pm 
Terry LambertSep 27, 1998 2:40 pm 
Jeremy LeaSep 28, 1998 7:19 am 
Eivind EklundSep 28, 1998 9:29 am 
Poul-Henning KampSep 28, 1998 10:49 am 
Julian ElischerSep 28, 1998 12:24 pm 
Larry S. LileSep 28, 1998 12:39 pm 
Poul-Henning KampSep 28, 1998 12:51 pm 
Larry S. LileSep 28, 1998 1:56 pm 
Terry LambertSep 28, 1998 4:47 pm 
David HollandSep 28, 1998 4:55 pm 
Subject:Re: Current is Really Broken(tm)
From:David Holland (dhol@cs.toronto.edu)
Date:Sep 26, 1998 8:03:28 pm
List:org.freebsd.freebsd-current

<ARCHITECTURE>

For any SLICE/GEOMETRY implementation, the discovery and instantiation of the network of handlers and devices is the most tricky part, no doubt about that.

There are two basic ways to skin that cat:

I think this is a false dichotomy; the way I'd probably implement it if I set out on such a project is neither of these, but a mixture, as follows:

- knowledge of various kinds of disklabel is built into disklabel drivers in the kernel. But this knowledge is kept encapsulated.

- if being able to have everything automatically appear is important, you also write a probe routine that you put in the kernel.

- but you do not try to activate these disklabel devices, or the probe, automatically from the kernel, except maybe once someplace near the end of the boot sequence. Instead, you have someplace a daemon that receives notifications when a new disk appears and tries to work out something intelligent to do with it. (The probe routine could be here instead of the kernel, too, maybe.)

As far as the other problems you bring up:

- if you weren't worried about kernel bloat, you could have one of the device nodes generated by the disklabel hold some abstract representation of the partition table, and automatically intercept and handle modifications appropriately.

- if you were worried about kernel bloat, you just might disallow writing to the partition table while a partition device was active. This would be easy, because /dev/wd0 would be busy while the partitions were available, and none of the other /dev/wd0* would make the partition table visible. A slightly more dangerous option is to create a /dev/wd0-table device that held the table and automatically forced a reread if the table was modified. You also require a process to issue an ioctl before writing the table, to keep it from happening by accident.

- you don't have any trouble with booting; either you put the partition table probe code in the kernel (IMO a perfectly reasonable place for it), or configure the boot drive's partition table format at kernel build time, or require require the boot drive to have some (probably machine-specific) particular partition table format.

- read-write locking of partitions is exactly the same problem as it is right now. That is, it's messy, but not directly relevant.

</ARCHITECTURE>

To Unsubscribe: send mail to majo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message