From owner-freebsd-geom@FreeBSD.ORG Thu Apr 7 09:07:59 2011 Return-Path: Delivered-To: freebsd-geom@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE8F4106566B for ; Thu, 7 Apr 2011 09:07:59 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 144528FC17 for ; Thu, 7 Apr 2011 09:07:58 +0000 (UTC) Received: from porto.topspin.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA11728; Thu, 07 Apr 2011 12:07:56 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost.topspin.kiev.ua ([127.0.0.1]) by porto.topspin.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1Q7lC0-000Csj-14; Thu, 07 Apr 2011 12:07:56 +0300 Message-ID: <4D9D7EEB.3080607@FreeBSD.org> Date: Thu, 07 Apr 2011 12:07:55 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.15) Gecko/20110308 Lightning/1.0b2 Thunderbird/3.1.9 MIME-Version: 1.0 To: Poul-Henning Kamp References: <54077.1302165674@critter.freebsd.dk> In-Reply-To: <54077.1302165674@critter.freebsd.dk> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-geom@FreeBSD.org Subject: Re: geom and removable media X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 09:07:59 -0000 on 07/04/2011 11:41 Poul-Henning Kamp said the following: > In message <4D9D4B10.1080501@FreeBSD.org>, Andriy Gapon writes: >> on 07/04/2011 03:09 Poul-Henning Kamp said the following: >>> In message <4D9C7B52.5010207@FreeBSD.org>, Andriy Gapon writes: >>> >>>> Suppose we implemented a mechanism to detect removal or change of removable media >>>> (e.g. for optical discs in cd drives). How to signal media removal (or change)? >>>> Destroy the existing and create a new disk(9)? >>>> Or do some sort of geom spoil on it? >>> >>> Basically yes. >> >> Apologies, but yes to what? :) > > To Both :-) That's what I feared :-) > Look at g_wither_provider() as a starting point. I perceive the following problem with g_wither_provider: as I understand that call would lead to telling all consumers of a provider that they are orphaned now, and geom_dev rightfully destroys its cdev on such an event. So I see the following effect: remove a disk from a CD drive -> /dev/cdX disappears. Which I don't think would a right thing in the current world order where /dev/cdX represents both the drive and its media. -- Andriy Gapon