Change AFS*_LINUXnn_ENV to AFS*_LINUX_ENV The minimum Linux kernel that is now supported is linux-2.6.18. The Linux versioned preprocessor macros AFS_*LINUXnn_ENV are no longer needed to distinguish the different levels of Linux and can be merged into just a single set of macros. Perform a global change of _LINUX\d+_ENV to _LINUX_ENV. e.g. AFS_LINUX24_ENV -> AFS_LINUX_ENV AFS_USR_LINUX24_ENV -> AFS_USR_LINUX_ENV AFS_AMD64_LINUX20_ENV -> AFS_AMD64_LINUX_ENV Replace the multiple definitions for the versioned 'AFS*_LINUXnn_ENV' with just single non-version definitions 'AFS*_LINUX_ENV'. Apart from replacing the now-redundant #define directives and tidying up a few comments at the close of a preprocessor block to match their current form, this commit was done using a mechanical change of the variable names and did not reduce preprocessor statements that could now be combined or eliminated. Nor does this commit remove dead code. A follow-up commit (Cleanup AFS_*LINUX_ENV usage) will handle these changes. The updates should have no functional changes. Change-Id: I71e32ca9818d28f82b4f23679868d1b9a62c44bd Reviewed-on: https://gerrit.openafs.org/14387 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
afs: Actually free resources during warm shutdown Currently, the shutdown_*() code paths for several subsystems only free the memory for that subsystem for "cold" shutdowns, and not for "warm" shutdowns. This means the memory gets leaked during a "warm" shutdown, since we never free these resources anywhere else. Specifically, this happens in shutdown_bufferpackage, shutdown_AFS, and shutdown_osinet. To avoid these leaks for warm shutdowns, just move the afs_cold_shutdown check around a little, so we free the relevant items in either codepath. Change-Id: I748311784f512b3e2f25bdcaa6629108a5790212 Reviewed-on: https://gerrit.openafs.org/13716 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
FBSD: Remove unnecessary explicit osi_fbsd_alloc AFS_KALLOC is already defined to be osi_fbsd_alloc on FBSD, so this extra #ifdef here is completely unnecessary. Remove it. Do the same for AFS_KFREE/osi_fbsd_free. Change-Id: I3e42ec433a732402cc9de9ba9c035774ec29c2a5 Reviewed-on: https://gerrit.openafs.org/13708 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: BuildBot <buildbot@rampaginggeek.com>
afs: Make afs_osi_Free(NULL) a no-op In userspace, we assume that free(NULL) does nothing, which makes certain cleanup code paths simpler. This may or may not be true for our free() abstractions that can run in the kernel (like afs_osi_Free, rxi_Free, etc), which is confusing. To make the higher-level free() abstractions more consistent, change afs_osi_Free to guarantee that passing a NULL pointer does nothing. Change-Id: If7c7011795f66464eeb578eacfc943475b4d59f8 Reviewed-on: https://gerrit.openafs.org/13236 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Port cache manager to NetBSD-5 and NetBSD-current Change-Id: I3d1aa0b22bb8533718f48bd4424743299d5de019 Reviewed-on: http://gerrit.openafs.org/4661 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
OpenBSD: Fix use of macros for AFS_KALLOC/AFS_KFREE The macro definitions for AFS_KALLOC and AFS_KFREE used by afs_osi_alloc.c to perform OS-specific memory allocation are only defined by the OpenBSD osi_machdep.h header file if they already exist, which means: never. This patch fixes this situtation and makes sure that afs_osi_alloc.c actually uses them, eliminating a direct OS-specific call in afs_osi_alloc.c. Change-Id: Ida1608774de3bc5861b223574f3cbf0d9647266c Reviewed-on: http://gerrit.openafs.org/3682 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs: clean afs_osi_Alloc() usage Add asserts for any failures cases not explicitly handled and remove any casting. Change-Id: I282d917ab84b37012553233f2c913b2aef1c92e2 Reviewed-on: http://gerrit.openafs.org/3012 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs: simplify afs_osi_alloc.c remove the osimem struct and related casts Change-Id: I25c6b0101ce0ec03c9930ab79c05190defb1529d Reviewed-on: http://gerrit.openafs.org/3011 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs: afs_osi_Alloc_NoSleep() cleanup afs_osi_Alloc_NoSleep() is no longer used by the SOLARIS or IRIX clients. It is used by the *BSD code in rx, so just let those platforms define/prototype it in their osi_machdep.h Change-Id: Ie2e4a6f7520329c345ac63c67d7b156ed21d109f Reviewed-on: http://gerrit.openafs.org/3010 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Allow private implementations of osi_AllocSmall/LargeSpace NBSD seemed to already do this at one point but was partly disabled. This patches generalizes this feature by adding a define to disable the standard pool macros. Linux's slab based allocator should out perform this single threaded allocator/pool. Change-Id: Id8d498c11874b7d87736968b99f7ca023af4af36 Reviewed-on: http://gerrit.openafs.org/2998 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Updates to the Cache Manager to include NetBSD5 support LKM currently builds and will mount when forced with the entry point manually defined. Contents of /afs can be discovered, but when listing the directory, the system call will not return. Change-Id: I68ba1897b56613bd4ebbe331eea3140c6a963a7d Reviewed-on: http://gerrit.openafs.org/2767 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
death to trailing whitespace if we're gonna clean up... Change-Id: I5ab03f29468577b62dacab41a67eadfd8c43f812 Reviewed-on: http://gerrit.openafs.org/2463 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
death to register in soviet compilers, compiler optimizes you. stop providing dated (and annoying for debugging) register keywords. Change-Id: Ibcac0aa3f353fe531b9be0beedca919fb947bfab Reviewed-on: http://gerrit.openafs.org/2436 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
OpenBSD: Use osi_obsd_Free() for all releases of OBSD Use osi_obsd_Free() in afs_osi_Free() for all releases of OpenBSD, not just releases from 4.4 onward. Otherwise, afs_osi_Free() will use AFS_KFREE, which does not exist, since OBSD/osi_machdep.h is not included, resulting in unresolved symbols when trying to load the kernel module. Change-Id: Ic9632c9df347cc17e122b6302ef14e63fa5b68b4 Reviewed-on: http://gerrit.openafs.org/1910 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
netbsd: rebase cm at NetBSD 4.0 Rebases the NetBSD client port at OpenBSD, which was originally based on an original NetBSD client port by John Kohl. The platforms remain closely connected. At latest milestone, the port builds as a NetBSD LKM, which was loadable and can mount /afs (but much work remains past this point). Change-Id: I1381a60078794da03a82e7bf6e78127da82d61ee Change-Id: I8e07e82796f6981c99d22ff50dd5b284aad88a9f Reviewed-on: http://gerrit.openafs.org/1874 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove 'M' variants of lock macros Since the beginning, we've had M variants of the lock macros, which are identical to the normal form. Dispose of these variants, to make it clearer what's going on. Change-Id: I0b7708ec670ef0edb4c1dc21d472e5041d31f6a2 Reviewed-on: http://gerrit.openafs.org/807 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Remove the RCSID macro The move to git means that we can no longer populate the RCSID macro in the way that it was used with CVS. This patch simply removes the macro from every file, except where it contains information from upstream (and it's in a comment). Reviewed-on: http://gerrit.openafs.org/14 Verified-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Derrick Brashear <shadow@dementia.org>
openbsd-44-45-20090512 LICENSE IPL10 FIXES 124719 add missing osi_free backend, missing param file, modify soreceive for 4.5
linux-warning-reduction-20090318 LICENSE IPL10 FIXES 119434 cleanup warnings in linux kernel builds
freebsd-70-client-20080826 LICENSE IPL10 FreeBSD 7.0 client support (and 8.0 support but that's a moving target)