Subject: Re: mbrlabel and extended partitions (NetBSD 1.6.1/i386)
To: Matthias Drochner <M.Drochner@fz-juelich.de>
From: Luke Mewburn <lukem@netbsd.org>
List: current-users
Date: 06/07/2003 10:01:06
On Fri, Jun 06, 2003 at 10:32:32PM +0200, Matthias Drochner wrote:
  | 
  | lukem@netbsd.org said:
  | > Or try
  | > 	dkctl wd1 keeplabel yes 
  | 
  | This is totally backwards imho.
  |
  | It should always keep the label in core, and there should be
  | an ioctl to reset it (ie reread from disk or build default
  | label).

The current semantics (of losing the label on last close) may not be
the best, but it is how we have historically done things; the
DIOCKLABEL ioctl (which is what "dkctl .... keeplabel yes" sets) is a
more recent addition which says "keep the label even after last close"
(and the drivers should be smart enough to flush the label if the
device goes offline or its a removeable media type and its ejected)

Whilst I personally agree with your ideas on the change of semantics,
we have to carefully consider the ramifications of changing the default
from "don't keep label by default" to "keep label by default" before any
change is made.


  | OSF/1 has a "disklabel -z" to clear the label. We could extrapolate
  | this to obey the "-r" option: without, just reset the in-core label.
  | With, zero the disk's one too.
  | "dkctl" should be reserved for things which are really the
  | driver's concern.
  | 
  | best regards
  | Matthias


Luke.