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

Andriy Gapon avg at icyb.net.ua
Mon Apr 19 14:00:16 UTC 2010


The following reply was made to PR kern/145818; it has been noted by GNATS.

From: Andriy Gapon <avg at icyb.net.ua>
To: bug-followup at FreeBSD.org, gcooper at FreeBSD.org, freebsd-geom at FreeBSD.org
Cc:  
Subject: Re: kern/145818: [geom] geom_stat_open showing cached information
 for non-present iso
Date: Mon, 19 Apr 2010 16:54:27 +0300

 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