1 /* 2 * Copyright (c) 1992 The Regents of the University of California 3 * Copyright (c) 1990, 1992 Jan-Simon Pendry 4 * All rights reserved. 5 * 6 * This code is derived from software donated to Berkeley by 7 * Jan-Simon Pendry. 8 * 9 * %sccs.include.redist.c% 10 * 11 * @(#)lofs.h 1.1 (Berkeley) 6/3/92 12 * 13 * $Id: lofs.h,v 1.8 1992/05/30 10:05:43 jsp Exp jsp $ 14 */ 15 16 struct null_args { 17 char *target; /* Target of loopback */ 18 }; 19 20 struct null_mount { 21 struct mount *nullm_vfs; 22 struct vnode *nullm_rootvp; /* Reference to root null_node */ 23 }; 24 25 #ifdef KERNEL 26 /* 27 * A cache of vnode references 28 */ 29 struct null_node { 30 struct null_node *null_forw; /* Hash chain */ 31 struct null_node *null_back; 32 struct vnode *null_lowervp; /* Aliased vnode - VREFed once */ 33 struct vnode *null_vnode; /* Back pointer to vnode/null_node */ 34 }; 35 36 extern int make_null_node __P((struct mount *mp, struct vnode **vpp)); 37 38 #define MOUNTTONULLMOUNT(mp) ((struct null_mount *)((mp)->mnt_data)) 39 #define VTONULL(vp) ((struct null_node *)(vp)->v_data) 40 #ifdef NULLFS_DIAGNOSTIC 41 extern struct vnode *null_checkvp __P((struct vnode *vp, char *fil, int lno)); 42 #define NULLTOLOWERVP(vp) null_checkvp(vp, __FILE__, __LINE__) 43 #else 44 #define NULLTOLOWERVP(vp) (VTONULLNODE(vp)->null_lowervp) 45 #endif 46 47 extern int (**null_vnodeop_p)(); 48 extern struct vfsops null_vfsops; 49 #endif /* KERNEL */ 50 51