github.com/ssdev-go/moby@v17.12.1-ce-rc2+incompatible/pkg/mount/flags_linux.go (about)

     1  package mount
     2  
     3  import (
     4  	"golang.org/x/sys/unix"
     5  )
     6  
     7  const (
     8  	// RDONLY will mount the file system read-only.
     9  	RDONLY = unix.MS_RDONLY
    10  
    11  	// NOSUID will not allow set-user-identifier or set-group-identifier bits to
    12  	// take effect.
    13  	NOSUID = unix.MS_NOSUID
    14  
    15  	// NODEV will not interpret character or block special devices on the file
    16  	// system.
    17  	NODEV = unix.MS_NODEV
    18  
    19  	// NOEXEC will not allow execution of any binaries on the mounted file system.
    20  	NOEXEC = unix.MS_NOEXEC
    21  
    22  	// SYNCHRONOUS will allow I/O to the file system to be done synchronously.
    23  	SYNCHRONOUS = unix.MS_SYNCHRONOUS
    24  
    25  	// DIRSYNC will force all directory updates within the file system to be done
    26  	// synchronously. This affects the following system calls: create, link,
    27  	// unlink, symlink, mkdir, rmdir, mknod and rename.
    28  	DIRSYNC = unix.MS_DIRSYNC
    29  
    30  	// REMOUNT will attempt to remount an already-mounted file system. This is
    31  	// commonly used to change the mount flags for a file system, especially to
    32  	// make a readonly file system writeable. It does not change device or mount
    33  	// point.
    34  	REMOUNT = unix.MS_REMOUNT
    35  
    36  	// MANDLOCK will force mandatory locks on a filesystem.
    37  	MANDLOCK = unix.MS_MANDLOCK
    38  
    39  	// NOATIME will not update the file access time when reading from a file.
    40  	NOATIME = unix.MS_NOATIME
    41  
    42  	// NODIRATIME will not update the directory access time.
    43  	NODIRATIME = unix.MS_NODIRATIME
    44  
    45  	// BIND remounts a subtree somewhere else.
    46  	BIND = unix.MS_BIND
    47  
    48  	// RBIND remounts a subtree and all possible submounts somewhere else.
    49  	RBIND = unix.MS_BIND | unix.MS_REC
    50  
    51  	// UNBINDABLE creates a mount which cannot be cloned through a bind operation.
    52  	UNBINDABLE = unix.MS_UNBINDABLE
    53  
    54  	// RUNBINDABLE marks the entire mount tree as UNBINDABLE.
    55  	RUNBINDABLE = unix.MS_UNBINDABLE | unix.MS_REC
    56  
    57  	// PRIVATE creates a mount which carries no propagation abilities.
    58  	PRIVATE = unix.MS_PRIVATE
    59  
    60  	// RPRIVATE marks the entire mount tree as PRIVATE.
    61  	RPRIVATE = unix.MS_PRIVATE | unix.MS_REC
    62  
    63  	// SLAVE creates a mount which receives propagation from its master, but not
    64  	// vice versa.
    65  	SLAVE = unix.MS_SLAVE
    66  
    67  	// RSLAVE marks the entire mount tree as SLAVE.
    68  	RSLAVE = unix.MS_SLAVE | unix.MS_REC
    69  
    70  	// SHARED creates a mount which provides the ability to create mirrors of
    71  	// that mount such that mounts and unmounts within any of the mirrors
    72  	// propagate to the other mirrors.
    73  	SHARED = unix.MS_SHARED
    74  
    75  	// RSHARED marks the entire mount tree as SHARED.
    76  	RSHARED = unix.MS_SHARED | unix.MS_REC
    77  
    78  	// RELATIME updates inode access times relative to modify or change time.
    79  	RELATIME = unix.MS_RELATIME
    80  
    81  	// STRICTATIME allows to explicitly request full atime updates.  This makes
    82  	// it possible for the kernel to default to relatime or noatime but still
    83  	// allow userspace to override it.
    84  	STRICTATIME = unix.MS_STRICTATIME
    85  
    86  	mntDetach = unix.MNT_DETACH
    87  )