Subject: Re: sd: MEDIA_LOADED not reset on last close?
To: Bill Studenmund <>
From: Leo Weppelman <>
List: tech-kern
Date: 05/06/1996 12:42:00
> > > Or you could do a DIOCSDLABEL to change the in-core label.
> > No in this case this won't work - unless I copy in the kernel code to fake
> > the NetBSD labels. The installer tool meddles with the native Atari format,
> > possibly (likely) changing the ordering of the partitions.
> > The most clean way was having the kernel re-read the native partitioning.
> > An alternative would be an ioctl that forces a kernel re-read of the 
> > disklabel.
> As this latter action is what you're trying to make happen, wouldn't
> an ioctl to make it happen directly be the best solution?
It is _a_ solution. I don't think it's the _best_ solution. I think it is
'natural' for this kind of info to be re-read on _every_ first open of a
device. I see the ioctl as a work-around.
I think it is wrong for a driver to keep volatile device info cached when
no instance of the device is open.
The only real argument against turning of the SDEV_MEDIA_LOADED flag on the
last close was 'speed' as mentioned by Charles Hannum. As I tried to point
out in one of my previous mails, this is not really an issue do to the
low frequency of first opens.