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 34c3aac50fSPeter Wemm * $FreeBSD$ 35df8bae1dSRodney W. Grimes */ 36df8bae1dSRodney W. Grimes 372043dc9aSBruce Evans #ifndef _UFS_FFS_EXTERN_H 382043dc9aSBruce Evans #define _UFS_FFS_EXTERN_H 392043dc9aSBruce Evans 40996c772fSJohn Dyson struct buf; 4155d13231SJohn Baldwin struct cg; 42df8bae1dSRodney W. Grimes struct fid; 43df8bae1dSRodney W. Grimes struct fs; 44df8bae1dSRodney W. Grimes struct inode; 459cf2c3e7SBruce Evans struct malloc_type; 462043dc9aSBruce Evans struct mount; 47b40ce416SJulian Elischer struct thread; 4857bf258eSGarrett Wollman struct sockaddr; 492043dc9aSBruce Evans struct statfs; 509cf2c3e7SBruce Evans struct ucred; 512043dc9aSBruce Evans struct vnode; 523d2d6cc3SBruce Evans struct vop_balloc_args; 533d2d6cc3SBruce Evans struct vop_fsync_args; 549cf2c3e7SBruce Evans struct vop_reallocblks_args; 55f2a2857bSKirk McKusick struct vop_copyonwrite_args; 56df8bae1dSRodney W. Grimes 57df8bae1dSRodney W. Grimes int ffs_alloc __P((struct inode *, 58996c772fSJohn Dyson ufs_daddr_t, ufs_daddr_t, int, struct ucred *, ufs_daddr_t *)); 59855aa097SPoul-Henning Kamp int ffs_balloc __P((struct vnode *a_vp, off_t a_startoffset, int a_size, 60855aa097SPoul-Henning Kamp struct ucred *a_cred, int a_flags, struct buf **a_bpp)); 61cec0f20cSPoul-Henning Kamp int ffs_blkatoff __P((struct vnode *, off_t, char **, struct buf **)); 62996c772fSJohn Dyson void ffs_blkfree __P((struct inode *, ufs_daddr_t, long)); 63996c772fSJohn Dyson ufs_daddr_t ffs_blkpref __P((struct inode *, ufs_daddr_t, int, ufs_daddr_t *)); 64996c772fSJohn Dyson void ffs_clrblock __P((struct fs *, u_char *, ufs_daddr_t)); 6523371b2fSKirk McKusick void ffs_clusteracct __P((struct fs *, struct cg *, ufs_daddr_t, int)); 66c24fda81SAlfred Perlstein int ffs_fhtovp __P((struct mount *, struct fid *, struct vnode **)); 67b40ce416SJulian Elischer int ffs_flushfiles __P((struct mount *, int, struct thread *)); 68996c772fSJohn Dyson void ffs_fragacct __P((struct fs *, int, int32_t [], int)); 69812b1d41SKirk McKusick int ffs_freefile __P((struct inode *, ino_t, int )); 70996c772fSJohn Dyson int ffs_isblock __P((struct fs *, u_char *, ufs_daddr_t)); 71b1897c19SJulian Elischer int ffs_isfreeblock __P((struct fs *, unsigned char *, ufs_daddr_t)); 72b40ce416SJulian Elischer int ffs_mountfs __P((struct vnode *, struct mount *, struct thread *, 730be6b890SPoul-Henning Kamp struct malloc_type *)); 74df8bae1dSRodney W. Grimes int ffs_mountroot __P((void)); 750b0c10b4SAdrian Chadd int ffs_mount __P((struct mount *, char *, caddr_t, struct nameidata *, 76b40ce416SJulian Elischer struct thread *)); 77df8bae1dSRodney W. Grimes int ffs_reallocblks __P((struct vop_reallocblks_args *)); 78df8bae1dSRodney W. Grimes int ffs_realloccg __P((struct inode *, 79996c772fSJohn Dyson ufs_daddr_t, ufs_daddr_t, int, int, struct ucred *, struct buf **)); 80996c772fSJohn Dyson void ffs_setblock __P((struct fs *, u_char *, ufs_daddr_t)); 81f2a2857bSKirk McKusick int ffs_snapblkfree __P((struct inode *freeip, ufs_daddr_t bno, long size)); 8248d61748SKirk McKusick void ffs_snapremove __P((struct vnode *vp)); 83f2a2857bSKirk McKusick int ffs_snapshot __P((struct mount *mp, char *snapfile)); 84f2a2857bSKirk McKusick void ffs_snapshot_mount __P((struct mount *mp)); 85f2a2857bSKirk McKusick void ffs_snapshot_unmount __P((struct mount *mp)); 86b40ce416SJulian Elischer int ffs_statfs __P((struct mount *, struct statfs *, struct thread *)); 87b40ce416SJulian Elischer int ffs_sync __P((struct mount *, int, struct ucred *, struct thread *)); 88b40ce416SJulian Elischer int ffs_truncate __P((struct vnode *, off_t, int, struct ucred *, struct thread *)); 89b40ce416SJulian Elischer int ffs_unmount __P((struct mount *, int, struct thread *)); 90de5d1ba5SBruce Evans int ffs_update __P((struct vnode *, int)); 91cec0f20cSPoul-Henning Kamp int ffs_valloc __P((struct vnode *, int, struct ucred *, struct vnode **)); 92cec0f20cSPoul-Henning Kamp 93cec0f20cSPoul-Henning Kamp int ffs_vfree __P((struct vnode *, ino_t, int)); 94df8bae1dSRodney W. Grimes int ffs_vget __P((struct mount *, ino_t, struct vnode **)); 95df8bae1dSRodney W. Grimes int ffs_vptofh __P((struct vnode *, struct fid *)); 96df8bae1dSRodney W. Grimes 97f57e6547SBruce Evans extern vop_t **ffs_vnodeop_p; 98f57e6547SBruce Evans extern vop_t **ffs_specop_p; 99f57e6547SBruce Evans extern vop_t **ffs_fifoop_p; 1002043dc9aSBruce Evans 101b1897c19SJulian Elischer /* 102b1897c19SJulian Elischer * Soft update function prototypes. 103b1897c19SJulian Elischer */ 104b1897c19SJulian Elischer void softdep_initialize __P((void)); 105b1897c19SJulian Elischer int softdep_mount __P((struct vnode *, struct mount *, struct fs *, 106b1897c19SJulian Elischer struct ucred *)); 107b40ce416SJulian Elischer int softdep_flushworklist __P((struct mount *, int *, struct thread *)); 108b40ce416SJulian Elischer int softdep_flushfiles __P((struct mount *, int, struct thread *)); 109b1897c19SJulian Elischer void softdep_update_inodeblock __P((struct inode *, struct buf *, int)); 110b1897c19SJulian Elischer void softdep_load_inodeblock __P((struct inode *)); 111b1897c19SJulian Elischer void softdep_freefile __P((struct vnode *, ino_t, int)); 112b1897c19SJulian Elischer void softdep_setup_freeblocks __P((struct inode *, off_t)); 113b1897c19SJulian Elischer void softdep_setup_inomapdep __P((struct buf *, struct inode *, ino_t)); 114b1897c19SJulian Elischer void softdep_setup_blkmapdep __P((struct buf *, struct fs *, ufs_daddr_t)); 115b1897c19SJulian Elischer void softdep_setup_allocdirect __P((struct inode *, ufs_lbn_t, ufs_daddr_t, 116b1897c19SJulian Elischer ufs_daddr_t, long, long, struct buf *)); 117b1897c19SJulian Elischer void softdep_setup_allocindir_meta __P((struct buf *, struct inode *, 118b1897c19SJulian Elischer struct buf *, int, ufs_daddr_t)); 119b1897c19SJulian Elischer void softdep_setup_allocindir_page __P((struct inode *, ufs_lbn_t, 120b1897c19SJulian Elischer struct buf *, int, ufs_daddr_t, ufs_daddr_t, struct buf *)); 121c2606ec5SKirk McKusick void softdep_fsync_mountdev __P((struct vnode *)); 122b1897c19SJulian Elischer int softdep_sync_metadata __P((struct vop_fsync_args *)); 123d4c18169SKirk McKusick /* XXX incorrectly moved to mount.h - should be indirect function */ 124d4c18169SKirk McKusick #if 0 12575236818SPoul-Henning Kamp int softdep_fsync __P((struct vnode *vp)); 126d4c18169SKirk McKusick #endif 127b1897c19SJulian Elischer 1282043dc9aSBruce Evans #endif /* !_UFS_FFS_EXTERN_H */ 129