util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: g.esp@free.fr
To: util-linux@vger.kernel.org
Subject: util-linux-2.22 regression on umount with loop and /etc/mtab real file
Date: Tue, 18 Sep 2012 07:50:29 +0200 (CEST)	[thread overview]
Message-ID: <2140853048.211115988.1347947429555.JavaMail.root@zimbra33-e6.priv.proxad.net> (raw)
In-Reply-To: <1621495890.210163275.1347911558877.JavaMail.root@zimbra33-e6.priv.proxad.net>

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

       reply	other threads:[~2012-09-18  5:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1621495890.210163275.1347911558877.JavaMail.root@zimbra33-e6.priv.proxad.net>
2012-09-18  5:50 ` g.esp [this message]
2012-09-18  9:29   ` util-linux-2.22 regression on umount with loop and /etc/mtab real file Karel Zak
2012-09-18 21:31     ` g.esp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2140853048.211115988.1347947429555.JavaMail.root@zimbra33-e6.priv.proxad.net \
    --to=g.esp@free.fr \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).