Subject: Re: shooting oneself in the foot
To: David Laight <>
From: Alfred Perlstein <>
List: tech-kern
Date: 01/16/2002 11:17:15
* David Laight <> [020116 11:13] wrote:
> This might be a case of 'well you asked for it', but maybe the system
> could be mmore friendly :-)
> When a disk write is done, the offset of the partition on the disk is
> taken from the CURRENT disklabel, not the label that existed at the time
> the partition was mounted.
> There are no checks to stop you changing the partition offsets of a
> partition that has a filesystem mounted on it.  However changing these
> values will be rather devastating on the disk area that the label now
> points to.
> IMHO the mount should grab the current offset and stick with it.
> I've been trying to write the label for my second netBSD boot on the
> same disk! (in order to be able to use the bootselector to pick which
> partitio to boot.)  Fortunately I've trashed the 'current' partition
> (which is relatively easy to recreate) not the main one.
> Actually I think I have installed the correct label - just as I trashed
> the FS...

This would seem to be a major layering violation.  The FS is only
supposed to know about the underlying disk, not the boundry of
the partition.  It sees 0..endofpartition, not start..end. :)

-Alfred Perlstein []
'Instead of asking why a piece of software is using "1970s technology,"
 start asking why software is ignoring 30 years of accumulated wisdom.'
Tax deductable donations for FreeBSD: