From: Stanislav Brabec <sbrabec@suse.cz>
To: Karel Zak <kzak@redhat.com>
Cc: Ruediger Meier <sweet_f_a@gmx.de>,
util-linux@vger.kernel.org, David Sterba <dsterba@suse.cz>
Subject: Re: [PATCH] tests: add test for loop option in fstab (my mistake, and two new bugs, one in kernel)
Date: Wed, 24 Feb 2016 22:33:13 +0100 [thread overview]
Message-ID: <56CE2199.6010509@suse.cz> (raw)
In-Reply-To: <56CDFD40.7020603@suse.cz>
On Feb 24, 2016 at 19:58 Stanislav Brabec wrote:
> # mount -osubvol=/ /dev/loop1 /mnt/1
> mount: /dev/loop1 is already mounted or /mnt/1 busy
> /dev/loop1 is already mounted on /mnt/1
OOPS, sorry, my mistake. I forgot loop mounted on /mnt/1 that confused
me.
But I already found a real explanation of the umount error in the test
case failure: There is a kernel bug!
# mount -oloop tests/output/mount/fstab-btrfs.img /mnt
# mount -oloop,subvol=/ tests/output/mount/fstab-btrfs.img /mnt2
Both succeeded and returned code 0.
Two mounts should be created, but only one is:
# mount | grep mnt
/dev/loop1 on /mnt type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/d0/dd0/ddd0/s1/d1/dd1/ddd1/s2)
Yes, /mnt2 was ignored.
Once I
umount /mnt
it succeeds:
# mount | grep mnt
/home/sbrabec/util-linux/tests/output/mount/fstab-btrfs.img on /mnt2 type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)
Surprisingly, the format of the mount line is different.
And even more surprisingly, strace shows:
mount("/dev/loop1", "/mnt2", "btrfs", MS_MGC_VAL, "subvol=/") = 0
access("/mnt2", W_OK) = 0
=> It looks like a kernel bug.
Kernel is openSUSE Tumbleweed linux-4.4.1-1.
Looking deeper, the different format of lines seems to be util-linux
fault, because /proc/self/mountinfo lines are in an equal format:
222 59 0:71 /d0/dd0/ddd0/s1/d1/dd1/ddd1/s2 /mnt rw,relatime shared:150 - btrfs /dev/loop0 rw,space_cache,subvolid=257,subvol=/d0/dd0/ddd0/s1/d1/dd1/ddd1/s2
222 59 0:71 / /mnt2 rw,relatime shared:150 - btrfs /dev/loop0 rw,space_cache,subvolid=5,subvol=/
=> This one looks like an util-linux bug.
It seems, that also the code evaluating loop mounts needs btrfs default
subvolume check. Because it starts to work, if I specify subvol or
subvolid of the default mount explicitly.
# mount -oloop,subvol=/d0/dd0/ddd0/s1/d1/dd1/ddd1/s2 tests/output/mount/fstab-btrfs.img /mnt
/home/sbrabec/util-linux/tests/output/mount/fstab-btrfs.img on /mnt type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/d0/dd0/ddd0/s1/d1/dd1/ddd1/s2)
# mount -oloop,subvolid=257 tests/output/mount/fstab-btrfs.img /mnt
# mount | grep mnt
/home/sbrabec/util-linux/tests/output/mount/fstab-btrfs.img on /mnt type btrfs (rw,relatime,space_cache,subvolid=257,subvol=/d0/dd0/ddd0/s1/d1/dd1/ddd1/s2)
--
Best Regards / S pozdravem,
Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: sbrabec@suse.com
Lihovarská 1060/12 tel: +49 911 7405384547
190 00 Praha 9 fax: +420 284 084 001
Czech Republic http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76
next prev parent reply other threads:[~2016-02-24 21:33 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-11 19:45 [PATCH] tests: add test for loop option in fstab Stanislav Brabec
2016-02-12 10:10 ` Karel Zak
2016-02-12 15:28 ` Ruediger Meier
2016-02-12 15:55 ` Stanislav Brabec
2016-02-15 11:42 ` Ruediger Meier
2016-02-16 14:49 ` Karel Zak
2016-02-19 18:27 ` Stanislav Brabec
2016-02-22 10:12 ` Karel Zak
2016-02-22 10:29 ` Ruediger Meier
2016-02-22 10:53 ` Karel Zak
2016-02-22 16:36 ` Stanislav Brabec
2016-02-24 18:58 ` Stanislav Brabec
2016-02-24 21:33 ` Stanislav Brabec [this message]
2016-02-25 19:31 ` [PATCH] tests: add test for loop option in fstab (my mistake, and two new bugs, one in kernel) Stanislav Brabec
2016-03-01 15:26 ` Stanislav Brabec
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=56CE2199.6010509@suse.cz \
--to=sbrabec@suse.cz \
--cc=dsterba@suse.cz \
--cc=kzak@redhat.com \
--cc=sweet_f_a@gmx.de \
--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