From owner-freebsd-stable@FreeBSD.ORG Thu Jul 19 07:43:58 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6ED6A16A402 for ; Thu, 19 Jul 2007 07:43:58 +0000 (UTC) (envelope-from idiotbg@gmail.com) Received: from smtp.studnetz.uni-leipzig.de (smtp.studnetz.uni-leipzig.de [139.18.143.252]) by mx1.freebsd.org (Postfix) with ESMTP id 0504913C461 for ; Thu, 19 Jul 2007 07:43:58 +0000 (UTC) (envelope-from idiotbg@gmail.com) Received: from localhost (localhost [127.0.0.1]) by smtp.studnetz.uni-leipzig.de (Postfix) with ESMTP id 4F72B26A; Thu, 19 Jul 2007 09:43:57 +0200 (CEST) X-Virus-Scanned: by amavisd-new at studnetz-ul Received: from smtp.studnetz.uni-leipzig.de ([127.0.0.1]) by localhost (smtp.studnetz.uni-leipzig.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zRzrZSnvWPJM; Thu, 19 Jul 2007 09:43:57 +0200 (CEST) Received: from [192.168.63.4] (a144026.studnetz.uni-leipzig.de [139.18.144.26]) by smtp.studnetz.uni-leipzig.de (Postfix) with ESMTP id 8060B24A; Thu, 19 Jul 2007 09:43:56 +0200 (CEST) From: Momchil Ivanov To: "[LoN]Kamikaze" Date: Thu, 19 Jul 2007 09:43:45 +0200 User-Agent: KMail/1.9.6 References: <200707181703.07480.idiotbg@gmail.com> <20070719130252.6880b967@localhost> <469F101C.5060906@gmx.de> In-Reply-To: <469F101C.5060906@gmx.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart2876896.OHRNQ5nC26"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200707190943.55428.idiotbg@gmail.com> Cc: josh@tcbug.org, freebsd-stable@freebsd.org, Norberto Meijome , olli@lurza.secnetix.de Subject: Re: removing external usb hdd without unmounting causes reboot? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 19 Jul 2007 07:43:58 -0000 --nextPart2876896.OHRNQ5nC26 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 19 July 2007 09:17:48 [LoN]Kamikaze wrote: > Norberto Meijome wrote: > > On Wed, 18 Jul 2007 17:41:04 +0200 (CEST) > > > > Oliver Fromme wrote: > >> another work-around > >> is to use the auto mounter daemon (amd(8)). It umounts > >> file systems automatically that are not in use. > >> Another nice feature of amd(8) is that you don't have > >> to mount the file system either -- Simply plug the USB > >> stick in, then access it, and amd(8) will automatically > >> mount it for you. > > > > Now, something I dont understand - amd runs > > at user level, and it mounts filesystems, and nothing dies when the > > filesystems go away (other than the obvious cases for the applications > > trying to write to the FS in question). Doesn't amd , at some point , > > have to tell the kernel 'please mount this filesystem' here or there? > > Isn't the kernel STILL involved in all this? and why doesnt the kernel > > panic when the FS goes away? > > The trick is that amd unmounts the device after a couple of seconds, so > when someone accidentally removes a usb drive, it doesn't really matter. > Amd will simply fail to mount it on the next access. If you remove the > device during or shortly after accessing it, it still will panic the > system. What is then the reason for the kernel not being able to unmount a filesyst= em=20 whose provider is no longer present? What in the process of unmounting deni= es=20 unmounting a filesystem whose provider is no longer available? Why can the= =20 kernel not just inform all programs that files have to be closed and are=20 unaccessible any more, then consider the fs as unmounted and remove any bit= s=20 of it left in the VM. Why can kernel not just ignore interruped/pending=20 writes to that fs, drop the data, return an error to the program that=20 initiated the write and just go on. =2D-=20 PGP KeyID: 0x3118168B Keyserver: pgp.mit.edu Key fingerprint BB50 2983 0714 36DC D02E =C2=A0158A E03D 56DA 3118 168B =20 --nextPart2876896.OHRNQ5nC26 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBGnxYz4D1W2jEYFosRAvuTAKCLCyeWJLbtDM7Dnf3xjTcmeBbBowCePu1o o65XuPyPWShBfVUZUufODag= =4XkN -----END PGP SIGNATURE----- --nextPart2876896.OHRNQ5nC26--