Messages in this thread | | | Date | Mon, 08 Mar 1999 16:57:27 +0100 (MET) | From | Hans <> | Subject | Re: loopback devices are not freeed on umount |
| |
On Mon, 8 Mar 1999, Matthew Wilcox wrote:
> > Hans de Goede wrote: > > If I mount a floppy image or an iso image trough loopback for example: > > mount boot.img t -o loop=/dev/loop0 > > and then umount it with: > > umount t > > or: > > umount /dev/loop0 > > The loopback module usage count stays 1 in /proc/modules > > also I cannot mount another image thorugh /dev/loop0 cause it's still in > > use acording to the kernel. > > this is intended behaviour and a userspace issue in any case. Let me > explain: > > mount -o loop is a shortcut which actually does an intelligent "losetup" > followed by a "mount /dev/loopN". When you unmount it, it does not run > a "losetup -d". It should not, as I (for one) use losetup manually to > mess around with loop devices and I would not like unmount to delete my > loop devices for me. > > Andries, how do you feel about an extension to mtab to have a "loop" > option in the options field so that unmount can know to delete it if it > was created by mount? I realise this won't work for people who symlink > /etc/mtab to /proc/mounts. > > (Example: > > /dev/loop0 /mnt/test ext2 rw 0 0 > /dev/loop1 /mnt/test2 ext2 rw,loop 0 0 > > here, loop1 would be automatically deleted and loop0 would not be.) > I understand thanks for the info, maybe a note somewhere in the kernel docs about losetup would be nice.
yes it's in make config's help no it's not in Documentation ;)
Regards,
Hans
- 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/
| |