1df8bae1dSRodney W. Grimes /*- 2df8bae1dSRodney W. Grimes * Copyright (c) 1991, 1993, 1994 3df8bae1dSRodney W. Grimes * The Regents of the University of California. All rights reserved. 4df8bae1dSRodney W. Grimes * 5df8bae1dSRodney W. Grimes * Redistribution and use in source and binary forms, with or without 6df8bae1dSRodney W. Grimes * modification, are permitted provided that the following conditions 7df8bae1dSRodney W. Grimes * are met: 8df8bae1dSRodney W. Grimes * 1. Redistributions of source code must retain the above copyright 9df8bae1dSRodney W. Grimes * notice, this list of conditions and the following disclaimer. 10df8bae1dSRodney W. Grimes * 2. Redistributions in binary form must reproduce the above copyright 11df8bae1dSRodney W. Grimes * notice, this list of conditions and the following disclaimer in the 12df8bae1dSRodney W. Grimes * documentation and/or other materials provided with the distribution. 13df8bae1dSRodney W. Grimes * 3. All advertising materials mentioning features or use of this software 14df8bae1dSRodney W. Grimes * must display the following acknowledgement: 15df8bae1dSRodney W. Grimes * This product includes software developed by the University of 16df8bae1dSRodney W. Grimes * California, Berkeley and its contributors. 17df8bae1dSRodney W. Grimes * 4. Neither the name of the University nor the names of its contributors 18df8bae1dSRodney W. Grimes * may be used to endorse or promote products derived from this software 19df8bae1dSRodney W. Grimes * without specific prior written permission. 20df8bae1dSRodney W. Grimes * 21df8bae1dSRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22df8bae1dSRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23df8bae1dSRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24df8bae1dSRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 25df8bae1dSRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26df8bae1dSRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27df8bae1dSRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28df8bae1dSRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29df8bae1dSRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30df8bae1dSRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31df8bae1dSRodney W. Grimes * SUCH DAMAGE. 32df8bae1dSRodney W. Grimes * 33996c772fSJohn Dyson * @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95 349cf2c3e7SBruce Evans * $Id: ffs_extern.h,v 1.21 1997/11/22 08:35:45 bde Exp $ 35df8bae1dSRodney W. Grimes */ 36df8bae1dSRodney W. Grimes 372043dc9aSBruce Evans #ifndef _UFS_FFS_EXTERN_H 382043dc9aSBruce Evans #define _UFS_FFS_EXTERN_H 392043dc9aSBruce Evans 40996c772fSJohn Dyson /* 41996c772fSJohn Dyson * Sysctl values for the fast filesystem. 42996c772fSJohn Dyson */ 43996c772fSJohn Dyson #define FFS_REALLOCBLKS 3 /* block reallocation enabled */ 44996c772fSJohn Dyson #define FFS_ASYNCFREE 4 /* asynchronous block freeing enabled */ 45996c772fSJohn Dyson #define FFS_MAXID 5 /* number of valid ffs ids */ 46996c772fSJohn Dyson 47996c772fSJohn Dyson #define FFS_NAMES { \ 48996c772fSJohn Dyson { 0, 0 }, \ 4981bca6ddSKATO Takenori { 0, 0 }, \ 5081bca6ddSKATO Takenori { 0, 0 }, \ 51996c772fSJohn Dyson { "doreallocblks", CTLTYPE_INT }, \ 52996c772fSJohn Dyson { "doasyncfree", CTLTYPE_INT }, \ 53996c772fSJohn Dyson } 54996c772fSJohn Dyson 55996c772fSJohn Dyson struct buf; 56df8bae1dSRodney W. Grimes struct fid; 57df8bae1dSRodney W. Grimes struct fs; 58df8bae1dSRodney W. Grimes struct inode; 599cf2c3e7SBruce Evans struct malloc_type; 602043dc9aSBruce Evans struct mount; 619cf2c3e7SBruce Evans struct proc; 6257bf258eSGarrett Wollman struct sockaddr; 632043dc9aSBruce Evans struct statfs; 649cf2c3e7SBruce Evans struct ucred; 652043dc9aSBruce Evans struct vnode; 669cf2c3e7SBruce Evans struct vop_bmap_args; 679cf2c3e7SBruce Evans struct vop_reallocblks_args; 68df8bae1dSRodney W. Grimes 69df8bae1dSRodney W. Grimes int ffs_alloc __P((struct inode *, 70996c772fSJohn Dyson ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *)); 71df8bae1dSRodney W. Grimes int ffs_balloc __P((struct inode *, 72996c772fSJohn Dyson ufs_daddr_t, int, struct ucred *, struct buf **, int)); 73cec0f20cSPoul-Henning Kamp int ffs_blkatoff __P((struct vnode *, off_t, char **, struct buf **)); 74996c772fSJohn Dyson void ffs_blkfree __P((struct inode *, ufs_daddr_t, long)); 75996c772fSJohn Dyson ufs_daddr_t ffs_blkpref __P((struct inode *, ufs_daddr_t, int, ufs_daddr_t *)); 76df8bae1dSRodney W. Grimes int ffs_bmap __P((struct vop_bmap_args *)); 77996c772fSJohn Dyson void ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t)); 7857bf258eSGarrett Wollman int ffs_fhtovp __P((struct mount *, struct fid *, struct sockaddr *, 79df8bae1dSRodney W. Grimes struct vnode **, int *, struct ucred **)); 80724ab195SMike Pritchard int ffs_flushfiles __P((struct mount *, int, struct proc *)); 81996c772fSJohn Dyson void ffs_fragacct __P((struct fs *, int, int32_t [], int)); 82996c772fSJohn Dyson int ffs_isblock __P((struct fs *, u_char *, ufs_daddr_t)); 830be6b890SPoul-Henning Kamp int ffs_mountfs __P((struct vnode *, struct mount *, struct proc *, 840be6b890SPoul-Henning Kamp struct malloc_type *)); 85df8bae1dSRodney W. Grimes int ffs_mountroot __P((void)); 86df8bae1dSRodney W. Grimes int ffs_reallocblks __P((struct vop_reallocblks_args *)); 87df8bae1dSRodney W. Grimes int ffs_realloccg __P((struct inode *, 88996c772fSJohn Dyson ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **)); 89996c772fSJohn Dyson void ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t)); 90df8bae1dSRodney W. Grimes int ffs_statfs __P((struct mount *, struct statfs *, struct proc *)); 91df8bae1dSRodney W. Grimes int ffs_sync __P((struct mount *, int, struct ucred *, struct proc *)); 92cec0f20cSPoul-Henning Kamp int ffs_truncate __P((struct vnode *, off_t, int, struct ucred *, struct proc *)); 93df8bae1dSRodney W. Grimes int ffs_unmount __P((struct mount *, int, struct proc *)); 94987f5696SPoul-Henning Kamp int ffs_update __P((struct vnode *, struct timeval *, struct timeval *, int)); 95cec0f20cSPoul-Henning Kamp int ffs_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); 96cec0f20cSPoul-Henning Kamp 97cec0f20cSPoul-Henning Kamp int ffs_vfree __P((struct vnode *, ino_t, int)); 98df8bae1dSRodney W. Grimes int ffs_vget __P((struct mount *, ino_t, struct vnode **)); 99df8bae1dSRodney W. Grimes int ffs_vptofh __P((struct vnode *, struct fid *)); 100df8bae1dSRodney W. Grimes 101f57e6547SBruce Evans extern vop_t **ffs_vnodeop_p; 102f57e6547SBruce Evans extern vop_t **ffs_specop_p; 103f57e6547SBruce Evans extern vop_t **ffs_fifoop_p; 1042043dc9aSBruce Evans 1052043dc9aSBruce Evans #endif /* !_UFS_FFS_EXTERN_H */ 106