Home | History | Annotate | Line # | Download | only in lfs
lfs_extern.h revision 1.8
      1 /*	$NetBSD: lfs_extern.h,v 1.8 1998/06/22 22:01:09 sommerfe 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 #include "opt_fifo.h"
     39 
     40 struct fid;
     41 struct mount;
     42 struct nameidata;
     43 struct proc;
     44 struct statfs;
     45 struct timeval;
     46 struct inode;
     47 struct uio;
     48 struct mbuf;
     49 struct dinode;
     50 struct buf;
     51 struct vnode;
     52 struct lfs;
     53 struct segment;
     54 struct ucred;
     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 
     71 /* lfs_debug.c */
     72 #ifdef DEBUG
     73 void lfs_dump_super __P((struct lfs *));
     74 void lfs_dump_dinode __P((struct dinode *));
     75 #endif
     76 
     77 /* lfs_inode.c */
     78 void lfs_init __P((void));
     79 struct dinode *lfs_ifind __P((struct lfs *, ino_t, struct dinode *));
     80 
     81 /* lfs_segment.c */
     82 int lfs_vflush __P((struct vnode *));
     83 void lfs_writevnodes __P((struct lfs *, struct mount *, struct segment *, int));
     84 int lfs_segwrite __P((struct mount *, int));
     85 void lfs_writefile __P((struct lfs *, struct segment *, struct vnode *));
     86 int lfs_writeinode __P((struct lfs *, struct segment *, struct inode *));
     87 int lfs_gatherblock __P((struct segment *, struct buf *, int *));
     88 void lfs_gather __P((struct lfs *, struct segment *, struct vnode *, int (*match )__P ((struct lfs *, struct buf *))));
     89 void lfs_updatemeta __P((struct segment *));
     90 int lfs_initseg __P((struct lfs *));
     91 void lfs_newseg __P((struct lfs *));
     92 int lfs_writeseg __P((struct lfs *, struct segment *));
     93 void lfs_writesuper __P((struct lfs *));
     94 int lfs_match_data __P((struct lfs *, struct buf *));
     95 int lfs_match_indir __P((struct lfs *, struct buf *));
     96 int lfs_match_dindir __P((struct lfs *, struct buf *));
     97 int lfs_match_tindir __P((struct lfs *, struct buf *));
     98 struct buf *lfs_newbuf __P((struct vnode *, ufs_daddr_t, size_t));
     99 void lfs_callback __P((struct buf *));
    100 void lfs_supercallback __P((struct buf *));
    101 void lfs_shellsort __P((struct buf **, ufs_daddr_t *, int));
    102 int lfs_vref __P((struct vnode *));
    103 void lfs_vunref __P((struct vnode *));
    104 
    105 /* lfs_subr.c */
    106 void lfs_seglock __P((struct lfs *, unsigned long));
    107 void lfs_segunlock __P((struct lfs *));
    108 
    109 /* lfs_syscalls.c */
    110 int lfs_fastvget __P((struct mount *, ino_t, ufs_daddr_t, struct vnode **, struct dinode *));
    111 struct buf *lfs_fakebuf __P((struct vnode *, int, size_t, caddr_t));
    112 
    113 /* lfs_vfsops.c */
    114 int lfs_mountroot __P((void));
    115 int lfs_mount __P((struct mount *, const char *, void *, struct nameidata *, struct proc *));
    116 int lfs_mountfs __P((struct vnode *, struct mount *, struct proc *));
    117 int lfs_unmount __P((struct mount *, int, struct proc *));
    118 int lfs_statfs __P((struct mount *, struct statfs *, struct proc *));
    119 int lfs_sync __P((struct mount *, int, struct ucred *, struct proc *));
    120 int lfs_vget __P((struct mount *, ino_t, struct vnode **));
    121 int lfs_fhtovp __P((struct mount *, struct fid *, struct mbuf *, struct vnode **, int *, struct ucred **));
    122 int lfs_vptofh __P((struct vnode *, struct fid *));
    123 int lfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
    124 		    struct proc *));
    125 
    126 
    127 int lfs_valloc		__P((void *));
    128 int lfs_vfree		__P((void *));
    129 int lfs_bwrite		__P((void *));
    130 int lfs_update		__P((void *));
    131 int lfs_truncate	__P((void *));
    132 int lfs_blkatoff	__P((void *));
    133 int lfs_fsync		__P((void *));
    134 int lfs_symlink		__P((void *));
    135 int lfs_mknod		__P((void *));
    136 int lfs_create		__P((void *));
    137 int lfs_mkdir		__P((void *));
    138 int lfs_read		__P((void *));
    139 int lfs_remove		__P((void *));
    140 int lfs_rmdir		__P((void *));
    141 int lfs_link		__P((void *));
    142 int lfs_rename		__P((void *));
    143 int lfs_getattr		__P((void *));
    144 int lfs_close		__P((void *));
    145 int lfs_inactive	__P((void *));
    146 int lfs_reclaim		__P((void *));
    147 int lfs_write		__P((void *));
    148 
    149 __END_DECLS
    150 extern int lfs_mount_type;
    151 extern int (**lfs_vnodeop_p) __P((void *));
    152 extern int (**lfs_specop_p) __P((void *));
    153 #ifdef FIFO
    154 extern int (**lfs_fifoop_p) __P((void *));
    155 #define LFS_FIFOOPS lfs_fifoop_p
    156 #else
    157 #define LFS_FIFOOPS NULL
    158 #endif
    159