Messages in this thread | | | Subject | Re: loop/mount - was: Re: /proc/misc has bad mode | From | Matthias Urlichs <> | Date | Tue, 23 Apr 1996 22:14:10 +0200 (MET DST) |
| |
Hi,
Andries.Brouwer@cwi.nl wrote: > > I patched my loopback device and my mount binary > so that closing or unmounting /dev/loop? automatically > disassociates the device from the file. > >No patch required, that is the default behaviour of the current mount.
No, that's the default behavior of the current umount. That behavior currently depends on a correct /etc/mtab, though presumably it could do a stat() on the mount point instead, and find the loop device that way.
We can do things either way, of course, but I do like my way better. Umount should be able to undo whatever it is mount does by doing a simple umount(2) system call.
Consider am "emergency" reboot, for instance because something killed the root partition (these things happen, you know) or because a power failure is immanent and some process failed to shutdown in an orderly manner (happens too). The fast way is to kill all processes, turn off all swap, and unmount everything in /proc/mounts in reverse order. Easy. But not at all easy if umount must do special things for some file systems. It shouldn't have to.
-- You will meet a gin-soaked bar-room queen in Memphis. -- Matthias Urlichs \ Noris Network GmbH i.Gr/ Xlink-POP Nürnberg Schleiermacherstraße 12 \ Linux+Internet / EMail: urlichs@noris.de 90491 Nürnberg (Germany) \ Consulting+Programming+Networking+etc'ing PGP: 1B 89 E2 1C 43 EA 80 44 15 D2 29 CF C6 C7 E0 DE Click <A HREF="http://smurf.noris.de/~smurf/finger">here</A>. 42
| |