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) 06/03/92 12 * 13 * $Id: lofs.h,v 1.8 1992/05/30 10:05:43 jsp Exp jsp $ 14 */ 15 16 struct lofs_args { 17 char *target; /* Target of loopback */ 18 }; 19 20 struct lofsmount { 21 struct mount *looped_vfs; 22 struct vnode *rootvp; /* Reference to root lofsnode */ 23 }; 24 25 #ifdef KERNEL 26 /* 27 * A cache of vnode references 28 */ 29 struct lofsnode { 30 struct lofsnode *a_forw; /* Hash chain */ 31 struct lofsnode *a_back; 32 struct vnode *a_lofsvp; /* Aliased vnode - VREFed once */ 33 struct vnode *a_vnode; /* Back pointer to vnode/lofsnode */ 34 }; 35 36 extern int make_lofs __P((struct mount *mp, struct vnode **vpp)); 37 38 #define VFSTOLOFS(mp) ((struct lofsmount *)((mp)->mnt_data)) 39 #define LOFSP(vp) ((struct lofsnode *)(vp)->v_data) 40 #ifdef LOFS_DIAGNOSTIC 41 extern struct vnode *lofs_checkvp __P((struct vnode *vp, char *fil, int lno)); 42 #define LOFSVP(vp) lofs_checkvp(vp, __FILE__, __LINE__) 43 #else 44 #define LOFSVP(vp) (LOFSP(vp)->a_lofsvp) 45 #endif 46 47 extern int (**lofs_vnodeop_p)(); 48 extern struct vfsops lofs_vfsops; 49 #endif /* KERNEL */ 50