1 /* $NetBSD: ufs_extern.h,v 1.29 2002/12/01 00:12:12 matt 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 * @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95 36 */ 37 38 #ifndef _UFS_UFS_EXTERN_H_ 39 #define _UFS_UFS_EXTERN_H_ 40 41 struct buf; 42 struct componentname; 43 struct direct; 44 struct disklabel; 45 struct dquot; 46 struct fid; 47 struct flock; 48 struct indir; 49 struct inode; 50 struct mbuf; 51 struct mount; 52 struct nameidata; 53 struct proc; 54 struct ucred; 55 struct ufs_args; 56 struct ufsmount; 57 struct uio; 58 struct vattr; 59 struct vnode; 60 61 __BEGIN_DECLS 62 #define ufs_abortop genfs_abortop 63 int ufs_access __P((void *)); 64 int ufs_advlock __P((void *)); 65 int ufs_bmap __P((void *)); 66 int ufs_close __P((void *)); 67 int ufs_create __P((void *)); 68 int ufs_getattr __P((void *)); 69 int ufs_inactive __P((void *)); 70 #define ufs_fcntl genfs_fcntl 71 #define ufs_ioctl genfs_enoioctl 72 #define ufs_islocked genfs_islocked 73 #define ufs_lease_check genfs_lease_check 74 int ufs_link __P((void *)); 75 #define ufs_lock genfs_lock 76 int ufs_lookup __P((void *)); 77 int ufs_mkdir __P((void *)); 78 int ufs_mknod __P((void *)); 79 #define ufs_mmap genfs_mmap 80 #define ufs_revoke genfs_revoke 81 int ufs_open __P((void *)); 82 int ufs_pathconf __P((void *)); 83 int ufs_print __P((void *)); 84 int ufs_readdir __P((void *)); 85 int ufs_readlink __P((void *)); 86 int ufs_remove __P((void *)); 87 int ufs_rename __P((void *)); 88 int ufs_rmdir __P((void *)); 89 #define ufs_seek genfs_seek 90 #define ufs_poll genfs_poll 91 int ufs_setattr __P((void *)); 92 int ufs_strategy __P((void *)); 93 int ufs_symlink __P((void *)); 94 #define ufs_unlock genfs_unlock 95 int ufs_whiteout __P((void *)); 96 int ufsspec_close __P((void *)); 97 int ufsspec_read __P((void *)); 98 int ufsspec_write __P((void *)); 99 100 int ufsfifo_read __P((void *)); 101 int ufsfifo_write __P((void *)); 102 int ufsfifo_close __P((void *)); 103 104 /* ufs_bmap.c */ 105 int ufs_bmaparray __P((struct vnode *, ufs_daddr_t, ufs_daddr_t *, 106 struct indir *, int *, int *)); 107 int ufs_getlbns __P((struct vnode *, ufs_daddr_t, struct indir *, int *)); 108 109 /* ufs_ihash.c */ 110 void ufs_ihashinit __P((void)); 111 void ufs_ihashreinit __P((void)); 112 void ufs_ihashdone __P((void)); 113 struct vnode *ufs_ihashlookup __P((dev_t, ino_t)); 114 struct vnode *ufs_ihashget __P((dev_t, ino_t, int)); 115 void ufs_ihashins __P((struct inode *)); 116 void ufs_ihashrem __P((struct inode *)); 117 118 /* ufs_inode.c */ 119 int ufs_reclaim __P((struct vnode *, struct proc *)); 120 int ufs_balloc_range __P((struct vnode *, off_t, off_t, struct ucred *, int)); 121 122 /* ufs_lookup.c */ 123 void ufs_dirbad __P((struct inode *, doff_t, char *)); 124 int ufs_dirbadentry __P((struct vnode *, struct direct *, int)); 125 void ufs_makedirentry __P((struct inode *, struct componentname *, 126 struct direct *)); 127 int ufs_direnter __P((struct vnode *, struct vnode *, struct direct *, 128 struct componentname *, struct buf *)); 129 int ufs_dirremove __P((struct vnode *, struct inode *, int, int)); 130 int ufs_dirrewrite __P((struct inode *, struct inode *, ino_t, int, int)); 131 int ufs_dirempty __P((struct inode *, ino_t, struct ucred *)); 132 int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *)); 133 134 /* ufs_quota.c */ 135 int getinoquota __P((struct inode *)); 136 int chkdq __P((struct inode *, long, struct ucred *, int)); 137 int chkdqchg __P((struct inode *, long, struct ucred *, int)); 138 int chkiq __P((struct inode *, long, struct ucred *, int)); 139 int chkiqchg __P((struct inode *, long, struct ucred *, int)); 140 void chkdquot __P((struct inode *)); 141 int quotaon __P((struct proc *, struct mount *, int, caddr_t)); 142 int quotaoff __P((struct proc *, struct mount *, int)); 143 int getquota __P((struct mount *, u_long, int, caddr_t)); 144 int setquota __P((struct mount *, u_long, int, caddr_t)); 145 int setuse __P((struct mount *, u_long, int, caddr_t)); 146 int qsync __P((struct mount *)); 147 int dqget __P((struct vnode *, u_long, struct ufsmount *, int, 148 struct dquot **)); 149 void dqref __P((struct dquot *)); 150 void dqrele __P((struct vnode *, struct dquot *)); 151 int dqsync __P((struct vnode *, struct dquot *)); 152 void dqflush __P((struct vnode *)); 153 154 /* ufs_vfsops.c */ 155 void ufs_init __P((void)); 156 void ufs_reinit __P((void)); 157 void ufs_done __P((void)); 158 int ufs_start __P((struct mount *, int, struct proc *)); 159 int ufs_root __P((struct mount *, struct vnode **)); 160 int ufs_quotactl __P((struct mount *, int, uid_t, caddr_t, struct proc *)); 161 int ufs_fhtovp __P((struct mount *, struct ufid *, struct vnode **)); 162 int ufs_check_export __P((struct mount *, struct mbuf *, int *, 163 struct ucred **)); 164 165 /* ufs_vnops.c */ 166 void ufs_vinit __P((struct mount *, int (**) __P((void *)), 167 int (**) __P((void *)), struct vnode **)); 168 int ufs_makeinode __P((int, struct vnode *, struct vnode **, 169 struct componentname *)); 170 171 /* 172 * Soft dependency function prototypes. 173 */ 174 int softdep_setup_directory_add __P((struct buf *, struct inode *, off_t, 175 long, struct buf *, int)); 176 void softdep_change_directoryentry_offset __P((struct inode *, caddr_t, 177 caddr_t, caddr_t, int)); 178 void softdep_setup_remove __P((struct buf *,struct inode *, struct inode *, 179 int)); 180 void softdep_setup_directory_change __P((struct buf *, struct inode *, 181 struct inode *, long, int)); 182 void softdep_change_linkcnt __P((struct inode *)); 183 void softdep_releasefile __P((struct inode *)); 184 185 __END_DECLS 186 187 #endif /* !_UFS_UFS_EXTERN_H_ */ 188