1 /* $NetBSD: ufs_extern.h,v 1.38 2003/08/07 16:34:45 agc 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. Neither the name of the University nor the names of its contributors
16 * may be used to endorse or promote products derived from this software
17 * without specific prior written permission.
18 *
19 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95
32 */
33
34 #ifndef _UFS_UFS_EXTERN_H_
35 #define _UFS_UFS_EXTERN_H_
36
37 struct buf;
38 struct componentname;
39 struct direct;
40 struct disklabel;
41 struct dquot;
42 struct fid;
43 struct flock;
44 struct indir;
45 struct inode;
46 struct mbuf;
47 struct mount;
48 struct nameidata;
49 struct proc;
50 struct ucred;
51 struct ufs_args;
52 struct ufsmount;
53 struct uio;
54 struct vattr;
55 struct vnode;
56
57 __BEGIN_DECLS
58 #define ufs_abortop genfs_abortop
59 int ufs_access __P((void *));
60 int ufs_advlock __P((void *));
61 int ufs_bmap __P((void *));
62 int ufs_close __P((void *));
63 int ufs_create __P((void *));
64 int ufs_getattr __P((void *));
65 int ufs_inactive __P((void *));
66 #define ufs_fcntl genfs_fcntl
67 #define ufs_ioctl genfs_enoioctl
68 #define ufs_islocked genfs_islocked
69 #define ufs_lease_check genfs_lease_check
70 int ufs_link __P((void *));
71 #define ufs_lock genfs_lock
72 int ufs_lookup __P((void *));
73 int ufs_mkdir __P((void *));
74 int ufs_mknod __P((void *));
75 #define ufs_mmap genfs_mmap
76 #define ufs_revoke genfs_revoke
77 int ufs_open __P((void *));
78 int ufs_pathconf __P((void *));
79 int ufs_print __P((void *));
80 int ufs_readdir __P((void *));
81 int ufs_readlink __P((void *));
82 int ufs_remove __P((void *));
83 int ufs_rename __P((void *));
84 int ufs_rmdir __P((void *));
85 #define ufs_seek genfs_seek
86 #define ufs_poll genfs_poll
87 int ufs_setattr __P((void *));
88 int ufs_strategy __P((void *));
89 int ufs_symlink __P((void *));
90 #define ufs_unlock genfs_unlock
91 int ufs_whiteout __P((void *));
92 int ufsspec_close __P((void *));
93 int ufsspec_read __P((void *));
94 int ufsspec_write __P((void *));
95
96 int ufsfifo_read __P((void *));
97 int ufsfifo_write __P((void *));
98 int ufsfifo_close __P((void *));
99
100 /* ufs_bmap.c */
101 typedef boolean_t (*ufs_issequential_callback_t) __P((const struct ufsmount *,
102 daddr_t, daddr_t));
103 int ufs_bmaparray __P((struct vnode *, daddr_t, daddr_t *, struct indir *,
104 int *, int *, ufs_issequential_callback_t));
105 int ufs_getlbns __P((struct vnode *, daddr_t, struct indir *, int *));
106
107 /* ufs_ihash.c */
108 void ufs_ihashinit __P((void));
109 void ufs_ihashreinit __P((void));
110 void ufs_ihashdone __P((void));
111 struct vnode *ufs_ihashlookup __P((dev_t, ino_t));
112 struct vnode *ufs_ihashget __P((dev_t, ino_t, int));
113 void ufs_ihashins __P((struct inode *));
114 void ufs_ihashrem __P((struct inode *));
115
116 /* ufs_inode.c */
117 int ufs_reclaim __P((struct vnode *, struct proc *));
118 int ufs_balloc_range __P((struct vnode *, off_t, off_t, struct ucred *, int));
119
120 /* ufs_lookup.c */
121 void ufs_dirbad __P((struct inode *, doff_t, char *));
122 int ufs_dirbadentry __P((struct vnode *, struct direct *, int));
123 void ufs_makedirentry __P((struct inode *, struct componentname *,
124 struct direct *));
125 int ufs_direnter __P((struct vnode *, struct vnode *, struct direct *,
126 struct componentname *, struct buf *));
127 int ufs_dirremove __P((struct vnode *, struct inode *, int, int));
128 int ufs_dirrewrite __P((struct inode *, struct inode *, ino_t, int, int, int));
129 int ufs_dirempty __P((struct inode *, ino_t, struct ucred *));
130 int ufs_checkpath __P((struct inode *, struct inode *, struct ucred *));
131
132 /* ufs_quota.c */
133 int getinoquota __P((struct inode *));
134 int chkdq __P((struct inode *, int64_t, struct ucred *, int));
135 int chkdqchg __P((struct inode *, int64_t, struct ucred *, int));
136 int chkiq __P((struct inode *, int32_t, struct ucred *, int));
137 int chkiqchg __P((struct inode *, int32_t, struct ucred *, int));
138 void chkdquot __P((struct inode *));
139 int quotaon __P((struct proc *, struct mount *, int, caddr_t));
140 int quotaoff __P((struct proc *, struct mount *, int));
141 int getquota __P((struct mount *, u_long, int, caddr_t));
142 int setquota __P((struct mount *, u_long, int, caddr_t));
143 int setuse __P((struct mount *, u_long, int, caddr_t));
144 int qsync __P((struct mount *));
145 int dqget __P((struct vnode *, u_long, struct ufsmount *, int,
146 struct dquot **));
147 void dqref __P((struct dquot *));
148 void dqrele __P((struct vnode *, struct dquot *));
149 int dqsync __P((struct vnode *, struct dquot *));
150 void dqflush __P((struct vnode *));
151
152 /* ufs_vfsops.c */
153 void ufs_init __P((void));
154 void ufs_reinit __P((void));
155 void ufs_done __P((void));
156 int ufs_start __P((struct mount *, int, struct proc *));
157 int ufs_root __P((struct mount *, struct vnode **));
158 int ufs_quotactl __P((struct mount *, int, uid_t, caddr_t, struct proc *));
159 int ufs_fhtovp __P((struct mount *, struct ufid *, struct vnode **));
160 int ufs_check_export __P((struct mount *, struct mbuf *, int *,
161 struct ucred **));
162
163 /* ufs_vnops.c */
164 void ufs_vinit __P((struct mount *, int (**) __P((void *)),
165 int (**) __P((void *)), struct vnode **));
166 int ufs_makeinode __P((int, struct vnode *, struct vnode **,
167 struct componentname *));
168 int ufs_gop_alloc __P((struct vnode *, off_t, off_t, int, struct ucred *));
169
170 /*
171 * Soft dependency function prototypes.
172 */
173 int softdep_setup_directory_add __P((struct buf *, struct inode *, off_t,
174 ino_t, struct buf *, int));
175 void softdep_change_directoryentry_offset __P((struct inode *, caddr_t,
176 caddr_t, caddr_t, int));
177 void softdep_setup_remove __P((struct buf *,struct inode *, struct inode *,
178 int));
179 void softdep_setup_directory_change __P((struct buf *, struct inode *,
180 struct inode *, ino_t, int));
181 void softdep_change_linkcnt __P((struct inode *));
182 void softdep_releasefile __P((struct inode *));
183
184 __END_DECLS
185
186 #endif /* !_UFS_UFS_EXTERN_H_ */
Cache object: c6432b51f9a0880392f129d79e2db03f
|