Setting mount propagation type in new mount API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello David, Miklos,

I've been looking at the new mount API (fsopen(), fsconfig(),
fsmount(), move_mount(), etc.) and among the details that remain
mysterious to me is this: how does one set the propagation type
(private/shared/slave/unbindable) of a new mount and change the
propagation type of an existing mount?

I've looked at the kernel source for a bit, and did not see how this
is possible.

The draft manual pages sent out a few months ago provide little clue,
with the only hint being in the draft fsopen(2) page, which says of
fsmount():

       fsmount()  takes the file descriptor returned by fsopen() and cre‐
       ates a mount object for the filesystem root specified there.   The
       attributes of the mount object are set from the mount_attrs param‐
       eter.  The attributes specify the propagation and  mount  restric‐
       tions to be applied to accesses through this mount.

However, that text appears *not* to be true. The 'mount_attrs'
argument of fsmount() does not seem to permit specification of
propagation type, since in the kernel there is this check:

        if (attr_flags & ~(MOUNT_ATTR_RDONLY |
                           MOUNT_ATTR_NOSUID |
                           MOUNT_ATTR_NODEV |
                           MOUNT_ATTR_NOEXEC |
                           MOUNT_ATTR__ATIME |
                           MOUNT_ATTR_NODIRATIME))
                return -EINVAL;

Thanks,

Michael


-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux