null_vfsops.c (115486) | null_vfsops.c (116271) |
---|---|
1/* 2 * Copyright (c) 1992, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94 37 * 38 * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 | 1/* 2 * Copyright (c) 1992, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 22 unchanged lines hidden (view full) --- 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 * 36 * @(#)null_vfsops.c 8.2 (Berkeley) 1/21/94 37 * 38 * @(#)lofs_vfsops.c 1.2 (Berkeley) 6/18/92 |
39 * $FreeBSD: head/sys/fs/nullfs/null_vfsops.c 115486 2003-05-31 18:46:45Z phk $ | 39 * $FreeBSD: head/sys/fs/nullfs/null_vfsops.c 116271 2003-06-12 20:48:38Z phk $ |
40 */ 41 42/* 43 * Null Layer 44 * (See null_vnops.c for a description of what this does.) 45 */ 46 47#include <sys/param.h> --- 5 unchanged lines hidden (view full) --- 53#include <sys/namei.h> 54#include <sys/proc.h> 55#include <sys/vnode.h> 56 57#include <fs/nullfs/null.h> 58 59static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); 60 | 40 */ 41 42/* 43 * Null Layer 44 * (See null_vnops.c for a description of what this does.) 45 */ 46 47#include <sys/param.h> --- 5 unchanged lines hidden (view full) --- 53#include <sys/namei.h> 54#include <sys/proc.h> 55#include <sys/vnode.h> 56 57#include <fs/nullfs/null.h> 58 59static MALLOC_DEFINE(M_NULLFSMNT, "NULLFS mount", "NULLFS mount structure"); 60 |
61static int nullfs_fhtovp(struct mount *mp, struct fid *fidp, 62 struct vnode **vpp); 63static int nullfs_checkexp(struct mount *mp, struct sockaddr *nam, 64 int *extflagsp, struct ucred **credanonp); 65static int nullfs_mount(struct mount *mp, struct nameidata *ndp, 66 struct thread *td); 67static int nullfs_quotactl(struct mount *mp, int cmd, uid_t uid, 68 caddr_t arg, struct thread *td); 69static int nullfs_root(struct mount *mp, struct vnode **vpp); 70static int nullfs_start(struct mount *mp, int flags, struct thread *td); 71static int nullfs_statfs(struct mount *mp, struct statfs *sbp, 72 struct thread *td); 73static int nullfs_sync(struct mount *mp, int waitfor, 74 struct ucred *cred, struct thread *td); 75static int nullfs_unmount(struct mount *mp, int mntflags, struct thread *td); 76static int nullfs_vget(struct mount *mp, ino_t ino, int flags, 77 struct vnode **vpp); 78static int nullfs_vptofh(struct vnode *vp, struct fid *fhp); 79static int nullfs_extattrctl(struct mount *mp, int cmd, 80 struct vnode *filename_vp, 81 int namespace, const char *attrname, 82 struct thread *td); | 61static vfs_fhtovp_t nullfs_fhtovp; 62static vfs_checkexp_t nullfs_checkexp; 63static vfs_nmount_t nullfs_mount; 64static vfs_quotactl_t nullfs_quotactl; 65static vfs_root_t nullfs_root; 66static vfs_start_t nullfs_start; 67static vfs_sync_t nullfs_sync; 68static vfs_statfs_t nullfs_statfs; 69static vfs_unmount_t nullfs_unmount; 70static vfs_vget_t nullfs_vget; 71static vfs_vptofh_t nullfs_vptofh; 72static vfs_extattrctl_t nullfs_extattrctl; |
83 84/* 85 * Mount null layer 86 */ 87static int 88nullfs_mount(mp, ndp, td) 89 struct mount *mp; 90 struct nameidata *ndp; --- 316 unchanged lines hidden (view full) --- 407 struct thread *td; 408{ 409 return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp, 410 namespace, attrname, td); 411} 412 413 414static struct vfsops null_vfsops = { | 73 74/* 75 * Mount null layer 76 */ 77static int 78nullfs_mount(mp, ndp, td) 79 struct mount *mp; 80 struct nameidata *ndp; --- 316 unchanged lines hidden (view full) --- 397 struct thread *td; 398{ 399 return VFS_EXTATTRCTL(MOUNTTONULLMOUNT(mp)->nullm_vfs, cmd, filename_vp, 400 namespace, attrname, td); 401} 402 403 404static struct vfsops null_vfsops = { |
415 NULL, 416 nullfs_start, 417 nullfs_unmount, 418 nullfs_root, 419 nullfs_quotactl, 420 nullfs_statfs, 421 nullfs_sync, 422 nullfs_vget, 423 nullfs_fhtovp, 424 nullfs_checkexp, 425 nullfs_vptofh, 426 nullfs_init, 427 nullfs_uninit, 428 nullfs_extattrctl, 429 nullfs_mount, | 405 .vfs_checkexp = nullfs_checkexp, 406 .vfs_extattrctl = nullfs_extattrctl, 407 .vfs_fhtovp = nullfs_fhtovp, 408 .vfs_init = nullfs_init, 409 .vfs_nmount = nullfs_mount, 410 .vfs_quotactl = nullfs_quotactl, 411 .vfs_root = nullfs_root, 412 .vfs_start = nullfs_start, 413 .vfs_statfs = nullfs_statfs, 414 .vfs_sync = nullfs_sync, 415 .vfs_uninit = nullfs_uninit, 416 .vfs_unmount = nullfs_unmount, 417 .vfs_vget = nullfs_vget, 418 .vfs_vptofh = nullfs_vptofh, |
430}; 431 432VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK); | 419}; 420 421VFS_SET(null_vfsops, nullfs, VFCF_LOOPBACK); |