Home | History | Annotate | Line # | Download | only in lfs
lfs_extern.h revision 1.11
      1 /*	$NetBSD: lfs_extern.h,v 1.11 1998/09/11 21:27:12 pk Exp $	*/
      2 
      3 /*-
      4  * Copyright (c) 1991, 1993, 1994
      5  *	The Regents of the University of California.  All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *	This product includes software developed by the University of
     18  *	California, Berkeley and its contributors.
     19  * 4. Neither the name of the University nor the names of its contributors
     20  *    may be used to endorse or promote products derived from this software
     21  *    without specific prior written permission.
     22  *
     23  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     24  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     25  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     26  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     27  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     28  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     29  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     30  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     32  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     33  * SUCH DAMAGE.
     34  *
     35  *	@(#)lfs_extern.h	8.6 (Berkeley) 5/8/95
     36  */
     37 
     38 struct fid;
     39 struct mount;
     40 struct nameidata;
     41 struct proc;
     42 struct statfs;
     43 struct timeval;
     44 struct inode;
     45 struct uio;
     46 struct mbuf;
     47 struct dinode;
     48 struct buf;
     49 struct vnode;
     50 struct lfs;
     51 struct segment;
     52 struct ucred;
     53 
     54 extern struct pool lfs_inode_pool;		/* memory pool for inodes */
     55 
     56 __BEGIN_DECLS
     57 /* lfs_alloc.c */
     58 int lfs_vcreate __P((struct mount *, ino_t, struct vnode **));
     59 
     60 
     61 /* lfs_balloc.c */
     62 int lfs_balloc __P((struct vnode *, int, u_long, ufs_daddr_t, struct buf **));
     63 
     64 /* lfs_bio.c */
     65 void lfs_flush __P((void));
     66 int lfs_check __P((struct vnode *, ufs_daddr_t));
     67 
     68 /* lfs_cksum.c */
     69 u_long cksum __P((void *, size_t));
     70 u_long lfs_sb_cksum __P((struct dlfs *));
     71 
     72 /* lfs_debug.c */
     73 #ifdef DEBUG
     74 void lfs_dump_super __P((struct lfs *));
     75 void lfs_dump_dinode __P((struct dinode *));
     76 #endif
     77 
     78 /* lfs_inode.c */
     79 void lfs_init __P((void));
     80 struct dinode *lfs_ifind __P((struct lfs *, ino_t, struct dinode *));
     81 
     82 /* lfs_segment.c */
     83 int lfs_vflush __P((struct vnode *));
     84 void lfs_writevnodes __P((struct lfs *, struct mount *, struct segment *, int));
     85 int lfs_segwrite __P((struct mount *, int));
     86 void lfs_writefile __P((struct lfs *, struct segment *, struct vnode *));
     87 int lfs_writeinode __P((struct lfs *, struct segment *, struct inode *));
     88 int lfs_gatherblock __P((struct segment *, struct buf *, int *));
     89 void lfs_gather __P((struct lfs *, struct segment *, struct vnode *, int (*match )__P ((struct lfs *, struct buf *))));
     90 void lfs_updatemeta __P((struct segment *));
     91 int lfs_initseg __P((struct lfs *));
     92 void lfs_newseg __P((struct lfs *));
     93 int lfs_writeseg __P((struct lfs *, struct segment *));
     94 void lfs_writesuper __P((struct lfs *));
     95 int lfs_match_data __P((struct lfs *, struct buf *));
     96 int lfs_match_indir __P((struct lfs *, struct buf *));
     97 int lfs_match_dindir __P((struct lfs *, struct buf *));
     98 int lfs_match_tindir __P((struct lfs *, struct buf *));
     99 struct buf *lfs_newbuf __P((struct vnode *, ufs_daddr_t, size_t));
    100 void lfs_callback __P((struct buf *));
    101 void lfs_supercallback __P((struct buf *));
    102 void lfs_shellsort __P((struct buf **, ufs_daddr_t *, int));
    103 int lfs_vref __P((struct vnode *));
    104 void lfs_vunref __P((struct vnode *));
    105 
    106 /* lfs_subr.c */
    107 void lfs_seglock __P((struct lfs *, unsigned long));
    108 void lfs_segunlock __P((struct lfs *));
    109 
    110 /* lfs_syscalls.c */
    111 int lfs_fastvget __P((struct mount *, ino_t, ufs_daddr_t, struct vnode **, struct dinode *));
    112 struct buf *lfs_fakebuf __P((struct vnode *, int, size_t, caddr_t));
    113 
    114 /* lfs_vfsops.c */
    115 int lfs_mountroot __P((void));
    116 int lfs_mount __P((struct mount *, const char *, void *, struct nameidata *, struct proc *));
    117 int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
    118 int lfs_unmount __P((struct mount *, int, struct proc *));
    119 int lfs_statfs __P((struct mount *, struct statfs *, struct proc *));
    120 int lfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
    121 int lfs_vget __P((struct mount *, ino_t, struct vnode **));
    122 int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *, struct vnode **, int *, struct ucred **));
    123 int lfs_vptofh __P((struct vnode *, struct fid *));
    124 int lfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
    125 		    struct proc *));
    126 
    127 
    128 int lfs_valloc		__P((void *));
    129 int lfs_vfree		__P((void *));
    130 int lfs_bwrite		__P((void *));
    131 int lfs_update		__P((void *));
    132 int lfs_truncate	__P((void *));
    133 int lfs_blkatoff	__P((void *));
    134 int lfs_fsync		__P((void *));
    135 int lfs_symlink		__P((void *));
    136 int lfs_mknod		__P((void *));
    137 int lfs_create		__P((void *));
    138 int lfs_mkdir		__P((void *));
    139 int lfs_read		__P((void *));
    140 int lfs_remove		__P((void *));
    141 int lfs_rmdir		__P((void *));
    142 int lfs_link		__P((void *));
    143 int lfs_rename		__P((void *));
    144 int lfs_getattr		__P((void *));
    145 int lfs_close		__P((void *));
    146 int lfs_inactive	__P((void *));
    147 int lfs_reclaim		__P((void *));
    148 int lfs_write		__P((void *));
    149 
    150 __END_DECLS
    151 extern int lfs_mount_type;
    152 extern int (**lfs_vnodeop_p) __P((void *));
    153 extern int (**lfs_specop_p) __P((void *));
    154 extern int (**lfs_fifoop_p) __P((void *));
    155 
    156