Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Apr 2010 16:54:27 +0300
From:      Andriy Gapon <avg@icyb.net.ua>
To:        bug-followup@FreeBSD.org, gcooper@FreeBSD.org, freebsd-geom@FreeBSD.org
Subject:   Re: kern/145818: [geom] geom_stat_open showing cached information for non-present iso
Message-ID:  <4BCC6093.5060007@icyb.net.ua>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BCC6093.5060007>