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 #define _LINUX_CODA_FS_I
77 struct coda_inode_info {
79 #define _LINUX_XFS_FS_I
80 struct xfs_inode_info {
82 #include <asm/uaccess.h>
83 #include <linux/list.h>
84 #include <linux/dcache.h>
86 #include <linux/quota.h>
87 #include <linux/sched.h>
89 #include <linux/string.h>
90 #include <asm/semaphore.h>
91 #include <linux/errno.h>
92 #ifdef COMPLETION_H_EXISTS
93 #include <linux/completion.h>
96 #else /* AFS_LINUX22_ENV */
97 #if defined(AFS_DARWIN_ENV)
100 typedef unsigned short etap_event_t;
103 #if !defined(AFS_OSF_ENV)
113 #include "h/region.h"
115 #include "h/sysmacros.h"
116 #include "h/signal.h"
118 #endif /* AFS_AUX_ENV */
125 #include "sys/statfs.h"
130 #include "../h/file.h"
131 #include "../h/fullstat.h"
132 #include "../h/vattr.h"
133 #include "../h/var.h"
134 #include "../h/access.h"
135 #endif /* AFS_AIX_ENV */
137 #if defined(AFS_SGI_ENV)
139 #include "sys/sema.h"
140 #include "sys/cmn_err.h"
142 #include <ksys/behavior.h>
143 #endif /* AFS_SGI64_ENV */
144 #include "fs/efs_inode.h"
145 #ifdef AFS_SGI_EFS_IOPS_ENV
146 #include "sgiefs/efs.h"
148 #include "sys/kmem.h"
149 #include "sys/cred.h"
150 #include "sys/resource.h"
153 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
154 * is on (see afs_osi.h).
155 * In IRIX 6.5 we cannot have DEBUG turned on since certain
156 * system-defined structures have different members with DEBUG on, and
157 * this breaks our ability to interact with the rest of the kernel.
159 * Instead of using ASSERT(), we use our own osi_Assert().
161 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
163 #include "sys/debug.h"
166 #include "sys/debug.h"
169 #include "sys/statvfs.h"
170 #include "sys/sysmacros.h"
171 #include "sys/fs_subr.h"
172 #include "sys/siginfo.h"
173 #endif /* AFS_SGI_ENV */
175 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
176 # include "h/kernel.h"
177 #endif /* !SUN5 && !SGI */
180 #include <sys/cmn_err.h> /* for kernel printf() prototype */
183 #if defined(AFS_SUN56_ENV)
184 #include "h/vfs.h" /* stops SUN56 socketvar.h warnings */
185 #include "h/stropts.h" /* stops SUN56 socketvar.h warnings */
186 #include "h/stream.h" /* stops SUN56 socketvar.h errors */
189 #include "h/socket.h"
190 #include "h/socketvar.h"
191 #include "h/protosw.h"
193 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
194 # include "h/dirent.h"
196 # include "h/sysmacros.h"
197 # include "h/fs/ufs_fsdir.h"
198 # endif /* AFS_SUN5_ENV */
201 #endif /* SGI || SUN || HPUX */
204 # include "h/smp_lock.h"
205 #endif /* AFS_DEC_ENV */
208 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
210 #endif /* AFS_SGI64_ENV */
211 #define MACH_USER_API 1
212 #if defined(AFS_FBSD50_ENV)
214 #include "h/filedesc.h"
222 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
224 # include "h/mount.h"
225 # include "machine/psl.h"
226 # include "afs/gfs_vnode.h"
230 # include <vfs/vfs.h>
231 # include <vfs/vnode.h>
232 # include <sys/inode.h>
233 # include <sys/mount.h>
234 # include <vm/vm_pager.h>
235 # include <kern/mfs.h>
236 # include <mach/vm_param.h>
237 # include <kern/parallel.h>
238 #endif /* AFS_MACH_ENV */
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 # 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 # include <ufs/ufs/quota.h>
284 # include <ufs/ufs/inode.h>
285 # include <ufs/ffs/fs.h>
288 # include "h/vnode.h"
290 # include "h/fs/ufs_inode.h"
291 # include "h/fs/ufs_mount.h"
293 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
294 # include "ufs/inode.h"
295 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
296 # include "ufs/mount.h"
297 # endif /* !AFS_HPUX_ENV */
298 # endif /* !AFS_AIX32_ENV */
299 # endif /* AFS_SUN5_ENV */
300 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
301 #endif /* AFS_DEC_ENV */
303 /* These mainly deal with networking and rpc headers */
304 #include "netinet/in.h"
305 #undef MFREE /* defined at mount.h for AIX */
309 #if !defined(AFS_HPUX_ENV)
312 #endif /* AFS_SUN5_ENV */
314 #include "rpc/types.h"
318 # include "net/spl.h"
321 /* Miscellaneous headers */
323 #if !defined(AFS_FBSD_ENV)
325 #endif /* AFS_FBSD_ENV */
327 #if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
328 #include "h/proc_iface.h"
332 #if defined(AFS_HPUX102_ENV)
333 #include "h/unistd.h"
337 #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN_ENV) && !defined(AFS_MACH_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
343 #if defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
344 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
346 # include "h/fcntl.h"
347 #endif /* AIX || DEC */
349 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
350 # include "h/unistd.h"
351 #endif /* SGI || SUN */
354 # include "h/vmuser.h"
355 #endif /* AFS_AIX32_ENV */
357 #if defined(AFS_SUN5_ENV)
358 #include <sys/tiuser.h>
359 #include <sys/t_lock.h>
360 #include <sys/mutex.h>
361 #include <sys/vtrace.h>
362 #include <sys/pathname.h>
363 #include <sys/debug.h>
366 #else /* ! AFS_OSF_ENV */
367 /* All of the OSF/1 stuff is here */
368 #include <net/net_globals.h>
370 #include <sys/types.h>
371 #include <sys/param.h>
372 #include <sys/systm.h>
373 #include <sys/time.h>
374 #include <sys/kernel.h>
375 #include <sys/socket.h>
376 #include <sys/socketvar.h>
377 #include <sys/protosw.h>
379 #include <sys/user.h>
380 #include <sys/file.h>
383 #include <sys/stat.h>
384 #include <sys/vnode.h>
385 #include <ufs/inode.h>
386 #include <sys/mount.h>
387 #include <vm/vm_page.h>
388 #include <mach/vm_param.h>
389 #include <kern/parallel.h>
390 #include <mach/mach_types.h>
391 #ifndef AFS_OSF30_ENV
392 #include <kern/mfs.h>
394 #include <mach/vm_param.h>
395 #include <kern/parallel.h>
397 /* These mainly deal with networking and rpc headers */
398 #include <netinet/in.h>
399 #include <sys/mbuf.h>
400 #include <rpc/types.h>
408 #endif /* AFS_ALPHA_ENV */
411 #include <sys/proc.h>
412 #include <sys/ioctl.h>
414 #endif /* AFS_OSF_ENV */
415 #endif /* AFS_LINUX22_ENV */
416 #endif /* AFS_OBSD_ENV */
418 #endif /* __AFS_SYSINCLUDESH__ so idempotent */