Subject: Re: shooting oneself in the foot
From: David Laight <email@example.com>
Date: 01/16/2002 20:38:35
> disklabel(8) should not be allowing modifications of mounted filesystems
> (by checking at write time). At least not without sufficient warnings
> that will drive off someone with a shadow of a doubt as to what they
> are doing.
Ok, My system has been running with root on wd0a, I've generated a new
root filesystem (say for a new version of netbsd) on wd0h. I've tested
the new system by typing 'boot wd0h:' and am now happy with it so I want
to make it the default. So what I want to do is swap over wd0a and wd0h
on the disklabel and reboot.
Tell me which commands I can use to do this, quite reasonable, action?
> 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. :)
I didn't say that the knowledge should be in the fs code itself, just
saved so that the filesystem always refers to the same disk blocks. At
the moment every disk write is compared against the CURRENT disk label
for the disk.