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.4 (Berkeley) 01/05/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 * 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 lofs_init __P((void)); 37 extern int make_lofs __P((struct mount *mp, struct vnode **vpp)); 38 39 #define VFSTOLOFS(mp) ((struct lofsmount *)((mp)->mnt_data)) 40 #define LOFSP(vp) ((struct lofsnode *)(vp)->v_data) 41 #define LOFSVP(vp) (LOFSP(vp)->a_lofsvp) 42 43 extern int (**lofs_vnodeop_p)(); 44 extern struct vfsops lofs_vfsops; 45 #endif /* KERNEL */ 46