1 /* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 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 8.2 (Berkeley) 01/04/94 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 #ifndef VT_LOFS 28 #define VT_LOFS VT_UFS 29 #endif 30 31 /* 32 * A cache of vnode references 33 */ 34 struct lofsnode { 35 struct lofsnode *a_forw; /* Hash chain */ 36 struct lofsnode *a_back; 37 struct vnode *a_lofsvp; /* Aliased vnode - VREFed once */ 38 struct vnode *a_vnode; /* Back pointer to vnode/lofsnode */ 39 }; 40 41 extern int make_lofs __P((struct mount *mp, struct vnode **vpp)); 42 43 #define VFSTOLOFS(mp) ((struct lofsmount *)((mp)->mnt_data)) 44 #define LOFSP(vp) ((struct lofsnode *)(vp)->v_data) 45 #ifdef LOFS_DIAGNOSTIC 46 extern struct vnode *lofs_checkvp __P((struct vnode *vp, char *fil, int lno)); 47 #define LOFSVP(vp) lofs_checkvp(vp, __FILE__, __LINE__) 48 #else 49 #define LOFSVP(vp) (LOFSP(vp)->a_lofsvp) 50 #endif 51 52 extern int (**lofs_vnodeop_p)(); 53 extern struct vfsops lofs_vfsops; 54 #endif /* KERNEL */ 55