From owner-freebsd-geom@FreeBSD.ORG Mon Apr 19 14:00:16 2010 Return-Path: Delivered-To: freebsd-geom@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39798106568A for ; Mon, 19 Apr 2010 14:00:16 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 282E78FC18 for ; Mon, 19 Apr 2010 14:00:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o3JE0FfU085816 for ; Mon, 19 Apr 2010 14:00:15 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o3JE0FWA085815; Mon, 19 Apr 2010 14:00:15 GMT (envelope-from gnats) Date: Mon, 19 Apr 2010 14:00:15 GMT Message-Id: <201004191400.o3JE0FWA085815@freefall.freebsd.org> To: freebsd-geom@FreeBSD.org From: Andriy Gapon Cc: Subject: Re: kern/145818: [geom] geom_stat_open showing cached information for non-present iso X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Andriy Gapon List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2010 14:00:16 -0000 The following reply was made to PR kern/145818; it has been noted by GNATS. From: Andriy Gapon To: bug-followup@FreeBSD.org, gcooper@FreeBSD.org, freebsd-geom@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