From owner-freebsd-current@FreeBSD.ORG Thu Aug 14 16:32:05 2003 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 97C8A37B401 for ; Thu, 14 Aug 2003 16:32:05 -0700 (PDT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1202043FBF for ; Thu, 14 Aug 2003 16:32:04 -0700 (PDT) (envelope-from doconnor@gsoft.com.au) Received: from localhost (localhost [127.0.0.1]) by cain.gsoft.com.au (8.12.9/8.12.8) with ESMTP id h7ENVbDo016971; Fri, 15 Aug 2003 09:01:38 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: Eric Jacobs Date: Fri, 15 Aug 2003 09:01:35 +0930 User-Agent: KMail/1.5.3 References: <1059835661.1198.7.camel@Twoflower.liebende.de> <1060504397.777.15.camel@syrenna.deep-ocean.local> <20030814110113.4d238ddd.eaja@erols.com> In-Reply-To: <20030814110113.4d238ddd.eaja@erols.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200308150901.35745.doconnor@gsoft.com.au> X-Spam-Score: -4.4 () CARRIAGE_RETURNS,IN_REP_TO,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: freebsd-current@freebsd.org Subject: Re: usbd does not use detach X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Aug 2003 23:32:05 -0000 On Friday 15 August 2003 00:31, Eric Jacobs wrote: > > example: my digital photo recorder. > > i have an attach script to mount automatically the partition on the > > cooresponding umass/da device. works great, and this helps. > > > > but when detaching, the umount part should be done BEFORE detaching, not > > after. i can't find any good use for the detach hook. most of things > > should have been done before detaching, and i can't see how to do it > > without user interactivity, thus avoiding use of the detach hook. > > The problem with this is that the system will be asking the FS to > e.g. flush buffers to a disk which it knows doesn't exist anymore, which > is an error (and will cause errors). It should also have a hint to indicate that this device could potentially go away at any time, so it shouldn't cache anything if at all possible. (Although it would be good if the user could elect to override this in the interests of performance) I suspect that would require more significant changes though :) -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 9A8C 569F 685A D928 5140 AE4B 319B 41F4 5D17 FDD5