ext2fs_extern.h revision 1.19 1 1.19 agc /* $NetBSD: ext2fs_extern.h,v 1.19 2003/08/07 16:34:25 agc Exp $ */
2 1.1 bouyer
3 1.1 bouyer /*-
4 1.1 bouyer * Copyright (c) 1991, 1993, 1994
5 1.1 bouyer * The Regents of the University of California. All rights reserved.
6 1.19 agc *
7 1.19 agc * Redistribution and use in source and binary forms, with or without
8 1.19 agc * modification, are permitted provided that the following conditions
9 1.19 agc * are met:
10 1.19 agc * 1. Redistributions of source code must retain the above copyright
11 1.19 agc * notice, this list of conditions and the following disclaimer.
12 1.19 agc * 2. Redistributions in binary form must reproduce the above copyright
13 1.19 agc * notice, this list of conditions and the following disclaimer in the
14 1.19 agc * documentation and/or other materials provided with the distribution.
15 1.19 agc * 3. Neither the name of the University nor the names of its contributors
16 1.19 agc * may be used to endorse or promote products derived from this software
17 1.19 agc * without specific prior written permission.
18 1.19 agc *
19 1.19 agc * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.19 agc * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.19 agc * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.19 agc * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.19 agc * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.19 agc * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.19 agc * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.19 agc * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.19 agc * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.19 agc * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.19 agc * SUCH DAMAGE.
30 1.19 agc *
31 1.19 agc * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
32 1.19 agc * Modified for ext2fs by Manuel Bouyer.
33 1.19 agc */
34 1.19 agc
35 1.19 agc /*-
36 1.19 agc * Copyright (c) 1997 Manuel Bouyer.
37 1.1 bouyer *
38 1.1 bouyer * Redistribution and use in source and binary forms, with or without
39 1.1 bouyer * modification, are permitted provided that the following conditions
40 1.1 bouyer * are met:
41 1.1 bouyer * 1. Redistributions of source code must retain the above copyright
42 1.1 bouyer * notice, this list of conditions and the following disclaimer.
43 1.1 bouyer * 2. Redistributions in binary form must reproduce the above copyright
44 1.1 bouyer * notice, this list of conditions and the following disclaimer in the
45 1.1 bouyer * documentation and/or other materials provided with the distribution.
46 1.1 bouyer * 3. All advertising materials mentioning features or use of this software
47 1.1 bouyer * must display the following acknowledgement:
48 1.1 bouyer * This product includes software developed by the University of
49 1.1 bouyer * California, Berkeley and its contributors.
50 1.1 bouyer * 4. Neither the name of the University nor the names of its contributors
51 1.1 bouyer * may be used to endorse or promote products derived from this software
52 1.1 bouyer * without specific prior written permission.
53 1.1 bouyer *
54 1.1 bouyer * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
55 1.1 bouyer * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56 1.1 bouyer * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
57 1.1 bouyer * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
58 1.1 bouyer * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59 1.1 bouyer * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
60 1.1 bouyer * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 1.1 bouyer * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 1.1 bouyer * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 1.1 bouyer * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 1.1 bouyer * SUCH DAMAGE.
65 1.1 bouyer *
66 1.1 bouyer * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
67 1.1 bouyer * Modified for ext2fs by Manuel Bouyer.
68 1.1 bouyer */
69 1.3 sommerfe
70 1.13 matt #ifndef _UFS_EXT2FS_EXT2FS_EXTERN_H_
71 1.13 matt #define _UFS_EXT2FS_EXT2FS_EXTERN_H_
72 1.13 matt
73 1.1 bouyer struct buf;
74 1.1 bouyer struct fid;
75 1.1 bouyer struct m_ext2fs;
76 1.1 bouyer struct inode;
77 1.1 bouyer struct mount;
78 1.1 bouyer struct nameidata;
79 1.18 fvdl struct proc;
80 1.1 bouyer struct statfs;
81 1.1 bouyer struct timeval;
82 1.1 bouyer struct ucred;
83 1.1 bouyer struct ufsmount;
84 1.1 bouyer struct uio;
85 1.1 bouyer struct vnode;
86 1.1 bouyer struct mbuf;
87 1.1 bouyer struct componentname;
88 1.6 thorpej
89 1.6 thorpej extern struct pool ext2fs_inode_pool; /* memory pool for inodes */
90 1.15 fvdl extern struct pool ext2fs_dinode_pool; /* memory pool for dinodes */
91 1.1 bouyer
92 1.1 bouyer __BEGIN_DECLS
93 1.1 bouyer
94 1.1 bouyer /* ext2fs_alloc.c */
95 1.14 fvdl int ext2fs_alloc __P((struct inode *, daddr_t, daddr_t , struct ucred *,
96 1.14 fvdl daddr_t *));
97 1.14 fvdl int ext2fs_realloccg __P((struct inode *, daddr_t, daddr_t, int, int ,
98 1.1 bouyer struct ucred *, struct buf **));
99 1.1 bouyer int ext2fs_reallocblks __P((void *));
100 1.1 bouyer int ext2fs_valloc __P((void *));
101 1.14 fvdl /* XXX ondisk32 */
102 1.14 fvdl daddr_t ext2fs_blkpref __P((struct inode *, daddr_t, int, int32_t *));
103 1.14 fvdl void ext2fs_blkfree __P((struct inode *, daddr_t));
104 1.1 bouyer int ext2fs_vfree __P((void *));
105 1.1 bouyer
106 1.1 bouyer /* ext2fs_balloc.c */
107 1.14 fvdl int ext2fs_balloc __P((struct inode *, daddr_t, int, struct ucred *,
108 1.1 bouyer struct buf **, int));
109 1.11 chs int ext2fs_gop_alloc __P((struct vnode *, off_t, off_t, int, struct ucred *));
110 1.1 bouyer
111 1.1 bouyer /* ext2fs_bmap.c */
112 1.1 bouyer int ext2fs_bmap __P((void *));
113 1.1 bouyer
114 1.1 bouyer /* ext2fs_inode.c */
115 1.1 bouyer int ext2fs_update __P((void *));
116 1.1 bouyer int ext2fs_truncate __P((void *));
117 1.1 bouyer int ext2fs_inactive __P((void *));
118 1.1 bouyer
119 1.1 bouyer /* ext2fs_lookup.c */
120 1.1 bouyer int ext2fs_readdir __P((void *));
121 1.1 bouyer int ext2fs_lookup __P((void *));
122 1.1 bouyer int ext2fs_direnter __P((struct inode *, struct vnode *,
123 1.11 chs struct componentname *));
124 1.1 bouyer int ext2fs_dirremove __P((struct vnode *, struct componentname *));
125 1.1 bouyer int ext2fs_dirrewrite __P((struct inode *, struct inode *,
126 1.11 chs struct componentname *));
127 1.1 bouyer int ext2fs_dirempty __P((struct inode *, ino_t, struct ucred *));
128 1.17 thorpej int ext2fs_checkpath __P((struct inode *, struct inode *, struct ucred *));
129 1.1 bouyer
130 1.1 bouyer /* ext2fs_subr.c */
131 1.1 bouyer int ext2fs_blkatoff __P((void *));
132 1.1 bouyer void ext2fs_fragacct __P((struct m_ext2fs *, int, int32_t[], int));
133 1.1 bouyer #ifdef DIAGNOSTIC
134 1.1 bouyer void ext2fs_checkoverlap __P((struct buf *, struct inode *));
135 1.1 bouyer #endif
136 1.1 bouyer
137 1.1 bouyer /* ext2fs_vfsops.c */
138 1.8 jdolecek void ext2fs_init __P((void));
139 1.10 chs void ext2fs_reinit __P((void));
140 1.8 jdolecek void ext2fs_done __P((void));
141 1.1 bouyer int ext2fs_mountroot __P((void));
142 1.1 bouyer int ext2fs_mount __P((struct mount *, const char *, void *, struct nameidata *,
143 1.18 fvdl struct proc *));
144 1.18 fvdl int ext2fs_reload __P((struct mount *, struct ucred *, struct proc *));
145 1.18 fvdl int ext2fs_mountfs __P((struct vnode *, struct mount *, struct proc *));
146 1.18 fvdl int ext2fs_unmount __P((struct mount *, int, struct proc *));
147 1.18 fvdl int ext2fs_flushfiles __P((struct mount *, int, struct proc *));
148 1.18 fvdl int ext2fs_statfs __P((struct mount *, struct statfs *, struct proc *));
149 1.18 fvdl int ext2fs_sync __P((struct mount *, int, struct ucred *, struct proc *));
150 1.17 thorpej int ext2fs_vget __P((struct mount *, ino_t, struct vnode **));
151 1.17 thorpej int ext2fs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
152 1.1 bouyer int ext2fs_vptofh __P((struct vnode *, struct fid *));
153 1.2 fvdl int ext2fs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
154 1.18 fvdl struct proc *));
155 1.1 bouyer int ext2fs_sbupdate __P((struct ufsmount *, int));
156 1.1 bouyer int ext2fs_cgupdate __P((struct ufsmount *, int));
157 1.1 bouyer
158 1.1 bouyer /* ext2fs_readwrite.c */
159 1.1 bouyer int ext2fs_read __P((void *));
160 1.1 bouyer int ext2fs_write __P((void *));
161 1.1 bouyer
162 1.1 bouyer /* ext2fs_vnops.c */
163 1.1 bouyer int ext2fs_create __P((void *));
164 1.1 bouyer int ext2fs_mknod __P((void *));
165 1.1 bouyer int ext2fs_open __P((void *));
166 1.1 bouyer int ext2fs_access __P((void *));
167 1.1 bouyer int ext2fs_getattr __P((void *));
168 1.1 bouyer int ext2fs_setattr __P((void *));
169 1.1 bouyer int ext2fs_remove __P((void *));
170 1.1 bouyer int ext2fs_link __P((void *));
171 1.1 bouyer int ext2fs_rename __P((void *));
172 1.1 bouyer int ext2fs_mkdir __P((void *));
173 1.1 bouyer int ext2fs_rmdir __P((void *));
174 1.1 bouyer int ext2fs_symlink __P((void *));
175 1.1 bouyer int ext2fs_readlink __P((void *));
176 1.1 bouyer int ext2fs_advlock __P((void *));
177 1.11 chs int ext2fs_vinit __P((struct mount *, int (**specops)(void *),
178 1.11 chs int (**fifoops)(void *), struct vnode **));
179 1.1 bouyer int ext2fs_makeinode __P((int, struct vnode *, struct vnode **,
180 1.11 chs struct componentname *cnp));
181 1.1 bouyer int ext2fs_reclaim __P((void *));
182 1.1 bouyer
183 1.1 bouyer #define ext2fs_fsync genfs_fsync
184 1.1 bouyer __END_DECLS
185 1.1 bouyer
186 1.1 bouyer #define IS_EXT2_VNODE(vp) (vp->v_tag == VT_EXT2FS)
187 1.1 bouyer
188 1.1 bouyer extern int (**ext2fs_vnodeop_p) __P((void *));
189 1.1 bouyer extern int (**ext2fs_specop_p) __P((void *));
190 1.1 bouyer extern int (**ext2fs_fifoop_p) __P((void *));
191 1.5 sommerfe
192 1.13 matt #endif /* !_UFS_EXT2FS_EXT2FS_EXTERN_H_ */
193