Subject: Re: umountall order switchable ?
To: Jaromir Dolecek <email@example.com>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 10/01/1999 11:50:01
On Fri, 1 Oct 1999, Jaromir Dolecek wrote:
> The current order of unmounting in vfs_unmountall() is that
> volumes are unmounted in opposite order they were mounted, i.e.
> leaves are umounted first. While playing with fs staff, I got
> many times to the sitation when this order is not very comfortable.
> My test volume is normally the last one mounted and when
> it's locked up, the kernel never gets to umount other volumes.
> It would be cool if the order in which vfs_umountall() umounts
> volumes would be switchable. I though about some simple vfs.umountall_lifo
> sysctl flag, default on. Do you think such thing would be usable ?
That would be dangerous. Doing it in the current order ensures that all of
the mounted-on nodes (the usr node in root, the src node in usr, etc) get
released before the filesystem containing them is unmounted.
Since you're in debugging, maybe the best thing to do is to add a "blow
away all nt mounts" routine. It would only get called from the debugger,
and would manually remove all nt mounts from the mount tables, so you
could then unmount everything cleanly.
How violent it is to your nt mounts is up to you. :-)