> I intend to provide different "views" of the data stored on
> btrfs subvolumes.  e.g. mount a subvolume in location A rw;
> and ro in location B while also overwriting uids, gids, and
> permissions. [ ... ]

That's not how UNIX/Linux permissions and ACLs are supposed to
work, perhaps you should reconsider such a poor idea.

Mount options are provided to map non-UNIX/Linux filesystems
into the UNIX/Linux permissions and ACLs in a crude way.

If you really want, uid/gid/permissions are an inode property,
and Btrfs via "reflinking" allows sharing of file data between
different inodes. So you can for example create a RW snapshot of
a subvolume, change all ids/permissions/ACLs, and the data space
will still be shared. This is not entirely cost-free.

If you really really want this it may be doable also with mount
namespaces combined with user namespaces, with any filesystem,
depending on yoiur requirements:

http://man7.org/linux/man-pages/man7/user_namespaces.7.html
http://man7.org/linux/man-pages/man7/mount_namespaces.7.html

As to mounting multiple times on multiple directories, that is
possible with Linux VFS regardless of filesystem type, or by
using 'mount --bind' or a variant.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to