layer_extern.h revision 1.1.2.2 1 /* $NetBSD: layer_extern.h,v 1.1.2.2 1999/08/02 22:27:34 thorpej Exp $ */
2
3 /*
4 * Copyright (c) 1999 National Aeronautics & Space Administration
5 * All rights reserved.
6 *
7 * This software was written by William Studenmund of the
8 * Numerical Aerospace Similation Facility, NASA Ames Research Center.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the the name of the National Aeronautics & Space Administration
19 * nor the names of its contributors may be used to endorse or promote
20 * products derived from this software without specific prior written
21 * permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION
24 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB-
27 * UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
28 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 */
35 /*
36 * Copyright (c) 1992, 1993, 1995
37 * The Regents of the University of California. All rights reserved.
38 *
39 * This code is derived from software donated to Berkeley by
40 * Jan-Simon Pendry.
41 *
42 * Redistribution and use in source and binary forms, with or without
43 * modification, are permitted provided that the following conditions
44 * are met:
45 * 1. Redistributions of source code must retain the above copyright
46 * notice, this list of conditions and the following disclaimer.
47 * 2. Redistributions in binary form must reproduce the above copyright
48 * notice, this list of conditions and the following disclaimer in the
49 * documentation and/or other materials provided with the distribution.
50 * 3. All advertising materials mentioning features or use of this software
51 * must display the following acknowledgement:
52 * This product includes software developed by the University of
53 * California, Berkeley and its contributors.
54 * 4. Neither the name of the University nor the names of its contributors
55 * may be used to endorse or promote products derived from this software
56 * without specific prior written permission.
57 *
58 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
59 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
60 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
61 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
62 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
63 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
64 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
65 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
66 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68 * SUCH DAMAGE.
69 *
70 */
71
72 /*
73 * Routines defined by layerfs
74 */
75
76 /* misc routines in layer_subr.c */
77 void layerfs_init __P((void));
78 int layer_node_alloc __P((struct mount *, struct vnode *, struct vnode **));
79 int layer_node_create __P((struct mount *, struct vnode *, struct vnode **));
80 struct vnode *
81 layer_node_find __P((struct mount *, struct vnode *));
82 #define LOG2_SIZEVNODE 7 /* log2(sizeof struct vnode) */
83 #define LAYER_NHASH(lmp, vp) \
84 (&((lmp)->layerm_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & \
85 (lmp)->layerm_node_hash]))
86
87 /* vfs routines */
88 int layerfs_start __P((struct mount *, int, struct proc *));
89 int layerfs_root __P((struct mount *, struct vnode **));
90 int layerfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
91 struct proc *));
92 int layerfs_statfs __P((struct mount *, struct statfs *, struct proc *));
93 int layerfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
94 int layerfs_vget __P((struct mount *, ino_t, struct vnode **));
95 int layerfs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
96 int layerfs_checkexp __P((struct mount *, struct mbuf *, int *,
97 struct ucred **));
98 int layerfs_vptofh __P((struct vnode *, struct fid *));
99 int layerfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
100 struct proc *));
101
102 /* VOP routines */
103 int layer_bypass __P((void *));
104 int layer_getattr __P((void *));
105 int layer_inactive __P((void *));
106 int layer_reclaim __P((void *));
107 int layer_print __P((void *));
108 int layer_strategy __P((void *));
109 int layer_bwrite __P((void *));
110 int layer_bmap __P((void *));
111 int layer_lock __P((void *));
112 int layer_unlock __P((void *));
113 int layer_islocked __P((void *));
114 int layer_fsync __P((void *));
115 int layer_lookup __P((void *));
116 int layer_setattr __P((void *));
117 int layer_access __P((void *));
118 int layer_open __P((void *));
119