ffs_extern.h revision 33054
11541Srgrimes/*-
21541Srgrimes * Copyright (c) 1991, 1993, 1994
31541Srgrimes *	The Regents of the University of California.  All rights reserved.
41541Srgrimes *
51541Srgrimes * Redistribution and use in source and binary forms, with or without
61541Srgrimes * modification, are permitted provided that the following conditions
71541Srgrimes * are met:
81541Srgrimes * 1. Redistributions of source code must retain the above copyright
91541Srgrimes *    notice, this list of conditions and the following disclaimer.
101541Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
111541Srgrimes *    notice, this list of conditions and the following disclaimer in the
121541Srgrimes *    documentation and/or other materials provided with the distribution.
131541Srgrimes * 3. All advertising materials mentioning features or use of this software
141541Srgrimes *    must display the following acknowledgement:
151541Srgrimes *	This product includes software developed by the University of
161541Srgrimes *	California, Berkeley and its contributors.
171541Srgrimes * 4. Neither the name of the University nor the names of its contributors
181541Srgrimes *    may be used to endorse or promote products derived from this software
191541Srgrimes *    without specific prior written permission.
201541Srgrimes *
211541Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
221541Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
231541Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
241541Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
251541Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
261541Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
271541Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
281541Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
291541Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
301541Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
311541Srgrimes * SUCH DAMAGE.
321541Srgrimes *
3322521Sdyson *	@(#)ffs_extern.h	8.6 (Berkeley) 3/30/95
3433054Sbde * $Id: ffs_extern.h,v 1.21 1997/11/22 08:35:45 bde Exp $
351541Srgrimes */
361541Srgrimes
3715493Sbde#ifndef _UFS_FFS_EXTERN_H
3815493Sbde#define	_UFS_FFS_EXTERN_H
3915493Sbde
4022521Sdyson/*
4122521Sdyson * Sysctl values for the fast filesystem.
4222521Sdyson */
4322521Sdyson#define FFS_REALLOCBLKS		3	/* block reallocation enabled */
4422521Sdyson#define FFS_ASYNCFREE		4	/* asynchronous block freeing enabled */
4522521Sdyson#define	FFS_MAXID		5	/* number of valid ffs ids */
4622521Sdyson
4722521Sdyson#define FFS_NAMES { \
4822521Sdyson	{ 0, 0 }, \
4929888Skato	{ 0, 0 }, \
5029888Skato	{ 0, 0 }, \
5122521Sdyson	{ "doreallocblks", CTLTYPE_INT }, \
5222521Sdyson	{ "doasyncfree", CTLTYPE_INT }, \
5322521Sdyson}
5422521Sdyson
5522521Sdysonstruct buf;
561541Srgrimesstruct fid;
571541Srgrimesstruct fs;
581541Srgrimesstruct inode;
5933054Sbdestruct malloc_type;
601541Srgrimesstruct mount;
6133054Sbdestruct proc;
6228270Swollmanstruct sockaddr;
631541Srgrimesstruct statfs;
6433054Sbdestruct ucred;
651541Srgrimesstruct vnode;
6633054Sbdestruct vop_bmap_args;
6733054Sbdestruct vop_reallocblks_args;
681541Srgrimes
691541Srgrimesint	ffs_alloc __P((struct inode *,
7022521Sdyson	    ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *));
711541Srgrimesint	ffs_balloc __P((struct inode *,
7222521Sdyson	    ufs_daddr_t, int, struct ucred *, struct buf **, int));
7330474Sphkint	ffs_blkatoff __P((struct vnode *, off_t, char **, struct buf **));
7422521Sdysonvoid	ffs_blkfree __P((struct inode *, ufs_daddr_t, long));
7522521Sdysonufs_daddr_t ffs_blkpref __P((struct inode *, ufs_daddr_t, int, ufs_daddr_t *));
761541Srgrimesint	ffs_bmap __P((struct vop_bmap_args *));
7722521Sdysonvoid	ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t));
7828270Swollmanint	ffs_fhtovp __P((struct mount *, struct fid *, struct sockaddr *,
791541Srgrimes	    struct vnode **, int *, struct ucred **));
8022579Smppint	ffs_flushfiles __P((struct mount *, int, struct proc *));
8122521Sdysonvoid	ffs_fragacct __P((struct fs *, int, int32_t [], int));
8222521Sdysonint	ffs_isblock __P((struct fs *, u_char *, ufs_daddr_t));
8330283Sphkint	ffs_mountfs __P((struct vnode *, struct mount *, struct proc *,
8430283Sphk	     struct malloc_type *));
851541Srgrimesint	ffs_mountroot __P((void));
861541Srgrimesint	ffs_reallocblks __P((struct vop_reallocblks_args *));
871541Srgrimesint	ffs_realloccg __P((struct inode *,
8822521Sdyson	    ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **));
8922521Sdysonvoid	ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t));
901541Srgrimesint	ffs_statfs __P((struct mount *, struct statfs *, struct proc *));
911541Srgrimesint	ffs_sync __P((struct mount *, int, struct ucred *, struct proc *));
9230474Sphkint	ffs_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *));
931541Srgrimesint	ffs_unmount __P((struct mount *, int, struct proc *));
9430492Sphkint	ffs_update __P((struct vnode *, struct timeval *, struct timeval *, int));
9530474Sphkint	ffs_valloc __P((struct vnode *, int, struct ucred *, struct vnode **));
9630474Sphk
9730474Sphkint	ffs_vfree __P((struct vnode *, ino_t, int));
981541Srgrimesint	ffs_vget __P((struct mount *, ino_t, struct vnode **));
991541Srgrimesint	ffs_vptofh __P((struct vnode *, struct fid *));
1001541Srgrimes
10112158Sbdeextern vop_t **ffs_vnodeop_p;
10212158Sbdeextern vop_t **ffs_specop_p;
10312158Sbdeextern vop_t **ffs_fifoop_p;
10415493Sbde
10515493Sbde#endif /* !_UFS_FFS_EXTERN_H */
106