Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jul 2007 21:22:14 +1000
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Momchil Ivanov <idiotbg@gmail.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: removing external usb hdd without unmounting causes reboot?
Message-ID:  <20070719112214.GU1141@turion.vk2pj.dyndns.org>
In-Reply-To: <200707190057.57987.idiotbg@gmail.com>
References:  <200707181541.l6IFf4ht051775@lurza.secnetix.de> <20070718173406.GA16748@soaustin.net> <200707181403.13410.josh@tcbug.org> <200707190057.57987.idiotbg@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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 <idiotbg@gmail.com> 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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070719112214.GU1141>