xref: /original-bsd/sys/ufs/ffs/ffs_extern.h (revision 27393bdf)
1 /*-
2  * Copyright (c) 1991, 1993, 1994
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ffs_extern.h	8.6 (Berkeley) 03/30/95
8  */
9 
10 /*
11  * Sysctl values for the fast filesystem.
12  */
13 #define FFS_CLUSTERREAD		1	/* cluster reading enabled */
14 #define FFS_CLUSTERWRITE	2	/* cluster writing enabled */
15 #define FFS_REALLOCBLKS		3	/* block reallocation enabled */
16 #define FFS_ASYNCFREE		4	/* asynchronous block freeing enabled */
17 #define	FFS_MAXID		5	/* number of valid ffs ids */
18 
19 #define FFS_NAMES { \
20 	{ 0, 0 }, \
21 	{ "doclusterread", CTLTYPE_INT }, \
22 	{ "doclusterwrite", CTLTYPE_INT }, \
23 	{ "doreallocblks", CTLTYPE_INT }, \
24 	{ "doasyncfree", CTLTYPE_INT }, \
25 }
26 
27 struct buf;
28 struct fid;
29 struct fs;
30 struct inode;
31 struct mount;
32 struct nameidata;
33 struct proc;
34 struct statfs;
35 struct timeval;
36 struct ucred;
37 struct uio;
38 struct vnode;
39 struct mbuf;
40 struct vfsconf;
41 
42 __BEGIN_DECLS
43 int	ffs_alloc __P((struct inode *,
44 	    ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *));
45 int	ffs_balloc __P((struct inode *,
46 	    ufs_daddr_t, int, struct ucred *, struct buf **, int));
47 int	ffs_blkatoff __P((struct vop_blkatoff_args *));
48 int	ffs_blkfree __P((struct inode *, ufs_daddr_t, long));
49 ufs_daddr_t ffs_blkpref __P((struct inode *, ufs_daddr_t, int, ufs_daddr_t *));
50 int	ffs_bmap __P((struct vop_bmap_args *));
51 void	ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t));
52 int	ffs_fhtovp __P((struct mount *, struct fid *, struct mbuf *,
53 	    struct vnode **, int *, struct ucred **));
54 void	ffs_fragacct __P((struct fs *, int, int32_t [], int));
55 int	ffs_fsync __P((struct vop_fsync_args *));
56 int	ffs_init __P((struct vfsconf *));
57 int	ffs_isblock __P((struct fs *, u_char *, ufs_daddr_t));
58 int	ffs_mount __P((struct mount *,
59 	    char *, caddr_t, struct nameidata *, struct proc *));
60 int	ffs_mountfs __P((struct vnode *, struct mount *, struct proc *));
61 int	ffs_mountroot __P((void));
62 int	ffs_read __P((struct vop_read_args *));
63 int	ffs_reallocblks __P((struct vop_reallocblks_args *));
64 int	ffs_realloccg __P((struct inode *,
65 	    ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **));
66 int	ffs_reclaim __P((struct vop_reclaim_args *));
67 void	ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t));
68 int	ffs_statfs __P((struct mount *, struct statfs *, struct proc *));
69 int	ffs_sync __P((struct mount *, int, struct ucred *, struct proc *));
70 int	ffs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
71 	    struct proc *));
72 int	ffs_truncate __P((struct vop_truncate_args *));
73 int	ffs_unmount __P((struct mount *, int, struct proc *));
74 int	ffs_update __P((struct vop_update_args *));
75 int	ffs_valloc __P((struct vop_valloc_args *));
76 int	ffs_vfree __P((struct vop_vfree_args *));
77 int	ffs_vget __P((struct mount *, ino_t, struct vnode **));
78 int	ffs_vptofh __P((struct vnode *, struct fid *));
79 int	ffs_write __P((struct vop_write_args *));
80 
81 int	bwrite();		/* FFS needs a bwrite routine.  XXX */
82 
83 #ifdef DIAGNOSTIC
84 void	ffs_checkoverlap __P((struct buf *, struct inode *));
85 #endif
86 __END_DECLS
87 
88 extern int (**ffs_vnodeop_p)();
89 extern int (**ffs_specop_p)();
90 #ifdef FIFO
91 extern int (**ffs_fifoop_p)();
92 #define FFS_FIFOOPS ffs_fifoop_p
93 #else
94 #define FFS_FIFOOPS NULL
95 #endif
96