tmpfs_vfsops.c (203164) | tmpfs_vfsops.c (222167) |
---|---|
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> | 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 $"); | 44__FBSDID("$FreeBSD: head/sys/fs/tmpfs/tmpfs_vfsops.c 222167 2011-05-22 01:07:54Z rmacklem $"); |
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 **); | 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 **); | 74static int tmpfs_fhtovp(struct mount *, struct fid *, int, 75 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 | 76static int tmpfs_statfs(struct mount *, struct statfs *); 77 78/* --------------------------------------------------------------------- */ 79 80static const char *tmpfs_opts[] = { 81 "from", "size", "maxfilesize", "inodes", "uid", "gid", "mode", "export", 82 NULL 83}; --- 253 unchanged lines hidden (view full) --- 337 (*vpp)->v_vflag |= VV_ROOT; 338 339 return error; 340} 341 342/* --------------------------------------------------------------------- */ 343 344static int |
344tmpfs_fhtovp(struct mount *mp, struct fid *fhp, struct vnode **vpp) | 345tmpfs_fhtovp(struct mount *mp, struct fid *fhp, int flags, 346 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 --- | 347{ 348 boolean_t found; 349 struct tmpfs_fid *tfhp; 350 struct tmpfs_mount *tmp; 351 struct tmpfs_node *node; 352 353 tmp = VFS_TO_TMPFS(mp); 354 --- 66 unchanged lines hidden --- |