lkml.org 
[lkml]   [1996]   [Apr]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: loop/mount - was: Re: /proc/misc has bad mode
From
Date
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


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.030 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site