154750Sjohnh /* 254750Sjohnh * Copyright (c) 1992 The Regents of the University of California 354750Sjohnh * Copyright (c) 1990, 1992 Jan-Simon Pendry 454750Sjohnh * All rights reserved. 554750Sjohnh * 654750Sjohnh * This code is derived from software donated to Berkeley by 754750Sjohnh * Jan-Simon Pendry. 854750Sjohnh * 954750Sjohnh * %sccs.include.redist.c% 1054750Sjohnh * 1154750Sjohnh * @(#)lofs.h 1.1 (Berkeley) 6/3/92 1254750Sjohnh * 1354750Sjohnh * $Id: lofs.h,v 1.8 1992/05/30 10:05:43 jsp Exp jsp $ 1454750Sjohnh */ 1554750Sjohnh 16*54754Sjohnh struct null_args { 1754750Sjohnh char *target; /* Target of loopback */ 1854750Sjohnh }; 1954750Sjohnh 20*54754Sjohnh struct null_mount { 21*54754Sjohnh struct mount *nullm_vfs; 22*54754Sjohnh struct vnode *nullm_rootvp; /* Reference to root null_node */ 2354750Sjohnh }; 2454750Sjohnh 2554750Sjohnh #ifdef KERNEL 2654750Sjohnh /* 2754750Sjohnh * A cache of vnode references 2854750Sjohnh */ 29*54754Sjohnh struct null_node { 30*54754Sjohnh struct null_node *null_forw; /* Hash chain */ 31*54754Sjohnh struct null_node *null_back; 32*54754Sjohnh struct vnode *null_lowervp; /* Aliased vnode - VREFed once */ 33*54754Sjohnh struct vnode *null_vnode; /* Back pointer to vnode/null_node */ 3454750Sjohnh }; 3554750Sjohnh 36*54754Sjohnh extern int make_null_node __P((struct mount *mp, struct vnode **vpp)); 3754750Sjohnh 38*54754Sjohnh #define MOUNTTONULLMOUNT(mp) ((struct null_mount *)((mp)->mnt_data)) 39*54754Sjohnh #define VTONULLNODE(vp) ((struct null_node *)(vp)->v_data) 40*54754Sjohnh #ifdef NULLFS_DIAGNOSTIC 41*54754Sjohnh extern struct vnode *null_checkvp __P((struct vnode *vp, char *fil, int lno)); 42*54754Sjohnh #define NULLTOLOWERVP(vp) null_checkvp(vp, __FILE__, __LINE__) 4354750Sjohnh #else 44*54754Sjohnh #define NULLTOLOWERVP(vp) (VTONULLNODE(vp)->null_lowervp) 4554750Sjohnh #endif 4654750Sjohnh 47*54754Sjohnh extern int (**null_vnodeop_p)(); 48*54754Sjohnh extern struct vfsops null_vfsops; 4954750Sjohnh #endif /* KERNEL */ 50