kern/145818: [geom] geom_stat_open showing cached information for non-present iso

Andriy Gapon avg at icyb.net.ua
Mon Apr 19 13:54:32 UTC 2010


In my opinion this is an issue of CAM peripheral disk drivers (and most probably
all other disk drivers) not communicating media change events even when those
events are readily known to the drivers.

One simple is example is CDIOCEJECT/CDIOCCLOSE ioctls of cd(4).
Other possibilities for detecting media change: handle SCSI ASC 28h ("NOT READY TO
READY CHANGE, MEDIUM MAY HAVE CHANGED"); poll for media removal/change; poll for
CD drive eject button precesses (things that hald does in userland).

AFAICS, currently there is no abstraction to pass media change events from disk
layer to GEOM.  E.g. something like disk_media_changed() that would call g_spoil
or post g_new_provider_event to trigger re-taste as appropriate.
Sounds easy, but the devil is in the details, there might be some locking/layering
concerns.

But, OTOH, we do this kind of things in g_access, I don't see why we couldn't do
them in disk drivers.

-- 
Andriy Gapon


More information about the freebsd-geom mailing list