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 {
82 #ifndef _LINUX_XFS_FS_I
83 #define _LINUX_XFS_FS_I
84 struct xfs_inode_info {
87 #include <asm/uaccess.h>
88 #include <linux/list.h>
89 #include <linux/dcache.h>
90 #include <linux/mount.h>
92 #include <linux/quota.h>
93 #include <linux/sched.h>
95 #include <linux/slab.h>
96 #include <linux/string.h>
97 #include <asm/semaphore.h>
98 #include <linux/errno.h>
99 #ifdef COMPLETION_H_EXISTS
100 #include <linux/completion.h>
103 #else /* AFS_LINUX22_ENV */
104 #if defined(AFS_DARWIN_ENV)
105 #ifndef _MACH_ETAP_H_
106 #define _MACH_ETAP_H_
107 typedef unsigned short etap_event_t;
110 #if !defined(AFS_OSF_ENV)
120 #include "h/region.h"
122 #include "h/sysmacros.h"
123 #include "h/signal.h"
125 #endif /* AFS_AUX_ENV */
132 #include "sys/statfs.h"
137 #include "../h/file.h"
138 #include "../h/fullstat.h"
139 #include "../h/vattr.h"
140 #include "../h/var.h"
141 #include "../h/access.h"
142 #endif /* AFS_AIX_ENV */
144 #if defined(AFS_SGI_ENV)
146 #include "sys/sema.h"
147 #include "sys/cmn_err.h"
149 #include <ksys/behavior.h>
150 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
151 * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
152 * older headers like we want the old behavior, so we fake it. */
153 #if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
154 #define BHV_IS_BHVL(bhp) (0)
156 #endif /* AFS_SGI64_ENV */
157 #include "fs/efs_inode.h"
158 #ifdef AFS_SGI_EFS_IOPS_ENV
159 #include "sgiefs/efs.h"
161 #include "sys/kmem.h"
162 #include "sys/cred.h"
163 #include "sys/resource.h"
166 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
167 * is on (see afs_osi.h).
168 * In IRIX 6.5 we cannot have DEBUG turned on since certain
169 * system-defined structures have different members with DEBUG on, and
170 * this breaks our ability to interact with the rest of the kernel.
172 * Instead of using ASSERT(), we use our own osi_Assert().
174 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
176 #include "sys/debug.h"
179 #include "sys/debug.h"
182 #include "sys/statvfs.h"
183 #include "sys/sysmacros.h"
184 #include "sys/fs_subr.h"
185 #include "sys/siginfo.h"
186 #endif /* AFS_SGI_ENV */
188 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
189 # include "h/kernel.h"
190 #endif /* !SUN5 && !SGI */
193 #include <sys/cmn_err.h> /* for kernel printf() prototype */
196 #if defined(AFS_SUN56_ENV)
197 #include "h/vfs.h" /* stops SUN56 socketvar.h warnings */
198 #include "h/stropts.h" /* stops SUN56 socketvar.h warnings */
199 #include "h/stream.h" /* stops SUN56 socketvar.h errors */
202 #ifdef AFS_SUN510_ENV
203 #include <sys/cred_impl.h>
206 #include "h/socket.h"
207 #include "h/socketvar.h"
208 #include "h/protosw.h"
210 #if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
211 # include "h/dirent.h"
213 # include "h/sysmacros.h"
214 # include "h/fs/ufs_fsdir.h"
215 # endif /* AFS_SUN5_ENV */
218 #endif /* SGI || SUN || HPUX */
220 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
222 #endif /* AFS_SGI64_ENV */
223 #define MACH_USER_API 1
224 #if defined(AFS_FBSD50_ENV)
226 #include "h/filedesc.h"
234 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
236 # include "h/statvfs.h"
237 # endif /* AFS_SUN5_ENV */
239 struct vfspage; /* for vnode.h compiler warnings */
240 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
241 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
242 #ifdef AFS_HPUX110_ENV
243 # include "h/resource.h"
245 #ifdef AFS_HPUX1123_ENV
246 # include <sys/user.h>
247 # include <sys/cred.h>
249 # endif /* AFS_HPUX_ENV */
250 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
251 # if defined(AFS_FBSD50_ENV)
252 struct vop_getwritemount_args;
254 # include <sys/uio.h>
255 # include <sys/mount.h>
256 # include <sys/namei.h>
257 # include <sys/vnode.h>
258 # include <sys/queue.h>
259 # include <sys/malloc.h>
261 # include <sys/ubc.h>
262 #define timeout_fcn_t mach_timeout_fcn_t
263 # include <kern/sched_prim.h>
265 MALLOC_DECLARE(M_AFS);
266 # include <ufs/ufs/dinode.h>
268 # include <vm/vm_extern.h>
269 # include <vm/pmap.h>
270 # include <vm/vm_map.h>
271 # include <sys/lock.h>
272 # include <sys/user.h>
276 #define doff_t int32_t
277 # include <ufs/ufs/quota.h>
278 # include <ufs/ufs/inode.h>
279 # include <ufs/ffs/fs.h>
282 # include "h/vnode.h"
284 # include "h/fs/ufs_inode.h"
285 # include "h/fs/ufs_mount.h"
287 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
288 # include "ufs/inode.h"
289 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
290 # include "ufs/mount.h"
291 # endif /* !AFS_HPUX_ENV */
292 # endif /* !AFS_AIX32_ENV */
293 # endif /* AFS_SUN5_ENV */
294 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
296 /* These mainly deal with networking and rpc headers */
297 #include "netinet/in.h"
298 #undef MFREE /* defined at mount.h for AIX */
302 #if !defined(AFS_HPUX_ENV)
305 #endif /* AFS_SUN5_ENV */
307 #include "rpc/types.h"
310 /* Miscellaneous headers */
312 #if !defined(AFS_FBSD_ENV)
314 #endif /* AFS_FBSD_ENV */
316 #if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
317 #include "h/proc_iface.h"
321 #if defined(AFS_HPUX102_ENV)
322 #include "h/unistd.h"
326 #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)
332 #if defined(AFS_AIX_ENV)
333 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
335 # include "h/fcntl.h"
338 #if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
339 # include "h/unistd.h"
340 #endif /* SGI || SUN */
343 # include "h/vmuser.h"
344 #endif /* AFS_AIX32_ENV */
346 #if defined(AFS_SUN5_ENV)
347 #include <sys/tiuser.h>
348 #include <sys/t_lock.h>
349 #include <sys/mutex.h>
350 #include <sys/vtrace.h>
351 #include <sys/pathname.h>
352 #include <sys/debug.h>
355 #else /* ! AFS_OSF_ENV */
356 /* All of the OSF/1 stuff is here */
357 #include <net/net_globals.h>
359 #include <sys/types.h>
360 #include <sys/param.h>
361 #include <sys/systm.h>
362 #include <sys/time.h>
363 #include <sys/kernel.h>
364 #include <sys/socket.h>
365 #include <sys/socketvar.h>
366 #include <sys/protosw.h>
368 #include <sys/user.h>
369 #include <sys/file.h>
372 #include <sys/stat.h>
373 #include <sys/vnode.h>
374 #include <ufs/inode.h>
375 #include <sys/mount.h>
376 #include <vm/vm_page.h>
377 #include <mach/vm_param.h>
378 #include <kern/parallel.h>
379 #include <mach/mach_types.h>
380 #ifndef AFS_OSF30_ENV
381 #include <kern/mfs.h>
383 #include <mach/vm_param.h>
384 #include <kern/parallel.h>
386 /* These mainly deal with networking and rpc headers */
387 #include <netinet/in.h>
388 #include <sys/mbuf.h>
389 #include <rpc/types.h>
397 #endif /* AFS_OSF_ENV */
400 #include <sys/proc.h>
401 #include <sys/ioctl.h>
403 #endif /* AFS_OSF_ENV */
404 #endif /* AFS_LINUX22_ENV */
405 #endif /* AFS_OBSD_ENV */
407 #endif /* __AFS_SYSINCLUDESH__ so idempotent */