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>
21 # include <sys/lock.h>
22 # include <sys/queue.h>
23 # include <sys/resourcevar.h>
24 # include <sys/kernel.h>
25 # include <sys/proc.h>
26 # include <sys/time.h>
27 # include <sys/filedesc.h>
28 # include <sys/file.h>
29 # include <sys/socket.h>
30 # include <sys/socketvar.h>
31 # include <sys/dirent.h>
32 # include <sys/user.h>
35 # include <sys/stat.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>
47 # include <sys/mbuf.h>
50 # include <sys/protosw.h>
51 # include <sys/ioctl.h>
52 # include <sys/timeout.h>
54 #elif defined(AFS_NBSD40_ENV)
55 # ifdef AFS_NBSD50_ENV
56 # include <sys/simplelock.h>
58 # include <sys/errno.h>
59 # include <sys/types.h>
60 # include <sys/mount.h> /* may define MOUNT_AFS */
61 # include <sys/param.h>
62 # include <sys/systm.h>
63 # include <sys/conf.h>
64 # include <sys/exec.h>
65 # include <sys/lock.h>
66 # include <sys/syscall.h>
67 # include <sys/syscallargs.h>
68 # include <sys/queue.h>
69 # include <sys/resourcevar.h>
70 # include <sys/kernel.h>
71 # include <sys/proc.h>
72 # include <sys/time.h>
73 # include <sys/filedesc.h>
74 # include <sys/exec.h>
75 # include <sys/lock.h>
76 # include <sys/syscall.h>
77 # include <sys/syscallargs.h>
78 # include <sys/queue.h>
79 # include <sys/resourcevar.h>
80 # include <sys/kernel.h>
81 # include <sys/proc.h>
82 # include <sys/time.h>
83 # include <sys/filedesc.h>
84 # include <sys/file.h>
85 # include <sys/socket.h>
86 # include <sys/socketvar.h>
87 # include <sys/dirent.h>
88 # include <sys/kauth.h>
91 # include <sys/stat.h>
92 # include <sys/file.h>
93 # include <sys/namei.h>
96 # include <sys/file.h>
97 # include <sys/namei.h>
98 # include <sys/vnode.h>
99 # include <ufs/ffs/fs.h>
100 # include <ufs/ufs/quota.h>
101 # include <ufs/ufs/inode.h>
102 # include <ufs/ufs/extattr.h>
103 # include <ufs/ufs/ufsmount.h>
105 # include <sys/mbuf.h>
108 # include <sys/protosw.h>
109 # include <sys/ioctl.h>
111 #elif defined(AFS_LINUX22_ENV)
112 # include <linux/version.h>
113 # ifdef HAVE_LINUX_CONFIG_H
114 # include <linux/config.h>
116 # include <linux/linkage.h>
117 # include <linux/limits.h>
118 # include <linux/wait.h>
119 # include <linux/types.h>
120 # include <linux/vfs.h>
121 # include <linux/net.h>
122 # include <linux/kdev_t.h>
123 # include <linux/ioctl.h>
124 # if defined(AFS_LINUX26_ENV)
125 # include <linux/backing-dev.h>
126 # include <linux/pagemap.h>
127 # include <linux/namei.h>
128 # ifdef STRUCT_INODE_HAS_I_SECURITY
129 # include <linux/security.h>
131 # include <linux/suspend.h>
133 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
134 * inclusion of uaccess.h.
136 # ifndef _LINUX_CODA_FS_I
137 # define _LINUX_CODA_FS_I
138 # define _CODA_HEADER_
139 # define _CFS_HEADER_
140 struct coda_inode_info {
143 # ifndef _LINUX_XFS_FS_I
144 # define _LINUX_XFS_FS_I
145 struct xfs_inode_info {
148 # include <asm/uaccess.h>
149 # include <linux/list.h>
150 # include <linux/dcache.h>
151 # include <linux/mount.h>
152 # include <linux/fs.h>
153 # include <linux/quota.h>
154 # include <linux/sched.h>
155 # include <linux/mm.h>
156 # include <linux/slab.h>
157 # include <linux/string.h>
158 # if defined(HAVE_LINUX_SEMAPHORE_H)
159 # include <linux/semaphore.h>
161 # include <asm/semaphore.h>
163 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
164 # include <linux/mutex.h>
166 # include <linux/errno.h>
167 # ifdef HAVE_LINUX_COMPLETION_H
168 # include <linux/completion.h>
170 # if defined(HAVE_LINUX_EXPORTFS_H)
171 # include <linux/exportfs.h>
173 # ifdef AFS_LINUX24_ENV
174 # include <linux/pagemap.h>
177 #else /* AFS_LINUX22_ENV */
178 # if defined(AFS_DARWIN_ENV)
179 # ifndef _MACH_ETAP_H_
180 # define _MACH_ETAP_H_
181 typedef unsigned short etap_event_t;
185 # include "h/errno.h"
186 # include "h/types.h"
187 # include "h/param.h"
194 # include "h/region.h"
196 # include "h/sysmacros.h"
197 # include "h/signal.h"
199 # endif /* AFS_AUX_ENV */
201 # include "h/systm.h"
205 # ifdef AFS_AIX41_ENV
206 # include "sys/statfs.h"
208 # ifdef AFS_AIX51_ENV
209 # include "sys/acl.h"
211 # include "../h/file.h"
212 # include "../h/fullstat.h"
213 # include "../h/vattr.h"
214 # include "../h/var.h"
215 # include "../h/access.h"
216 # endif /* AFS_AIX_ENV */
218 # if defined(AFS_SGI_ENV)
220 # include "sys/sema.h"
221 # include "sys/cmn_err.h"
222 # ifdef AFS_SGI64_ENV
223 # include <ksys/behavior.h>
224 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
225 * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
226 * older headers like we want the old behavior, so we fake it. */
227 # if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
228 # define BHV_IS_BHVL(bhp) (0)
230 # endif /* AFS_SGI64_ENV */
231 # include "fs/efs_inode.h"
232 # include "sys/kmem.h"
233 # include "sys/cred.h"
234 # include "sys/resource.h"
237 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
238 * is on (see afs_osi.h).
239 * In IRIX 6.5 we cannot have DEBUG turned on since certain
240 * system-defined structures have different members with DEBUG on, and
241 * this breaks our ability to interact with the rest of the kernel.
243 * Instead of using ASSERT(), we use our own osi_Assert().
245 # if defined(AFS_SGI65_ENV) && !defined(DEBUG)
247 # include "sys/debug.h"
250 # include "sys/debug.h"
253 # include "sys/statvfs.h"
254 # include "sys/sysmacros.h"
255 # include "sys/fs_subr.h"
256 # include "sys/siginfo.h"
258 # endif /* AFS_SGI_ENV */
260 # if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
261 # include "h/kernel.h"
262 # endif /* !SUN5 && !SGI */
265 # include <sys/cmn_err.h> /* for kernel printf() prototype */
266 # include "h/vfs.h" /* stops SUN5 socketvar.h warnings */
267 # include "h/stropts.h" /* stops SUN5 socketvar.h warnings */
268 # include "h/stream.h" /* stops SUN5 socketvar.h errors */
271 # ifdef AFS_SUN510_ENV
272 # include <sys/cred_impl.h>
273 # include <sys/policy.h>
276 # include "h/socket.h"
277 # include "h/socketvar.h"
278 # include "h/protosw.h"
280 # if defined(AFS_FBSD_ENV)
288 # if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || \
289 defined(AFS_FBSD_ENV) || defined(AFS_NBSD40_ENV)
290 # include "h/dirent.h"
292 # include "h/sysmacros.h"
293 # include "h/fs/ufs_fsdir.h"
294 # endif /* AFS_SUN5_ENV */
297 # endif /* SGI || SUN || HPUX */
299 # if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV) && \
300 !defined(AFS_NBSD40_ENV)
302 # endif /* AFS_SGI64_ENV */
303 # define MACH_USER_API 1
304 # if defined(AFS_FBSD_ENV)
306 # include "h/filedesc.h"
314 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
316 # include "h/statvfs.h"
317 # endif /* AFS_SUN5_ENV */
319 struct vfspage; /* for vnode.h compiler warnings */
320 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
321 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
322 # ifdef AFS_HPUX110_ENV
323 # include "h/resource.h"
325 # ifdef AFS_HPUX1123_ENV
326 # include <sys/user.h>
327 # include <sys/cred.h>
329 # endif /* AFS_HPUX_ENV */
330 # if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
331 # if defined(AFS_FBSD_ENV)
332 struct vop_getwritemount_args;
334 # include <sys/uio.h>
335 # include <sys/mount.h>
336 # include <sys/namei.h>
337 # ifdef AFS_DARWIN80_ENV
338 # include <sys/kauth.h>
341 # include <sys/vnode.h>
342 # include <sys/queue.h>
343 # ifndef AFS_NBSD40_ENV
344 # include <sys/malloc.h>
347 MALLOC_DECLARE(M_AFS);
348 # include <ufs/ufs/dinode.h>
350 # include <vm/vm_extern.h>
351 # include <vm/pmap.h>
352 # include <vm/vm_map.h>
353 # include <sys/lock.h>
354 # include <sys/user.h>
356 # include <sys/ubc.h>
357 # define timeout_fcn_t mach_timeout_fcn_t
358 # include <kern/sched_prim.h>
360 # undef timeout_fcn_t
362 # define doff_t int32_t
363 # ifndef AFS_DARWIN80_ENV
364 # include <ufs/ufs/quota.h>
365 # include <ufs/ufs/inode.h>
366 # include <ufs/ffs/fs.h>
369 # ifndef AFS_NBSD40_ENV
371 # include "h/vnode.h"
374 # include "h/fs/ufs_inode.h"
375 # include "h/fs/ufs_mount.h"
377 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_NBSD40_ENV)
378 # include "ufs/inode.h"
379 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_NBSD40_ENV)
380 # include "ufs/mount.h"
381 # endif /* !AFS_HPUX_ENV */
382 # endif /* !AFS_AIX32_ENV */
383 # endif /* AFS_SUN5_ENV */
384 # endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
386 /* These mainly deal with networking and rpc headers */
387 # include "netinet/in.h"
388 # undef MFREE /* defined at mount.h for AIX */
392 # if !defined(AFS_HPUX_ENV)
395 # endif /* AFS_SUN5_ENV */
397 # include "rpc/types.h"
400 /* Miscellaneous headers */
402 # if !defined(AFS_FBSD_ENV)
403 # include "h/ioctl.h"
404 # endif /* AFS_FBSD_ENV */
406 # if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
407 # include "h/proc_iface.h"
411 # if defined(AFS_HPUX102_ENV)
412 # include "h/unistd.h"
416 # 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) && !defined(AFS_NBSD40_ENV)
422 # if defined(AFS_AIX_ENV)
423 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
425 # include "h/fcntl.h"
428 # if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
429 # include "h/unistd.h"
430 # endif /* SGI || SUN */
432 # ifdef AFS_AIX32_ENV
433 # include "h/vmuser.h"
434 # endif /* AFS_AIX32_ENV */
436 # if defined(AFS_SUN5_ENV)
437 # include <sys/tiuser.h>
438 # include <sys/t_lock.h>
439 # include <sys/mutex.h>
440 # include <sys/vtrace.h>
441 # include <sys/pathname.h>
442 # include <sys/debug.h>
445 #endif /* AFS_LINUX22_ENV */
447 #endif /* __AFS_SYSINCLUDESH__ so idempotent */