lfs_extern.h revision 1.4 1 /* $NetBSD: lfs_extern.h,v 1.4 1996/02/09 22:28:51 christos 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.3 (Berkeley) 6/16/94
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
53 __BEGIN_DECLS
54 /* lfs_alloc.c */
55 int lfs_vcreate __P((struct mount *, ino_t, struct vnode **));
56
57
58 /* lfs_balloc.c */
59 int lfs_balloc __P((struct vnode *, u_long, daddr_t, struct buf **));
60
61 /* lfs_bio.c */
62 void lfs_flush __P((void));
63 int lfs_check __P((struct vnode *, daddr_t));
64
65 /* lfs_cksum.c */
66 u_long cksum __P((void *, size_t));
67
68 /* lfs_debug.c */
69 #ifdef DEBUG
70 void lfs_dump_super __P((struct lfs *));
71 void lfs_dump_dinode __P((struct dinode *));
72 #endif
73
74 /* lfs_inode.c */
75 void lfs_init __P((void));
76 struct dinode *lfs_ifind __P((struct lfs *, ino_t, struct dinode *));
77
78 /* lfs_segment.c */
79 int lfs_vflush __P((struct vnode *));
80 void lfs_writevnodes __P((struct lfs *, struct mount *, struct segment *, int));
81 int lfs_segwrite __P((struct mount *, int));
82 void lfs_writefile __P((struct lfs *, struct segment *, struct vnode *));
83 int lfs_writeinode __P((struct lfs *, struct segment *, struct inode *));
84 int lfs_gatherblock __P((struct segment *, struct buf *, int *));
85 void lfs_gather __P((struct lfs *, struct segment *, struct vnode *, int (*match )__P ((struct lfs *, struct buf *))));
86 void lfs_updatemeta __P((struct segment *));
87 int lfs_initseg __P((struct lfs *));
88 void lfs_newseg __P((struct lfs *));
89 int lfs_writeseg __P((struct lfs *, struct segment *));
90 void lfs_writesuper __P((struct lfs *));
91 int lfs_match_data __P((struct lfs *, struct buf *));
92 int lfs_match_indir __P((struct lfs *, struct buf *));
93 int lfs_match_dindir __P((struct lfs *, struct buf *));
94 int lfs_match_tindir __P((struct lfs *, struct buf *));
95 struct buf *lfs_newbuf __P((struct vnode *, daddr_t, size_t));
96 void lfs_callback __P((struct buf *));
97 void lfs_supercallback __P((struct buf *));
98 void lfs_shellsort __P((struct buf **, daddr_t *, int));
99 int lfs_vref __P((struct vnode *));
100 void lfs_vunref __P((struct vnode *));
101
102 /* lfs_subr.c */
103 void lfs_seglock __P((struct lfs *, unsigned long));
104 void lfs_segunlock __P((struct lfs *));
105
106 /* lfs_syscalls.c */
107 int lfs_fastvget __P((struct mount *, ino_t, daddr_t, struct vnode **, struct dinode *));
108 struct buf *lfs_fakebuf __P((struct vnode *, int, size_t, caddr_t));
109
110 /* lfs_vfsops.c */
111 int lfs_mountroot __P((void));
112 int lfs_mount __P((struct mount *, char *, caddr_t, struct nameidata *, struct proc *));
113 int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
114 int lfs_unmount __P((struct mount *, int, struct proc *));
115 int lfs_statfs __P((struct mount *, struct statfs *, struct proc *));
116 int lfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
117 int lfs_vget __P((struct mount *, ino_t, struct vnode **));
118 int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *, struct vnode **, int *, struct ucred **));
119 int lfs_vptofh __P((struct vnode *, struct fid *));
120
121
122 int lfs_valloc __P((void *));
123 int lfs_vfree __P((void *));
124 int lfs_bwrite __P((void *));
125 int lfs_update __P((void *));
126 int lfs_truncate __P((void *));
127 int lfs_blkatoff __P((void *));
128 int lfs_fsync __P((void *));
129 int lfs_symlink __P((void *));
130 int lfs_mknod __P((void *));
131 int lfs_create __P((void *));
132 int lfs_mkdir __P((void *));
133 int lfs_read __P((void *));
134 int lfs_remove __P((void *));
135 int lfs_rmdir __P((void *));
136 int lfs_link __P((void *));
137 int lfs_rename __P((void *));
138 int lfs_getattr __P((void *));
139 int lfs_close __P((void *));
140 int lfs_inactive __P((void *));
141 int lfs_reclaim __P((void *));
142 int lfs_write __P((void *));
143
144 __END_DECLS
145 extern int (**lfs_vnodeop_p) __P((void *));
146 extern int (**lfs_specop_p) __P((void *));
147 #ifdef FIFO
148 extern int (**lfs_fifoop_p) __P((void *));
149 #define LFS_FIFOOPS lfs_fifoop_p
150 #else
151 #define LFS_FIFOOPS NULL
152 #endif
153