Removed all patch kit headers, sccsid and rcsid strings, put $Id$ in, some
[unix-history] / sys / ufs / mfsnode.h
CommitLineData
15637ed4
RG
1/*
2 * Copyright (c) 1989 The Regents of the University of California.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
1eb58e01
RG
33 * from: @(#)mfsnode.h 7.3 (Berkeley) 4/16/91
34 * $Id$
15637ed4
RG
35 */
36
37/*
38 * This structure defines the control data for the memory
39 * based file system.
40 */
41
42struct mfsnode {
43 struct vnode *mfs_vnode; /* vnode associated with this mfsnode */
44 caddr_t mfs_baseoff; /* base of file system in memory */
45 long mfs_size; /* size of memory file system */
46 pid_t mfs_pid; /* supporting process pid */
47 struct buf *mfs_buflist; /* list of I/O requests */
48 long mfs_spare[4];
49};
50
51/*
52 * Convert between mfsnode pointers and vnode pointers
53 */
54#define VTOMFS(vp) ((struct mfsnode *)(vp)->v_data)
55#define MFSTOV(mfsp) ((mfsp)->mfs_vnode)
56
57/*
58 * Prototypes for MFS operations on vnodes.
59 */
60int mfs_badop();
61#define mfs_lookup ((int (*) __P(( \
62 struct vnode *vp, \
63 struct nameidata *ndp, \
64 struct proc *p))) mfs_badop)
65#define mfs_create ((int (*) __P(( \
66 struct nameidata *ndp, \
67 struct vattr *vap, \
68 struct proc *p))) mfs_badop)
69#define mfs_mknod ((int (*) __P(( \
70 struct nameidata *ndp, \
71 struct vattr *vap, \
72 struct ucred *cred, \
73 struct proc *p))) mfs_badop)
74int mfs_open __P((
75 struct vnode *vp,
76 int mode,
77 struct ucred *cred,
78 struct proc *p));
79int mfs_close __P((
80 struct vnode *vp,
81 int fflag,
82 struct ucred *cred,
83 struct proc *p));
84#define mfs_access ((int (*) __P(( \
85 struct vnode *vp, \
86 int mode, \
87 struct ucred *cred, \
88 struct proc *p))) mfs_badop)
89#define mfs_getattr ((int (*) __P(( \
90 struct vnode *vp, \
91 struct vattr *vap, \
92 struct ucred *cred, \
93 struct proc *p))) mfs_badop)
94#define mfs_setattr ((int (*) __P(( \
95 struct vnode *vp, \
96 struct vattr *vap, \
97 struct ucred *cred, \
98 struct proc *p))) mfs_badop)
99#define mfs_read ((int (*) __P(( \
100 struct vnode *vp, \
101 struct uio *uio, \
102 int ioflag, \
103 struct ucred *cred))) mfs_badop)
104#define mfs_write ((int (*) __P(( \
105 struct vnode *vp, \
106 struct uio *uio, \
107 int ioflag, \
108 struct ucred *cred))) mfs_badop)
109int mfs_ioctl __P((
110 struct vnode *vp,
111 int command,
112 caddr_t data,
113 int fflag,
114 struct ucred *cred,
115 struct proc *p));
116#define mfs_select ((int (*) __P(( \
117 struct vnode *vp, \
118 int which, \
119 int fflags, \
120 struct ucred *cred, \
121 struct proc *p))) mfs_badop)
122#define mfs_mmap ((int (*) __P(( \
123 struct vnode *vp, \
124 int fflags, \
125 struct ucred *cred, \
126 struct proc *p))) mfs_badop)
127#define mfs_fsync ((int (*) __P(( \
128 struct vnode *vp, \
129 int fflags, \
130 struct ucred *cred, \
131 int waitfor, \
132 struct proc *p))) mfs_badop)
133#define mfs_seek ((int (*) __P(( \
134 struct vnode *vp, \
135 off_t oldoff, \
136 off_t newoff, \
137 struct ucred *cred))) mfs_badop)
138#define mfs_remove ((int (*) __P(( \
139 struct nameidata *ndp, \
140 struct proc *p))) mfs_badop)
141#define mfs_link ((int (*) __P(( \
142 struct vnode *vp, \
143 struct nameidata *ndp, \
144 struct proc *p))) mfs_badop)
145#define mfs_rename ((int (*) __P(( \
146 struct nameidata *fndp, \
147 struct nameidata *tdnp, \
148 struct proc *p))) mfs_badop)
149#define mfs_mkdir ((int (*) __P(( \
150 struct nameidata *ndp, \
151 struct vattr *vap, \
152 struct proc *p))) mfs_badop)
153#define mfs_rmdir ((int (*) __P(( \
154 struct nameidata *ndp, \
155 struct proc *p))) mfs_badop)
156#define mfs_symlink ((int (*) __P(( \
157 struct nameidata *ndp, \
158 struct vattr *vap, \
159 char *target, \
160 struct proc *p))) mfs_badop)
161#define mfs_readdir ((int (*) __P(( \
162 struct vnode *vp, \
163 struct uio *uio, \
164 struct ucred *cred, \
165 int *eofflagp))) mfs_badop)
166#define mfs_readlink ((int (*) __P(( \
167 struct vnode *vp, \
168 struct uio *uio, \
169 struct ucred *cred))) mfs_badop)
170#define mfs_abortop ((int (*) __P(( \
171 struct nameidata *ndp))) mfs_badop)
172int mfs_inactive __P((
173 struct vnode *vp,
174 struct proc *p));
175#define mfs_reclaim ((int (*) __P(( \
176 struct vnode *vp))) nullop)
177#define mfs_lock ((int (*) __P(( \
178 struct vnode *vp))) nullop)
179#define mfs_unlock ((int (*) __P(( \
180 struct vnode *vp))) nullop)
181int mfs_bmap __P((
182 struct vnode *vp,
183 daddr_t bn,
184 struct vnode **vpp,
185 daddr_t *bnp));
186int mfs_strategy __P((
187 struct buf *bp));
188int mfs_print __P((
189 struct vnode *vp));
190#define mfs_islocked ((int (*) __P(( \
191 struct vnode *vp))) nullop)
192#define mfs_advlock ((int (*) __P(( \
193 struct vnode *vp, \
194 caddr_t id, \
195 int op, \
196 struct flock *fl, \
197 int flags))) mfs_badop)