lfs_extern.h revision 1.7 1 /* $NetBSD: lfs_extern.h,v 1.7 1998/03/01 02:23:24 fvdl Exp $ */
2
3 /*-
4 * Copyright (c) 1991, 1993, 1994
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 * must display the following acknowledgement:
17 * This product includes software developed by the University of
18 * California, Berkeley and its contributors.
19 * 4. Neither the name of the University nor the names of its contributors
20 * may be used to endorse or promote products derived from this software
21 * without specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * @(#)lfs_extern.h 8.6 (Berkeley) 5/8/95
36 */
37
38 struct fid;
39 struct mount;
40 struct nameidata;
41 struct proc;
42 struct statfs;
43 struct timeval;
44 struct inode;
45 struct uio;
46 struct mbuf;
47 struct dinode;
48 struct buf;
49 struct vnode;
50 struct lfs;
51 struct segment;
52 struct ucred;
53
54 __BEGIN_DECLS
55 /* lfs_alloc.c */
56 int lfs_vcreate __P((struct mount *, ino_t, struct vnode **));
57
58
59 /* lfs_balloc.c */
60 int lfs_balloc __P((struct vnode *, int, u_long, ufs_daddr_t, struct buf **));
61
62 /* lfs_bio.c */
63 void lfs_flush __P((void));
64 int lfs_check __P((struct vnode *, ufs_daddr_t));
65
66 /* lfs_cksum.c */
67 u_long cksum __P((void *, size_t));
68
69 /* lfs_debug.c */
70 #ifdef DEBUG
71 void lfs_dump_super __P((struct lfs *));
72 void lfs_dump_dinode __P((struct dinode *));
73 #endif
74
75 /* lfs_inode.c */
76 void lfs_init __P((void));
77 struct dinode *lfs_ifind __P((struct lfs *, ino_t, struct dinode *));
78
79 /* lfs_segment.c */
80 int lfs_vflush __P((struct vnode *));
81 void lfs_writevnodes __P((struct lfs *, struct mount *, struct segment *, int));
82 int lfs_segwrite __P((struct mount *, int));
83 void lfs_writefile __P((struct lfs *, struct segment *, struct vnode *));
84 int lfs_writeinode __P((struct lfs *, struct segment *, struct inode *));
85 int lfs_gatherblock __P((struct segment *, struct buf *, int *));
86 void lfs_gather __P((struct lfs *, struct segment *, struct vnode *, int (*match )__P ((struct lfs *, struct buf *))));
87 void lfs_updatemeta __P((struct segment *));
88 int lfs_initseg __P((struct lfs *));
89 void lfs_newseg __P((struct lfs *));
90 int lfs_writeseg __P((struct lfs *, struct segment *));
91 void lfs_writesuper __P((struct lfs *));
92 int lfs_match_data __P((struct lfs *, struct buf *));
93 int lfs_match_indir __P((struct lfs *, struct buf *));
94 int lfs_match_dindir __P((struct lfs *, struct buf *));
95 int lfs_match_tindir __P((struct lfs *, struct buf *));
96 struct buf *lfs_newbuf __P((struct vnode *, ufs_daddr_t, size_t));
97 void lfs_callback __P((struct buf *));
98 void lfs_supercallback __P((struct buf *));
99 void lfs_shellsort __P((struct buf **, ufs_daddr_t *, int));
100 int lfs_vref __P((struct vnode *));
101 void lfs_vunref __P((struct vnode *));
102
103 /* lfs_subr.c */
104 void lfs_seglock __P((struct lfs *, unsigned long));
105 void lfs_segunlock __P((struct lfs *));
106
107 /* lfs_syscalls.c */
108 int lfs_fastvget __P((struct mount *, ino_t, ufs_daddr_t, struct vnode **, struct dinode *));
109 struct buf *lfs_fakebuf __P((struct vnode *, int, size_t, caddr_t));
110
111 /* lfs_vfsops.c */
112 int lfs_mountroot __P((void));
113 int lfs_mount __P((struct mount *, const char *, void *, struct nameidata *, struct proc *));
114 int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
115 int lfs_unmount __P((struct mount *, int, struct proc *));
116 int lfs_statfs __P((struct mount *, struct statfs *, struct proc *));
117 int lfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
118 int lfs_vget __P((struct mount *, ino_t, struct vnode **));
119 int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *, struct vnode **, int *, struct ucred **));
120 int lfs_vptofh __P((struct vnode *, struct fid *));
121 int lfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
122 struct proc *));
123
124
125 int lfs_valloc __P((void *));
126 int lfs_vfree __P((void *));
127 int lfs_bwrite __P((void *));
128 int lfs_update __P((void *));
129 int lfs_truncate __P((void *));
130 int lfs_blkatoff __P((void *));
131 int lfs_fsync __P((void *));
132 int lfs_symlink __P((void *));
133 int lfs_mknod __P((void *));
134 int lfs_create __P((void *));
135 int lfs_mkdir __P((void *));
136 int lfs_read __P((void *));
137 int lfs_remove __P((void *));
138 int lfs_rmdir __P((void *));
139 int lfs_link __P((void *));
140 int lfs_rename __P((void *));
141 int lfs_getattr __P((void *));
142 int lfs_close __P((void *));
143 int lfs_inactive __P((void *));
144 int lfs_reclaim __P((void *));
145 int lfs_write __P((void *));
146
147 __END_DECLS
148 extern int lfs_mount_type;
149 extern int (**lfs_vnodeop_p) __P((void *));
150 extern int (**lfs_specop_p) __P((void *));
151 #ifdef FIFO
152 extern int (**lfs_fifoop_p) __P((void *));
153 #define LFS_FIFOOPS lfs_fifoop_p
154 #else
155 #define LFS_FIFOOPS NULL
156 #endif
157