Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1361936

confusing mountinfo output when bind-mounting files

From Tycho Andersen <tycho.andersen@canonical.com>
Newsgroups linux.kernel
Subject confusing mountinfo output when bind-mounting files
Date 2016-03-21 16:30 +0100
Message-ID <rf9Wi-7Az-21@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Hi all,

I'm seeing some strange behavior when bind mounting files from a btrfs
subvolume. Consider the output below:

root@criu2:/tmp# mount -o loop /tmp/tester.btrfs /tmp/dir1
root@criu2:/tmp# touch dir1/file
root@criu2:/tmp# sudo mount --bind dir1/file dir2/file
root@criu2:/tmp# grep "/tmp/dir" /proc/self/mountinfo 
128 24 0:45 / /tmp/dir1 rw,relatime shared:107 - btrfs /dev/loop0 rw,space_cache,subvolid=5,subvol=/
129 24 0:45 /file /tmp/dir2/file rw,relatime shared:107 - btrfs /dev/loop0 rw,space_cache,subvolid=5,subvol=/file
root@criu2:/tmp# btrfs --version
btrfs-progs v4.4
root@criu2:/tmp# uname -a
Linux criu2 4.4.0-8-generic #23-Ubuntu SMP Wed Feb 24 20:45:30 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

The issue here is that the "subvol=" mount option for the target of the bind
mount is "/file" when no such subvolume actually exists. Is this
intended? It's confusing to say the least, but seems like a bug to me.

Tycho

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

confusing mountinfo output when bind-mounting files Tycho Andersen <tycho.andersen@canonical.com> - 2016-03-21 16:30 +0100
  Re: confusing mountinfo output when bind-mounting files Chris Murphy <lists@colorremedies.com> - 2016-03-21 18:30 +0100
    Re: confusing mountinfo output when bind-mounting files Tycho Andersen <tycho.andersen@canonical.com> - 2016-03-21 18:40 +0100
      Re: confusing mountinfo output when bind-mounting files "Austin S. Hemmelgarn" <ahferroin7@gmail.com> - 2016-03-21 19:00 +0100

csiph-web