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


Groups > linux.kernel > #1260968

Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts

From bfields@fieldses.org (J. Bruce Fields)
Newsgroups linux.kernel
Subject Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts
Date 2015-11-02 22:00 +0100
Message-ID <qqumT-1BG-21@gated-at.bofh.it> (permalink)
References <qokUH-2vz-55@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts bfields@fieldses.org (J. Bruce Fields) - 2015-11-02 22:00 +0100
  Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts Chris Mason <clm@fb.com> - 2015-11-02 22:10 +0100
    Re: [PATCH/RFC] make btrfs subvol mounts appear in /proc/mounts Neil Brown <neil@brown.name> - 2015-11-03 02:40 +0100

csiph-web