Deleted Added
sdiff udiff text old ( 203164 ) new ( 222167 )
full compact
1/* $NetBSD: tmpfs_vfsops.c,v 1.10 2005/12/11 12:24:29 christos Exp $ */
2
3/*-
4 * Copyright (c) 2005 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

--- 27 unchanged lines hidden (view full) ---

36 * tmpfs is a file system that uses NetBSD's virtual memory sub-system
37 * (the well-known UVM) to store file data and metadata in an efficient
38 * way. This means that it does not follow the structure of an on-disk
39 * file system because it simply does not need to. Instead, it uses
40 * memory-specific data structures and algorithms to automatically
41 * allocate and release resources.
42 */
43#include <sys/cdefs.h>
44__FBSDID("$FreeBSD: head/sys/fs/tmpfs/tmpfs_vfsops.c 203164 2010-01-29 12:09:14Z jh $");
45
46#include <sys/param.h>
47#include <sys/limits.h>
48#include <sys/lock.h>
49#include <sys/mutex.h>
50#include <sys/kernel.h>
51#include <sys/stat.h>
52#include <sys/systm.h>

--- 13 unchanged lines hidden (view full) ---

66MALLOC_DEFINE(M_TMPFSMNT, "tmpfs mount", "tmpfs mount structures");
67MALLOC_DEFINE(M_TMPFSNAME, "tmpfs name", "tmpfs file names");
68
69/* --------------------------------------------------------------------- */
70
71static int tmpfs_mount(struct mount *);
72static int tmpfs_unmount(struct mount *, int);
73static int tmpfs_root(struct mount *, int flags, struct vnode **);
74static int tmpfs_fhtovp(struct mount *, struct fid *, struct vnode **);
75static int tmpfs_statfs(struct mount *, struct statfs *);
76
77/* --------------------------------------------------------------------- */
78
79static const char *tmpfs_opts[] = {
80 "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export",
81 NULL
82};

--- 253 unchanged lines hidden (view full) ---

336 (*vpp)->v_vflag |= VV_ROOT;
337
338 return error;
339}
340
341/* --------------------------------------------------------------------- */
342
343static int
344tmpfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp)
345{
346 boolean_t found;
347 struct tmpfs_fid *tfhp;
348 struct tmpfs_mount *tmp;
349 struct tmpfs_node *node;
350
351 tmp = VFS_TO_TMPFS(mp);
352

--- 66 unchanged lines hidden ---