Home | History | Annotate | Line # | Download | only in genfs
layer_extern.h revision 1.7
      1  1.7   thorpej /*	$NetBSD: layer_extern.h,v 1.7 2003/06/29 18:43:31 thorpej Exp $	*/
      2  1.1  wrstuden 
      3  1.1  wrstuden /*
      4  1.1  wrstuden  * Copyright (c) 1999 National Aeronautics & Space Administration
      5  1.1  wrstuden  * All rights reserved.
      6  1.1  wrstuden  *
      7  1.1  wrstuden  * This software was written by William Studenmund of the
      8  1.4       wiz  * Numerical Aerospace Simulation Facility, NASA Ames Research Center.
      9  1.1  wrstuden  *
     10  1.1  wrstuden  * Redistribution and use in source and binary forms, with or without
     11  1.1  wrstuden  * modification, are permitted provided that the following conditions
     12  1.1  wrstuden  * are met:
     13  1.1  wrstuden  * 1. Redistributions of source code must retain the above copyright
     14  1.1  wrstuden  *    notice, this list of conditions and the following disclaimer.
     15  1.1  wrstuden  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  wrstuden  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  wrstuden  *    documentation and/or other materials provided with the distribution.
     18  1.2     soren  * 3. Neither the name of the National Aeronautics & Space Administration
     19  1.1  wrstuden  *    nor the names of its contributors may be used to endorse or promote
     20  1.1  wrstuden  *    products derived from this software without specific prior written
     21  1.1  wrstuden  *    permission.
     22  1.1  wrstuden  *
     23  1.1  wrstuden  * THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION
     24  1.1  wrstuden  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     25  1.1  wrstuden  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     26  1.1  wrstuden  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB-
     27  1.1  wrstuden  * UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
     28  1.1  wrstuden  * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     29  1.1  wrstuden  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     30  1.1  wrstuden  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     31  1.1  wrstuden  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     32  1.1  wrstuden  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     33  1.1  wrstuden  * POSSIBILITY OF SUCH DAMAGE.
     34  1.1  wrstuden  */
     35  1.1  wrstuden /*
     36  1.1  wrstuden  * Copyright (c) 1992, 1993, 1995
     37  1.1  wrstuden  *	The Regents of the University of California.  All rights reserved.
     38  1.1  wrstuden  *
     39  1.1  wrstuden  * This code is derived from software donated to Berkeley by
     40  1.1  wrstuden  * Jan-Simon Pendry.
     41  1.1  wrstuden  *
     42  1.1  wrstuden  * Redistribution and use in source and binary forms, with or without
     43  1.1  wrstuden  * modification, are permitted provided that the following conditions
     44  1.1  wrstuden  * are met:
     45  1.1  wrstuden  * 1. Redistributions of source code must retain the above copyright
     46  1.1  wrstuden  *    notice, this list of conditions and the following disclaimer.
     47  1.1  wrstuden  * 2. Redistributions in binary form must reproduce the above copyright
     48  1.1  wrstuden  *    notice, this list of conditions and the following disclaimer in the
     49  1.1  wrstuden  *    documentation and/or other materials provided with the distribution.
     50  1.1  wrstuden  * 3. All advertising materials mentioning features or use of this software
     51  1.1  wrstuden  *    must display the following acknowledgement:
     52  1.1  wrstuden  *	This product includes software developed by the University of
     53  1.1  wrstuden  *	California, Berkeley and its contributors.
     54  1.1  wrstuden  * 4. Neither the name of the University nor the names of its contributors
     55  1.1  wrstuden  *    may be used to endorse or promote products derived from this software
     56  1.1  wrstuden  *    without specific prior written permission.
     57  1.1  wrstuden  *
     58  1.1  wrstuden  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     59  1.1  wrstuden  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     60  1.1  wrstuden  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     61  1.1  wrstuden  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     62  1.1  wrstuden  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     63  1.1  wrstuden  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     64  1.1  wrstuden  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     65  1.1  wrstuden  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     66  1.1  wrstuden  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     67  1.1  wrstuden  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     68  1.1  wrstuden  * SUCH DAMAGE.
     69  1.1  wrstuden  *
     70  1.1  wrstuden  */
     71  1.1  wrstuden 
     72  1.1  wrstuden /*
     73  1.1  wrstuden  * Routines defined by layerfs
     74  1.1  wrstuden  */
     75  1.1  wrstuden 
     76  1.1  wrstuden /* misc routines in layer_subr.c */
     77  1.1  wrstuden void	layerfs_init __P((void));
     78  1.3  jdolecek void	layerfs_done __P((void));
     79  1.1  wrstuden int	layer_node_alloc __P((struct mount *, struct vnode *, struct vnode **));
     80  1.6   darrenr int	layer_node_create __P((struct mount *, struct vnode *,struct vnode **));
     81  1.1  wrstuden struct vnode *
     82  1.1  wrstuden 	layer_node_find __P((struct mount *, struct vnode *));
     83  1.1  wrstuden #define LOG2_SIZEVNODE	7		/* log2(sizeof struct vnode) */
     84  1.1  wrstuden #define LAYER_NHASH(lmp, vp) \
     85  1.1  wrstuden 	(&((lmp)->layerm_node_hashtbl[(((u_long)vp)>>LOG2_SIZEVNODE) & \
     86  1.1  wrstuden 		(lmp)->layerm_node_hash]))
     87  1.1  wrstuden 
     88  1.1  wrstuden /* vfs routines */
     89  1.6   darrenr int	layerfs_start __P((struct mount *, int, struct lwp *));
     90  1.7   thorpej int	layerfs_root __P((struct mount *, struct vnode **));
     91  1.1  wrstuden int	layerfs_quotactl __P((struct mount *, int, uid_t, caddr_t,
     92  1.6   darrenr 			     struct lwp *));
     93  1.6   darrenr int	layerfs_statfs __P((struct mount *, struct statfs *, struct lwp *));
     94  1.6   darrenr int	layerfs_sync __P((struct mount *, int, struct ucred *, struct lwp *));
     95  1.7   thorpej int	layerfs_vget __P((struct mount *, ino_t, struct vnode **));
     96  1.7   thorpej int	layerfs_fhtovp __P((struct mount *, struct fid *, struct vnode **));
     97  1.1  wrstuden int	layerfs_checkexp __P((struct mount *, struct mbuf *, int *,
     98  1.1  wrstuden 			   struct ucred **));
     99  1.1  wrstuden int	layerfs_vptofh __P((struct vnode *, struct fid *));
    100  1.1  wrstuden int	layerfs_sysctl __P((int *, u_int, void *, size_t *, void *, size_t,
    101  1.6   darrenr 			   struct lwp *));
    102  1.1  wrstuden 
    103  1.1  wrstuden /* VOP routines */
    104  1.1  wrstuden int	layer_bypass __P((void *));
    105  1.1  wrstuden int	layer_getattr __P((void *));
    106  1.1  wrstuden int	layer_inactive __P((void *));
    107  1.1  wrstuden int	layer_reclaim __P((void *));
    108  1.1  wrstuden int	layer_print __P((void *));
    109  1.1  wrstuden int	layer_strategy __P((void *));
    110  1.1  wrstuden int	layer_bwrite __P((void *));
    111  1.1  wrstuden int	layer_bmap __P((void *));
    112  1.1  wrstuden int	layer_lock __P((void *));
    113  1.1  wrstuden int	layer_unlock __P((void *));
    114  1.1  wrstuden int	layer_islocked __P((void *));
    115  1.1  wrstuden int	layer_fsync __P((void *));
    116  1.1  wrstuden int	layer_lookup __P((void *));
    117  1.1  wrstuden int	layer_setattr __P((void *));
    118  1.1  wrstuden int	layer_access __P((void *));
    119  1.1  wrstuden int	layer_open __P((void *));
    120  1.5       chs int	layer_getpages __P((void *));
    121  1.5       chs int	layer_putpages __P((void *));
    122