lkml.org 
[lkml]   [1999]   [Apr]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectremoving a mounted loopback file works
I am using kernel 2.2.4 and mount-2.9i.  I have a file slink1-i386.raw
(iso image). I can mount the file successfully using "mount
slink1-i386.raw /mnt -o loop" using /dev/loop0.

But then I can remove the file slink1-i386.raw while it is mounted. After
removing it, it's still listed as in use by mtab, /proc/mounts, and
losetup /dev/loop0, and I can still access the filesystem through /mnt.

If I try to unmount it then it takes longer than if I had not removed the
file.

I assume that /mnt is reading into unallocated inodes, and I assume that I
could cause corrupt "ls" listings by filling up my disk (to ensure the
inodes that were taken up by the mounted file are overwritten). I didn't
try doing this because I have no idea what other damage might occur.

I think the correct behavior is for "rm" to return an error (permission
denied, or some other error) if I try to remove the last (hard) link to a
mounted file.

David Manifold <dem@tunes.org>
This message is placed in the public domain.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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