[OpenAFS-devel] Patch to make openafs-1.3.79+ work on AIX5
Niklas Edmundsson
Niklas.Edmundsson@hpc2n.umu.se
Thu, 24 Mar 2005 10:58:57 +0100 (MET)
This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
---559023410-758783491-1111658337=:22795
Content-Type: TEXT/PLAIN; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8BIT
This patch makes the kernel module for OpenAFS work properly on AIX.
Client (1.3.79) tested by me on:
AIX 5.1, 32bit, both UP and MP.
and (1.3.80) by Michael Niksch on:
rs_aix42 (as rs_aix43) on AIX 4330-11 bos.up 4.3.3.93
rs_aix51 on AIX 5100-07 bos.mp 5.1.0.64
rs_aix52 on AIX 5200-05 bos.mp 5.2.0.54
rs_aix52 on AIX 5200-05 bos.mp64 5.2.0.54
Horst Birthelmer has tested the server-stuff and found it still
working.
Executive summary of the patch:
* Removed memory allocation functions only used on AIX and ancient
HPUX. If the performance penalty is noticeable, implement a wrapper
at the osi-level in the same manner as LINUX/FBSD (ie not sprayed
throughout the code).
* Removed all remnants of splnet()-style locking, it was not
sufficient for MP anyway which the real locks are. Affects only AIX
and HPUX.
* Drop the global locking in rxi_Alloc since the real locks do their
jobs, affects only AIX41 and up (ie. MP capable OS).
* Fix the non-kernel wrapper for osi_Alloc/Free on AIX to take void *
in the same manner as the rest of the functions. IMO this wrapper
shouldn't be necessary since you should never ever malloc() 0 bytes,
but since it's there I'd guess someone made stupid assumptions
somewhere...
* Restores MAXKTCTICKETLEN to 12000 on AIX
* Restores AFS_LWP_MINSTACKSIZE to 48k on AIX (might affect
server-stuff)
This should be commited to the openafs-tree as soon as possible so we
can get a bit wider testing and find out if there are more remaining
problems on AIX than the following:
* -afsdb -dynroot doesn't seem to work (returns ENOENT immediately)
* klog dumps core
* login configured to use afs_dynamic_auth fails
* Horst has problems with mysterious hangs
/Nikke
--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Niklas Edmundsson, Admin @ {acc,hpc2n}.umu.se | nikke@hpc2n.umu.se
---------------------------------------------------------------------------
*Ù *Ù <- Tribbles Snorkelling
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
---559023410-758783491-1111658337=:22795
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=openafs-1.3.79-aix5-alloc.patch
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.62.0503241058570.22795@khan.acc.umu.se>
Content-Description:
Content-Disposition: attachment; filename=openafs-1.3.79-aix5-alloc.patch
ZGlmZiAtd3J1IC4uL29wZW5hZnMtMS4zLjc5Lm9yaWcvc3JjL2Fmcy9hZnNf
ZGFlbW9ucy5jIC4vc3JjL2Fmcy9hZnNfZGFlbW9ucy5jDQotLS0gLi4vb3Bl
bmFmcy0xLjMuNzkub3JpZy9zcmMvYWZzL2Fmc19kYWVtb25zLmMJVHVlIERl
YyAgNyAwNzoxMjoxMSAyMDA0DQorKysgLi9zcmMvYWZzL2Fmc19kYWVtb25z
LmMJTW9uIE1hciAxNCAxMDoyODoyOSAyMDA1DQpAQCAtMTQ1LDIyICsxNDUs
NiBAQA0KIAlhZnNfRmx1c2hWQ0JzKDEpOwkvKiBmbHVzaCBxdWV1ZWQgY2Fs
bGJhY2tzICovDQogCWFmc19NYXliZVdha2V1cFRydW5jYXRlRGFlbW9uKCk7
CS8qIGZyZWUgY2FjaGUgc3BhY2UgaWYgaGF2ZSB0b28gKi8NCiAJcnhfQ2hl
Y2tQYWNrZXRzKCk7CS8qIERvZXMgUlggbmVlZCBtb3JlIHBhY2tldHM/ICov
DQotI2lmCWRlZmluZWQoQUZTX0FJWDMyX0VOVikgfHwgZGVmaW5lZChBRlNf
SFBVWF9FTlYpDQotCS8qIA0KLQkgKiBIYWNrOiBXZSBhbHdheXMgd2FudCB0
byBtYWtlIHN1cmUgdGhl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