From owner-freebsd-stable@FreeBSD.ORG Thu Jul 19 11:22:16 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 B327616A402 for ; Thu, 19 Jul 2007 11:22:16 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-20-82.belrs4.nsw.optusnet.com.au [220.239.20.82]) by mx1.freebsd.org (Postfix) with ESMTP id 1FA2B13C4A3 for ; Thu, 19 Jul 2007 11:22:15 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.14.1/8.14.1) with ESMTP id l6JBMEij002100; Thu, 19 Jul 2007 21:22:14 +1000 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.14.1/8.14.1/Submit) id l6JBMElD002099; Thu, 19 Jul 2007 21:22:14 +1000 (EST) (envelope-from peter) Date: Thu, 19 Jul 2007 21:22:14 +1000 From: Peter Jeremy To: Momchil Ivanov Message-ID: <20070719112214.GU1141@turion.vk2pj.dyndns.org> References: <200707181541.l6IFf4ht051775@lurza.secnetix.de> <20070718173406.GA16748@soaustin.net> <200707181403.13410.josh@tcbug.org> <200707190057.57987.idiotbg@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z6Eq5LdranGa6ru8" Content-Disposition: inline In-Reply-To: <200707190057.57987.idiotbg@gmail.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-stable@freebsd.org 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 11:22:16 -0000 --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2007-Jul-19 00:57:57 +0200, Momchil Ivanov wrote: >I think you are missing the point here and it is that the drive is already= =20 >gone, so you do not have to care about it. I don't think anyone is missing this point. >The most natural way for me seems to be that the OS should just return err= ors=20 >to the programs trying any I/O on that drive. May be when a drive is=20 >unplugged the OS has to mark it and the mounted file systems as not being= =20 >there until all opened files on it are closed, return errors for all I/O= =20 >except for closing opened files. And when all files are closed consider th= e=20 >fs as unmounted and remove the drive from the kernel. And everyone I am aware of agrees that this is what _should_ happen. Unfortunately, as has already been mentioned, the filesystem and VM code have a very incestuous relationship and actually _making_ FreeBSD behave this way is (from all accounts) very difficult. There is already an entry on the project ideas list to at least make this work for MSDOSFS (http://www.freebsd.org/projects/ideas/#p-msdosfs - also part of SOC2007). >This is my idea of how things should be done. Ensuring that a file system = is=20 >in a consistent state after drive disconnect is something completely=20 >different Note that UFS+softupdates already implements this. --=20 Peter Jeremy --z6Eq5LdranGa6ru8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGn0lm/opHv/APuIcRAsqgAKClNdYxduvIIPIC7YE4TyswIq2erwCfYGSJ OEx3hqqnowglb89pO03fXV4= =HMoy -----END PGP SIGNATURE----- --z6Eq5LdranGa6ru8--