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 #ifndef AFS_OBSD38_ENV
43 #include <ufs/ufs/extattr.h>
45 #include <ufs/ufs/ufsmount.h>
50 #include <sys/protosw.h>
51 #include <sys/ioctl.h>
52 #include <sys/timeout.h>
53 #else /* AFS_OBSD_ENV */
54 #ifdef AFS_LINUX22_ENV
55 #include <linux/version.h>
56 #include <linux/config.h>
57 #include <linux/linkage.h>
58 #include <linux/limits.h>
59 #include <linux/wait.h>
60 #include <linux/types.h>
61 #include <linux/vfs.h>
62 #include <linux/net.h>
63 #include <linux/kdev_t.h>
64 #include <linux/ioctl.h>
65 #if defined(AFS_LINUX26_ENV)
66 #include <linux/backing-dev.h>
67 #include <linux/pagemap.h>
68 #include <linux/namei.h>
69 #ifdef STRUCT_INODE_HAS_I_SECURITY
70 #include <linux/security.h>
72 #include <linux/suspend.h>
74 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
75 * inclusion of uaccess.h.
77 #ifndef _LINUX_CODA_FS_I
78 #define _LINUX_CODA_FS_I
81 struct coda_inode_info {
84 #ifndef _LINUX_XFS_FS_I
85 #define _LINUX_XFS_FS_I
86 struct xfs_inode_info {
89 #include <asm/uaccess.h>
90 #include <linux/list.h>
91 #include <linux/dcache.h>
92 #include <linux/mount.h>
94 #include <linux/quota.h>
95 #include <linux/sched.h>
97 #include <linux/slab.h>
98 #include <linux/string.h>
99 #include <asm/semaphore.h>
100 #include <linux/errno.h>
101 #ifdef COMPLETION_H_EXISTS
102 #include <linux/completion.h>
105 #else /* AFS_LINUX22_ENV */
106 #if defined(AFS_DARWIN_ENV)
107 #ifndef _MACH_ETAP_H_
108 #define _MACH_ETAP_H_
109 typedef unsigned short etap_event_t;
112 #if !defined(AFS_OSF_ENV)
122 #include "h/region.h"
124 #include "h/sysmacros.h"
125 #include "h/signal.h"
127 #endif /* AFS_AUX_ENV */
134 #include "sys/statfs.h"
139 #include "../h/file.h"
140 #include "../h/fullstat.h"
141 #include "../h/vattr.h"
142 #include "../h/var.h"
143 #include "../h/access.h"
144 #endif /* AFS_AIX_ENV */
146 #if defined(AFS_SGI_ENV)
148 #include "sys/sema.h"
149 #include "sys/cmn_err.h"
151 #include <ksys/behavior.h>
152 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
153 * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
154 * older headers like we want the old behavior, so we fake it. */
155 #if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
156 #define BHV_IS_BHVL(bhp) (0)
158 #endif /* AFS_SGI64_ENV */
159 #include "fs/efs_inode.h"
160 #ifdef AFS_SGI_EFS_IOPS_ENV
161 #include "sgiefs/efs.h"
163 #include "sys/kmem.h"
164 #include "sys/cred.h"
165 #include "sys/resource.h"
168 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
169 * is on (see afs_osi.h).
170 * In IRIX 6.5 we cannot have DEBUG turned on since certain
171 * system-defined structures have different members with DEBUG on, and
172 * this breaks our ability to interact with the rest of the kernel.
174 * Instead of using ASSERT(), we use our own osi_Assert().
176 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
178 #include "sys/debug.h"
181 #include "sys/debug.h"
184 #include "sys/statvfs.h"
185 #include "sys/sysmacros.h"
186 #include "sys/fs_subr.h"
187 #include "sys/siginfo.h"
188 #endif /* AFS_SGI_ENV */
190 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
191 # include "h/kernel.h"
192 #endif /* !SUN5 && !SGI */
195 #include <sys/cmn_err.h> /* for kernel printf() prototype */
198 #if defined(AFS_SUN56_ENV)
199 #include "h/vfs.h" /* stops SUN56 socketvar.h warnings */
200 #include "h/stropts.h" /* stops SUN56 socketvar.h warnings */
201 #include "h/stream.h" /* stops SUN56 socketvar.h errors */
204 #ifdef AFS_SUN510_ENV
205 #include <sys/cred_impl.h>
208 #include "h/socket.h"
209 #include "h/socketvar.h"
210 #include "h/protosw.h"
212 #if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
213 # include "h/dirent.h"
215 # include "h/sysmacros.h"
216 # include "h/fs/ufs_fsdir.h"
217 # endif /* AFS_SUN5_ENV */
220 #endif /* SGI || SUN || HPUX */
222 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV)
224 #endif /* AFS_SGI64_ENV */
225 #define MACH_USER_API 1
226 #if defined(AFS_FBSD50_ENV)
228 #include "h/filedesc.h"
236 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
238 # include "h/statvfs.h"
239 # endif /* AFS_SUN5_ENV */
241 struct vfspage; /* for vnode.h compiler warnings */
242 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
243 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
244 #ifdef AFS_HPUX110_ENV
245 # include "h/resource.h"
247 #ifdef AFS_HPUX1123_ENV
248 # include <sys/user.h>
249 # include <sys/cred.h>
251 # endif /* AFS_HPUX_ENV */
252 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
253 # if defined(AFS_FBSD50_ENV)
254 struct vop_getwritemount_args;
256 # include <sys/uio.h>
257 # include <sys/mount.h>
258 # include <sys/namei.h>
259 #ifdef AFS_DARWIN80_ENV
260 # include <sys/kauth.h>
263 # include <sys/vnode.h>
264 # include <sys/queue.h>
265 # include <sys/malloc.h>
267 # include <sys/ubc.h>
268 #define timeout_fcn_t mach_timeout_fcn_t
269 # include <kern/sched_prim.h>
271 MALLOC_DECLARE(M_AFS);
272 # include <ufs/ufs/dinode.h>
274 # include <vm/vm_extern.h>
275 # include <vm/pmap.h>
276 # include <vm/vm_map.h>
277 # include <sys/lock.h>
278 # include <sys/user.h>
282 #define doff_t int32_t
283 #ifndef AFS_DARWIN80_ENV
284 # include <ufs/ufs/quota.h>
285 # include <ufs/ufs/inode.h>
286 # include <ufs/ffs/fs.h>
290 # include "h/vnode.h"
292 # include "h/fs/ufs_inode.h"
293 # include "h/fs/ufs_mount.h"
295 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
296 # include "ufs/inode.h"
297 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
298 # include "ufs/mount.h"
299 # endif /* !AFS_HPUX_ENV */
300 # endif /* !AFS_AIX32_ENV */
301 # endif /* AFS_SUN5_ENV */
302 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
304 /* These mainly deal with networking and rpc headers */
305 #include "netinet/in.h"
306 #undef MFREE /* defined at mount.h for AIX */
310 #if !defined(AFS_HPUX_ENV)
313 #endif /* AFS_SUN5_ENV */
315 #include "rpc/types.h"
318 /* Miscellaneous headers */
320 #if !defined(AFS_FBSD_ENV)
322 #endif /* AFS_FBSD_ENV */
324 #if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
325 #include "h/proc_iface.h"
329 #if defined(AFS_HPUX102_ENV)
330 #include "h/unistd.h"
334 #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)
340 #if defined(AFS_AIX_ENV)
341 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
343 # include "h/fcntl.h"
346 #if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
347 # include "h/unistd.h"
348 #endif /* SGI || SUN */
351 # include "h/vmuser.h"
352 #endif /* AFS_AIX32_ENV */
354 #if defined(AFS_SUN5_ENV)
355 #include <sys/tiuser.h>
356 #include <sys/t_lock.h>
357 #include <sys/mutex.h>
358 #include <sys/vtrace.h>
359 #include <sys/pathname.h>
360 #include <sys/debug.h>
363 #else /* ! AFS_OSF_ENV */
364 /* All of the OSF/1 stuff is here */
365 #include <net/net_globals.h>
367 #include <sys/types.h>
368 #include <sys/param.h>
369 #include <sys/systm.h>
370 #include <sys/time.h>
371 #include <sys/kernel.h>
372 #include <sys/socket.h>
373 #include <sys/socketvar.h>
374 #include <sys/protosw.h>
376 #include <sys/user.h>
377 #include <sys/file.h>
380 #include <sys/stat.h>
381 #include <sys/vnode.h>
382 #include <ufs/inode.h>
383 #include <sys/mount.h>
384 #include <vm/vm_page.h>
385 #include <mach/vm_param.h>
386 #include <kern/parallel.h>
387 #include <mach/mach_types.h>
388 #ifndef AFS_OSF30_ENV
389 #include <kern/mfs.h>
391 #include <mach/vm_param.h>
392 #include <kern/parallel.h>
394 /* These mainly deal with networking and rpc headers */
395 #include <netinet/in.h>
396 #include <sys/mbuf.h>
397 #include <rpc/types.h>
405 #endif /* AFS_OSF_ENV */
408 #include <sys/proc.h>
409 #include <sys/ioctl.h>
411 #endif /* AFS_OSF_ENV */
412 #endif /* AFS_LINUX22_ENV */
413 #endif /* AFS_OBSD_ENV */
415 #endif /* __AFS_SYSINCLUDESH__ so idempotent */