Hello,
I can mount a disk image through a loop device. But if this disk
image contains another disk image that I try to mount through another loop
device, mount hangs up when called with "-o loop" :-(( It works if I call
losetup before and specify /dev/loop? as mount device.
Below, I explain all the steps to reproduce the bug.
Be sure to umount all but the necessaries partitions before the test
(or remount most of all read-only) because the only way to reboot will
be to press the "Reset" button. Further mounts hangup as well as sync,
halt, reboot... ;-)
(The same output is reproductible with Linux 2.0.29 and 2.1.29 with mount
2.5l and mount 2.6d, on both i386 and sparc)
---- create & mount the first disk image ----
# dd if=/dev/zero of=/tmp/part1 bs=1k count=1k
# losetup /dev/loop0 /tmp/part1
# mke2fs /dev/loop0 1024
# mount /dev/loop0 /mnt
---- create & mount a second disk image inside the first one ----
# dd if=/dev/zero of=/mnt/part2 bs=1k count=512
# losetup /dev/loop1 /mnt/part2
# mke2fs /dev/loop1 512
# mount /dev/loop1 /mnt2
---- show infos: OK ----
# mount
...
/dev/loop0 on /mnt type ext2 (rw)
/dev/loop1 on /mnt2 type ext2 (rw)
---- clean up in reverse order ----
# umount /mnt2
# losetup -d /dev/loop1
# umount /mnt
# losetup -d /dev/loop0
**** now mount these disk images without losetup facility ****
# mount -o loop /tmp/part1 /mnt
# mount -o loop /mnt/part2 /mnt2
....mount hangs :-((....
(and any further mount, umount, sync commands will)
---- from another tty ----
# ps -x | grep mount
1615 1 D 0:00 mount -o loop /mnt/part2 /mnt2
---------------------
Of course, one could say "If it works when losetup is used, then use
it every time", but I think it shouldn't hang like this anyway... ;)
Cordialement;
-- - ** Linux ** +-------------------+ ** WAW ** - - vincent@debian.org | RENARDIAS Vincent | vincent@waw.com - - Debian/GNU Linux +-------------------+ http://www.waw.com/ - - http://www.debian.org/ | WAW (33) 4 91 81 21 45 - - | Luminy (33) 4 91 82 85 32 - ---------------------------------------------------------------------------