All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tycho Andersen <tycho.andersen@canonical.com>
To: linux-btrfs@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: confusing mountinfo output when bind-mounting files
Date: Mon, 21 Mar 2016 09:21:44 -0600	[thread overview]
Message-ID: <20160321152144.GL8544@smitten> (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

             reply	other threads:[~2016-03-21 15:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-21 15:21 Tycho Andersen [this message]
2016-03-21 17:22 ` confusing mountinfo output when bind-mounting files Chris Murphy
2016-03-21 17:29   ` Tycho Andersen
2016-03-21 17:51     ` Austin S. Hemmelgarn

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=20160321152144.GL8544@smitten \
    --to=tycho.andersen@canonical.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.