Home | History | Annotate | Line # | Download | only in tmpfs
tmpfs.h revision 1.28.2.2
      1 /*	$NetBSD: tmpfs.h,v 1.28.2.2 2007/12/08 14:42:24 ad Exp $	*/
      2 
      3 /*
      4  * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc.
      5  * All rights reserved.
      6  *
      7  * This code is derived from software contributed to The NetBSD Foundation
      8  * by Julio M. Merino Vidal, developed as part of Google's Summer of Code
      9  * 2005 program.
     10  *
     11  * Redistribution and use in source and binary forms, with or without
     12  * modification, are permitted provided that the following conditions
     13  * are met:
     14  * 1. Redistributions of source code must retain the above copyright
     15  *    notice, this list of conditions and the following disclaimer.
     16  * 2. Redistributions in binary form must reproduce the above copyright
     17  *    notice, this list of conditions and the following disclaimer in the
     18  *    documentation and/or other materials provided with the distribution.
     19  * 3. All advertising materials mentioning features or use of this software
     20  *    must display the following acknowledgement:
     21  *        This product includes software developed by the NetBSD
     22  *        Foundation, Inc. and its contributors.
     23  * 4. Neither the name of The NetBSD Foundation nor the names of its
     24  *    contributors may be used to endorse or promote products derived
     25  *    from this software without specific prior written permission.
     26  *
     27  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     28  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     29  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     30  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     31  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     32  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     33  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     34  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     35  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     36  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     37  * POSSIBILITY OF SUCH DAMAGE.
     38  */
     39 
     40 #ifndef _FS_TMPFS_TMPFS_H_
     41 #define _FS_TMPFS_TMPFS_H_
     42 
     43 /* ---------------------------------------------------------------------
     44  * KERNEL-SPECIFIC DEFINITIONS
     45  * --------------------------------------------------------------------- */
     46 #include <sys/dirent.h>
     47 #include <sys/mount.h>
     48 #include <sys/queue.h>
     49 #include <sys/vnode.h>
     50 
     51 #if defined(_KERNEL)
     52 #include <fs/tmpfs/tmpfs_pool.h>
     53 #endif /* defined(_KERNEL) */
     54 
     55 /* --------------------------------------------------------------------- */
     56 
     57 /*
     58  * Internal representation of a tmpfs directory entry.
     59  */
     60 struct tmpfs_dirent {
     61 	TAILQ_ENTRY(tmpfs_dirent)	td_entries;
     62 
     63 	/* Length of the name stored in this directory entry.  This avoids
     64 	 * the need to recalculate it every time the name is used. */
     65 	uint16_t			td_namelen;
     66 
     67 	/* The name of the entry, allocated from a string pool.  This
     68 	* string is not required to be zero-terminated; therefore, the
     69 	* td_namelen field must always be used when accessing its value. */
     70 	char *				td_name;
     71 
     72 	/* Pointer to the node this entry refers to. */
     73 	struct tmpfs_node *		td_node;
     74 };
     75 
     76 /* A directory in tmpfs holds a sorted list of directory entries, which in
     77  * turn point to other files (which can be directories themselves).
     78  *
     79  * In tmpfs, this list is managed by a tail queue, whose head is defined by
     80  * the struct tmpfs_dir type.
     81  *
     82  * It is imporant to notice that directories do not have entries for . and
     83  * .. as other file systems do.  These can be generated when requested
     84  * based on information available by other means, such as the pointer to
     85  * the node itself in the former case or the pointer to the parent directory
     86  * in the latter case.  This is done to simplify tmpfs's code and, more
     87  * importantly, to remove redundancy. */
     88 TAILQ_HEAD(tmpfs_dir, tmpfs_dirent);
     89 
     90 /* Each entry in a directory has a cookie that identifies it.  Cookies
     91  * supersede offsets within directories because, given how tmpfs stores
     92  * directories in memory, there is no such thing as an offset.  (Emulating
     93  * a real offset could be very difficult.)
     94  *
     95  * The '.', '..' and the end of directory markers have fixed cookies which
     96  * cannot collide with the cookies generated by other entries.  The cookies
     97  * fot the other entries are generated based on the memory address on which
     98  * stores their information is stored.
     99  *
    100  * Ideally, using the entry's memory pointer as the cookie would be enough
    101  * to represent it and it wouldn't cause collisions in any system.
    102  * Unfortunately, this results in "offsets" with very large values which
    103  * later raise problems in the Linux compatibility layer (and maybe in other
    104  * places) as described in PR kern/32034.  Hence we need to workaround this
    105  * with a rather ugly hack.
    106  *
    107  * Linux 32-bit binaries, unless built with _FILE_OFFSET_BITS=64, have off_t
    108  * set to 'long', which is a 32-bit *signed* long integer.  Regardless of
    109  * the macro value, GLIBC (2.3 at least) always uses the getdents64
    110  * system call (when calling readdir) which internally returns off64_t
    111  * offsets.  In order to make 32-bit binaries work, *GLIBC* converts the
    112  * 64-bit values returned by the kernel to 32-bit ones and aborts with
    113  * EOVERFLOW if the conversion results in values that won't fit in 32-bit
    114  * integers (which it assumes is because the directory is extremely large).
    115  * This wouldn't cause problems if we were dealing with unsigned integers,
    116  * but as we have signed integers, this check fails due to sign expansion.
    117  *
    118  * For example, consider that the kernel returns the 0xc1234567 cookie to
    119  * userspace in a off64_t integer.  Later on, GLIBC casts this value to
    120  * off_t (remember, signed) with code similar to:
    121  *     system call returns the offset in kernel_value;
    122  *     off_t casted_value = kernel_value;
    123  *     if (sizeof(off_t) != sizeof(off64_t) &&
    124  *         kernel_value != casted_value)
    125  *             error!
    126  * In this case, casted_value still has 0xc1234567, but when it is compared
    127  * for equality against kernel_value, it is promoted to a 64-bit integer and
    128  * becomes 0xffffffffc1234567, which is different than 0x00000000c1234567.
    129  * Then, GLIBC assumes this is because the directory is very large.
    130  *
    131  * Given that all the above happens in user-space, we have no control over
    132  * it; therefore we must workaround the issue here.  We do this by
    133  * truncating the pointer value to a 32-bit integer and hope that there
    134  * won't be collisions.  In fact, this will not cause any problems in
    135  * 32-bit platforms but some might arise in 64-bit machines (I'm not sure
    136  * if they can happen at all in practice).
    137  *
    138  * XXX A nicer solution shall be attempted. */
    139 #if defined(_KERNEL)
    140 #define	TMPFS_DIRCOOKIE_DOT	0
    141 #define	TMPFS_DIRCOOKIE_DOTDOT	1
    142 #define	TMPFS_DIRCOOKIE_EOF	2
    143 static __inline
    144 off_t
    145 tmpfs_dircookie(struct tmpfs_dirent *de)
    146 {
    147 	off_t cookie;
    148 
    149 	cookie = ((off_t)(uintptr_t)de >> 1) & 0x7FFFFFFF;
    150 	KASSERT(cookie != TMPFS_DIRCOOKIE_DOT);
    151 	KASSERT(cookie != TMPFS_DIRCOOKIE_DOTDOT);
    152 	KASSERT(cookie != TMPFS_DIRCOOKIE_EOF);
    153 
    154 	return cookie;
    155 }
    156 #endif /* defined(_KERNEL) */
    157 
    158 /* --------------------------------------------------------------------- */
    159 
    160 /*
    161  * Internal representation of a tmpfs file system node.
    162  *
    163  * This structure is splitted in two parts: one holds attributes common
    164  * to all file types and the other holds data that is only applicable to
    165  * a particular type.  The code must be careful to only access those
    166  * attributes that are actually allowed by the node's type.
    167  */
    168 struct tmpfs_node {
    169 	/* Doubly-linked list entry which links all existing nodes for a
    170 	 * single file system.  This is provided to ease the removal of
    171 	 * all nodes during the unmount operation. */
    172 	LIST_ENTRY(tmpfs_node)	tn_entries;
    173 
    174 	/* The node's type.  Any of 'VBLK', 'VCHR', 'VDIR', 'VFIFO',
    175 	 * 'VLNK', 'VREG' and 'VSOCK' is allowed.  The usage of vnode
    176 	 * types instead of a custom enumeration is to make things simpler
    177 	 * and faster, as we do not need to convert between two types. */
    178 	enum vtype		tn_type;
    179 
    180 	/* Node identifier. */
    181 	ino_t			tn_id;
    182 
    183 	/* Node's internal status.  This is used by several file system
    184 	 * operations to do modifications to the node in a delayed
    185 	 * fashion. */
    186 	int			tn_status;
    187 #define	TMPFS_NODE_ACCESSED	(1 << 1)
    188 #define	TMPFS_NODE_MODIFIED	(1 << 2)
    189 #define	TMPFS_NODE_CHANGED	(1 << 3)
    190 
    191 	/* The node size.  It does not necessarily match the real amount
    192 	 * of memory consumed by it. */
    193 	off_t			tn_size;
    194 
    195 	/* Generic node attributes. */
    196 	uid_t			tn_uid;
    197 	gid_t			tn_gid;
    198 	mode_t			tn_mode;
    199 	int			tn_flags;
    200 	nlink_t			tn_links;
    201 	struct timespec		tn_atime;
    202 	struct timespec		tn_mtime;
    203 	struct timespec		tn_ctime;
    204 	struct timespec		tn_birthtime;
    205 	unsigned long		tn_gen;
    206 
    207 	/* Head of byte-level lock list (used by tmpfs_advlock). */
    208 	struct lockf *		tn_lockf;
    209 
    210 	/* As there is a single vnode for each active file within the
    211 	 * system, care has to be taken to avoid allocating more than one
    212 	 * vnode per file.  In order to do this, a bidirectional association
    213 	 * is kept between vnodes and nodes.
    214 	 *
    215 	 * Whenever a vnode is allocated, its v_data field is updated to
    216 	 * point to the node it references.  At the same time, the node's
    217 	 * tn_vnode field is modified to point to the new vnode representing
    218 	 * it.  Further attempts to allocate a vnode for this same node will
    219 	 * result in returning a new reference to the value stored in
    220 	 * tn_vnode.
    221 	 *
    222 	 * May be NULL when the node is unused (that is, no vnode has been
    223 	 * allocated for it or it has been reclaimed). */
    224 	struct vnode *		tn_vnode;
    225 
    226 	/* Lock on tn_vnode. */
    227 	kmutex_t		tn_vlock;
    228 
    229 	/* Pointer to the node returned by tmpfs_lookup() after doing a
    230 	 * delete or a rename lookup; its value is only valid in these two
    231 	 * situations.  In case we were looking up . or .., it holds a null
    232 	 * pointer. */
    233 	struct tmpfs_dirent *	tn_lookup_dirent;
    234 
    235 	union {
    236 		/* Valid when tn_type == VBLK || tn_type == VCHR. */
    237 		struct {
    238 			dev_t			tn_rdev;
    239 		} tn_dev;
    240 
    241 		/* Valid when tn_type == VDIR. */
    242 		struct {
    243 			/* Pointer to the parent directory.  The root
    244 			 * directory has a pointer to itself in this field;
    245 			 * this property identifies the root node. */
    246 			struct tmpfs_node *	tn_parent;
    247 
    248 			/* Head of a tail-queue that links the contents of
    249 			 * the directory together.  See above for a
    250 			 * description of its contents. */
    251 			struct tmpfs_dir	tn_dir;
    252 
    253 			/* Number and pointer of the first directory entry
    254 			 * returned by the readdir operation if it were
    255 			 * called again to continue reading data from the
    256 			 * same directory as before.  This is used to speed
    257 			 * up reads of long directories, assuming that no
    258 			 * more than one read is in progress at a given time.
    259 			 * Otherwise, these values are discarded and a linear
    260 			 * scan is performed from the beginning up to the
    261 			 * point where readdir starts returning values. */
    262 			off_t			tn_readdir_lastn;
    263 			struct tmpfs_dirent *	tn_readdir_lastp;
    264 		} tn_dir;
    265 
    266 		/* Valid when tn_type == VLNK. */
    267 		struct tn_lnk {
    268 			/* The link's target, allocated from a string pool. */
    269 			char *			tn_link;
    270 		} tn_lnk;
    271 
    272 		/* Valid when tn_type == VREG. */
    273 		struct tn_reg {
    274 			/* The contents of regular files stored in a tmpfs
    275 			 * file system are represented by a single anonymous
    276 			 * memory object (aobj, for short).  The aobj provides
    277 			 * direct access to any position within the file,
    278 			 * because its contents are always mapped in a
    279 			 * contiguous region of virtual memory.  It is a task
    280 			 * of the memory management subsystem (see uvm(9)) to
    281 			 * issue the required page ins or page outs whenever
    282 			 * a position within the file is accessed. */
    283 			struct uvm_object *	tn_aobj;
    284 			size_t			tn_aobj_pages;
    285 		} tn_reg;
    286 	} tn_spec;
    287 };
    288 
    289 #if defined(_KERNEL)
    290 
    291 LIST_HEAD(tmpfs_node_list, tmpfs_node);
    292 
    293 /* --------------------------------------------------------------------- */
    294 
    295 /*
    296  * Internal representation of a tmpfs mount point.
    297  */
    298 struct tmpfs_mount {
    299 	/* Maximum number of memory pages available for use by the file
    300 	 * system, set during mount time.  This variable must never be
    301 	 * used directly as it may be bigger than the current amount of
    302 	 * free memory; in the extreme case, it will hold the SIZE_MAX
    303 	 * value.  Instead, use the TMPFS_PAGES_MAX macro. */
    304 	u_int			tm_pages_max;
    305 
    306 	/* Number of pages in use by the file system.  Cannot be bigger
    307 	 * than the value returned by TMPFS_PAGES_MAX in any case. */
    308 	u_int			tm_pages_used;
    309 
    310 	/* Pointer to the node representing the root directory of this
    311 	 * file system. */
    312 	struct tmpfs_node *	tm_root;
    313 
    314 	/* Maximum number of possible nodes for this file system; set
    315 	 * during mount time.  We need a hard limit on the maximum number
    316 	 * of nodes to avoid allocating too much of them; their objects
    317 	 * cannot be released until the file system is unmounted.
    318 	 * Otherwise, we could easily run out of memory by creating lots
    319 	 * of empty files and then simply removing them. */
    320 	u_int			tm_nodes_max;
    321 
    322 	/* Number of nodes currently allocated.  This number only grows.
    323 	 * When it reaches tm_nodes_max, no more new nodes can be allocated.
    324 	 * Of course, the old, unused ones can be reused. */
    325 	u_int			tm_nodes_cnt;
    326 
    327 	/* Node list. */
    328 	kmutex_t		tm_lock;
    329 	struct tmpfs_node_list	tm_nodes;
    330 
    331 	/* Pools used to store file system meta data.  These are not shared
    332 	 * across several instances of tmpfs for the reasons described in
    333 	 * tmpfs_pool.c. */
    334 	struct tmpfs_pool	tm_dirent_pool;
    335 	struct tmpfs_pool	tm_node_pool;
    336 	struct tmpfs_str_pool	tm_str_pool;
    337 };
    338 
    339 /* --------------------------------------------------------------------- */
    340 
    341 /*
    342  * This structure maps a file identifier to a tmpfs node.  Used by the
    343  * NFS code.
    344  */
    345 struct tmpfs_fid {
    346 	uint16_t		tf_len;
    347 	uint16_t		tf_pad;
    348 	uint32_t		tf_gen;
    349 	ino_t			tf_id;
    350 };
    351 
    352 /* --------------------------------------------------------------------- */
    353 
    354 /*
    355  * Prototypes for tmpfs_subr.c.
    356  */
    357 
    358 int	tmpfs_alloc_node(struct tmpfs_mount *, enum vtype,
    359 	    uid_t uid, gid_t gid, mode_t mode, struct tmpfs_node *,
    360 	    char *, dev_t, struct proc *, struct tmpfs_node **);
    361 void	tmpfs_free_node(struct tmpfs_mount *, struct tmpfs_node *);
    362 int	tmpfs_alloc_dirent(struct tmpfs_mount *, struct tmpfs_node *,
    363 	    const char *, uint16_t, struct tmpfs_dirent **);
    364 void	tmpfs_free_dirent(struct tmpfs_mount *, struct tmpfs_dirent *,
    365 	    bool);
    366 int	tmpfs_alloc_vp(struct mount *, struct tmpfs_node *, struct vnode **);
    367 void	tmpfs_free_vp(struct vnode *);
    368 int	tmpfs_alloc_file(struct vnode *, struct vnode **, struct vattr *,
    369 	    struct componentname *, char *);
    370 void	tmpfs_dir_attach(struct vnode *, struct tmpfs_dirent *);
    371 void	tmpfs_dir_detach(struct vnode *, struct tmpfs_dirent *);
    372 struct tmpfs_dirent *	tmpfs_dir_lookup(struct tmpfs_node *node,
    373 			    struct componentname *cnp);
    374 int	tmpfs_dir_getdotdent(struct tmpfs_node *, struct uio *);
    375 int	tmpfs_dir_getdotdotdent(struct tmpfs_node *, struct uio *);
    376 struct tmpfs_dirent *	tmpfs_dir_lookupbycookie(struct tmpfs_node *, off_t);
    377 int	tmpfs_dir_getdents(struct tmpfs_node *, struct uio *, off_t *);
    378 int	tmpfs_reg_resize(struct vnode *, off_t);
    379 size_t	tmpfs_mem_info(bool);
    380 int	tmpfs_chflags(struct vnode *, int, kauth_cred_t, struct lwp *);
    381 int	tmpfs_chmod(struct vnode *, mode_t, kauth_cred_t, struct lwp *);
    382 int	tmpfs_chown(struct vnode *, uid_t, gid_t, kauth_cred_t, struct lwp *);
    383 int	tmpfs_chsize(struct vnode *, u_quad_t, kauth_cred_t, struct lwp *);
    384 int	tmpfs_chtimes(struct vnode *, struct timespec *, struct timespec *,
    385 	    int, kauth_cred_t, struct lwp *);
    386 void	tmpfs_itimes(struct vnode *, const struct timespec *,
    387 	    const struct timespec *);
    388 
    389 void	tmpfs_update(struct vnode *, const struct timespec *,
    390 	    const struct timespec *, int);
    391 int	tmpfs_truncate(struct vnode *, off_t);
    392 
    393 /* --------------------------------------------------------------------- */
    394 
    395 /*
    396  * Convenience macros to simplify some logical expressions.
    397  */
    398 #define IMPLIES(a, b) (!(a) || (b))
    399 #define IFF(a, b) (IMPLIES(a, b) && IMPLIES(b, a))
    400 
    401 /* --------------------------------------------------------------------- */
    402 
    403 /*
    404  * Checks that the directory entry pointed by 'de' matches the name 'name'
    405  * with a length of 'len'.
    406  */
    407 #define TMPFS_DIRENT_MATCHES(de, name, len) \
    408     (de->td_namelen == (uint16_t)len && \
    409     memcmp((de)->td_name, (name), (de)->td_namelen) == 0)
    410 
    411 /* --------------------------------------------------------------------- */
    412 
    413 /*
    414  * Ensures that the node pointed by 'node' is a directory and that its
    415  * contents are consistent with respect to directories.
    416  */
    417 #define TMPFS_VALIDATE_DIR(node) \
    418     KASSERT((node)->tn_type == VDIR); \
    419     KASSERT((node)->tn_size % sizeof(struct tmpfs_dirent) == 0); \
    420     KASSERT((node)->tn_spec.tn_dir.tn_readdir_lastp == NULL || \
    421         tmpfs_dircookie((node)->tn_spec.tn_dir.tn_readdir_lastp) == \
    422         (node)->tn_spec.tn_dir.tn_readdir_lastn);
    423 
    424 /* --------------------------------------------------------------------- */
    425 
    426 /*
    427  * Memory management stuff.
    428  */
    429 
    430 /* Amount of memory pages to reserve for the system (e.g., to not use by
    431  * tmpfs).
    432  * XXX: Should this be tunable through sysctl, for instance? */
    433 #define TMPFS_PAGES_RESERVED (4 * 1024 * 1024 / PAGE_SIZE)
    434 
    435 /* Returns the maximum size allowed for a tmpfs file system.  This macro
    436  * must be used instead of directly retrieving the value from tm_pages_max.
    437  * The reason is that the size of a tmpfs file system is dynamic: it lets
    438  * the user store files as long as there is enough free memory (including
    439  * physical memory and swap space).  Therefore, the amount of memory to be
    440  * used is either the limit imposed by the user during mount time or the
    441  * amount of available memory, whichever is lower.  To avoid consuming all
    442  * the memory for a given mount point, the system will always reserve a
    443  * minimum of TMPFS_PAGES_RESERVED pages, which is also taken into account
    444  * by this macro (see above). */
    445 static __inline size_t
    446 TMPFS_PAGES_MAX(struct tmpfs_mount *tmp)
    447 {
    448 	size_t freepages;
    449 
    450 	freepages = tmpfs_mem_info(false);
    451 	if (freepages < TMPFS_PAGES_RESERVED)
    452 		freepages = 0;
    453 	else
    454 		freepages -= TMPFS_PAGES_RESERVED;
    455 
    456 	return MIN(tmp->tm_pages_max, freepages + tmp->tm_pages_used);
    457 }
    458 
    459 /* Returns the available space for the given file system. */
    460 #define TMPFS_PAGES_AVAIL(tmp) (TMPFS_PAGES_MAX(tmp) - (tmp)->tm_pages_used)
    461 
    462 /* --------------------------------------------------------------------- */
    463 
    464 /*
    465  * Macros/functions to convert from generic data structures to tmpfs
    466  * specific ones.
    467  */
    468 
    469 static __inline
    470 struct tmpfs_mount *
    471 VFS_TO_TMPFS(struct mount *mp)
    472 {
    473 	struct tmpfs_mount *tmp;
    474 
    475 #ifdef KASSERT
    476 	KASSERT((mp) != NULL && (mp)->mnt_data != NULL);
    477 #endif
    478 	tmp = (struct tmpfs_mount *)(mp)->mnt_data;
    479 	return tmp;
    480 }
    481 
    482 #endif /* defined(_KERNEL) */
    483 
    484 static __inline
    485 struct tmpfs_node *
    486 VP_TO_TMPFS_NODE(struct vnode *vp)
    487 {
    488 	struct tmpfs_node *node;
    489 
    490 #ifdef KASSERT
    491 	KASSERT((vp) != NULL && (vp)->v_data != NULL);
    492 #endif
    493 	node = (struct tmpfs_node *)vp->v_data;
    494 	return node;
    495 }
    496 
    497 #if defined(_KERNEL)
    498 
    499 static __inline
    500 struct tmpfs_node *
    501 VP_TO_TMPFS_DIR(struct vnode *vp)
    502 {
    503 	struct tmpfs_node *node;
    504 
    505 	node = VP_TO_TMPFS_NODE(vp);
    506 #ifdef KASSERT
    507 	TMPFS_VALIDATE_DIR(node);
    508 #endif
    509 	return node;
    510 }
    511 
    512 #endif /* defined(_KERNEL) */
    513 
    514 /* ---------------------------------------------------------------------
    515  * USER AND KERNEL DEFINITIONS
    516  * --------------------------------------------------------------------- */
    517 
    518 /*
    519  * This structure is used to communicate mount parameters between userland
    520  * and kernel space.
    521  */
    522 #define TMPFS_ARGS_VERSION	1
    523 struct tmpfs_args {
    524 	int			ta_version;
    525 
    526 	/* Size counters. */
    527 	ino_t			ta_nodes_max;
    528 	off_t			ta_size_max;
    529 
    530 	/* Root node attributes. */
    531 	uid_t			ta_root_uid;
    532 	gid_t			ta_root_gid;
    533 	mode_t			ta_root_mode;
    534 };
    535 #endif /* _FS_TMPFS_TMPFS_H_ */
    536