Subject: Re: disklabel handling functions
To: None <tech-kern@netbsd.org>
From: Tyler Retzlaff <rtr@wasabisystems.com>
List: tech-kern
Date: 11/01/2002 16:47:27
On Thu, Oct 31, 2002 at 01:09:36PM -0800, Bill Studenmund wrote:
> 
> I'd say make it a new library.

I'm inclined to say so too, but I don't make these decisions and other people
are suggesting libutil.

> Looking at dknotes:
> 
> disklabel_write_incore() - you were seeing how different drivers handle
> final close. sd drives look at PERIPH_MEDIA_LOADED to know if they should
> re-read a label. If PERIPH_KEEP_LABEL is set, PERIPH_MEDIA_LOADED isn't
> cleared on final close().
> 
> Also look at the DIOCKLABEL ioctl:
> 
> #define DIOCKLABEL      _IOW('d', 119, int)     /* keep/drop label on close? */

Yes, I missed DIOCKLABEL it is now called before setting the incore label.

> disklabel_validate():
> 
> An error code would be better than a count.

Some limited error codes have now been implemented, we can expand the set if
need.

> A machine (not arch) indicator would probably be good.

Changed.

I have updated the source and documentation located at:
ftp.netbsd.org/pub/NetBSD/misc/rtr/dklabel-20021031.tar.gz

-- 

Tyler Retzlaff <rtr@wasabisystems.com>  http://www.wasabisystems.com