On Mon, Jun 01, 2009 at 02:19:51PM +1200, Dmitry Maksyoma wrote: > > `mount -o loop' runs out of loop devices when /etc/mtab is a symlink to > /proc/mounts.
Just rechecking this issue, and it no longer occurs for me: % uname -a Linux ravenclaw 2.6.30-1-amd64 #1 SMP Sun Jun 14 15:00:29 UTC 2009 x86_64 GNU/Linux % ls -l /etc/mtab lrwxrwxrwx 1 root root 12 2009-06-21 13:29 /etc/mtab -> /proc/mounts % dd if=/dev/zero of=/tmp/l1 bs=1024 count=4096 % /sbin/mkfs -t ext2 /tmp/l1 % sudo mount -o loop /tmp/l1 /mnt % sudo losetup -a /dev/loop0: [0011]:175224 (/tmp/l1) % grep /mnt /etc/mtab /proc/mounts /etc/mtab:/dev/loop0 /mnt ext2 rw,relatime,errors=continue 0 0 /proc/mounts:/dev/loop0 /mnt ext2 rw,relatime,errors=continue 0 0 % sudo umount /mnt % sudo losetup -a % grep /mnt /etc/mtab /proc/mounts % I get the same loopback release with /etc/mtab as a regular file. This may be due to the new kernel or new util-linux in unstable, but it is now freeing the loop devices correctly. It must be in the new util-linux, because it's putting the loop device, rather than the loopback filename, as the source in /etc/mtab such that it always matches /proc/mounts. Previously they differed, and this resulted in the loop device not being freed when the loop device was used. This is no longer the case. (I'm not familiar with the util-linux source, but I can't actually see this change and it /looks/ like it uses the old behaviour, but this may be just a special case for certain use cases. The observed behaviour is what we want though!) Dmitry, can you confirm this on your system? Your bug report shows you are using stable; do you have a system running unstable you can check on (or if anyone else can check this as I have above?) Since this was IIRC the only blocker for #494001 (replacing /etc/mtab with a symlink), it looks like this can now go ahead if anyone else can confirm the loop issue is fixed. Regards, Roger -- .''`. Roger Leigh : :' : Debian GNU/Linux http://people.debian.org/~rleigh/ `. `' Printing on GNU/Linux? http://gutenprint.sourceforge.net/ `- GPG Public Key: 0x25BFB848 Please GPG sign your mail.
signature.asc
Description: Digital signature

