ffs_extern.h revision 1.2 1 /* $NetBSD: ffs_extern.h,v 1.2 1994/06/29 06:46:30 cgd 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 * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94
36 */
37
38 struct buf;
39 struct fid;
40 struct fs;
41 struct inode;
42 struct mount;
43 struct nameidata;
44 struct proc;
45 struct statfs;
46 struct timeval;
47 struct ucred;
48 struct uio;
49 struct vnode;
50 struct mbuf;
51
52 __BEGIN_DECLS
53 int ffs_alloc __P((struct inode *,
54 daddr_t, daddr_t, int, struct ucred *, daddr_t *));
55 int ffs_balloc __P((struct inode *,
56 daddr_t, int, struct ucred *, struct buf **, int));
57 int ffs_blkatoff __P((struct vop_blkatoff_args *));
58 int ffs_blkfree __P((struct inode *, daddr_t, long));
59 daddr_t ffs_blkpref __P((struct inode *, daddr_t, int, daddr_t *));
60 int ffs_bmap __P((struct vop_bmap_args *));
61 void ffs_clrblock __P((struct fs *, u_char *, daddr_t));
62 int ffs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
63 struct vnode **, int *, struct ucred **));
64 void ffs_fragacct __P((struct fs *, int, long [], int));
65 int ffs_fsync __P((struct vop_fsync_args *));
66 int ffs_init __P((void));
67 int ffs_isblock __P((struct fs *, u_char *, daddr_t));
68 int ffs_mount __P((struct mount *,
69 char *, caddr_t, struct nameidata *, struct proc *));
70 int ffs_mountfs __P((struct vnode *, struct mount *, struct proc *));
71 int ffs_mountroot __P((void));
72 int ffs_read __P((struct vop_read_args *));
73 int ffs_reallocblks __P((struct vop_reallocblks_args *));
74 int ffs_realloccg __P((struct inode *,
75 daddr_t, daddr_t, int, int, struct ucred *, struct buf **));
76 int ffs_reclaim __P((struct vop_reclaim_args *));
77 void ffs_setblock __P((struct fs *, u_char *, daddr_t));
78 int ffs_statfs __P((struct mount *, struct statfs *, struct proc *));
79 int ffs_sync __P((struct mount *, int, struct ucred *, struct proc *));
80 int ffs_truncate __P((struct vop_truncate_args *));
81 int ffs_unmount __P((struct mount *, int, struct proc *));
82 int ffs_update __P((struct vop_update_args *));
83 int ffs_valloc __P((struct vop_valloc_args *));
84 int ffs_vfree __P((struct vop_vfree_args *));
85 int ffs_vget __P((struct mount *, ino_t, struct vnode **));
86 int ffs_vptofh __P((struct vnode *, struct fid *));
87 int ffs_write __P((struct vop_write_args *));
88
89 int bwrite(); /* FFS needs a bwrite routine. XXX */
90
91 #ifdef DIAGNOSTIC
92 void ffs_checkoverlap __P((struct buf *, struct inode *));
93 #endif
94 __END_DECLS
95
96 extern int (**ffs_vnodeop_p)();
97 extern int (**ffs_specop_p)();
98 #ifdef FIFO
99 extern int (**ffs_fifoop_p)();
100 #define FFS_FIFOOPS ffs_fifoop_p
101 #else
102 #define FFS_FIFOOPS NULL
103 #endif
104