Subject: Re: sd rereads
To: Leo Weppelman <firstname.lastname@example.org>
From: Manuel Bouyer <email@example.com>
Date: 09/01/1999 16:30:54
On Wed, Sep 01, 1999 at 03:46:28PM +0200, Leo Weppelman wrote:
> On Wed 01 Sep 1999, Manuel Bouyer wrote:
> > On Tue, Aug 31, 1999 at 04:02:26PM -0700, Chris G. Demetriou wrote:
> > > der Mouse <mouse@Rodents.Montreal.QC.CA> writes:
> > > > Back a version or two ago, on last close of an sd device, almost all
> > > > state would be cleared - in particular, on next open the disklabel
> > > > would be reread.
> > >
> > > If it no longer does this, i'd call that a "serious bug."
> > I think I know why it does this: for disks without NetBSD disklabel,
> > you can but an incore disklabel (disklabel, mbrlabel, ...) but then you
> > had to keep a partition open, otherwise the in-core label would be lost.
> > I think now it re-reads the label only when the device has changed.
> > I think this went in as a side effect of the changes I made to open a device
> > without media, but it was intentionally left in.
> If it was _intentionally_ left in, I had at least expected it to be discussed
> somewhere! This is one of those changes with weird unexpected side effects.
> At least the installation on the atari is not really behaving as expected
> in some situations since the changes made by edahdi(1) will not be picked
> by the following edlabel(1).
This was documented in the mail I sent to tech-kern about these changes:
Maybe I should have explicitely stated that disklabel would not be reloaded
on close/reopen. I just said:
This change allows to load a in-memory disklabel, and then
mount a partition. For now one would have to use a kludge to keep a parition
open while changing the disklabel, otherwise it would get lost when
'disklabel' closes the raw device.
To retrieve this functionality without loosing the feature which allows
in-memory disklabel to be used, we can either add a new ioctl to reload the
disklabel explicitely, or reload a disklabel on open only if a on-disk
label is present.
I prefer the first one because this allows to reload the fake disklabel
created from dos partitions as well.
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr