|Alfred Perlstein||Sep 23, 1998 1:38 am|
|Jordan K. Hubbard||Sep 23, 1998 2:29 am|
|Alfred Perlstein||Sep 23, 1998 3:42 am|
|Peter Wemm||Sep 23, 1998 4:24 am|
|Jordan K. Hubbard||Sep 23, 1998 4:35 am|
|Bruce Evans||Sep 23, 1998 5:02 pm|
|Terry Lambert||Sep 23, 1998 6:03 pm|
|David Holland||Sep 24, 1998 1:52 pm|
|Archie Cobbs||Sep 24, 1998 6:20 pm|
|Bruce Evans||Sep 25, 1998 6:37 pm|
|Poul-Henning Kamp||Sep 25, 1998 11:31 pm|
|Justin T. Gibbs||Sep 26, 1998 9:52 am|
|Poul-Henning Kamp||Sep 26, 1998 10:32 am|
|David Holland||Sep 26, 1998 7:45 pm|
|David Holland||Sep 26, 1998 8:03 pm|
|Poul-Henning Kamp||Sep 26, 1998 10:56 pm|
|David Holland||Sep 26, 1998 11:59 pm|
|Poul-Henning Kamp||Sep 27, 1998 12:21 am|
|Greg Lehey||Sep 27, 1998 1:11 am|
|Greg Lehey||Sep 27, 1998 1:26 am|
|David Holland||Sep 27, 1998 1:32 am|
|Terry Lambert||Sep 27, 1998 1:58 pm|
|Terry Lambert||Sep 27, 1998 2:40 pm|
|Jeremy Lea||Sep 28, 1998 7:19 am|
|Eivind Eklund||Sep 28, 1998 9:29 am|
|Poul-Henning Kamp||Sep 28, 1998 10:49 am|
|Julian Elischer||Sep 28, 1998 12:24 pm|
|Larry S. Lile||Sep 28, 1998 12:39 pm|
|Poul-Henning Kamp||Sep 28, 1998 12:51 pm|
|Larry S. Lile||Sep 28, 1998 1:56 pm|
|Terry Lambert||Sep 28, 1998 4:47 pm|
|David Holland||Sep 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|
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.
To Unsubscribe: send mail to majo...@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message