[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Non-configuration files in /etc

Martijn van Oosterhout <kleptog@cupid.suninternet.com> writes:

[loop mounts]

> Can't exactly remember, but something goes wrong with this
> when you link mtab to /proc/mounts.

Since mount(8) snarfs the loop= options and passes them to losetup
rather then mount(2), the kernel nevers sees this options and thus
cannot record them in /proc/mounts. umounting this loop mount will
then *not* automatically free the loop device.

I don't quite get the reason for this, though. Look at the following:

~$ mount /iso/test 
~$ grep /iso/test /etc/mtab /proc/mounts 
/etc/mtab:/iso/img /iso/test iso9660 ro,noexec,nosuid,nodev,loop=/dev/loop0,user=robbe 0 0
/proc/mounts:/dev/loop0 /iso/test iso9660 ro,noexec,nosuid,nodev 0 0

umount should be capable of tearing down the right device, because it
is mentioned in /proc/mounts's first field. It would have to special
case on the device number, which is kind of ugly, though.


Reply to: