util-linux-2.22 regression on umount with loop and /etc/mtab real file

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

 



I find that some coreutils(-8.19) tests using mount -oloop fail to remove the loop when the fs is unmounted after util-linux-2.22 upgrade.

How to reproduce

[chroot-i486] root:/$ mount --version
mount from util-linux 2.21.2 (with libblkid support)
[chroot-i486] root:/$ dd if=/dev/zero of=/tmp/foo_fs bs=8192 count=200 &>/dev/null
[chroot-i486] root:/$ mkfs -t ext2 -F /tmp/foo_fs &>/dev/null
[chroot-i486] root:/$ mkdir /tmp/bar_dir

[chroot-i486] root:/$ mount -oloop /tmp/foo_fs /tmp/bar_dir
[chroot-i486] root:/$ losetup -a
/dev/loop0: [2051]:366712 (/tmp/foo_fs)
[chroot-i486] root:/$ umount /tmp/foo_fs
[chroot-i486] root:/$ losetup -a

The loop is cleaned on umount with 2.21.2
With 2.22, unmounting /tmp/foo_fs no more remove the loop

[chroot-i486] root:/$ mount --version
mount from util-linux 2.22 (libmount 2.22.0: debug)
[chroot-i486] root:/$ losetup -a
[chroot-i486] root:/$ mount -oloop /tmp/foo_fs /tmp/bar_dir
[chroot-i486] root:/$ umount /tmp/foo_fs
[chroot-i486] root:/$ losetup -a
/dev/loop0: [2051]:387175 (/tmp/foo_fs)

The loop remain.

A real /etc/mtab was in use. If using /etc/mtab as a symlink to /proc/mount, the loop disappear on umount.
I am not a strong opponent to /etc/mtab as symlink as I was there a few years back. And I know where the wind is blowing actually.
It's just that issues happen in both cases.
For example, a simple df command inside a chroot report error for mountpoints made outside of the chroot.

Gilles
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux