From: bfields@fieldses.org (J. Bruce Fields)
To: Neil Brown <neil@brown.name>
Cc: Chris Mason <clm@fb.com>, Al Viro <viro@ZenIV.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
Linux btrfs Developers List <linux-btrfs@vger.kernel.org>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts
Date: Mon, 2 Nov 2015 15:50:12 -0500 [thread overview]
Message-ID: <20151102205012.GA26986@fieldses.org> (raw)
In-Reply-To: <87oafkc5kp.fsf@notabene.neil.brown.name>
On Wed, Oct 28, 2015 at 07:25:10AM +0900, Neil Brown wrote:
>
> If you create a subvolume in btrfs and access it (by name) without
> mounting it, then the subvolume looks like a separate mount to some
> extent, returning a different st_dev to stat(), but it doesn't look like
> a separate mount in that it isn't listed in /proc/mounts. This
> inconsistency can confuse tools.
>
> This patch causes these subvolumes to become separate mounts by using
> the VFS' automount functionality, much like NFS uses automount when it
> discovered mountpoints on the server.
>
> The VFS currently makes it impossible to auto-mount a directory on to itself
> (i.e. a bind mount). For NFS this isn't a problem as a new superblock
> is created for the child filesystem so there are two separate dentries
> (and inodes) for the one directory: one in the parent filesystem, one in
> the child (note that the two superblocks share a common connection to
> the server so there is still a lot of commonality).
>
> BTRFS has chosen instead to use a single superblock for all subvolumes.
Naive question: was there a reason for that choice?
--b.
> This results in a single dentry for the subvol-root. A dentry which
> must be auto-mounted on itself.
next prev parent reply other threads:[~2015-11-02 20:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 22:25 [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts Neil Brown
2015-10-28 15:12 ` Albino B Neto
2015-11-02 20:50 ` J. Bruce Fields [this message]
2015-11-02 21:03 ` Chris Mason
2015-11-03 1:38 ` Neil Brown
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=20151102205012.GA26986@fieldses.org \
--to=bfields@fieldses.org \
--cc=clm@fb.com \
--cc=hch@infradead.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil@brown.name \
--cc=viro@ZenIV.linux.org.uk \
/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.