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