1 /* $NetBSD: layer_extern.h,v 1.41 2020/01/17 20:08:09 ad Exp $ */ 2 3 /* 4 * Copyright (c) 1999 National Aeronautics & Space Administration 5 * All rights reserved. 6 * 7 * This software was written by William Studenmund of the 8 * Numerical Aerospace Simulation Facility, NASA Ames Research Center. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. Neither the name of the National Aeronautics & Space Administration 19 * nor the names of its contributors may be used to endorse or promote 20 * products derived from this software without specific prior written 21 * permission. 22 * 23 * THIS SOFTWARE IS PROVIDED BY THE NATIONAL AERONAUTICS & SPACE ADMINISTRATION 24 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 25 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE ADMINISTRATION OR CONTRIB- 27 * UTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 28 * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33 * POSSIBILITY OF SUCH DAMAGE. 34 */ 35 36 /* 37 * Copyright (c) 1992, 1993, 1995 38 * The Regents of the University of California. All rights reserved. 39 * 40 * This code is derived from software donated to Berkeley by 41 * Jan-Simon Pendry. 42 * 43 * Redistribution and use in source and binary forms, with or without 44 * modification, are permitted provided that the following conditions 45 * are met: 46 * 1. Redistributions of source code must retain the above copyright 47 * notice, this list of conditions and the following disclaimer. 48 * 2. Redistributions in binary form must reproduce the above copyright 49 * notice, this list of conditions and the following disclaimer in the 50 * documentation and/or other materials provided with the distribution. 51 * 3. Neither the name of the University nor the names of its contributors 52 * may be used to endorse or promote products derived from this software 53 * without specific prior written permission. 54 * 55 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 56 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 57 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 58 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 59 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 60 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 61 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 62 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 63 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 64 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 65 * SUCH DAMAGE. 66 * 67 */ 68 69 #ifndef _MISCFS_GENFS_LAYER_EXTERN_H_ 70 #define _MISCFS_GENFS_LAYER_EXTERN_H_ 71 72 /* 73 * Routines defined by layerfs 74 */ 75 76 /* Routines to manage nodes. */ 77 void layerfs_init(void); 78 void layerfs_done(void); 79 int layer_node_create(struct mount *, struct vnode *, struct vnode **); 80 81 /* VFS routines */ 82 int layerfs_start(struct mount *, int); 83 int layerfs_root(struct mount *, int, struct vnode **); 84 int layerfs_quotactl(struct mount *, struct quotactl_args *); 85 int layerfs_statvfs(struct mount *, struct statvfs *); 86 int layerfs_sync(struct mount *, int, struct kauth_cred *); 87 int layerfs_loadvnode(struct mount *, struct vnode *, 88 const void *, size_t, const void **); 89 int layerfs_vget(struct mount *, ino_t, int, struct vnode **); 90 int layerfs_fhtovp(struct mount *, struct fid *, int, struct vnode **); 91 int layerfs_vptofh(struct vnode *, struct fid *, size_t *); 92 int layerfs_snapshot(struct mount *, struct vnode *, struct timespec *); 93 int layerfs_suspendctl(struct mount *, int); 94 int layerfs_renamelock_enter(struct mount *); 95 void layerfs_renamelock_exit(struct mount *); 96 97 /* VOP routines */ 98 int layer_bypass(void *); 99 int layer_getattr(void *); 100 int layer_inactive(void *); 101 int layer_reclaim(void *); 102 int layer_print(void *); 103 int layer_bmap(void *); 104 int layer_fsync(void *); 105 int layer_lookup(void *); 106 int layer_setattr(void *); 107 int layer_access(void *); 108 int layer_open(void *); 109 int layer_close(void *); 110 int layer_remove(void *); 111 int layer_rename(void *); 112 int layer_revoke(void *); 113 int layer_rmdir(void *); 114 int layer_getpages(void *); 115 int layer_putpages(void *); 116 117 #endif /* _MISCFS_GENFS_LAYER_EXTERN_H_ */ 118