Print this page
OS-4060 need tmpfs size support in percent
OS-4043 tmpfs should support gigabyte sizes
OS-4044 tmpfs should support "mode" option
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Patrick Mooney <patrick.mooney@joyent.com>

@@ -19,11 +19,12 @@
        has any contents prior to the mount operation, these remain hidden
        until the file system is once again unmounted. The attributes (mode,
        owner, and group) of the root of the tmpfs filesystem are inherited
        from the underlying mount_point, provided that those attributes are
        determinable. If not, the root's attributes are set to their default
-       values.
+       values. The mode may also be overriden by the mode mount option, which
+       takes precedence if set.
 
 
        The special argument is usually specified as swap but is in fact
        disregarded and assumed to be the virtual memory resources within the
        system.

@@ -42,20 +43,41 @@
                                                  new size. A size not
                                                  explicitly set with remount
                                                  reverts to no limit.
 
 
+                              mode=octalmode
+                                                 The mode argument controls
+                                                 the permissions of the tmpfs
+                                                 mount point.  The argument
+                                                 must be an octal number, of
+                                                 the form passed to chmod(1).
+                                                 Only the access mode, setuid,
+                                                 setgid, and sticky bits (a
+                                                 mask of 07777) may be set.
+                                                 If this option is not
+                                                 provided then the default
+                                                 mode behaviour, as described
+                                                 above, applies.
+
+
+
                               size=sz
                                                  The sz argument controls the
                                                  size of this particular tmpfs
                                                  file system. If the argument
                                                  is has a `k' suffix, the
                                                  number will be interpreted as
                                                  a number of kilobytes. An `m'
                                                  suffix will be interpreted as
-                                                 a number of megabytes. No
-                                                 suffix is interpreted as
+                                                 a number of megabytes. A `g'
+                                                 suffix will be interpreted as
+                                                 a number of gigabytes. A `%'
+                                                 suffix will be interpreted as
+                                                 a percentage of the swap
+                                                 space available to the zone.
+                                                 No suffix is interpreted as
                                                  bytes. In all cases, the
                                                  actual size of the file
                                                  system is the number of bytes
                                                  specified, rounded up to the
                                                  physical pagesize of the

@@ -95,6 +117,6 @@
        link, the file system is mounted on the directory to which the symbolic
        link refers, rather than on top of the symbolic link itself.
 
 
 
-                               December 2, 2011                MOUNT_TMPFS(1M)
+                                March 18, 2015                 MOUNT_TMPFS(1M)