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 * 4. Neither the name of the University nor the names of its contributors 14df8bae1dSRodney W. Grimes * may be used to endorse or promote products derived from this software 15df8bae1dSRodney W. Grimes * without specific prior written permission. 16df8bae1dSRodney W. Grimes * 17df8bae1dSRodney W. Grimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 18df8bae1dSRodney W. Grimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19df8bae1dSRodney W. Grimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20df8bae1dSRodney W. Grimes * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 21df8bae1dSRodney W. Grimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22df8bae1dSRodney W. Grimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23df8bae1dSRodney W. Grimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24df8bae1dSRodney W. Grimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25df8bae1dSRodney W. Grimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26df8bae1dSRodney W. Grimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27df8bae1dSRodney W. Grimes * SUCH DAMAGE. 28df8bae1dSRodney W. Grimes * 29996c772fSJohn Dyson * @(#)ffs_extern.h 8.6 (Berkeley) 3/30/95 30c3aac50fSPeter Wemm * $FreeBSD$ 31df8bae1dSRodney W. Grimes */ 32df8bae1dSRodney W. Grimes 332043dc9aSBruce Evans #ifndef _UFS_FFS_EXTERN_H 342043dc9aSBruce Evans #define _UFS_FFS_EXTERN_H 352043dc9aSBruce Evans 36996c772fSJohn Dyson struct buf; 3755d13231SJohn Baldwin struct cg; 38df8bae1dSRodney W. Grimes struct fid; 39df8bae1dSRodney W. Grimes struct fs; 40df8bae1dSRodney W. Grimes struct inode; 419cf2c3e7SBruce Evans struct malloc_type; 422043dc9aSBruce Evans struct mount; 43b40ce416SJulian Elischer struct thread; 4457bf258eSGarrett Wollman struct sockaddr; 452043dc9aSBruce Evans struct statfs; 469cf2c3e7SBruce Evans struct ucred; 472043dc9aSBruce Evans struct vnode; 483d2d6cc3SBruce Evans struct vop_fsync_args; 499cf2c3e7SBruce Evans struct vop_reallocblks_args; 50df8bae1dSRodney W. Grimes 516f1e8551SAlfred Perlstein int ffs_alloc(struct inode *, 521c85e6a3SKirk McKusick ufs2_daddr_t, ufs2_daddr_t, int, struct ucred *, ufs2_daddr_t *); 531c85e6a3SKirk McKusick int ffs_balloc_ufs1(struct vnode *a_vp, off_t a_startoffset, int a_size, 541c85e6a3SKirk McKusick struct ucred *a_cred, int a_flags, struct buf **a_bpp); 551c85e6a3SKirk McKusick int ffs_balloc_ufs2(struct vnode *a_vp, off_t a_startoffset, int a_size, 566f1e8551SAlfred Perlstein struct ucred *a_cred, int a_flags, struct buf **a_bpp); 576f1e8551SAlfred Perlstein int ffs_blkatoff(struct vnode *, off_t, char **, struct buf **); 58aaee3669SJeff Roberson void ffs_blkfree(struct ufsmount *, struct fs *, struct vnode *, 59aaee3669SJeff Roberson ufs2_daddr_t, long, ino_t); 601c85e6a3SKirk McKusick ufs2_daddr_t ffs_blkpref_ufs1(struct inode *, ufs_lbn_t, int, ufs1_daddr_t *); 611c85e6a3SKirk McKusick ufs2_daddr_t ffs_blkpref_ufs2(struct inode *, ufs_lbn_t, int, ufs2_daddr_t *); 6237e2ebfdSKirk McKusick int ffs_checkfreefile(struct fs *, struct vnode *, ino_t); 631c85e6a3SKirk McKusick void ffs_clrblock(struct fs *, u_char *, ufs1_daddr_t); 64fae974f1SPoul-Henning Kamp int ffs_copyonwrite(struct vnode *, struct buf *); 656f1e8551SAlfred Perlstein int ffs_flushfiles(struct mount *, int, struct thread *); 666f1e8551SAlfred Perlstein void ffs_fragacct(struct fs *, int, int32_t [], int); 67aaee3669SJeff Roberson int ffs_freefile(struct ufsmount *, struct fs *, struct vnode *, ino_t, 68aaee3669SJeff Roberson int); 691c85e6a3SKirk McKusick int ffs_isblock(struct fs *, u_char *, ufs1_daddr_t); 70de6ba7c0SPoul-Henning Kamp void ffs_load_inode(struct buf *, struct inode *, struct fs *, ino_t); 716f1e8551SAlfred Perlstein int ffs_mountroot(void); 726f1e8551SAlfred Perlstein int ffs_reallocblks(struct vop_reallocblks_args *); 737aca6291SKirk McKusick int ffs_realloccg(struct inode *, ufs2_daddr_t, ufs2_daddr_t, 747aca6291SKirk McKusick ufs2_daddr_t, int, int, struct ucred *, struct buf **); 751c85e6a3SKirk McKusick void ffs_setblock(struct fs *, u_char *, ufs1_daddr_t); 761c85e6a3SKirk McKusick int ffs_snapblkfree(struct fs *, struct vnode *, ufs2_daddr_t, long, ino_t); 776f1e8551SAlfred Perlstein void ffs_snapremove(struct vnode *vp); 786f1e8551SAlfred Perlstein int ffs_snapshot(struct mount *mp, char *snapfile); 796f1e8551SAlfred Perlstein void ffs_snapshot_mount(struct mount *mp); 806f1e8551SAlfred Perlstein void ffs_snapshot_unmount(struct mount *mp); 8140854ff5SPoul-Henning Kamp int ffs_syncvnode(struct vnode *vp, int waitfor); 826f1e8551SAlfred Perlstein int ffs_truncate(struct vnode *, off_t, int, struct ucred *, struct thread *); 836f1e8551SAlfred Perlstein int ffs_update(struct vnode *, int); 846f1e8551SAlfred Perlstein int ffs_valloc(struct vnode *, int, struct ucred *, struct vnode **); 85cec0f20cSPoul-Henning Kamp 866f1e8551SAlfred Perlstein int ffs_vfree(struct vnode *, ino_t, int); 879bf1a756SPoul-Henning Kamp vfs_vget_t ffs_vget; 88df8bae1dSRodney W. Grimes 8902f2c6a9SPoul-Henning Kamp extern struct vop_vector ffs_vnodeops1; 9002f2c6a9SPoul-Henning Kamp extern struct vop_vector ffs_fifoops1; 9102f2c6a9SPoul-Henning Kamp extern struct vop_vector ffs_vnodeops2; 9202f2c6a9SPoul-Henning Kamp extern struct vop_vector ffs_fifoops2; 932043dc9aSBruce Evans 94b1897c19SJulian Elischer /* 95b1897c19SJulian Elischer * Soft update function prototypes. 96b1897c19SJulian Elischer */ 97791dd2faSTor Egge 98791dd2faSTor Egge int softdep_check_suspend(struct mount *, struct vnode *, 99791dd2faSTor Egge int, int, int, int); 100791dd2faSTor Egge void softdep_get_depcounts(struct mount *, int *, int *); 1016f1e8551SAlfred Perlstein void softdep_initialize(void); 1025346934fSIan Dowse void softdep_uninitialize(void); 1036f1e8551SAlfred Perlstein int softdep_mount(struct vnode *, struct mount *, struct fs *, 1046f1e8551SAlfred Perlstein struct ucred *); 105dd19a799SPoul-Henning Kamp void softdep_move_dependencies(struct buf *, struct buf *); 1066f1e8551SAlfred Perlstein int softdep_flushworklist(struct mount *, int *, struct thread *); 1076f1e8551SAlfred Perlstein int softdep_flushfiles(struct mount *, int, struct thread *); 1086f1e8551SAlfred Perlstein void softdep_update_inodeblock(struct inode *, struct buf *, int); 1096f1e8551SAlfred Perlstein void softdep_load_inodeblock(struct inode *); 1106f1e8551SAlfred Perlstein void softdep_freefile(struct vnode *, ino_t, int); 1116f1e8551SAlfred Perlstein int softdep_request_cleanup(struct fs *, struct vnode *); 1127aca6291SKirk McKusick void softdep_setup_freeblocks(struct inode *, off_t, int); 1136f1e8551SAlfred Perlstein void softdep_setup_inomapdep(struct buf *, struct inode *, ino_t); 114eb2ea105SJeff Roberson void softdep_setup_blkmapdep(struct buf *, struct mount *, ufs2_daddr_t); 1151c85e6a3SKirk McKusick void softdep_setup_allocdirect(struct inode *, ufs_lbn_t, ufs2_daddr_t, 1161c85e6a3SKirk McKusick ufs2_daddr_t, long, long, struct buf *); 1177aca6291SKirk McKusick void softdep_setup_allocext(struct inode *, ufs_lbn_t, ufs2_daddr_t, 1187aca6291SKirk McKusick ufs2_daddr_t, long, long, struct buf *); 1196f1e8551SAlfred Perlstein void softdep_setup_allocindir_meta(struct buf *, struct inode *, 1201c85e6a3SKirk McKusick struct buf *, int, ufs2_daddr_t); 1216f1e8551SAlfred Perlstein void softdep_setup_allocindir_page(struct inode *, ufs_lbn_t, 1221c85e6a3SKirk McKusick struct buf *, int, ufs2_daddr_t, ufs2_daddr_t, struct buf *); 1236f1e8551SAlfred Perlstein void softdep_fsync_mountdev(struct vnode *); 12440854ff5SPoul-Henning Kamp int softdep_sync_metadata(struct vnode *); 125eb2ea105SJeff Roberson int softdep_process_worklist(struct mount *, int); 126eb2ea105SJeff Roberson int softdep_fsync(struct vnode *); 127eb2ea105SJeff Roberson int softdep_waitidle(struct mount *); 128b1897c19SJulian Elischer 1292043dc9aSBruce Evans #endif /* !_UFS_FFS_EXTERN_H */ 130