From owner-freebsd-current@FreeBSD.ORG Mon Mar 28 13:49:47 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB15716A4CE for ; Mon, 28 Mar 2005 13:49:47 +0000 (GMT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EE5343D1F for ; Mon, 28 Mar 2005 13:49:47 +0000 (GMT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [10.1.1.7]) (authenticated bits=0)j2SDngsf095207 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 28 Mar 2005 15:49:43 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.10/8.12.10) with ESMTP id j2SDmwVK087799 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 28 Mar 2005 15:48:58 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.11/8.12.11) with ESMTP id j2SDmvxo027524; Mon, 28 Mar 2005 15:48:57 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.11/8.12.11/Submit) id j2SDmviK027523; Mon, 28 Mar 2005 15:48:57 +0200 (CEST) (envelope-from ticso) Date: Mon, 28 Mar 2005 15:48:57 +0200 From: Bernd Walter To: Poul-Henning Kamp Message-ID: <20050328134856.GF14532@cicely12.cicely.de> References: <1112015844.1022.44.camel@localhost> <31943.1112016751@critter.freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <31943.1112016751@critter.freebsd.dk> X-Operating-System: FreeBSD cicely12.cicely.de 5.2-CURRENT alpha User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=3.0 tests=BAYES_00 autolearn=no version=2.64 X-Spam-Report: * -4.9 BAYES_00 BODY: Bayesian spam probability is 0 to 1% * [score: 0.0002] X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on cicely12.cicely.de cc: "current@freebsd.org" cc: vova@fbsd.ru cc: "Matthew N. Dodd" cc: freebsd-mobile@freebsd.org cc: Julian Elischer cc: ticso@cicely.de Subject: Re: Reattach/redetect allways connected umass device - is it possible ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Mar 2005 13:49:48 -0000 On Mon, Mar 28, 2005 at 03:32:31PM +0200, Poul-Henning Kamp wrote: > In message <1112015844.1022.44.camel@localhost>, Vladimir Grebenschikov writes: > >В пн, 28/03/2005 в 15:04 +0200, Bernd Walter пишет: > >> On Mon, Mar 28, 2005 at 04:58:31PM +0400, Vladimir Grebenschikov wrote: > >> > ? ??, 28/03/2005 ? 14:13 +0200, Poul-Henning Kamp ?????: > >> > > In message <20050328114633.GZ14532@cicely12.cicely.de>, Bernd Walter writes: > >> > > > >> > > >> camcontrol detach da0; camcontrol rescan all > >> > > >> helps, but, it should be much better if it will be issued automatically. > >> > > > > >> > > >Yes - GEOM seems to ignore media change signals from drives. > >> > > >I've added PHK to the recipient list - maybe he has an idea about this > >> > > >problem. > >> > > > >> > > No, GEOM doesn't ignore any such thing, because as far as I know > >> > > GEOM doesn't get any such thing to ignore in the first place. > >> > > >> > So, let's imagine following situation: > >> > > >> > We get SCSI BUS with removable da device. > >> > device detected as da0 and not mounted. > >> > Device disconnected from SCSI bus. > >> > And finally, another device with different geometry connected with same > >> > SCIS ID. > >> > >> This ist not a *media* exchange - this is a *device* and in > >> this case even a scbus exchange. > > > >Ok, so my case is media exchange, not device exchange. > >How it is supposed to work in this case ? > > That's a very good question. He disconnects and reattaches the whole device. The disconnect blocks somewhere until something magic happens and then he gets the new device. Under USB you have to reprobe the device, as a freshly attached device is completely unconfigured. There is absolutely no chance that you can reconnect a USB device without getting a new instance. > The original intent in GEOM was that the geom instance would represent > the media while the drive (if separate for the media) would have > another access mechanism. Sounds reasonable. > Driver support for this is not really meaterialized and therefore > the model now is that when the media is ejected the geom device > is removed and a new one created right away, even if a new media > is not inserted right away. Do you get eject notifications from any device type? > This works with the broken-by-design CDrom ioctls etc. > > What is missing is to tickle GEOM when the media is inserted so > that the tasting takes place. Mmm. One of my problems is that it is possible with SCSI MO drives to eject the media, reinsert a new one and errously continue to work with the old GEOM layout. I already trashed the data on one media by forgetting to trigger a reprobe - since then I use a mount script. -- B.Walter BWCT http://www.bwct.de bernd@bwct.de info@bwct.de