Subject: Re: How can I force a reload of the disklabel?
To: der Mouse <firstname.lastname@example.org>
From: Leo Weppelman <email@example.com>
Date: 12/07/1999 16:03:59
On Tue, Dec 07, 1999 at 09:34:23AM -0500, der Mouse wrote:
> Leo Weppelman writes
> > Since the close functions of sd & wd do no longer invalidate the
> > disklabel, I wonder what the proposed method for forcing a reload is.
> Last time this came up (which was probably me noticing it because of
> sunlabel, a vaguely-analogous program of mine for Sun-style
It also appeared in the latest disklabel discussions. Unfortunately, these
discussions were not finished mostly because the disklabel item is complex,
the subject controversially and I got swamped by other work...
> disklabels), someone (cgd, I think) said that not invalidating the
> label on last close was broken. I agree, but it seems nobody has
I think you are right on that one. And I agree too ;-)
> actually done anything to fix it.
Actually, I hoped to resolve the issue together with the new disklabel sceme
(the sticky label thing), but since I don't expect this to happen anytime
soon now, I need at least _something_ to get the atari installation working
> Personally, what I've been doing is using scsictl detach and then
> scsictl scan. This does need patches to add scsictl detach, but I can
> send a shar of those to anyone who wants. This doesn't help with wd,
Thanks for the offer, but as you say, this only solves half of my problems ;-)
> Personally, I'd say the right thing to do is to make last-close
> invalidate the disklabel. I think this means either clearing
> SDEV_MEDIA_LOADED in sdclose() or having sdopen() call sdgetdisklabel()
> on any first open...presumably with analogous changes to the wd driver.
I would prefer this, since I agree with you that this is historically correct.
But to my astonishment, the current situation is already present in the 1.4
branch. So, there are now programs that depend on old (like edahdi) and some
the depend on new behaviour. This means that reverting to the old method
probably brings it's own breakage :-(
> > Any ideas of how to (temporarely?) fix it?
> > I can think of:
> > - make edahdi reboot the system (Ugh!)
> > - let an eject-ioctl on a fixed disk cause media-loaded to dropped (hacky)
> - clear media-loaded on last close
Logically should be considered too, yes.