2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <UKERNEL/sysincludes.h>
14 #ifndef __AFS_SYSINCLUDESH__
15 #define __AFS_SYSINCLUDESH__ 1
18 #include <sys/errno.h>
19 #include <sys/types.h>
20 #include <sys/param.h>
22 #include <sys/queue.h>
23 #include <sys/resourcevar.h>
24 #include <sys/kernel.h>
27 #include <sys/filedesc.h>
29 #include <sys/socket.h>
30 #include <sys/socketvar.h>
31 #include <sys/dirent.h>
36 #include <sys/mount.h>
37 #include <sys/vnode.h>
38 #include <sys/malloc.h>
39 #include <ufs/ffs/fs.h>
40 #include <ufs/ufs/quota.h>
41 #include <ufs/ufs/inode.h>
42 #include <ufs/ufs/extattr.h>
43 #include <ufs/ufs/ufsmount.h>
48 #include <sys/protosw.h>
49 #include <sys/ioctl.h>
50 #include <sys/timeout.h>
51 #else /* AFS_OBSD_ENV */
52 #ifdef AFS_LINUX22_ENV
53 #include <linux/version.h>
54 #include <linux/config.h>
55 #include <linux/linkage.h>
56 #include <linux/limits.h>
57 #include <linux/wait.h>
58 #include <linux/types.h>
59 #include <linux/vfs.h>
60 #include <linux/net.h>
61 #include <linux/kdev_t.h>
62 #include <linux/ioctl.h>
63 #if defined(AFS_LINUX26_ENV)
64 #include <linux/backing-dev.h>
65 #include <linux/pagemap.h>
66 #include <linux/namei.h>
67 #ifdef STRUCT_INODE_HAS_I_SECURITY
68 #include <linux/security.h>
70 #include <linux/suspend.h>
72 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
73 * inclusion of uaccess.h.
75 #ifndef _LINUX_CODA_FS_I
76 #define _LINUX_CODA_FS_I
79 struct coda_inode_info {
81 #define _LINUX_XFS_FS_I
82 struct xfs_inode_info {
84 #include <asm/uaccess.h>
85 #include <linux/list.h>
86 #include <linux/dcache.h>
87 #include <linux/mount.h>
89 #include <linux/quota.h>
90 #include <linux/sched.h>
92 #include <linux/slab.h>
93 #include <linux/string.h>
94 #include <asm/semaphore.h>
95 #include <linux/errno.h>
96 #ifdef COMPLETION_H_EXISTS
97 #include <linux/completion.h>
100 #else /* AFS_LINUX22_ENV */
101 #if defined(AFS_DARWIN_ENV)
102 #ifndef _MACH_ETAP_H_
103 #define _MACH_ETAP_H_
104 typedef unsigned short etap_event_t;
107 #if !defined(AFS_OSF_ENV)
117 #include "h/region.h"
119 #include "h/sysmacros.h"
120 #include "h/signal.h"
122 #endif /* AFS_AUX_ENV */
129 #include "sys/statfs.h"
134 #include "../h/file.h"
135 #include "../h/fullstat.h"
136 #include "../h/vattr.h"
137 #include "../h/var.h"
138 #include "../h/access.h"
139 #endif /* AFS_AIX_ENV */
141 #if defined(AFS_SGI_ENV)
143 #include "sys/sema.h"
144 #include "sys/cmn_err.h"
146 #include <ksys/behavior.h>
147 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
148 * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
149 * older headers like we want the old behavior, so we fake it. */
150 #if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
151 #define BHV_IS_BHVL(bhp) (0)
153 #endif /* AFS_SGI64_ENV */
154 #include "fs/efs_inode.h"
155 #ifdef AFS_SGI_EFS_IOPS_ENV
156 #include "sgiefs/efs.h"
158 #include "sys/kmem.h"
159 #include "sys/cred.h"
160 #include "sys/resource.h"
163 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
164 * is on (see afs_osi.h).
165 * In IRIX 6.5 we cannot have DEBUG turned on since certain
166 * system-defined structures have different members with DEBUG on, and
167 * this breaks our ability to interact with the rest of the kernel.
169 * Instead of using ASSERT(), we use our own osi_Assert().
171 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
173 #include "sys/debug.h"
176 #include "sys/debug.h"
179 #include "sys/statvfs.h"
180 #include "sys/sysmacros.h"
181 #include "sys/fs_subr.h"
182 #include "sys/siginfo.h"
183 #endif /* AFS_SGI_ENV */
185 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
186 # include "h/kernel.h"
187 #endif /* !SUN5 && !SGI */
190 #include <sys/cmn_err.h> /* for kernel printf() prototype */
193 #if defined(AFS_SUN56_ENV)
194 #include "h/vfs.h" /* stops SUN56 socketvar.h warnings */
195 #include "h/stropts.h" /* stops SUN56 socketvar.h warnings */
196 #include "h/stream.h" /* stops SUN56 socketvar.h errors */
199 #ifdef AFS_SUN510_ENV
200 #include <sys/cred_impl.h>
203 #include "h/socket.h"
204 #include "h/socketvar.h"
205 #include "h/protosw.h"
207 #if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
208 # include "h/dirent.h"
210 # include "h/sysmacros.h"
211 # include "h/fs/ufs_fsdir.h"
212 # endif /* AFS_SUN5_ENV */
215 #endif /* SGI || SUN || HPUX */
217 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV)
219 #endif /* AFS_SGI64_ENV */
220 #define MACH_USER_API 1
221 #if defined(AFS_FBSD50_ENV)
223 #include "h/filedesc.h"
231 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
233 # include "h/statvfs.h"
234 # endif /* AFS_SUN5_ENV */
236 struct vfspage; /* for vnode.h compiler warnings */
237 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
238 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
239 #ifdef AFS_HPUX110_ENV
240 # include "h/resource.h"
242 #ifdef AFS_HPUX1123_ENV
243 # include <sys/user.h>
244 # include <sys/cred.h>
246 # endif /* AFS_HPUX_ENV */
247 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
248 # if defined(AFS_FBSD50_ENV)
249 struct vop_getwritemount_args;
251 # include <sys/uio.h>
252 # include <sys/mount.h>
253 # include <sys/namei.h>
254 #ifdef AFS_DARWIN80_ENV
255 # include <h/vnode.h>
257 # include <sys/vnode.h>
259 # include <sys/queue.h>
260 # include <sys/malloc.h>
262 # include <sys/ubc.h>
263 #define timeout_fcn_t mach_timeout_fcn_t
264 # include <kern/sched_prim.h>
266 MALLOC_DECLARE(M_AFS);
267 # include <ufs/ufs/dinode.h>
269 # include <vm/vm_extern.h>
270 # include <vm/pmap.h>
271 # include <vm/vm_map.h>
272 # include <sys/lock.h>
273 # include <sys/user.h>
277 #define doff_t int32_t
278 #ifndef AFS_DARWIN80_ENV
279 # include <ufs/ufs/quota.h>
280 # include <ufs/ufs/inode.h>
281 # include <ufs/ffs/fs.h>
285 # include "h/vnode.h"
287 # include "h/fs/ufs_inode.h"
288 # include "h/fs/ufs_mount.h"
290 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
291 # include "ufs/inode.h"
292 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
293 # include "ufs/mount.h"
294 # endif /* !AFS_HPUX_ENV */
295 # endif /* !AFS_AIX32_ENV */
296 # endif /* AFS_SUN5_ENV */
297 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
299 /* These mainly deal with networking and rpc headers */
300 #include "netinet/in.h"
301 #undef MFREE /* defined at mount.h for AIX */
305 #if !defined(AFS_HPUX_ENV)
308 #endif /* AFS_SUN5_ENV */
310 #include "rpc/types.h"
313 /* Miscellaneous headers */
315 #if !defined(AFS_FBSD_ENV)
317 #endif /* AFS_FBSD_ENV */
319 #if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
320 #include "h/proc_iface.h"
324 #if defined(AFS_HPUX102_ENV)
325 #include "h/unistd.h"
329 #if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
335 #if defined(AFS_AIX_ENV)
336 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
338 # include "h/fcntl.h"
341 #if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
342 # include "h/unistd.h"
343 #endif /* SGI || SUN */
346 # include "h/vmuser.h"
347 #endif /* AFS_AIX32_ENV */
349 #if defined(AFS_SUN5_ENV)
350 #include <sys/tiuser.h>
351 #include <sys/t_lock.h>
352 #include <sys/mutex.h>
353 #include <sys/vtrace.h>
354 #include <sys/pathname.h>
355 #include <sys/debug.h>
358 #else /* ! AFS_OSF_ENV */
359 /* All of the OSF/1 stuff is here */
360 #include <net/net_globals.h>
362 #include <sys/types.h>
363 #include <sys/param.h>
364 #include <sys/systm.h>
365 #include <sys/time.h>
366 #include <sys/kernel.h>
367 #include <sys/socket.h>
368 #include <sys/socketvar.h>
369 #include <sys/protosw.h>
371 #include <sys/user.h>
372 #include <sys/file.h>
375 #include <sys/stat.h>
376 #include <sys/vnode.h>
377 #include <ufs/inode.h>
378 #include <sys/mount.h>
379 #include <vm/vm_page.h>
380 #include <mach/vm_param.h>
381 #include <kern/parallel.h>
382 #include <mach/mach_types.h>
383 #ifndef AFS_OSF30_ENV
384 #include <kern/mfs.h>
386 #include <mach/vm_param.h>
387 #include <kern/parallel.h>
389 /* These mainly deal with networking and rpc headers */
390 #include <netinet/in.h>
391 #include <sys/mbuf.h>
392 #include <rpc/types.h>
400 #endif /* AFS_OSF_ENV */
403 #include <sys/proc.h>
404 #include <sys/ioctl.h>
406 #endif /* AFS_OSF_ENV */
407 #endif /* AFS_LINUX22_ENV */
408 #endif /* AFS_OBSD_ENV */
410 #endif /* __AFS_SYSINCLUDESH__ so idempotent */