Retire AFS_MOUNT_AFS Currently, the AFS_MOUNT_AFS #define is used to mean two completely different things: - The string "afs", corresponding to the first argument to mount(2) on many platforms and some related calls inside libafs (e.g. getnewvnode() on FBSD). - An integer identifying the AFS filesystem (e.g. gfsadd() on AIX). Depending on the platform and the build context (UKERNEL vs KERNEL), AFS_MOUNT_AFS gets defined to one of those two things. This is very confusing, and has led to mistakes in the past, such as those fixed in commit 446457a1 (afs: Set AFS_VFSFSID to a numerical value). To avoid such confusion, get rid of AFS_MOUNT_AFS completely, and replace it with two new symbols: - AFS_MOUNT_STR, the string "afs". - AFS_FSNO, the integer given to gfsadd() et al. When AFS_MOUNT_AFS is split this way, AFS_MOUNT_STR then is always defined to the same value, so remove it from the param.h files for our platforms. Instead, define it in afs.h for libafs use, and in afsd_kernel.c (the only place outside of src/afs that uses it). Also remove the logic for conditionally defining MOUNT_AFS from the param.h files, moving the logic to the same locations as AFS_MOUNT_STR. Note that this commit removes the numeric definition for AFS_MOUNT_AFS in param.sgi_65.h (aka AFS_FSNO). We never actually used this value, since AFS_FSNO is not used on IRIX; instead, we tend to use the 'afs_fstype' global instead of a constant number. Change-Id: I6cbf051dc938cd1c456cbe236c0afe99a3c3dd87 Reviewed-on: https://gerrit.openafs.org/14323 Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
afs: Move osi_GetTime out of param.h Most platforms currently #define osi_GetTime in their param.h. This is really redundant, since the definition of osi_GetTime almost never changes for a given platform, so we end up with many copies of the same osi_GetTime definition for a given platform. Move osi_GetTime out of param.h for these platforms, and define it in osi_machdep.h instead, which is where most platform-specific definitions go. For DFBSD, we don't have an osi_machdep.h at all yet, so create a new one to contain the osi_GetTime definition. Currently we don't build libafs at all on DFBSD, but do this anyway so we don't lose the existing osi_GetTime definition. For NBSD, we were providing (conflicting!) definitions for osi_GetTime in param.h and in osi_machdep.h. Just remove the definitions in param.h, since those should have been getting overridden by the osi_machdep.h definition. Change-Id: I7097d9fe2fcd38c06ecc275e8fe3a2c69c9d0436 Reviewed-on: https://gerrit.openafs.org/14237 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Remove dead code There is a perhaps-surprisingly large amount of code disabled behind directives like '#if 0', '#ifdef notdef', and '#ifdef notyet'. At best, this code is clutter, and at worst some of it is confusing/outdated, and/or confusingly nested inside other preprocessor conditionals. Sometimes this disabled code shows up when grepping the tree, and causes a nuisance when refactoring related areas of code. Get rid of all of it. If anyone ever wants this code back, it can always be restored by reverting portions of this commit. Also delete some comments that clearly refer to the disabled code, and in some cases, adjust the adjacent comments to make sense accordingly. This commit doesn't touch any files in src/external/. Change-Id: If260a41257e8d107930bd3c177eddb8ab336f0d1 Reviewed-on: https://gerrit.openafs.org/13683 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Remove nonsensical bozon-lock defines Currently there are two preprocessor defines related to bozon locks: AFS_BOZONLOCK_ENV, and AFS_NOBOZO_LOCK. The former creates the pvnLock member of a struct vcache, and controls calls to e.g. afs_BozonLock in cross-platform code. The latter, if defined, turns calls to e.g. afs_BozonLock into no-ops. It doesn't make any sense to have both of these, since if AFS_BOZONLOCK_ENV and AFS_NOBOZO_LOCK are defined, the pvnLock member exists but is never used, since afs_BozonLock &co are no-ops. On Solaris, the only platform where AFS_NOBOZO_LOCK is currently defined (DUX used to define it before DUX was dropped), this is the case. So to make things a bit more clear, get rid of the AFS_NOBOZO_LOCK define, and just use AFS_BOZONLOCK_ENV to dictate whether we do anything with bozon locks (ppc_darwin_80 appears to be the only platform at this time). Remove AFS_BOZONLOCK_ENV from Solaris param files, since it doesn't use bozon locks. Remove all references to pvnLock in Solaris-specific code. Change-Id: Id72c14ec5485d35b853d38e2ea1a944a385f2b5b Reviewed-on: http://gerrit.openafs.org/4889 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Remove support for Solaris pre-8 Remove support for all Solaris and SunOS platforms prior to Solaris 8, since Solaris 7 reached end-of-life in August of 2008. Remove all non-documentation references to sunx86_57 and earlier, sun4x_57 and earlier, and AFS_SUN57_ENV and earlier. References to AFS_SUN58_ENV have been changed to AFS_SUN5_ENV where appropriate, and AFS_SUN5_ENV now implies Solaris 8. AFS_SUN57_64BIT_ENV has been renamed to AFS_SUN5_64BIT_ENV. Change-Id: Ia64ce7da7bfc685fa28a5119c51ec740625456e3 Reviewed-on: http://gerrit.openafs.org/4888 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Kill AFS_64BIT_ENV The AFS_64BIT_ENV was being pretty much universally defined. So, remove the definition, and the conditional code that it controlled. From this point on, all platforms are assumed to be capable of handling 64bit values. Change-Id: I3e4bde502af9f33f6998637c288e8fd0898ffa81 Reviewed-on: http://gerrit.openafs.org/2870 Tested-by: Jeffrey Altman <jaltman@openafs.org> Reviewed-by: Jeffrey Altman <jaltman@openafs.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>
Do not turn off AFS_HAVE_STATVFS for UKERNEL Many param files turn off AFS_HAVE_STATVFS for UKERNEL. We obviously still have statvfs() available whether we are running with UKERNEL or not, so modify param files to enable it for UKERNEL if it was enabled for non-UKERNEL. The only places using this define are afsd and vol/partition.c, the latter of which will not be affected. Change-Id: I1f276c88cbe0ca401580a564be664a7fc6739fde Reviewed-on: http://gerrit.openafs.org/1743 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Remove AFS_USEBUFFERS The AFS_USEBUFFERS code has been disabled for all supported platforms since the initial OpenAFS code drop. Simplify the buffers code by removing it entirely. Change-Id: Iab6b2d54361eca1a1446b4804b3d6533d75f2831 Reviewed-on: http://gerrit.openafs.org/894 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org>
solaris-largepartition-interface-20081222 LICENSE IPL10 add support for using statvfs64 on solaris
solaris-uniqtime32-20051223 FIXES 24445 afs really wants the 32 bit timeval/uniqtime stuff
solars-sparc32-largefile-20051011 readd largefile support for solaris sparc32
solaris-largefile-not-on-ia32-20050417 disable largefile on solaris x86 32 bit
openafs-kill-dead-code-20050403 Code ifdef'd any of AFS_MACH_ENV, AFS_GFS_ENV, AFS_DEC_ENV dies Code ifdef'd AFS_SUN_ENV either becomes AFS_SUN5_ENV or dies as appropriate, in the kernel only. The database servers etc are probably still buildable, and I still have a SunOS 4.1.4 machine. ;-) But the Solaris vnops get all SunOS 4 code nuked. Uses of AFS_ALPHA_ENV which secretly meant OSF/1,D/UX,Tru64 become AFS_OSF_ENV. Bozon lock use gets its own ifdef. OSF and Solaris define it. Darwin and any BSDs have bozon lock usage removed: note that only OSF and Solaris were bothering to *init* the bozon lock during NewVCache. Bozon locks are for platforms where basically we could end up deadlocking ourselves because of how locks are handled. Some nonsensical ifdefs removed. Some if 0'd code removed. Some obsolete code (hpux pre-10, for instance) removed.
solaris-largefile-client-20040808 enable largefile client for sparc and x86 solaris 8 and on.