geom and removable media

Andriy Gapon avg at FreeBSD.org
Thu Apr 7 14:46:58 UTC 2011


on 07/04/2011 13:10 Poul-Henning Kamp said the following:
> In message <4D9D7EEB.3080607 at FreeBSD.org>, Andriy Gapon writes:
> 
>> Which I
>> don't think would a right thing in the current world order where /dev/cdX
>> represents both the drive and its media.
> 
> You can create the new /dev/cdX right away, so there is no real window of
> inconsistency.

Yes, true.
But I am trying to see whether that would buy us much comparing to just doing
spoil + re-taste dance.

I.e. my main concern is that the other geoms do not have a stale view of the
media.  I am OK with leaving everything else as it is now, so that any requests
could still go all the way down to hardware (and fail).

To summarize: I am thinking about posting a spoil event when we detect that a
drive has no media (e.g. via a SCSI sense code) and posting a a retaste event when
we detect presence of new media (probably as a result of some request succeeding).


-- 
Andriy Gapon


More information about the freebsd-geom mailing list