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>
73 #if defined(LINUX_KEYRING_SUPPORT)
74 #include <linux/rwsem.h>
75 #include <linux/key.h>
78 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
79 * inclusion of uaccess.h.
81 #ifndef _LINUX_CODA_FS_I
82 #define _LINUX_CODA_FS_I
85 struct coda_inode_info {
88 #ifndef _LINUX_XFS_FS_I
89 #define _LINUX_XFS_FS_I
90 struct xfs_inode_info {
93 #include <asm/uaccess.h>
94 #include <linux/list.h>
95 #include <linux/dcache.h>
96 #include <linux/mount.h>
98 #include <linux/quota.h>
99 #include <linux/sched.h>
100 #include <linux/mm.h>
101 #include <linux/slab.h>
102 #include <linux/string.h>
103 #include <asm/semaphore.h>
104 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
105 #include <linux/mutex.h>
107 #include <linux/errno.h>
108 #ifdef COMPLETION_H_EXISTS
109 #include <linux/completion.h>
112 #else /* AFS_LINUX22_ENV */
113 #if defined(AFS_DARWIN_ENV)
114 #ifndef _MACH_ETAP_H_
115 #define _MACH_ETAP_H_
116 typedef unsigned short etap_event_t;
119 #if !defined(AFS_OSF_ENV)
129 #include "h/region.h"
131 #include "h/sysmacros.h"
132 #include "h/signal.h"
134 #endif /* AFS_AUX_ENV */
141 #include "sys/statfs.h"
146 #include "../h/file.h"
147 #include "../h/fullstat.h"
148 #include "../h/vattr.h"
149 #include "../h/var.h"
150 #include "../h/access.h"
151 #endif /* AFS_AIX_ENV */
153 #if defined(AFS_SGI_ENV)
155 #include "sys/sema.h"
156 #include "sys/cmn_err.h"
158 #include <ksys/behavior.h>
159 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
160 * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
161 * older headers like we want the old behavior, so we fake it. */
162 #if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
163 #define BHV_IS_BHVL(bhp) (0)
165 #endif /* AFS_SGI64_ENV */
166 #include "fs/efs_inode.h"
167 #include "sys/kmem.h"
168 #include "sys/cred.h"
169 #include "sys/resource.h"
172 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
173 * is on (see afs_osi.h).
174 * In IRIX 6.5 we cannot have DEBUG turned on since certain
175 * system-defined structures have different members with DEBUG on, and
176 * this breaks our ability to interact with the rest of the kernel.
178 * Instead of using ASSERT(), we use our own osi_Assert().
180 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
182 #include "sys/debug.h"
185 #include "sys/debug.h"
188 #include "sys/statvfs.h"
189 #include "sys/sysmacros.h"
190 #include "sys/fs_subr.h"
191 #include "sys/siginfo.h"
192 #endif /* AFS_SGI_ENV */
194 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
195 # include "h/kernel.h"
196 #endif /* !SUN5 && !SGI */
199 #include <sys/cmn_err.h> /* for kernel printf() prototype */
202 #if defined(AFS_SUN56_ENV)
203 #include "h/vfs.h" /* stops SUN56 socketvar.h warnings */
204 #include "h/stropts.h" /* stops SUN56 socketvar.h warnings */
205 #include "h/stream.h" /* stops SUN56 socketvar.h errors */
208 #ifdef AFS_SUN510_ENV
209 #include <sys/cred_impl.h>
212 #include "h/socket.h"
213 #include "h/socketvar.h"
214 #include "h/protosw.h"
216 #if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
217 # include "h/dirent.h"
219 # include "h/sysmacros.h"
220 # include "h/fs/ufs_fsdir.h"
221 # endif /* AFS_SUN5_ENV */
224 #endif /* SGI || SUN || HPUX */
226 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV)
228 #endif /* AFS_SGI64_ENV */
229 #define MACH_USER_API 1
230 #if defined(AFS_FBSD50_ENV)
232 #include "h/filedesc.h"
240 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
242 # include "h/statvfs.h"
243 # endif /* AFS_SUN5_ENV */
245 struct vfspage; /* for vnode.h compiler warnings */
246 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
247 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
248 #ifdef AFS_HPUX110_ENV
249 # include "h/resource.h"
251 #ifdef AFS_HPUX1123_ENV
252 # include <sys/user.h>
253 # include <sys/cred.h>
255 # endif /* AFS_HPUX_ENV */
256 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
257 # if defined(AFS_FBSD50_ENV)
258 struct vop_getwritemount_args;
260 # include <sys/uio.h>
261 # include <sys/mount.h>
262 # include <sys/namei.h>
263 #ifdef AFS_DARWIN80_ENV
264 # include <sys/kauth.h>
267 # include <sys/vnode.h>
268 # include <sys/queue.h>
269 # include <sys/malloc.h>
271 # include <sys/ubc.h>
272 #define timeout_fcn_t mach_timeout_fcn_t
273 # include <kern/sched_prim.h>
275 MALLOC_DECLARE(M_AFS);
276 # include <ufs/ufs/dinode.h>
278 # include <vm/vm_extern.h>
279 # include <vm/pmap.h>
280 # include <vm/vm_map.h>
281 # include <sys/lock.h>
282 # include <sys/user.h>
286 #define doff_t int32_t
287 #ifndef AFS_DARWIN80_ENV
288 # include <ufs/ufs/quota.h>
289 # include <ufs/ufs/inode.h>
290 # include <ufs/ffs/fs.h>
294 # include "h/vnode.h"
296 # include "h/fs/ufs_inode.h"
297 # include "h/fs/ufs_mount.h"
299 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
300 # include "ufs/inode.h"
301 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
302 # include "ufs/mount.h"
303 # endif /* !AFS_HPUX_ENV */
304 # endif /* !AFS_AIX32_ENV */
305 # endif /* AFS_SUN5_ENV */
306 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
308 /* These mainly deal with networking and rpc headers */
309 #include "netinet/in.h"
310 #undef MFREE /* defined at mount.h for AIX */
314 #if !defined(AFS_HPUX_ENV)
317 #endif /* AFS_SUN5_ENV */
319 #include "rpc/types.h"
322 /* Miscellaneous headers */
324 #if !defined(AFS_FBSD_ENV)
326 #endif /* AFS_FBSD_ENV */
328 #if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
329 #include "h/proc_iface.h"
333 #if defined(AFS_HPUX102_ENV)
334 #include "h/unistd.h"
338 #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)
344 #if defined(AFS_AIX_ENV)
345 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
347 # include "h/fcntl.h"
350 #if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
351 # include "h/unistd.h"
352 #endif /* SGI || SUN */
355 # include "h/vmuser.h"
356 #endif /* AFS_AIX32_ENV */
358 #if defined(AFS_SUN5_ENV)
359 #include <sys/tiuser.h>
360 #include <sys/t_lock.h>
361 #include <sys/mutex.h>
362 #include <sys/vtrace.h>
363 #include <sys/pathname.h>
364 #include <sys/debug.h>
367 #else /* ! AFS_OSF_ENV */
368 /* All of the OSF/1 stuff is here */
369 #include <net/net_globals.h>
371 #include <sys/types.h>
372 #include <sys/param.h>
373 #include <sys/systm.h>
374 #include <sys/time.h>
375 #include <sys/kernel.h>
376 #include <sys/socket.h>
377 #include <sys/socketvar.h>
378 #include <sys/protosw.h>
380 #include <sys/user.h>
381 #include <sys/file.h>
384 #include <sys/stat.h>
385 #include <sys/vnode.h>
386 #include <ufs/inode.h>
387 #include <sys/mount.h>
388 #include <vm/vm_page.h>
389 #include <mach/vm_param.h>
390 #include <kern/parallel.h>
391 #include <mach/mach_types.h>
392 #ifndef AFS_OSF30_ENV
393 #include <kern/mfs.h>
395 #include <mach/vm_param.h>
396 #include <kern/parallel.h>
398 /* These mainly deal with networking and rpc headers */
399 #include <netinet/in.h>
400 #include <sys/mbuf.h>
401 #include <rpc/types.h>
409 #endif /* AFS_OSF_ENV */
412 #include <sys/proc.h>
413 #include <sys/ioctl.h>
415 #endif /* AFS_OSF_ENV */
416 #endif /* AFS_LINUX22_ENV */
417 #endif /* AFS_OBSD_ENV */
419 #endif /* __AFS_SYSINCLUDESH__ so idempotent */