1 /* 2 * Copyright (c) 1992, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software donated to Berkeley by 6 * Jan-Simon Pendry. 7 * 8 * %sccs.include.redist.c% 9 * 10 * @(#)lofs.h 8.5 (Berkeley) 01/21/94 11 * 12 * $Id: lofs.h,v 1.8 1992/05/30 10:05:43 jsp Exp jsp $ 13 */ 14 15 struct lofs_args { 16 char *target; /* Target of loopback */ 17 }; 18 19 struct lofsmount { 20 struct mount *looped_vfs; 21 struct vnode *rootvp; /* Reference to root lofsnode */ 22 }; 23 24 #ifdef KERNEL 25 /* 26 * A cache of vnode references 27 */ 28 struct lofsnode { 29 struct lofsnode *a_forw; /* Hash chain */ 30 struct lofsnode *a_back; 31 struct vnode *a_lofsvp; /* Aliased vnode - VREFed once */ 32 struct vnode *a_vnode; /* Back pointer to vnode/lofsnode */ 33 }; 34 35 extern int lofs_init __P((void)); 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 #define LOFSVP(vp) (LOFSP(vp)->a_lofsvp) 41 42 extern int (**lofs_vnodeop_p)(); 43 extern struct vfsops lofs_vfsops; 44 #endif /* KERNEL */ 45