commit 67418ecf80a48662aefe7763601ef200f02b4a38 Author: Jeffrey Altman Date: Sun Dec 18 19:23:45 2011 -0500 Windows: version 1.7.4 Change-Id: I75331de08d274c192dbd84172fd77d00d66d3c18 Reviewed-on: http://gerrit.openafs.org/6381 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 62cb0545e58b52ed2c4667c023e6f27a875b5d8a Author: Jeffrey Altman Date: Sun Dec 18 12:08:01 2011 -0500 Windows: ChangeLog for 1.7.4 Change-Id: Ia68d35422fe8c3526ddf77aec7c0f701c02e2dd1 Reviewed-on: http://gerrit.openafs.org/6380 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91e925277707d0e4951d20cbfdb6b3c90fff95ab Author: Jeffrey Altman Date: Sun Dec 18 18:36:14 2011 -0500 Windows: avoid deadlock during SetRenameInformation The VolumeLock must be held before the Fcb->NPFcb->Resource. Obtain the VolumeLock in AFSSetFileInformation only in the rename case instead of obtaining the VolumeLockin AFSSetRenameInformation. Reviewed-on: http://gerrit.openafs.org/6377 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ad2965bad8e8b2f085d05be661086dc81da52d3) Change-Id: I25f15d4a1de563df6e5ed4ba678e0ce9b0a58323 Reviewed-on: http://gerrit.openafs.org/6379 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f297830f834f2a6d496ce6d7f9c9fa630232473d Author: Jeffrey Altman Date: Sun Dec 18 12:08:24 2011 -0500 Windows: terminate HOSTS/LMHOSTS with newline If the original file did not terminate with a newline, add one before appending the "AFS" entry. FIXES 130210 Reviewed-on: http://gerrit.openafs.org/6375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d8f9141fa98df50ce682364ef5a7958ce422613) Change-Id: I4aa1644436f7a4eb80c0a3ab757e8363b0193f3f Reviewed-on: http://gerrit.openafs.org/6378 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 526918cb2ecea86cea9cd8c78c1983f8cca50b71 Author: Jeffrey Altman Date: Fri Dec 16 00:12:39 2011 -0500 Windows: save fid/type for redirector invalidation Must save the fid/type fields of the cm_scache_t object before recycling in order to invalidate the contents in the redirector. Reviewed-on: http://gerrit.openafs.org/6359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit db9e5775dd26e6362820b7267f8d971f62dfe2ed) Change-Id: Ifdaca37a68f4a159149738f14a47bd800d19ec96 Reviewed-on: http://gerrit.openafs.org/6366 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6f5474dc1acc08c4c792a5c1ca98af4a4f71d96 Author: Peter Scott Date: Wed Dec 14 12:27:54 2011 -0700 Windows: Track AuthGroup in Context Control Block Tracking the AuthGroup in the File Control Block proved to be insufficient to ensure that dirty extents can be stored back to the file server when an anti-virus service opens a file in authgroup without 'write' permission immediate after the application performing a WriteFile() opens it. In this situation the Fcb ends up with the AuthGroup set to the anti-virus value and not the one that belongs to the writing application. Tracking the AuthGroup by Ccb provides the ability to select an AuthGroup from the list of open handles instead of tracking the most recent one. Reviewed-on: http://gerrit.openafs.org/6333 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 92bfaae062c596d678220dcb93f9dc61304d3c5a) Change-Id: I8c3775d7e4ca8c0747309d3f081fb5d01f74b996 Reviewed-on: http://gerrit.openafs.org/6374 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 73e785e7d8ef9549d00e408b34fa5281185f552f Author: Jeffrey Altman Date: Sat Dec 17 12:14:28 2011 -0500 Windows: Tear down extents upon file deletion When processing AFS_INVALIDATE_REMOVED, tear down all extents since they are no longer necessary and return them to the service for recycling. Change-Id: Iec6c0d2c68db16dbf3bd04c51536e13d45f0c1b8 Reviewed-on: http://gerrit.openafs.org/6365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 714ae7f1840757e0575d25c910b0b9fa2499e354) Reviewed-on: http://gerrit.openafs.org/6373 commit 8f448cb6fe838037d7a68f7d70b76bb6de19f4bc Author: Jeffrey Altman Date: Sat Dec 17 12:13:17 2011 -0500 Windows: notify file size change if flushed When processing AFS_INVALIDATE_FLUSHED, notify any listeners that the file size has changed to force a complete refresh. Reviewed-on: http://gerrit.openafs.org/6364 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit c29dc399769c54bbab4af5bd4f828f0d49755860) Change-Id: Idc13f09dd8458881cd1b94e0a3902092116b347c Reviewed-on: http://gerrit.openafs.org/6372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72a6715b379ca9c36ba4d0184528b4abb114db2c Author: Jeffrey Altman Date: Sat Dec 17 12:08:49 2011 -0500 Windows: forget data version only for flushing The AFS redirector was intentionally forgetting the data version number for AFS_INVALIDATE_DATA_VERSION events. The point of that event is to ensure that clean data be purged if the data version in fact changed. Checking the data version for change cannot be performed if the data version is reset to -1. Only when AFS_INVALIDATE_FLUSHED is processed should the data version be reset to ensure that all of the data is purged. Reviewed-on: http://gerrit.openafs.org/6363 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20d986fddf6b21abc58b2f3c24aac425cf5d2bf0) Change-Id: I4c45b5f5b8738d057621059f34faa0670b5f1545 Reviewed-on: http://gerrit.openafs.org/6371 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f2a3371c5f18c69e334814170e640f58cc703fa6 Author: Jeffrey Altman Date: Sat Dec 17 12:07:53 2011 -0500 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/6362 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit ef31f0f6d1f23bcd882740db4d54a9ffea6e0a64) Change-Id: I5255bd95e308a540ced80c622cfedf5e1776ce27 Reviewed-on: http://gerrit.openafs.org/6370 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4632975defcda4a508bbbbaa1510721fa4619ff2 Author: Jeffrey Altman Date: Sat Dec 17 11:57:15 2011 -0500 Windows: AFSSetRenameInfo log message Fix a typo in the log message and change its priority from error to verbose Reviewed-on: http://gerrit.openafs.org/6361 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 20c871cc67f332f77b1b766f15b2659c0fab8e40) Change-Id: Id5f18a6c33619265bbd590acba68a09c8a8f4a71 Reviewed-on: http://gerrit.openafs.org/6369 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 71a45192777562054d1920428e760d872eb2af19 Author: Jeffrey Altman Date: Fri Dec 16 17:24:36 2011 -0500 Windows: return error to system paging requests If an error has been set on a file, return that error to the System process for any outstanding extent requests. Reviewed-on: http://gerrit.openafs.org/6360 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit d142082caed1eba870ffee017193883a0508306e) Change-Id: I9181665a8df899f72bca113da67ec1a388a9723f Reviewed-on: http://gerrit.openafs.org/6368 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit adea911be96b6df5529e5f8f50ef6ed116c4fbbe Author: Jeffrey Altman Date: Fri Dec 16 18:24:50 2011 -0500 Windows: log volume and authgroup for redir open If opening a volume root fails, log the authgroup and volume to make it easier to debug the error. Reviewed-on: http://gerrit.openafs.org/6352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 307856353c3f168105ce82f3f3fa8e4c5efb0b6c) Change-Id: Ib35ea15775cdbd5d6b4ab39d900a2f4d37942f51 Reviewed-on: http://gerrit.openafs.org/6367 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2de29702cd5ac928f3bd88a973eaa100f9bdf0a9 Author: Jeffrey Altman Date: Fri Dec 16 17:22:49 2011 -0500 Windows: move to head of queue no-op if not in queue If the buffer is not in the queue, do nothing. Reviewed-on: http://gerrit.openafs.org/6351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0b2639ff4fd732dfac2c1dc058d6c517cc966737) Change-Id: Iacc2e9ab5c8502b9c5e125513cd25a805edff366 Reviewed-on: http://gerrit.openafs.org/6357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a3376c0765bacc139ba194d2c5bc104d72ba7905 Author: Jeffrey Altman Date: Fri Dec 16 16:15:56 2011 -0500 Windows: Properly convert FID structures Use the FID conversion function in RDR_SetFileStatus(). The FID structures are not the same in afsd_service and the afsredirlib.sys driver. Reviewed-on: http://gerrit.openafs.org/6350 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b63ff1319e0ebecdfbdef7365d49d02543bccce8) Change-Id: I897448870ee5eba1aaf45e066e261e4c3ea0529d Reviewed-on: http://gerrit.openafs.org/6356 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5ad8376c57d677e010fb6fe45afd4266eab109f5 Author: Jeffrey Altman Date: Fri Dec 16 11:43:32 2011 -0500 Windows: propagate directory enumeration failures If a directory is enumerated with an AuthGroup that has no permissions, do not treat the enumeration as successful. Reviewed-on: http://gerrit.openafs.org/6344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b3e6db22a1755b7633b522dfe5cbb61949e06466) Change-Id: I38acef1c143cb3821aca5d9527ddf12aff8f94ad Reviewed-on: http://gerrit.openafs.org/6355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ae13423fab775a6b2bedc890c53d626c4c53b0c1 Author: Peter Scott Date: Thu Dec 15 17:52:54 2011 -0700 Windows Problem with cross-directory rename Not correctly handling cross-directory rename processing Reviewed-on: http://gerrit.openafs.org/6343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f73685c233974403fe63795303cd1659c5bcb2af) Change-Id: Ie3a87bf2767ab966b945e327a9770d16e2de065f Reviewed-on: http://gerrit.openafs.org/6354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec8f5e7682ac322b06d6189763553df1249faae0 Author: Jeffrey Altman Date: Wed Dec 14 12:58:36 2011 -0500 Windows: Update Adv Firewall Rules Do not specify the Service Name property. According to feedback on openafs-info the Service Name blocks the rule from working properly. If the rule already exists, attempt to remove the Service Name filter and update NAT Edge Traversal and Permitted interface rules. Reviewed-on: http://gerrit.openafs.org/6332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d472f94ab1017724e56bcdd29b9ef451a13f182) Change-Id: I81d083321c5ada5451d1a63166d5d9604652fe6c Reviewed-on: http://gerrit.openafs.org/6353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d9441580223afd8dcaf396cde1992bf04bc7e755 Author: Jeffrey Altman Date: Tue Dec 13 23:28:15 2011 -0500 Windows: AFSRDFSProvider stack overrun StringCchXXX functions take the number of characters not the number of bytes. Use StringCbXXXX functions whenever the buffer size is being specified. Check return codes from StringXXXXXX functions and return errors instead of blindly continuing with a truncated string. Allocate a larger buffer for substitution strings since they need to handle the device path plus the target path. FIXES 130392 Reviewed-on: http://gerrit.openafs.org/6248 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit da89855b492d8d06128ed62b219dc968f5b38a9d) Change-Id: I85207bddcf5ba92c7ba6783404837cc1c4fa5f2e Reviewed-on: http://gerrit.openafs.org/6258 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 506032be33efb89a348a0e1c0611c43fa356252c Author: Jeffrey Altman Date: Sat Dec 10 13:28:17 2011 -0500 Windows: memory leak when setting tokens via smb The SID string of the RPC used to set the token sessionKey was being leaked. Be sure to free it when it is no longer required. Reviewed-on: http://gerrit.openafs.org/6244 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f30d70ba5575753302be0a2b08c27a639898d4aa) Change-Id: Id7728420ee32c2144b8c87a5e9e82ea91837b0af Reviewed-on: http://gerrit.openafs.org/6246 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8bc3dfc3d7e2f99edd8c1c293c03ee4813bb061a Author: Jeffrey Altman Date: Fri Dec 9 18:40:42 2011 -0500 Windows: Suspend/Resume for afsd_service The power mgmt events are received in the service. The service can block all requests from the redirector from being processed until it knows that it is safe to process them. The service will receive a SERVICE_CONTROL_APMSUSPEND just before the system goes to sleep. The service has two seconds to respond and it uses that time to attempt to send RXAFS_GiveUpAllCallBacks to all file servers as an rx_multi with no wait. It also marks all servers down and updates the callback expirations to be just after the servers were marked down so that they will be forced to be refreshed when the server is marked up. Upon resume the service receives two events. First, SERVICE_CONTROL_APMRESUMEAUTOMATIC which is used to perform an SMB lan adapter change detection and perform a probe of all down servers. The second, SERVICE_CONTROL_APMRESUMESUSPEND is used to resume SMB listeners, perform a 2nd lan adapter change check (just in case), check the status of all down servers in additional networks have come up, and finally resume processing of redirector requests. With these changes no special logic in the redirector is required. Reviewed-on: http://gerrit.openafs.org/6243 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 41d145b303d61aa6f8f336e4d66748dea860d08f) Change-Id: I8a0d105c790c127320409e89913e399b7a35ffd5 Reviewed-on: http://gerrit.openafs.org/6245 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 60824032b97b7975f68751a38a4535546e781612 Author: Jeffrey Altman Date: Thu Dec 8 10:00:57 2011 -0500 Windows: increase timeout for extent request retries The AFS Redirector requests file data extents from the afsd_service.exe. If it does not receive the requested extent within 10 seconds it issues another request for that extent. Extent processing in the afsd_service is handled by background daemons that process tasks serially from a work queue. When the load on the system is large enough that satisfying the work queue takes longer than 10 seconds, the redirector would retry the request. This would increase the length of the work queue and increase lock contention. Increasing the timeout period for extent retries to two minutes significantly reduces the number of retry attempts while maintaining protection against a lost extent request. Two minutes is selected because that is the rx hard dead call timeout. Reviewed-on: http://gerrit.openafs.org/6237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f238d4854d1f32836228f2d191c8a9d265d4b181) Change-Id: I13003826aee5a2d110e03e6b3293d60fabe7eed8 Reviewed-on: http://gerrit.openafs.org/6239 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d6f03583c41c95d1001d85d0fc93216ead9196b Author: Peter Scott Date: Wed Dec 7 20:29:00 2011 -0500 Windows: include owner/group in Security DACL Include the World (Everyone) SID as the owner and group for all files in AFS. FIXES 130343 Reviewed-on: http://gerrit.openafs.org/6236 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f2c0c51f781495be0d28a75e5d7a786bbe9dddda) Change-Id: If6bdba2387737217ac5cb52b591997a0ebd72f45 Reviewed-on: http://gerrit.openafs.org/6238 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef766c5024646f08eb9808cda7efc4ae9bb33217 Author: Jeffrey Altman Date: Sun Dec 4 14:32:11 2011 -0500 Windows: version 1.7.3 (1.7.0300) Change-Id: Ib55cc7dc17f98eb3d1b7590d10a764b5d581c3e8 Reviewed-on: http://gerrit.openafs.org/6226 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47aa318ed79e3eabb4a3eba8bd6e73b7f7c671ea Author: Jeffrey Altman Date: Sun Dec 4 13:42:08 2011 -0500 Windows: Release Notes Updates Updates for 1.7.3. Grammar improvements. Reformatting. Reviewed-on: http://gerrit.openafs.org/6222 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 942dae0dd02f2e222ace5d003b1c55397a4018ff) Change-Id: Idc2fc530097fcdacbf51f572ffe4836664406a96 Reviewed-on: http://gerrit.openafs.org/6225 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 911e27a33f2284f191b9c5ca40c4b9382ed80b14 Author: Jeffrey Altman Date: Sun Dec 4 14:24:57 2011 -0500 windows: 1.7.3 change log Change-Id: Ia38b4cd92bba1c3ee13007b40a396b2f24a89bb2 Reviewed-on: http://gerrit.openafs.org/6224 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9e6e784634216ab62a962506b8dda00f38d7d96c Author: Simon Wilkinson Date: Sun Nov 20 18:11:53 2011 -0500 rx: Make CALL_RELE and CALL_HOLD lock refcnt mutex The reference count mutex must always be held when calling CALL_RELE or CALL_HOLD. Instead of requiring that the caller obtain, and release the mutex, do so within the HOLD and RELE macros, greatly simplifying calling code. Provide CALL_RELE_R and CALL_HOLD_R as versions of these macros which can be used by callers who already hold the reference count mutex for other purposes. Reviewed-on: http://gerrit.openafs.org/6219 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 57316878e03691f7e320013b21f0c7640877e11e) Change-Id: Ifa63adc280b4499ba1f541fe242612bc33f8e603 Reviewed-on: http://gerrit.openafs.org/6221 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1764b4030c26bd3beb785614af6405bb1a215fdd Author: Simon Wilkinson Date: Sun Nov 20 18:07:41 2011 -0500 rx: Helper function for decrementing conn refcnt The code to lock the reference count mutex, reduce the connection reference count, then unlock the mutex, is duplicated many times throughout rx.c. Replace all of these multiple copies with a single inline function. Reviewed-on: http://gerrit.openafs.org/6218 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit aefb10920740e537aa26d841d16302e6ce8e3d76) Change-Id: I01b5ef952345188b35138b62d0f241c198c3a265 Reviewed-on: http://gerrit.openafs.org/6220 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit afaaecb84fc8006dce922568c2118632fb1b4106 Author: Simon Wilkinson Date: Sun Nov 20 16:31:28 2011 +0000 rx: Hide the rx_packet.h Hide the rx_packet.h, and hence the rx_packet structure from application view. rx_packet.h is currently still installed, and is included directly by RX security classes, to reduce the per-packet overhead there. Reviewed-on: http://gerrit.openafs.org/6182 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 64b00c3a1a87739621f58c777fc3cc54fb15a0af) Change-Id: Icca1e80e898b2f034ed22b6f2a2381bf3b57ae3f Reviewed-on: http://gerrit.openafs.org/6217 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c1db73bf33c67230d810a7d69dfe8c5e5d62ccc Author: Jeffrey Altman Date: Sat Dec 3 21:20:05 2011 -0500 Windows: define MIN and MAX MIN and MAX are used throughout the tree. Windows does not define them. A future patchset should convert the openafs src tree to use min and max. Reviewed-on: http://gerrit.openafs.org/6209 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a57f6434e81539d3f261f0dd57327ae4dcd98caa) Change-Id: Ie106fbf08445ebcb1ce66379125a1c3a19222e58 Reviewed-on: http://gerrit.openafs.org/6216 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 475e526fbaea715e792cf032d54aca2770df8782 Author: Simon Wilkinson Date: Sun Nov 20 14:58:28 2011 +0000 rx: Make the rx_call structure private Hide the rx_call structure for public view. Provide accessors for those elements which are currently accessed by applications. Note that this change as it currently stands removes the visibility of the last sent time, and sequence number information, from the VolMonitor function. Reviewed-on: http://gerrit.openafs.org/6181 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d3eaa39da3693bba708fa2fa951568009e929550) Change-Id: I3e9aa35d8c4759ce9d5f16bb2c9af99f0bf1f477 Reviewed-on: http://gerrit.openafs.org/6215 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0681e7998e360365fbf69c581da213493710730f Author: Simon Wilkinson Date: Tue Nov 15 10:40:44 2011 +0000 rx: Make struct rx_connection private Move the rx_connection structure into a private header file, so that it is only visible from within the rx module. This allows us to use types within the structure that are not visible to everywhere that includes rx.h, as well as being a step towards a more stable ABI for RX. Add accessor functions for all of the connection members which are currently used by external callers, and modify those accessors which were implemented as macros to also be functions. Change all external access to the connection structures to use these new functions. Reviewed-on: http://gerrit.openafs.org/6180 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aa76c8f670012d4591489db374bad48118defa36) Change-Id: I9cd702cf8f9833f1b3368f3f6f8913155963e637 Reviewed-on: http://gerrit.openafs.org/6214 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69c0033ac68ca83107a6a75cc97bc9b15f6040b7 Author: Jeffrey Altman Date: Sat Dec 3 17:49:47 2011 -0500 Windows: apply Nat Pings only to cm_rootUser connections Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser connections and only apply Nat pings to those connections instead of examining the security state of the connection. Reviewed-on: http://gerrit.openafs.org/6208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01f55bbf14210ef3e4f4c0246409af370de3a383) Change-Id: I9bac16d5eda46f32e23e9a845b511b8a8ddc4283 Reviewed-on: http://gerrit.openafs.org/6213 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit efb24564b84dcb133699f0d7155f17e3608df73d Author: Jeffrey Altman Date: Sat Dec 3 17:46:41 2011 -0500 Windows: track cm_rootUser connections Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose of tracking which connections belong to the cm_rootUser. Reviewed-on: http://gerrit.openafs.org/6207 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75) Change-Id: I5af7929dbcf03171734bcbd4c950f5e6e5de81ba Reviewed-on: http://gerrit.openafs.org/6212 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 09f107db9e380230befabdc24663e181484ca5a9 Author: Jeffrey Altman Date: Sat Dec 3 15:45:53 2011 -0500 rx: rx_conn/rx_peer refCount signed Can't trace reference count underflows with rxi_LowConnRefCount and rxi_LowPeerRefCount if they cannot become negative. Reviewed-on: http://gerrit.openafs.org/6205 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f37df60763a306fb70f791f7dcba9cec2ec27c7e) Change-Id: I495dae70eb5b7cad72783a506d9b5e6a894de867 Reviewed-on: http://gerrit.openafs.org/6211 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a8e09db6f6ddf721befea25b66d3da45fbd7d290 Author: Simon Wilkinson Date: Sat Dec 3 21:10:43 2011 +0000 rx: Some kernels have no reschedule function If RXK_TIMEDSLEEP_ENV isn't set, then Unix kernel cache managers call rxevent_Init without a reschedule function. Check for this so we don't end up calling a NULL function in these situations. Reviewed-on: http://gerrit.openafs.org/6206 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5c6640bf0b2b365d4871051db7a1be6075d44666) Change-Id: Ife77ae88370226b26a2e1e6eb5185e64b3e25221 Reviewed-on: http://gerrit.openafs.org/6210 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ca63944603e040d6f26ba69dfafb955d432d5d6 Author: Jeffrey Altman Date: Fri Dec 2 23:38:01 2011 -0500 Windows: npdll connected query returns no usage In response to a NPEnumResources CONNECTED scope query, the usage field is always set to zero. If the CONNECTABLE flag is set, mpr.dll will filter the entry out of the result list. Reviewed-on: http://gerrit.openafs.org/6195 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fb7d852845effce50d896416cf8b4ba3c19d6e1) Change-Id: Ica9fda3cd945d868b8a7d8e015203e3e60763570 Reviewed-on: http://gerrit.openafs.org/6202 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7e9dbdb2b0c051b5f316295ca34ccecf473c123 Author: Simon Wilkinson Date: Sat Dec 3 11:20:57 2011 +0000 Windows: Use roken's min and max roken provides min() and max() macros. Use these, rather than our own MIN() and MAX() Reviewed-on: http://gerrit.openafs.org/6196 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b34a2df4c706838e680bdcd15528862c49b5ba6c) Change-Id: I88ec2249c1fe0beab82aa4ad6f8f1d10579b1b9d Reviewed-on: http://gerrit.openafs.org/6201 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6187b8ad9ca1fdfd153742f168c17c0108f55e88 Author: Simon Wilkinson Date: Sun Nov 20 16:29:55 2011 +0000 rx: Refactor MaxMTU error checking The error checking on the rxMaxMTU parameter was done individually by every server that sets it, using "internal" RX #defines to do so. Instead, do the error checking within the function that actually sets the MTU, reducing both the amount of code duplication, and the amount of RX knowledge held within the servers. Reviewed-on: http://gerrit.openafs.org/6091 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 1c4cd446605706e55e415cec15841acf8b1572e1) Change-Id: I2cebf40ecf088653a90d1b05fc6348ada5a80bd1 Reviewed-on: http://gerrit.openafs.org/6200 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c901201fc4f31de44e4694c59416ed26d46720a Author: Jeffrey Altman Date: Fri Dec 2 18:49:23 2011 -0500 Windows: GetInfoTip really set return to NULL When we are not returning an info-tip string from the shell extension the string output parameter must be set to NULL. Reviewed-on: http://gerrit.openafs.org/6183 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9de84a1e67cb3570dedef4ac4552901210b19e5f) Change-Id: I6cb47f9f89a05599adee9cbe4b55aea7fae65ee1 Reviewed-on: http://gerrit.openafs.org/6192 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc53c36a1d9b5087c2bf60b0e06575e3b31896ef Author: Jeffrey Altman Date: Fri Dec 2 13:41:38 2011 -0500 Windows: memset in RDR_RequestFileExtentsAsync The logic in RDR_RequestFileExtentsAsync() made it possible for memset() to be called multiple times on a buffer that is already known to be up to date. Restructure the code to make things faster. Reviewed-on: http://gerrit.openafs.org/6178 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3fce5b3541d118bc452fe236e557acde57587462) Change-Id: I7dbf4615a8c0b6e0311d19fc88f82b90de4d7f32 Reviewed-on: http://gerrit.openafs.org/6191 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4368712221226a7ce045c2b723779959a3c80e98 Author: Jeffrey Altman Date: Fri Dec 2 13:36:01 2011 -0500 Windows: cm_MergeStatus redirector invalidation The redirector maintains its own cached status information which must be updated when a DV change occurs that is not the result of a redirector initiated data change. If the current old DV is BAD, send a DV change notification. If the DV has changed and request was not initiated by the redirector, send a DV change notification. If the request was initiated by the redirector, send a notification for store and directory operations that result in a DV change greater than the number of active RPCs or any other operation that results in an unexpected DV change such as FetchStatus. Reviewed-on: http://gerrit.openafs.org/6177 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a60594ef54c1458f6778d0b16d870803e1594d41) Change-Id: Iec392ba0be7e2e8a7273fe426af20fafe69a8e38 Reviewed-on: http://gerrit.openafs.org/6190 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ff267ca46d577d146195c91d8465e37302a415cb Author: Jeffrey Altman Date: Fri Dec 2 13:31:15 2011 -0500 Windows: cm_MergeStatus use new DV to purge buffers When deciding whether or not to purge buffers on a DV change it is the new DV that matters not the old DV. If the new DV is 0, there should be no purging because there are no buffers to purge. Reviewed-on: http://gerrit.openafs.org/6176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2a2ae16511bae032025ffcfbbe4e78b2de1f8eff) Change-Id: Ibe466308cc44a0bee929d3eb79041e38a6db76d9 Reviewed-on: http://gerrit.openafs.org/6189 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bf424b05c6895371e07b9b36172e858f3c804af4 Author: Jeffrey Altman Date: Fri Dec 2 13:21:24 2011 -0500 Windows: use interlocked increment on cm_buf_t refcnt For consistency use interlocked increment when setting the cm_buf_t refCnt to 1 even though it is protected by a lock. Reviewed-on: http://gerrit.openafs.org/6175 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6ee14eef3679fbcdecfe6b1d7879309c9360bb61) Change-Id: I99e6e2e1f3b1131be53960b1b1a0ba551a8f723a Reviewed-on: http://gerrit.openafs.org/6188 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 89fd45e672eeed0bfe7aae36d21cdf15719595cd Author: Jeffrey Altman Date: Fri Dec 2 11:21:46 2011 -0500 Windows: buf_GetNewLocked should use cleaned cm_buf buf_GetNewLocked() searches the free buffer list for a buffer that has a 0 refcnt, is not in the chunk that is being populated, is not actively having I/O performed on it and is not dirty. If it comes across a dirty buffer, it calls buf_Clean() with the assumption that buf_CleanAsync() (as it was previously called) was in fact asynchronous and would return immediately. Instead buf_Clean() is synchronous and when it completes the buffer will in most cases be clean. buf_GetNewLocked() should use the newly cleaned buffer if it is still available and not continue the search from the next entry in the free buffer list. Reviewed-on: http://gerrit.openafs.org/6174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 500ffccfd66123c74a0d32c04801e5906f58e58a) Change-Id: Ie1f5fad42a24cec15a9510411cb212312be34624 Reviewed-on: http://gerrit.openafs.org/6187 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 54ece1c90313ac99e2be559f9ce944b8e3d6b51a Author: Jeffrey Altman Date: Fri Dec 2 11:19:13 2011 -0500 Windows: fix buf_Recycle() comment buf_Recycle() does not return with a reference count to the cm_buf_t object held. Correct the comment. Reviewed-on: http://gerrit.openafs.org/6173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dccf17840a53e96b21f8c092910f3e4d7628b71) Change-Id: Id29fca95455be4200748845151da6a0c51b767c9 Reviewed-on: http://gerrit.openafs.org/6186 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb13f1a3fb54eba1982395544dc64de8e2486a5e Author: Jeffrey Altman Date: Fri Dec 2 11:14:11 2011 -0500 Windows: buf_CleanAsync is not async; rename it buf_CleanAsync() calls cm_BufWrite() which stores the dirty buffers synchronously. There is nothing asynchronous about buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked() to buf_CleanLocked(). Update the comments to remove the references to the asynchronous processing which doesn't exist. That is not to say that the call to buf_Clean() in buf_GetNewLocked() should not be asynchronous; it should. There is no such functionality at the moment. One approach would be to modify buf_IncrSyncer to trigger on an event set by buf_GetNewLocked() instead of the call to buf_Clean(). Another approach would be registering a background store event. In any case, that is for another patchset. Reviewed-on: http://gerrit.openafs.org/6172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c712403f192bd9932f3ec1dce5fb23461d3d0349) Change-Id: I4baf6425cd3d7c8b6d2a32ea1fac29431d3a0259 Reviewed-on: http://gerrit.openafs.org/6185 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a3ff374b935e03cc36c82c3813e1302b3edda7f Author: Jeffrey Altman Date: Fri Dec 2 11:11:59 2011 -0500 Windows: convert buf_IncrSyncer to pthreads buf_IncrSyncer() calls rx therefore it should be a pthread thread so as not to count against the 63 native thread count limit. Reviewed-on: http://gerrit.openafs.org/6171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b26161284fef682e570377e70c7ebe5b6e8902fb) Change-Id: I5d4257a682a2a7cacd1aaf237ce1d4cae02633d0 Reviewed-on: http://gerrit.openafs.org/6184 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c5c9af6a129bbcae877a575f3f988327c78bd6a Author: Jeffrey Altman Date: Wed Nov 30 23:29:56 2011 -0500 Windows: invalidate rdr for CM_SCACHE_VERSION_BAD If the cm_scache_t.dataVersion is set to CM_SCACHE_VERSION_BAD, invalidate the redirector notion of status so that we do not leak info to users that do not have permission. If the dataVersion is CM_SCACHE_VERSION_BAD and is updated with real status info, invalidate the redirector so it attempts to read the directory contents. Reviewed-on: http://gerrit.openafs.org/6159 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2aeb041bb0f5de94d553bc3fb6b2d39c82750952) Change-Id: Ieb597c3ea8c82e648563d1be7b8f588caad24eda Reviewed-on: http://gerrit.openafs.org/6170 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7d8f8457838cf75754a77dbe1e784b82bc86f8a Author: Jeffrey Altman Date: Wed Nov 30 23:28:46 2011 -0500 Windows: do not set CM_SCACHEFLAG_EACCES twice correct a merge error. Reviewed-on: http://gerrit.openafs.org/6158 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 79833cbc64c8ccd051060782a381af1ad0cc8d50) Change-Id: I2e45868ea765bc9236a018d8ea5a4cab758089cc Reviewed-on: http://gerrit.openafs.org/6169 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af10833f91902f84a410cf9df1d899640fcbf85d Author: Jeffrey Altman Date: Tue Nov 29 15:02:12 2011 -0500 Windows: AFSRDFSProvider log to file For when logging via OutputDebugString() is insufficient, add a cheap method of logging to a fixed file: c:\temp\AFSRDFSProvider.log. Set AFSRedirector\NetworkProvider "Debug" to 0x2. Reviewed-on: http://gerrit.openafs.org/6142 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0c01c36245c53db93ec6418b2b7ff7f679181765) Change-Id: Ie5b08202ea80f84a0ba4f9ec7a3fe958ba9a4335 Reviewed-on: http://gerrit.openafs.org/6156 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 227ea038da261ecb727a6748c1414af91e5cfb94 Author: Jeffrey Altman Date: Tue Nov 29 15:01:00 2011 -0500 Windows: NPEnumResources no Printer support The AFS Redirector does not support printer shares. If the query is for printers only (or any other query that does not permit disk shares as a response) return no more entries. Reviewed-on: http://gerrit.openafs.org/6141 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ba9129141387e7c24a695a94fb602df368e3917) Change-Id: I09b44507a8244cbbc68cee0d40f4aed73a997a43 Reviewed-on: http://gerrit.openafs.org/6155 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 044f3509524671aee45729caa56f71ef3c991222 Author: Jeffrey Altman Date: Tue Nov 29 14:59:24 2011 -0500 Windows: NPGetConnectionCommon buffer too small If the specified buffer size is too small, say so. Do not attempt to copy data in that won't fit. Do not walk beyond the end of the allocated memory. Reviewed-on: http://gerrit.openafs.org/6140 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 31d80e64683a6e7ce33ab714759e74a18454110d) Change-Id: If4ecbf984866b02ac08645eafa291b4f99f16d8c Reviewed-on: http://gerrit.openafs.org/6154 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 400c9b94a690cd8fc6ac58d1814e9af5379a11ce Author: Jeffrey Altman Date: Tue Nov 29 14:55:55 2011 -0500 Windows: no drive subst for NPCancelConnection NPCancelConnection() must use the results of a Get Connection ioctl to the afs redirector and not the result of Drive Letter Substitution queries via DosQueryDevice(). Rename NPGetConnection() to NPGetConnectionCommon() and add a new parameter to indicate whether drive substitution is ok. Reviewed-on: http://gerrit.openafs.org/6139 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9fa28d7df3034600026aacbfb902a4f92446253b) Change-Id: Ic10023981cafe49b59fd970bedac5b6e444db352 Reviewed-on: http://gerrit.openafs.org/6153 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af8f1147865007efdc5ab49ac4bb0626b9d288a8 Author: Jeffrey Altman Date: Tue Nov 29 14:54:24 2011 -0500 Windows: refactor NPCancelConnection refactor NPCancelConnection to consolidate some conditional blocks to improve readability. Reviewed-on: http://gerrit.openafs.org/6138 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit abfa8f00293780fd751ba8de3ee4ce6cbdb00e90) Change-Id: I4b76f8bde6781b7ac92202cd8c0ac842d35cdc08 Reviewed-on: http://gerrit.openafs.org/6152 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 759eb9c897c4d6d6c6728556b4dc03a09c70a104 Author: Chris Orsi Date: Sat Nov 26 17:26:10 2011 -0500 Windows: Mount Point and Symlink Overlay Icons Reviewed-on: http://gerrit.openafs.org/6137 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d6900a7cd1722648f4107f82d0d74d01f6da1810) Change-Id: I96f73a105564a4232b6e0e0df88298017e656a34 Reviewed-on: http://gerrit.openafs.org/6151 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9d7835f7803bc227d59c8ee2aff828d2b53d4179 Author: Jeffrey Altman Date: Mon Nov 28 18:42:21 2011 -0500 Windows: Wix disable integrated logon by default One of the significant differences between the NSIS and Wix installer packages is that NSIS does not activate integrated logon by default whereas the Wix installer does. Enabling integrated logon without configuring the cell, CellServDB, installing Kerberos v5 and configuring krb5.conf can result in a very long wait at logon. Now that NSIS is no longer being supported and cannot be supported as a native 64-bit installer mechanism we must disable integrated logon by default to prevent more bad end user experiences like @Lotterleben described on Twitter. Reviewed-on: http://gerrit.openafs.org/6132 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit bd7cecb3277b2980a880c68e70a7ca761285347c) Change-Id: Ibf9b8891991dc4f56242ce5506e2e2ed2b0f9e31 Reviewed-on: http://gerrit.openafs.org/6150 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e33c43af8c261ad5364bbe035e39303ccfa18848 Author: Simon Wilkinson Date: Sun Oct 23 21:21:39 2011 +0100 rx: Use a red black tree for the event stack Instead of the current event stack, which uses a sorted linked list, use a red/black tree to maintain the timer stack. This dramatically improves event insertion times, at the expense of some additional implementation complexity. This change also adds reference counting to the rxevent structure. We've always had a race between an event being fired, and that event being simultaneously cancelled by the user thread. Reference counting avoids that race resulting in the structure appearing twice in the free list. Reviewed-on: http://gerrit.openafs.org/5841 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 043c31bf8d81f5aba968f69c613b639e1d0e3ee7) Change-Id: Id3979110abb01c17855e6cd6a7d63dfd55919fb2 Reviewed-on: http://gerrit.openafs.org/6149 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit beac4280f913cf9410ba7eca313bdca64f69cbbd Author: Simon Wilkinson Date: Fri Nov 11 09:33:31 2011 +0000 Unix CM: Build rbtrees in kernel Build the new opr rbtree code in the Unix kernel module Reviewed-on: http://gerrit.openafs.org/5842 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9682775fcb047e4bcd3994d582ada430d28e264) Change-Id: I74312f89d4e02e6dc243f7fbb2266812d51aed39 Reviewed-on: http://gerrit.openafs.org/6148 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4db63088e72a75a128746d8334aae3271e23b4b8 Author: Andrew Deason Date: Tue Nov 29 12:07:49 2011 -0600 udebug: Fix endianness when fudging lastYesHost hostAddr is in NBO, lastYesHost is in HBO. Reviewed-on: http://gerrit.openafs.org/6136 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 073edd3fbdf442249920acea8f3ee90b6346bf23) Change-Id: I23c9590124f0a38364b1f903e398dcd576fab937 Reviewed-on: http://gerrit.openafs.org/6147 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 10a85f50af8c4d6e8396387a33893671a6fc3df8 Author: Jeffrey Altman Date: Mon Nov 28 19:15:33 2011 -0500 Windows: FSync not CleanVnode during Cleanup cm_FSync() is buf_CleanVnode() plus a sync of metadata which is required during last handle close. FIXES 130351 Reviewed-on: http://gerrit.openafs.org/6134 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 82809787d5addcec4a64ce71bb5b7d389ee4623b) Change-Id: Ieab8b688316d25c09f9cdbafe4d6f23aef1b0224 Reviewed-on: http://gerrit.openafs.org/6146 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1da2af863a25b332f8f676fa2c7ece9c1a3d52bb Author: Jeffrey Altman Date: Mon Nov 28 18:45:55 2011 -0500 Windows: Wix cell names can be greater than 120 chars Increase the permitted length in the UI to 255 characters. Reviewed-on: http://gerrit.openafs.org/6133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4f9f33dc55150d991d9eec4ea95d78208f6949) Change-Id: Ib2d3b313269de59b9b31531bcb76587dd0c625ef Reviewed-on: http://gerrit.openafs.org/6145 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da41789b7ce26c95d5158a144a89a2ddc81bfa07 Author: Jeffrey Altman Date: Mon Nov 28 15:13:43 2011 -0500 Windows: cache format version change With the change to the size of the osi_mutex_t and osi_rwlock_t structures the CM_CONFIG_DATA_VERSION must change to force a reconstruction of the cache file. Reviewed-on: http://gerrit.openafs.org/6131 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 006815ca2f4df1ed5236fc377da2647895853b0a) Change-Id: I375758d0c72f8a3c7726a960d3c780d411a25076 Reviewed-on: http://gerrit.openafs.org/6144 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8d3a40be0dba3fb5835ff476d4cf16fd3f81ad99 Author: Jeffrey Altman Date: Sat Nov 26 17:26:50 2011 -0500 Windows: osi_mutex / osi_rwlock changes Reorganize the osi_mutex and osi_rwlock structure so that all counters are 32-bit and pointers are aligned. This requires adding padding fields. Move lock validation checks within the critical section. Include additional assertions checking the ownership state and protecting against under/overflows. Increase the size of the rwlock tid array to support a larger number of simultaneous readers. Reviewed-on: http://gerrit.openafs.org/6130 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a07338f4ccc5062e224405ccda0c9ed41e666f5e) Change-Id: I5bfd2ceaefef5b18fb41a7a84c4ccff07d28ac1f Reviewed-on: http://gerrit.openafs.org/6143 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d5f9d5e1dbf970c2fa8ca910c7127a1ca7d05af Author: Jeffrey Altman Date: Sat Nov 26 10:55:27 2011 -0500 Windows: convert daemons threads to pthreads The daemon threads make calls to Rx and therefore need to be created with the pthread package to prevent the threads from being tracked as 'native' threads by the pthread_thread_shutdown thread which can only track up to 63 native threads. Reviewed-on: http://gerrit.openafs.org/6119 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5d7adc6b67dedf0dc888196812e66b131cf91bbc) Change-Id: Iead37a1c79ba0321c44d3e5ba052c193825ee559 Reviewed-on: http://gerrit.openafs.org/6129 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 98fe9a2bc86089253d5420245130f2fd0dcb0db2 Author: Jeffrey Altman Date: Tue Nov 22 09:31:45 2011 -0500 Windows: add trace logging to Pioctl File Info Query Reviewed-on: http://gerrit.openafs.org/6110 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 53d55cf35327ec08c2f2ed5dea4138cdc2d46de7) Change-Id: Ia8d653927bf299c16176b1218cf711d5ef9c4c95 Reviewed-on: http://gerrit.openafs.org/6115 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c2e384384ab93b413a4500b44573cfaa9554d624 Author: Jeffrey Altman Date: Tue Nov 22 16:36:18 2011 -0500 Windows: _._AFS_IOCTL_._ size is zero When replying to a FileStandardInformation query on the pioctl special file, the size of the file is 0. Failure to return 0 can result in an anti-virus program attempting to read the file via a paging request which will fail. Reviewed-on: http://gerrit.openafs.org/6109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 030157166795628bbfa81e8b4b7ede35dfead8d0) Change-Id: Ib2790df4a760156d0cdf457776dbaf7dd5e2f086 Reviewed-on: http://gerrit.openafs.org/6114 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c9517d47bc5a9d7f8b1bc5b7e48105aeb786b3c Author: Jeffrey Altman Date: Mon Nov 21 21:47:38 2011 -0500 Windows: RDR_InvalidateObject do not hold locks Do not hold any locks when calling the afs redirector. Holding a lock can cause a deadlock. Reviewed-on: http://gerrit.openafs.org/6105 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 039ffe2a036217e7d23c7466c77b69df50a603f7) Change-Id: I8518ff1752bb2a0d9b73d23d9c78e6964512eb25 Reviewed-on: http://gerrit.openafs.org/6113 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9f2ef0caea292928cfaae0d14702be493d0908e Author: Jeffrey Altman Date: Mon Nov 21 13:14:40 2011 -0500 Windows: cm_GetSCache do not release unheld lock if cm_GetNewSCache() fails, an attempt would be made to release cm_scacheLock which is not held. However, it should be noted that cm_GetNewSCache() cannot fail without itself triggering a panic. Reviewed-on: http://gerrit.openafs.org/6103 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d42db13152fb8fa374db6531020da6effca51ab4) Change-Id: I7c125a117591805b62439dad95ba7e597c574bc6 Reviewed-on: http://gerrit.openafs.org/6112 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f33b597dbcd6112a9676b47660a91573ed643da0 Author: Jeffrey Altman Date: Mon Nov 21 08:42:13 2011 -0500 Windows: Use Jenkins' Hash Replace the non-string hash functions with Jenkins' Hash derived hash values. Bump the cache version value because the hash function has changed. Reviewed-on: http://gerrit.openafs.org/6102 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 887791bacf8a1b39a610734e5c27c55f88513750) Change-Id: I5bfde25d408844b8105454d49efebde211b274f7 Reviewed-on: http://gerrit.openafs.org/6111 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da77380f3c3899ebc0d5e39478d2de6a9c8eb07d Author: Michael Meffie Date: Thu Oct 27 17:53:47 2011 -0400 auth: avoid excessive stat of cellservdb The modified time resolution is one second, so only stat the cellservdb file at most only once per second. Reviewed-on: http://gerrit.openafs.org/5743 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af) Change-Id: If7358da6cae712b5cc6773a80bbb5e8206c39fd6 Reviewed-on: http://gerrit.openafs.org/6107 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8b224986ebd5b2805e81103adc4d041527ec1f60 Author: Simon Wilkinson Date: Sun Nov 20 23:40:51 2011 +0000 opr: Add Bob Jenkins's hash functions This imports a small subset of Bob Jenkins lookup3.c hash functions into the opr library. At present we only import the subset of this that deals with aligned arrays of integers, as this addresses our immediate need. It seems likely that if we're interested in a hash function for string arrays (or other arbitrary data), that more recent functions such like SpookyHash (from Bob Jenkins, again) or CityHash (from Google) may be a better solution. The immediate use case for this is removing the use of the '%' operator when indexing speed critical hash tables, as well as ensuring fairer distribution of entries across these tables. A short set of test cases is also provided Reviewed-on: http://gerrit.openafs.org/6095 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20448059f02d07eccf7f81fdb55b80e566acfecc) Change-Id: I53f3a78f416d1893b16498f412d9aaa85db78ad3 Reviewed-on: http://gerrit.openafs.org/6106 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 536cd4c038b61e7ebe0591015230ad56d5545336 Author: Jeffrey Altman Date: Fri Nov 18 12:12:22 2011 -0500 Windows: Version 1.7.2a (1.7.0201) Change-Id: I851e400e18907db5a3fc490838c0b275ced5e2af Reviewed-on: http://gerrit.openafs.org/6077 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4e6e3dcb03a085addb23406b823626d036a554a0 Author: Jeffrey Altman Date: Fri Nov 18 09:54:43 2011 -0500 Windows: RDR_RequestFileExtentsAsync unheld lock commit 55f5f356af2ef884413bd656f100055741ae871b forgot to remove a lock_ReleaseWrite(&scp->rw) in RDR_RequestFileExtentsAsync(). Reviewed-on: http://gerrit.openafs.org/6075 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ce811e34379615f942e9ca73d1ba78bfe742042) Change-Id: Iae6202820f80637909b053b89a7f3ea79fb4ebdf Reviewed-on: http://gerrit.openafs.org/6076 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21c4adde592218daba0ce67b6ca8f71f511ad054 Author: Jeffrey Altman Date: Fri Nov 18 00:39:24 2011 -0500 Windows: must obtain and release an actual lock Reviewed-on: http://gerrit.openafs.org/6072 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac1251ead12434a12fb8e7d6787845f534565039) Change-Id: Ie5b3823e7a1fbb4d384d40d42eae78e79fa84a88 Reviewed-on: http://gerrit.openafs.org/6074 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8b72931b4062b29c17e51ec53621203f67658795 Author: Jeffrey Altman Date: Thu Nov 17 00:30:24 2011 -0500 Windows: non-release only worker threads can release There are two classes of worker threads created by the service and donated to the afsredir as part of the reverse ioctl processing model. Normal workers can process any kind of ioctl and Release Only workers that can only process release extent events. Use a KeWaitForMultipleEvents in the normal worker case to permit processing any type of event. The previous implementation excluded release extent ioctls from the normal workers. Reviewed-on: http://gerrit.openafs.org/6071 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1379fb6de4d2134160fcc95cbbee4bd6048eaeaa) Change-Id: Ifc04af699cdea776e56f5f8a64b5372e79c969a1 Reviewed-on: http://gerrit.openafs.org/6073 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 16c470c62ddbdc596b497882d6c4405e30dc6cd8 Author: Jeffrey Altman Date: Wed Nov 16 14:06:36 2011 -0500 Windows: Version 1.7.2 (1.7.0200) Change-Id: I0172a96f0c68bd4b5e069c333942eb79c7fa38f1 Reviewed-on: http://gerrit.openafs.org/6070 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c53280f2d8a34982c1cbd620e4b5e1986d5d9348 Author: Jeffrey Altman Date: Wed Nov 16 14:01:11 2011 -0500 Windows: 1.7.2 Change Log Change-Id: I976c821e80343f85c5f41a033adb7ee41f285dd5 Reviewed-on: http://gerrit.openafs.org/6069 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ffb98152c7c3329de971799d3bc510e671638283 Author: Jeffrey Altman Date: Wed Nov 16 00:29:34 2011 -0500 auth: initKeys before first error exit path In afsconf_OpenInternal() _afsconf_InitKeys() must be called before the first opportunity to call afsconf_CloseInternal() or a crash can occur if the CellServDB file cannot be parsed. Reviewed-on: http://gerrit.openafs.org/6059 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 833d076e04ac09270a203a9ff449ae2af8bdad7e) Change-Id: Id9a734e896c663f3159de6f38744df98343bf77a Reviewed-on: http://gerrit.openafs.org/6068 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ecc9f50577ad43de20bed850d1e28cddeee734a Author: Jeffrey Altman Date: Wed Nov 16 10:33:41 2011 -0500 Windows: Do not install IBM AFS HLP files The IBM AFS HLP files are so out of date at this point that they are simply confusing. They reference tools and screens that no longer exist and claim the product is "IBM AFS". Incorrect documentation is worse than no documentation. The HLP files cannot be updated since we do not have the sources. HLP file format is no longer supported on Windows Vista or 7. The afs-nt.hlp file will continue to be installed conditionally when afscreds.exe is installed but the shortcut to it in the Start menu is being removed. afscreds.exe is not installed by default. Reviewed-on: http://gerrit.openafs.org/6065 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1c97c04add6639a11e88d412e369771bf6f0f281) Change-Id: Ia3dcda194d8ec7b2253d3c7023c766d61ce567bb Reviewed-on: http://gerrit.openafs.org/6066 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b28e843ee3e3229ae79e4da7d0b01ace133bd0f5 Author: Jeffrey Altman Date: Tue Nov 15 18:35:26 2011 -0500 Windows: buf_CleanAsyncLocked dirty range only buf_CleanAsyncLocked() should not instruct cm_BufWrite() to write a full chunk if the current buffer is the only one that is dirty. cm_BufWrite() will determine if it is appropriate to fill a full chunk when storing. Instructing it to check a full chunk forces it to do more work than necessary. Reviewed-on: http://gerrit.openafs.org/6054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd42e08bf1882a02c3200e1c33a101e644aa046a) Change-Id: I4fadbf00ac2adb3dd1ce78118d4fe5170156d501 Reviewed-on: http://gerrit.openafs.org/6064 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d84937a30952c544ebfc3aef28797407807830aa Author: Jeffrey Altman Date: Tue Nov 15 18:23:46 2011 -0500 Windows: create scache->redirMx to reduce contention Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue* results in a large amount of contention between processing extent requests and releases from the afs redirector and the threads attempting to read from or write data to the file server. There is no reason why the same lock must be used. Allocate a dedicated mutex to protect the queue. By placing the new mutex after the buf_globalLock in the locking hierarchy it permits the lock acquisition logic for extent processing to be simplified further reducing cm_scache_t.rw lock transitions. Reviewed-on: http://gerrit.openafs.org/6053 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 55f5f356af2ef884413bd656f100055741ae871b) Change-Id: Ic52bb0063e764c67f22783b4de2fdfaad90d374a Reviewed-on: http://gerrit.openafs.org/6063 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e88c69dec8aff4bd3fb5d012a99ea0b4f9a31e2d Author: Jeffrey Altman Date: Tue Nov 15 19:03:14 2011 -0500 Windows: Increase default number of daemon threads With the SMB interface there was little benefit to having a large background daemon worker pool since it was so rarely used. Now that the redirector does everything in the background daemon workers, increase the default from 4 to 16 threads. Reviewed-on: http://gerrit.openafs.org/6058 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 042f6c08e3be0af3ef1cc4a0bfc4688c3e2ef7d0) Change-Id: I32705d0787719f0196eac5a5ff1e87bde26e1768 Reviewed-on: http://gerrit.openafs.org/6062 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a2a437f60773913bf011d688c24dd296c73d71c5 Author: Jeffrey Altman Date: Tue Nov 15 19:00:05 2011 -0500 Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b) Change-Id: I790e06790702b19c74e27e92a11112be669286c1 Reviewed-on: http://gerrit.openafs.org/6061 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a30a3b7cb5e6185ccde0a7c4ec7c527842c1dadf Author: Jeffrey Altman Date: Tue Nov 15 18:40:21 2011 -0500 Windows: Fairness for background operations The background daemon worker pool is responsible for processing background Store and Fetch operations. With the SMB interface primary store and fetch operations are performed in the SMB worker thread which makes sense since those operations must be synchronous to the incoming request. With the AFS redirector interface almost all of the work is performed by the background daemon worker pool. It is therefore critical that the workers not get stuck in a state that starves applications. For example, copy of a file that is larger than the cache to \\AFS will result in a background store request for each chunk size of the file. If each worker thread grabs one to process, only one will make progress and the rest will block. If a cleanup operation (aka handle close) occurs the entire file will be flushed to the server synchronously in the redirector worker thread. That thread will cause of the background daemon threads to block. Any subsequent fetch data requests that get queued behind the list of stores will in turn block until they clear. This behavior is not fair. This patchset adds a new test to the cm_BkgDaemon() request selection loop, cm_RequestWillBlock(). If a request will block it is skipped. If there are no requests to process that would not have blocked, the worker will sleep for 25ms instead of the usual 1s. For BkgStore operations, the CM_SCACHEFLAG_DATASTORING flag is used to indicating a blocking state. For BkgFetch and PreFetch operations, the CM_BUF_WRITING and CM_BUF_READING flags on the first cm_buf_t of the range is used to indicate a blocking state. Reviewed-on: http://gerrit.openafs.org/6056 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit c904d9a3889b7dd8c8795feaa9e5e4979f681f53) Change-Id: I2490f2c45b86a17cdd5bf4a86529f87509bc83ad Reviewed-on: http://gerrit.openafs.org/6060 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc6f1c6ef0a16dc351267ad8c3a0129109d300ef Author: Jeffrey Altman Date: Tue Nov 15 09:03:59 2011 -0500 Windows: Create default Security Descriptor A misplaced #endif prevented the allocation of a default security descriptor. This results in STATUS_INSUFFICIENT_RESOURCES errors. FIXES 130284 Reviewed-on: http://gerrit.openafs.org/6048 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a1871449eec8d9fc1152319bc63e29db7f9ae231) Change-Id: I9c1d67368a1b5d770a4c9a981bdb4a24f8ad3c8e Reviewed-on: http://gerrit.openafs.org/6049 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5db5466feff51b6792c8569138514bbbcc4ec6b4 Author: Jeffrey Altman Date: Mon Nov 14 17:49:45 2011 -0500 Windows: interlocked refCount increment in cm_GetSCache Failure to use interlocked operations in cm_GetSCache can result in an under count Change-Id: I370bcb9ac8b40f1c1b7ea3b7647fc76e3a554e2c (cherry picked from commit c4d19e5d4271a31fd29c111fb27d145dc83b83b7) Reviewed-on: http://gerrit.openafs.org/6047 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d887868cc7435e29864ab566de1792f00e046f04 Author: Jeffrey Altman Date: Mon Nov 14 10:23:53 2011 -0500 Windows: netidmgr krb5_cc_get_principal can fail Do not dereference a NULL pointer if krb5_cc_get_principal fails. On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c but that change is after the conversion to the Kerberos Compatibility SDK and cannot be applied to openafs-devel-1_7_x at this time. Change-Id: Iffb31330ea022a4f75728ff2da657029c56d61d8 Reviewed-on: http://gerrit.openafs.org/6018 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b2e58559cf453c80d4b9800dac4bf4adb0ad345b Author: Jeffrey Altman Date: Sun Nov 13 00:40:54 2011 -0500 Windows: missing braces in AFSFSControl Change-Id: I008b03f26bf52a38296e6a009535ea5267fc8f3b Reviewed-on: http://gerrit.openafs.org/6017 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 55910eddee4adf6512ba0d8664e0db188c8c0cc9 Author: Jeffrey Altman Date: Sat Nov 12 18:33:18 2011 -0500 Windows: smb_ReceiveNTCreateX create smb_fid earlier smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now requires the smb_fid_t allocated fid value for use in share mode locking. Move the allocation of the smb_fid earlier in the function and apply necessary cleanup in error paths. Reviewed-on: http://gerrit.openafs.org/6004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839) Change-Id: Ife9d93672681d92da7ca7f89536d4a12bd177084 Reviewed-on: http://gerrit.openafs.org/6015 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e699ac3fa840fdcc2e31060fdcb91924708ce946 Author: Jeffrey Altman Date: Sat Nov 12 17:32:06 2011 -0500 Windows: cm_GetSCache avoid holding cm_scacheLock cm_GetSCache used to hold cm_scacheLock write-locked from start to finish except that it didn't. There were several places where cm_scacheLock was dropped and reacquired due to lock ordering requirements. Unfortunately, this has two problems. First, the function isn't very fast in the most common case since cm_scacheLock is write-locked for the search for an existing FID. Second, there is a race that results when cm_GetNewSCache() drops the cm_scacheLock. To make things faster, use a read-lock for the common case. To avoid the race, if the FID cannot be located, call cm_GetNewSCache() first and then obtain the cell and volume information. Then perform a second lookup for the FID while holding cm_scacheLock write-locked. If we lost the race or there was an error obtaining the cell and volume info, put the new cm_scache_t back onto the end of the LRU queue. Reviewed-on: http://gerrit.openafs.org/6003 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5c59d1b500ae4ba5223184fbfe18837891ea30c3) Change-Id: Ifcaf015b4105487fa3de123636f1d9aacbbb482a Reviewed-on: http://gerrit.openafs.org/6014 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47ffcafc23f8747870d1d349572dce8594ee57c3 Author: Jeffrey Altman Date: Sat Nov 12 17:24:12 2011 -0500 Windows: avoid null ptr in RDR_RequestFileExtentsAsync If the cm_scache_t cannot be obtained, do not dereference it while returning an error to the redirector. Reviewed-on: http://gerrit.openafs.org/6002 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eb3c9f783b9488181c57ef949e3feddcb02d381a) Change-Id: Ide78420779869ed31c3909983f16ead546a333d8 Reviewed-on: http://gerrit.openafs.org/6013 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c8fc90e25476fb439d7abaa2a9041266f45b2fcb Author: Jeffrey Altman Date: Sat Nov 12 13:45:08 2011 -0500 Windows: Track active RPCs per scache_t It has been noticed that multiple RPCs can be active on a cm_scache_t object at the same time. This is especially true of directory objects with the redirector. Track the number of active RPCs and use that number in cm_MergeStatus when deciding whether or not to discard the cached data for the object. Reviewed-on: http://gerrit.openafs.org/6001 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 090f6279c5496f648893606d298c698f376c7ae0) Change-Id: Idc2d97998c274a130bee7666180f35016d575b0b Reviewed-on: http://gerrit.openafs.org/6012 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit dd1eb21a90e43db2650751ca01aab6ee5a32cbd8 Author: Jeffrey Altman Date: Sat Nov 12 13:41:30 2011 -0500 Windows: fix locking hierarchy in service The smb username lock and the daemon global lock can be requested while the scache dirlock is held if there are no free buffers and the service is forced to claw back extents from the redirector. Adjust the locking hierarchy accordingly. Reviewed-on: http://gerrit.openafs.org/6000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f) Change-Id: Ib6ca9a44e626613c44f79fc3a59dcd2adaeb1dc8 Reviewed-on: http://gerrit.openafs.org/6011 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e2ca5877bc6566110e40ef20b40d61e24040e6ad Author: Andrew Deason Date: Wed Nov 2 16:55:49 2011 -0500 afs: Do not use separate array for srvAddrs The array of srvAddr structs we use in afs_LoopServers have indices unrelated to the indices of conns, rxconns, etc. Several places were assuming that addr[i] corresponded to conn[i], which is not necessarily true. So instead, do not use the separate addr array (except when populating the conn and rxconn arrays), and just get the srvAddr structure by going through the relevant conn[i]. Reviewed-on: http://gerrit.openafs.org/5790 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f199ac666195771a02e3ebb040c6e5fe47c58c58) Change-Id: Ib6605ee02964fc8215774d9b45846ac4c07fa636 Reviewed-on: http://gerrit.openafs.org/6010 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9745a9273628fdada422d5ed922388fb624d232 Author: Simon Wilkinson Date: Sat Oct 22 16:37:04 2011 +0100 rx: Turn the rxevent_Cancel macro into a function Turn rxevent_Cancel into a function rather than a macro which modifies its argument as a side effect. rxevent_Cancel now checks whether the event being cancelled is already NULL, as well as NULLifying the event when it is actually cancelled. Update all of the callers to reflect this new API, and so they no longer do unecessary work. Reviewed-on: http://gerrit.openafs.org/5840 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7d569c857234626191514e2780368e1b85a6dae) Change-Id: I0bd60d47eea41d9181e136c3a3cd42b0ade3955c Reviewed-on: http://gerrit.openafs.org/6009 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2b192f51fc05762322ad0b2c938ce0c614cabca9 Author: Simon Wilkinson Date: Sat Oct 22 16:22:36 2011 +0100 rx: New signature for rx event functions For a while now, we've had both new and old-style rx event callback functions. Modify all of our event handlers, and the functions that install them, to use only new style functions, and get rid of the old-style function prototypes. Reviewed-on: http://gerrit.openafs.org/5839 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit be8db58f5a44ce2ee4208de09a5ca1faf6f0f91f) Change-Id: I904c1a49ea3bf18244ea2eb908ca3a7d7394e7ff Reviewed-on: http://gerrit.openafs.org/6008 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91dc31974626e7cb083b821c5ea4dddce8780f36 Author: Simon Wilkinson Date: Sat Oct 22 11:22:51 2011 +0100 opr: Add a red/black tree implementation Add an implementation of red/black trees to our runtime library. This is originally derived from the FreeBSD macro-based rbtree implementation, but is heavily reworked to not use macros, to improve legibility, and to favour speed over structure compactness. A test suite is provided in tests/opr/ Reviewed-on: http://gerrit.openafs.org/5838 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5574ff814f02078b709cbc0a6c94201ca6fe2eca) Change-Id: I1b70886c40db41fbbdc56b2374fb554c772e1b96 Reviewed-on: http://gerrit.openafs.org/6007 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47a5e7bca67f454780928e800a4ce93296f0e8e0 Author: Simon Wilkinson Date: Sat Oct 22 11:10:53 2011 +0100 rx: Add a helper function for delayed acks The code to schedule a new delayed ack event is distributed throughout the RX code. Consolidate this into a single helper function. Change-Id: Id24d5891e6c378aeed375454bf9016572dc8bb8a Reviewed-on: http://gerrit.openafs.org/5837 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6006 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f9f574294535b6c46ceb969274f93fb822682cd Author: Simon Wilkinson Date: Sat Oct 22 09:45:10 2011 +0100 opr: Add opr_containerof Add the opr_containerof macro, which can be used to find the base address of a structure which contains a member whose location is known. This formulation is heavily used throughout OpenAFS to determine the base address of structures containing queue pointers - this provides a central definition, rather than coding it from scratch each time. Reviewed-on: http://gerrit.openafs.org/5836 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a056d24a79242db09963dd0b0c2193c5034b61b) Change-Id: I3e3a7d0b83603edf6d62520cb2245cf0944f930b Reviewed-on: http://gerrit.openafs.org/6005 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f85fa656d90168758a3ef8fe2438371c16bb32f1 Author: Peter Scott Date: Mon Oct 31 17:59:51 2011 -0400 Windows: add braces to case statements A number of case statements did not have braces protecting the block. Add them. Reviewed-on: http://gerrit.openafs.org/5772 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 22f4e2945d3fa5b7802b7321ddaa35ef34b04a45) Change-Id: I1f5527250285886f2c5253e9cae27ebd45e2266f Reviewed-on: http://gerrit.openafs.org/5999 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b641ae2569eba40006a0342f4824e0abf3986965 Author: Jeffrey Altman Date: Sat Nov 5 04:10:42 2011 -0400 Windows: Add Vista/Win7 Firewall Configuration Make use of the INetFwPolicy2 COM interface to configure the Vista/Win7 firewall for all network profile types. Change-Id: I68fd5f89436304e9be1fe7c4279eade7d5f7692e Reviewed-on: http://gerrit.openafs.org/5812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b15b4b15822bee87720bb0d78c2ce54051180339) Reviewed-on: http://gerrit.openafs.org/5998 commit 8e1f9a8bc610cc95fe46b185c5ee9c9b8d81b8c9 Author: Jeffrey Altman Date: Wed Oct 5 03:36:48 2011 -0400 Windows: Enforce Share Access Use file server locks to enforce file share access modes via the afs redirector interface. The approach taken integrates share mode enforcement with the file server lock tracking code in the service. The share mode enforcement mimics that of the SMB Server interface. This patchset includes two functional changes to the previous locking and share mode processing: 1. The cm_scache_t fsLockCount field is used to determine if the desired lock can be granted by the file server. If not, the RXAFS_SetLock() request is skipped and the request is failed locally. 2. cm_CheckNTOpen() now accepts the desired and and share access modes. The share access mode is used to determine if a test lock should be obtained at all. If the share mode is FILE_SHARE_WRITE then no lock is requested. This change permits Microsoft Office applications to offer the user the ability to open the file in read-only mode and notify the user when the document can be opened in read-write mode. Developed with Peter Scott FIXES 130239 Change-Id: Iaa2beda3182f93575574bbe8f505e5008cd0d37f Reviewed-on: http://gerrit.openafs.org/5823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b78b8f64a69481e59e957ebe09315fc5b8b60c17) Reviewed-on: http://gerrit.openafs.org/5997 commit 366844699e21bc7d6a2cb4324a08a72143a90918 Author: Andrew Deason Date: Thu Nov 10 11:58:12 2011 -0600 namei: Remove extraneous rmdir We just unlinked the file, so we know we won't be able to rmdir() the same thing. Give a path one level higher to namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir. Change-Id: I37da76e360fd3967048297789ed8cf4748c14845 Reviewed-on: http://gerrit.openafs.org/5833 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from b41e30a55c8aeb6d7f42d74f9eb090232032057f) Reviewed-on: http://gerrit.openafs.org/5996 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 870a129428fab3ce1349df1ad8810cfeff62325a Author: Andrew Deason Date: Thu Nov 10 11:05:28 2011 -0600 vol: Remove O_EXCL|O_TRUNC combinations A few places were specifying both O_EXCL and O_TRUNC to open(). O_TRUNC does not make any sense with O_EXCL, and doesn't do anything, so remove O_TRUNC from these instances to make the code more clear. Change-Id: I06e2f68eb589da0baee32e523103c2c868c33cc8 Reviewed-on: http://gerrit.openafs.org/5832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4c679e380f697760de777d35fe057229bf2bf762) Reviewed-on: http://gerrit.openafs.org/5995 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f44c554665196b7fe07f83cede5314445a0c3b92 Author: Jeffrey Altman Date: Wed Nov 9 22:52:37 2011 -0500 Windows: FSCTL_SET_REPARSE_POINT not yet implemented Since FSCTL_SET_REPARSE_POINT is not yet implemented return STATUS_INVALID_PARAMETER to all requests that do not fail validity tests. Change-Id: I0a6b5e58fe660bc9e71411ec63e32cf81790ec51 Reviewed-on: http://gerrit.openafs.org/5829 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from f27480aa2f8a26da3bd7634ff7072c1faac0f448) Reviewed-on: http://gerrit.openafs.org/5994 commit 8de04de7e1e24fc0b320adb276c17da3fa36a140 Author: Jeffrey Altman Date: Wed Nov 9 22:47:55 2011 -0500 Windows: FSCTL_SET_REPARSE_POINT error According to MS_FSCC 2.3.54 if the input buffer length is less than the size of a REPARSE_DATA_BUFFER structure, or the input buffer length is greater than 16,384, or a REPARSE_DATA_BUFFER structure has been specified for a third party reparse tag, or the GUID specified for a third party reparse tag does not match the GUID known by the operating system for this reparse point, or the reparse tag is 0 or 1, then the return status shall be STATUS_IO_REPARSE_DATA_INVALID. Change-Id: Ied458e193ebf10144c954a1b29e38454a5323ec4 Reviewed-on: http://gerrit.openafs.org/5828 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 72e5bd1434a6a2238f28f11a149192f44d0b82d1) Reviewed-on: http://gerrit.openafs.org/5993 commit 83e1087a9799416e5e881f2a08b4330ed8cc8c02 Author: Jeffrey Altman Date: Wed Nov 9 22:45:07 2011 -0500 Windows: FSCTL_IS_PATHNAME_VALID return success Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 support the FSCTL_IS_PATHNAME_VALID Request (section 2.3.21) and return STATUS_SUCCESS whenever this request is invoked. We will do the same. Change-Id: I65be2d5fac5a04f93efb835a827b49e9f1ddec06 Reviewed-on: http://gerrit.openafs.org/5827 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 733aa6a63d8f15dcfe31f24ce31b67b746a2934a) Reviewed-on: http://gerrit.openafs.org/5992 commit 9e45f4a2c394d4fc466ee13d7f09ae7911ba5d8f Author: Jeffrey Altman Date: Wed Nov 9 22:42:54 2011 -0500 Windows: these fsctl cmds are not implemented Return STATUS_NOT_IMPLEMENTED since the following FSCTL_ operations are not: FSCTL_LOCK_VOLUME FSCTL_UNLOCK_VOLUME FSCTL_DISMOUNT_VOLUME FSCTL_MARK_VOLUME_DIRTY FSCTL_IS_VOLUME_DIRTY FSCTL_IS_VOLUME_MOUNTED Change-Id: Ie8fab08f5b005b26192e9bb74a4f09ff29b9c64f Reviewed-on: http://gerrit.openafs.org/5826 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 3c6e5681245ad4ee267d7e5ca260b38655633a96) Reviewed-on: http://gerrit.openafs.org/5991 commit 77952f2d7e6cfe7a6883b118a9de7e8a8f8823a1 Author: Jeffrey Altman Date: Wed Nov 9 22:33:11 2011 -0500 Windows: Additional trace logging Add additional trace logging to the redirector to assist with debugging reparse point processing. Change-Id: I2dac6a6ed3a178c59581f3862678d2fed5f10bc7 Reviewed-on: http://gerrit.openafs.org/5825 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ff7d3a19f032c5d4917cc04eeff9cf92733f1fae) Reviewed-on: http://gerrit.openafs.org/5990 commit 00f81bddd788e17e7e3c1811d2140f1d2055333f Author: Jeffrey Altman Date: Wed Nov 9 20:05:05 2011 -0500 Windows: service must set reparse point attribute When populating the directory entry information for the redirector the service must set the reparse point attribute. Change-Id: Ibeaca04d19c59783c04721cad2b5716a3c8c1e2c Reviewed-on: http://gerrit.openafs.org/5824 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b947adbacb5db4ce5e380ea28e1d734fdadd5cdf) Reviewed-on: http://gerrit.openafs.org/5989 commit 673c31abd608acd1f591104fef907a86d2699432 Author: Peter Scott Date: Thu Nov 10 13:34:53 2011 -0700 Windows: Correctly increment PIOCtl DE When performing a directory enumeraiton, correctly increment ref count on the PIOCtl DE structures Change-Id: I95833d45ccaf4a4da1eeb64c92e15400b7b7840e Reviewed-on: http://gerrit.openafs.org/5834 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from d810870ec1a2ad1cb438d776236db3340081fe74) Reviewed-on: http://gerrit.openafs.org/5988 commit 2cfcced5863a7a7a874ed2a568e598443851e21a Author: Peter Scott Date: Thu Nov 10 09:06:53 2011 -0700 Windows: FileNetworkPhysicalNameInfo implementation Handle this File information query Change-Id: I04b0d9a97987b526fb1ff2606aff855f4811a232 Reviewed-on: http://gerrit.openafs.org/5830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 2c0f857bc8d17d8e02f515d510f9530bc47866d4) Reviewed-on: http://gerrit.openafs.org/5987 commit 775cbd0d759d7d3141e1d264a7e50942e4a88780 Author: Jeffrey Altman Date: Sun Oct 30 23:52:00 2011 -0400 Windows: improve store data parallelism The file server will set the rx call status bit (0x1) when the rpc is in process and all of the locks are held. At this point it is not possible for another store data rpc to begin on the vnode prior to the completion of the current rpc. Once this status bit is detected as set, the exclusive store data synchronization on the cm_scache_t can be dropped. This permits the next store data rpc to perform its biod construction. Change-Id: Ibd62a3c289ed11b4f67d5ff1ffff326bcc400044 Reviewed-on: http://gerrit.openafs.org/5741 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from deedf97416e4eaaea79479711ad3c84020fdd1e0) Reviewed-on: http://gerrit.openafs.org/5986 commit 87bb4c90402bbd2f68f9f489217a1d44ce0f11a8 Author: Andrew Deason Date: Wed Nov 9 17:04:09 2011 -0600 volser: Preserve needsSalvaged during restore Some of the routines during a volume restore may set needsSalvaged, if an inconsistency is detected while writing the given volume data. However, after the data is read, we set the volume header information to what was found in the dump stream, ignoring any needsSalvaged that may have been set. To ensure that inconsistent volumes in this situation actually get demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of needsSalvaged in the header, if it was set. Change-Id: Ie4895a8386642a762a523f2a0ac0e2d1b4ac3de7 Reviewed-on: http://gerrit.openafs.org/5822 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9ba891676a15512fa58915662cf599ea73eac430) Reviewed-on: http://gerrit.openafs.org/5985 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ae6d9b2943319b9f44459011f7cfda08e76b6c16 Author: Derrick Brashear Date: Wed Nov 9 10:34:10 2011 -0500 viced: avoid bogus handle in rename because fileptr's handle can be reset during CopyOnWrite we need to SetDirHandle after that call FIXES 130215 Change-Id: I61d21c6026b294e3c7f442786f6ee7f97ab6f5e4 Reviewed-on: http://gerrit.openafs.org/5818 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry-picked from a1669f3e37299c11bf29a458212e03d1bdb22334) Reviewed-on: http://gerrit.openafs.org/5984 Tested-by: Jeffrey Altman commit 7b35b1f29dadeaf5ea27714877c16e4f893037ba Author: Andrew Deason Date: Tue Nov 8 12:52:50 2011 -0600 regen: Fail on failures If something fails, don't ignore the error. Change-Id: Ia679cf8541adce573fa3ee16ae8fafec0cfae790 Reviewed-on: http://gerrit.openafs.org/5817 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6d519cf1234d54630dcfe48f6ecd393e2dfe71dd) Reviewed-on: http://gerrit.openafs.org/5983 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0e65a06262ff231fb782178abebf8a2817ae4908 Author: Andrew Deason Date: Wed Apr 13 13:15:57 2011 -0500 Add "pretty" build option Add the capability to do a "pretty" build, where we output something like " CC /path/to/foo.o" to build foo.o, instead of the entire compiler invocation, similarly to how the Linux kernel build appears. Add the "pretty" building for CC and LD rules. This also prints out some helpful information when a command fails, which can sometimes otherwise be annoying to figure out post-mortem. To enable the pretty building, make with V=0. To output everything that is actually run with V=0, make with 'V=0 Q=' . Note that this does not work with all makes, since not all makes will propagate command-line-specified variables to sub-makes without -e. Non-working makes include /usr/ccs/bin/make on HP-UX and Solaris. However, GNU make will work, as will /usr/xpg4/bin/make on Solaris. Change-Id: Ifb6cf8840c2b99c4d384e195434071ae427c4032 Reviewed-on: http://gerrit.openafs.org/4486 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 49cb0d00909693b85f52d87a26d5df69a829d9d5) Reviewed-on: http://gerrit.openafs.org/5982 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b8725e9543584c25a08ce6227072974c75c8b1b2 Author: Andrew Deason Date: Tue Nov 8 12:29:39 2011 -0600 Specify pattern rules in addition to suffix rules A few makefiles specify an old-style suffix rule, such as: .c.o: $(AFS_CCRULE) $< Not all makes seem to interpret these rules correctly (such as Solaris /usr/xpg4/bin/make). Since it is easy to do so, specify pattern-based rules along with these, like so: %.o: %.c $(AFS_CCRULE) $< Change-Id: I268c0a81b263c89d079976a01b2759ef6b4f2770 Reviewed-on: http://gerrit.openafs.org/5819 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5c64df8628e60f2e4c55aaf3e53fb01c140b42ed) Reviewed-on: http://gerrit.openafs.org/5981 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 97ab635fa5b384848bfbb403428b05463e5adfa1 Author: Andrew Deason Date: Thu Nov 3 13:40:37 2011 -0500 Add setenv/unsetenv to roken Add the replacement setenv and unsetenv functions to roken, for use on (at least) HP-UX and older Solaris. Change-Id: I032e744649300b1fcb89b30f4f36f9117d2b7b99 Reviewed-on: http://gerrit.openafs.org/5801 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 70e8451acd0426024c152073e53bc6606e0189e1) Reviewed-on: http://gerrit.openafs.org/5980 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bd2bedb563187007bea479e7c2fc7e60fadc6edc Author: Derrick Brashear Date: Sun Nov 6 16:28:27 2011 -0500 dafs: avoid null deref getting volume header we don't assign hd before dereferencing. stop dereferencing and just use the queue cursor. Change-Id: Id70be9e9ff59d68219698f11460effafbdd7a587 Reviewed-on: http://gerrit.openafs.org/5814 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from 00beae8c4e3b390637f20584e676cf86c817dadd) Reviewed-on: http://gerrit.openafs.org/5979 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d6b7f3303fe67ca21b1c71041b318993c3512e81 Author: Andrew Deason Date: Thu Nov 3 13:17:33 2011 -0500 salvager: Implement AskDAFS via SYNC flags Instead of probing the DAFS-ness of the fileserver by probing which FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC response header flags, which explicitly state whether or not the endpoint is DAFS. This avoids unnecessary "protocol mismatch" log messages when the endpoint is not DAFS. Change-Id: Ia228fffd75e23130fe37a74cf79b8433c234609a Reviewed-on: http://gerrit.openafs.org/5800 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7fee28bae30c5a65898a2e3fd7149f07e8ca0df6) Reviewed-on: http://gerrit.openafs.org/5978 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2865af40fd636d532ddc844e32e714e2e32026ea Author: Derrick Brashear Date: Fri Nov 4 11:43:01 2011 -0400 ukernel: handle pioctl errors properly in ktc the straight return from call_syscall isn't what we want. munge so e.g. EDOM handling for ktc_GetToken does the right thing. Change-Id: I5b4d1fe503f64e95544b66a3cf3e9c5c43a2cb5e Reviewed-on: http://gerrit.openafs.org/5807 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from b06c700ee40ca70ef08259af819e2a6084137457) Reviewed-on: http://gerrit.openafs.org/5977 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 179c9a59c4ba51d0848c71e55b64d5bd12d6dc39 Author: Andrew Deason Date: Fri Nov 4 16:12:03 2011 -0500 libafsauthent: Remove obsolete HP-UX workaround This workaround is no longer relevant. It is also error-prone and there are far better ways to achieve a similar result, so get rid of it. Change-Id: I24b1edca87d0b0d7e4f2214292b6af2d61218c5c Reviewed-on: http://gerrit.openafs.org/5811 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from c96d3429f2d4ad2ec7ac45a83c1111dc60a0d5c1) Reviewed-on: http://gerrit.openafs.org/5976 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8f1e1b0f1d7fb0df78188af2f7273c900256c2b5 Author: Andrew Deason Date: Fri Nov 4 17:19:28 2011 -0500 volser: Remove debugging log messages While the -log option to volserver is supposed to print additional log information, it shouldn't spam the log with useless data. Remove some of the log lines that are really more "debug" information, so we log the same amount of information as in the 1.4 series. Change-Id: I99273975bfbf484ae395f96a5d13c97e2aeb5c54 Reviewed-on: http://gerrit.openafs.org/5810 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 2a1251c5d0c1b0fd4024d7b3282187a838b551fd) Reviewed-on: http://gerrit.openafs.org/5975 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9a7d0801689de828bf11bb53413df1d46728d777 Author: Simon Wilkinson Date: Thu Nov 3 10:10:23 2011 +0000 Unix CM: Fix dir buffer leak in afs_readdir Resolve a buffer leak in afs_readdir that was visible on all non-Linux platforms (Linux has an independent readdir implementation) Change-Id: I9324c9cc979c51b06f90ad10eae01c36dae40840 Reviewed-on: http://gerrit.openafs.org/5794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry-picked from 025a7aee0b86c7d8a7299c85c88615eb8cd6b07f) Reviewed-on: http://gerrit.openafs.org/5974 Tested-by: Jeffrey Altman commit 60fa75d299d4ac421ecb10311f9127c866a03062 Author: Andrew Deason Date: Fri Nov 4 12:42:33 2011 -0500 DAFS: Deal with exclusive-state volume headers GetVolumeHeader assumes that headers on the LRU are not associated with a volume in an exclusive state. This is known to not be true for some cases when salvage requests are received over FSSYNC, and may be true in other scenarios. It's easy to just skip such headers, so skip them. Change-Id: Ie605f04e6c1a9e9e9ae3e8791179b3a85eab2fca Reviewed-on: http://gerrit.openafs.org/5808 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e) Reviewed-on: http://gerrit.openafs.org/5973 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fb3402c1dcca217240b4a56ceb8ac857ed19c114 Author: Jeffrey Altman Date: Fri Nov 4 09:34:53 2011 -0400 Windows: NPCancelConnection set correct length The RemoteNameLength passed in the IOCTL_AFS_CANCEL_CONNECTION call must not include the trailing NUL. NPGetConnection() returns the size of the buffer used which does include the trailing NUL. Change-Id: I02940d35b2cc3cdfbff91e169c4d8cba60f4e724 Reviewed-on: http://gerrit.openafs.org/5806 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from da00d719a77607d8873067902f5db5bff02d0e99) Reviewed-on: http://gerrit.openafs.org/5972 commit 929b83333bbe09b99eb613b4bf46be1d843d559e Author: Jeffrey Altman Date: Fri Nov 4 08:40:03 2011 -0400 Windows: do not leak resource in AFSQueryDirectory Track whether or not the pFcb->NPFcb->Resource is held so it can be released in all error paths. Change-Id: I2bfa9d3bb5a608ad861f60e1dee81df845080533 Reviewed-on: http://gerrit.openafs.org/5804 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 3acd9b854e05748578f8291200fad8c6650e9b14) Reviewed-on: http://gerrit.openafs.org/5971 commit 7a090d7029a1a99c07f09b9b0cd15303a50b7316 Author: Peter Scott Date: Fri Nov 4 07:31:57 2011 -0600 Windows: Failed to release correct lock For cross-directory renames, the correct parent lock was not being tracked Change-Id: I5337eb8b617d633e7f20e8fe706df8285e472ffa Reviewed-on: http://gerrit.openafs.org/5805 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from f7adbd3d3977a328612c0f527d764566846593da) Reviewed-on: http://gerrit.openafs.org/5970 commit a4d79c402a82799049faeb5b8f8902ef31f2cfba Author: Ken Dreyer Date: Mon Oct 31 08:27:16 2011 -0600 doc: limitations of addsite on different partitions A user on the openafs-info mailing list noted that the Admin Guide is unclear about creating read-only replicas on different partitions on the same fileserver. Clarify the rules here. Change-Id: Idcb944d46fc9f3994b79d8e930cd050830872f6c Reviewed-on: http://gerrit.openafs.org/5745 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from c59c07132ef17589ad3466ded418c1370539b7af) Reviewed-on: http://gerrit.openafs.org/5969 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bee8e4135fda49caf67b0a2983da3e91fcdc999e Author: Heimdal Developers Date: Thu Nov 3 12:37:36 2011 -0500 Import of code from heimdal This commit updates the code imported from heimdal to ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408) Upstream changes are: Jeffrey Altman (2): Windows: fallback to PROV_RNG if no PROV_RSA_FULL roken: posix errnos for windows Love Hornquist Astrand (3): drop __restrict to please old compilers add krb5_is_enctype_weak Don't export tests from library, reported in bug from Tom Payeire New files are: roken/setenv.c roken/unsetenv.c Change-Id: Ib644b61ee61e2528629a2b4d75f2bd329e1eb6c1 Reviewed-on: http://gerrit.openafs.org/5798 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from c0961b8d4103fab37c360461bcde30c56d24f483) Reviewed-on: http://gerrit.openafs.org/5968 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 995f86ec19fb7d972bcf96f7dde0cd4d769ed6f7 Author: Andrew Deason Date: Wed Nov 2 11:35:42 2011 -0500 Solaris: Specify ARCHFLAGS in CFLAGS Various autoconf tests which use the C compiler may yield different results depending on whether or not we are compiling for x86 or amd64 on Solaris (different libraries are available, structures may be different, et al). So, set CFLAGS depending on which arch we are targeting, so the autoconf results are more consistent with the actual compilation during the build. Change-Id: Iaec57276a803a9804e441787195f05f38c2963f2 Reviewed-on: http://gerrit.openafs.org/5786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 5eba97a8960c49aeea957dc94408368e1324eff0) Reviewed-on: http://gerrit.openafs.org/5967 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 172c40ae58fa0c541c3385ce4e13b4410aed8367 Author: Andrew Deason Date: Wed Nov 2 11:32:56 2011 -0500 Do OPENAFS_OSCONF before compiler autoconf tests OPENAFS_OSCONF can set the C compiler we use, as well as changing various compiler flags. These changes can alter autoconf tests, so allow OPENAFS_OSCONF to change these before various autoconf tests are performed which require the C compiler. Change-Id: I5a4145e71159fab1c4873ebb50c930391e5f0391 Reviewed-on: http://gerrit.openafs.org/5785 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 353aa7ef2c172f574998480d6d051b3f4e95ae7b) Reviewed-on: http://gerrit.openafs.org/5966 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b6298275e7d3e69145d2f11dfed5e6eb31a4a8e7 Author: Andrew Deason Date: Wed Nov 2 10:43:54 2011 -0500 Remove -settime/RXAFS_GetTime client support Remove the -settime option from afsd, and any code for making RXAFS_GetTime calls in libafs. Server probes have been replaced by calls to RXAFS_GetCapabilities, and the actual functionality of synchronizing the system clock has been superseded by other systems like NTP. Issue a warning for all code paths that try to enable -settime support. Historical note: the code that this commit is removing contains bugs. Do not simply revert this commit to turn on -settime support again. Change-Id: Iafb2ced1f411888f43b57b0141a9420f8738c349 Reviewed-on: http://gerrit.openafs.org/5787 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 1d9888be486198868983048eeffabdfef5afa94b) Reviewed-on: http://gerrit.openafs.org/5965 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9400197b3f3a7b1d6add2c8020c85fb04c2765a2 Author: Michael Meffie Date: Thu Aug 18 17:04:14 2011 -0400 opr: queue swap Add inline function to pivot two queues. Implementation by Simon Wilkinson. Change-Id: Idea3b8740c32992e91fc0b454c7c30140cc611c5 Reviewed-on: http://gerrit.openafs.org/5742 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9c130285d8f17a5e09bbe0b3c3b886ec3145bae9) Reviewed-on: http://gerrit.openafs.org/5964 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 27ade78fb9b0db8a1858e3eb77b5fadb8520d4b2 Author: Andrew Deason Date: Thu Nov 3 12:33:55 2011 -0500 external: trigger git commit-msg hooks on import When we import commits, the new commit does not have a Change-Id in the commit message. Usually a git commit-msg hook will be installed to automatically insert a Change-Id into the commit message if one does not already exist, so trigger the hook by performing a no-op 'git commit --amend'. Change-Id: Ia43b5b16ee00c9aee8950039b035d27ed6782781 Reviewed-on: http://gerrit.openafs.org/5797 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fbf68f12592419a315f56585f9b8bb3a822bbc9b) Reviewed-on: http://gerrit.openafs.org/5963 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2113b3d3d300a3b1afe6e580208e0f2bcad0b5ad Author: Andrew Deason Date: Thu Nov 3 12:27:22 2011 -0500 external: commit imports with --no-verify Currently, importing external commits with import-external-git.pl may fail if the current repository checks for whitespace errors, and the external commits contain whitespace errors. So run the commit with --no-verify, so we can make the commit before fixing up the whitespace errors immediately afterwards. Change-Id: I0acbf1ca7a9a2fae528e71e81b23d8fd6f496570 Reviewed-on: http://gerrit.openafs.org/5796 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7ef5aeb608a390b6ac88d7e6748c5a1b4a65e0c5) Reviewed-on: http://gerrit.openafs.org/5962 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c45876d847c4a194333af745a5bf5c431e512982 Author: Andrew Deason Date: Thu Nov 3 12:17:07 2011 -0500 Import setenv.c and unsetenv.c from roken Import the roken implementation of setenv and unsetenv, which are required on HP-UX. Change-Id: I0e56dd7368e61235013f6c94b8775170724f1d10 Reviewed-on: http://gerrit.openafs.org/5795 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 95038fde9a23b4550cbba38460f4668ca25b4f85) Reviewed-on: http://gerrit.openafs.org/5961 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c6fff259d03049b51364c3da9a5f3d88e9054fba Author: Peter Scott Date: Wed Nov 2 19:29:00 2011 -0400 Windows: fix deadlock in symlink Attrib retrieval Commit df22620f66f5ce92776177d4d800fc7f4ae4ae99 introduced a deadlock when retrieving file attributes for symlink objects. To correct the deadlock, do not hold the Fcb locks during the AFSRetrieveFileAttributes() call. Change-Id: If6b789781cc3bc14a2f8fdd5ee808fda4f7e8f99 Reviewed-on: http://gerrit.openafs.org/5792 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ed9bf9b55976c78cf24b43580d1752e81fe697b1) Reviewed-on: http://gerrit.openafs.org/5960 commit edb5c4068624e644caf4c075f8f725a66a03eb94 Author: Jeffrey Altman Date: Wed Nov 2 19:27:42 2011 -0400 Windows: always set reparse point attrib for symlink Make sure that we always set the reparse point attribute for symlinks in directory enumerations and attribute queries. Change-Id: Ice4405ce5f47a807680d857831a3bca07b95e697 Reviewed-on: http://gerrit.openafs.org/5793 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from d8f357b9838509c5a5cfa22a85dffcd962804025) Reviewed-on: http://gerrit.openafs.org/5959 commit 001e3b7fe0cc08b2858ce8839435ab39e2b62745 Author: Peter Scott Date: Wed Nov 2 19:25:36 2011 -0400 Windows: remember when a reparse point is opened If the mount point or symlink is opened as a reparse point we must remember that in the Ccb so that later reparse point processing can be implemented properly. For now remember with the CCB_FLAG_MASK_OPENED_REPARSE_POINT flag. Change-Id: I19e6358c47513a3c9283273893b306c2fd854579 Reviewed-on: http://gerrit.openafs.org/5791 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from e39e8bb5b2f08281bc1d91c9209a1a3f1b463af2) Reviewed-on: http://gerrit.openafs.org/5958 commit f06199a09be32f4522899732fe148a6dafd5ac4e Author: Jeffrey Altman Date: Wed Nov 2 10:35:14 2011 -0400 Windows: Mount points are always directories Set the directory file attribute for all mount points since a mount point target is always represented as a directory. Change-Id: I88cf8cefbd01f70dada749779a74d9e636cc0619 Reviewed-on: http://gerrit.openafs.org/5784 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c7e2d8450117a947cb858bfdb4aedd668bd56bfd) Reviewed-on: http://gerrit.openafs.org/5957 commit 1c2ad5c37991f79aabe8907718b0ee75b2acb388 Author: Peter Scott Date: Wed Nov 2 10:23:48 2011 -0400 Windows: Retrieve file attributes on symlinks When a component is a symlink, correctly retrieve file attributes during a query file information request. FIXES 130283 Change-Id: Ia6962510ee4027684290d840ef10ade64c024890 Reviewed-on: http://gerrit.openafs.org/5782 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from df22620f66f5ce92776177d4d800fc7f4ae4ae99) Reviewed-on: http://gerrit.openafs.org/5956 commit 199d5976814ce5002525f438f27449c0e562d824 Author: Peter Scott Date: Wed Nov 2 10:18:09 2011 -0400 Windows: add AFSRetrieveParentPath() Change-Id: I6f18abebc99713a89a374a06d22deeb1588ef949 Reviewed-on: http://gerrit.openafs.org/5783 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from cddb3baa13b1c941533bee5cdf0873ca4563c9c1) Reviewed-on: http://gerrit.openafs.org/5955 commit 51409629361b6ee1d4d814101a1f76bc65101c15 Author: Jonathan A. Kollasch Date: Tue Oct 11 12:56:08 2011 -0500 kdump-build: don't install when it hasn't been built for *bsd* Change-Id: I0d80a0464f64eb376fef976d500647fcc7fb774f Reviewed-on: http://gerrit.openafs.org/5596 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 6fe9a1ea0f22ef31ede5a9a8bb052b4ee71e7be0) Reviewed-on: http://gerrit.openafs.org/5954 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4d25dfc7d433e3fb552abf573adbbfecab837796 Author: Jeffrey Altman Date: Fri Oct 14 08:10:19 2011 -0500 klog.krb5: enforce DES for rxkad 0. Always request a TGT regardless of the state of writeTicketFile. 1. request des-cbc-crc when requesting a ticket for an rxkad service principal 2. check the returned key length to ensure that it matches the permitted length of an rxkad key. If not, generate an error instead of overwriting memory and continuing. FIXES 130278 Change-Id: I219774be6cadc41c2f3e3ff2fd4c882f69808052 Reviewed-on: http://gerrit.openafs.org/5619 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from 3a9a5783cd1fd73902655f0876e2069b42688c94) Reviewed-on: http://gerrit.openafs.org/5953 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0abcadec8680bbde750e6fbe27329416414bce50 Author: Peter Scott Date: Tue Nov 1 08:55:37 2011 -0600 Windows: DE Reference count added during create A reference count is added under lock to a newly created DE to ensure it is not removed through deletion while in flight. Change-Id: I4057a0301752dc30c6b79c4d3af31a74f42cb2ba Reviewed-on: http://gerrit.openafs.org/5775 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 4f4b805ae9107482aa39f2c3c0c4327e8466e2ac) Reviewed-on: http://gerrit.openafs.org/5952 commit be85af45b5217acb219819c2a47b7647102fec34 Author: Peter Scott Date: Mon Oct 31 18:10:07 2011 -0400 Windows: change AFSProcessUserFsRequest default Default the return code for AFSProcessUserFsRequest() to STATUS_INVALID_DEVICE_REQUEST instead of STATUS_INVALID_PARAMETER. Change-Id: Id80996aa0f4ceb3e4fe5c1bc1905a3ce6ad39f7f Reviewed-on: http://gerrit.openafs.org/5774 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 96e313de3e040efffbb9b933b0b2ae15c9fd540c) Reviewed-on: http://gerrit.openafs.org/5951 commit 08129740ed7df57e7e8fdb620579649267454b20 Author: Peter Scott Date: Mon Oct 31 18:07:23 2011 -0400 Windows: correct ordering of reparse point tests Test for whether an object is a reparse point before testing whether the provided buffer is large enough to hold the result if it is. FSCTL_GET_REPARSE_POINT FSCTL_SET_REPARSE_POINT FSCTL_DELETE_REPARSE_POINT Change-Id: Ifb637f90dee41b1d8db8674a3b6436f11b754576 Reviewed-on: http://gerrit.openafs.org/5748 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ee8b6d34fa7d562f94469e2b8098ccc0507d5876) Reviewed-on: http://gerrit.openafs.org/5950 commit aa6cc8e9c9fa98ca43b25e8047729537b67697a9 Author: Peter Scott Date: Mon Oct 31 18:05:31 2011 -0400 Windows: log FSCTL_CSC_INTERNAL requests FSCTL_CSC_INTERNAL requests are not supported and will return STATUS_INVALID_DEVICE_REQUEST. However, log them for easier debugging. FSCTL_CSC_INTERNAL is defined in ntifs.h only for Vista and above. Since afsredir is built for XP and above its value must be conditionally defined by us. Change-Id: I8b89e5fb66ea48567fb617a81dc41f1c5c4617c5 Reviewed-on: http://gerrit.openafs.org/5773 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 94e9fceaa7ec343717b3fdc8610381832f532ebf) Reviewed-on: http://gerrit.openafs.org/5949 commit a3e342da9cec88c63026b2777e91c0ebdd007973 Author: Peter Scott Date: Sat Oct 29 13:55:46 2011 -0400 Windows: Directory Entry Processing Memory corruption was detected due to improper handling of directory entries and the short name b-tree during directory revalidation and tear down. The problem resulted in a BSOD most frequently when roaming profiles were written back to the file server or when multiple clients were actively modifying the contents of a directory simultaneously. This patchset makes a number of changes: . rename processing no longer handles collisions locally. the file server replaces a target atomicly when there is a collision. . directory validation is no longer delayed until a handle is closed . data version numbers are checked for implied invalidation Change-Id: I119511118e7f1492428da81f4dabc936e7a10f64 Reviewed-on: http://gerrit.openafs.org/5736 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from af3dbb34a1ff226ac693c143f8e9d94ced4114c9) Reviewed-on: http://gerrit.openafs.org/5948 commit ad8aabf86e9d7e12897a9f0bfc425d4eb53580ed Author: Peter Scott Date: Sat Oct 29 13:29:55 2011 -0400 Windows: additional trace logging for afsredirlib A large number of addition trace log entries were added to assist in diagnosing problems in the dir entry processing. Change-Id: I8087cb8b72316ef367faa107d02cccf92b7b1ff3 Reviewed-on: http://gerrit.openafs.org/5739 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from dac012a84b1fec9f2a5003e8cf45a7bdb8cb004a) Reviewed-on: http://gerrit.openafs.org/5947 commit f1cc5706f6dceb8dc3e1ed4845b9d06efeeb92ed Author: Peter Scott Date: Sat Oct 29 11:34:07 2011 -0400 Windows: Reimplement AFSGenerateCRC() Replace the home grown CRC generation with a call to RtlHashUnicodeString() which is present on Windows XP and above. Change-Id: I5769fc99fb2485714fdb12d5f8a62dca47791c0c Reviewed-on: http://gerrit.openafs.org/5738 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 15d9654d7242e56a6bab9f8d61afa87b58c1c55f) Reviewed-on: http://gerrit.openafs.org/5946 commit b17fabb7b4a24fa44b64f0436297d284319a0d19 Author: Marc Dionne Date: Sat Oct 29 19:23:07 2011 -0400 Linux: 3.1: update RCU path walking detection in permission i_op The permission() inode operation changed again with kernel 3.1, back to the form it had before 2.6.38. This compiles fine, but is missing the new way of detecting when we get called in RCU path walking mode, resulting in system hangs. Change-Id: If86c2cca9c16aef7731f04832ec524ac30c22b3b Reviewed-on: http://gerrit.openafs.org/5740 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4952df3f0359531e4a660c99c94c51eb0b169f59) Reviewed-on: http://gerrit.openafs.org/5945 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a93cd10b946f17c715cf748de919c697b7887358 Author: Simon Wilkinson Date: Tue Jun 21 18:32:02 2011 +0100 rx: Remove the ADAPT_WINDOW code RX still has the remnants of an old mechanism for doing RTT and congestion window detection. This code is #ifdef'd out using the ADAPT_WINDOW define, but is pretty much unservicable these days, as it collides with the TCP style implementation (with ADAPT_WINDOW enabled, both will attempt to manipulate a connections RTT and window size) As the current TCP-style RTT and window calculation seem to work much better in deployment, and there isn't much hope for us being able to maintain two different congestion mechanisms, just remove ADAPT_WINDOW. It is in git, if we ever want it back (not that I think we ever would). Change-Id: I956aa991eb14617de1cebf36b9ce9e780211aa22 Reviewed-on: http://gerrit.openafs.org/5737 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from d603e2a95252200f02ad8465815c5bac0b23b1e1) Reviewed-on: http://gerrit.openafs.org/5944 commit 132655420c5e195c41afdaac3a5f35606631efe8 Author: Jeffrey Altman Date: Fri Oct 28 17:43:24 2011 -0400 Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of a file to a name that does not exist. Put back the code that makes that possible with a comment. Change-Id: I19dddded27a32b6ffa86d1458b7a1e2253705e97 Reviewed-on: http://gerrit.openafs.org/5735 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 7a426424b7fb45659f6000a564e8c71a9108a33c) Reviewed-on: http://gerrit.openafs.org/5943 commit 18170cef0d3786a3ae87f35ad39552673882ad6b Author: Jeffrey Altman Date: Fri Oct 28 11:36:10 2011 -0400 Windows: out of date version not in current chunk In buf_GetNewLocked(), the comparision to decide whether a cm_buf_t is a member of the current chunk must take the data version into account. If the data version is out of date, it is not part of the current chunk and is an object that can be safely recycled. Change-Id: I2d1699163925c881990b0f647bba1e8dd05d3f4d Reviewed-on: http://gerrit.openafs.org/5734 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb) Reviewed-on: http://gerrit.openafs.org/5942 commit 3c86f4c60f73a4c245c1f72ca53214036ebb6c40 Author: Jeffrey Altman Date: Thu Oct 27 17:57:25 2011 -0400 Windows: only flush buffers on shutdown if running If a service shutdown message is received prior to the service entering the running state, do not attempt to buf_CleanAndReset() because the required data structures and locks are not initialized. Change-Id: I4257cfcd1179a6d118975b6b813213c8aae232ed Reviewed-on: http://gerrit.openafs.org/5733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9743f5729d1a55513e861bb1334599a8e597de6b) Reviewed-on: http://gerrit.openafs.org/5941 commit a79aa81e72d37cda14c853c6406bea0e1ca01298 Author: Jeffrey Altman Date: Tue Oct 25 15:32:11 2011 -0400 Windows: Do not EEXIST exact match during rename AFS Rename operations on the file server will delete a target file if it exists. Do not prevent renames because an exact match of the target name exists in the target directory. Change-Id: I2d7c3283dc6433d1d1276e1406eb383b0f2853ac Reviewed-on: http://gerrit.openafs.org/5731 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9cf7a628c2ff178b2fa236d2c0a41ca9be315036) Reviewed-on: http://gerrit.openafs.org/5940 commit f0bc70d8bd78f6b4679939c1a9aedb4451a4f952 Author: Jeffrey Altman Date: Tue Oct 25 15:42:44 2011 -0400 opr: build on Windows after queue.h move 55efff93fe2762b58dc70cdd20aaf97e39825929 broke Windows. update the NTMakefile in src/util and src/opr to correspond to the move of queue.h. Change-Id: Ie74289712a442d01fdb15315a974f7430c3e8f48 Reviewed-on: http://gerrit.openafs.org/5732 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 8fce3848d94f9717323bbd5dc51a9d18956fa2b5) Reviewed-on: http://gerrit.openafs.org/5939 commit b03c426b363b3cf1200b1819dc000a8322b69c3c Author: Rod Widdowson Date: Sat Oct 22 16:46:26 2011 +0100 Windows: Look for 8.3 name when doing a rename If we are doing a destructive rename we need to find whether the target file exists. This is done in the usual way (case sensitive case insensitive), but the short name is not looked for. This means that the rename of a file to a short name will not supersede correctly; rather the service refuses the rename since the target existed already. This patch looks the target name up in the shortname tree if the target name is short and all else has failed. Change-Id: Ib03a87e58a9f015000fc2bf3a4067b8683032a49 Reviewed-on: http://gerrit.openafs.org/5652 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 241d3d54cebfc661cfaec6d21de091d906df3d08) Reviewed-on: http://gerrit.openafs.org/5938 commit 83baa00bc0414f186bf8e8a250ccd3ff389f0d77 Author: Peter Scott Date: Thu Oct 20 14:39:31 2011 -0400 Windows: New Trace for DirEntry tracking problem Incuded in this patch is additional trace for logging how directory entries are added, modified and deleted throughout the redirector Change-Id: If66c2790d8c8ec65733c20f52da4e98ec964ac82 Reviewed-on: http://gerrit.openafs.org/5640 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 159003395a6183266ad9672f12482b1cba6ba0ff) Reviewed-on: http://gerrit.openafs.org/5937 commit 1fbd30e74d8e6a8fe89c5d8d47f626a6654268ab Author: Jeffrey Altman Date: Mon Oct 17 09:29:37 2011 -0400 Windows: Free work item memory with tag value For consistency throughout the source module, free all work item memory allocations with ExFreePoolWithTag. Change-Id: I96eb3fc9f4cad11133b20354b88c5c71f340bc32 Reviewed-on: http://gerrit.openafs.org/5627 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from f0cc4c5dd0c03e4074fc70583215e590623e2414) Reviewed-on: http://gerrit.openafs.org/5936 commit 9ce178637066fe38b43c55e4b0a4c3acce7ecfbb Author: Jeffrey Altman Date: Mon Oct 17 09:28:11 2011 -0400 Windows: free pointer after last reference This is a superficial change but is being done for readability. If given the choice of freeing memory and then testing the pointer value or vice-versa, test the pointer value first. Change-Id: I84666e0bc2e06641c3d0d4ae16f42db996470f32 Reviewed-on: http://gerrit.openafs.org/5626 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from d5a6a895e3b004666b0d6aaa9fe4313b0a831dbd) Reviewed-on: http://gerrit.openafs.org/5935 commit d6370c5762f06cee690f38ddeff667846474a9ae Author: Jeffrey Altman Date: Mon Oct 17 09:26:13 2011 -0400 Windows: AFSInitPIOCtlDirectoryCB free in try_exit Process all conditional release of allocated memory on failure within the try_exit on failure. Change-Id: I818b75d3a1efae2b1ee8ce77f3606d29862a2446 Reviewed-on: http://gerrit.openafs.org/5625 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from ada5908ca1ed8cfa7bfc42890ac5edc73769ae4c) Reviewed-on: http://gerrit.openafs.org/5934 commit 169f14fdd83b8c83f90be3c7be9bb0a747655329 Author: Jeffrey Altman Date: Tue Oct 25 13:30:19 2011 -0400 Windows: close leak in AFSPrimaryVolumeWorkerThread Prevent a leak of the non-paged pool and a Resource by freeing all allocations within the Specific.Directory.PIOCtlDirectoryCB object. Use AFSExFreePool() instead of ExFreePool() because the objects are allocated from the AFSRedir.sys driver allocator. FIXES 130280 Change-Id: I4385c6ac60dce0949aa32e95e358d81e1434bb4a Reviewed-on: http://gerrit.openafs.org/5730 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 782fba58db1210e998ef9c6a50803262ac256812) Reviewed-on: http://gerrit.openafs.org/5933 commit 18cfa2022bc7d441387a73177a35936bc7cb3777 Author: Jeffrey Altman Date: Mon Oct 24 21:14:59 2011 -0400 Windows: afsredir only wants shortName if not 8.3 When performing a directory enumeration for the afs redirector only specify a shortname if the name is not valid 8.3. Change-Id: I14d30aabafc10d09363fd6101e339b4a9e7407b3 Reviewed-on: http://gerrit.openafs.org/5727 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 61b04b19ad4bf2c62ec4309efeba4f442a54d8f2) Reviewed-on: http://gerrit.openafs.org/5932 commit 33481411251ed913c3f56a6b1202a776cfed561d Author: Jeffrey Altman Date: Thu Oct 20 14:06:47 2011 -0400 Windows: Use SetFlag macro when setting flag Change-Id: I3e4a643e1f3cd257324d4fe58cb779cd0894a25f Reviewed-on: http://gerrit.openafs.org/5642 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 219624206ddee454e6bcbac7da7fe2fe632e39a7) Reviewed-on: http://gerrit.openafs.org/5931 commit 329665578d23ef51fd29f057cc4f58e4ea8be21d Author: Jeffrey Altman Date: Thu Oct 20 14:05:59 2011 -0400 Windows: minor typo in trace output Change-Id: I5dba1a39a68d1de880e2f72ae5377ca1ddc239f5 Reviewed-on: http://gerrit.openafs.org/5641 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from e21a063217f99ac441bb65c7e1f628de2a0fbb68) Reviewed-on: http://gerrit.openafs.org/5930 commit f37198cb79975fd516d505a12834c65f53b92932 Author: Peter Scott Date: Tue Oct 18 10:04:48 2011 -0400 Windows: AFSRemoveCaseInsensitiveDirEntry corrections If there is a fLink but no parentLink for the DirEntry being removed, return the fLink as the new value for *RootNode. This patch set also includes two changes that improve readability but do not alter the behavior. Change-Id: Id44d0d4897b002551039fe2016b529a838d61913 Reviewed-on: http://gerrit.openafs.org/5638 Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 81bfacca545e7394a13baa569a6b7c894fc36bde) Reviewed-on: http://gerrit.openafs.org/5929 commit c024e744d11cb5a168d773e2d7a905746736903d Author: Jeffrey Altman Date: Mon Oct 17 09:22:53 2011 -0400 Windows: AFSEvaluateTargetByName free buffer if no return For consistency with other functions in AFSCommSupport modify AFSEvaluateTargetByName to free the DirEntry on completion if the caller has not provided an out parameter to accept it. Change-Id: I7c59d215ffc37b160b60989a716ac61f609a5b2d Reviewed-on: http://gerrit.openafs.org/5624 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 46a96ee06582178eb88e8ca1c7fbb33fae79b403) Reviewed-on: http://gerrit.openafs.org/5928 commit 8ee098dffece3258bf1119307fc84ef8d3a5013e Author: Jeffrey Altman Date: Mon Oct 17 09:19:33 2011 -0400 Windows: remove unused code block A small bit of dead code in the redirector. Change-Id: Ie3205dfa541d194b39658a555be122e9d0e72cea Reviewed-on: http://gerrit.openafs.org/5623 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from c780a9bc2849e25e3ac84f9f674348b8cdd942ff) Reviewed-on: http://gerrit.openafs.org/5927 commit 2c6378720002f2a19bf4ba72bef072f29c5f4e5b Author: Jeffrey Altman Date: Mon Oct 17 09:10:17 2011 -0400 Windows: re-indent afsredir log message params convert tabs to spaces for consistent indentation make use of braces be consistent Change-Id: I126546be0557f13d934fa5418f5edc3d5dabc94d Reviewed-on: http://gerrit.openafs.org/5621 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from 9c723e7a514ee4f809348ec79e2124cf3a38d895) Reviewed-on: http://gerrit.openafs.org/5926 commit 677899fe0f156dcf5c49d54f58df6b434d8c7b85 Author: Rod Widdowson Date: Sat Oct 22 15:00:03 2011 +0100 Windows: Defer deref of a directoryEntry During the handling of SL_OPEN_TARGET opens (usually associated with a rename) a directory entry was deferenced prior to its contents being used (to set up a seconding inforation field). This change just holds on to the reference until after that processing. Change-Id: I33b5362433e49ee06ff99081341e7ef12d9ac959 Reviewed-on: http://gerrit.openafs.org/5651 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 2a7795aa565dfa4e371f806b799ce6a01a2db6c9) Reviewed-on: http://gerrit.openafs.org/5925 commit 56fa7f47aa2c0b5cd1c6bf0c0a932660e155b5eb Author: Rod Widdowson Date: Fri Oct 21 16:57:02 2011 +0100 Windows: Set new file index correctly during rename Directory entries are required to have a file index which is used during directory enumeration. When inserting into a new directory we have to update this from the target directory. This code fixes a bug whereby it was being set from the source FCB, rather than the target one. On failure we now also reset the value to its old value. Change-Id: Iea938b0012694afd2271d330b99438e47beb260a Reviewed-on: http://gerrit.openafs.org/5646 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 9824a53aea25a150f770e6b37536aa5fd7eb87df) Reviewed-on: http://gerrit.openafs.org/5924 commit 5da7359aac24c841506d2f4b9311f7440343dd35 Author: Jacob Thebault-Spieker Date: Tue Jul 19 15:01:26 2011 -0700 allow cloning of any volume to any volume with same parent ID remove checks to disallow cloning of ro volumes to rw volumes, which allows cloning of any volume within the same parent ID grouping, including allowing destruction of newer version of the volumes. Change-Id: I4c0e0f1a05c0b015aa832326b1c0dd48bc70fd70 Reviewed-on: http://gerrit.openafs.org/5049 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 83c41c69411ece7ac1dd0a7b15d4ee9746edcf23) Reviewed-on: http://gerrit.openafs.org/5923 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1d9dc1820592820bec4b73eeb7418a89d9a0df70 Author: Jacob Thebault-Spieker Date: Tue Jul 19 09:02:49 2011 -0700 remove check for disallowing clones of backup or ro volumes removes the if-statement ensuring that the volume being cloned is not a backup volume, nor a read-only volume. This allows clones from any type of volume to a given volume. Parent volume meta-data is maintained, only the cloneId value changes. Change-Id: If75d797e355d70912e7be56fae0ba3a40890f6cb Reviewed-on: http://gerrit.openafs.org/5046 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4e1a65ba7edec519acc67f0dcf2237a0f26e92aa) Reviewed-on: http://gerrit.openafs.org/5922 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2961e6488a03a83f4d61c800520489552ed87fd4 Author: Michael Meffie Date: Thu Oct 6 08:33:37 2011 -0400 bozo: build notifier sample program Build the smail-notifier sample program. Change-Id: Ifd0df65cefc1eadb3e8fdef44f0398df950ae282 Reviewed-on: http://gerrit.openafs.org/5555 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from ac88af748e25a40d062c888396aab8670ff8426a) Reviewed-on: http://gerrit.openafs.org/5921 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3b31b24267217289edb837baa9f2ec9da58dea08 Author: Michael Meffie Date: Thu Oct 6 07:55:21 2011 -0400 bozo: test program update Add -file option to test program to simulate program crashes. Change-Id: I5c0aedc2687b1eeee6cb5bf923eabb347f8fd072 Reviewed-on: http://gerrit.openafs.org/5533 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from e7302bcc9c4aa6f1e6a1ae8e5b498bcb0540aac9) Reviewed-on: http://gerrit.openafs.org/5920 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a7ed5536e142f62b28094274647e66fed40d14cd Author: Andrew Deason Date: Mon Aug 29 17:41:31 2011 -0500 DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER Currently VRequestSalvage_r takes a flag, VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the specified volume to be freed (via FreeVolumeHeader). This is almost never safe to do, since there may be other users of the specified volume that can be accessing the volume header at the same time. There is also no reason to invalidate the header at the time of the VRequestSalvage_r call, since the header must be invalidated when we detach the volume (other utilities may change header information). So, if there are any problems in the future because we do not invalidate the header at the time of VRequestSalvage_r, it is the fault of the detachment/offlining logic. So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take this opportunity to correctly document the VRequestSalvage_r headers in the VRequestSalvage_r comment, as it was previously missing the VOL_SALVAGE_NO_OFFLINE flag. Change-Id: I5d0451a7326997b38a466ec427c2e12e0cea4ae6 Reviewed-on: http://gerrit.openafs.org/5319 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5) Reviewed-on: http://gerrit.openafs.org/5919 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 5e711345279af397da9022c5072ea298dcbc051a Author: Michael Meffie Date: Thu Oct 13 12:23:35 2011 -0400 DAFS: fssync online requires a partition name argument fssync-debug online silently fails when run without a partition name. Check for the required partition name on the server side and the client side. Report errors back to the client when the server side fails to pre-attach the volume. Change-Id: I0b6b3729acf50656aefb082ae56ea9fb9218f11a Reviewed-on: http://gerrit.openafs.org/5615 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from d171a5e059566cc99c5dd980039dd56233f91a67) Reviewed-on: http://gerrit.openafs.org/5918 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7e74702fadbf90fd56d97fb2adc8099b56ebb4fb Author: Andrew Deason Date: Tue Oct 11 10:51:14 2011 -0500 volser: Remove ExtractVolId volser was using its own function to extract a volume ID from a filename string, and was using atol to do so. The ato* family of functions can have problems with larger volume IDs, not to mention a lack of error checking, so don't use it. Since we already have the function VolumeNumber in the vol package to do the very same thing, just use that instead. Change-Id: I76ed65e4640cc42515091810689cd6e61f684ea0 Reviewed-on: http://gerrit.openafs.org/5594 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry-picked from 87f969f82d12c8200ede3fd30a151e09ab0bf6ad) Reviewed-on: http://gerrit.openafs.org/5917 Tested-by: Jeffrey Altman commit cab590b6a99374084da41bd4035164c0f5b09f5e Author: Andrew Deason Date: Mon Oct 3 13:10:44 2011 -0500 viced: Check for HOSTDELETED in stillborn check h_FindClient_r checks the connection rock for a client object twice. First it sees if we already have a client object, and if we don't, we effectively create one (or find a suitable one). Then we check again, to see if someone else set the rock while we were creating a client structure. Currently, the first check checks if client->host->hostFlags has HOSTDELETED set, but the second check does not. So, if the host associated with the client has been deleted by someone else, currently we will unnecessarily log a "stillborn client" message, and we will continue to use the deleted host. If the host continues to be held by someone, we will run into the same situation repeatedly on future requests until all of the host references go away. To fix this, also ignore HOSTDELETED clients when performing the stillborn race check. Change-Id: Ifbac6d7fafd42ca9fe47360ba3915c1b2b6908c2 Reviewed-on: http://gerrit.openafs.org/5614 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from b5a153fb75bb6642490e9856dc6212244a590301) Reviewed-on: http://gerrit.openafs.org/5916 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit abf127c90aa670b302135b4dbe1dc33dbcb15601 Author: Andrew Deason Date: Thu Oct 13 11:45:58 2011 -0500 vlserver: Log to VLLog by default, not PtLog Change-Id: I5d5cbca19dd27a3c6c1c1d3ff15746fd4528cfc2 Reviewed-on: http://gerrit.openafs.org/5616 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 13a4642458254e6bdbfa6fd8e165c270f567a1aa) Reviewed-on: http://gerrit.openafs.org/5915 Tested-by: Jeffrey Altman commit fcc79659ee34e05ae8edafdea159faeeeda3e66f Author: Andrew Deason Date: Fri Oct 14 11:32:34 2011 -0500 vos offline: Bring volume back online for -busy vos offline is supposed to bring a volume back online from "busy" status before exiting, as volumes should not be in "busy" status for extended periods of time. This was being enforced by required that -sleep be specified; however, -sleep only results in the volume being brought back online if a non-zero sleep time was specified. So, make sure the volume is brought back online if -busy was specified. Change-Id: Iaefd135bd69b3205d14b88c0b35f493d91eb3a0e Reviewed-on: http://gerrit.openafs.org/5620 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d) Reviewed-on: http://gerrit.openafs.org/5914 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aba3f679e89256d9dbad0785068eaea56d4a93c1 Author: Marc Dionne Date: Sat Oct 22 09:32:33 2011 -0400 cache bypass: don't define iovecp for UKERNEL iovecp is defined but not used for UKERNEL. Define it conditionally to avoid gcc warnings and --enable-checking failure. Change-Id: Ic4697ffd329c975e1357f1e19328700a22c4a9da Reviewed-on: http://gerrit.openafs.org/5650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 547d94edd3affb5f377cd1b3db39c46ca0cf5aec) Reviewed-on: http://gerrit.openafs.org/5913 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aadaa1ea7615f6ba27b19771194a5639fb576714 Author: Rod Widdowson Date: Sat Oct 22 14:27:41 2011 +0100 Windows: Remove unused cleanup flag In AFSOpenTargetDirectory the flag bRemoveShare was initialized FALSE and never set TRUE. In teardown after failure some code did listen to the flag, but the operation (IoRemoveShareAccess) was not protected by the FCB mainlock which it should have been. Rather than get the locking correct, just remove the flag entirely. Change-Id: Ib5712af0c572a6ceab3aa1643b4959b394d3860c Reviewed-on: http://gerrit.openafs.org/5649 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from f715ebaee4188300ecee57109512609c7c84cf98) Reviewed-on: http://gerrit.openafs.org/5912 commit 44a99baa658042d29ed82c2eeae910c28383c3b6 Author: Derrick Brashear Date: Sun Oct 23 19:15:16 2011 -0400 bypasscache: allow arbitrary sized iovecs instead of binding outselves to PAGE_SIZE, just fill any size Change-Id: I453acc35ddf41ff54d0da96e44694f13552ba6d4 Reviewed-on: http://gerrit.openafs.org/5658 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 4b817cbb520872e69b01e5675f9037d8948d0ade) Reviewed-on: http://gerrit.openafs.org/5911 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 718b265846da050769a1f2f147533bfb30556a9e Author: Derrick Brashear Date: Thu Oct 6 04:04:36 2011 -0400 bypasscache: do errors correctly do set errors when we bomb out early do not unlock and return early when we happen to do a correct zero length read do set errors the kernel can deal with if we're feeding a page routine Change-Id: I69e53f7a326de780edd8a820aaacb506aef1f25f Reviewed-on: http://gerrit.openafs.org/5554 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 28a159b2bfff7ad450dce612601a0286d4f91df5) Reviewed-on: http://gerrit.openafs.org/5910 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1eebe1e50dd8c3208a895519bff21da5f68553a6 Author: Derrick Brashear Date: Tue Oct 11 15:37:57 2011 -0400 ukernel: get an ip address even when dns and hosts suck gethostname plus gethostbyname being useless make things fun make things less fun Change-Id: Ia3146f54a507ba4d1d54bad3abee63f2190dc5d8 Reviewed-on: http://gerrit.openafs.org/5600 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 6f59c71988d75f76750c46adb11cda7e9189d5f3) Reviewed-on: http://gerrit.openafs.org/5909 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8e031303ce41d89a30a58e728118550cc0fcd7bc Author: Marc Dionne Date: Sun Oct 23 22:45:21 2011 -0400 dir: add missing return in DRead A missing return in the kernel version of DRead causes the code to think that no entry exists for a dir and proceed to allocate a new one, if the entry is the third one in the hash chain. If the existing entry is dirty, its contents are never written back, and the pending changes to the directory are not seen by the client. Change-Id: I9853b02c114225c02c68b8086aa6cf0ee8fd1a13 Reviewed-on: http://gerrit.openafs.org/5666 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7829e7152361c38a22a7ba4c11e4f614e4392d60) Reviewed-on: http://gerrit.openafs.org/5908 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4efc8b46714027315d3ca4d2a481e1d9c33d3b4 Author: Simon Wilkinson Date: Sun Oct 23 17:41:27 2011 +0100 tests: volser doesn't need rxgk yet An rxgk dependency has crept in to the volser tests. Remove it for now. Change-Id: Ic475977b3e5191f267e932943ec6546632f2977d Reviewed-on: http://gerrit.openafs.org/5665 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 2aaa540276f5b5a0c368e44d8fd04b32c4632c3f) Reviewed-on: http://gerrit.openafs.org/5907 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d38f316e4e6b429849e79d33ffe8925379477e11 Author: Simon Wilkinson Date: Sun Oct 23 17:40:20 2011 +0100 tests: Add opr library for ktime test The ktime tests need libopr for the lcstring routines. Add the dependency. Change-Id: Ib366a17cf770e93b109eab890dc61398831080ad Reviewed-on: http://gerrit.openafs.org/5664 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fd5174d918a5d75f64b122c8433a3c431cb8e454) Reviewed-on: http://gerrit.openafs.org/5906 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e4ccc7af0c892ac6de2632993e08a8b0f9450ea1 Author: Simon Wilkinson Date: Sun Oct 23 17:49:08 2011 -0400 roken: Add *progname() to shared library exports Add rk_getprogname and rk_setprogname to the set of shared library exports in libroken Change-Id: I178d2a4d428f889c869da75f9dc4e5da46a650e1 Reviewed-on: http://gerrit.openafs.org/5661 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from d88682e803912451880c3a9c2b07a01abaebe984) Reviewed-on: http://gerrit.openafs.org/5905 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4974db91802f6051922e91817a42fc57e3efbcf Author: Simon Wilkinson Date: Sun Oct 23 21:23:34 2011 +0100 rx: Define afs_kmutex_t for LWP too afs_kmutex_t is used for lock definitions in the kernel, and in pthreaded builds. LWP doesn't have any equivalent, and all structure members using this type have to be protected with RX_ENABLE_LOCKS, which starts to become untidy. Just make afs_kmutex_t an int for LWP, so that we can simplify our headers, at the expense of some additional storage on LWP builds (which are going away at some point, anyway) Change-Id: Idd90fd0c2b0aa94fde1308b49641f83a820dee8b Reviewed-on: http://gerrit.openafs.org/5660 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5743c96bdea2e9aafeeeec3a1b4377d8860ef437) Reviewed-on: http://gerrit.openafs.org/5904 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit dc4e3ac1c1c7123633d0d3a890ed31f2919f89d3 Author: Simon Wilkinson Date: Sun Oct 23 16:38:13 2011 +0100 dir: Don't leak a buffer on a failed Enumerate If, for some reasons, Enumerate encounters a hash object with a NULL buffer pointer, that's no reason to leak the hash object. Make sure that we DRelease it before failing Change-Id: I6a8f3583dd1c9c11f1dbc59dcd36fdd0460bda61 Reviewed-on: http://gerrit.openafs.org/5659 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 3f938315adc08936024eb86678745dd85d2a092d) Reviewed-on: http://gerrit.openafs.org/5903 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 66730cdf8f033a77f644690ae2163e79feffc1a5 Author: Andrew Deason Date: Fri Oct 21 15:05:06 2011 -0500 LINUX: Fix afs_linux_pag_to_groups signature "new" is a struct group_info**, not a struct group_info* Change-Id: I4007c614002cbe3683787f9a77e43798328c5d07 Reviewed-on: http://gerrit.openafs.org/5648 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e) Reviewed-on: http://gerrit.openafs.org/5902 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a3297643410b3759362bb6798c345ba70b6f48f3 Author: Andrew Deason Date: Fri Aug 12 14:50:26 2011 -0500 LINUX: Revert group changes on keyring failure On Linux kernels that support keyrings, when we setpag we try to add the PAG to the session keyring and to the supplemental group list. Currently, if we fail to add the PAG to the keyring (which may happen due to key quotas, or possibly other reasons), we return failure but the group list is still modified with the new PAG in it. Therefore, if the keyring-based approach fails, the new PAG may still be in use, but there are no keyring keys associated with that PAG, so the PAG may never get destroyed. This can cause a large number of PAGs to accumulate over time, causing performance problems. So, change this so that, in the event that keyring installation fails, we revert the group list back to what it was before we touched it. Also mark all unixusers with the new PAG as expired, in case one got created during processing. Thus, the new PAG never gets used. Change-Id: I068158607d19e27db6dbeda84f912c52d4b1919f Reviewed-on: http://gerrit.openafs.org/5238 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from ee2fbffb04bb8b5098354646e262afa90c1b6f59) Reviewed-on: http://gerrit.openafs.org/5901 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 6f730bcdadb7f78a0b44e451b1725a7aa699abaf Author: Andrew Deason Date: Thu Oct 20 16:57:14 2011 -0500 viced: Do not swallow errors on StoreData recovery When we encounter any error in the StoreData fetch/store loop, we reset the disk usage to ensure it remains correct, even in the face of unexpected errors. However, when we do so, we use the errorCode from VAdjustDiskUsage as our return value; if it is 0, we return success, ignoring the error that got us in this code path in the first place. Instead, keep track of a temporary errorCode for the disk usage adjustment, and do not override our return value if there was no error in the disk usage numbers. Change-Id: I1fcd0f52821ac813d57ecac2f743edd4474727b1 Reviewed-on: http://gerrit.openafs.org/5645 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from dd831c09602f1ef16cc7dece84aeff638cce7272) Reviewed-on: http://gerrit.openafs.org/5900 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d26d743c9dc7432fb400b8160ffaebfa1437f787 Author: Simon Wilkinson Date: Sat Oct 22 09:43:41 2011 +0100 opr: Move queue header out of util Move the header which is installed as opr/queues.h out of util/ and into the new, top level, opr/ directory. Similarly move the tests out of the util/ test suite, and into the opr/ tests Change-Id: I56cebc8f2d9f53454e70147e07587580c4e3c4b5 Reviewed-on: http://gerrit.openafs.org/5656 Reviewed-by: Derrick Brashear Tested-by: Simon Wilkinson (cherry-picked from 55efff93fe2762b58dc70cdd20aaf97e39825929) Reviewed-on: http://gerrit.openafs.org/5899 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4743c4b30bfa389e69ef772d8648657f040a919 Author: Simon Wilkinson Date: Mon Oct 10 19:01:26 2011 -0500 dir: Remove double release in FindBlobs When DRead() fails, we DRelease the entrybuf, then break. However, this break takes us to the end of the function, where we promptly DRelease again, causing a double free Change-Id: Ifc2adecb0b05c17abba8f7aed711c4fe6aa1b86c Reviewed-on: http://gerrit.openafs.org/5655 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from ab866c821a705d7911e0ff8ac987249efdc63435) Reviewed-on: http://gerrit.openafs.org/5898 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fbbbe68380b2662a686f6d37ddf2c918bc3d457a Author: Derrick Brashear Date: Wed Oct 12 14:34:55 2011 -0400 afs: don't try GetDownD if nothing to get if we "need" negative slots or caches, don't run. also, don't stay "too full" Change-Id: Idcca18e8db6defda5654015f97cc1fdce27d45cc Reviewed-on: http://gerrit.openafs.org/5612 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 488c7c97854a4bd0ec67bcfe17df93b3fd025f88) Reviewed-on: http://gerrit.openafs.org/5897 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d0ca0866a1bc3b3d9f617f45ae54776ca9eef869 Author: Simon Wilkinson Date: Wed Oct 12 15:26:23 2011 -0400 ukernel: don't define rdwr env on linux We're not vm rdwr env in ukernel. Don't claim we are, otherwise we will never push chunks out to the fileserver when our cache is full Change-Id: I590482eeeb4ad72398cbeadb159b2c6822715794 Reviewed-on: http://gerrit.openafs.org/5613 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 796de9fb43857acccbd51e2af7c8d67eea90fdc5) Reviewed-on: http://gerrit.openafs.org/5896 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d323e80b68279b6a8f8dfec9cc0e9f40b90233ba Author: Derrick Brashear Date: Wed Oct 12 13:09:42 2011 -0400 ukernel: set pthread stacksize to an integer multiple of 8k because some pthread stacks require this to be in units of page size, guess that page sizes will be 4k or 8k, and use the larger as a divisor Change-Id: I3624dbefb0029ad735fcbfb8a1368b5bef7a5590 Reviewed-on: http://gerrit.openafs.org/5606 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear (cherry-picked from 7ae1921b76750ef28258777cf1b233c4917663d7) Reviewed-on: http://gerrit.openafs.org/5895 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ba344bc2b600173e92634e0195a1e12f779e2fc3 Author: Simon Wilkinson Date: Wed Oct 12 13:04:28 2011 -0400 ukernel: add morepackets check in listener Make the listener loop actually check for more packets needed, like kernel, pthreads and lwp. Only checking for new packets every 20 seconds isn't sufficient on today's networks! Change-Id: I72ff1229530bb36470891aae2e5ec65e59463084 Reviewed-on: http://gerrit.openafs.org/5605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from eead07418f13cd87a90770f03ea5118c546d8f1a) Reviewed-on: http://gerrit.openafs.org/5894 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c6a43197f95041dcaef92ee82d8caae8d545637a Author: Derrick Brashear Date: Tue Oct 11 15:21:12 2011 -0400 afs: on uuid init fail, don't leave garbage behind make sure we zero the uuid if we failed Change-Id: I9563bfc2b9b4dcb208578eff0a98489b803e395d Reviewed-on: http://gerrit.openafs.org/5599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb) Reviewed-on: http://gerrit.openafs.org/5893 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 75b3b6c9f1a1930c6a765048ca0bf1497dc38ca5 Author: Derrick Brashear Date: Tue Oct 11 14:32:04 2011 -0400 ukernel: set close-on-exec on our socket if the process we are in execs a child, it doesn't get our socket Change-Id: I240283fa0b67eacd0e5c38a21af1664a6f68e9f1 Reviewed-on: http://gerrit.openafs.org/5598 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 87dcfc872c11fdb13ebf0448abe91150aaa86859) Reviewed-on: http://gerrit.openafs.org/5892 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9e1205f80cd0ef5af8f35d362c281a531098fb4e Author: Andrew Deason Date: Thu Apr 14 15:36:50 2011 -0500 auth: Get correct viceid in legacy GetToken When ktc_GetTokenEx needs to get tokens via the legacy ktc_GetToken interface, it was not extracting the viceid. Make it set the viceid so the caller gets the correct id. Normally this would require parsing the given client name. To reduce the amount of times we store and extract the viced from the "AFS ID %d" string, create a helper GetToken function that can store the viceid directly, without storing it in a string. Change-Id: I8707bdc4d3cd5c6c183b2659a14d5b23a7d48a89 Reviewed-on: http://gerrit.openafs.org/4482 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 735873d51512bc31134856c06345bb7caf9d8144) Reviewed-on: http://gerrit.openafs.org/5891 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 339eccb2c1078c1bd667a9f2834c385ca01ec6e2 Author: Andrew Deason Date: Thu Apr 14 15:05:37 2011 -0500 auth: Force correct evenness on rxkad tokens Rxkad tokens historically have forced odd lifetimes when the given viceid is actually an AFS ID, and even lifetimes when it is not. Force this when the new token-handling functions are used (so the viceid is correctly interpreted by users of the old token format), by creating rxkad tokens with token_importRxkadViceId. Slightly reworked by Simon Wilkinson to provide a generic token destructor function. Change-Id: Ic7f592dee71d05004f639027cd588ccebd5b54f0 Reviewed-on: http://gerrit.openafs.org/4481 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 59b47fba3fa7cf13ef82463c5112851f7bdaf2ec) Reviewed-on: http://gerrit.openafs.org/5890 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 34c886877e7cb07c6134683e6e2595a65497cd74 Author: Simon Wilkinson Date: Mon Oct 10 17:19:13 2011 -0500 docs: Refer to dafs binaries by their real names (Most of) the dafs binaries are called da(something). Update the example in the dafileserver documentation so that we call the binaries by the names that they are actually installed with on the system. Change-Id: Ic0d8c6f1b5c612b1e528f2d02e66012f575c3c3f Reviewed-on: http://gerrit.openafs.org/5654 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from c37a14697df291f641b4fa5a32826054d92210b0) Reviewed-on: http://gerrit.openafs.org/5889 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 64b9c8a6f03aefd242551ea323465ba4a4eda79d Author: Simon Wilkinson Date: Mon Oct 10 22:09:40 2011 +0100 ptserver: Don't check for noauth before rebuilding The ptserver database building scripts would check to see if the server was running from a bosserver with the noauth flag set before performing a database rebuild. This means that you can't start ptserver normally, and then configure the database using pts -localauth, which is the preferred method for configuring new cells. Remove the check for noauth. This is slightly risky, as it means that a corrupt database could be completely erased upon restart. However, we already check that the dbheader (65k) is entirely blank - which will protect us against any single page corruption errors. Change-Id: I7282a30756fe13da2c69f064f36a863cae70d827 Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 7a4498850814ea524f55de0b84d6b0ae0b4834bb) Reviewed-on: http://gerrit.openafs.org/5888 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 55f3f860ffd89af7f998812c25ddb1315e50041b Author: Rod Widdowson Date: Wed Oct 12 11:04:33 2011 +0100 Windows AFSRDR: Log before decrementing refcount The library support package keeps count of the number of times the library code is active. When this goes to zero this means that unload of the library can continue. Although I cannot see it in the code it seems reasonable to assume that at that stage the device object might go away so (and if it doesn't do now it may in the future). This potentially renders it unsafe to do anything after InflightLibraryEvent has been signalled. This patch moves the logging up to above the decrement of the refcount. Change-Id: If20f756d6e655bca6c560c8672a97003f122ba5e Reviewed-on: http://gerrit.openafs.org/5601 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 1b32b4800b1dd8985c1554453354e683a66c9ab5) Reviewed-on: http://gerrit.openafs.org/5887 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 685cca704bd5eaa4bff9fd25067848cbccc0245d Author: Derrick Brashear Date: Tue Oct 11 14:03:29 2011 -0400 ukernel: don't enforce thread lockers in remove vop we enforce locking by pid. when we are ukernel, MyPidXX is stupid. don't bother. Change-Id: I6ed5d52dd04953ae5d7d2d40aa617753986426d1 Reviewed-on: http://gerrit.openafs.org/5597 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from da9044cff966736bc064166a7136c94c0bfc1e5f) Reviewed-on: http://gerrit.openafs.org/5886 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0d786f8a3a2182c76ea004a541dd16914ffb861b Author: Derrick Brashear Date: Mon Oct 10 17:56:20 2011 -0400 ukernel: install our sysincludes to root.perf otherwise, we can't actually include sysincludes from something linking libuafs Change-Id: I77ae1b8a3decee0a32086d6d7b3967514a6d0777 Reviewed-on: http://gerrit.openafs.org/5593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 75179d50eae3258e8baa0a4c9f069fcd11d08260) Reviewed-on: http://gerrit.openafs.org/5885 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4f357e064da26b81a596a152052c0f242b31937a Author: Derrick Brashear Date: Mon Oct 10 16:35:45 2011 -0400 ukernel: add uafs_access we don't have an access vop. add one. Change-Id: Ieb46c411a8300933e8dfb0000290fb821f286ad9 Reviewed-on: http://gerrit.openafs.org/5589 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 3eb60908a1f9b3f2783ec3f7755b242bff3d573d) Reviewed-on: http://gerrit.openafs.org/5884 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2c03ddd2efa4d866c87d0eb1287f3c8f58bd7887 Author: Derrick Brashear Date: Mon Oct 10 16:57:35 2011 -0400 volinfo: fix bad format string we need a format string; currently here we have none, which is no good Change-Id: Idf6a04475f29ec1413d3d27f91b3c20a42e110cc Reviewed-on: http://gerrit.openafs.org/5591 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88) Reviewed-on: http://gerrit.openafs.org/5883 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 404ba73245a102e914539c93730947bdb4c7be2f Author: Hartmut Reuter Date: Wed Oct 5 10:06:05 2011 -0400 vol_split: avoid using stale open directory vnodes we could in case of multiple splits end up using a stale open vnode for a directory; attempt to close and thus force-reopen any fdhandles backing ihandles. Change-Id: I0b12c7e012d86695f7c48549beb2f454c902dff7 Reviewed-on: http://gerrit.openafs.org/5553 Reviewed-by: Hartmut Reuter Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c) Reviewed-on: http://gerrit.openafs.org/5882 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7f9a04656d9e2f45f7288673bc16fb260618826a Author: Michael Meffie Date: Thu Oct 6 06:03:07 2011 -0400 bozo: bosserver man page updates Add the new -pidfiles option to the man page. Add a few other missing options as well. Change-Id: I1068fa1d5d7767020ed35ff11bc4115042f07978 Reviewed-on: http://gerrit.openafs.org/5587 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 26253df896a7709847cda041db1dc187f1dbf83e) Reviewed-on: http://gerrit.openafs.org/5881 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a827ed78aa5440b2f8951918d1b655f010b9559a Author: Derrick Brashear Date: Fri Oct 7 08:11:34 2011 -0400 bypasscache: free in order we need to free this, but while the pointer is still good Change-Id: I5108ba4495998ac64796c7cb4528ae74bf56aa7e Reviewed-on: http://gerrit.openafs.org/5562 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from df3e4145e758de3530a21bb1e75cd48a4a7f61ec) Reviewed-on: http://gerrit.openafs.org/5880 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit df27041865f0866ed337eba6a312f9d115e5a166 Author: Michael Meffie Date: Fri Oct 7 05:50:37 2011 -0400 doc: fileserver synopsis typo Fix a fileserver synopsis typo noticed during Derrick's EACK2011 debugging session. Change-Id: I310b7d178fdbe7920121863658ea0be9b4243f1d Reviewed-on: http://gerrit.openafs.org/5558 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from f2cba414c1390d5ed46b6c57f5682bfbcf53774e) Reviewed-on: http://gerrit.openafs.org/5879 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e329617326cecd147161eb969e4791dee62efe05 Author: Derrick Brashear Date: Wed Sep 21 15:02:40 2011 -0400 bypasscache for ukernel simple (read) bypasscache for ukernel. does not bother trying any buffercache stuff. Change-Id: Ifa750b2f3e52ee5321e8af23e60f6213b1c80a2a Reviewed-on: http://gerrit.openafs.org/5484 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from d1cf14d54e380014851fb850b65263a66a8a4443) Reviewed-on: http://gerrit.openafs.org/5878 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c4626c83be9533ec5f441ac636c68853f192ae9f Author: Andrew Deason Date: Thu Apr 14 11:29:26 2011 -0500 aklog_dynamic_auth: Support new SetToken pioctl Make aklog_dynamic_auth use the new SetTokenEx method of storing tokens. Change-Id: Ic2c91cc25c028d1ab802c218c250996f4f4fae4e Reviewed-on: http://gerrit.openafs.org/4483 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 40eebd37a295c77615950858e08282447a8c28ca) Reviewed-on: http://gerrit.openafs.org/5877 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 673f46aeb220f7fc4c9f1ac162083237ba6faf2a Author: Andrew Deason Date: Thu Sep 29 12:14:15 2011 -0500 Remove a few extra trailing backslashes In a few different places, moving libutil before libafshcrypto_lwp caused a variable definition to have a trailing \ on the last line of the definition. This can confuse make (at least, the HP-UX make) to think the next following definition is also part of the current definition. Remove the trailing "\"s. Change-Id: I32533fec0df4e4fb9501bd3cb40c420a56d0af79 Reviewed-on: http://gerrit.openafs.org/5523 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 0ca1d92952cc81483e7b949f2982033cf0b9f3db) Reviewed-on: http://gerrit.openafs.org/5876 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cb64172867da610b991c0e36df2fc0b72b7fc9a3 Author: Andrew Deason Date: Wed Sep 28 15:02:48 2011 -0500 vol: Only check "logging" on vice partitions We don't care about non-vicepX partitions, so move part of the UFS "logging" check into VCheckPartition. This API should probably redone so the "am I a vicepX partition" check is done completely separately, but for now, this will do. Change-Id: Ib2df2079a392d7ed1a8c2aded34f2a7265215ecd Reviewed-on: http://gerrit.openafs.org/5514 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Tested-by: BuildBot (cherry-picked from 82481c6f4464ad978ea56c687205bdfcd3eebffd) Reviewed-on: http://gerrit.openafs.org/5875 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8cbd52a3d8493645b3adec0147865c7b78da0500 Author: Rod Widdowson Date: Thu Sep 29 15:34:48 2011 +0100 FSSYNC-Client: Consistent use of partition name Over time the FSSYNC code has collected examples where the partition path is passed rather than the partition name. In Unix this is the same (/vicepX), but on windows the path is the DOS device (C:). This checkin changes FSSYNC client code to always use the partition name. This checkin does not address FSSYNC server or SALVSYNC. Change-Id: I2f2b0c67d9df23207c47f4cd816be5b20909a1c5 Reviewed-on: http://gerrit.openafs.org/5521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry-picked from b4f96eb78d9403799b97a39b9659070cf1114cd1) Reviewed-on: http://gerrit.openafs.org/5874 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a13b52888e2c6135bb8cbc329aec9d808fd6388a Author: Andrew Deason Date: Thu Sep 29 14:49:53 2011 -0500 DAFS: Do not serialize state for invalid hosts When we serialize host information for DAFS during shutdown, we have no guarantee that the host is in a valid state when we look at it. This can result in a host being saved to disk when we are waiting for the host to respond to an RPC, and so the information about the host is invalid. For example, we can save a host that has the HWHO_INPROGRESS flag set, and when it is restored later, this can cause odd behavior since the flag is set but no thread is actually waiting for the host to respond. So instead, during state serialization, try to determine if a host may be in an invalid state, and simply skip the host if it may. Change-Id: I755640ea4ce607245ae98cc7455472ef781271e7 Reviewed-on: http://gerrit.openafs.org/5528 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5c6bd04211d587efde4b0915a62273aafb2d306b) Reviewed-on: http://gerrit.openafs.org/5873 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b3dd6ccb74d0f2405b7d832c96b3b3369aba689c Author: Andrew Deason Date: Thu Sep 29 16:04:54 2011 -0500 DAFS: Skip hosts with invalid flags on restore Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have valid state, since those flags indicate that the fileserver was in the middle of identifying the host when the host struct was serialized. Skip entries from the on-disk host data that have such invalid flags set when restoring state, so we do not load invalid data. Change-Id: I5d78718d5625e4ce8475695dcb699b1cd6b305c3 Reviewed-on: http://gerrit.openafs.org/5527 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6e7b31ef0a69b8ea39e8acc474a7aab48f828d3d) Reviewed-on: http://gerrit.openafs.org/5872 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e6ae122e76ef14e2ce5c51194224cd0c112babe8 Author: Andrew Deason Date: Thu Sep 29 15:22:35 2011 -0500 DAFS: Add explicit 'valid' field for index maps The CB, FE, and host serialization structures were just using the relevant indices to determine whether or not an entry mapping and old index to a new index was populated with actual data. For host structures, this really isn't sufficient, since our index can be 0, and the structure is calloc'd, so the index in the structure could also be 0. Add a flag explicitly stating whether or not the structure has been filled in, to make this unambiguous. Change-Id: I30447aa426c041f9261fdfa37505d71fd604426c Reviewed-on: http://gerrit.openafs.org/5526 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from d54a9994d362ce3f287fe786839ec72f6d94806c) Reviewed-on: http://gerrit.openafs.org/5871 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 442af50e29102663809b9704660879d29f8b7247 Author: Andrew Deason Date: Thu Sep 29 18:36:07 2011 -0500 viced: Assert valid statistics indices Make sure we are passed valid statistic index numbers, so passing in a bad index doesn't result in writing over random memory. Change-Id: I3041d4a3c72a8fd8cdd21d158d594dacba162b99 Reviewed-on: http://gerrit.openafs.org/5525 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from d43438bb914f267f1c65d81e23efbab6874ae426) Reviewed-on: http://gerrit.openafs.org/5870 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 93ce9981991ea3939bb3dbc741cd2c09c6e9fe53 Author: Andrew Deason Date: Thu Sep 29 18:31:37 2011 -0500 viced: Use xfer indices for xfer data Use the xfer indices for the xfer-related data, not the op indices, so we don't try to fill in data beyond the actual storage for the stats. Change-Id: I907ffe6c67eb8402810287894d8d643e85b06df3 Reviewed-on: http://gerrit.openafs.org/5524 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 22d94407ea06a3213b7f0f6d57edd48d1977b2e1) Reviewed-on: http://gerrit.openafs.org/5869 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c7eb9398e1282d9656cb00085f9bbcece63412df Author: Marc Dionne Date: Wed Sep 28 21:15:32 2011 -0400 rx: add post RPC procedure capability Add the ability to specify a procedure that will be called after the end of each RPC for a service. This is similar to the existing afterProc, except that it gets called after the RPC has ended (after EndCall). rx_SetPostProc and rx_GetPostProc are provided to set and retrieve a postProc for a specified service. Change-Id: I3b3bb6e562321ccfb7c04dcf015f1b016a4868c2 Reviewed-on: http://gerrit.openafs.org/5529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry-picked from 5587bbfc0bc70de234e5655faf7676cf2b9b9715) Reviewed-on: http://gerrit.openafs.org/5868 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c24613019b82debc670a3f583c44dd68ef1f3507 Author: Marc Dionne Date: Wed Sep 28 18:39:55 2011 -0400 viced: remove duplicate declaration viced_uclient_key is declared twice, remove one of the declarations. Change-Id: Ibaeddbf4dcbe9c48bd838c8df46a4c82a863c2d8 Reviewed-on: http://gerrit.openafs.org/5515 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 11a6fc948983c0a9f1fb41c58b9559750763440b) Reviewed-on: http://gerrit.openafs.org/5867 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4935b51eab4b17d8f5f70a3eeac6c2536b202187 Author: Rod Widdowson Date: Wed Sep 28 16:46:00 2011 +0100 Windows: Remove spurious use of CRTL Checkins b71a2daa and 5247fa38a moved us from using a FILE* to using an FDi_t. However, lurking inside the dump code we see a use of _filelength() which is a MS-Crtl API. This checkin replaces this call with one to the WIN32 API GetFileSizeEx. Change-Id: Ia8a276ecc28dc26eadc68f4e5c43ae699eae4e9b Reviewed-on: http://gerrit.openafs.org/5511 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry-picked from 60a6454d80c760aa8768ba64f7c5bab24f897c7b) Reviewed-on: http://gerrit.openafs.org/5866 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b6d390e7c0e3595b1a841570c9224d61ad443dc8 Author: Andrew Deason Date: Wed Sep 28 15:41:38 2011 -0500 Remove references to afs_assert.h The header afs_assert.h no longer exists after commit cac74242728ad97e3ce9cef0a949d58c237250f6. Remove all remaining references to afs_assert.h in the tree. Change-Id: I6cb8b26b0167c7243b20e3f535ea7c6e94e38985 Reviewed-on: http://gerrit.openafs.org/5513 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c7dc0180c7c424c6cb58d1493759caf82ef280f2) Reviewed-on: http://gerrit.openafs.org/5865 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1ad1e1d4ae1678f4e2627f4a42cbb0a98a2fb742 Author: Derrick Brashear Date: Wed Sep 28 10:23:19 2011 -0400 ukernel: output dataversion in stat struct if possible we already have this data; if we can output it, do so. Change-Id: I8b491dade6acf18fc42565563df82149866a0f49 Reviewed-on: http://gerrit.openafs.org/5510 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 955bab670d0aed714fc940b5be7e2b75896a63d0) Reviewed-on: http://gerrit.openafs.org/5864 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d9c0fe6f6cb5d2398b02a02dc3bcfbeeae1cea1c Author: Derrick Brashear Date: Wed Sep 28 10:11:16 2011 -0400 ukernel: make web enhancements the default none of the web enhancements break base functionality, and they are strictly more functionality; just turn them on everywhere Change-Id: I3cdaea1cccd1425b1146bf4a816894437787ef70 Reviewed-on: http://gerrit.openafs.org/5509 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 80943970b8cfcdf3fc630b25804aebaea228bd73) Reviewed-on: http://gerrit.openafs.org/5863 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3816c0f3b9d1f5ae6d53faf2596dbed90a0fe409 Author: Rod Widdowson Date: Wed Sep 28 17:34:54 2011 +0100 Windows: Fix comment about DiskPartition64 There is significant confusion between the partition name (/vicepX) and the containing volume (C:) in the windows code. A review of the uses in FSYNCH found a downright wrong comment (as checked in the debugger). Change-Id: I167a0fd83a60dc3604ce6b1302d4e6b4549043f5 Reviewed-on: http://gerrit.openafs.org/5512 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 5b579b83abc57d6bb9212b599aae96af9ac71832) Reviewed-on: http://gerrit.openafs.org/5862 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8e0d084344b880a504fba478d7e982ffce62c35b Author: Michael Meffie Date: Thu Sep 22 09:13:18 2011 -0400 bozo: report bosserver -rxbind address Create a file on bosserver startup called bosserver.rxbind in the server local directory which contains an address local scripts may use to contact the bosserver. When bosserver is started with the -rxbind option, write the address selected from the intersection of the interfaces, NetInfo, and NetRestrict configuration to the bosserver.rxbind file, otherwise write the loopback address 127.0.0.1. Update the RedHat init script to use the new bosserver.rxbind file. Change-Id: I6ddda254d69b10a68a16e4736d024bd89310b316 Reviewed-on: http://gerrit.openafs.org/5488 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726) Reviewed-on: http://gerrit.openafs.org/5861 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ff1341adab8dbf3793f79571c1c6c571f195a236 Author: Jeffrey Altman Date: Mon Sep 26 12:28:49 2011 -0400 Windows: do not install afs_assert.h commit cac74242728ad97e3ce9cef0a949d58c237250f6 removed afs_assert.h from the build tree. It can no longer be installed. Change-Id: I9f9bff18e09be8fa10dc1e573f6c0bb1660d8af3 Reviewed-on: http://gerrit.openafs.org/5505 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 4a0d8cc24e687f271fcf44bab765691bd782d78d) Reviewed-on: http://gerrit.openafs.org/5860 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bddac7ca58a4d69ba527ab003e7ffbcd79a7d4cb Author: Michael Meffie Date: Mon Sep 26 11:59:55 2011 -0400 bozo: fix overrun from -rxbind on restart Fix buffer overrun in bosctlsrv introduced by commit 544ff1b295a57b50afefa6146094434db7608355 Change-Id: Id6e2fe312ce0605685d3f5ce60f23271c59834b3 Reviewed-on: http://gerrit.openafs.org/5504 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 48e326372d89b0d778420f268dbe59236758eba8) Reviewed-on: http://gerrit.openafs.org/5859 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7d65c4544aae13de17bbc243b47a70987862d536 Author: Michael Meffie Date: Mon Jul 25 09:21:34 2011 -0400 volinfo: refactor vnode handling At program startup, register procedures to be called when scanning vnodes. Change-Id: I7fee43035320ef8315177c19bd2b459f5bb50021 Reviewed-on: http://gerrit.openafs.org/5100 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 11f54962f638c8ae48d5193f6b695c252fbb9937) Reviewed-on: http://gerrit.openafs.org/5858 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b5ad4ced08d8cf3a6ae96a3e8985dcfbf60abf8f Author: Michael Meffie Date: Sat Jul 23 14:55:57 2011 -0400 volinfo: release volume header ihandles when done After scanning the volume, release the header ihandles for the volume. Change-Id: I87a9579bc59c5556e657b48ef615ef89299f08d4 Reviewed-on: http://gerrit.openafs.org/5099 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4aa72b4308bae8e1d789682e7ead83bcadded862) Reviewed-on: http://gerrit.openafs.org/5857 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0a3ffab3c7f6758b584f49b84bb005c9dd8aa664 Author: Simon Wilkinson Date: Sun Jul 10 13:46:11 2011 +0100 Clean up assertion The AFS code has multiple different assertion implementations in userspace. This patchset is the start of bringing some sanity to them. In rx, we have osi_Assert, a user/kernel assertion macro. This is only available to libraries which have RX dependencies In util, we redefine the standard 'assert()' macro to provide a cross-platform assertion solution. Because util has an RX dependency, neither of these provide an assertion solution for libraries which should be independent of rx. So, pull the assertion code out of util, and put it into opr, as a new opr_Assert() macro. Implement the userspace osi_Assert in terms of this macro, leaving the kernel variant untouched. Update callers to the new macro and header file names. Change-Id: If923440c0f4289847749cf7fff1c38bae4d8214f Reviewed-on: http://gerrit.openafs.org/5394 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from cac74242728ad97e3ce9cef0a949d58c237250f6) Reviewed-on: http://gerrit.openafs.org/5856 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 53686463a7769426bb9eb112816c3257dd9cb5e7 Author: Simon Wilkinson Date: Sun Sep 11 21:44:23 2011 +0100 Move abort() into opr We need our own abort function, because the behaviour of the Windows abort() implementation isn't sufficiently flexible for us. Because we're replacing an operating system function, reather than implementing a missing function, this doesn't belong in roken. So, provide an alternative opr_abort() implementation in our portable runtime layer, which is a synonym for abort() on Unix, and implements the required DebugBreak() functionality on Windows. Remove lwp_abort() which was just creating another, unnecessary, layer of abstraction. Change-Id: I0a2fa44f74f5f5b19c90ce724d90d41696a58a7f Reviewed-on: http://gerrit.openafs.org/4428 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 0a8f21e6a44d59a3333c0b4fee572fe6d94aae3d) Reviewed-on: http://gerrit.openafs.org/5855 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit eaaa26cc7faeecfd35832eef0c1ba2fc1c4e7ff2 Author: Michael Meffie Date: Tue Nov 23 20:21:50 2010 -0500 bozo: bosserver -pidfiles option Add an option to bosserver to create pidfiles for long running processes for simple, fs, and dafs bnode types, as well as the bosserver process. The pidfiles are located in the server local directory by default, or in the path specifed by the -pidfiles command-line option. Change-Id: I9b2f897c696779b466a541e55231687cadc9e489 Reviewed-on: http://gerrit.openafs.org/5497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from bdf86d245fd55c5c7ac7ea81e3d6b6bafdbe1783) Reviewed-on: http://gerrit.openafs.org/5854 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9f40f5af85ba5db8cd9493a9f08e4ce5668c3866 Author: Michael Meffie Date: Fri Sep 23 11:28:05 2011 -0400 bozo: remove duplicate prototype Remove duplicate function prototype. Change-Id: I5915e2a012ed9f350af66e81359535e9c008dd76 Reviewed-on: http://gerrit.openafs.org/5496 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fab921de67fe2bfbf6967c2e1cbf27230aad8bb2) Reviewed-on: http://gerrit.openafs.org/5853 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d47fcbc8ddf5fdadb6f354cd218e0afa01e568ee Author: Rod Widdowson Date: Fri Sep 23 16:37:43 2011 +0100 Fix buffer leak in dir/buffers.c Checkin 0284e65f97861e888d95576f22a93cd681813c39 accidently threw in a trailing semicolon after an if statement. Since the next line was a break this had several unfortunate side effects, the most obvious being that we leaked a buffer in certain cases. Change-Id: Ic03f48ea542b1f0c0871389063951a7139c7f69e Reviewed-on: http://gerrit.openafs.org/5498 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c2f7627a89e50713dc963ece2ef086cd991c15aa) Reviewed-on: http://gerrit.openafs.org/5852 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 459edd9c14957dc3ac0d34eb567a3831188c5374 Author: Marc Dionne Date: Thu Sep 22 19:09:52 2011 -0400 viced: fix incorrect error message The error message was obviously copied from another location in the code (after the pr_Initialize call) and is misleading. Adapt it for vl_Initialize failure. Change-Id: Iebc335c42efb6bf8c3a556d07085a222b11ab094 Reviewed-on: http://gerrit.openafs.org/5490 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from a020c572d372f2e86807dc4c75ec50ff14ef2fba) Reviewed-on: http://gerrit.openafs.org/5851 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a47ae75fdcf2d76c1b8fca60710b6e0c4c095d1f Author: Michael Meffie Date: Thu Sep 22 11:28:17 2011 -0400 bozo: pass -rxbind on restart Pass the -rxbind on restarts when bosserver is initially started with the -rxbind option. Change-Id: I32fbbf30ed4e60555e0f087af6e0f83e780680e2 Reviewed-on: http://gerrit.openafs.org/5487 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 544ff1b295a57b50afefa6146094434db7608355) Reviewed-on: http://gerrit.openafs.org/5850 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f5c597fb1dc5b29886074b898781347cef002b5b Author: Michael Meffie Date: Tue Sep 20 16:21:50 2011 -0400 salvager: fix filesystem path truncation Fix filesystem path truncation for vice partitions beyond /vicepz. Commit 3d7388b7 moved the filesystem path to a fixed size buffer, however the path of the filesystem to be salvaged is truncated for partitions with two character ids (e.g. /vicepaa), in which case the salvager will salvager the wrong partition, or abort if the truncated path is not present. Change-Id: I261b7f88be7a6140d04563e1c2a88b9b9fc21775 Reviewed-on: http://gerrit.openafs.org/5469 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 1d6dfa5806b171c6f306508396a06302d3d9c42a) Reviewed-on: http://gerrit.openafs.org/5849 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8b3062f8da58ccf19f404c3e5fc1e6c656e1af3e Author: Andrew Deason Date: Mon Sep 19 11:05:59 2011 -0400 ntohs ubik header size The 'size' field in the ubik header is only 16-bits wide, so we should be using ntohs to read it, not ntohl. The database checking utilities for the prdb and kadb were still using ntohl (vldb was fixed by 591f9b6de9ab3dc5c17ad41af0241527f7f04b31). Change-Id: Ia23d570d70719982cdeb5d1d99522c59be2968a5 Reviewed-on: http://gerrit.openafs.org/5466 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from e69714739f64475d71633fd4cb3523bc1ae143bb) Reviewed-on: http://gerrit.openafs.org/5848 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7bf8cc16d5ad0075572db2ed105a07efcd781948 Author: Jeffrey Altman Date: Sun Sep 18 14:18:24 2011 -0400 dir: remove unnecessary cast from malloc Change-Id: I4720407138cccbc17dd278a762057355ea531549 Reviewed-on: http://gerrit.openafs.org/5464 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4d4cd3cd0874f4574989f57201bd3a3999764d6c) Reviewed-on: http://gerrit.openafs.org/5847 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cdf5c1ae095344b9beadb54c42c8880f9bb900ac Author: Derrick Brashear Date: Thu Sep 15 13:48:31 2011 -0400 rx: arrange for Finalize to really stop running calls previously rxi_ServerProc would happily error a call once rx_tranquil was set, but keep calling ExecuteRequest. Reorder code so kernel shutdown attempts are processed first; then arrange if we are tranquil to not process the call further. Issue discovered by Chaskiel Grundman. Change-Id: Ia750e3752d67908ea34820bbb82251292ebfd082 Reviewed-on: http://gerrit.openafs.org/5447 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6196abf3c864f8cc6ab1efc6e5625a5cc68158bd) Reviewed-on: http://gerrit.openafs.org/5846 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b9caee7cdf21588207f272b3eb79fb7370d95e07 Author: Simon Wilkinson Date: Wed Oct 12 09:47:14 2011 -0400 rx: Don't clear the receive queue when out of packets We can end up discarding a receive queue that's been soft acked, effectively taking back soft acks we sent. Whilst the RX documentation says that a client can drop soft acked packets at will, our RX implementation assumes that if the final packet in a call has been soft acked, we won't clear the queue. If a client clears the queue in this situation, the call will hang. What *should* happen is that we should take necessary locks, confirm that we have not soft-acked all of the packets in a flow, and then discard, or, if we're just going to discard, error the call. Reviewed-on: http://gerrit.openafs.org/5603 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f722a75fe21963d64217375f1f7bbb0eb14befb4) Change-Id: I2c3ffbc395a785794ec878be1d2feaebdf84b153 Reviewed-on: http://gerrit.openafs.org/5845 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7dd6c745479d2821a060fe3cf5f7c7b42b78fda3 Author: Simon Wilkinson Date: Wed Oct 12 09:50:18 2011 -0400 rx: ackall handling If we ACKALL a stream, then we're sending a hard ACK for all of the packets in the stream. We shouldn't send that hard ACK, and then a load of soft ACKs for packets that don't actually exist. Reviewed-on: http://gerrit.openafs.org/5604 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a9924ba433f81bfbfc2c0e726f2be06d460e4d56) Change-Id: Ic303fa46f40c1bfcaeb10b7c90b9dbcbc34118ee Reviewed-on: http://gerrit.openafs.org/5844 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0f9ec666edfc03d649251894c6acefd39a1ae766 Author: Jeffrey Altman Date: Tue Oct 4 19:01:50 2011 -0400 Windows: Explorer shell GetUnixModeBits() actually append the unix mode string elements to the respective strings. Reviewed-on: http://gerrit.openafs.org/5552 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 65bdade6d5a6c4301444f288cf20430241cbdc5d) Change-Id: Ie130b3b38504c7f4a3a2c7219e9c2eb2f110074f Reviewed-on: http://gerrit.openafs.org/5586 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e0533066fd9524bfba682e47b31d9938b8d25c3e Author: Jeffrey Altman Date: Tue Oct 4 17:29:26 2011 -0400 Windows: char* is not a Unicode string Do not treat the output of NetbiosName() as a wide_t when it is a char*. Reviewed-on: http://gerrit.openafs.org/5549 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e02cb72be034ddad019d2ee70e8009ee762d9ed) Change-Id: Id319160812d7a054249d8838f449ceef401f1d85 Reviewed-on: http://gerrit.openafs.org/5585 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2bc35050d5b906856bd2b7e04968e380b5eb29c6 Author: Jeffrey Altman Date: Sat Oct 1 14:05:31 2011 -0400 Windows: Explorer Shell Extension enhancements Redesign the AFS Volume Tab to report: . Volume name . Volume ID . Cell . Server . Availability . Quota . Partition Info . Replica Server List Properly handle multiple selections to report the volume info of the parent object and not the actively selected object. When a mount point is selected, display the volume information for the target volume. Remove file server from AFS tab. Modify the AFS tab to better handle multiple selections including mount points. Extend many gui2fs functions to implement a poor man's "follow" option. This really should be done with the pioctl 'literal' capability but this is an improvement. The pioctl modifications will require a major redesign of gui2fs.c and all of the dialogs. Reviewed-on: http://gerrit.openafs.org/5531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 59169e0ac73fe44ddd7d28f3985cfc5549938cb8) Change-Id: I5f42f4de74fdf6da68628301dbd60e090ae6e29b Reviewed-on: http://gerrit.openafs.org/5584 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a6080b4aceef9fb82a816758a442ee564d29dff3 Author: Jeffrey Altman Date: Fri Sep 30 03:43:24 2011 -0400 Windows: register Shell Ext handlers Add registry keys and values to enable use of the overlay handlers for symlinks and mount points. Add registry keys and values to enable use of the property sheet handlers. Correct registry keys for the Folder background context menu handler. Reviewed-on: http://gerrit.openafs.org/5530 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0d76ca3c5b17caa2c8106a75ee6ca1332deae603) Change-Id: I6f25b498f1118e51dbf6aedbd5ba62fe75020c15 Reviewed-on: http://gerrit.openafs.org/5583 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8d78c52d4e9c49791bfd97687c308540df9bb84e Author: Jeffrey Altman Date: Thu Sep 29 09:35:51 2011 -0400 Fix typo in windows release notes Reported by Jeff Blaine. FIXES 132233 Reviewed-on: http://gerrit.openafs.org/5519 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fd66404d9deeb292e1eadb23f5e0f287f9bf8f9) Change-Id: I174200401f9bd1dc0d9610ba1c572a655d8914bf Reviewed-on: http://gerrit.openafs.org/5582 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9646f97cd77775880527ecd245c2b4804ebcb24a Author: Jeffrey Altman Date: Wed Sep 28 21:46:48 2011 -0400 Windows: Fixup errors in AFS ACL Property Sheet Unlike the afs_set_acl_dlg the PropACL sheet only uses a single ComboList to maintain both the positive and negative ACEs but uses two CStringArrays to separately store the positive and negative ACEs. Two entries in each array are used to store an ACE. The %2==0 entry is the pts name and the %2==1 entry is the permission list. This needs to be taken into account when manipulating the negative entries since the array count for the normal entries is twice the number of ACEs. Negative entries were prefixed with '=' instead of '-'. The Remove button was not hooked up and was not enabled or disabled under all appropriate conditions. Reviewed-on: http://gerrit.openafs.org/5518 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b977e52a441c70ec9ea97c7d0ebaaed17e530116) Change-Id: Id7cf6d1bafcf27d36408d49a8c7f65e2d67118f6 Reviewed-on: http://gerrit.openafs.org/5581 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fe20e08d4e4c29b0209b58bf4062e9a01da98ea4 Author: Jeffrey Altman Date: Wed Sep 28 19:59:03 2011 -0400 Windows: add resource info to afshcrypto.dll The afshcrypto.rc file was provided but it was never compiled nor linked to the dll. Reviewed-on: http://gerrit.openafs.org/5517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5ba6a6223c42abf104c02d59f8c95d1760bd9030) Change-Id: I0ec4e26c7f7024b789bbf05ed9fd197daf7b0307 Reviewed-on: http://gerrit.openafs.org/5580 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b63531fc4fd16db239c6534a2635ff4ad7d0ce5e Author: Jeffrey Altman Date: Wed Sep 28 19:58:07 2011 -0400 Windows: Add resource info to afsroken.dll The afsroken.rc file was provided but it was never compiled or linked to the dll. Reviewed-on: http://gerrit.openafs.org/5516 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0c6bc6c78ade956978652dfe62bcc27140695b8a) Change-Id: I0f6d110e804f62a2c732e38933229c11f711f6b9 Reviewed-on: http://gerrit.openafs.org/5579 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit dec2a0e9fbe03e85641cd76691b886a4bbc4520d Author: Jeffrey Altman Date: Sat Sep 24 11:42:50 2011 -0400 Windows: update ntbuild.bat Add references to: . new APPVER and _WIN32_IE values . new AFSVER_CL values . additional code signing variables . variables for symbol store support . WiX Installer Toolkit location . Cygwin Install Directory . ActivePerl Install Directory . SignTool path Reviewed-on: http://gerrit.openafs.org/5500 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b6e04fa78ed5793d52caccafe2f5fc46be6a6af9) Change-Id: Ifc2e7959bebf5264e3594d02f21445de7dda1d32 Reviewed-on: http://gerrit.openafs.org/5578 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ce6763e9124dc2fa639a25e17a318e984ff0f9ca Author: Jeffrey Altman Date: Wed Sep 21 01:46:52 2011 -0400 Windows: Disable OACR by default for AFSRDR build When building the AFS redirector with WDK7600 the Microsoft Auto Code Review process is started by default. This is a problem for buildbot. Disable OACR by default if the _RunOacr environment variable is not set to TRUE. Reviewed-on: http://gerrit.openafs.org/5479 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6fb2e92422abdaca6175f2556b24ba681af72fd6) Change-Id: Ifc0b7392f86b6113795c858bf8051815fa212bd6 Reviewed-on: http://gerrit.openafs.org/5577 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4d4bc4171b6356eb5121254a2c46c9eaab882d40 Author: Jeffrey Altman Date: Mon Sep 19 10:35:11 2011 -0400 Fix input size computation in SetSPrefs pioctl Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained a small typo that prevents the SetSPrefs pioctl processing from functioning in all cases. fs setserverprefs continues to work for non-DB preference lists because fs.c pokeServers() attempts to try the old SetSPrefs33 pioctl in the non-DB server case. Reviewed-on: http://gerrit.openafs.org/5465 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 552d59186b135af55eeaa6136a9cbb8965dd2f04) Change-Id: If18718b4953088d45c7c1485d0ebb19ca2f4745f Reviewed-on: http://gerrit.openafs.org/5576 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2facdcdae1ea24db46b75451031f4ea28f0d9ffa Author: Jeffrey Altman Date: Sun Sep 18 13:13:18 2011 -0400 Windows: install control panel only if afs_config Add the AFS control panel to the AFS Configuration Tool component so that it is installed only if afs_config.exe is going to be installed. Reviewed-on: http://gerrit.openafs.org/5462 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c8f64e04b8cfb1085a2f3227785492d5e3f487ff) Change-Id: If4e6660898af2fa2f59f5d309f882e003c8e4217 Reviewed-on: http://gerrit.openafs.org/5470 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 696aabf9d3a233d7c5a742c39cbbda2f45b74c8e Author: Jeffrey Altman Date: Sun Sep 18 13:14:39 2011 -0400 Windows: Disable Control Panel button in NIM Since afs_config.exe is no longer installed, remove the OpenAFS control panel button from the Network Identity Manager provider. Reviewed-on: http://gerrit.openafs.org/5463 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25254adeeea5f41820f140ce812bdacae34d24c9) Change-Id: Ie371f0c9be40923572fa14c33931559c94d09f8c Reviewed-on: http://gerrit.openafs.org/5471 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ea91dd7fd828ece90b51a9840be8db266e19a68 Author: Derrick Brashear Date: Thu Sep 15 23:20:30 2011 -0400 openafs 1.7.1 update version strings to openafs 1.7.1 Change-Id: Ic79d0354cae1e93f57bcd7e03b325407f9ecb901 Reviewed-on: http://gerrit.openafs.org/5458 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit e6c04df407036b82c980d933d56ebce686c79e0f Author: Jeffrey Altman Date: Thu Sep 15 15:16:55 2011 -0400 Windows: changelog prior to branching openafs-devel-1_7_x Change-Id: I27ece967a136a44513fade8e9b8cc1c8d57951b4 Reviewed-on: http://gerrit.openafs.org/5449 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5263b04796dfae34b2ac52e420bdc2f0c70e0568 Author: Jeffrey Altman Date: Thu Sep 15 14:00:39 2011 -0400 windows: Set ReparsePoint Attribute in FileAttributes The ReparsePoint Attribute is a primary attribute that is used internally within the redirector to determine when the object is a reparse point. It must be set in all code paths that obtain the FileAttributes from the service. Do not fold it in during the QueryBasicInformation response processing. Change-Id: Iba819dd94ec03133f78a4d18559dbd1b5352788e Reviewed-on: http://gerrit.openafs.org/5448 Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e24984a52a7ca73e8e270e0e39e5d2bb22b5f77b Author: Jeffrey Altman Date: Thu Sep 15 10:32:19 2011 -0400 Windows: README-WINDOWS updates for build environment Not complete but closer than it was. Change-Id: I5945101206535753ace6d3a53a4d91ee4290351c Reviewed-on: http://gerrit.openafs.org/5446 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ced8cd18c6d6ef545fba623fbb431536386bbc65 Author: Jeffrey Altman Date: Thu Sep 15 02:07:53 2011 -0400 Windows: NetWksta RPC test application A simple application to query the NetWksta RPC interface. Change-Id: I9d53dd956ace89ce01e3cf48583e160176fa05ce Reviewed-on: http://gerrit.openafs.org/5445 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c044db34a1cef5cb905bfdb5df35fe05bf30fb4f Author: Jeffrey Altman Date: Thu Sep 15 02:06:14 2011 -0400 Windows: Build the AFS Redirector world All of the new build rules necessary to build the new AFS Redirector world. Change-Id: Ic5b8839eb6f10e44c3b6e185c85c3948f77b4d60 Reviewed-on: http://gerrit.openafs.org/5444 Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit effaebfe007eaa70d8479e8d655deb54cc0d36e9 Author: Jeffrey Altman Date: Thu Sep 15 02:04:45 2011 -0400 Windows: Release Notes updates for AFS Redirector No more support for Windows 2000. A first pass at indication which features that are SMB only are no longer applicable. much more. Change-Id: I6e6337804d75c8dccdbc66307215e18238f33dac Reviewed-on: http://gerrit.openafs.org/5443 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69674f376aeb748fffb0c47d855851349e21c4ee Author: Jeffrey Altman Date: Thu Sep 15 02:02:36 2011 -0400 Windows: WiX Installers for AFS Redirector Add the AFS Redirector and AFSRDFSProvider and new Shell Extensions to the MSI installer package. Change-Id: I82d8256d016a19865bc8a681331f650d52e3b261 Reviewed-on: http://gerrit.openafs.org/5442 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b9d9264c0efb3529fe1d67d5a837be8d3081fcc9 Author: Jeffrey Altman Date: Thu Sep 15 02:00:00 2011 -0400 Windows: NSIS installers for AFS Redirector These changes provide basic support for installing the AFS Redirector and the AFSRDFSProvider.dll. However, since NSIS is not useful for 64-bit installations the NSIS installers will be removed from the source tree in the near future. 1.7.x series will not be distributed with NSIS installers. Change-Id: Ifd9d06af4f047e27c23c87af79ba84085bc3614a Reviewed-on: http://gerrit.openafs.org/5441 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 073e3c528952abdf21432d32487b3a11c71a3234 Author: Peter Scott Date: Thu Sep 15 01:58:48 2011 -0400 Windows: AFS Redirector Support Tools settrace, gettrace, objstatus, authgroup, and crash. These tools are useful for debugging the system. Change-Id: I2d62186a98f5561d579f7934ef568a54a3b099f1 Reviewed-on: http://gerrit.openafs.org/5440 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 82d60412041bd05f13da3bc9937d1e561744c71c Author: Peter Scott Date: Thu Sep 15 01:52:08 2011 -0400 Windows: AFS Redirector Network Provider In Windows a network file system must have a matching network provider dll that interfaces with the Multiple Provider Router (MPR) to support the WNet APIs called by the Windows Explorer Shell and other applications. The WNet APIs are primarily used to support driver letter mapping but they also have a number of other functions including universal name mapping, path formatting, and path parsing. Jeffrey Altman contributed to the development of the AFSRDFSProvider.dll interface. Change-Id: I9476003e05f12684676e8c7331a0a8dd13d98686 Reviewed-on: http://gerrit.openafs.org/5439 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c69a113aac8f09ea1d7c2221173bd656cc4c8d1 Author: Peter Scott Date: Thu Sep 15 01:48:59 2011 -0400 Windows: AFSRedirLib.sys file system library driver This patchset implements the AFS Redirector Library driver. This driver contains all of the AFS specific implementation details for service communication, network provider support, directory management, extent management, metadata management, callback invaldation, volume management, file locking, etc. Rod Widdowson and Jeffrey Altman contributed to the development of this driver. Change-Id: Icc18c26b81b96a92096c20e01360007815ca1acb Reviewed-on: http://gerrit.openafs.org/5438 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9399093a767c0638ee247d89d5f8f70b518b9396 Author: Peter Scott Date: Thu Sep 15 01:33:20 2011 -0400 Windows: RDR File System Framework driver This is the first of two kernel drivers used to implement the AFS Redirector: AFSRedir.sys. This driver is registered at boot time and provides the binding to the Windows kernel infrastructure. However, it only provides a framework of a file system driver. All of the AFS specific interfaces are actually implemented in a secondary library driver, AFSRedirLib.sys. The rationale for this model is that file system drivers cannot be unloaded on a running system. By using this approach the library driver can be unloaded which permits systems to be live updated. To permit this model to work, all memory allocation is performed by AFSRedir.sys. This confuses the driver verifier tool. When the library is unloaded all objects are still valid. Operation is simply paused until a new library is brought up. Under the current configuration the library is loaded as part of afsd_service initialization of AFSRedir.sys and is automatically unloaded when afsd_service.exe shuts down. The framework driver also implements all of the process and thread tracking logic necessary to support Authentication Groups. Communication between AFSRedir.sys and afsd_service.exe is performed via a reverse ioctl model whereby the service contributes threads to the driver to convey requests for processing. The original file system was derived from the Kernel Drivers File System under license from Kernel Drivers, LLC. Rod Widdowson and Jeffrey Altman contributed to the development of this driver. Change-Id: Ic123cacd868ddde31d66bf17d3ad2a13c22cd1f4 Reviewed-on: http://gerrit.openafs.org/5437 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6e82b5be128a07124fe8a69d6932ffe011fb1077 Author: Jeffrey Altman Date: Thu Sep 15 01:31:08 2011 -0400 Windows: Make pioctl interface RDR aware Permit the pioctl interface to recognize how to interact with the RDR for processing pioctl operations. Change-Id: I7ddf15f29661e61fab6439d2a3c1aa2935011559 Reviewed-on: http://gerrit.openafs.org/5436 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b418d381be8c778ebeb93dd75bdc068dc4ed4871 Author: Jeffrey Altman Date: Thu Sep 15 01:29:57 2011 -0400 Windows: build loopback installer for current DDKs Modify the build rule for the loopback installer to permit it to build with the latest DDKs. Change-Id: I94c09e4f8e459ffebdcb2a63dbbe2197d7fbf070 Reviewed-on: http://gerrit.openafs.org/5435 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 49724640b84c0a1a44957ef7f713491bab2b86db Author: Jeffrey Altman Date: Thu Sep 15 01:27:58 2011 -0400 Windows: "AFS_SMBNAME" envvar for aklog Permit the Windows smb user parameter used when setting tokens as the LOCAL_SYSTEM account to be set via an environment variable. This is useful for debugging. Change-Id: Id4521c863df1288a7a0937b83bf85cff1af3696f Reviewed-on: http://gerrit.openafs.org/5434 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3f3fedecd08834439c462725e04eb04c690c07ee Author: Jeffrey Altman Date: Thu Sep 15 01:26:00 2011 -0400 Windows: no SOCKLEN_T before WDK 6.0 Change-Id: Idc63e28385b85e808b4391bc897863c792584c70 Reviewed-on: http://gerrit.openafs.org/5433 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b91d39edec6a8bdb7451ed6f52ea2ad2065b0022 Author: Jeffrey Altman Date: Thu Sep 15 01:11:15 2011 -0400 Windows: Redirector interface for afsd_service.exe Over the last three years the afsd_service sources have been gradually separated into distinct layers for the SMB server and the AFS cache. The eventual goal of this work was to permit the addition of alternative interfaces to the cache manager in parallel. This patchset implements the first alternative interface, a reverse ioctl model that communicates with a native IFS redirector driver. The driver will be submitted in a subsequent patchset. Although it is possible to run afsd_service with both the SMB and RDR interfaces active at the same time. In practice it is somewhat impractical because it destroys the uniformity of the \\AFS name space. The RDR loads at boot time and claims all of \\AFS. The SMB interface if active at the same time must use the old \\%HOSTNAME%-AFS. As implemented, if the RDR interface is functional the SMB interface is not started. Only if the RDR interface fails will the SMB interface be activated. The afsd_service.exe maintains all of its primary responsibilities for communicating with the AFS servers, processing callbacks, enforcing permissions, handling afs path ioctls, Windows RPC service simulation, and object management. The biggest change is in the cm_buf_t management. Data is exchanged with the RDR by passing control over cm_buf_t->data buffers in the form of Windows File Extents. This avoids data copies across a communication channel which significantly improves performance at a substantial complexity cost. Credential management is switched from a Windows username binding to a GUID binding where the GUIDs represent authentication groups that are managed by the RDR. This patchset includes additional changes to support integrated logon in conjunction with the RDR. In particular, adding support for authentication groups. Change-Id: I7135489421c67a429ec3b2acd4c8ae08b8329f6d Reviewed-on: http://gerrit.openafs.org/5432 Tested-by: BuildBot Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f03cef68fbe5ed0852397c2818d42d5f53b035b3 Author: Peter Scott Date: Thu Sep 15 01:07:03 2011 -0400 Windows: AFS Redirector Support Headers This patchset includes all of the common headers upon which all of the subsequent submissions depend. Co-authored by Jeffrey Altman Change-Id: I3b2ba6fe0a9a5231801db2cd1a340b9c518b9be4 Reviewed-on: http://gerrit.openafs.org/5431 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a82c20639843f7021fdfcca32fc6db5faa172eba Author: Stefan Kueng Date: Thu Sep 15 00:57:23 2011 -0400 Windows: Explorer Shell extensions This patchset implements a broad range of improvements to the explorer shell. There is still a significant amount of work to be done. * Remove the 'cut' and 'delete' options from the context menu if the selected object is a symlink or mount point. This is performed in a language neutral manner. * Add AFS Property page to the property sheet * Add AFS Volume Property page * Add AFS ACL Property page * force the linker to add the common-controls V6 manifest and define ISOLATION_AWARE_ENABLED to make property sheets work for the shell extension dll * Fix the InfoTip handler. Display symlink and mount point target strings Stefan Kueng was assisted by Jeffrey Altman. Change-Id: I6b7c4506026270a5408d90cdc5358864e3fb44c3 Reviewed-on: http://gerrit.openafs.org/5430 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 236c18b36a93a1c4906f84c825f03f654f5ae4dc Author: Marc Dionne Date: Wed Sep 14 17:16:52 2011 -0400 Linux: Remove use of undefined AFS_LINUX_ENV AFS_LINUX_ENV is used in a few places, mostly from commit dc077b83, but it is not defined anywhere. As a result the logic was not as intended. In the definition of osi_ThreadUnique, this means that on all Linux we use getpid(), which is OK as it gets defined appropriately under LINUX and LINUX24 as current->pid or current->tgid. Change-Id: Ic8daf10480a91ff8406cd6ca3929a2ecfafa78ad Reviewed-on: http://gerrit.openafs.org/5424 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 17be9b775c0be234879eeda66707581e23a18d08 Author: Jeffrey Altman Date: Wed Sep 14 22:41:20 2011 -0400 Windows: mountpoints always have a trailing dot when expanding a cell alias to a full cell name the trailing dot was forgotten when putting the mountpoint string back together. Change-Id: I82a84380175d9ef5c41ef29d9043671d264df589 Reviewed-on: http://gerrit.openafs.org/5427 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d355b4d6fce477e275ac34eb04b3d0f5504dd6fb Author: Jeffrey Altman Date: Wed Sep 14 22:39:52 2011 -0400 Windows: minor cm_ioctl corrections remove unused variable fix a comment to reference correct function name remove debugging windows event log entry that doesn't belong in production code Change-Id: Id81cfccd2c2c15d7fcbdbb5edc7dcb095abbd665 Reviewed-on: http://gerrit.openafs.org/5426 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cf57eb294f28084cbb138b1a06bc813e14e6d0ec Author: Jeffrey Altman Date: Wed Sep 14 17:46:32 2011 -0400 Windows: validate buffer hash tables in cm_MergeStatus Change-Id: I1ff76513e9f2ba08bdeb988a19fec992b08310db Reviewed-on: http://gerrit.openafs.org/5425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit febbd0f1ae9ae8700c0f9004979442e45a5e9883 Author: Ben Kaduk Date: Mon Sep 12 21:54:09 2011 -0400 Tidy up event hash table definitions a bit more The change in http://gerrit.openafs.org/5314 consolidated the definitions of struct afs_event and some related objects, but the definitions were not quite in the right place. In http://gerrit.openafs.org/5392 this content was moved to more standard headers, but a comment and #define were missed. This change moves the comment to be in the same place as the content. Change-Id: I86831879e9a2afd9e653182dcba4621624c55471 Reviewed-on: http://gerrit.openafs.org/5403 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 58d136ed0d35db6859eb3648969512eca216cbb2 Author: Simon Wilkinson Date: Tue Sep 13 09:54:12 2011 +0100 Use rra-c-util m4 from src/external This commit switches us over from using manually maintained copies of Russ's rra-c-util m4 macros, to using ones that are automatically imported from his upstream git tree. The macro versioning in the OpenAFS tree was slightly confused. This (approximately) updates us from using version 3.3 of the macros to version 3.8. The signifcant changes are: *) Use PATH_KRB5_CONFIG rather than KRB5_CONFIG to set the location of the krb5-config file *) Use --with-gssapi-{include, lib} if given, rather than krb5-config *) Use --with-krb5-{include, lib} if given, rather than krb5-config *) Define HAVE_KERBEROS if we find a Kerberos library The first, in particular, is likely to cause some confusion. Change-Id: Ie7a1c0db31b32fc7ac9ad7bded2c4ffce3ac013f Reviewed-on: http://gerrit.openafs.org/5418 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 60d0458f57cb95693190b29c4d8d4b75738fe363 Author: Russ Allbery Date: Tue Sep 13 09:40:59 2011 +0100 Import of code from rra-c-util This commit updates the code imported from rra-c-util to aadb400e7536b29fb2b34299ef3cac07d86c108d (release/3.8) New files are: LICENSE m4/gssapi.m4 m4/krb5.m4 m4/lib-depends.m4 m4/lib-pathname.m4 m4/pam-const.m4 Change-Id: I34d42a5491e87dc61b81ac2bf034c53dc2020f20 Reviewed-on: http://gerrit.openafs.org/5417 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78e2bb1e17b2310f3586c92a96b0def2eba476f4 Author: Simon Wilkinson Date: Tue Sep 13 09:37:04 2011 +0100 Add rra-c-util to the src/external regime We're already using a number of m4 configure tests which are taken from rra-c-util. Instead of importing these piecemeal, add rra-c-util to the src/external git import system, so that we can simply keep our selves in sync Change-Id: I58d610a3ee5f0f924b02745a89696ef46a8b0c04 Reviewed-on: http://gerrit.openafs.org/5416 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b5a4c81fe0a25bb7f4aa0c41ea675f42657cb7a9 Author: Jeffrey Altman Date: Tue Aug 2 18:33:06 2011 -0400 Windows: osi_Debug macros The osi_Debug macros are like osi_Log macros except when used the logged values are always printed using OutputDebugString(). This interface is meant only for temporary debugging. No code that uses osi_Debug should ever be committed to the upstream repository. Change-Id: I139c81aa0c745f4f03c6900a19f65c55c495ad33 Reviewed-on: http://gerrit.openafs.org/5415 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bf2bf9a1fbb5fd4c208e1e581aa4b6ee5d0cf5d0 Author: Jeffrey Altman Date: Thu Aug 18 22:07:26 2011 -0400 Windows: daemonCheckLockInterval to 60 seconds Since we are no longer using deleted cm_fileLocks to cache file server locks, there is no need to purge the list so frequently. Change-Id: I47d1e40be8b4008a11b1114389538a110644bed0 Reviewed-on: http://gerrit.openafs.org/5412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c9d655b9a6edf02fd92455961445f239f4667821 Author: Jeffrey Altman Date: Sun Aug 21 00:38:24 2011 -0400 Windows: record history of read lock threads Maintance an array of up to 32 reader threads that have acquired a rwlock. Use it for debugging when things go bad. Change-Id: I2e2e781ff355f1452e991898dfb5b91c47db9e34 Reviewed-on: http://gerrit.openafs.org/5411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1de4561529bdb92b6647a634d9f2c2714e1758e5 Author: Marc Dionne Date: Tue Sep 13 19:32:37 2011 -0400 vos: print correct command name in diagnostics for changeloc Fix the label in the diagnostics message, it prints "addsite" instead of "changeloc" when an error occurs during vos changeloc Change-Id: I8c541bc1709d2c02fb58d6d15b4a66d95647d1e7 Reviewed-on: http://gerrit.openafs.org/5414 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 793fdd3360982c48bf60eefbd9c56b4a3c1e09f0 Author: Jeffrey Altman Date: Fri Sep 9 12:47:52 2011 -0400 Windows: ignore SYNCHRONIZE privilege in cm_CheckNTOpen SYNCHRONIZE has not meaning for AFS so just ignore it. Do not deny an open request because it is set. Change-Id: I33fe4a02d0d1ce2cb4d192dd1b2e5f23fda4091c Reviewed-on: http://gerrit.openafs.org/5410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6c18c8844f3be6e006c7f59b3cc36f5b1688e04f Author: Derrick Brashear Date: Tue Sep 13 15:27:37 2011 -0400 volser: dont double-stat vnodes when dumping we get the size, then we get it again. no clue why. let's just not. Change-Id: I430d5c9941043341908cbf50ae70b982bb0ab8b3 Reviewed-on: http://gerrit.openafs.org/5398 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 11b6f9f0034a3934ffcf1dea8b1bfd915e7522ed Author: Derrick Brashear Date: Tue Sep 13 16:17:18 2011 -0400 darwin: minimal afsbackgrounder ticket fix avoid the "default" API since it's broken. this will at least prompt for tickets. Change-Id: Iee566d5f5502b7dce900d833f5711038c984cf37 Reviewed-on: http://gerrit.openafs.org/5408 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8d939c08f60b44c83ed8db8892b93563ddea0e15 Author: Derrick Brashear Date: Thu Sep 8 10:44:38 2011 -0400 rx: avoid nat ping during shutdown shutdown_rx, unlike rx_Finalize, kills the socket before the conns. since we call osi_NetSend directly, we lose. just do a simple check for rxinit_status, and exit immediately before sending if rx is not up. Change-Id: Ie34a45a4c1c88fc5732801dcefec89cbc9764f81 Reviewed-on: http://gerrit.openafs.org/5377 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 759c993c615b214bebdb5b1dc7346a72e379c135 Author: Simon Wilkinson Date: Mon Sep 12 09:42:47 2011 +0100 Add warning suppression to tcudbprocs.c When tcudbprocs.o is built as part of tbutc, it needs to have the same warning suppression as when it is built as part of butc. Change-Id: Ied3a9512676ea929f5acdb80b29875555f69113a Reviewed-on: http://gerrit.openafs.org/5402 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa6b8651251228d46b8eba472b2b84e829cfdc00 Author: Simon Wilkinson Date: Mon Sep 12 09:42:11 2011 +0100 Build tbutc and tvlserver on Darwin At some point, the build lines for tbutc and tvlserver ended up omitting Darwin platforms. This is incorrect, so re-add Darwin to the platform list. Change-Id: I7704eb19a457620b37cbe3d9cbd33d6c9bd3ae5e Reviewed-on: http://gerrit.openafs.org/5401 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit df13bb3be2d12dcb005cfe42585344826073c48c Author: Chas Williams (CONTRACTOR) Date: Mon Sep 12 15:24:39 2011 -0400 crypto: Fixes for recent Heimdal changes ignore KRB5_DEPRECATED_FUNCTIONS for now since it doesnt give any advice. Some keytypes (but not all) have been renamed. So for now we need to keep both apparently. Change-Id: I55de284448d255d5107afe03b4df56ccebc90beb Reviewed-on: http://gerrit.openafs.org/5400 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman commit f566228af82ffe8091ed14fa6ec175de624504bc Author: Heimdal Developers Date: Mon Sep 12 14:08:57 2011 -0400 Import of code from heimdal This commit updates the code imported from heimdal to b118610a9c56835c4ac5dc49ce8124cae8078346 (switch-from-svn-to-git-2478-gb118610) Upstream changes are: Harald Barth (1): Move common code to krb5_unsupported_enctype() and make error message contain string instead of error number Jeffrey Altman (1): roken: declare IN_LOOPBACKNET if necessary Love Hornquist Astrand (5): Warning fixes from Christos Zoulas Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X) remove trailing whitespace remove warning, remove forward declaration by moving the function up, ident Love Hörnquist Åstrand (4): don't set i = 0, its never read sprinkle doxygen and kode more like the rest of the code base partly unify enctype/keytype since there is only enctypes switch to KRB5_ENCTYPE Roland C. Dowdeswell (1): Fix a couple of bugs in krb5_c_valid_enctype(): chas williams - CONTRACTOR (1): hcrypto: var name current conflicts with linux kernel Change-Id: Id9a7a9ee8258b979b54f4ed2b4175815ab35ea21 Reviewed-on: http://gerrit.openafs.org/5399 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Jeffrey Altman commit 19a5b5e67c65f0a9109b0fb5410b5ba74ad85b41 Author: Jeffrey Altman Date: Sun Sep 4 14:58:23 2011 -0400 Windows: permit offline volume check to be disabled Setting the registry value to 0 can now be used as a method of disabling the offline volume check. Change-Id: I9fdc4e960efb0a6793316102ce2794c775693da1 Reviewed-on: http://gerrit.openafs.org/5370 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a5effd9f1011aa319fdf432c67aec604053b8656 Author: Simon Wilkinson Date: Mon Apr 25 10:46:33 2011 -0400 viced: Use libcmd for command line options Change-Id: Id402dc44bce03fcf998ad5b3f6de80fae7de9539 Reviewed-on: http://gerrit.openafs.org/5075 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e Author: Todd Lewis Date: Sun Sep 11 12:42:47 2011 +0100 RPM: Fix dkms support on Fedora 15 Newer dkms no longer uses or supplies a $kernelver_array variable; instead it uses $kernelver. The attached patch uses both, one of which will be empty, so the test will do the Right Thing regardless of your dkms version. Further, the "mv" command at the end of the MAKE[0]= line needs lots of back-slashes on each of its parms. We need three to make it all the way to the final dkms.conf file -- so that's six -- plus one more to escape the '$'; that's seven in all. In case there's any question (and with all the back-slashes involved, there should be) about the intent here, the whole point of this patch is to make the final dkms.conf MAKE[0]= line look like this (module line breaks: MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\".\"; [ \"\`echo \"${kernelver_array[0]}${kernelver[0]}\" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'\`\" = \"2.4\" ] && KMODNAME=\"libafs-*\" && DSTKMOD=openafs.o; ./configure --with-linux-kernel-headers=${kernel_source_dir} --with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD" This is what was required to get "dkms build ..." to work on Fedora 15, and as near as I can tell it shouldn't break 2.4 or other builds. FIXES 130211 Change-Id: I1f7b3ccb438bb957bb0b97456b23c11cb0b4a41b Reviewed-on: http://gerrit.openafs.org/5393 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6d274905b0b87c4947df9dccc2509295e7b28d09 Author: Simon Wilkinson Date: Sun Sep 11 12:31:55 2011 +0100 Unix CM: Fix afs_event fallout on Mac OS X Commit dc077b83c9b1f107efbc3483743f44117748f23c moved the afs_event structure definition into afs_osi.h. However, afs_osi.h is included from lots of places which don't include a complete set of platform headers. This means that the use of lck_mtx_t in this file breaks the build on Darwin. Instead, define the structure in afs.h, along with all of the rest of the cache manager structures. Also take the opportunity to move the definition of shutdown_osisleep it afs_prototypes.h, with the rest of the prototypes. Change-Id: Idd19fc30adcb5ab37e65ad87fa9224668e8cd321 Reviewed-on: http://gerrit.openafs.org/5392 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 136704fa648e5050941ed2a279cd9225b5e0ee68 Author: Simon Wilkinson Date: Sun Sep 11 12:35:18 2011 +0100 Darwin: Actually stop the kernel build At the moment, all of the kernel build lines end with "; true", which means that the build will always continue, regardless of whether creating an individual object file succeeds or not. The 'true' is there to gobble up the name of the source file which the common build infrastructure adds to the end of the command line. Instead of using '; true', use '&& true', so that if one of the C compiler commands, or the lipo, fails, we get told about it, before we try to link the missing objects. Change-Id: I11c14e6aa12188e3de044f900b3df8c8ffe5df13 Reviewed-on: http://gerrit.openafs.org/5391 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c9b906c8a5779c48afecfa098b15206f041665d Author: Simon Wilkinson Date: Sun Jul 10 10:24:26 2011 +0100 Move string manipulation functions out of util Some functions in libafsutil depend upon the RX libraries, which means that pulling in other functions in this library can create a dependency upon RX. This is less than ideal for low-level libraries such as cmd and comerr. So, create a new low-level library (currently named 'opr') which can contain low-level functions from util, and elsewhere. This library should have no dependencies other than on system libraries and libroken. Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25 Reviewed-on: http://gerrit.openafs.org/5363 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 440943e96b4be87abd02c47b3bcea8a5a2bdbc5f Author: chas williams - CONTRACTOR Date: Wed Sep 7 09:55:47 2011 -0400 autoconf: use $XCFLAGS from OPENAFS_OSCONF when making tests Certain platforms (like ppc64_linux26) compiler options might affect some autoconf tests. In particular, the ones related to the size of certain primitive types. Change-Id: I20c3f737ee4623451bc6cab3f97e86d152cb397f Reviewed-on: http://gerrit.openafs.org/5366 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c2272c207bc9f6cc0ba6892dfa6d879c7594d261 Author: Simon Wilkinson Date: Wed Sep 7 18:20:24 2011 +0100 IRIX: Pull NFS translator hooks We've never had working NFS translator for IRIX, and the system call codes which are required to install the symbols used by the IBM translator have long been used for other things by OpenAFS. Simplify this mess by just removing the translator stubs from the kernel module, and all of the code in afsd which used to handle pulling addresses out of the kernel module so that we can hook ourselves in. Change-Id: I2da2b0040afc0191e236706126d75bc7d39c0936 Reviewed-on: http://gerrit.openafs.org/5375 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b34d7aa051d9bc8bcf8de2403c94741c0961af18 Author: Simon Wilkinson Date: Sun Jul 10 13:57:36 2011 +0100 volser: Don't initialise all error tables Initialising the KA and cmd error tables in vsprocs.c makes the libvolser library dependent upon rxkad and cmd. As we may want to use that library in programs which use neither rxkad, nor our command processor, this is less than ideal. So, just drop the initialisations. Change-Id: Ifd47b1b16fc014f969e2b487451e21877b6a5407 Reviewed-on: http://gerrit.openafs.org/5374 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2ba597391df8127ed610324fc6b7b489b1c1f83c Author: Simon Wilkinson Date: Tue Sep 6 14:18:12 2011 +0100 afsd: Fix res_init warning afsd requires res_init to be declared - get a definition for this by including roken.h (which has the necessary magic to figure out which set of headers are required to get resolver functions) Change-Id: I217405df223f0bc42be90aea991cb228db4da4f0 Reviewed-on: http://gerrit.openafs.org/5373 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85d54a064b62756c0a59be030d0eb1fbc293d168 Author: Simon Wilkinson Date: Tue Sep 6 14:14:56 2011 +0100 pam: Fix test_pam on Darwin Darwin doesn't have a getpassphrase function. Fix the PAM test to use getpass, in the same way as we do for lots of other platforms. Change-Id: Ib252174ac1356a8975a9187b252d4fe0246d5d39 Reviewed-on: http://gerrit.openafs.org/5372 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1589e29f4e03919064c769372a7601957a8a033c Author: Simon Wilkinson Date: Tue Sep 6 14:03:41 2011 +0100 pam: Don't duplicate .c.o rule Our included configuration has a perfectly fine .c.o rule, so don't override it in this Makefile, as all that does is produce a warning at build time Change-Id: If8d37f50932124ef0adef64ec23d81e646da337a Reviewed-on: http://gerrit.openafs.org/5371 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ec51fcc2b67fda494ff15c5be589bb280ce49d92 Author: Russ Allbery Date: Wed Sep 7 19:25:23 2011 -0700 Import new pam-const.m4 from rra-c-util 3.8 Fixes detection of whether the PAM library uses const on FreeBSD and possibly others. Report and testing from Julien ÉLIE. Change-Id: Ice01914f4a00f73e4e473934f4ad907da3a3493f Reviewed-on: http://gerrit.openafs.org/5376 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 4ec6fd003084b02c299466bcaeac3850be10f79c Author: Jeffrey Altman Date: Tue Sep 6 11:57:18 2011 -0400 Windows: add clean rule to src/afs/NTMakefile Change-Id: I433dee1e3f9e4b5774dc8011690b6c74162772ce Reviewed-on: http://gerrit.openafs.org/5368 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6e5493437b942d5550247761dac3311c6d73a86 Author: Jeffrey Altman Date: Wed Sep 7 13:33:36 2011 -0400 Windows: correct comments in cm_BkgStore Change-Id: I1b74db2cc37626dad2e92e86facf7bbaf71d6177 Reviewed-on: http://gerrit.openafs.org/5369 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 39b788eeafe27d21ae6b4fd3cfeb59ce5dc70077 Author: chas williams - CONTRACTOR Date: Mon Sep 5 09:26:32 2011 -0400 ppc64_linux26: build binaries as 64-bit by default lwp doesnt work since ucontext/setjmp are incomplete when running 32-bit binaries with the 64-bit kernel. Change-Id: I9c52d9d934638075fc1693ed94f20665822e5e6e Reviewed-on: http://gerrit.openafs.org/5365 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit dc077b83c9b1f107efbc3483743f44117748f23c Author: Ben Kaduk Date: Mon Jul 25 23:39:27 2011 -0400 Free memory from afs_events DARWIN and LINUX were already doing this, but everybody else had a memory leak. Consolidate most of the common code to do so, including afs_event_t definitions. Change-Id: I5ec83cf23fd15dbbd5716995c671998e35862843 Reviewed-on: http://gerrit.openafs.org/5314 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear commit 327762071be3806c5d08be0218982c7027754756 Author: Simon Wilkinson Date: Tue Jul 5 09:20:15 2011 +0100 rx/rxkad: Move rxkad initialisation into rxkad When the RX pthread conversion was done, the initialisation of rxkad mutexes was incorporated into the rx library itself. This is a layering violation (it breaks the relatively clean security object abstraction), and means that you can't actually use RX without the rxkad library. So, remove all of this initialisation from RX. As security libraries don't have an explicit initialisation function, we setup our various mutexes using a pthread_once function called from the NewSecurityObject functions. This has the added bonus that it removes the final error in rx.c for pthread builds, and so another bit of warning suppression can be removed. Change-Id: I3cf9b2404a03fb58534c5f41afd77aa5ba5e2256 Reviewed-on: http://gerrit.openafs.org/5361 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ca0f1946a2f0a75be7de6aa0ac083ffebc950624 Author: Simon Wilkinson Date: Tue Jul 5 09:27:05 2011 +0100 volser: Don't declare cstruct twice Both vsprocs.c and vsutils.c declare the global variable 'cstruct' (which is initialised by vos.c in order to pass a ubik client structure through to many of the libvolser functions). This double declaration prevents libvolser from being linked as a shared library on some platforms. We only need one of these, so just make vsprocs.c declare it, and vsutils.c refer to it as an extern. Of course, using a global variable to pass state around is really quite nasty, but let's fix that in another change. Change-Id: Ief1667bd7a5b70dbfb49cdc02cc435eb2344527e Reviewed-on: http://gerrit.openafs.org/5362 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8a24a7c933441f449192cf8c1b8d6fd728261734 Author: Rod Widdowson Date: Tue Sep 6 15:23:33 2011 +0100 Windows: Replace "%T" as format string to strftime Checkin I18ed36cc4dce9aa354ad1398710ab7db83c814a2 made strftime much more widespread. However the %T format is not available on all platforms and causes (at least) Windows servers to fail on first attempt to log. %T is just shorthand to %H:%M:%S so this checkin just replaces the one with the other. Change-Id: Ibfff133d9263f5513276d96f3624801fd8ab229e Reviewed-on: http://gerrit.openafs.org/5364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 37d72aa15615ca32acb83ff82d35fd4508efa479 Author: Jeffrey Altman Date: Sat Sep 3 22:35:43 2011 -0400 Windows: Freelance vnode,unique pairs The redirector maintains file object state after the afs service has shutdown in case it is restarted. It is critical that Freelance FIDs not be reused. Add cm_data.fakeDirVersion into the mix when generating unique values. Change-Id: I1cf480d3e0ec6e0b7eadf731a1ef867079c2dc44 Reviewed-on: http://gerrit.openafs.org/5357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 796684c024bfd675072bc067289b55dba2f130db Author: Jeffrey Altman Date: Sat Sep 3 21:33:00 2011 -0400 windows: fix comments, add logging Change-Id: I383ce8679828f91d013d1f98ea3d25c73a0399df Reviewed-on: http://gerrit.openafs.org/5356 Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit b6f23864ffa380923f50d424063ad0804e407f4a Author: Jeffrey Altman Date: Mon Dec 14 13:33:02 2009 -0500 Windows: remove CM_BUF_CMBKGFETCH flag The processing of the CM_BUF_CMBKGFETCH flag adds more overhead than it prevents. Get rid of it. LICENSE MIT Change-Id: Ic152707fd3f0a7592409a5f570c02488f5503a9c Reviewed-on: http://gerrit.openafs.org/5359 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 33af0f92e9b8a50c5a6dd17a9065c0ef58597c28 Author: Jeffrey Altman Date: Mon Sep 5 10:11:09 2011 -0400 Windows: use lock conversion in cm_EndDirOp Instead of dropping the lock for read and reacquiring for write use lock_ConvertRToW() which will make the change atomicly if it is possible or place the thread into the wait list if not. LICENSE MIT Change-Id: I5d134f045a0c935fdaaef6edf5bdf37bb0418a98 Reviewed-on: http://gerrit.openafs.org/5360 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3e82ee98bf66058636f11d7a98d3bebe3bac955 Author: Derrick Brashear Date: Fri Sep 2 13:35:24 2011 -0400 aklog: strlen(NULL) doesn't work strlen(filepath) when !filepath isnt going to work very well. i believe this to be the intent of the author of the original patch. Change-Id: Ib78c5a189b6980223946aff9cf027419127c35bd Reviewed-on: http://gerrit.openafs.org/5328 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear commit def00ae8ba774f4d7290c29208484dda756dc0e0 Author: Marc Dionne Date: Sat Sep 3 14:10:50 2011 -0400 Linux: d_delete now takes a const argument The d_delete dentry operation now takes a const argument. Test for this and define our function accordingly to avoid warnings. Change-Id: I621f54d8e8182b29ccfdf82798773800f5870064 Reviewed-on: http://gerrit.openafs.org/5335 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3e3400e422129a8a19d180c4e37689294d927ecb Author: Jeffrey Altman Date: Sat Sep 3 20:09:20 2011 -0400 Windows: tailor smb_MapNTError output for redirector Separate mappings apply for the afs redirector. Add a boolean parameter to the function signature that is set true when the call requires the redirector mapping. Change-Id: Ib2892b6c78047f3f1d289e31c4236ea90d8026ab Reviewed-on: http://gerrit.openafs.org/5351 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9b0cb614387403ff433cf39f84c13b626b1b9bdc Author: Jeffrey Altman Date: Fri Sep 2 13:54:01 2011 -0400 Windows: cm_SymLink export created cm_scache_t Permit the caller to request the cm_scache_t that represents the created symlink or mount point object. Change-Id: Ida8fdc4214844dad009362877f125aa5d20120a1 Reviewed-on: http://gerrit.openafs.org/5355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 537592f6bbda0c659c25ae7068f50504e2a5e116 Author: Jeffrey Altman Date: Sat Sep 3 21:07:13 2011 -0400 Windows: correct cm_buf use of Head/Tail queues The buffer free list least recently used queue has both head and tail points. Use the proper versions of the queue mgmt functions and do not handle edge cases as special cases. Change-Id: I570682ef1cd6801f1467c4b1af40ae6591a33862 Reviewed-on: http://gerrit.openafs.org/5354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1e23761b7fadc260b32bebb0343a9b5b1de37cf4 Author: Jeffrey Altman Date: Sat Sep 3 20:22:19 2011 -0400 Windows: remove dead code from cm_scache.c Change-Id: Ibc5ae641f6bacbe0975f8ffaf0d4cff3e294959a Reviewed-on: http://gerrit.openafs.org/5353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 741e478970a17edda84f2d2c4689a99e90510edd Author: Jeffrey Altman Date: Sat Sep 3 20:16:09 2011 -0400 Windows: add cm_Gen8Dot3VolNameW() Change-Id: Ic514719ee247d60862cc9ff07de16e5de4ffb774 Reviewed-on: http://gerrit.openafs.org/5352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69463ac0cb367202485aac9977f8b4c47fb067f2 Author: Jeffrey Altman Date: Sat Sep 3 20:06:21 2011 -0400 Windows: add logging to smb_IoctlRead Change-Id: Ia1c7fc1035eee07de47776e63d6a054ee2809f2f Reviewed-on: http://gerrit.openafs.org/5350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2588dd12478afb96a72f0cd788233ecf2145830f Author: Jeffrey Altman Date: Sat Sep 3 20:03:28 2011 -0400 Windows: remove potential data loss warning with cast Change-Id: If9cbe1b777452dba5b0785d8abfccb9ec31540e3 Reviewed-on: http://gerrit.openafs.org/5349 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 722843e2df533e8fcf245f2a3b10ef686992deb2 Author: Jeffrey Altman Date: Sat Sep 3 19:14:11 2011 -0400 windows: pass cm_req_t through background ops add cm_req_t object to background daemon operations in order to permit request source to be propagated to the background daemon. pass a cm_req_t into buf_SetDirty(). Change-Id: I8f805c2860e33df37040ee3785f18358e1a9b762 Reviewed-on: http://gerrit.openafs.org/5348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1 Author: Russ Allbery Date: Tue Aug 23 12:50:55 2011 -0700 Generate stub header files for h/*.h files included in libuafs Previously, the libuafs build created a symlink from h to /usr/include/sys so that files included under h/* by kernel source files could be found in the normal system header location. However, this assumption about the system header location is no longer valid. Debian and Ubuntu systems with multiarch have arch-specific include paths so that the same host can be used to build 32-bit and 64-bit binaries with different system headers, and those include paths are automatically searched by the compiler. This means some standard headers are no longer found directly in /usr/include/sys but are instead found in /usr/include//sys. Using a stripped-down version of similar code for building the kernel module on Linux, create an h directory containing stub header files that just include the relevant system header file instead. This allows the compiler to implement its normal internal header search algorithm. Also remove all the other symlinks, such as sys, netinet, etc., that just pointed to the same directories under /usr/include. We can assume the normal compiler search algorithm will find these headers without requiring this assistance. Change-Id: Ie19d12e3d3f0068c88d0a9c83f6a96d51baee018 Reviewed-on: http://gerrit.openafs.org/5305 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f4dfaed6b25ae4282298cc2ba4908ce9f36f043 Author: Andrew Deason Date: Mon Aug 29 13:07:01 2011 -0500 ihandle: OPEN fdPs are not counted in ihP refcount Just add a comment explaining that an OPEN FdHandle_t does not count against the ref count for its parent IHandle_t. Recently I've seen some confusion about this when discussing ihandle internals, and this should make this abundantly clear. Change-Id: I73210e0d05869827ba99d09f504052d1a6797669 Reviewed-on: http://gerrit.openafs.org/5317 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b298138bc49c1d1dae0495e03f4a561f0bd5dd82 Author: Simon Wilkinson Date: Mon Aug 29 23:36:41 2011 +0100 libafs: Fix directory verification With the earlier directory verification changes, every directory was seen as corrupt, because the nde pointer was never being initialised Rework the way that we check for the failure of afs_dir_GetVerifiedBlob so that we can more robustly detect problems, whilst still allowing normal directories to be browsed as before Change-Id: I3d3f428025296956b5feff6ba290aaef79817dcd Reviewed-on: http://gerrit.openafs.org/5318 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8e97cf6f215d5575c63d86eaec59031399f4beda Author: Marc Dionne Date: Sat Sep 3 12:32:33 2011 -0400 Linux: make sure backing_dev_info is zeroed The afs backing_dev_info structure is allocated dynamically with kmalloc, which doesn't zero out the contents. In particular there's no guarantee that congested_fn is NULL, causing spurious oopses when bdi_congested tries to call it. Change-Id: Ieeed870905627a132a0d1bd2f15cf80443b36303 Reviewed-on: http://gerrit.openafs.org/5334 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbaefa266d433af3b9a082a360e23a42f161d80f Author: Marc Dionne Date: Fri Sep 2 17:56:58 2011 -0400 Linux: 3.1: adapt to fsync changes The fsync file operation gets new arguments to specify a range. Add a configure test to check for the API change. The inode lock is also pushed down into the operation, so we need to take it ourselves to keep the original behaviour. Change-Id: Icf4e152ce52f2b32c99920f83a5cc3136c05d2cd Reviewed-on: http://gerrit.openafs.org/5332 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 20772897654b58da6f7d4cd0bd2caf169abddd50 Author: Jeffrey Altman Date: Sat Sep 3 19:03:05 2011 -0400 Windows: correct log message in buf_Sync() Change-Id: I808e37584a8dda303c037dca82c2230ff884560f Reviewed-on: http://gerrit.openafs.org/5347 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f9f19085e83d3050748d03b9db903f06bba17ac Author: Jeffrey Altman Date: Sat Sep 3 18:57:09 2011 -0400 Windows: restructure cm_ResetACLCache locking Change-Id: Ic22ba2f54463dd0efa0efa1fff83890eb6d61cc1 Reviewed-on: http://gerrit.openafs.org/5346 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0954e0ef9a34ca74886900a938f091e5bf9befd9 Author: Jeffrey Altman Date: Mon Feb 28 01:27:33 2011 +0000 Windows: add cm_BPlusDirEnumBulkStatOne cm_BPlusDirEnumBulkStatOne() is similar to cm_BPlusDirEnumBulkStat() except that it is used to obtain the status info for one FID in particular via RXAFS_InlineBulkStat, the parent directory FID, and up to 48 other FIDs in the same directory which do not currently have a registered callback. The parent directory is included to prevent the directory FID callback from expiring when a directory such as /afs/andrew.cmu.edu/usr/ that requires more status objects then exist in the cache are continuously recycled. Up to 48 other FIDs are requested since in most cases on Windows every entry in a directory is required for an enumeration. Change-Id: Ic53134498ac0e776232a6f9c97cdb26367959546 Reviewed-on: http://gerrit.openafs.org/5345 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1a0dd342cc21a307e568efdc2b7ae40fda310edb Author: Jeffrey Altman Date: Thu Jan 27 23:09:00 2011 -0500 Windows: remove warnings afskfw.c Sometimes warnings are errors and sometimes they are just warnings. In this case, the krb5 error message functions were being passed a krb5_context with the wrong level of indirection which resulted in an actual error. Other warnings were due to improper typing and unnecessary casts. Fix them all. Change-Id: Ib2cefe94acca858dda9af92baaae3168c074bb2e Reviewed-on: http://gerrit.openafs.org/5344 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 79e3af59f1737e46a5bbc58fc8d73f5e38ed8c30 Author: Jeffrey Altman Date: Sat Sep 3 18:41:43 2011 -0400 Windows: non-persistent cache from pagefile->heap Change the non-persistent cache mode to use a heap allocated cache in place of a paging file allocated cache. With a heap cache the memory for the cache can be locked into physical memory so it won't be swapped out when running in virtual machines. This patch does not apply such memory locking. Change-Id: I85e6da1bba481d3d9bca84673b918b1d7cde71f9 Reviewed-on: http://gerrit.openafs.org/5343 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6aeab6595e4a36429943c22466b1b38591305240 Author: Jeffrey Altman Date: Mon Jul 18 16:16:42 2011 -0400 Windows: Only mask Delete permission for SMB reqs For SMB requests the Delete permission is masked if the readonly attribute is set on the file. Do not apply this heuristic to non-SMB requests. Change-Id: I6617e935cb32796e4a95b4eac0bec9519bd3e937 Reviewed-on: http://gerrit.openafs.org/5342 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7dcc4766377b99c60db60328c21a3990db132268 Author: Jeffrey Altman Date: Thu Sep 1 09:51:06 2011 -0400 Windows: buf_SetDirty do nothing if length is zero Change-Id: Id6a96feadccc437900e944ab23b45d2717766e1c Reviewed-on: http://gerrit.openafs.org/5358 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit abe0e6b7bca7fe02c4b08cc621f7a97dfcd82b1b Author: Jeffrey Altman Date: Sat Sep 3 18:25:10 2011 -0400 Windows: conditionalize cm_Analyze timeLeft on SMB or RDR Restrict timeLeft in cm_Analyze() to SMB constraints only when SMB mode is in use. Change-Id: Iff37b90c1532fe9aa7d57567f4ff4e5e6877cb65 Reviewed-on: http://gerrit.openafs.org/5341 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f1ca805de8cc4e79b683663e5aaca69188f81497 Author: Jeffrey Altman Date: Sat Sep 3 18:22:53 2011 -0400 Windows: additional CM_REQ flags Change-Id: Ic620d157817e39053e75ba79ad7d582ba3067424 Reviewed-on: http://gerrit.openafs.org/5340 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21496cc223b82081ebdf1de9ef5aeb7dc812489b Author: Jeffrey Altman Date: Sat Sep 3 18:19:58 2011 -0400 Windows: add connection defaults for RDR mode CM_CONN_IFS_HARDDEADTIME 120 CM_CONN_IFS_CONNDEADTIME 50 CM_CONN_IFS_IDLEDEADTIME 50 Change-Id: I0b110f2a33879bb889d4ad4b54b7c218a1006e65 Reviewed-on: http://gerrit.openafs.org/5339 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b861e17c0bc34ea2042879bc705f5d26a7e0a77f Author: Jeffrey Altman Date: Sat Sep 3 18:17:21 2011 -0400 Windows: log SMB or RDR in use at startup Change-Id: Ib38d8a755a8ace9db672ce2d10bcdd370e9e3de6 Reviewed-on: http://gerrit.openafs.org/5338 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 070383939d84aaf6aff9885328439a19b789286c Author: Jeffrey Altman Date: Sat Sep 3 18:13:31 2011 -0400 Windows: Make use of SMB interface a runtime decision Add 'smb_Enabled' and 'RDR_Initialized' flag variables. Default smb_Enabled to true and RDR_Initialized to false. Add registry value "SMBInterfaceEnabled" to permit disabling the SMB interface. If the redirector interface is initialized (a future set of patchsets will add it) disable the SMB interface at runtime. Change-Id: I354e121001d942421aa98490b62b710ac175051f Reviewed-on: http://gerrit.openafs.org/5337 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7d0e800eba62f4984795cb7b487f6695f6fedcc Author: Jeffrey Altman Date: Fri Aug 6 18:24:47 2010 -0400 Windows: pioctl path retrying with \\afs\all When the redirector is in use, \\AFS is identified as being an AFS path. With the SMB redirector, \\AFS was not considered a valid path. In order to simulate the notion of \\AFS being the root volume, failover logic was added to the symlink and fs modules being triggered that would retry a request for \\afs\foo as \\afs\all\foo. The VIOC_SYMLINK and VIOC_AFS_CREATE_MT_PT pioctls are broken. The 'path' parameter that is passed in contains the directory entry that is to be created. Since the AFS redirector maps \\afs to the root.afs volume the "foo" in \\afs\foo must exist in order for the _._AFS_IOCTL_._ special file to be opened. This patch implements an alternative to the failover. If the opcode is one of the two listed above and the input path is a UNC path, then the path is re-written as \\AFS\all. This is necessary because the repeated attempts to open a UNC path through the SMB redirector with different usernames can result in the smb session becoming disconnected. If this is done when the SYSTEM account is in use, the tokens associated with the connection can be lost. LICENSE MIT Change-Id: I2c2f6c08c7ca5c137062d34e1353731b6f78f633 Reviewed-on: http://gerrit.openafs.org/5336 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2271d481d33b2b2ad56dcd4fc9fbdd726fc1967b Author: Jeffrey Altman Date: Fri Sep 2 23:51:59 2011 -0400 Windows: remove MULTIHOMED ifdef All builds include the MULTIHOMED functionality. Get rid of the #ifdef MULTIHOMED. Change-Id: Ib9ea4597fcda47aa9dce0fbf92675a6606e2ec6e Reviewed-on: http://gerrit.openafs.org/5333 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8127e9332be8cadda001f05c6036d4c87e04cb4a Author: Jeffrey Altman Date: Fri Sep 2 18:36:13 2011 -0400 Windows: missing ! in update volume location The check to see if the volume name is numeric or not was missing a ! in order to perform the correct test. Add it. Change-Id: I4626f4bdcf601cd1b421dd3d373edd634cc78527 Reviewed-on: http://gerrit.openafs.org/5331 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f37b6dfaf050ec0270979c8310fb471c16b66cd3 Author: Jeffrey Altman Date: Fri Sep 2 18:32:40 2011 -0400 Windows: improve handling of volume rename The windows cache manager tracks volumes by volume group. Up to this point all volume location updates have been performed by the volume name. What if the volume name was altered? In this case the volume location information for the in use volume ids will fail until a mount point to the new name is queried. Before marking the volume group as non-existent attempt to perform a lookup using either the volume id for the readwrite or readonly volume. Change-Id: I51b383150b0186867e1c51a28b01e8483ee470f2 Reviewed-on: http://gerrit.openafs.org/5330 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9563dd68fc1fb4b86016106aaacd33732d4cf6ed Author: Jeffrey Altman Date: Fri Sep 2 18:28:31 2011 -0400 Windows: refactor volume location updates Break out the VL_GetEntryByName RPC calls into support functions so we can reduce the amount of duplicated code. Change-Id: If4a26514959d3fd82e4b583a993ccea393267fdd Reviewed-on: http://gerrit.openafs.org/5329 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 85f917d0762dfb0c22cddf4b0cab3bf76efa0f62 Author: Derrick Brashear Date: Thu Aug 11 10:39:11 2011 -0400 macos: update 32 bit kernel build flags this is what the current xcode uses. do the same. Change-Id: I3ea2f3df6e0f39aafb421f6b0854af5d85659742 Reviewed-on: http://gerrit.openafs.org/5205 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 16dff61e148ce6893a68dda6e05e84f96fa753ac Author: Derrick Brashear Date: Tue Aug 23 00:20:37 2011 -0400 xserver lock order violation individual volume locks are pretty far down, well after afs_xserver. afs_SetupVolume (with tv->lock)-> InstallUVolumeEntry-> afs_GetServer. Install*Volume is careful to protect against recursing into the volume lock via ResetVolumeInfo. Unfortunately, GetServer acquires xserver, and then if it needs to call GetCapabilities, it drops and reacquires xserver. turns out the volume locks weren't protecting much. they also aren't grabbed before xvolume is dropped. fine, so, restructure to do all the work, then merge the result. Change-Id: I648900849a5a7349adc686658872706bd7024c90 Reviewed-on: http://gerrit.openafs.org/5303 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 12fa5b859b857aaf0ab6975ebac0d4867d0ae0ff Author: Derrick Brashear Date: Mon Aug 22 14:56:03 2011 -0400 xvcb lock order violation afs_FlushVCBs(1) = xvcb, xserver (in that order) afs_GetServer = xserver, xsrvAddr, (call afs_RemoveSrvAddr which calls afs_FlushServer, which gets xvcb) "nope". do a little dance to get xvcb, searching for a struct server to reuse again if we had to block. if you're curious: Lock afs_xserver status: (reader_waitingwriter_waiting, write_locked(pid:1589 at:36), 3 waiters) Lock afs_xvcb status: (none_waiting, write_locked(pid:0 at:273)) Lock afs_xsrvAddr status: (none_waiting, write_locked(pid:1589 at:116)) Change-Id: If295d0b9ce347c1cc24df12cd9934a30dce2a3c6 Reviewed-on: http://gerrit.openafs.org/5294 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 24287ff0154c49a2563c9a08ff44ff72583095e4 Author: Derrick Brashear Date: Tue Aug 30 01:18:37 2011 -0400 redhat: mockbuild updates for repoquery for starters, mock should be careful not to use parent yum cache when running repoquery, the host runs it, we want the guests's yum cache. be careful to not attempt to use the parent's yum cache (in the default config). additionally, we need to not try to build 64 bit kernel modules in 32 bit chroots. expand the list of rpms while ejecting any which are 64 bit if we're 32. additionally, blacklist kernels which are the wrong osver. Change-Id: Id2a68cf66ddae57458c9f97314cd492e7b5132a8 Reviewed-on: http://gerrit.openafs.org/5322 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d4f65c3021b3416d290a1d5f1e8e61d14a936c7 Author: Jeffrey Altman Date: Tue Aug 30 09:49:11 2011 -0400 Windows: correct CheckOfflineVolumeState logic Do not blindly set the return 'online' state to TRUE if the state has not in fact changed. Do not blindly clear the 'alldown' flag without checking the actual 'down' state of the file server. Change-Id: Iaad401be067513e2bf42609f0b0d407ba5c6302d Reviewed-on: http://gerrit.openafs.org/5323 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 130144850c6d05bc69e06257a5d7219eb98697d8 Author: Michael Meffie Date: Fri Aug 12 14:29:48 2011 -0400 xstat: cm xstat time values are 32 bit The kernel space cm xstat time structures are implemented as 32 bit values in memory and on the wire. Define the client side xstat userspace structures as 32 bit time values as well to avoid size mismatches on systems with native 64 bit time values. Change-Id: I857ea48bf8e12ec006ef24affb2e65a105ce27bb Reviewed-on: http://gerrit.openafs.org/5237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 33bb5218ba8d6c5b5c5c4839fd31824ca90c062b Author: Derrick Brashear Date: Wed Aug 24 20:40:38 2011 -0400 aklog: work around lion kerberos disaster fine, so, instead of needing weak crypto enabled, use krb5 config paths trick and ship a config to deal. Change-Id: I6e9635dfe1fe6d4633486acf1e9cc35a96f33cd6 Reviewed-on: http://gerrit.openafs.org/5310 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3d4e111dd6c4201476e7447fdfaa27ed630032c5 Author: Jeffrey Altman Date: Sun Aug 28 12:03:53 2011 -0400 Windows: afslogon network provider debug registry value create a new TransarcAFSDaemon\NetworkProvider "Debug" value to be used for activating the network provider debugging. The overlapping use of TransarcAFSDaemon\Parameters "TraceOption" is just too confusing. Permit both methods to be used. Change-Id: I4ba233b38bda547af35aa4b363edc819bcc3792c Reviewed-on: http://gerrit.openafs.org/5316 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 971a103cd088ddbaf227d562fc64f8c728bbc235 Author: Jeffrey Altman Date: Sun Aug 28 12:02:14 2011 -0400 Windows: afslogon NPLogonNotify exit on KTC_NOCM If the service has started but is not responding to pioctls, permit the NPLogonNotify() routine to exit. Change-Id: I1ed4ac7a7fed5d86d607ecfd5e027f62ec26a82f Reviewed-on: http://gerrit.openafs.org/5315 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9052974812e33d186613c31e318673f9268467c6 Author: Jeffrey Altman Date: Fri Aug 26 13:57:15 2011 -0400 Windows: afslogon.dll is not a file system interface Do not return a file system network type that corresponds to a real file system inter since afslogon is in fact not associated with a file system interface. We can't return WNNC_NET_NONE (0) because that prevents NPLogonNotify() from being executed. However, if we return an in use file system value that can confuse the system when the actual file system's network provider is also installed. Change-Id: I845bc633f17f21946ce7de796d66c0bb429005cd Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 209d59a61ba9614a8b9d231d828f74a3e9bdaa27 Author: Jeffrey Altman Date: Fri Aug 26 09:36:04 2011 -0400 Windows: torture error reporting When LeaveThread() is called and GetLastError() has already been called, pass the last error value to LeaveThread(). Otherwise, the GetLastError() call in LeaveThread() may return an inaccurrate result. Change-Id: Ia8ac1fd827ab8fb47aea0b527acd3c7f7070e873 Reviewed-on: http://gerrit.openafs.org/5312 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 40c9163aa9f266c4ad3a0a5a68e0aae0c35e3e51 Author: Garrett Wollman Date: Mon Aug 8 23:59:17 2011 -0400 libafs: crash in a more useful way if nchunks is zero In afs_CacheStoreDCaches(), if the parameter nchunks is zero, the main loop will not execute, leaving the XSTATS pointer unchanged, which will result in a null dereference in XSTATS_END_TIME. Instead assert that nchunks is nonzero, which will help the static analyzer and will also generate a more useful panic message should this error ever be encountered in operation. There is presently only one call site, and it may be the case that this condition can never be triggered. (While in the neighborhood, also avoid dereferencing tdc immediately before testing whether it is null.) Change-Id: Idf68f1306d3e09771425c62df139c1de11806c22 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5179 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit edbe891abfb00be2c9f4de474db2dd784f2d5a61 Author: Garrett Wollman Date: Wed Aug 10 21:52:44 2011 -0400 libafs: FillStoreStats doesn't need to be global; avoid pass-by-pointer FillStoreStats is only used in afs_fetchstore.c, so make it static. Parameter xferStartTime is an osi_timeval, which should be small enough to pass by value, so do so. Change-Id: Ic47eae8babb3b7cadbbbca2f10e2e070e2457590 Reviewed-on: http://gerrit.openafs.org/5199 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 90681a59bac641c4c4d70c0bb500845be3577c33 Author: chas williams - CONTRACTOR Date: Sat Aug 13 10:29:31 2011 -0400 doc: missing $DBTOEPUB variable in the Makefile Change-Id: I623859ae58fea6a602221ca5d111605004b4a27f Reviewed-on: http://gerrit.openafs.org/5256 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 597de25969ebdeaafb7390984b5ce2c8782fd557 Author: Andrew Deason Date: Wed Aug 24 12:48:19 2011 -0500 ihandle: Fix IH_REALLYCLOSE for positional I/O Currently, ih_fdclose (which is called by IH_REALLYCLOSE), goes through every FD_HANDLE_OPEN FdHandle_t and closes it. If it finds handles that are FD_HANDLE_INUSE, it skips those and sets a flag on the parent IHandle_t. For non-positional I/O, any future opens cannot use these _INUSE handles, since _INUSE handles cannot be reused, and the handle will be actually closed when it is FDH_CLOSE'd. For positional I/O, the situation is different. Multiple threads can use the same _INUSE FdHandle_t, and so there is nothing currently stopping a thread from IH_OPEN'ing an ihandle that has been IH_REALLYCLOSE'd, and getting back an FdHandle_t that existed before the IH_REALLYCLOSE was issued. This is important, since IH_REALLYCLOSE is used on files that are deleted, and future IH_OPENs for the same inode must not use the cached file descriptor. Getting this wrong can cause data loss, since it can cause us to read from or write to a file descriptor referring to a deleted file, when we instead should open a new copy of that file. To fix this, we create a new FdHandle_t state called FD_HANDLE_CLOSING, which is set in IH_REALLYCLOSE if we encounter an FD_HANDLE_INUSE FdHandle_t. In IH_OPEN, we always skip FD_HANDLE_CLOSING handles, so we can never get back a cached file descriptor from before an IH_REALLYCLOSE call. Change-Id: I3188a18f7833950cf5454b3ffe4a4ce0c69e234f Reviewed-on: http://gerrit.openafs.org/5308 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d79cfb36165c33dd1fd9c4d7ca8436d9a78f7ff Author: Andrew Deason Date: Wed Aug 24 12:30:00 2011 -0500 ihandle: Actually assert active fdPs are not AVAIL FdHandle_t's that are on the linked list for an associated IHandle_t should not be in the state FD_HANDLE_AVAIL. For the non-PIO case, we assert that this is the case in ih_open (since we assert that if the FdHandle_t is not in INUSE state, then it must be in OPEN state). However, for the PIO case, we were just skipping over any FdHandle_t's that were in the AVAIL state. These should never exist while on that linked list, so assert for the PIO case, as well. In the absence of bugs, there is no functional change here, but it perhaps makes the ih_open loop easier to understand. Change-Id: I4e3b3319ae14b7e68a87f5fe172419f5ebf9d2c9 Reviewed-on: http://gerrit.openafs.org/5307 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit fa97579a08cdf23fcff3c50a5845d72a785feeaf Author: Matt Benjamin Date: Wed Aug 24 16:23:37 2011 -0400 LINUX vcache lock ordering in afs_linux_readdir Normalize shared and exclusive lock operations. Take the lock exclusive immediately, since the code assumes a write lock if the vcache state is in flux or the entry is being fetched, releasing -write- rather than shared, since we do not hold a shared lock. Change-Id: Icbffdf21c6fc7929483589e87ffe9131834c79b4 Reviewed-on: http://gerrit.openafs.org/5309 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 2dbdcc5fde93673efba132cad432029e03aef486 Author: Derrick Brashear Date: Wed Aug 24 22:53:38 2011 -0400 roken: no strcasecmp we don't provide it, don't map it. Change-Id: Ifcbb1ec66c374ef8cd6eaddf1954dcd688ae3e9b Reviewed-on: http://gerrit.openafs.org/5311 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c23b27a69322f4c9963a532d5cbcb136b23bb20c Author: Jeffrey Altman Date: Tue Aug 23 16:02:28 2011 -0400 Windows: change buf_Find*() signature to accept cm_fid_t The buf_Find*() functions require a cm_fid_t to match with the cm_buf_t objects not a cm_scache_t. Change the signature so that the cm_scache_t is not required. It should be possible to search for a buffer even if the cm_scache_t is not present in the cache. Change-Id: I38835ee86405c4f3f798ad6be8626e6da507109f Reviewed-on: http://gerrit.openafs.org/5304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b804e027f1a9d8dfaad3d348390a83493b53a6c7 Author: Jeffrey Altman Date: Sun Aug 21 00:37:34 2011 -0400 Windows: do not drop lock unnecessarily do not drop cm_serverLock for a cm_PutServer call since it will only reacquire it. use cm_PutServerNoLock() instead. Change-Id: I0e22f8d547a8fa0067cfc918f578b8fe11cc781a Reviewed-on: http://gerrit.openafs.org/5302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bca64c70467afd00ca02290a4236bc295ec4633c Author: Jeffrey Altman Date: Sun Aug 21 00:36:44 2011 -0400 Windows: cm_serverLock read required not write Change-Id: I9e804ddd7de824b2f5ce880e52c08bff6b0615e7 Reviewed-on: http://gerrit.openafs.org/5301 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b2c1313f2f39ffff22a2a991dcb01428f118a3c7 Author: Jeffrey Altman Date: Thu Aug 18 21:58:50 2011 -0400 Windows: Be more efficient when processing locks Do not drop the cm_scacheLock only to reacquire it a few lines later. Do not manually set the tail of the queue when osi_RemoveHT does it for us. Change-Id: I61b2e54a4864760d257dfcd2841c2c15f1ee41fe Reviewed-on: http://gerrit.openafs.org/5300 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a576ff1e53a539e88b9f3fa6b8132d4f161b0bd4 Author: Jeffrey Altman Date: Thu Aug 18 21:57:12 2011 -0400 Windows: be explicit when mapping sharing violation Only one lock acquistion failure should be mapping to CM_ERROR_SHARING_VIOLATION. That is CM_ERROR_LOCK_NOT_GRANTED. Make it clear that is what we are doing. Change-Id: Ic1933a989a4e8c95a1417679e9bc7cbc4e14dd12 Reviewed-on: http://gerrit.openafs.org/5299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6138b412d3b4197b22ca7fb63d8cdc9671ef67c Author: Jeffrey Altman Date: Thu Aug 18 21:53:45 2011 -0400 Windows: Track file server lock count The fsLockCount field is the lock count reported by the file server as part of the status info. Lock acquisition and releasing does not obtain new status info but we can estimate what the lock count is by tracking it ourselves for each of our successful RXAFS_SetLock and RXAFS_ReleaseLock RPCs and failed RXAFS_ExtendLock RPCs. Change-Id: Ib5dc5853d82a1292e848bf67d4d9932485177d91 Reviewed-on: http://gerrit.openafs.org/5298 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ae87a1aff2a99841701c1e8a7a0dbb699ea14102 Author: Jeffrey Altman Date: Mon Aug 22 21:12:25 2011 -0400 Windows: remove signed/unsigned mismatch cm_aclent.c Change-Id: I6cf41410d84b96d2fbe9fd8f1602a7aaa2c1797d Reviewed-on: http://gerrit.openafs.org/5297 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21acdd92c8510a9f99243588388a2a1078547533 Author: Jeffrey Altman Date: Tue Aug 9 14:26:33 2011 -0400 Windows: avoid duplicate volume update queries If multiple volume update queries have stacked up in cm_UpdateVolumeLocation() and the active query failed, do not re-issued the blocked queries. Instead, prevent new queries for 60 seconds and fail those that blocked during the active query. Change-Id: Ic3f55ae08da36900fc8c7a89b6487ae53f381eb3 Reviewed-on: http://gerrit.openafs.org/5296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0fb2e3a6dbfdf91bcf1591e454a00171792b7a38 Author: Marc Dionne Date: Sun Aug 21 12:02:29 2011 -0400 dir: verified pathnames fallout Fix some issues introduced with the verified directory path names commit in master: - In GetVerifiedBlob, the output parameter is set to NULL on entry and dereferenced later on. - For Linux, the code in afs_linux_readdir was changed to pass a DirEntry to GetVerifiedBlob. This is incorrect, the function still expects a DirBuffer pointer. - In afs_dir_IsEmpty, the assignment of ep was removed, leaving the function to dereference this pointer which was never set. Change-Id: I9045076ebe636cf68c19487c0d58baebf2de7dd1 Reviewed-on: http://gerrit.openafs.org/5292 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9581821a4599e1ba871360dcf8503e13eb6516b6 Author: chas williams - CONTRACTOR Date: Sat Aug 13 11:01:28 2011 -0400 pod: use /OPTIONS when referring to the local OPTIONS section Change-Id: I889e3a89f5cc68b816a822b6a23db30ac6fe2357 Reviewed-on: http://gerrit.openafs.org/5257 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85bb872e3df6b6f54764d90996bc52904ccd4385 Author: chas williams - CONTRACTOR Date: Sat Aug 13 10:18:45 2011 -0400 doc: generate admin ref from the pod documentation a bit convoluted but this generates docbook from the pod documentation and from that pdf, epub and mobi versions. we are using variablelist.as.block since that looks prettier on smaller devices/screen. Change-Id: I5cd51ef10448373960a0aeed15212bbcf6f44039 Change-Id: Ib222dbfa30e3af644b1dbc6738df1d39cc33c92f Reviewed-on: http://gerrit.openafs.org/5255 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0754537c11f034966c79ebd2330e1155c736badf Author: Russ Allbery Date: Sun Jul 24 16:20:05 2011 -0700 Don't fail to build documentation if kindlegen doesn't exist Check for kindlegen in configure and do nothing in the MOBI build rule if the binary didn't exist. This is still a bit of a hack since the rule will run with every invocation of make. The target needs to be made conditional. But at least this way make all in the documentation directory doesn't fail. Change-Id: I57f158929b3907678b9848a60edb9765136f7dbb Reviewed-on: http://gerrit.openafs.org/5090 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit add66023a05bf9a380eef34bd4fcc80d343fffad Author: Jeffrey Altman Date: Mon Aug 22 09:00:47 2011 -0400 Windows: avoid cm_serverLock refcount leak Change-Id: I4e46750de130557b7d4779f83029b69bc28eaf4b Reviewed-on: http://gerrit.openafs.org/5293 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5836464f454f0bb4612c665d27061956d4c745af Author: Garrett Wollman Date: Sat Aug 13 18:34:47 2011 -0400 libafs: don't crash if afs_write() is called with zero-length uio If AFS_UIO_RESID(auio) is zero in afs_write(), we could end up calling afsio_free(NULL). Guard the free. (In the alternative, perhaps we should just osi_Assert(totalLength > 0) instead?) Change-Id: Ic218f039e2034b679cb4817a543af2e8307f36f8 Found-by: clang static analyzer with the help of AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5259 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 259eaa99155921c42888fce8c6c398252bd3b937 Author: Jeffrey Altman Date: Tue Aug 16 10:49:46 2011 -0400 Windows: torture test updates roken'ize remove dead code Change-Id: Id556ded4b3340fac1d58b5407f82d394ab1d18b2 Reviewed-on: http://gerrit.openafs.org/5290 Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 361cf11db36db2fc94c7e4961061423fb13e4cf8 Author: Russ Allbery Date: Mon Aug 15 20:20:31 2011 -0700 Add NEWS entries for the 1.6.0 final release The date will be slightly off from when it will be officially announced, but it should be close enough. Change-Id: Icb678bd2da148f59546f5e3d5cfda0251e76bdca Reviewed-on: http://gerrit.openafs.org/5287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bec9c12859a22efadb657e7b3995af00fcf91b83 Author: Russ Allbery Date: Sun Jul 24 16:22:35 2011 -0700 Prefer dblatex to docbook2pdf docbook2pdf, at least in version 0.6.14-1.1 in Debian, dies while attempting to build the Admin Guide with an error about TeX capacity exceeded. dblatex seems to work reliably. If both are installed, prefer dblatex to docbook2pdf. Change-Id: I7cf594c677cde84410bfefacf07cbbf398026ff3 Reviewed-on: http://gerrit.openafs.org/5091 Reviewed-by: Derrick Brashear Tested-by: Russ Allbery commit ad6e19331e4f3ec6566dc224f1e1c943a69c62bb Author: Derrick Brashear Date: Mon Aug 15 12:17:06 2011 -0400 macos: fix race in afs_root same race on PutVCache in afs_root as we had on other platforms, for instance FreeBSD. use a local variable instead to avoid the race. additionally, make sure we end up with the root flagged VROOT. Change-Id: I45ac36f12565320576070fd1c6d1f99ac6db8a63 Reviewed-on: http://gerrit.openafs.org/5278 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b88c0482f445e11d82804fba08e42944b7253200 Author: Simon Wilkinson Date: Mon Aug 15 10:25:27 2011 +0100 rpm: Update CellServDB The commit (a5d66d05fa0308d505de8bde59442e29be9d04f8) which updated our in-tree copies of the CellServDB for the 14th August release failed to update the copy that's referenced from the rpm spec file. Update the filename used here so that rpms also get to have an up to date CellServDB Change-Id: I2906b0515a1c91f3ea6eb51ec3dcd161675e8060 Reviewed-on: http://gerrit.openafs.org/5285 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a0b99e654831fe28794f8e0cec2ab94f07ec965 Author: Jeffrey Altman Date: Mon Aug 15 00:37:31 2011 -0400 Windows: add assertions to cm_scache.c Change-Id: If9a47c3b1507b5b4aa9c271204ff496c5b0a88a0 Reviewed-on: http://gerrit.openafs.org/5280 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c58ae34f72d25434cd59228806ca59a6ff39a903 Author: Jeffrey Altman Date: Mon Aug 15 00:34:00 2011 -0400 Windows: cm_ShutdownSCache corrections Obtain cm_scache.dirlock, cm_scache.rw and cm_scacheLock in the correct order. Do not release cm_scache.rw when it is not held. Since the cm_scacheLock is being dropped, preserve the value of scp->allNextp prior to dropping the lock. Change-Id: I025a8d76f3f7b94ae00bfd4e000750a90d38b343 Reviewed-on: http://gerrit.openafs.org/5279 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 020b415be8fa357cded6eb4c50454aaa5b0722bf Author: Jeffrey Altman Date: Mon Aug 15 00:23:57 2011 -0400 Windows: Save Wix config at start if possible Save the current configuration at the start of the install process so the user can be presented with a dialog prior to installation asking whether the existing or saved configuration should be used or whether a new configuration should be created. Change-Id: I4a42ad597a7e1806bbae6d63bf1a2db365e6be8e Reviewed-on: http://gerrit.openafs.org/5281 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 73b91bf0c0a86e55d6879573aeadd99a137ebf3b Author: Jeffrey Altman Date: Sun Aug 14 21:41:47 2011 -0400 Windows: More interlocked ops for cm_cell flags Change-Id: I9e5cae6152439af75a9baf85900117ca9b456f40 Reviewed-on: http://gerrit.openafs.org/5274 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f75214282795b23c433b2512b00d24b3e6166b76 Author: Jeffrey Altman Date: Sun Aug 14 21:41:19 2011 -0400 Windows: Interlocked ops for cm_user flags Change-Id: I64932b0d15b439614b6bbba0ba875eacb1260832 Reviewed-on: http://gerrit.openafs.org/5273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a5d66d05fa0308d505de8bde59442e29be9d04f8 Author: GCO Public CellServDB Date: Sun Aug 14 18:43:08 2011 -0400 CellServDB update 14 Aug 2011 Change-Id: I2b18a59001c4a5fe041e977ee0321cfafb22fa91 Reviewed-on: http://gerrit.openafs.org/5270 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b97383c1e68a0b94baa8d05b2ab2531f96e7b63c Author: Jeffrey Altman Date: Sun Aug 14 18:15:24 2011 -0400 Windows: cm_FindServerByUuid correct lock acquisition Obtain cm_serverLock when 'locked' is FALSE instead of when TRUE. Change-Id: I427fa849ff34734a2dd11d06f42bc709bb70a74e Reviewed-on: http://gerrit.openafs.org/5268 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c20010850e2b43a0b9a6d74357ea6111dbf3409e Author: Jeffrey Altman Date: Sun Aug 14 00:14:10 2011 -0400 Windows: prevent cm_server races Use interlocked operations to modified the flags field. Close a race in cm_NewServer() which can result in multiple cm_server objecs being created for the same addr/port/type tuple. Change-Id: Ia26e21e1f007875ce316d2ae45a1fbf6fed835f9 Reviewed-on: http://gerrit.openafs.org/5266 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 10d27341808be41b29fbcc09b8bd7523c3b7a541 Author: Garrett Wollman Date: Sat Aug 13 18:51:02 2011 -0400 libafs: don't call afs_PutDCache(NULL) in afs_GetDownD() It's possible for an eviction candidate to be omitted by the small for loop (around line 670), leaving its reference in victimDCs set to NULL. In the big for loop that follows, don't call afs_PutDCache() when we hit one. Change-Id: Ib0891636a3479bf97cdeab823189e659cb261aa6 Found-by: clang static analyzer with help from AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5260 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c0e92a159f11366a88adab4700e3f909124a06a Author: Garrett Wollman Date: Sat Aug 13 19:01:26 2011 -0400 libafs: don't free a null pointer in an unlikely error condition It is extremely unlikely that we will ever fail to allocate two bytes in SRXAFSCB_GetCellServDB() to hold the empty-string return value for the case where the specified cell can't be found. But that would result in freeing a null pointer, so check for it. Change-Id: I47a296148e231b0ef20ecd18b8458b912f22a58c Found-by: clang static analyzer with the help of AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5261 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ee56107d4d168ef07968afeaa7f1c5b39f5c5b23 Author: Garrett Wollman Date: Sat Aug 13 19:12:50 2011 -0400 libafs: don't free the NULL we get from a failed allocation In extractPioctlToken(), if we fail to allocate space for token_opaque_val, don't immediately pass the null pointer to osi_Free on the error exit path. Change-Id: Ic95e178cfbc1b1bbcb18701c0bbd5221426342ee Found-by: clang static analyzer with help from AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5262 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5b40c5f5294964fc09df2c8332ab63cd2d729264 Author: Jeffrey Altman Date: Sat Aug 13 14:35:53 2011 -0400 Windows: Insert Server Reference List changes When inserting a new cm_serverRef_t object into a server list perform the following operations: 1. take advantage of the fact that the cm_serverLock is held exclusively to purge the list of any deleted entries that could not be removed previously. 2. check to ensure that the item that is being added does not already exist in the list. If it does, discard it. Change-Id: Ibabfc3b2e1b716f2a0cc664a4667bc9219fde09c Reviewed-on: http://gerrit.openafs.org/5258 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 8f446c7463c9183d59a30343682e31ad9f85b307 Author: Jeffrey Altman Date: Fri Aug 12 19:02:48 2011 -0400 Windows: Fix cm_serverRef ref counts Use Interlocked operations consistently Simplify cm_ServerInsertList(). It no longer increments the refCount on the serverRef object. Instead it leaves the refCount as is. Its the caller's responsibility to add a reference if required. Add reference counts and hold locks in places where the volume server list was used unprotected. Change-Id: Ie65cdca4461e84c675e8a29e22cef3e15679fda7 Reviewed-on: http://gerrit.openafs.org/5248 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 578db3bbecf218e3ab80f4896b7cde4d3975daaa Author: Jeffrey Altman Date: Fri Aug 12 19:01:56 2011 -0400 Windows: remove unused variables in fs.c Change-Id: Ie0f21b84266d77d0c92244d5c8a6958d9bfe7e71 Reviewed-on: http://gerrit.openafs.org/5247 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 145a8490c761a0ebf7b3a1cc3017bbe8635f8014 Author: Derrick Brashear Date: Fri Aug 12 16:54:03 2011 -0400 aklog: attempt to warn about needed weak crypto switch for Lion Lion's Kerberos is rather unfortunate. deal with the multitude of missing functionalities by hardcoding this case here. Change-Id: I95f9136cecb476f70fe694847a518eabd2d1ef44 Reviewed-on: http://gerrit.openafs.org/5240 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef3ef1992115e6b61a7859fa2295726af0fb9318 Author: Derrick Brashear Date: Fri Aug 12 18:25:24 2011 -0400 redhat: update dkms config make the dkms config properly name the version. remove no-longer-needed disconnected option for configure FIXES 130170 Change-Id: Id71d46381c8fbade3ea72c581911447fe6ade395 Reviewed-on: http://gerrit.openafs.org/5246 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bb25bdfcb059fc54a57fd4733ce3184e231ca88d Author: Simon Wilkinson Date: Sat Jul 16 22:59:12 2011 +0100 dir: Protect against circular hash chains The dir package didn't protect against circular hash chains when performing directory lookups. A corrupt directory could therefore cause a client or a fileserver to go into an endless loop if that directory contained a loop in its hash chain pointers. Fix this by exiting the lookup if the hash chain has more elements than the total number of entries in a directory. This maximum number of entries is taken as being (number of entries per page) * (max number of pages), which is considerably more than the real maximum value. Change-Id: I9e281571f3b01bd8de346ee5418df38b2f5edaa1 Reviewed-on: http://gerrit.openafs.org/5242 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1946ffe9be0031a2daf907f5e96cf0ee7f5e15e Author: Simon Wilkinson Date: Sat Jul 16 22:57:55 2011 +0100 libafs/dir: Verify directory pathnames Provide a new routine, afs_dir_GetVerifiedBlob() which will ensure that the pathname contained within a directory blob is correctly terminated before returning it to the caller. For the purposes of this function, correct termination is defined as having a terminating \0 character within the same directory page as the blob itself. Change-Id: I4b3bbb95cb49645a8ac52e6061f9e24f89924831 Reviewed-on: http://gerrit.openafs.org/5241 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6f725c441529ccd1616adeda19c7c0b43dcfd9cb Author: Jeffrey Altman Date: Fri Aug 12 16:30:26 2011 -0400 Windows: ChangeLog for 1.6.0 (final) Change-Id: Idd457c7ea4617f9d698d07359f750df25bab4c7c Reviewed-on: http://gerrit.openafs.org/5239 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e3148c6bfad25fdcb86b7248bd6b05432502d4ce Author: Garrett Wollman Date: Fri Aug 12 00:39:54 2011 -0400 FBSD: coalesce three assignments to the same variable Change-Id: Iadc9652c03a2d3453addab759c9f8f0048929e2b Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5233 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbdca2996af06c57cb3ba953c1efb9e316d18f27 Author: Michael Meffie Date: Fri Aug 12 08:25:30 2011 -0400 volser: log host address of caller in extra logging When the volserver is running with extra logging (-log), log the address of the host running vos in addition to the user name. Change-Id: I040be71a84dede255e43c30dd7d8ae56f767f721 Reviewed-on: http://gerrit.openafs.org/5234 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit a3b4cd3c7325c7878ec7b47008f0eec8bfcb1175 Author: Derrick Brashear Date: Thu Aug 11 11:11:01 2011 -0400 viced: avoid aborting on host table exhaustion if we exhaust the host table, instead of aborting, return VBUSY at the client, to defer until hopefully hosts are freed. Change-Id: Ie8b026992bdde1b46117e6f592f9cf0ea4c85a7e Reviewed-on: http://gerrit.openafs.org/5181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8a25d1a1de4a27c87c193ea9588424d56ceed413 Author: Garrett Wollman Date: Wed Aug 10 23:20:57 2011 -0400 rx: make queue macros easier to follow Nothing depends on the queue-manipulation macros having the expression nature, so make them proper statements and unpack the comma-expressions to make it easier to read and understand how they work. This should not change the object code. Change-Id: Icf14537f902768429aa27f67f8acfe39ac996214 Reviewed-on: http://gerrit.openafs.org/5200 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit d18ff03b59cf26423795f735decdcaf13097c446 Author: Derrick Brashear Date: Thu Aug 11 10:43:16 2011 -0400 macos: axe static vfs_fsentry for whatever reason, lion 32 bit doesn't like it when this is static. fine, so it's not static now. Change-Id: Ia9fe6d96615c7fa816f4a88b794faa6ee7e1d010 Reviewed-on: http://gerrit.openafs.org/5206 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7ab34058120ebcc218e4061ea3ac3c8eeca6d83e Author: Jeffrey Altman Date: Wed Aug 10 16:40:35 2011 -0400 Windows: Interlocked operations for cm_buf cm_buf flags and qFlags Separate flags and qFlags in the cm_buf structure to improve performance. Change-Id: I3d9504827cb74f8770e344cea1c06a6e786785b3 Reviewed-on: http://gerrit.openafs.org/5197 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4876a416d2e59e87f9da8834db1ea4770f2c618c Author: Jeffrey Altman Date: Wed Aug 10 11:42:59 2011 -0400 Windows: Interlocked for cm_buf cmFlags Change-Id: I7ed2847afdcbc94c9023c6686d3c81f7863d7f61 Reviewed-on: http://gerrit.openafs.org/5196 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8661c9b6710322195b00de6ae03b3172712104aa Author: Jeffrey Altman Date: Wed Aug 10 12:02:20 2011 -0400 Windows: fix tptserver director creation Change-Id: Ifc2433068e1811633f4ac80d3b4a2a9d16226f16 Reviewed-on: http://gerrit.openafs.org/5195 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cbd075a36000d0b54b64eb7d9736587b27a08e9e Author: Jeffrey Altman Date: Wed Aug 10 11:41:21 2011 -0400 Windows: Interlocked ops for cm_volume Use Interlocked operations for protection of cm_volume flags and qFlags as well as cm_vol_state flags. Change-Id: I1a062a5c49d793162b83b9f4f3c32185ae596369 Reviewed-on: http://gerrit.openafs.org/5194 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 75297d4439bb30ddd9968805aecf2cc2812bfdf0 Author: Jeffrey Altman Date: Wed Aug 10 11:40:35 2011 -0400 Windows: Interlocked ops for cm_scache Use Interlocked operations for cm_scache flags and mask field changes. Change-Id: Ice87dc5de395b54e7e30e362d2e72caa9062120e Reviewed-on: http://gerrit.openafs.org/5193 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit deb8c893c2bd78b2871ccf1ff733539534a2890e Author: Jeffrey Altman Date: Wed Aug 10 11:37:51 2011 -0400 Windows: Interlocked ops for cm_cell Use Interlocked operations for cm_cell flag updates. Change-Id: I45c0a39ea935db2c231a30ecb02963f35b6d734c Reviewed-on: http://gerrit.openafs.org/5192 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec1295d11b5e75fa942fe8c3a0f16309c5486ed4 Author: Jeffrey Altman Date: Tue Aug 9 17:25:50 2011 -0400 Windows: implement InterlockedAnd/Or for X86 Debug Change-Id: I56b3f9534daf0cd152eeea293b1a357d062b9166 Reviewed-on: http://gerrit.openafs.org/5191 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3993b215afe8b5b44baee4f60d1e75d419a90448 Author: Jeffrey Altman Date: Tue Aug 9 17:25:22 2011 -0400 Windows: correct prototype for ChangeList fs_acl.h Change-Id: I63e3b37bd4348da0789dfa78599e513753f34a62 Reviewed-on: http://gerrit.openafs.org/5190 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6691ff6daceb7960dc925983a2b9129877e67c9a Author: Jeffrey Altman Date: Sun Aug 7 14:11:17 2011 -0400 Windows: make osi_Log macro safe for if..else wrap the osi_Log macro's internal if statement with a do {...} while(0) block in order to ensure that it is safe for use in if..else controls without bracing. Change-Id: Ica7bb95dfb1c0285a925771a9b659f85ec0e075f Reviewed-on: http://gerrit.openafs.org/5189 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 833010acac069c97f59c527e23eaa4b71ff18981 Author: Garrett Wollman Date: Wed Aug 10 21:21:40 2011 -0400 stds.h: __nonnull__ has four underscores Compile-testing AFS_NONNULL doesn't prove anything until something actually uses it. Fix 342be3535499c5ecd7d34b4edd43a4655559cb28 to use the spelling that the compilers actually support. Change-Id: I4a6b965d459a90a1832f2e813e886c15d3477962 Reviewed-on: http://gerrit.openafs.org/5198 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e8607d8d250fb41fcf4e60a09917f971c4d6104a Author: Derrick Brashear Date: Wed Aug 10 09:39:23 2011 -0400 macos: reset next vcache pointer after reacquiring xvcache dropping the xvcache lock means that things can change out from under us. in case they do, reset the next vcache pointer before looping Change-Id: I71be39a2f2986804257c50b1d5b7d557b58a3573 Reviewed-on: http://gerrit.openafs.org/5184 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d0cd1393ff5c69cba2f14fc76aa8f7ca588ccc3 Author: Garrett Wollman Date: Wed Aug 10 00:18:28 2011 -0400 FBSD: catch up with the disappearance of VOP_GETVOBJECT The vnode operation VOP_GETVOBJECT disappeared in FreeBSD 6.0, an embarrassingly long time ago. Six years ago, a kluge was added to emulate its behavior, but it did not correctly emulate the return value of the old VOP implementation. As a result, osi_VM_StoreAllSegments() could never actually do anything. Since we don't support FreeBSD before 8.0, remove all references to VOP_GETVOBJECT and examine vp->v_object directly instead. This has the result that osi_VM_StoreAllSegments() will actually do something now, which may not be desirable. (Previously, if somehow the vnode had no associated VM object, it would crash, and otherwise it would do nothing at all.) Change-Id: Ifdad92ae8e393e85c3f97907af7119ce342b25dd Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5183 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 342be3535499c5ecd7d34b4edd43a4655559cb28 Author: Garrett Wollman Date: Tue Aug 9 23:50:09 2011 -0400 stds.h: introduce AFS_NONNULL AFS_NONNULL wraps the GCC/Clang function attribute __nonnull__, which tells the compiler and the static analyzer that the pointer arguments to a function (or specific ones, if provided) cannot be null. Note that GCC has only limited support for warning about violations of these constraints. Usage examples: int myfunc(struct foo *a, bar_t, struct baz *c) AFS_NONNULL((1)); tells the compiler that the first argument cannot be null (but the third one can). int myfunc2(struct foo *a, bar_t, struct baz *c) AFS_NONNULL(); tells the compiler that both pointer arguments cannot be null. Change-Id: Id81f0c382a6a3bdd9bf9c716eb4091b433129d69 Suggested-by: Simon Wilkinson, comment on change Ic8751737 (#5180) Reviewed-on: http://gerrit.openafs.org/5182 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2cd9d0536b173bf8c983aecd8599de0a82610151 Author: Andrew Deason Date: Wed Aug 10 10:23:40 2011 -0500 volinfo: Include nfs.h nfs.h is required for various types used in vol-info.c. Include it. On namei this header gets pulled in indirectly via other means, but on inode it does not (and we shouldn't be relying on such anyway). Change-Id: If917f8c3b0382572d2146450116399498257ffc7 Reviewed-on: http://gerrit.openafs.org/5185 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit a868209c4a9009893044ad33870a9e120085f5ce Author: Simon Wilkinson Date: Sun Jul 31 15:14:00 2011 +0100 aklog: Add -config option Add the -config option to aklog so that a different configuration directory location can be specified on the command line for testing purposes. Change-Id: Ic5f8d778304a43c823e53bf1855a3e6bf426f80c Reviewed-on: http://gerrit.openafs.org/5170 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b60082c1f31f2aa02107e509f161e4e79ea5daa Author: Simon Wilkinson Date: Wed Jul 27 11:30:51 2011 +0100 pts: Add the -config option Add the -config option to all pts commands, so that the user can set the location of the configuration directory to use. This is primarily provided for testing purposes, to make it simpler to build fake AFS cells with configuration in non-standard locations. Change-Id: I90c9c95cbf99b3853bfbe93dab1ab71c3ae7e228 Reviewed-on: http://gerrit.openafs.org/5103 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 784a410d0f1d6b5649c5b4943eb1b945ef7d70e8 Author: Marc Dionne Date: Mon Aug 8 16:08:25 2011 -0400 venus depends on libafsauthent Add an explicit dependency on libafsauthent for src/venus, since it is needed to build afsio. This can cause parallel builds to fail. Change-Id: Ifda59983cda0711e9e1568d5a6be25e6ea934eee Reviewed-on: http://gerrit.openafs.org/5171 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d28188382b40055acf7096ef89d5507194a3b8b6 Author: Marc Dionne Date: Mon Aug 8 17:08:34 2011 -0400 pam: fix unused but set warnings Fix a few cases of set but unused variables. Change-Id: I0a3e0906dbc708e2449121f3de1726d7055efc27 Reviewed-on: http://gerrit.openafs.org/5173 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 4b4a52b31406d122ce3e542d3a9d9941dd803576 Author: Marc Dionne Date: Mon Aug 8 16:51:53 2011 -0400 volser: flag unused variable nearInode can be unused, flag it as such to prevent warnings and keep enable_checking happy. Change-Id: Ic79d101380b79c3c3d90c4c4f949abe7c3f476ff Reviewed-on: http://gerrit.openafs.org/5172 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bf4b2fd3e26dcf2a0db704815e05d77a558d38c6 Author: Garrett Wollman Date: Mon Aug 8 23:26:38 2011 -0400 bos: don't dereference a null pointer when printing an error message The parameter we are interested in is at MRAFS_OFFSET + 17, not MRAFS_OFFSET + 13. Change-Id: Ib856ff40c5949cde95a2b277cd44253b87c3c2a4 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5178 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 7fe4125fe3435092b75ed29b884d8d3c2d1a2cad Author: Garrett Wollman Date: Mon Aug 8 23:19:22 2011 -0400 dir/vol: Die() really does Die() is an abort routine shared by the dir and vol modules. Move its prototype into dir.h to ensure that its declaration matches its three different definitions, and add an AFS_NORETURN annotation so that the static analyzer knows that it aborts. Change-Id: If01f35fe796708f6187b9767497a32458888ec1c Reviewed-on: http://gerrit.openafs.org/5177 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 9b0f53b2bf61e7532d95391ae553b407a601e814 Author: Garrett Wollman Date: Mon Aug 8 22:49:24 2011 -0400 vos: eliminate unnecessary global variables tserver is used by three different functions but not shared by them; make it private to each one to improve static analysis. tconn is not used by anything, so just delete it. Change-Id: Ic9fc4add66dbbb02170846154e44d261dcc6b061 Reviewed-on: http://gerrit.openafs.org/5176 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 292b375e392c6d3443d486e654a88bc4b4502cb2 Author: Garrett Wollman Date: Mon Aug 8 21:41:57 2011 -0400 volser: let it be known that Abort() really aborts The compiler and static checkers can do a better job if they know that certain functions never return. Tell it that common.c:Abort() is such a function. While we're at it, let volser_internal.h provide the declarations for this function (Log() was already there). This makes volser parallel to the way the same functions are declared in vol. Change-Id: I8b684bf96866edfc9edaae126d789d245a8d2356 Reviewed-on: http://gerrit.openafs.org/5175 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit ae6a3929489035ddcd17785abab8900cebd22eb3 Author: Garrett Wollman Date: Mon Aug 8 21:18:15 2011 -0400 kdb: don't dereference a null pointer on corrupt database When iterating through the database, kdb would dereference a null pointer if it encountered an error retrieving the value or if the value was not the right length, in code that was clearly cut-and-pasted from the other branch of an "if" statement where a specific entry was requested on the command line. Print the name of the entry with the problem as was apparently intended. Change-Id: Idc2d3c9b6049e5d3b0eb302353a68bcfdad6a90d Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5174 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 90ea68979c6740583747d0af500ed4a034eba651 Author: Garrett Wollman Date: Sun Aug 7 00:35:36 2011 -0400 afsd: look in the right place for -splitcache argument The argument to -splitcache is in as->parms[34], not [30]. Change-Id: I4d7be16a1ad99a03025c80f9782c4f678da868ae Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5169 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 8776f194173bf688da9982845303c98da458fa3f Author: Garrett Wollman Date: Sun Aug 7 00:09:33 2011 -0400 afs_pioctl: don't use cell uninitialized in PGetTokens2 An unlikely error condition could lead to the variable cell in PGetTokens2 being passed uninitialized to afs_PutCell. Initialize it to NULL beforehand to avoid this. Change-Id: Ia8ded86df9d8af2f08c02d39749252d98a6c9ffe Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5168 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 43834bff1a2b1af348ff69d538a884bf1070b90c Author: Garrett Wollman Date: Sat Aug 6 23:55:50 2011 -0400 butc: avoid freeing uninitialized pointer in writeDbDump() In error conditions, charList could be freed before it is initialized. Move the initialization up to before the error checks. Change-Id: I678f40552590e238f494507f7410233cdbb949ac Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5167 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 1fc4c9dbe2b1ba11929a5e5106afda5969e6fa7c Author: Derrick Brashear Date: Wed Aug 3 13:05:27 2011 -0400 pam: stop building it wrong in the new lwp/pthread/shared universe, well, we have the opportunity to be correct. and we chose to do it entirely wrong. we're building a shared object. use the right rules. we need to add some CFLAGS for PAM. do that using MODULE_CFLAGS instead of just building a whole new CCRULE Change-Id: Ie3e3c5ba902e5364cfa99d4dbd1b5b7fd4451127 Reviewed-on: http://gerrit.openafs.org/5153 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d84c065fbf893d753bcd8da1211be536b07e29d Author: Derrick Brashear Date: Wed Aug 3 13:56:08 2011 -0400 pam: clean up unused variables and prototyping don't define variables on platforms we won't use them on do prototype functions we call. basically, we compile with warnings enabled now, so, fix everything so we *can*. Change-Id: I749f27c227ac70c58ccc68f1548f8274f10e3587 Reviewed-on: http://gerrit.openafs.org/5154 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 496fb87372555f6acddd4fd88b03c94c85f48511 Author: Derrick Brashear Date: Mon Aug 1 16:38:46 2011 -0400 rx: avoid nat ping until connection is attached drop nat pings on connections we haven't talked on yet Change-Id: Ie333d50a090f1f086c958440cc37849413442dea Reviewed-on: http://gerrit.openafs.org/5130 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit c92f04af6094ce04b1541a1b23b254d3c1421290 Author: Garrett Wollman Date: Sat Aug 6 23:49:10 2011 -0400 butc: avoid testing stack garbage; remove dead initializer "code" is unconditionally set early in saveDbToTape() so there's no need to initialize it. On the other hand, dumpEntry.id is used before dumpEntry is initialized, so set it to what appears to be the expected value before any non-local exits could cause it to be inspected. Change-Id: I133f8e84e46d0faedf3c9683330d92158bcd8935 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5166 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 34cc26a1b11bc8cf8f91996a019ac4b7d21dccd8 Author: Garrett Wollman Date: Sat Aug 6 23:36:14 2011 -0400 butc: initialize startTime before it is used In some unusual error situations, startTime may be used uninitialized. Move the initialization up above the first such error condition. (None of the intervening code can take measurably long to execute so this should not make any difference in the non-error case.) Change-Id: I25bf7a5e149540593febec79f9f5111434807514 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5165 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 619b420903c99e48618db0d2f12085111573f279 Author: Garrett Wollman Date: Sat Aug 6 23:15:14 2011 -0400 vos: don't free stack garbage on error If wantExtendedInfo is true, then pntr is used uninitialized. In the other case, UV_ListVolumes will have set it to NULL before doing anything (even if it returns an error), so this free() is dead anyway. Change-Id: I6979a69d33ecbbdb906eb9a075bbf13180e36646 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5164 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 55beacdc385424770c78cf055e8fd426075506f1 Author: Simon Wilkinson Date: Wed Aug 3 19:08:20 2011 +0100 libafsauthent: Add volser and vldb Add the volser and vldb families of functions to libafsauthent. This allows applications such as per-AFS which are building pthreaded clients to use a single library, rather than trying to mix LWP and pthreaded code within the same process. Change-Id: I3682876e91ca03311a798ac71e3a7a28f3205d42 Reviewed-on: http://gerrit.openafs.org/5157 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 400c72561e7622716a46a38affd2f5a7842519eb Author: Simon Wilkinson Date: Wed Aug 3 18:45:01 2011 +0100 volser doesn't depend on tviced, but on vlserver Nothing within the volser/ directory depends on tviced, so remove the unecessary dependency. Add an explicit dependency on vlserver, so that libvldb is available to us. This is required to get rid of some potential circular loops when we start including volser objects in libafsauthent Change-Id: Ibb6b8fb87dfe6e9eb4fa6d1dde195fd5261a8959 Reviewed-on: http://gerrit.openafs.org/5156 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0246f6e9683fb9e51d0fb0633049ff0125468b2b Author: Jeffrey Altman Date: Thu Aug 4 22:50:03 2011 -0400 Windows: symlink make should translate \\afs target If the target is a UNC path beginning with the AFS netbios name, convert the path to use Unix /afs mountpoint notation. Change-Id: I01e01b70938f8eb383fd3e7458a140d9e89dd237 Reviewed-on: http://gerrit.openafs.org/5162 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c5126838590eaf15e0df569c31b2a1bc12b3e0af Author: Jeffrey Altman Date: Thu Aug 4 17:25:01 2011 -0400 Windows: adjust scache LRU postion upon deletion If the object represented by a scache object is deleted, update the LRU position of the scache object to make it the first object in the LRU queue to be recycled. This preserves the cached objects for those that might prove useful in the future. Change-Id: I0e862b1270e10c31f20ecde06d208f4b8c405c3a Reviewed-on: http://gerrit.openafs.org/5161 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4e42d6fd18097d0c8d2e4b455d3c540743d7dbda Author: Jeffrey Altman Date: Thu Aug 4 17:21:59 2011 -0400 Windows: fix condition calls to osi_Log The osi_Log macro is if(foo) osi_AddLog() If osi_Log macros will be conditionally called, the conditonal needs to have bracing. Change-Id: I59de78a5b7b35cc822a648a51cd63a14037c1ca5 Reviewed-on: http://gerrit.openafs.org/5160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 17e50a4b98de057a699681261ba126a5ac12a0cc Author: Jeffrey Altman Date: Thu Aug 4 17:15:16 2011 -0400 Windows: LockOrderValidation memory usage optimization Instead of using malloc() and free() to allocation lock reference structures, cache allocated objects in a free list. This reduces memory fragmentation. Change-Id: Idffe82282c77202d0fc3a9be9123c3b7384ecd63 Reviewed-on: http://gerrit.openafs.org/5159 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2bce3b50ef4fd9b9bdd03daf6e8332710f541922 Author: Jeffrey Altman Date: Thu Aug 4 17:08:45 2011 -0400 Windows: after dir enum adjust dir scache LRU During a directory enumeration the directory scache object is reference counted so it can't be recycled. However, if there are more directory entries than the maximum number of cached scache objects the directory scache object will end up being the next object to be recycled after the refcount is dropped. Since the directory is clearly a hot object, before dropping the reference, adjust the scache LRU position so that it is the last object to be recycled. Fix the variable name for the directory scache to be 'dscp' for consistency. Change-Id: Ia2089fb9b47dab77abc0911ab009e5aed75ed848 Reviewed-on: http://gerrit.openafs.org/5158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4111ee2374d030e1f3bb1fa3530f2877f2576d07 Author: Jeffrey Altman Date: Tue Aug 2 18:24:56 2011 -0400 Windows: use %p to print cm_scache_t pointers Change-Id: Iee13204820b3adc4359e42d46d9f9050ab07bcb2 Reviewed-on: http://gerrit.openafs.org/5152 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 88725587e97d717086801b2522e4625e5fdeb3a8 Author: Simon Wilkinson Date: Wed Aug 3 19:07:14 2011 +0100 tbudb depends on tubik ... ... so say so in the Makefile Change-Id: I84f0ac3c06953eff98e0194ad375c32b3656af58 Reviewed-on: http://gerrit.openafs.org/5155 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fec4e6bc595014f34c38707c0015c1f76edd770e Author: Jeffrey Altman Date: Mon Aug 1 21:40:25 2011 -0400 Windows: add missing dafs man pages to wix installer dafileserver.html dasalvager.html davolserver.html Change-Id: I87a70b2a30701f184f7a70fbcf6ee50a4bb1d973 Reviewed-on: http://gerrit.openafs.org/5149 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f631a11f5e9ab50e62b3aaebbff9ef200ac799fe Author: Jeffrey Altman Date: Mon Aug 1 11:05:51 2011 -0400 Windows: conditionalize mappings of error values Visual Studio 10 adds a large number of additional POSIX C99 error values to errno.h. Wrap each mapping with #ifndef to ensure that we do not redefine the C runtime errno.h definition. Change-Id: Ia6929d9ff84358059efcc4a53dcc91ee2612fc5a Reviewed-on: http://gerrit.openafs.org/5129 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 71e64b6f21817872676e74a8c67c0f0bcfb23391 Author: Jeffrey Altman Date: Mon Aug 1 11:00:55 2011 -0400 Windows: unified afs errors must use nt mapping On Windows, error.h does not provide a complete list of POSIX C99 error values. OpenAFS fills in the gaps with a private error mapping table afs/errmap_nt.h (src/util/errmap_nt.h). If errmap_nt.h is not included prior to processing unified_afs.h, values such as ELOOP will be mapped to EIO instead of the unique value defined by errmap_nt.h. Change-Id: I3d25fafb15f1b0060ad1047178cbadd5ce22edb2 Reviewed-on: http://gerrit.openafs.org/5128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d54c9b05d003bf861fd51e904b631e5425a079d6 Author: Derrick Brashear Date: Mon Aug 1 10:58:28 2011 -0400 vos: spell "vldb" correctly i'm not even going to ask. Change-Id: I5f59177ef58d9728a516176a14e0504130f7c584 Reviewed-on: http://gerrit.openafs.org/5125 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5ebef72c0299560716f3bc8d59122aedd61cc399 Author: Derrick Brashear Date: Mon Aug 1 09:58:27 2011 -0400 macos: fix vnode finalization erroneously pushed a bad version of this. fix it now. Change-Id: Ic5db50473a97bd7ffb3ba34ac052da2ae8f2875b Reviewed-on: http://gerrit.openafs.org/5124 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b621a2986099488426a026818532a9600db9aeba Author: Andrew Deason Date: Fri Jul 29 16:44:11 2011 -0500 SOLARIS: Do not release NULL root vp on unmount When we unmount, and afs_globalVp is NULL (e.g. because root.afs was unavailable when the client was started), we will panic the machine if we try to release it. So, if afs_globalVp is NULL when we hit our unmount handler, don't touch it. Reported by Andy Cobaugh. Change-Id: I4e5869237e24da320afc2b7edaf8edca0ab3e4e9 Reviewed-on: http://gerrit.openafs.org/5117 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6b83ba621b520174dc4679c220888619dc0b44a0 Author: Will Maier Date: Sun Jul 31 14:24:12 2011 +0100 RedHat: Return status values from client init The init script provided with OpenAFS always returns 0 when the status subcommand is called, even if the service is not running. For example: $ sudo service afs status; echo $? afsd is stopped 0 This change makes sure the init script exits with the value returned by the status function from /etc/init.d/functions. With this patch, the afs init script behaves as expected when used, for example, in a Chef service resource: $ sudo service afs status; echo $? afsd is stopped 3 Change-Id: If3d317fc406746f357e29e0d8d82c7ccf3c192d7 Reviewed-on: http://gerrit.openafs.org/5123 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit afc3ded56795d30e4e0f38d11f8302568943c49b Author: Jeffrey Altman Date: Fri Jul 29 18:09:53 2011 -0400 Windows: Do not execute tasks on deleted files If a cm_BkgDaemon thread finds a queued request whose cm_scache_t has the CM_SCACHEFLAG_DELETED flag set, do not execute the request and fail it immediately with CM_ERROR_BADFD. Any attempt to execute the request will fail with VNOVNODE from the file server. Change-Id: Ib74300568ac083e39506b0d106a5984e8fe5e464 Reviewed-on: http://gerrit.openafs.org/5120 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7e3615208d9e1b03d8eba4fb802744b2b81f8868 Author: Jeffrey Altman Date: Thu Jul 7 17:51:58 2011 -0400 Windows: cm_BkgDaemon should not do cm_SyncOp's job cm_SyncOp is designed to synchronize operations among multiple threads. The background daemon threads should not filter requests based upon cm_SyncOp states. Doing so is racy and does not produce better performance. Change-Id: Ifeafd55da6e02807ed4cc3c3f2b6f1de4df2a87f Reviewed-on: http://gerrit.openafs.org/5119 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fa11f71f040b2e6856047c53fdd902109e5c6e52 Author: Jeffrey Altman Date: Fri Jul 29 18:07:42 2011 -0400 Windows: Do not release locks on deleted files If the cm_scache_t flags include CM_SCACHEFLAG_DELETED, do not bother releasing an outstanding file lock to the file server. The lock went away when the file was deleted. Any attempt to release will fail with VNOVNODE which is translated locally into CM_ERROR_BADFD. If a RXAFS_ReleaseLock RPC fails with VNOVNODE, treat it as success. Change-Id: I15860920a224bd032256e08c9983fa31f7f1c9ee Reviewed-on: http://gerrit.openafs.org/5118 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 357e9f928fa0abb73ab3bb2e3b8e8fa17d0f9065 Author: Jeffrey Altman Date: Thu Jul 28 15:07:32 2011 -0400 man: more changes for man.3 pod files generate-html requires a HEADER description for pod3 The Windows makefile needs to process pod.in files. Change-Id: I5ac964cc8c1af73510d17b3a31bf1a9a5df3a58f Reviewed-on: http://gerrit.openafs.org/5116 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4138a778fe821493c726826ffc4715f5f46222d9 Author: Jeffrey Altman Date: Thu Jul 28 15:05:28 2011 -0400 Windows: permit perl command to be explicitly set Add PERL variable to the build system. If not specified externally the variable will be set to 'perl'. However, ActiveState Perl should be used and not Cygwin Perl. The build environment should indicate that by specifying a PERL setting. SET PERL=c:\perl64\bin\perl.exe or similar. Change-Id: Iaf14a82134cc2dcf3c23b1e5a0ed65606e2487bb Reviewed-on: http://gerrit.openafs.org/5115 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4a24a59d52266fcbbf92041ce3a74a455e84a25c Author: Jeffrey Altman Date: Thu Jul 28 15:02:14 2011 -0400 man: add missing pod files to Windows makefile Several of the demand attach pod files were not being processed on Windows. Change-Id: If211f80564115bdc184181226aa0750ba1989a55 Reviewed-on: http://gerrit.openafs.org/5114 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0b6247c27fcc0b8a2f307ccc545eea777a07f999 Author: Jeffrey Altman Date: Thu Jul 28 14:59:05 2011 -0400 merge-pod changes for cygwin and MSWin32 perl On Windows, the git repository is checked out as CR-LF. Tell perl to open the pod file with cr-lf as the end of line. On Windows, the input file names are of the form podX\foo.pod.in. Cygwin perl cannot parse the directory for the file name unless the path separator is converted from \ to /. Change-Id: I7139bd2138573e938ea3e8386685f3b69e131c4d Reviewed-on: http://gerrit.openafs.org/5113 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b61bd99bce68055dc0dd53b82d1d5318c25d9051 Author: Jeffrey Altman Date: Tue Jul 26 17:37:37 2011 -0400 Windows: add debugging to afskfw More debugging output added when a debugger is present. Change-Id: I22698ebaf3c950a5b9c9b7d6746af45603b5acf9 Reviewed-on: http://gerrit.openafs.org/5112 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7c59ec8f816120c738b1da83f7db9349d912f573 Author: Jeffrey Altman Date: Tue Jul 26 17:36:25 2011 -0400 Windows: afskfw remove TRUE conditional Simply the code by removing an if(1) conditional. Change-Id: I2cb3f861b99686a7d14aa7f567adc5a083a08a5b Reviewed-on: http://gerrit.openafs.org/5111 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 214e9a6052b1dab2a0c4383632640936c3e518c6 Author: Jeffrey Altman Date: Tue Jul 26 17:34:52 2011 -0400 Windows: KFW_AFS_get_cred userrealm The userrealm string in KFW_AFS_get_cred() should not include the '@' symbol from the user principal. Including the '@' produces an invalid realm name. Change-Id: I5887ffabce93666bdbe231eaac0821573162a6ba Reviewed-on: http://gerrit.openafs.org/5110 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a063ecdc78cf888df2459b32b0082d4767948563 Author: Jeffrey Altman Date: Tue Jul 26 17:32:28 2011 -0400 Windows: afslogon start service if not started If the service is configured for auto start but has yet to start, kick it off just in case. Change-Id: I668961b17472a78ebac6744bf131dcb850d4e4a2 Reviewed-on: http://gerrit.openafs.org/5109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 549737f1e7d52256f053c86116b56c3211b084b6 Author: Jeffrey Altman Date: Tue Jul 26 17:03:56 2011 -0400 Windows: improve afskfw error message output Add KTC and PT error messages to those that can be translated within afskfw.lib. This improves the error logging for afslogon.dll, afscreds.exe, and afssrvadm.exe Change-Id: I62aa5f1249d4d1f2d64ed068be47a5832d97f85c Reviewed-on: http://gerrit.openafs.org/5108 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit be152a00a7e4043592094be30f4a811c67a4ac32 Author: Michael Meffie Date: Fri Jul 22 23:38:36 2011 -0400 volinfo: clean up headers Remove unneeded includes. Change-Id: I68514d47b1ddd4ea1d79c919635f87f6670e767f Reviewed-on: http://gerrit.openafs.org/5098 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 530b5ecac51cc7ce61ccddd50868c632c4a47298 Author: Andrew Deason Date: Wed Jul 20 16:50:52 2011 -0500 libafs: Rate-limit hard-mount waiting messages Limit how often we log "hard-mount waiting for XXX" messages. Without this, it is possible for a client with hard-mounts enabled to spam the kernel log rather excessively (in extreme cases this can even panic the machine on at least some Linux). To keep things simple, just log approximately one message per volume per hard-mount interval. Change-Id: Ie82f68c5eae76519fcf1491164133c1955ed9c08 Reviewed-on: http://gerrit.openafs.org/5060 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0251eb6b377a7ce6a858398f95bd724c3477ee43 Author: Simon Wilkinson Date: Sun Jul 10 13:56:21 2011 +0100 util: Don't use FT_GetTimeOfDay for MRAFS logs FT_GetTimeOfDay creates an LWP dependency. For the purpose that we're using it in serverLog.c, gettimeofday performs identically. So, just use gettimeofday and reduce our dependencies. Change-Id: I36887d725c7e93386c80c61b3b33a7cda2bfe738 Reviewed-on: http://gerrit.openafs.org/5085 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 192ba0deae276e5bbea2580da2019a4d743daab3 Author: Garrett Wollman Date: Sun Jul 17 21:57:20 2011 -0400 pthreaded servers: set thread names In the startup function for each thread, set a thread name. This can safely be done unconditionally as LWP builds turn the call into a no-op. In general, the thread name parallels the name passed to LWP_CreateProcess, but for Rx server threads, it additionally includes the thread ID so that these threads can easily be distinguished. (I'm not sure yet whether doing so will prove to be useful or counterproductive.) Change-Id: I30e012eebef4c7856084fa8b8eb1d88d9fcdf2c4 Reviewed-on: http://gerrit.openafs.org/5041 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e453f49bd4d501210e4d1696cb07158c4b887334 Author: Andrew Deason Date: Mon Jul 25 11:12:37 2011 -0500 libafs: Add afs_conn refCount imbalance safeguard If someone is putting back too many refs, we can detect so very easily. If we see that such a thing is happening, give a warning and bail out, instead of risking a panic or memory corruption. Change-Id: I36c968f9cd7cab3f569d3f6860f41678f026fba8 Reviewed-on: http://gerrit.openafs.org/5094 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 04e4126264c083a3a5f3d86c4de2f44ac1fe8cb2 Author: Garrett Wollman Date: Thu Jul 28 00:39:52 2011 -0400 FBSD: complete the build fix for 8.1 libafs Strangely enough, nosys() also needs a cast to sy_call_t *. Change-Id: I7fee2278c228da3ddb2c3ccc9758681cd0abc01d Reviewed-on: http://gerrit.openafs.org/5105 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d6f6e00439ba04f7d93c701cf85e921eab2565e Author: Garrett Wollman Date: Thu Jul 28 01:44:25 2011 -0400 configure: provide some necessary prerequisites in header checks is a prerequisite for and . is a prerequisite for . Change-Id: I2c974ad863c6ff7eedb3702159399118af8de074 Reviewed-on: http://gerrit.openafs.org/5107 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 74e8bec7bec8b754498d9006ee6e7db3d105c0d7 Author: Garrett Wollman Date: Thu Jul 28 01:04:59 2011 -0400 configure: spell the "=" operator to test(1) correctly Equality in the test(1) utility is represented by "=", not "==". Some, but not all, versions of test accept the latter as an extension. Change-Id: I25380f77e1c621965e0610318c9793874154cf15 Reviewed-on: http://gerrit.openafs.org/5106 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9e29a20df7cca05472825f57ed553780ac901520 Author: Garrett Wollman Date: Mon Jul 25 00:50:54 2011 -0400 libuafs: don't use a GNU-only feature in a common makefile $(shell ...) is a GNU Make proprietary feature and shouldn't be used OS-independent makefiles. There is no need to use it here; command substitution in the shell is good enough. Change-Id: I511108dab0770e772005b3f4a851713d1ee5a83e Reviewed-on: http://gerrit.openafs.org/5093 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot commit f8ff2591f73401e6d9b6def7630f428569e2f3a6 Author: Derrick Brashear Date: Tue Jul 26 00:52:18 2011 -0400 macos: don't attempt finalize fixup on root vnode because of how the root fid is created we can end up being dumb. turns out we never want to bypass doing the full pass for root anyway so just force fixup to not happen. Change-Id: I2b6d8d5cc4824f0f2a9473a2e810410579e3ad48 Reviewed-on: http://gerrit.openafs.org/5095 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef28bc08c18e750f6100535665d5258a317a0a2b Author: Andrew Deason Date: Fri Jul 22 16:09:52 2011 -0500 libafs: Avoid duplicate afs_Analyze in bulk stat In afs_DoBulkStat, we can call afs_Analyze multiple times for the same set of connection objects. Since afs_Analyze puts its reference to the given afs_conn and rx_connection structures, calling it more than once can cause the reference counts on those objects to be lower than they should be. Instead of making another afs_Analyze call, just alter the error code inside the normal do/while afs_Analyze loop, so the 'loop' afs_Analyze call gets the appropriate error code from the first bulk stat'd entry. Change-Id: Id6396f8e9d4757d54825d4915458bf8b5153984f Reviewed-on: http://gerrit.openafs.org/5086 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 461603e474becbe56f6b42f3eb4b0aa44213dd43 Author: Simon Wilkinson Date: Tue Apr 26 21:37:42 2011 -0400 vlserver: Use libcmd for command line parsing Modify the vlserver so that it uses the libcmd library to parse its command line, rather than rolling its own command line parsing. Change-Id: I7705219894de2d2268729ddc66a8af9ad9758ce7 Reviewed-on: http://gerrit.openafs.org/5074 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b9986c8758c13a1de66b8bdae51b11abaea6cf3 Author: Simon Wilkinson Date: Tue Apr 26 21:36:15 2011 -0400 ptserver: Use libcmd for command line parsing Modify the ptserver so that it uses the libcmd library to parse its command line, rather than rolling its own command line parsing. Change-Id: I84bac2cd70bbaf85004fce2f23d9237215544edd Reviewed-on: http://gerrit.openafs.org/5073 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dcb9776f9c34d070e8bdfe3e482135cbcdb6609c Author: Russ Allbery Date: Sun Jul 24 16:35:42 2011 -0700 Update README for newly added configure switches Add --with-gssapi*, --with-libintl*, and --with-roken for the new library location flags. Add --with-docbook2pdf and --with-docbook-stylesheets for the automatic discovery of tools for building the documentation. Expand and correct the descriptions of --with-html-xml and --with-xslt-processor. Change-Id: Ibe0a94ce3e9c6393bde009bf08f8b9dfac6b84a6 Reviewed-on: http://gerrit.openafs.org/5092 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 525f640c4eda5c7cb96fe65c23a94ff368039590 Author: Russ Allbery Date: Sun Jul 24 16:00:35 2011 -0700 Clean and ignore additional build files for DocBook documentation Depending on what generation method is used for the DocBook documentation, additional build files may be created. One of those (*.aux) will cause the build to break if one switches from docbook2pdf to dblatex without deleting it. Update make clean and .gitignore to remove and ignore these additional files. Change-Id: I13cc8a3526bd7bc7c4c65cd7d2cd78b094398faa Reviewed-on: http://gerrit.openafs.org/5089 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 46b897bbaff9e7ea8ff88766ce2b3e047feeee6b Author: Ben Kaduk Date: Sat Jul 23 14:58:54 2011 -0400 FBSD: cast lkmnosys appropriately lkmnosys is a function, and as such has its own prototype which includes a named struct specific to it (struct nosys_args). When comparing its address to an entry in the syscall table, we must cast it to a sy_call_t to correctly do the comparison, lest gcc warn us about comparing distinct pointer types without a cast. This warning recently became an error due to bsd.kmod.mk, so it causes the build to fail on 8.1 and earlier, which do not use syscall_register() due to a conflicting entry for our syscall in syscalls.master. Change-Id: I606aaf73e433a50ea41adaab842d61ee69653bd5 Reported-by: Garrett Wollman Reviewed-on: http://gerrit.openafs.org/5087 Tested-by: BuildBot Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e49bf687fe548f8addb7f1282a7c23261a55c34a Author: Simon Wilkinson Date: Sun Jul 10 13:54:20 2011 +0100 util: Cleanup generation of dirpath.h dirpath.h is only copied into place if it has changed. However, this means that the timestamp of dirpath.h is never updated, causing make to always trigger the buildrule, even if the rule eventually does nothing. Instead, always copy in the new dirpath.h, which simplifies the make rules, and stops make from always building. Change-Id: I43ba9152473591c5afd9064ad6e58adda6823f11 Reviewed-on: http://gerrit.openafs.org/5084 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 18af550ef15605d13e7d5ac59fa88713262db82d Author: Simon Wilkinson Date: Tue Jul 5 09:17:53 2011 +0100 rx: Provide Get/SetThreadNum functions Provide functions to let an application manipulate the rx thread specific key, rather than letting them root around in the internals of RX themselves. Change-Id: Ic42430de7e0c0a60217a509d9b7ef9d3523463ce Reviewed-on: http://gerrit.openafs.org/5083 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2676143c035d19d02492d370382a74650b1e1496 Author: Simon Wilkinson Date: Mon Jul 4 10:03:50 2011 +0100 klog.krb5: Don't use ubik_PR_NameToID internal func ubik_PR_NameToID is a low level function which requires a large amount of setup from the caller. Instead, use pr_Initialize() and pr_SNameToId() which do all of the work in a library. Change-Id: I6b8d50c3d16eb258a4a81335790be2654c4fb191 Reviewed-on: http://gerrit.openafs.org/5082 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a40cbd7f074bc0009f4f66f72e13d6737fc285ad Author: Simon Wilkinson Date: Sun Jul 10 13:53:15 2011 +0100 ubik: ServerInitCommon is an internal function... ... so make it static Change-Id: Ia323d9ea4e35e4d3a5593df05a905191e9d951a0 Reviewed-on: http://gerrit.openafs.org/5081 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 10264a523fd78e9cd22e41feda6c5eb6f75de784 Author: Simon Wilkinson Date: Tue Jun 15 18:18:30 2010 +0100 bozo: Don't initialise variables unecessarily Don't initialise variables to NULL 3 lines before we assign malloc results to them. Caught by clang-analyzer Change-Id: Ic0f2fc56fe6ce39411c4cd48ea0a0b955b3e0f19 Reviewed-on: http://gerrit.openafs.org/5080 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ba18ea65174dd06a305e3524756aaca6ebb04e9a Author: Simon Wilkinson Date: Tue Jun 15 18:15:34 2010 +0100 viced.c: Don't store results of reads unecessarily When we don't need to store the amount of data read from a file, don't complicate the if() statement by adding a pointless assignment. Caught by clang-analyzer Change-Id: I326d894c9b5f7a89f31534c7864e05ea059a03aa Reviewed-on: http://gerrit.openafs.org/5079 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 364d1bec7458b874922f5d1e9be49f7a1f813136 Author: Simon Wilkinson Date: Tue Jun 15 18:09:53 2010 +0100 libcmd: Don't increment array then discard result We don't need to increment argv here, as we're about to return to the caller. Change-Id: I442fe741e4bda91e12375a6fe72657dc215c4e78 Reviewed-on: http://gerrit.openafs.org/5078 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e3d9821a8b34f919de9a01fa0023a691487e763f Author: Simon Wilkinson Date: Tue Jun 15 18:08:50 2010 +0100 libcmd: Don't store values that we don't need Don't store the results from cmd_CreateSyntax unless we actually need to use them for something. Caught by clang-analyzer Change-Id: I581dcc00a886245a8d117f78c74590111c75e3b0 Reviewed-on: http://gerrit.openafs.org/5077 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d61f1fcbb7c42de6164795fc07e18776afc77cf Author: Simon Wilkinson Date: Tue Jun 15 16:51:42 2010 +0100 ptserver: Don't print undefined value The readgroup utility printed the wrong variable when listing the source group - instead of printing the group name, it tried to print an arbitrary element from the list of group members. Fix it to print the right thing. Caught by clang-analyzer. Change-Id: Ie7ada8a1e881871ae5db14714ee10325ac052d40 Reviewed-on: http://gerrit.openafs.org/5076 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6cae7c554e917a26b197167e177bd3eb22bce71a Author: Andrew Deason Date: Wed Jul 20 15:33:41 2011 -0500 libafs: Remove unused volume "states" flags VResort and VMoreReps are not referenced anywhere in the tree, so remove their definitions. Keep VPartVisible for VICEP-ACCESS, but lower it to the next unused bit. Change-Id: I04c9d1c75774a55d01105acb2b5df9d2bcafa5d8 Reviewed-on: http://gerrit.openafs.org/5059 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 09d1d8575ce96ef945a4fd8a99a0347f4e258c1e Author: Derrick Brashear Date: Fri Jul 22 15:39:49 2011 -0400 aklog: check ccache errors in get_user_realm if there's an error finding the specified ccache, don't bother continuing. Change-Id: I344a06c66c426c5d14dbe08ce9da0431f095349d Reviewed-on: http://gerrit.openafs.org/5069 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 62cccc4547bd816dfffb2c1a4431c3c674d302f8 Author: Derrick Brashear Date: Fri Jul 22 14:24:08 2011 -0400 macos: avoid KLRenewInitialTickets crash in Lion the shimmed heimdal in Lion crashes on this call now. the shim also exports diddly squat. fine, we pick over what IS exported and use only calls available to us. should be exactly as functional as before. Change-Id: I6a55209b94694e8eb462bc0a4607a891b9f8b570 Reviewed-on: http://gerrit.openafs.org/5065 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 30cd8dafa73d90a943f00af05e4841699bc18534 Author: Andy Cobaugh Date: Fri Jul 15 12:06:12 2011 -0400 rpm: remove postinstall message from openafs-client Printing out information on how to configure cacheinfo and ThisCell is a bit noisy, and pam_afs.so is probably not what most people want to use nowadays. Change-Id: I103ccb39bc7bb075cffab1d980b542ea8156f0c6 Reviewed-on: http://gerrit.openafs.org/5026 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit c61f5208f553ed1674d1ae51d6e0f16fcdbba47b Author: Jeffrey Altman Date: Wed Jul 20 18:31:17 2011 -0400 Windows: do not leak space allocation smb_ReceiveNTTranCreate leaks a cm_GetSpace allocation on error. Don't do that. Change-Id: I40349826f2ab229961e3c3552f66808775f0a239 Reviewed-on: http://gerrit.openafs.org/5062 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9c2d3180aa760d2a406bb68dd84e73f7d1ec7019 Author: Jeffrey Altman Date: Wed Jul 20 18:32:35 2011 -0400 Windows: smb_ReceiveNTTranCreate path not found if the directory object cannot be found in the tree, return CM_ERROR_PATHNOTFOUND instead of crashing. Change-Id: I51458e24b5b9f16fc0378073e002d8ee160b8f15 Reviewed-on: http://gerrit.openafs.org/5061 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d3a4b6ce700509383849653fa061a87298e5258f Author: Jeffrey Altman Date: Wed Jul 20 14:21:09 2011 -0400 Windows: improve shutdown time During Windows OS shutdown the service may be given as little as six seconds to shut itself down before it will be terminated. Forced termination will leave the cache file in a dirty state. This patchset makes several minor changes to reduce the overall time required for shutdown: 1. do not wait for the IP address change notification thread. by the time it terminates the ip address has been lost. 2. send give up all callbacks earlier. 3. reorder the daemon thread waits. 4. change the daemon thread loop sleep time to 500ms in order to prevent the service from waiting up to 10 seconds for the thread to notice a shutdown is in progress. Change-Id: Ib1ff3eaf2e5116d9b3d7561670b8266e1bc5d1cf Reviewed-on: http://gerrit.openafs.org/5055 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0783b8f3821f59004146b4c34a53189ada178d70 Author: Jeffrey Altman Date: Wed Jul 20 14:18:25 2011 -0400 Windows: cm_daemonCheckOfflineVol fix When computing whether or not to perform an offline volume check it is critical that the 'lastBusyVolCheck' variable be assigned the current time instead of 'lastVolCheck'. By setting the wrong variable a new offline volume check is performed every 10 seconds which is undesireable. Change-Id: I509cde64a8b51ce1846f37047a574409ff248978 Reviewed-on: http://gerrit.openafs.org/5054 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e91f16ebb704a431f9731bb39bf9b5621b7f6ad0 Author: Jeffrey Altman Date: Wed Jul 20 14:12:42 2011 -0400 Windows: Add shutdown event log message Add an explicit message that the shutdown sequence is complete. This is necessary because during a Windows OS shutdown, the service is frequently killed prior to the memory mapped file is fully released. Change-Id: I1ad2471e1e1442d836d6abac09fc5cdd08edae0b Reviewed-on: http://gerrit.openafs.org/5053 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a1af69182b12bedd8a413d38cef9a4691286da46 Author: Jeffrey Altman Date: Wed Jul 20 14:04:57 2011 -0400 Window: breakout CM error codes into separate header Change-Id: I67be608c6cb153904fa2ca8c5ad6cbc7943064e5 Reviewed-on: http://gerrit.openafs.org/5052 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ba546ecf0c6a404f2efced2e600826621876ffcf Author: Andrew Deason Date: Thu Jul 21 13:20:54 2011 -0500 afsd: Add the -rxmaxfrags option Add an option to afsd to limit the number of fragments Rx will send/receive, called -rxmaxfrags. Change-Id: I9f0b3edd95db17f82ef8f7d1e300df4eff355172 Reviewed-on: http://gerrit.openafs.org/4899 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit beac254406d28b89d9f99967b6c1305c607959ad Author: Ben Kaduk Date: Wed Jul 20 18:11:47 2011 -0400 FBSD: in libafs, define LIBAFSNONFS Running 'make dest' will fail without this variable defined. Change-Id: I7f82cb3aeae8585c68ee60b005f4ba32d44e2104 Reviewed-on: http://gerrit.openafs.org/5058 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Benjamin Kaduk Reviewed-by: Derrick Brashear commit ee950e7ecf578bd225eec29b182f108450c5bfaf Author: Derrick Brashear Date: Thu Jul 21 20:30:00 2011 -0400 macos: krb5_524 is uselessly stubbed from MITKerberosShim-44: dummy(krb5_524_conv_principal, 0); dummy(krb5_524_convert_creds, 0); this basically logs and returns success. not helpful. so let's just not call them. Change-Id: I91e7113e6934c67129e61dfc84b7f0c4d110cea0 Reviewed-on: http://gerrit.openafs.org/5066 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45f0cbf83aed2bd534e9b43822c033ef6b4a9b1b Author: Derrick Brashear Date: Wed Jul 20 14:55:32 2011 -0400 redhat: support epel yum configs in mockbuild epel's mock is useful in terms of config, but we need to allow use of it. do so here. add centos6 at the same time. Change-Id: I781fc475389c5be56aa89041b8d22b166517a3f5 Reviewed-on: http://gerrit.openafs.org/5056 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1fc5b6e67477c6e52c311b4117ff067a60487cdc Author: Andrew Deason Date: Tue Jul 19 16:44:21 2011 -0500 Revert "afs: Use 64-bit inode numbers" This reverts commit e1e008338639d6cc0d836ff8079e6fb42021ab9e. Using 64-bit inode numbers can make AFS largely inaccessible to 32-bit programs that are not compiled with large file support, since the inode number we provide is not representable in a 32-bit struct stat. Using 64-bit inode numbers thus can break quite a few programs, and has little benefit, so don't do it. Change-Id: Ia482ac2864601b5c56a4259432529d14981f4a1a Reviewed-on: http://gerrit.openafs.org/5048 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e06931172eec5a683490040f5564b294d263dac4 Author: Russ Allbery Date: Mon Jul 18 17:13:15 2011 -0700 Add additional NEWS entries for 1.6.0pre5 through 1.6.0pre7 Taken from the release notes. Do a bit of minor combining of related issues since NEWS presents these all as changes in 1.6.0. Change-Id: I45af362948dde40772c347c9f432e59cfd86b64d Reviewed-on: http://gerrit.openafs.org/5044 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 79aedab16c36c46d7b828078079e7aa80f99490d Author: Ben Kaduk Date: Mon Jun 20 22:46:01 2011 -0400 FBSD: update to using bsd.kmod.mk We have for a long time had a cobbled-together kernel module build system that essentially copied build arguments from a kernel build in an ad hoc fashion, with lots of conditionals on architecture and OS version. (We got it wrong, several times, too.) Instead, use the supported mechanism for building kernel modules, which allows us to remove a lot of code from the Makefile and gives us some measure of future-proofing. FIXES 127578 Change-Id: Ibccea4507f57660becb4fb39a57b50c15ea4cb07 Reviewed-on: http://gerrit.openafs.org/5042 Reviewed-by: Garrett Wollman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 1ec64ba50ea8d691cfb126dd40a11370ed37b433 Author: Ben Kaduk Date: Sun Jul 17 16:24:12 2011 -0400 libafs: switch to hardcoded source names with CRULE Most of the userspace tree uses AFS_CCRULE for how to compile things. We cannot use this directly for libafs, since in the general case kernel and userland code may need to be treated with an entirely different compiler and compiler options. Switching libafs fully to a (e.g.) LIBAFS_CCRULE would be a substantial amount of work, and require a lot of testing. However, we can stop passing -c $? (the out-of-date sources) in CRULE_{NO,}OPT and add the source file after each invocation of the CRULEs, an incremental step towards LIBAFS_CCRULE. This has the extra advantage of not causing issues when integrating with kernel module build systems that automatically add dependencies to all object file targets. (In such cases, $? expands to multiple files and 'gcc -o foo.o -c' bails out.) Most of this change was automatically generated from the following awk script: ========== /[a-zA-Z_0-9].o:/ {path=$2;} /^ \$\(CRULE_/ {print $0,path;} !/^ \$\(CRULE_/ {print;} ========== Change-Id: I22b8eeaee730feb37b2527d44d6548e7b13b9a0a Reviewed-on: http://gerrit.openafs.org/5040 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4356fcbb5b5dd1b5ff2098388d0e70214a5fe898 Author: Simon Wilkinson Date: Mon May 23 07:40:14 2011 +0100 vlserver: Handle logging of non-rxkad classes Expand the 'rxinfo' function so that it is not rxkad specific, and add the framework to allow other security classes to be added to it. Change-Id: Idb514be6aafbc69154a7aba4b0ece3330b8b3aed Reviewed-on: http://gerrit.openafs.org/5031 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 9376f75beca80af69c5437de4023c32646e702b8 Author: Simon Wilkinson Date: Fri Jul 15 11:50:09 2011 +0100 tests: Fix error in man check specification The kas manual test is kauth/kas-man, not kauth/kas Change-Id: I714cbbf78af7f8e99ec52d9c0f173df3f6ae18c5 Reviewed-on: http://gerrit.openafs.org/5030 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f02c3d40cb25d5d7b0c184a6822a21e1ddebf4d5 Author: Simon Wilkinson Date: Tue May 31 09:30:41 2011 +0100 tests: Add tests for the vlserver Add some very simple vlserver tests Change-Id: I862d3a86857dc70f0421f4887d1fc4d047c57909 Reviewed-on: http://gerrit.openafs.org/5029 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e798bcaf97c3ad1b464e29482cb29074cbbf33d6 Author: Ben Kaduk Date: Mon Jun 20 22:35:08 2011 -0400 FBSD: use better casts in vop_advlock In the bsd.kmod.mk world, the compiler bails when we cast a pointer directly to int. Cast through intptr_t as the supported mechanism. On amd64, this loses bits, but since this instance is just attempting to use the value as a unique handle, it is probably okay for now. However, it should be addressed more properly eventually, when this locking implementation sees wider use. Change-Id: I4fe8084c14a97dc4efc8d74e9971b1540c028e40 Reviewed-on: http://gerrit.openafs.org/5034 Reviewed-by: Matt Benjamin Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 135b41ec7e446aee6276854effa0900cc7a58a2a Author: Ben Kaduk Date: Sat Jun 25 00:33:41 2011 -0400 FBSD: Use correct path for ufsmount.h include The two lines above it already used correctly. In the bsd.kmod.mk world, this will let us get rid of some more symlink hackery in libafs, since the system's '@' symlink will point to the system headers directly. Change-Id: I97dd779c2c7a119f51972b02e185a17264911151 Reviewed-on: http://gerrit.openafs.org/5036 Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d10f62a7e7221b86e6b336cae936ecbc9485fb94 Author: Ben Kaduk Date: Mon Jun 20 22:36:39 2011 -0400 FBSD: cast pointers appropriately Since the bsd.kmod.mk build uses -Werror. Change-Id: I4bc34477a36ae8946272c1830080ddd9add5cd00 Reviewed-on: http://gerrit.openafs.org/5035 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 037f3251cd8fa318ad8320a061368efedc480c37 Author: Ben Kaduk Date: Mon Jun 20 22:34:41 2011 -0400 FBSD: Remove include directive for nonexistent file In the bsd.kmod.mk world, this becomes a fatal error. Change-Id: I14315982fac48bf392d9f3a06422f5c4707bc3b9 Reviewed-on: http://gerrit.openafs.org/5033 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9d3d4b30af5fe40fa84b8bedec71dab04bee15ab Author: Simon Wilkinson Date: Sat Jul 16 09:07:57 2011 +0100 Fix broken make dest rules Commit ffb6864f0f60113d125527feacbd6d20a8121e2d is missing some semi-colons in assorted dest rules, which breaks the make dest target. Change-Id: Ie6f88878604f1043256f1683e1d228e16d568f50 Reviewed-on: http://gerrit.openafs.org/5037 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45025e949bba0244d51e406b9105fb14bcba902d Author: Michael Meffie Date: Thu Jul 14 12:02:21 2011 -0400 audit: remove uneeded strncpy In this caller to krb_realms, when no realms names are returned the number of local realms is correctly set to zero, however the first local realm buffer is filled with a placeholder string which is not used. Remove the uneeded strncpy, which also makes this section of code consistent with afs_is_foreign_ticket(). This section of code is duplicated by afs_is_foreign_ticket() and should be consolidated in a subsequent patch. Change-Id: I48f84934e7321769eebaf80c83b2c100fd026a6a Reviewed-on: http://gerrit.openafs.org/5020 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 607c0aaaa438414a64e8201c34cccc2c28cabf72 Author: Andrew Deason Date: Tue Jul 12 00:11:17 2011 -0500 UKERNEL: Avoid using parameters named "new" Alter the prototypes in afs_usrops.h to avoid using the name "new", in order to make the header usable by C++ code. Change-Id: I21165b5c1e33e9229172d9f8e797d65fc954bb77 Reviewed-on: http://gerrit.openafs.org/5038 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit df4843c4b1f3aebf32dcb28560b259826e9dbb9a Author: Garrett Wollman Date: Wed Jul 13 14:20:17 2011 -0400 util: clean up two #ifs Use defined(...) in two instances to avoid warnings. Change-Id: I0a574283e2384c7cfb2f58884570e78e3fed3bc6 Requested-by: Simon Wilkinson Reviewed-on: http://gerrit.openafs.org/5005 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1f181307d5c90bd46bed0eb4a6e97fd96531c5c6 Author: Garrett Wollman Date: Fri Jul 15 01:00:28 2011 -0400 util: try again to satisfy the gatekeepers Apply a two-clause BSD license to src/util/pthread_threadname.c. Note that the claim of copyright in this file refers to the derivative work consisting of the original code combined with the text of the license. Change-Id: Id75badee03cb85a23778088aa9cb49d8c92eb5d0 Reviewed-on: http://gerrit.openafs.org/5025 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit ffb6864f0f60113d125527feacbd6d20a8121e2d Author: Simon Wilkinson Date: Fri Jul 15 17:14:27 2011 +0100 Make --enable-pthreaded-ubik do what it claims The configure help text for --enable-pthreded-ubik says "enable installation of pthreaded ubik applications" This patch set makes the behaviour in the code match that. Instead of controlling whether the pthreaded ubik code is compiled at all, the configure option now just controls whether it is installed. This means that we'll always build the pthread code, and so should reduce the number of times it is inadvertently broken. Change-Id: I8b2ffb46e01157f2043cf7daf68e69580ea285c5 Reviewed-on: http://gerrit.openafs.org/5028 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f56f2731552ca4dc5f5e476c1e8db14f035ec060 Author: Simon Wilkinson Date: Fri Jul 15 14:06:14 2011 +0100 Fix pthreaded ubik dest and install rules Fix the dest and install rules for pthreaded ubik, and its servers, so that they match the current Makefile style. Change-Id: Ifd3bd181772e278518f2a90167b6524d6045645c Reviewed-on: http://gerrit.openafs.org/5027 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 20a2422c1479476acd407bae9345ea6482aeca3b Author: Andrew Deason Date: Thu Jul 14 14:53:00 2011 -0500 util: Include pthread.h in afsutil_prototypes.h afsutil_prototypes.h can reference pthread_t when we are in AFS_PTHREAD_ENV. So, include pthread.h to guarantee we get the definition for pthread_t. Change-Id: Ib46c2cf3b3fdd2dcd61a7b8ac4d5512fecd084ff Reviewed-on: http://gerrit.openafs.org/5023 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit b6d05986f0c79bdf54169fc7b209b137c0e63a39 Author: Ben Kaduk Date: Thu Jul 14 15:49:40 2011 -0400 Install afszcm.cat for i386_fbsd make dest Because we missed it in gerrit/4815. Change-Id: I653c4259a0bbe926abac80c09e32ff3bc35f2de2 Reviewed-on: http://gerrit.openafs.org/5022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e2980f3d70bc61cc9a89b65499798193c011ec75 Author: Derrick Brashear Date: Wed Jul 13 22:43:40 2011 -0400 volser: remove pragma requiring ultranew gcc this won't fly with the gcc in the field most places. move along. Change-Id: I54de25c4986e574ca5b34b850807b10374d9d8ad Reviewed-on: http://gerrit.openafs.org/5013 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a76e65034cf3feadfe2af5a20ddae705fda00aa0 Author: Marc Dionne Date: Wed Jul 13 20:56:53 2011 -0400 Linux: remove unused variable endindex is not used, remove it Change-Id: I50a89e3f25828c05fd24f4fc6a1068007a68dbc2 Reviewed-on: http://gerrit.openafs.org/5012 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 4b9ad1b56ecc9c81aafe54331121435d3ca18fdb Author: Michael Meffie Date: Tue Jul 12 15:51:33 2011 -0400 tests: fix cmd test case Fix a build error in the cmd tap tests. Change-Id: I757c5b508784fd938b70ca3829130275707dd39a Reviewed-on: http://gerrit.openafs.org/4975 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 0e4c227d62c30247cb09e40567b096ce0f3cbb57 Author: Simon Wilkinson Date: Wed Jul 13 14:44:39 2011 +0100 rxkad: Suppress warnings for ticket5.c rxkad's ticket5.c includes v5gen.c, a generated file from Heimdal. This file contains a load of set-but-unused variable warnings. As we currently have no way of portably suppressing just these warnings, turn off warnings-as-errors for ticket5.c Change-Id: I739cee4f345523fce130c73c713c7309273f5bee Reviewed-on: http://gerrit.openafs.org/5003 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6840d8dfb80d9ae3888171520304a021caef9fe5 Author: Simon Wilkinson Date: Wed Jul 13 14:42:11 2011 +0100 volser: fix set-but-unused variable warning restorevol reads the magic number from the dump, then does nothing with it. Rather than not reading it at all, just mark the variable that it is read into as unused to supress the compiler warning. Change-Id: I371e2556e3661836f6256fac255ae79005d9ffaa Reviewed-on: http://gerrit.openafs.org/5002 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 130155ff3c48f2da2433b359588346b4438d24a2 Author: Jeffrey Altman Date: Wed Jul 13 08:15:04 2011 -0400 Windows: not safe to dereference before locking Throughout cm_server.c, input parameters to functions that are protected by cm_serverLock are dereferenced by assignment during variable initialization prior to the cm_serverLock being obtained. As a result there is a race which can result in either list corruption or dereferencing freed memory. Change-Id: I4fa42b9ae0af5eb7c44ea868b4ea6ca9e4e0bb92 Reviewed-on: http://gerrit.openafs.org/4985 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 30d68e6934810e3cfc67518d36cb8be26d6542b8 Author: Jeffrey Altman Date: Fri Jul 8 09:49:51 2011 -0400 Windows: ChangeLog for 1.5.9907 Change-Id: Ie6eb2ed4c9e4c3a9e8250c3946d0a060834610b6 Reviewed-on: http://gerrit.openafs.org/4954 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit beda3b239a13903d4bcd9a5d91d5ff562962cb5a Author: Simon Wilkinson Date: Wed Jul 13 14:35:48 2011 +0100 vol: Initialise list before error exit when cloning The inode list wasn't being initialised before the first call into the error handler. This makes it possible that we end up trying to discard items from an uninitialised list, with all the chaos that would cause. Fix things so that this list is correctly set up. Change-Id: I5dbc33e2e1a9a4ca1bdf4b2f7e56f33af87ccc1a Reviewed-on: http://gerrit.openafs.org/5001 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f Author: Simon Wilkinson Date: Wed Jul 13 14:33:57 2011 +0100 volser: Actually return errors from ListOneVolume The return code from GetVolInfo was being thrown away, and success returned to the caller, regardless of the success of this function. As GetVolInfo's exit codes aren't suitable for sending over the wire, just return ENODEV if this function returns failure. Change-Id: Ie4adbbd98f5006a9aa50ed9bf73ea9e4344fabf3 Reviewed-on: http://gerrit.openafs.org/5000 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9bb81711a545122bba36c525095aebfe52e73168 Author: Simon Wilkinson Date: Wed Jul 13 14:31:15 2011 +0100 Mark nearInode as unused When we're building an inode fileserver, we use the nearInode hint. The IH_CREATE macro just throws this hint away if we're building namei, which leads to compiler warnings about set-but-unused variables. Just flag nearInode as being potentially unused in order to suppress these warnings. Change-Id: I25022dc859974e9311e4530a9eeee8ab1d77c373 Reviewed-on: http://gerrit.openafs.org/4999 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85b8372b44036f4e10cb30e9dbdd572700d10aaa Author: Simon Wilkinson Date: Wed Jul 13 14:23:22 2011 +0100 Don't split int64s when we don't need to Now that we're always using an int64, and never a hyper_t, to represent 64bit integers, we can just print them out and assign them using the native tools, rather than having to call SplitInt64. Simplify our code to do so, which also avoids some gcc-4.6.0 warnings. Change-Id: I12cfb5401d0431be2a4fefdfc5e1f52df7d5764d Reviewed-on: http://gerrit.openafs.org/4998 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8df379696ca6303cd2e4cd3eed34e4552725853b Author: Simon Wilkinson Date: Wed Jul 13 14:03:59 2011 +0100 afsio: Remove unused 'code' value main always return 0, so don't bother getting an exit value back from cmd_Dispatch that we have no intention of doing anything with. Change-Id: I0085adbfdb886d89acc7f4203ddb6f7a10281dfc Reviewed-on: http://gerrit.openafs.org/4997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 093b5108a37576762e424a33d2254edab0ac0b60 Author: Simon Wilkinson Date: Wed Jul 13 14:02:54 2011 +0100 uss: Remove unused variables Remove assorted unused variables, both those used to capture error returns, and so unused (but initialised) string pointers, to make gcc 4.6.0 happier. Change-Id: I8cdcfb7175b48c79ce2b1a312d6a5fe6ab5c1989 Reviewed-on: http://gerrit.openafs.org/4996 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 96b4f4be970b16238aba84be7dcef9f5c09c3496 Author: Simon Wilkinson Date: Wed Jul 13 14:02:03 2011 +0100 scout: Remove unused error codes Remove unused error returns, and make gcc 4.6.0 a little bit happier Change-Id: Ic1fe541ed860a739ac3e2aa2978cbb8b92ec1a8d Reviewed-on: http://gerrit.openafs.org/4995 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d6b1573995120cc8167bb87032274e04bd918880 Author: Simon Wilkinson Date: Wed Jul 13 14:00:30 2011 +0100 libadmin: Remove unused error codes A number of functions in the libadmin vos implementation set up error values, and assign them to 0, but never actually use them for anything (either further assignment, or returning to the user) So, just remove these unecessary variables, and make gcc 4.6.0 a little happier. Change-Id: Ia4a4a7d8cda855d904f2a84092928f227ea83f3b Reviewed-on: http://gerrit.openafs.org/4994 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa71561e493003585e977bdf0e513b0979319a72 Author: Simon Wilkinson Date: Wed Jul 13 13:59:05 2011 +0100 bozo: Remove unused error codes assignments This removes a couple of unreported error code assignments. Firstly, the return from 'setsid' was being assigned to 'ec' and promptly ignored, and secondly, the response from SendNotifierData was being ignored. As there is nothing sensible to do with these error codes, just ignore them properly. Change-Id: Ifff8c7b5b7950e467570d26ce5f92fe5f11a51e9 Reviewed-on: http://gerrit.openafs.org/4993 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 00061610b9db83ca9510e485e49379eeb6f9e082 Author: Simon Wilkinson Date: Wed Jul 13 13:57:12 2011 +0100 afsmonitor: Fix set-but-unused variable warnings Tidy up the afsmonitor code to remove gcc 4.6.0's set-but-unused variable warnings. These are all assignments to error code values which are never checked, or reported. Change-Id: I8d48a6defe848d7cf477ac747aa330fc8ed1b276 Reviewed-on: http://gerrit.openafs.org/4992 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cd8ebb14e59e58bf3c76815d22f3b796faee3827 Author: Simon Wilkinson Date: Wed Jul 13 13:55:39 2011 +0100 libafs: Remove support for length optimisation At one point afs_StoreAllSegments had an optimisation to speed up stores. However, that optimistation used the chunkLength without taking appropriate locks, and was disabled. The variable assignments which still exist from this code cause errors with gcc 4.6.0, so just remove them. Change-Id: I86547d94280d7f07214fbf6ef5b3db61c9781e59 Reviewed-on: http://gerrit.openafs.org/4991 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6a03341df67e8330f6f801deb3a70e529cedb2a6 Author: Simon Wilkinson Date: Wed Jul 13 13:54:52 2011 +0100 libafs: Fix warnings in PPrefetchFromTape The PrefetchFromTape pioctl had a number of set-but-unused variable warnings. Tidy up the code to remove these warnings. Change-Id: I358f7e31ab8e9f03447675be40dc8571650dbe72 Reviewed-on: http://gerrit.openafs.org/4990 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4e9a49c58aa1a6c910b01fe995739d0852c75dd4 Author: Simon Wilkinson Date: Wed Jul 13 13:53:08 2011 +0100 libafs: Fix statistics for PrefetchFromTape pioctl The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give it a slot of its own. Change-Id: I5698f8861af1b5e9771d138ca93a28f676df349b Reviewed-on: http://gerrit.openafs.org/4989 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit beaf9a4e3e39af87cda4f312917f09974b51a5ef Author: Simon Wilkinson Date: Wed Jul 13 13:48:07 2011 +0100 libafs: Remove unused DNLC LRU code The LRU code in osi_dnlc_lookup has never been enabled in OpenAFS, and causes compilation errors with gcc 4.6.0 - just remove the unused code and its associated variables. Change-Id: Ifc09bbb857406b9bfcbf436c35e36289567f65cf Reviewed-on: http://gerrit.openafs.org/4988 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 37f41897fb9d28e32c8def34790d653ef585400f Author: Simon Wilkinson Date: Wed Jul 13 13:45:33 2011 +0100 libafs: Remove unused NAT markeddown code Remove unused code which used to retry once when a server was marked down due to a bad NAT. This code has never been enabled in OpenAFS, and causes compile errors with gcc 4.6.0 Change-Id: Idc978a68e81ccb761117c97200607e30c98627dc Reviewed-on: http://gerrit.openafs.org/4987 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8adf4cd0b0ae319b9610cd5caad050f973200ca7 Author: Garrett Wollman Date: Mon Jul 11 06:31:41 2011 -0400 util: introduce a common interface for setting thread names A previous change added support for setting thread names/titles to viced; this change moves the #ifdef spaghetti to src/util in preparation for calling it from other places where it would be useful. Two functions are defined, one for setting an arbitrary thread's name (as might be done by the spawning thread) and one for setting the current thread's name; the latter is also defined as a macro for non-pthreads compilations so that it can be called unconditionally (the interface does not reference any pthread-specific data types). Note that some platforms, Mac OS X in particular, do not allow setting the name of a different thread. The two functions are defined as no-ops for Windows as our pthreads emulation layer for Windows does not provide the needed mechanism. Make viced use the new interface. Change-Id: I58c65a28772d8d188c03d6ff3a6f052889362fb7 Reviewed-on: http://gerrit.openafs.org/4966 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 470bab9d564a7be8cdaf808c3d8dda3457821b2f Author: Simon Wilkinson Date: Wed Jul 13 14:46:00 2011 +0100 Add PERLUAFS to libuafs's git ignore Change-Id: I0067ba4c9b4f2b57ded862bc5cfe33a2c419d108 Reviewed-on: http://gerrit.openafs.org/5004 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f775c0fb6f9191dcf5d226bfddbf82f52cd1116c Author: Simon Wilkinson Date: Wed Jul 13 11:53:57 2011 +0100 Add make dist and make srpm targets Add targets to generate distribution tarballs, and srpms, from a tree. These will generate packages for whatever the current HEAD of the tree is - if the HEAD is a release tag, then the packages will be named for that release, if the HEAD is between releases, then git describe will be used to create an appropriate version identifier. The tarballs are generated from the current git repository contents, anything not checked in will not be included. Change-Id: Ic5cde2382f973a004406e0ef0f09708d0ba0ad5f Reviewed-on: http://gerrit.openafs.org/4984 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6a27e228bac196abada96f34ca9cd57f32e31f5c Author: Simon Wilkinson Date: Tue Jul 12 17:58:16 2011 +0100 rpms: Use git version information Use the git version information when building RPMS, rather than hard coding it into configure.ac. Change-Id: I477629b4102f48a9669ff67aae429c08862a5afc Reviewed-on: http://gerrit.openafs.org/4983 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4470d849ec731c97dd2fb02dc6cbfe777949b510 Author: Derrick Brashear Date: Tue Jul 12 13:46:53 2011 -0400 macos: note additional vfs features currently we have inode numbers which do not change. note it. additionally, we support large files. note it. Change-Id: I77090d3ccc3ba9952e14f2be13946ef2e91a6af7 Reviewed-on: http://gerrit.openafs.org/4973 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8bface302c14698a14b7b988e1a7714e84415c04 Author: Ken Dreyer Date: Thu Jul 7 08:55:51 2011 -0400 Red Hat: update build script for newer Fedora versions Remove old Fedora versions and add the currently-supported ones. Change-Id: Ib514328cf944ea601028fb99273046cb2f5ea828 Reviewed-on: http://gerrit.openafs.org/4925 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2d794a5e5d8154b096596f45bed93cc41b36005a Author: Antoine Verheijen Date: Fri Jul 8 11:47:39 2011 -0600 Remove pre-existing assert macro in hcrypto header. The config.h header for hcrypto defines an assert macro for use by RX. OpenBSD already has an assert macro definition so this new one causes screaming by the compiler about re-definition. This patch adds the directives to remove any pre-existing definition of assert, if one exists, prior to defining the new one. Change-Id: I01d5a1f26617fecfd0ffcc3930a7c7881beb8183 Reviewed-on: http://gerrit.openafs.org/4958 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 02aa30893f79b0a3d3ed75da987e20d48071c5df Author: Michael Meffie Date: Mon Jul 11 15:45:11 2011 -0400 salvager: do not redefine SalvageVolumeGroup Do not use the c preprocessor to redefine the SalvageVolumeGroup() function name. Change-Id: I3d48ee28dc03be702d0427d74725ff1e99ec6411 Reviewed-on: http://gerrit.openafs.org/4965 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5ec998a016ffcbb1e88bd4eb3b12b3735a0c0cca Author: Derrick Brashear Date: Tue Jul 12 13:37:56 2011 -0400 macos: fix shlib link list link shared libs from the right place, lib not etc Change-Id: I3d58d1f65b479b7c23c1bb0978eacea99b114541 Reviewed-on: http://gerrit.openafs.org/4971 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84a3c4714fce3c1722802963e1fcc4d7dad8cc55 Author: Simon Wilkinson Date: Tue Jul 12 01:45:10 2011 +0100 rpms: Fix handling of x86 architectures Once upon a time, our specfile would assume that if you were building for i386 you were building userspace, and that i586 or i686 implied doing a kernel only build. This is no longer the case, and now everything on modern Fedora is built for i686, so we should adapt the spec file for this. Change-Id: Ia56b9b15d0b28672a8411417d38937ed45ee93a1 Reviewed-on: http://gerrit.openafs.org/4970 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 15c073887b905adaef301863ed87c49f9d77b394 Author: Simon Wilkinson Date: Mon Jul 11 20:21:17 2011 +0100 rpms: Fix our %version handling When we're doing version requirements in -devel package Requires: lines, we should be using %{version}-%{release}, not just %{version} FIXES 130137 Change-Id: I2d10c6fa362d3cbfa786c270996fa8ae75b9db20 Reviewed-on: http://gerrit.openafs.org/4969 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 82e772bed034ea278e7a7a1b4422d75cc14576dd Author: Michael Meffie Date: Tue Jul 12 08:15:31 2011 -0400 salvager: check namei linktable header magic Recreate the namei linktable file if the header magic is bad. Change-Id: I1e8c2d101cf1dd1d375a965684d95f6708e8c601 Reviewed-on: http://gerrit.openafs.org/4968 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 27af8b4b537236d8c678465d034721dd220641c8 Author: Jeffrey Altman Date: Mon Jul 11 23:49:58 2011 +0100 Windows: always open dscp in smb_ReceiveNTTranCreate There were two code paths in smb_ReceiveNTTranCreate that included asserts in case the directory cm_scache_t object had not been evaluated. RT129299 contains a report that at least one of them had been tripped in production. There is no reason to avoid evaluating the directory scp. It must exist in the cache and obtaining a reference in all cases simplifies the logic of this overly complex function. FIXES 129299 Change-Id: I7b32c81f11c3fef53f8a21a44f3594d5cd9e1552 Reviewed-on: http://gerrit.openafs.org/4967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ee05a1b086cf0613b340da9d977658e309981ea3 Author: Garrett Wollman Date: Fri Jul 8 00:09:43 2011 -0400 viced: If platform supports setting a thread title, do so Some pthread libraries support setting a name or title for individual threads (analogous to setproctitle() for processes). This can be useful for debugging and is sometimes published for use by utilities like ps (again like setproctitle() for processes). The two most common variants of this have the same signature with slightly different function names. If either one is present, use it in viced (which already assigns a thread name when compiled for LWP but ignores it in pthreads compilations). Change-Id: I5486aa6a21dbc3c8885b94ad52c2b1a66baae81f Reviewed-on: http://gerrit.openafs.org/4950 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 52fee7140325d905f01798d7c5724744b606ac06 Author: Jeffrey Altman Date: Mon Jul 11 00:19:17 2011 +0100 Windows: Move file server lock releases to daemon Create a new lock daemon thread which performs regular cm_LockCheck() calls. If a lock is deleted check the cm_scache_t to see if the matching file server lock should be dropped. If yes, drop it. This effectively caches file server locks for two seconds after they are released to provide a chance for subsequent local lock requests on the same file to avoid a file server RPC. It also ensures that windows processes do not thrash the file server and force callback breaks. Change-Id: I1c452e231ff282d9b45026aed1b02ab0c5932a77 Reviewed-on: http://gerrit.openafs.org/4964 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1accef4e77c8cad518d728d15fbd194bebd49f33 Author: Ken Dreyer Date: Thu Jul 7 10:39:10 2011 -0400 Red Hat: use repoquery to find kernels in build script Remove the custom yum Python code in favor of repoquery. Change-Id: Ifb185297666e5365974c342814ed3c2d2a54092e Reviewed-on: http://gerrit.openafs.org/4926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3559e5c8edd90ffb17e8f3b722ff014654bae336 Author: Antoine Verheijen Date: Fri Jul 8 11:13:59 2011 -0600 OpenBSD: Add header for On OpenBSD, the header requires the TAILQ_* macros which are defined in . The latter is not automatically included by . This patch makes sure that it is available by putting it into the OpenBSD-specific param.h files (so as not to impact any other OS). Change-Id: I8281b085eed2a6dec1f096ad9a6e96078c1e4af0 Reviewed-on: http://gerrit.openafs.org/4956 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53434c828d0fed96a90e8f984460c323282c4d7b Author: Garrett Wollman Date: Fri Jul 8 22:40:27 2011 -0400 viced: indent nested preprocessor directives Make viced.c look more like other source files by indenting nested preprocessor directives. In a few case it made more sense to eliminate the nesting. This should otherwise be a whitespace-only chnage. Change-Id: I895ea2f754f90a15daa73cea24d3da9576fff9c9 Reviewed-on: http://gerrit.openafs.org/4959 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 99b43273c0203881ea3d2d50f0abf000cdc0b03e Author: Jeffrey Altman Date: Sun Jul 10 03:43:45 2011 +0100 rx: prevent connection channel assignment race When rx was converted to use pthreads, the code that allocates a call to a connection channel in rxi_ReceivePacket() was not made thread safe. The code prior to this patchset permitted a race in the server connection case. The rx_connection channel assignment in rxi_ReceivePacket() and the call destruction in rxi_FreeCall() and rxi_DestroyConnectionNoLock() did not consistently protect the rx_connection channel array using the conn_call_lock. This race could result in rxi_ReceivePacket() operating on a rx_call which was disconnected from the previously assigned rx_connection. In addition, the code in rxi_ReceivePacket() that was intended to protect the allocation of a call using rxi_NewCall() to the connection channel array was racy with itself. This patchset consistently applies the conn_call_lock to protect the allocation / deallocation of calls to the connection channel array and in the process simplifies the logic in rxi_ReceivePacket() as it is no longer necessary to protect against a null call pointer since the race can no longer be lost. Change-Id: Id61b55b4d1d57a2b9b35ea942545ef4bdc8d33f3 Reviewed-on: http://gerrit.openafs.org/4963 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 88b4e2e52799cfa5999cbc22873407ec8b77766a Author: Jeffrey Altman Date: Sat Jul 9 15:29:05 2011 +0100 windows: include cmp_Cmd_Ref_3_en_US component when building installers actually include the html 3 man pages Change-Id: I03e47d24fa79c888dc49a9dba7e0388dafe6ce59 Reviewed-on: http://gerrit.openafs.org/4961 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da6c97678f530ca76334613e229337a75f94e297 Author: Jeffrey Altman Date: Fri Jul 8 15:27:22 2011 -0400 Windows: out of order lock smb v3 locking Do not obtain the smb_rctLock after holding the cm_scache_t->rw lock. At most one hold is required in case of lock failure. Obtain it as the start of processing and drop it at the end if not required. Change-Id: I370321b087df480336c833d68e348d7f62d227b3 Reviewed-on: http://gerrit.openafs.org/4955 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3505c444f681c8bfed3638b7393f3f40449492b5 Author: Andrew Deason Date: Fri Aug 14 16:32:54 2009 -0500 Add AFS::ukernel libuafs perl bindings Add the SWIG-generated AFS::ukernel perl module, which provides perl bindings to libuafs calls. Change-Id: I5ce480944a8c97cbca72c80e79fc40c0edb0962f Reviewed-on: http://gerrit.openafs.org/2048 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bbd505a8e191f69179f8dc245e0d7f96310db275 Author: Andrew Deason Date: Fri Jan 21 17:38:24 2011 -0600 Add afsload Add afsload, a set of scripts used to synchronize the activity of numerous libuafs cache managers for testing/simulation purposes. Change-Id: I6f797d5968ea4ba3c29c1b13251f743c7d02d60d Reviewed-on: http://gerrit.openafs.org/4906 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 21edc432dcbb8b14c0a40feb2ea5de1bc0ae81f6 Author: Andrew Deason Date: Fri Feb 4 16:23:30 2011 -0600 doc: Add support for section 3 man pages Generate and install man pages (and their HTML versions) for library reference documentation in section 3. Change-Id: I500818097c6880e0412794661393351ab14461dc Reviewed-on: http://gerrit.openafs.org/3898 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6548cedbee4ea3e0f1769075717a3c05a5a0127f Author: Andrew Deason Date: Tue Sep 22 15:45:09 2009 -0500 Add documentation for AFS::ukernel Add some documentation explaining some of the minor quirks in AFS::ukernel; specifically how some functions look a bit different than in plain libuafs. Change-Id: Ib8b18720c3fa6087de98d58ba8381f1ae4fb2f10 Reviewed-on: http://gerrit.openafs.org/3902 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 21854e03eb6fe70a70ea5fecde5c4ef8074e28c9 Author: Jeffrey Altman Date: Wed Jul 6 18:37:02 2011 -0400 Windows: Improve logging for StoreMini and cm_BufWrite Add trace logging to cm_StoreMini which never had it before. Improve the logging of cm_BufWrite by adding the trucPos value which is the new length of the file that is being reported to the file server. Remove cm_buf_t data references when cm_BufWrite is performing operations using rx_Writev and iovec structures. Change-Id: I28798eb2232e739f665eb51499305a7a1898f824 Reviewed-on: http://gerrit.openafs.org/4924 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ac219f537f75ac5835f750d4c9e5f4dc684c2de Author: Jeffrey Altman Date: Wed Jul 6 18:34:05 2011 -0400 Windows: Refactor cm_Unlock*() to avoid code duplication cm_Unlock() and cm_UnlockByKey() duplicate a significant amount of code. Refactor it into a new static function, cm_IntUnlock() which handles the process of downgrading or releasing a file server lock depending upon the lock state of the cm_scache_t object. Change-Id: Ic5db7b3928fc0477f155183326321717ea04ace0 Reviewed-on: http://gerrit.openafs.org/4923 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1a56229910a67cc782959beb45f56d244d6b3c4f Author: Jeffrey Altman Date: Wed Jul 6 18:19:31 2011 -0400 Windows: Do not probe new servers from cm_UpdateVolumeLocation cm_NewServer() can result in a call to cm_UpdateVolumeLocation() if a server probe is performed. In order to avoid recursive calls to cm_UpdateVolumeLocation() do not probe new servers from within cm_UpdateVolumeLocation(). Change-Id: Icdb8efe030ae3e1f714ca72ad741bd38c692697f Reviewed-on: http://gerrit.openafs.org/4922 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e1e008338639d6cc0d836ff8079e6fb42021ab9e Author: Andrew Deason Date: Wed Jul 6 15:22:38 2011 -0500 afs: Use 64-bit inode numbers When we have a 64-bit ino_t, use the full 64 bits, instead of always limiting ourselves to 32 bits. Change-Id: I8f9f552b230e1723c8b77bfe92213ca43816240c Reviewed-on: http://gerrit.openafs.org/4921 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2dc7ee2757f6d2ac7c2ff21ec4a9936719e884b5 Author: Andrew Deason Date: Wed Jul 6 14:21:53 2011 -0500 afs: Consolidate afs_calc_inum Instead of having two separate afs_calc_inum functions, just have one afs_calc_inum, and split off the md5 inode code into its own function under a LINUX20 ifdef. Change-Id: I400d2e70403905da40055238ffc2bb785659e9e0 Reviewed-on: http://gerrit.openafs.org/4920 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3a33ce4a336223ac8aebe2fc24fd69459ab9e9db Author: Andrew Deason Date: Wed Jul 6 16:23:23 2011 -0500 afs: Use afs_calc_inum everywhere The algorithm for calculating inode numbers was copied in several places in libafs. Make them all use afs_calc_inum instead. Change-Id: Ie835a0b92bf940b78090fd7ca4e36aace1df9767 Reviewed-on: http://gerrit.openafs.org/4919 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 42943aead4db2bdf9b8ec01c3917eb1c9ac9eb76 Author: Andrew Deason Date: Wed Jun 22 14:39:39 2011 -0500 afs: Use cell for md5 inode numbers When calculating the inode number for a file with md5 inodes, include the cell number in the calculation, in order to reduce collisions between cells. Change-Id: I4b939042dd993419f785a78e87e68cf346b56e26 Reviewed-on: http://gerrit.openafs.org/4902 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 0a51946f7c5ca499e305f10c4c1c6cd556dbd1a7 Author: Andrew Deason Date: Tue Jul 5 17:13:57 2011 -0500 uss: Suppress more warnings from lex.yy.c Specify -Wold-style-definition when compiling lex.yy.c. This allows us to compile when --enable-checking is specified and our lex generates code with old-style function definitions. Change-Id: I09c87fd6274b5850952a8aaf63f0e3358100d567 Reviewed-on: http://gerrit.openafs.org/4905 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 39083fe1edab784fcd75eacbdaaf7f6affa14c9f Author: Andrew Deason Date: Wed Jun 22 13:44:38 2011 -0500 afs: Ensure afs_calc_inum yields nonzero ino afs_calc_inum can currently yield an inode of 0 if MD5-based inode numbers are turned on. Some userspace applications (and for some platforms, maybe even the kernel) make certain assumptions about the inode number for a file; in particular for example, 'ls' will not display a file with inode 0 in a normal directory listing. So, read the md5 digest until we get a non-zero result. Fall back to the non-md5 calculation if we still somehow end up with a 0. While this case may at first glance seem to be extremely rare, in practice it can occur, as the current calculation for volume 538313506, vnode 26178 does actually yield a 0. Change-Id: Iee1ef4cc2ad66269f2c677e29d586ef0964d7c70 Reviewed-on: http://gerrit.openafs.org/4901 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 34bdd979fc487843c26f15655b94eac7c8f98fee Author: Anders Kaseorg Date: Tue Jun 14 15:24:42 2011 -0400 Treat Linux 3 as Linux 2.6 Linux 3.0 is just a rebranded Linux 2.6.40, so we can use the same sysname and the same code. Change-Id: I154334dc5b73980a0d9b8abd9fd6645994f63829 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4843 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit cdd9f78f058f6d6c67d52d8b28a66f24065702d9 Author: Andrew Deason Date: Wed Jul 6 12:33:53 2011 -0500 Add a few missing .gitignore entries Change-Id: Ibe1498c504defc0e1779b8764c091a98576a588a Reviewed-on: http://gerrit.openafs.org/4904 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78e39417af6d2b87f0cbda0b5d3bb3e4859dc0ba Author: Andrew Deason Date: Fri Jul 1 16:58:06 2011 -0500 vol: Don't always FDH_REALLYCLOSE on linktable ops If we dec a linktable entry or get a free tag from the link table, there is no reason to FDH_REALLYCLOSE the linktable fd handle. FDH_REALLYCLOSE is the same as FDH_CLOSE, except that it tells the ihandle package that the file handle will not be used again soon. If we dec a linktable entry or get a free tag, there is no reason to think that, so just FDH_CLOSE the handle instead. Change-Id: I5f48a78528a75b984201f9ee0563b142ef59baf9 Reviewed-on: http://gerrit.openafs.org/4903 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1ecac71e50e75ce5a45e297d57c480e850975af7 Author: Andrew Deason Date: Fri Jul 1 14:25:05 2011 -0500 DAFS: Do not clear salv state on fssync salvage When a volume is put into an error state via the FSYNC_VOL_FORCE_ERROR command, we clear the salvage state informaton on it, since we're forcing it offline and thus inaccessible. However, if we are forcing it to an error state because the volume needs salvaging, we just salvage it. In this case, do not clear the salvage state, since we need to know if we've already requested or scheduled a salvage so we can correctly keep track of the number of salvages performed. Change-Id: Ic4efd7a78bfb1b99a5308f0c67e81f4779dfe545 Reviewed-on: http://gerrit.openafs.org/4900 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9929d1c6fcd63a2a1d250cc36f4858b0fbba02af Author: chas williams - CONTRACTOR Date: Wed Jun 8 10:44:21 2011 -0400 doc: epub and mobi support .epub is generated using dbtoepub which is still considered alpha software apparently and installed in a non-standard place. for now, use the docbook stylesheet location to find it. .mobi is generated using kindlegen from the .epub in order to have a real toc. there is some preprocessing with a custom stylesheet to make things "look right". see mobi-fixup.xsl.in Change-Id: Ice92e701e2f921e70c0f98683b5e9ab44a347e3b Reviewed-on: http://gerrit.openafs.org/4887 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 31a001f60e5fe729b315f679d1d43b367bd74ea5 Author: Andrew Deason Date: Wed Jun 29 13:51:22 2011 -0500 SOLARIS: Granular multiPage detection Currently, a struct vcache has a multiPage counter, indicating how many afs_getpage requests are in-flight for that vcache that involve retrieving multiple pages. Any dcache associated with such vcaches are then avoided when choosing dcache entries to evict from the cache, since we may deadlock when trying to evict a dcache entry from one of the earlier afs_GetOnePage calls in a particular afs_getpage request. This behavior can cause the client to become unusable if the cache becomes full, and the only items in the cache are dcache entries in a file that has an in-flight multi-page afs_getpage request. Since, in that case, we cannot kick out any entries from the cache, and so we wait forever to wait for the cache utilization to go down. To prevent this from occurring, record exactly which ranges in the file have in-flight multi-page afs_getpage requests, and just avoid dcache entries in those ranges. This way afs_GetDownD can evict dcache entries in the same file, but still avoid entries that would cause a deadlock. Also add some comments explaining this situation a bit more. Change-Id: Idb305c8b7511065301739542772d16d4fe8cd574 Reviewed-on: http://gerrit.openafs.org/4896 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8017773587bf28a58e480f634fdccc287c443d3b Author: Andrew Deason Date: Fri Jun 24 16:23:13 2011 -0500 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 Tested-by: Derrick Brashear commit e4c2810f41ccc0ffd13506ff82811e4484090e5a Author: Andrew Deason Date: Fri Jun 24 15:25:46 2011 -0500 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 Tested-by: BuildBot commit a4e3c3be697bb99ee4846c99550cd2b52929cdca Author: Jeff Blaine Date: Tue Jun 28 22:58:29 2011 -0400 Change wiki ref to wiki.openafs.org from stanford.edu Change wiki ref to wiki.openafs.org from stanford.edu Change-Id: I2bb70d79da529aee7a810264542aa3b381dcb972 Reviewed-on: http://gerrit.openafs.org/4897 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f0774acd73b4698be72a5a6c46534fec7dab621c Author: Jeff Blaine Date: Thu Jun 16 19:58:49 2011 -0400 Introduce TAP tests of man pages for command_subcommand Introduces the first batch of man page testing as part of the TAP tests. We would like to fail, for example, when someone has added a new command to vos but not AHEM documented it. For now, the tests consist of checking to ensure that for every subcommand listed in the output of "command help" (e.g. vos help), fail the test if there is not a man page for those (e.g. vos_delentry.1 etc). Copy any of the -man-t tests and edit to make a new one All tests make use of a simple new Perl library stored in tests-lib/perl5 (a new area, not just named 'lib' because I didn't want it to be confused with a s test for a 'lib' in the src). Change-Id: I1e07adafe718c4549f1855c5e5b0d10dd9ab5f00 Reviewed-on: http://gerrit.openafs.org/4846 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 73aadede037ade30dd0bf5307b8ec0c974b570ac Author: Jeff Blaine Date: Fri Jun 17 17:24:54 2011 -0400 Styling tweak for generated HTML man pages Prefer "Georgia" as a typeface over the less readable Times New Roman, but with Times New Roman then "serif" as fallbacks. Georgia is available everywhere. Provide 10px top/bottom and 30px left/right margin on the main body for readability. Margins are good. For review: Old: http://docs.openafs.org/Reference/8/kas_apropos.html New: http://kickflop.net/openafs-man-20110617/kas_apropos.html Change-Id: I687b2007ef56019c5b683a43ac3811426ec825b0 Reviewed-on: http://gerrit.openafs.org/4850 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 70c5cb7b5dc4068928a84fd9a185e26a3655ee67 Author: Jeffrey Altman Date: Tue Jun 28 09:35:02 2011 -0400 rx: race in rx_multi processing multi_Init() registers an arrival procedure which is called when the first response packet for the call arrives. If the call times out the multi_Body loop will call rx_EndCall() and then set multi_h->calls[multi_i] to NULL. If the first data packet of the call arrives before rx_EndCall() is executed, then the arrival procedure, multi_Ready(), will be executed adding the call to the firstNotReady list. When the multi_Body loop attempts to process the call from the firstNotReady list it attempts to dereference the NULL multi_call. This race was introduced by be4abb4ec83a47477b254f2b3375742c4efbb063. multi_h->calls[multi_i] is set to NULL as an indicator to multi_Finalize() that rx_EndCall() has already been processed for the call. When rx_EndCall() is executed the arrival procedure is cleared. If rx_EndCall() has already been processed, the fact that the arrival procedure has been executed must be ignored. Add an additional check in multi_Body for a non-NULL call pointer to skip the startProc and rx_FlushWrite processing on the no longer existent call. Note that it is not safe to hold onto the call reference after rx_EndCall() has been processed since the call slot may be reused for a new RPC before the multi processing on all calls is complete. Change-Id: Ib4694a7e1d133f621d15e79534a42f780b141e34 Reviewed-on: http://gerrit.openafs.org/4890 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 131cbaa0cf74a7b3ca24ec971a9495c8dbd73e6a Author: Jeff Blaine Date: Wed Jun 8 20:56:46 2011 -0400 Change -n to -dryrun for backup subcommands Change -n to -dryrun for "don't do it, show it though" operation to be in line with agreement on -dryrun in place of -noexecute or -n. Updated man page POD sources to reflect the changes and updated README to remove these specific todo line items. Change-Id: I5c1361dcc866ea3d1efbb0c0ddcd4a7fe513c816 Reviewed-on: http://gerrit.openafs.org/4827 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c643f455cbe8e99ebb062427abcfec8e75a5e1a4 Author: Jeffrey Altman Date: Mon May 30 00:15:43 2011 -0400 vos: refactor ListAddrs refactor ListAddrs to be more readable. Clarify that -uuid and -host cannot be issued at the same time. Rename 'nentries' to 'max_index' so it is clear that ubik_VL_GetAddrs() is issued to set an upper-bound for the number of subsequent ubik_VL_GetAddrsU() calls that are issued when neither -host nor -uuid are specified. Change-Id: Icbd511722728396fda837abba39a3e6809f4d26c Reviewed-on: http://gerrit.openafs.org/4754 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 51fa590e704c77c0e9ba873ecb854448885030a5 Author: Jeffrey Altman Date: Mon Jun 27 09:31:54 2011 -0400 Windows: MergeStatus before SyncOpDone cm_SyncOp/cm_SyncOpDone is used to synchronize the RPC processing to ensure that calls which are in conflict cannot occur at the same time but also to ensure that the ordering of operations is consistent. cm_MergeStatus() was in many cases executed after cm_SyncOpDone() removed the synchronization barrier which in turn permitted status information to be applied out of order. Side effects could have included data loss due to client side file truncation. More commonly two StoreData RPCs would have their status information applied out of order forcing the cache manager to invalidate all of the cached data for the file. Change-Id: I8073da701cf11cd0df2b901e81180de7c193ae23 Reviewed-on: http://gerrit.openafs.org/4891 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9f77a2d6b3d571a928261563763913c8c6ee2938 Author: Jeffrey Altman Date: Thu Jun 23 17:51:22 2011 -0400 Windows: TRANS2_FIND_FIRST2 for _._AFS_IOCTL_._ smb_T2SearchDirSingle() must not fail directory search requests for the _._AFS_IOCTL_._ file. Although this file does not actually exist, it is successfully processed by CreateFile operations. Therefore, an explicit search for it should return a valid answer. Change-Id: I9df3443f0bdf0dd05caac74f4de3a0cc64d26800 Reviewed-on: http://gerrit.openafs.org/4884 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7532b05221caf2c382d9e8c9ca5af4a284566920 Author: Jeffrey Altman Date: Thu Jun 23 23:49:32 2011 -0400 Windows: Fix SMB_COM_NEGOTIATE for MS11-043 MS11-043 adds response validation for SMB_COM_NEGOTIATE messages received by the SMB Redirector. OpenAFS failed to properly specify a Challenge and DomainName in the response when the security mode is SMB_AUTH_NONE (or share with password). This patchset corrects smb_ReceiveNegotiate() so that it adheres to the protocol specification. FIXES 130033 Change-Id: I3dc6e571326c7259a39d30bd80b5986ff35c743c Reviewed-on: http://gerrit.openafs.org/4886 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 358099b21c5c888c02bf3754702ae623378c507d Author: Jeffrey Altman Date: Thu Sep 30 10:48:58 2010 -0400 Revert "Rx: When call receive is done, send ack all packet" This reverts commit 3cd3715e608b801b4848399e42cb47464e6e3cc3, which replaces an ack with an ackall; ackall processing does not actually mark all packets acked when it is received, so it is insufficient. Change-Id: I7ee90e1190688570cf3b268229972064480283cc Reviewed-on: http://gerrit.openafs.org/4837 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 55050f566b1fbf6a2ce3c60ddbb44d0f52d4865b Author: chas williams - CONTRACTOR Date: Wed Jun 8 09:42:47 2011 -0400 doc: fix dependencies index.html might not be built if you are building anything other than the html/chunk.xsl but in general this is better than before. Change-Id: I2e1b98c8a3fce65cb702274d5e276989031e338b Reviewed-on: http://gerrit.openafs.org/4822 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 137dd2349400a2e372f1f03e0bce327fffcb5e9e Author: chas williams - CONTRACTOR Date: Wed Jun 8 09:40:17 2011 -0400 doc: prefer fop to generate pdf from docbook It would seem xsltproc -> fop -> pdf is the "modern" way to generate pdf from docbook now. The hard part is finding the stylesheets. This should work for fedora, sles and debian. Additionally, it brings some consistency--xsltproc for all the conversions. You can still override via configure options if you prefer something else. Change-Id: Id779e9473a6759daddc9a61be714109b27da980e Reviewed-on: http://gerrit.openafs.org/4821 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 6770c6c411f2766471b4dc07bd7c66794f95ba63 Author: Chas Williams (CONTRACTOR) Date: Thu Jun 9 21:14:05 2011 -0400 doc: fix some broken link specifications "local" links to section heads inside the same pod page should be written L instead of L. the other broken links are assorted typos and capitalization changes. Change-Id: I18b57a81d984501309e96dcd4c04582e744a6db2 Reviewed-on: http://gerrit.openafs.org/4831 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman commit 1ac8468ad94f0bcc51bda41be98575ae62c1cd12 Author: Jeffrey Altman Date: Sat Jun 11 23:27:10 2011 -0700 roken: add search.h to .gitignore Change-Id: Iab524de2757af982b00ff09048b6cb4ee34d797e Reviewed-on: http://gerrit.openafs.org/4879 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f5349051abebd15fc2f2d77ff5b6dc81e09bdf47 Author: Andrew Deason Date: Tue Jun 21 16:25:14 2011 -0500 DAFS: Do not attach a specialStatus'd vol If we encounter a preattached volume during GetVolume, we currently ignore vp->specialStatus before trying to attach. However, we will generally always fail to attach due to a conflicting vol op, but even if we don't, GetVolume always returns an error later on if vp->specialStatus is set. So, same some processing and attempted attachments by bailing out sooner if vp->specialStatus is set. Change-Id: Id5df08fe31073485e4d733c42310b42090ee8e7b Reviewed-on: http://gerrit.openafs.org/4874 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 926ce3d35018050bdbe8e00011884954d6b0fd80 Author: Andrew Deason Date: Tue Jun 21 18:08:21 2011 -0500 salvager: Clear summary in RecordHeader Not every field in the summary header in RecordHeader is set, leaving some used uninitialized when we copy to the given volumeSummaryp (like 'deleted'). Zero out the header before we do anything. Change-Id: I94f6e5c8b8c60675de25eb6f8290de9545ff4dd0 Reviewed-on: http://gerrit.openafs.org/4876 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit f2d067b4e48500004236b181dd5a25454f352daf Author: Andrew Deason Date: Tue Jun 21 17:51:32 2011 -0500 Build a separate copy of vlib for dasalvager Currently dasalvager links to vlib.a. But vlib.a is built without any DAFS defines, and so the size of a struct DiskPartition64 is different (since dasalvager is built with AFS_DEMAND_ATTACH_UTIL). Build our own copies of the volume package files instead, with AFS_DEMAND_ATTACH_UTIL defined. Change-Id: I7b9f965fc18b6e6b71275912684ad041aaef19f4 Reviewed-on: http://gerrit.openafs.org/4875 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3f47779f51dad3af7b1db43bb3fd71f1dd1b76d8 Author: Andrew Deason Date: Tue Jun 21 18:34:46 2011 -0500 dir: Remove extraneous printf from Create Change-Id: Id226d5457119a9f898aa35bc7b4d4db830a2f7fc Reviewed-on: http://gerrit.openafs.org/4878 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9f8757650c8985785f0934bead2314a2acff21e1 Author: Andrew Deason Date: Tue Jun 21 18:33:16 2011 -0500 dir: Fix DRead DRead was missing a return statement in one of the cases where we found the buffer we were looking for, so we locked the buffer but kept looking. Return it instead. Change-Id: If72a0ba3ce60a847f2796b51a82f0f473bbc608a Reviewed-on: http://gerrit.openafs.org/4877 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 25688bc2e7e8da83b4bf22d7cdc3e0214eadc455 Author: Andrew Deason Date: Tue Jun 21 14:58:42 2011 -0500 vol: Do not overwrite specialStatus in attach2 attach2 wants to set specialStatus to VBUSY in certain conditions (such as, it discovers a conflicting vol op where VVolOpSetVBusy_r is true). However, specialStatus may already be set to something else, like VMOVED if the volume is being moved off of the server. This can happen if the volserver has checked out and FSYNC_VOL_MOVE'd a preattached volume but hasn't deleted or checked the volume back in yet. So, if specialStatus is already set, don't touch it, so we don't start reporting VBUSY errors to clients when we should be reporting VMOVED, or some other error code previously set. Change-Id: Icb2895036620f186230e1558b8bc04d18cc45c86 Reviewed-on: http://gerrit.openafs.org/4873 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6b833f575743d4a826750bb6913cd53232a8867f Author: Simon Wilkinson Date: Sat Jun 18 15:50:08 2011 +0100 rx: Exit fast restart on non-duplicate ACK The current code only exits fast restart when we receive an ACK packet that contains no missing chunks at all. On a network that is dropping a reasonable chunk of its packets, this means that we spend most of the call in fast recovery. (I originally found this by running with the intentionally drop packets feature set to 10%) TCP's fast retransmit behaviour is that we stay in fast recovery until we receive our first non-duplicate acknowledgement. In TCP that means an acknowledgement that moves the window. In RX, it is an acknowledgment that ACKs a new packet. Change-Id: If8e461dd91315be845397dd1bf42771c9223d156 Reviewed-on: http://gerrit.openafs.org/4869 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 91b351e88bdb56bfdfc2f5f16f64bb7522796581 Author: Simon Wilkinson Date: Sat Jun 18 13:17:07 2011 +0100 rx: Don't limit the # of packets sent in recovery The RX transmit engine limits the number of packets sent whilst in loss recovery to one per invocation of the transmit engine. As the engine cannot be called by the application thread whilst in recovery, this means that we end up being limited to one packet per ACK received, which means that despite a growing congestion window we'll only send one packet per RTT (in effect, a congenstion window of 1). This will remain the case until we exit recovery, and all of a sudden can send a large number of packets. If this is larger than the current capacity of the network, we'll probably end straight back in recovery again. Let the congestion window do its job, by removing this arbitrary limit. Change-Id: I9f21138662b0918d6d2b885f0fb5ada7fa4c79ec Reviewed-on: http://gerrit.openafs.org/4868 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 0b9c9e9973e8d32cdfe1fc884fb2c310cedc0404 Author: Simon Wilkinson Date: Sat Jun 18 13:01:35 2011 +0100 rx: Don't wait for TQ busy when entering recovery Two different threads can cause a call to enter recovery. The event thread will move a call into recovery as a result of a timeout, or the listener thread will move it there following a fast retransmit. In both of these cases, recovery looks different. In the case of a timeout, we enter slow start, starting as if we were begininning transmission for the first time. Following fast retransmit, we enter fast recovery, with different starting parameters than those coming from slow start. As a reslt, the current behaviour, where either call sitting in FAST_RECOVERY_WAIT causes the other to simply return is inappropriate. Further investigation indiciates that FAST_RECOVER_WAIT is actually uncessary. There is no harm caused to a thread which is currently blocked on the network in the middle of a transmit, in adjusting the window size underneath it. As both of these states collapse the window, that thread will simply cease sending earlier. So, simplify the code, and remove the potential race between event and listener by removing the FAST_RECOVER_WAIT state. Change-Id: Ic2e7606136ca04c869685345b63101c346ce702b Reviewed-on: http://gerrit.openafs.org/4867 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit e8c4fc4f37912a5d30694caef45d27374e9201e7 Author: Simon Wilkinson Date: Sat Jun 18 12:43:44 2011 +0100 rx: Enter loss recovery when we retransmit Since I mistakenly wrote commit 36e2d13b, RX hasn't entered congestion avoidance when a loss event occurs. This is bad, because on todays networks the majority of packet losses are due to some form of congestion. Now that the timeout code has been restructured, the chances of entering the retransmit routine in error are much much smaller, so this code needs to be restored. This change reverts 36e2d13b55085c996d38b30d003296c602ef8ee3. However, the original RX code has the problem that it assumes that all forms of fast recovery are the same - in particular, that the call settings that result from entering fast recovery due to a fast retransmit are identical to those resulting from a timeout. This is not the case, and this will be fixed in a later change. Change-Id: Iedb34437db9fcfbc90307b01e566a8d089eef4bb Reviewed-on: http://gerrit.openafs.org/4866 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 0118fb5387e656e515d78d48497a48f1e04a1152 Author: Simon Wilkinson Date: Sat Jun 18 11:58:57 2011 +0100 rx: Add Karn-style backoffs to RX retransmits When we retransmit a packet, we may be doing so because the RTT of the connection has grown dramatically larger than earlier within the call. However, RX doesn't permit all ACKs to retransmitted packets to be counted within the RTT calculation. So, adopt the same approach as Karn developed for TCP, and as described in detail in RFC2988. When a retransmit event occurs, backoff the connection RTT by doubling its value, and hold at this doubled value until either another retransmit occurs (in which case we back off again, up to a predetermined ceiling), or we receive an ACK packet which we can use within the RTT calculation, in which case we drop back down to the newly measured value. This change replaces the per-packet backoff strategy originally implemented in RX (which, whilst allowing resent packets more chance of arriving, doesn't help with computing a correct RTT). Change-Id: I715dc673a0b379733e3be26fa594ea13f492a58f Reviewed-on: http://gerrit.openafs.org/4865 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 784babbea1247660f39463403233589a74c6e73b Author: Simon Wilkinson Date: Sat Jun 18 11:48:45 2011 +0100 rx: Make clock_Add correctly add to itself With the existing clock_Add code, the following: struct clock a = {2, 800000}; clock_Add(&a, &a); gives a clock value of {6, 600000}, rather than the expected {5, 60000}. This is because the ordering of instructions leads it to double count the carry on the seconds field. Reorder the instructions so that the carry is correctly applied. Change-Id: Ia71b387ce521a11e4caf9ec200907efe1d2be8ff Reviewed-on: http://gerrit.openafs.org/4864 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 280c80152522f32cf34deae96696b1db8aaaa9bb Author: Simon Wilkinson Date: Sat Jun 18 11:35:30 2011 +0100 rx: Remove resending logic into its own function Create a new function, rxi_Resend, which is the entry point to running the transmit queue as a result of a resend event. This concentrates all of the resend logic into one place, removes the need for rxi_StartUnlocked, and means that rxi_Start's arguments don't need to match those of an event handler. Change-Id: I550ebbbae63b7d659bb980eea709a14882038914 Reviewed-on: http://gerrit.openafs.org/4863 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a80a88e8ba7ac5e2afc5188add482f4e5323128e Author: Simon Wilkinson Date: Sat Jun 18 10:46:53 2011 +0100 rx: Change the way that the RTT timer is applied RX maintains a retryTime for every packet that it has transmitted, which is held as the time that that packet was sent, plus the smoothed RTT of the connection. If a packet is in the queue with a retryTime older than the current time, then it is resent at the first opportunity. In some circumstances, this first opportunity will be as a result of the resend event timer expiring, in others it will happen as part of a normal queue run. There are a number of problems with this approach on congested networks. Firstly, on a network with a large window size, which is in "normal" flow, it means that we will never actually perform fast retransmit as the timeout for this packet will have expired before we have received any further ACKs. This is because, on a network with a relatively stable RTT the ACK for packet n+1, n+2, or n+3 cannot arrive before the expected time of arrival of the ACK for packet n. As we retry immediately this expected time of arrival has passed, we never have the opportunity of using these later ACKs to learn that packet n is lost. Secondly, the fact that we may resend packets from a "normal" queue run, rather than as a result of a resend event, means that there is no clear entry point for resends. As resends should be assumed to be a result of network congestion, and result in both the call throttling back, and the RTT being increased, this lack of a clean entry point makes things tricky. As a solution, this patch changes the way in which retransmit times are applied to use the algorithm described in RFC2988. *) Whenever we send a new packet, we start a timer for the current call rto value if one isn't already running. *) Whenever we receive an ACK that acknowledges new data, and we have packets that are sent but not yet acknowledged, we restart the retransmit timer using the current rto value. This alogrithm solves the first problem, as it means that if the connection is still flowing, we will continue to receive ACKs, and we can enter fast retransmit. In implementation terms, we longer track a retryTime per packet, and instead simply record if a packet has been sent or not. Packets which have been sent may only be resent as a result of a resend timer expiring, or of entering fast retransmit, so solving the second issue. Change-Id: Ic1e2b32876197f8a1fb620b7d70c0c3ec3f6bb88 Reviewed-on: http://gerrit.openafs.org/4862 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 39484c6e57cf993a713b4a989d1c0c227e6f496c Author: Simon Wilkinson Date: Fri Jun 17 22:06:54 2011 +0100 rx: Compute smoothed RTT per call, not per peer. RX uses the TCP RTT smoothing algorithm as described in RFC2988. However, the TCP algorithm is designed to accept samples from a single connection, accepting a new sample once per RTT. RFC2988 suggests that "when multiple samples are taken per RTT the [ alogrithm ] may keep an inadequate RTT history." In RX's implementation, we use a single instance of this alogrithm per peer, and input all of the samples from all of the active calls and connections into this same instance. This leads to us taking a significantly (potentially many magnitudes) larger number of samples per RTT, and rapidly losing the RTT history. With RX's implementation, short lived network events may easily bias the RTT, and cause large numbers of packets to time out. This change fixes this by moving the RTT calculation onto a per call basis. We still update the peer with our caclulated value, so that new calls may be created with an RTT corresponding to the current value for the connection, rather than having to start high and converge downwards. Change-Id: I2ed6bce63adf160c03518686ec25cbecc5084f5f Reviewed-on: http://gerrit.openafs.org/4861 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53fec2db10ee6a52f3374b62b2d0d7fd791d9996 Author: Simon Wilkinson Date: Tue Jun 21 09:34:50 2011 +0100 rx: Make testclient build on Unix The "testclient" utility is built as part of the build on Windows. Fix it so that it actually builds on Unix, so we can test changes to testclient there. Change-Id: I751e905f6d9676598e3b7be9ccaf321250804f11 Reviewed-on: http://gerrit.openafs.org/4872 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5614305853f0f87a2418a6fb7ca472a8ef966084 Author: Simon Wilkinson Date: Sat May 14 08:55:50 2011 +0100 rx: Reverse the consumption order of idle queue Currently, the rx server thread idle queue is used in an LRU manner. This means that we round robin requests between all of the threads configured on a given system, which means that we end up thrashing CPU caches on machines whose workload doesn't require that all of the configured threads be used. Change this so that we always use the most recently idle thread. This isn't as "fair" to all of our waiting threads, but should mean that we scale better on SMP machines, as a thread that is recently idle is likely to have been recently scheduled. Performance numbers to follow ... Change-Id: I6072183b5ca72754755c3ac854e30a064c4187e5 Reviewed-on: http://gerrit.openafs.org/4871 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d7d727b87b44d77ca7b108e6d21d9209b5d84c90 Author: Derrick Brashear Date: Mon Jun 20 12:31:51 2011 -0400 macos: package shared libraries include our shared libraries in the package when we have them Change-Id: I18a38c69410a7fded361b05479c93698e3d618e2 Reviewed-on: http://gerrit.openafs.org/4870 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b65944973a24e9365dc1ff118ded4c3a1e25f782 Author: Simon Wilkinson Date: Fri Jun 17 20:35:59 2011 +0100 rx: Remove incorrect backoff code The ACK packet handling routine contains code which causes the RTT to backoff if the selective ACK response indicates that there is a missing packet. The comment justifies this code as being in line with Phil Karn's work on TCP. However, the TCP behaviour is that we backoff when we enter resend. Both TCP and RX have difficulty computing RTTs for resent packets due to the ambiguous ACK problem. Whilst RX is slightly better than TCP in this regard, we can't always tell whether an ACK refers to the original, or resent packet, so resent packets are unable to contribute to the RTT. This means that if the RTT ends up too low for the connection, and we start resending every packet, the RTT will never grow to account for this, as we never feed it any packet samples. Karn's solution to this was to backoff (double) the RTT value when we resend a packet, and then to not drop it back down until we receive an ACK that we can count. This means that we will always get a new sample for the connection, and the RTT will grow again. The original author confirms that the current behaviour in RX is incorrect, so simply remove it with this patchset. Change-Id: I0f4af56601c43b72394d7903cacc3fc19bc9d046 Reviewed-on: http://gerrit.openafs.org/4860 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 699330682f3cb001bf1bfbeaffd806600ccf69e8 Author: Simon Wilkinson Date: Fri Jun 17 19:38:29 2011 +0100 rx: Account for delayed ACKS when computing RTO RX currently only soft ACKs every second packet, therefore a soft ACK may be delayed by a period of time (currently 100ms, although RX did expose this as a public variable in earlier versions). RTT values are computed using only non-delayed ACKs, so the timeout is a smoothed average of the exact time taken to send and directly ACK a packet. Therefore, if the peer ends up using a delayed ACK for the packet, using just the RTT will cause that packet to be timed out. A while ago, this was dealt with by padding the calculated RTT with an additional 350ms. This was then removed, and changed to a 350ms minimum value. When this caused large numbers of spurious resends, the padding was restored, but with a 20ms default value. As noted above, 20ms is too low, as we may wait for up to 100ms before sending an ACK. This patch changes minPeerTimeout so that it does what it says on the tin - sets a minimum value below which the peer timout may not fall. It then adds to either this value, or the calculated one, 200ms of padding. This makes our padding identical to TCPs, and allows some future leway as to the softAckDelay value. Change-Id: I48ab28e03bb7c0a49fe21c21f83adbb02b7665f2 Reviewed-on: http://gerrit.openafs.org/4859 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit c0cfbc40c8ef3de65f144560918cbd2a5bf187ec Author: Simon Wilkinson Date: Fri Jun 17 19:12:09 2011 +0100 rx: Make rx_softAckDelay & rx_lastAckDelay private The values of these two parameters directly affect the modifiers that are needed in the peer's RTT calculations, and so can not arbitrarily be changed by applications. lastAckDelay has been 400ms since the first OpenAFS release, and that value is used as a modifier when computing the timeout of the last packet. It is likely that any change which made this value longer than 400ms would have detrimental effects on deployed clients softAckDelay has been 100ms for a similar time period. We have chopped and changed the value of minPeerTimeout, so it is unclear what the maximal value for this parameter is. For much of OpenAFS's life, minPeerTimeout was a 350ms padding value, which suggests that copying TCP, and setting the maximal value at 200ms would be a safe option. For now, however, leave it at 100ms to avoid unexpected side effects. hardAckDelay is not addressed by this patch set, as all ACK packets sent from the application thread are marked as delayed, and so currently have no part in computing RTT times. It is likely, however, that any changes to the hard ACK timeout should be very carefully considered. Change-Id: Ibdeae4577b09d120f22bb922697f92d63aaf0dff Reviewed-on: http://gerrit.openafs.org/4858 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 800a5642a0b9ff514519b4af30b4d0dadd471480 Author: Jeff Blaine Date: Fri Jun 17 20:35:17 2011 -0400 Documented vos restore -creation and -lastupdate Culled info from commit 21592fe6 by Kris Hees. These allow one to specify how to set the creation date and last update date at volume restore. Change-Id: I6cfebb41c18e1acca5bbb70e3ee179c8ee976be3 Reviewed-on: http://gerrit.openafs.org/4852 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 0a318b5bb9d0f5940eeffa092f6adae025d560de Author: Ken Dreyer Date: Wed Jun 15 14:21:27 2011 -0400 Enable -afsdb in the Red Hat packages. Change-Id: Ib701b248155a9a59da132ecb22116cc594089250 Reviewed-on: http://gerrit.openafs.org/4844 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 03a54723eaf23b2aad0d026ba5f1a8e7343b3763 Author: Ben Kaduk Date: Fri Jun 17 02:22:34 2011 -0400 FBSD: do not FlushAllVCaches In normal operation, any AFS vcache with associated data will have an associated vnode, which will be on the list of vnodes associated with the /afs mountpoint. We already call FreeBSD's vflush() in our afs_unmount, which walks the list of vnodes associated with the mountpoint and calls vgonel() on them, which calls VOP_CLOSE and VOP_RECLAIM on the vnode. Our implementation of VOP_RECLAIM already calls FlushVCache, so in normal operation, FlushAllVCaches() will be a no-op. However, in the presence of bugs, it is actively harmful, causing panics. For example, if a vnode has been reclaimed but FlushVCache failed (which we cannot report back since the VFS will panic in this case), and we attempt to flush it again, the associated vnode has already been cleaned up and we will panic. Likewise if our list of vcaches becomes corrupt and has a vcache with bad or missing vnode for some other reason, we will panic. Since there is no gain in normal operation and abnormal operation is more likely to panic than save data, skip the extra flush. Change-Id: Id227ca74f4036c1c1f40a41a922e73198f16f958 Reviewed-on: http://gerrit.openafs.org/4847 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 327f516477b3dbf6ed6302c706bbb2bf41ae7907 Author: Ben Kaduk Date: Fri Jun 17 02:44:46 2011 -0400 FBSD: do not install kdump Since it's just an empty file, installing it is rather silly. Change-Id: I93279c5d7b0e5262bfdb68cdbd92c49e1984fa97 Reviewed-on: http://gerrit.openafs.org/4849 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d354050ab1d9e4fda9265cd119e9787f39bb6fba Author: Marc Dionne Date: Fri Jun 10 21:49:58 2011 -0400 Linux: remove typedef from configure test comment Remove the "typedef" from the structure element configure test comment. The typedef version of the macro is used by the more general element test, so the comment should be more general. This affects comments in src/config/afsconfig.h Change-Id: If5b748e1a63de83e15906fc16e7c94b357c4363c Reviewed-on: http://gerrit.openafs.org/4836 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36f6eed2b458995ab973102acf74375bf0a66931 Author: Michael Meffie Date: Tue Jun 7 12:37:40 2011 -0400 volinfo: fix false good magic line Fix false report of good magic/version numbers in volume header file. Change-Id: I26869b6e6ada331373d626e501f6520755d5c070 Reviewed-on: http://gerrit.openafs.org/4817 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 6cf9254ec29ef10dfd4515f192f53f6c935b2375 Author: Derrick Brashear Date: Fri Jun 10 18:40:33 2011 -0400 generated: take into account the things needed in master we need roken and hcrypto to build the bits we need to build the compiler tools on master. do so. Change-Id: I3e974a5d94bdfdf3e89f3d18aed55ed586b0034d Reviewed-on: http://gerrit.openafs.org/4835 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a00b11221b559aee9a3412b78757173abeabaf77 Author: Derrick Brashear Date: Fri Jun 10 18:33:30 2011 -0400 rxkad ticket5 function rewriting avoid conflicting with heimdal in environments where we might need bits of their asn1 library also Change-Id: Ib76c158297a331fcaf650c435c5696e5b5aaab8c Reviewed-on: http://gerrit.openafs.org/4834 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a6ef51ff50245d30624545cca05348aaa88865d0 Author: Derrick Brashear Date: Fri Jun 10 03:02:38 2011 -0400 more death to des des is in the generated targets. kill it. Change-Id: Ifb4ad48b0f57e95842411046cb79b589669265b7 Reviewed-on: http://gerrit.openafs.org/4833 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a3f27333c5521fdc52314bf510943c602b3cd1a0 Author: Derrick Brashear Date: Fri Jun 10 02:11:26 2011 -0400 darwin armv6 and armv7 support simply compile lwp process assembler for both arm arches. Change-Id: Ie09ec1e3684656a492373f86e4c8be71e6abfabd Reviewed-on: http://gerrit.openafs.org/4832 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149 Author: Jonathan Billings Date: Mon Jun 6 16:29:28 2011 -0400 Linux: rpm: Update openafs.spec.in to include changes to installed files * Remove several files from the packaging manifest that are no longer generated or included in the distribution, such as the DES header files. * Exclude the aklog_dynamic_auth man page, since it is AIX-only * Add new files that have appeared in the distribution, such as the 'afsio' binary. * Add librokenafs.so.1 and libafshcrypto.so.1 to the base package, because many of the binaries in the base package are linked against librokenafs and the 'butc' binary is linked against libafshcrypto. * Move the librokenafs.{so,a} and libafshcrypto.{so,a} to the -devel package instead of the authlibs-devel package, now that the .so.1 library is part of the base package. * Set the executable bits on the libraries installed in libdir. This change is important because it causes 'rpmbuild' to generate Provide tag metadata for the libraries in the package, which is necessary now that some binaries in other packages have generated Requires tags for libraries packaged in the base package. 'rpmbuild' will not generate the Provides tag if the libraries lack executable permission. Change-Id: I8f66cf882008b5576528ccc0f4a9694015db85bb Reviewed-on: http://gerrit.openafs.org/4814 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b1f0bb472e237f5a6f88449db44f030c08a5a324 Author: Andrew Deason Date: Wed Jun 8 13:19:59 2011 -0500 afsd: Fail gracefully on mtab open failure On Linux and IRIX, fail gracefully when we fail to open /etc/mtab, instead of segfaulting. Move strdup'ing cacheMountDir until after opening /etc/mtab, to simplify the error handling. Change-Id: I58d64548303f25a51753d093a733608fea1282e1 Reviewed-on: http://gerrit.openafs.org/4825 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fc087f187759398a2646480eca25c1195ed23d22 Author: Andrew Deason Date: Wed Jun 8 23:06:58 2011 -0500 volinfo: PrintFileNames is namei-only PrintFileNames only exists on namei, so make sure it's inside a namei ifdef. Change-Id: I65867b54e3747b6f3a26cdfd70ab84ed7fe4e44d Reviewed-on: http://gerrit.openafs.org/4830 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear commit f091ace32e3045da396d577055dafd67888ff7ea Author: Andrew Deason Date: Wed Jun 8 22:50:27 2011 -0500 libafs: memset dirHeader->hashTable Clear dirHeader->hashTable via memset instead of via a loop. This is more efficient, and avoids the loop getting optimized into an unusable _memset call on recent versions of Solaris Studio when building for the kernel. Thanks to Jeff Blaine for reporting the issue with Solaris Studio. Change-Id: Ibaa5140d510c2df7e1129352a6677594785b42b4 Reviewed-on: http://gerrit.openafs.org/4829 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1c917cee2b948595c98b8b0645289ccc79d8ffd9 Author: Jonathan A. Kollasch Date: Wed Jun 8 20:31:49 2011 -0500 Remove NetBSD-specific debugging statement Change-Id: I458a6b50fee4ed41dd512e23de6b4e516e0ddc93 Reviewed-on: http://gerrit.openafs.org/4828 Reviewed-by: Jonathan A. Kollasch Tested-by: Jonathan A. Kollasch Reviewed-by: Derrick Brashear commit f88c2db3ac273171f8cfe4df60456764d98bfd29 Author: Jeff Blaine Date: Wed Jun 8 14:56:58 2011 -0400 Removed detail of prev. completed work found listed todo list A todo item was in the "Known Problems" list, but the work was already completed. Cleared this item from the list (klog man page info about krb5, klog.krb5, fakeka) Change-Id: I9dbff50afd7bbaa6f5d20f7d4acfc796731b9c2d Reviewed-on: http://gerrit.openafs.org/4826 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 418a70feedb5574d28c3fbe513333b0fb102a3ca Author: Jeffrey Altman Date: Wed Jun 8 02:22:41 2011 -0400 Windows: shell extension is multithreaded Since the shell extension is multithreaded and it is possible for more than one thread to be executing in the gui2fs.cpp module at a time, it is not safe to use a single static 'space' buffer by more than one thread at a time. Move the buffer into the stack of each function that uses it so that we have thread safety. Change-Id: Idbec3e0027fc7e3c43b503c55c1b479bcb5984bc Reviewed-on: http://gerrit.openafs.org/4819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9cde8b8854f255a2cc264e0391dbb855fcfab23b Author: Chas Williams (CONTRACTOR) Date: Tue Jun 7 14:26:11 2011 -0400 doc: fixes for the xsltproc -> fop -> pdf toolchain "Empty" entities seem to trigger a bug in fop. These are easily converted to reference on the containing block. Additionally, 's seem to need to be inside a non-structural entity (like a ) in order to determine their page number/location correctly. Change-Id: I2ab577f6ba8989685257fb9429e00a71dd51075c Reviewed-on: http://gerrit.openafs.org/4812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 445a8b5461c66160552136214a1d8d97de15967e Author: Ben Kaduk Date: Tue Jun 7 11:30:18 2011 -0400 Also install afszcm.cat for i386_fbsd The change gerrit/4760 enabled the use of gencat to actually build this file, but failed to also change installation logic, so it was sitting unused in the build tree. Fix this, and install the file. This allows us to remove a shell case statement which had formerly been needed to enforce this restriction. Change-Id: I7f9e94b09c504193084e1e04ae137df08b27b447 Reviewed-on: http://gerrit.openafs.org/4815 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6a22a2f4b7aa0d960cea17b419003986f6184d58 Author: Simon Wilkinson Date: Fri Nov 5 00:23:23 2010 +0000 rx: Don't maintain maxSerial There were no users within the code of the rx connection maxSerial element, and maintaining it required locking on a critical path. So, get rid of it. Change-Id: Ied5653b6f01b78525091d8bf09bdc454002eedc0 Reviewed-on: http://gerrit.openafs.org/4797 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fe7d38f3205bd879e961f5849ed64df5b495388a Author: Simon Wilkinson Date: Sun Jun 5 11:04:12 2011 +0100 rx: Reorganise transmit queue walk The transmit queue is stored in the order that we transmitted the packets (by sequence number). This means that we can do all of the ACK processing by just doing a single walk of this queue, rather than having to walk the queue multiple times, once for each type of ACK. This clarifies the queue processing, and should reduce the amount of time that we spending iterating large transmit queues. Change-Id: I59578956e81197bbea7ce496e2f520a2995a3e95 Reviewed-on: http://gerrit.openafs.org/4796 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cd326b2f54c3397468807c32ce0834f73c9d5d1b Author: Jeffrey Altman Date: Sun Jun 5 18:41:24 2011 -0400 rx: Add RX_CALL_ACKALL_SENT flag and rxi_SendAck processing 3cd3715e608b801b4848399e42cb47464e6e3cc3 modified rxi_ReceiveDataPacket to send an ACKALL whenever RX_CALL_RECEIVE_DONE is set on the call. This produced the potential for a race with ACKs that set the firstPacket value to 'rnext' when the receive queue for the call has yet to be emptied. From the perspective of receiver the ACK was already processed and does not require a response since the previously received ACKALL acknowledged the delivery of all data packets to the application. When sending ACKs after ACKALL it is therefore required that firstPacket be set to the sequence number after the last unprocessed packet in the receive queue. Thanks to Simon Wilkinson for his extensive assistance in identifying the problem and the development of this patchset. Change-Id: I3bdf0c8f297b1d91b1a2bf3284adfeb9301874eb Reviewed-on: http://gerrit.openafs.org/4798 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e448824f9dac207f0198d2284988fcf97243d30e Author: Jeff Blaine Date: Thu May 26 14:22:52 2011 -0400 Added fstrace subcommand help to binary Added subcommand help to fstrace binary. Change-Id: I00ef50a27ec9bf799c84b1c8d949a75e6be36eb3 Reviewed-on: http://gerrit.openafs.org/4727 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ff30293624a7e31d585b9e8f2e1a439cf87b6524 Author: Jeffrey Altman Date: Sun Jun 5 16:02:46 2011 -0400 rx: do not rxi_AckAll for one data packet call rxi_ReceiveDataPacket() calls rxi_AckAll() when the call reaches the RX_CALL_RECEIVE_DONE state to permit the caller to empty the transmit queue. That reduces the memory consumption of the caller and avoids unnecessary retransmits which the call is in process. If the call data consists of a single packet it is possible that Ping ACK packets sent as part of connection establishment could race with the ACKALL and be delivered out of order. If the Ping ACK is delivered second, it will be ignored by the peer forcing a two second delay in connection establishment. To avoid the race do not send an ACKALL for a single packet call. Change-Id: I69d967b3b2e9ee77636ca12bc7ade4896bb8a071 Reviewed-on: http://gerrit.openafs.org/4799 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7dc0a32c3d6d09abeecdf25285ef2c205357511d Author: Simon Wilkinson Date: Mon May 30 20:07:01 2011 +0100 ubik: Use supplied config directory in ugen ugen_ClientInit permits the configuration directory to use to be passed on the command line. However, it was then promptly overwritting the supplied directory with the standard client (or server) directories, depending on whether localauth was in use or not. As a start to fixing this anti-social behaviour, modify ugen so that if we're not doing localauth, and if the caller has passed us a config directory, use that instead of the system default one. This allows us to start creating test harnesses for our command line tools. Change-Id: I6916389ce56df4cee62845a03282c5c10d3095eb Reviewed-on: http://gerrit.openafs.org/4809 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91de2dd08727f4cd1da124c4966d7a41a7ab99cf Author: Simon Wilkinson Date: Tue May 31 09:27:57 2011 +0100 tests: Use a real IP address for the test cell When creating the test CellServDB, use the IP address of the machine that we are running on, rather than 127.0.0.1. This makes it possible to actually start up ubik servers using this CellServDB. Change-Id: Iec0be80921dd1f01825177562f8a3dcc59400b9a Reviewed-on: http://gerrit.openafs.org/4808 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 954aa2338ce3fbaee81defe45a4d99da69d0baf7 Author: Simon Wilkinson Date: Mon May 30 18:18:33 2011 +0100 tests: Move code to add new DES keys to common Make the code which adds a new (static) DES key to a cell's configuration generally available, as this will also be useful in constructing other tests Change-Id: I5d284016628e9d25a198607ffd6f8f1a63ddf652 Reviewed-on: http://gerrit.openafs.org/4807 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 799b3373ecfeebf790d71c6e5bf60b0845519b2d Author: Simon Wilkinson Date: Mon May 30 17:47:35 2011 +0100 tests: Move common code to its own directory Move code for faking up an OpenAFS configuration directory into its own "common" directory, as it's going to be of use to more tests than just those in auth. Change-Id: I9c80dd66763e222deca98bc7744ff317111c6ed8 Reviewed-on: http://gerrit.openafs.org/4806 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9c8d2b895dc25a9e3e4515add5255840431a533 Author: Simon Wilkinson Date: Mon May 30 20:14:45 2011 +0100 vos: Add the -config option Add the -config option to all vos commands, so that the user can set the location of the configuration directory to use. This is primarily provided for testing purposes, and will shortly be used to hook vos up into the TAP-style test suite. Change-Id: I610a3161c7d5d52ce43e77a400bc752d43f76134 Reviewed-on: http://gerrit.openafs.org/4811 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78c0e3b0efffe19c33bd0467872d65af43e5a47e Author: Simon Wilkinson Date: Mon May 30 20:02:31 2011 +0100 cmd: Add support for disabling specific abbrevs Sometimes, when adding a new command parameter, it's necessary to prevent it from colliding with an existing abbreviation. This patch adds a new command flag CMD_NOABBRV which can be set on a parameter to indicate that it should not be considered when checking for ambiguous abbreviations. For example, if a command has the existing '-cell' option which is popularly abbreviated to '-c', adding a '-config' option would cause the existing abbreviation to stop working. However, if '-config' is added with the NOABBRV flag set, '-c' will continue to work. Change-Id: I3b6d718f9dd81c44fb1d10c904db6a4a0fd763b8 Reviewed-on: http://gerrit.openafs.org/4810 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit c47f81d7076d5ecb52cb68a0535a78561c224c51 Author: Jeffrey Altman Date: Sat Jun 4 13:28:26 2011 -0400 Windows: refactor fs acl funcs into fs_acl.c The ACL structure definitions and manipulation functions were defined both in WINNT/afsd/fs.c and WINNT/client_exp/gui2fs.cpp. Extract them to WINNT/afsd/fs_acl.c and refactor them so that a single copy can be maintained for both modules. The most significant change is to CleanAcl() which now accepts a cellname instead of a file path. By accepting a cellname the ACL functionality is completely isolated from the path processing and pioctl operations. At the present time, fs.exe calls CleanAcl() with a cell name and afs_shl_ext.dll does not. All callers in fs.c have been updated to use the new behavior. gui2fs.cpp also comments functions that exist in the file but have no caller. These can be removed at a later date if they are not required. Change-Id: Ibc5f411c6410769bdfeaf9e37b6d39a64958baff Reviewed-on: http://gerrit.openafs.org/4783 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 150e951dccdcc8a96866167f24233a8de8d45265 Author: Jeffrey Altman Date: Fri Jun 3 23:39:59 2011 -0400 Windows: Add GetFileInformationByHandleEx to fs_InAFS If available on the operating system, use GetFileInformationByHandleEx to translate the path into the file system normalized form. This permits paths that cross NTFS reparse points to be successfully evaluated as being in afs. For example: c:\afs -> \\afs\all GetFileInformationByHandleEx is integrated into Vista and Server 2008 and above. Change-Id: I57443b01c753f12665aaac5718f639e389e2e822 Reviewed-on: http://gerrit.openafs.org/4778 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 03810223b1b3267fb61df4806fb310a7592dff0a Author: Jeffrey Altman Date: Fri Jun 3 14:19:27 2011 -0400 Windows: refactor fs, symlink and fs_utils over the years a large number of duplicated functionality has been added to symlink.c and fs.c. Refactor both so all common functionality is implemented within fs_utils.c. Ensure that all functionality migrated to fs_utils.c and symlink.c uses the SafeString library functions. Update the build rules for afs_shl_ext.dll, afscreds.exe and afsconfig.exe to support the changes to fs_utils.c. Remove non-windows components from symlink.c. Change-Id: Ia7709235600f48c09282246e23b1f13d26f54e28 Reviewed-on: http://gerrit.openafs.org/4777 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8f186c0f7a48059ca561422d58073e22934ea2dc Author: Jeff Blaine Date: Sun Jun 5 16:38:53 2011 -0400 Remove completed tasks from todo list, add info about git/gerrit preference Removed completed tasks (fstrace subcommand help in-binary and issue with -noexecute vs. -dryrun in vos delentry) from todo list. Added info about git/gerrit preference for documentation help, but patches still allowed to the openafs-doc list. Change-Id: Ie49ee9a3072372163edf51f7abb246abef894f92 Reviewed-on: http://gerrit.openafs.org/4803 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1426bccc058c32c5367dfdf23bbe7a434800e58f Author: Simon Wilkinson Date: Mon May 30 17:39:56 2011 +0100 src/tests: Fix a couple of build issues Fix a couple of build problems with the old src/tests directory. Firstly, now that we're using asnprintf in libauth, we need to include libroken as a dependency here too. Secondly, the build rule for dumptool is wrong. Fix it. Change-Id: I2d9e2db169c617a323c71ac837045d2f36331321 Reviewed-on: http://gerrit.openafs.org/4805 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51f079e178b22595a990ed64cbe9a5b00e212421 Author: Simon Wilkinson Date: Mon Sep 27 11:51:20 2010 +0100 rx: Make private things private Make rxi_* functions that are only used within the file that they're defined in actually be private, rather than sharing them with the world. Change-Id: I67b9a36e8ce3fa0d3258842a8d7a5fed31c787ce Reviewed-on: http://gerrit.openafs.org/4804 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 80b3648e6d8fd96bdb57d47e56b28b30e42eb303 Author: Simon Wilkinson Date: Sat May 14 08:37:31 2011 +0100 rxperf: -S takes an argument The -S option to rxperf (which permits the maximum number of server threads to be set) takes a parameter. Update the getopt string so that we can give it one. Change-Id: I7effc276743d7007f8a376534b4de1650f731b64 Reviewed-on: http://gerrit.openafs.org/4801 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc119d63636236490789332200bf31af4c091e0a Author: Simon Wilkinson Date: Sat May 14 08:36:49 2011 +0100 rxperf: Build again Bring the rxperf up to date with the current library requirements of the rest of the tree. Change-Id: If35ba0668163d5176cf9a3df1635b4cffbc10ff2 Reviewed-on: http://gerrit.openafs.org/4800 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit af64a0e47194982b0ea203a072bfc1861f37d43b Author: Simon Wilkinson Date: Sun Jun 5 21:29:08 2011 +0100 volinfo: Use new form of cmd_AddParamWithOffset cmd_AddParmWithOffset was recently modified to change the order of its arguments to something clearer. Modify vol-info to use this new argument order Change-Id: Id94badfffb4c41cc13abd727e5674c18c58311fb Reviewed-on: http://gerrit.openafs.org/4802 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5fbea6da218092ef1942b5ffc8257d7b80311543 Author: Simon Wilkinson Date: Sun Apr 17 19:14:01 2011 +0100 viced: Rationalise FS_STATS_DETAILED logging Every RPC handler in the fileserver contained a copy of an identical code block to handle starting, stopping, and recording detailed logging statistics. Replace all of this with a structure and 4 helper functions, which will make maintenance much easier. Change-Id: Ie2b0fa13fcc3e261ba435f1560e7ab5adf477afb Reviewed-on: http://gerrit.openafs.org/4765 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 69a3ffa32337471dbc9d89477de4c27a643394a1 Author: Simon Wilkinson Date: Thu Sep 30 20:24:49 2010 +0100 usd: Move to using real 64bit quantities Move the usd library over to using afs_int64, rather than afs_hyper_t now that everything in userspace is assumed to be 64bit capable. Change-Id: I9ffc0996e1696d016dae96c0a2245cf5121c49a1 Reviewed-on: http://gerrit.openafs.org/4768 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit faaf36c32b8e24bf27c41c3ab8b774b3d5843ebc Author: Simon Wilkinson Date: Sun Apr 24 15:52:08 2011 -0400 viced: Remove old /vice/file/parms config file This commit removes support for overriding command line options with the contents of /vice/file/parms. This option has never been documented, and only supports setting at most 15 command options. Replace the old function with one which checks for the existence of this file, and outputs a warning if it is found. Change-Id: I933475c0eb31e78dbc8a9d31b2486aa14f57bfb0 Reviewed-on: http://gerrit.openafs.org/4716 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f64e1905798a70bdd44b4ce21d800a2bc542cee9 Author: Simon Wilkinson Date: Thu Sep 30 20:03:24 2010 +0100 usd: Make test program build again Make the USD test program build again. Note that this isn't much use unless you have a tape device connected to your machine. Change-Id: I01bae4035ef3db966d9f79fb5796e3608efa2cfd Reviewed-on: http://gerrit.openafs.org/4767 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 07f461e8e35147af605ebc86c139b31d2db0bb28 Author: Jeff Blaine Date: Fri May 27 15:49:52 2011 -0400 kvno invocation correction, language cleanup, afs/cell principal preferred Properly show kvno command syntax, add information about preferring 'afs/cell' for the principal over 'afs', and changed "noted this down" to "made note of" Change-Id: I56fca2e34ce18634a155c8eb3b21760f2ee990c6 Reviewed-on: http://gerrit.openafs.org/4740 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 23e433f10414d771937cbea5510b6006b6a7b063 Author: Simon Wilkinson Date: Tue May 31 08:31:55 2011 +0100 vos: print_addrs never receives multi-homed addrs The magic address that tells the vlserver that a host is multi-homed, and to look up the multi-homed address structure is an internal implementation feature, which shouldn't be exposed to clients. print_addrs is only ever called with the results of VL_GetAddrsU, which has already converted any multi-homed pointers, so it doesn't need the logic to handle them itself. Change-Id: If8b6fd6fc433f413c3f3037160979e10c9a45a39 Reviewed-on: http://gerrit.openafs.org/4757 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cc2bc3e17ff5f7a10c515e309f8fec47a6fa14b6 Author: Chas Williams (CONTRACTOR) Date: Thu Jun 2 19:00:47 2011 -0400 doc: let configure find the XML tools if possible configure should attempt to find the XML tools we need to process the documentation. if it can't, it should provide a safe default. still allow the user to override via command line. Change-Id: Ifaf3a5b090e93858c3d3c88363760c508030db90 Change-Id: Ib9558c37b04a4533e91b172a2a62039e4ed06d6f Reviewed-on: http://gerrit.openafs.org/4766 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit c0a55111d726b26d07661957a65e4d59f155d5e6 Author: Michael Meffie Date: Thu Sep 23 21:18:36 2010 -0400 xstat: cope with different size timeval structures In xstat_fs_test and afsmonitor, try to display the xstat data from the fileserver even if the fileserver has differently sized timeval structures, or different word ordering, as the xstat client program. Change-Id: I16f32b25f0017cdcf5e41e583eeb129469c3aeb0 Reviewed-on: http://gerrit.openafs.org/2986 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8c2e83bab199f5d8820e27c77c7a97cee9cdd965 Author: Simon Wilkinson Date: Tue Apr 19 08:18:56 2011 +0100 Linux CM: Update wait code Update the wait code to use the more modern wait_event_freezable() macros. If those macros are not available, fall back to the older wait_event_interruptible macro, and build our own wait_event_freezable on top of this. These changes should simplify our interactions with the wait queue and refrigerator bits of the kernel, as we're now using more standard interfaces to them. Change-Id: I5218c8a1b5b33f10355ef298008c53e416b267f9 Reviewed-on: http://gerrit.openafs.org/4753 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7a70c2907b0435653098a611a140fea1ac0b2fac Author: Simon Wilkinson Date: Sun Apr 17 23:43:51 2011 +0100 Linux CM: Use kernel allocator directly In another few locations within the Linux portion of the cache manager, directly use the kernel allocator. We can do so here because we can guarantee that the amount of memory being allocated is less than the page size, and there is a kfree() in all of the exit paths, so we don't need the magic freeing behaviour, either. Change-Id: I9c9f3a0b8243b66cb081cd2b35f0d27aaa378934 Reviewed-on: http://gerrit.openafs.org/4752 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: Derrick Brashear commit 45071f4bc0a8631eb6bd09c73a24de33714fa151 Author: Simon Wilkinson Date: Sun Apr 17 23:40:55 2011 +0100 Linux CM: Use kernel allocator directly for events When allocating memory for our events system, use the kernel allocator directly, rather than going via our shim. This is much more efficient, but has the drawback that we are now responsible for freeing our own memory, rather than it all being magically given back upon shutdown. Change-Id: I9cb31e4c6b5b4ff2497b627e7ab87716e6da6fa9 Reviewed-on: http://gerrit.openafs.org/4751 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 11407737f7b8335c52a000ea15cd3b3b4821f9bd Author: Simon Wilkinson Date: Sun Apr 17 21:41:15 2011 +0100 Linux CM: Files don't need a page We were using osi_AllocLargeSpace to allocate our files. This gives a page to every struct osi_file we create, which seems a little bit excessive. Just use kmalloc directly instead, and let the kernel's allocator deal with the slabbing. Change-Id: I40d32ad0d7090e2b3b60be983d4f441968dc69dc Reviewed-on: http://gerrit.openafs.org/4750 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a41dee091610d3acff04e73e21eb1ecbae0980b5 Author: Simon Wilkinson Date: Sun Apr 17 20:52:50 2011 +0100 libafs: Tidy up iovec allocation and trimming Tidy up the way that we perform iovec allocation and trimming by making the rest of the world look a little bit more like Darwin. This relies upon a struct uio, followed by 16 iovecs, being able to fit into a SmallSpace sized block. On the majority of 32 bit systems, such a block is 256 bytes long (on AIX and HPUX it is 152 bytes). With a 32bit size_t, an iovec is 8 bytes, so 16 of them is 128 bytes, and a struct uio is 24 bytes, giving a grand total of 152. Change-Id: I5243f034bcb4e1f5fa319c4f522229bd96eaae3d Reviewed-on: http://gerrit.openafs.org/4749 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ca465e432d67b067fc3854781b8702aaff577cc7 Author: Simon Wilkinson Date: Sun Apr 17 21:30:39 2011 +0100 Tidy up uio_t meaning On IRIX, uio_t is typedef'd to "struct uio". On Darwin, uio_t is typedef'd to "struct uio *". Reduce the confusion by just not using "uio_t" in places where it isn't being defined for us, and avoiding it completely in cross-platform code. Change-Id: I0cee370e25d10b1ca4627832097a9a9f1e83b4c2 Reviewed-on: http://gerrit.openafs.org/4748 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc Author: Jonathan Billings Date: Wed Jun 1 11:05:11 2011 -0400 linux: rpm: Fix SELinux attributes on /afs when installing openafs-client package Since the directory /afs isn't included in the package manifest, but rather created in a script in the openafs-client package, it never gets the appropriate SELinux attributes that are required to mount a volume (mnt_t). This change fixes the problem by running '/sbin/restorecon' (if it is an executable that exists) on the /afs directory after the openafs-client package is installed, right after the directory is created. Change-Id: I3905cf8da8f7414e410acfa8df51b35abe057cd7 Reviewed-on: http://gerrit.openafs.org/4763 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 1a4262253e78aa7a4e8c58006abd3301f71bab89 Author: Michael Meffie Date: Fri May 27 18:17:44 2011 -0400 volinfo: accept -sizeonly for -sizeOnly For consistency, allow -sizeonly (all lowercase letters) to request the size summary. The old option name, -sizeOnly is available as an alias. Define the command line option parameter positions and use those to set and look up the options. Change-Id: Ie6a780e02bfa35cd5399364bab614b260c391abc Reviewed-on: http://gerrit.openafs.org/4741 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8fc3d6dfe196771a38f2bfe7275e90a73f742931 Author: Michael Meffie Date: Fri May 27 12:22:34 2011 -0400 volinfo: accept vice partition id for -part option Accept a partition id for the -part option. For example, -part a is the same as -part /vicepa. Change-Id: I59d9cb71a49bbfc631c7975a859ebc3e5eccdf1a Reviewed-on: http://gerrit.openafs.org/4739 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6b0ad5786d09446d6ecf723c892c11d6cce4493c Author: Michael Meffie Date: Fri May 27 11:29:33 2011 -0400 volinfo: comments Add doxygen style comment headers. Change-Id: Id8e18a102e8aa5fbb0a0e0f3c58983d93bf2bb50 Reviewed-on: http://gerrit.openafs.org/4738 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8eddff4b785a196b2aae8be2d3a0e75fa3b6c0cf Author: Michael Meffie Date: Fri May 27 10:27:03 2011 -0400 volinfo: fix file size data type Use afs_sfsize_t for file size instead of int. Change-Id: If68fca11183cd7b3ecd3750609f1b989af7445f5 Reviewed-on: http://gerrit.openafs.org/4737 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 59a1c40efbd3326a210776a0253f4f6c656a65ee Author: Michael Meffie Date: Thu May 26 21:58:11 2011 -0400 volinfo: avoid exit on errors Instead of exiting on errors, try to carry on. Change-Id: Ia8da9403c57c19ac25a3ef4dac36c3e71bd1be25 Reviewed-on: http://gerrit.openafs.org/4736 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 277a8ad658572b60e7e460c945adee78cc04038d Author: Michael Meffie Date: Tue May 24 10:28:37 2011 -0400 volinfo: refactor mode variables Untangle the various global mode variables, which became muddled when dsizeOnly and saveinodes were introduced. DumpInfo now indicates the default mode and DumpVnodes means print the vnode entries, not scan but sometimes print. Remove unused globals. Change-Id: I9d331a19afede864ad1d23477f5e3948e59558ec Reviewed-on: http://gerrit.openafs.org/4735 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 56714e9a4d01d1718bbca9f3930c2993e4b7d094 Author: Michael Meffie Date: Sun May 22 22:53:46 2011 -0400 volinfo: refactor volume and vnode handling code Refactor volume and vnode handling code for better maintainability. Move the code invoked by -saveinodes to a new function. Remove an unneeded else clause in HandleVolumes. Change-Id: I02d9392ce065f78e5e84b902668b5d84242d7f5a Reviewed-on: http://gerrit.openafs.org/4734 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4e97b2e5f820e07ffbaf8407cca18c536d9d0f67 Author: Michael Meffie Date: Wed May 25 21:54:06 2011 -0400 volinfo: refactor size counters Put the volume, partition, and server size counters into structures. Change-Id: I3bb7a25b39e191b7717dc725604fe5fe1be8045c Reviewed-on: http://gerrit.openafs.org/4733 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 70145b4f4affc6aabf83fc1cc34cb4de0702c83f Author: Michael Meffie Date: Wed May 25 18:19:22 2011 -0400 volinfo: refactor -sizeOnly printing Refactor the -sizeOnly output processing to reduce code duplication and coupling with -saveinodes. Change-Id: I4d1c53678732afebba83813be676a292e2d8e62c Reviewed-on: http://gerrit.openafs.org/4732 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 55a41d00057106913ce2aba50772a56bc994a9a4 Author: Ben Kaduk Date: Tue May 31 15:25:35 2011 -0400 Enable gencat for i386_fbsd_* The machines certainly have a /usr/bin/gencat, and I see nothing in history to indicate a reason for this prevention. Allow the 32-bit machines to build afszcm.cat and make packaging more uniform between architectures. Change-Id: If1017d28cc804d58cfb29019158ad5b3d70da9ac Reviewed-on: http://gerrit.openafs.org/4760 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bcdcf5cf38951c09b39a6ef7561981f09792d03f Author: Simon Wilkinson Date: Mon May 23 06:24:09 2011 +0100 vlserver: Add flags to extent address entries Add a "flags" field to the extent address entry so that we can store per server bit flag information. Rename the header flags feel (and corresponding macro) so that it's explicitly a header flag. Take this opportunity to also fix this comment to clarify that the header flags are not a copy of anything from the vlentry, but that they must be at the same structure offset as the vlentry flags field (so that something accessing an extent block as if it was a vlentry can see what it is from the flags) Change-Id: If8a4816418d9400fb971679c08b4777e7d83c983 Reviewed-on: http://gerrit.openafs.org/4776 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a082c4eeaeacb537f3c94d2e37a98a2a0438f2a7 Author: Simon Wilkinson Date: Mon May 23 06:20:35 2011 +0100 vlserver: Make space in extent block explicit The address entry side of the union within the extent addr block actually has a significant amount of free space. It looks as though the original author assumed that a UUID required 16 32-bit words, rather than 16 octets, and sized the structure to match. Make the free space within the structure explicit, so that it can be used for future expansion Verified with gdb vlserver (gdb) print sizeof(struct extentaddr) $1 = 128 Change-Id: If67f669fb298763f054ce82447a4513c59ef7526 Reviewed-on: http://gerrit.openafs.org/4775 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9bd64f9941b07db240b9a6c0a04df06c082fa43 Author: Simon Wilkinson Date: Thu May 19 19:15:44 2011 +0100 vlserver: Rationalise multi homed host processing The same code for getting extent structures for multi homed hosts was scattered throughout vlprocs.c, sometimes with error handling, and sometimes without. Rationalise all of this into a pair of static inline functions, which do all of the hard work. Change-Id: Ib0f55e5b5f455b07753409ebff2a5cd0ca188cda Reviewed-on: http://gerrit.openafs.org/4774 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 90507fcb104313154679f89ac22c1947c713a65d Author: Simon Wilkinson Date: Thu May 19 18:56:27 2011 +0100 vlserver: Use correct memsets in vlentry convertor The various vlentry_to_ conversion functions have obviously been copy and pasted from each other. However, the size of the structure which is being zeroed has not been updated when we are zeroing different structures. Fix this, so that we always clear all of the structure that we are filling. Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66 Reviewed-on: http://gerrit.openafs.org/4773 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 41dc2509ba87c1778f02b4e0a1d24953e7956226 Author: Simon Wilkinson Date: Thu May 19 18:53:27 2011 +0100 vlserver: Clean up abort logic Clean up the failure logic in the server RPC handlers so that there is always a single exit point upon aborts. This should make it much easier to fix the various problems with cleaning up memory when RPCs fail. Change-Id: Ia5f8e97c37bf4aca1c8f2597a21eb54d1ba094fb Reviewed-on: http://gerrit.openafs.org/4772 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a180b0c5d8991a14f1fbd78d81dcb4754a24f4d3 Author: Simon Wilkinson Date: Thu May 19 18:19:29 2011 +0100 vlserver: Use correct base value when replacing When we're removing existing address entries the code calculates a base and index value for each entry that we're removing an address from. However, it then _uses_ a previously calculated base value, with the new index. This works fine if the old base and the new base match, but if they don't, chaos will ensue. Fix to always use matched base and index pairs. Change-Id: Ia592abdc1c58b5cf5776bb24e67aee708275a9b0 Reviewed-on: http://gerrit.openafs.org/4771 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7f457469f7934be4986703081e107d26525204a Author: Simon Wilkinson Date: Thu May 19 17:57:30 2011 +0100 vlserver: Rename errorcode to code The convention in the OpenAFS code is to use 'code' or 'ret' for return values from functions. Rename 'errorcode' in vlprocs.c to be in keeping with this convention. Change-Id: Idffd6eccdd820cb602e5c7cd66ebaa4fbd37c6b5 Reviewed-on: http://gerrit.openafs.org/4770 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a14e791541bf19c6c377e68bc2f978fba34f94b1 Author: Simon Wilkinson Date: Thu May 19 15:06:15 2011 +0100 vlserver: Tidy up request counting Tidy up the counting of requests and aborts in the vlserver. Don't hide a variable allocation within a macro, convert macros to inline functions, and make it possible to not count particular operations by passing in an opcode of 0. Change-Id: Ifd26027ebb97a6039b6f7f7289ffbe166627390b Reviewed-on: http://gerrit.openafs.org/4769 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4c9134a995f543911c1a62e6c89645bafee025a5 Author: Simon Wilkinson Date: Sun Nov 14 21:43:11 2010 +0000 Build system: Move install definitions to include Move the definitions of the INSTALL_* variables out to Makefile.config rather than replicating them in each file. Change-Id: I5f74dcbf544a93716994418bee3be2c51a2a82d0 Reviewed-on: http://gerrit.openafs.org/4781 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1841860f62a4a505f991b01713bd4eaa824aa4bb Author: Simon Wilkinson Date: Sat Jun 4 18:04:48 2011 +0100 aklog: Remove Windows specific code from header When commit 3f54c934b9c933d5f34644a096c821375db17d97 removed all of the Windows code from aklog, it missed the stuff in aklog.h. Get rid of this too, for clarity. Change-Id: I6d408ffc313d18fd512fa03494a15ec628f1e292 Reviewed-on: http://gerrit.openafs.org/4782 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cc72cb1e811f8cffca93c8b15009534cada776ba Author: Simon Wilkinson Date: Sat Jun 4 16:41:41 2011 +0100 ubik: Initialise global version lock before use Commit e4ac552ab79be21d90397079eaf6be7050497752 introduced a global version lock to ubik, but doesn't initialise this lock before make use of it. On platforms which require that pthread mutexes are initialsed, this causes an assertion failure. Initialise this lock at the same time as we MUTEX_INIT all of our other locks. Change-Id: Ib5ef75d443101a823738fba55c0760cb1848dbcf Reviewed-on: http://gerrit.openafs.org/4780 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Jeffrey Altman commit 64b255327dc6c2456ba4d4e28651b07819710a60 Author: Michael Meffie Date: Mon May 30 14:23:49 2011 -0400 cmd: Reorder cmd_AddParmAtOffset arguments Reorder the arguments of this recently introduced function to make client code more readable. Change-Id: I37f662f849bd96176230f75783e2a1c62d94b8c9 Reviewed-on: http://gerrit.openafs.org/4755 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman commit 13aeb1dcaee5ad4e95477464860963788c5d1469 Author: Michael Meffie Date: Mon Dec 13 14:53:50 2010 -0500 xstat: print collection values in debug mode Print the values of the integers returned in the collection data when the -debug option is given to xstat_fs_test and xstat_cm_test test programs. This allows us to at least see what the unformatted values are when there is a mismatch in timeval sizes between the host and client (aka the 32/64 bit xstat bug). This change could break scripts which call the xstat test programs with the debug option. New debug output are prepended with 'debug:' to be easily ignored. Change-Id: I12d8d27306c50fb9f35ade2a080b3bc20542b63f Reviewed-on: http://gerrit.openafs.org/2878 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7d76a5b4f9eb4c0ed9e09bbc3c54a4f1f8da1bdc Author: Rainer Strunz Date: Mon Apr 18 00:09:33 2011 +0100 fs: add support for relative ACL changes This change permits "fs setacl" to change ACLs in a relative manner, rather than just setting rights absolutely as it is done now. If a single plus (+) or minus (-) character is appended to the rights' letters argument, the new rights are computed relatively to the existing ones. A few examples should make clear that behaviour: old rights: rights set: new rights: ----------------------------------------------- rl a+ rla rlid idwa- rl rla write- a rl write- [none] (ie. entry deleted) [any] read= rl As shown in the last example, a '=' character got implemented also (and for free) as an alternative writing of the current and default behaviour of just setting an ACL. FIXES 123962 Change-Id: If15a4ab3c69ec44a42c8746a0b93f5e8b785d61e Reviewed-on: http://gerrit.openafs.org/4496 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 5ad1e6cb904b953fbb04603f3ce1466dcc38cd48 Author: Simon Wilkinson Date: Fri May 6 10:40:38 2011 +0100 dir: Prototype and function name cleanup Tidy up typing in the dir package, so that we have a specific type for a directory file handle. Also rename all of the functions to afs_dir_* globablly, rather than just renaming for kernel code. Change-Id: I6750a8eb9f0606d5debf9d677a92b9c8a63dbcf3 Reviewed-on: http://gerrit.openafs.org/4745 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0284e65f97861e888d95576f22a93cd681813c39 Author: Simon Wilkinson Date: Wed Apr 27 14:24:56 2011 -0400 dir: Explicitly state buffer locations for data DNew and DRead always returned directory page aligned pointers, however the directory code further manipulates those pointers, requiring the DRelease be able to fill a page when passed a pointer to any address within that page. This is relatively straightforward in the userspace implementation, but much more complex in the kernel, where all of the directory pages are not necessarily contiguous. Resolve this issue by making DNew, DRead and DRelease all return a new structure, struct DirBuffer. This structure contains both a pointer to the data, and an implementation specific private pointer to data describing the page containing the address. The directory code is free to play with the data pointer as it wishes, as long as the private pointer to the page is passed through intact. DRelease (and DVOffset) can then simply use the private pointer for their operations, without having to walk page lists. This new behaviour also requires changes to the directory functions GetBlob, FindItem and FindFid which all return pointers to directory data. Change-Id: I8b8b003b789976b593a7c752969f47d55f4ee707 Reviewed-on: http://gerrit.openafs.org/4744 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b3ea4fa4ff6408cd98d610022270a5099e08c128 Author: Simon Wilkinson Date: Mon May 30 20:11:49 2011 +0100 doc: bos != vos As it says on the tin Change-Id: I2c03f51303d01ccc772c1fc0b2ed1dd0b176892d Reviewed-on: http://gerrit.openafs.org/4764 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b6add117ad210665a811213fe17a30fabbda3a3c Author: Simon Wilkinson Date: Tue May 31 08:28:51 2011 +0100 vos: Don't leak/overflow bulkaddrs The vos listaddrs command repeatedly reuses a bulkaddrs array. It zeros it once (without freeing the allocated memory), and then repeatedly uses it without zeroing in a loop. This means that the XDR library assumes that a sufficiently large block is already allocated, doesn't reallocate for the incoming data, or check limits. This means that if the first call to VL_GetAddrsU returns a set of addresses smaller than subsequent calls, we'll write past the end of the array, causing memory corruption. Fix this by freeing the arrays correctly with each pass of the call. Change-Id: I540d369c1529ec3574548f42cbd48b6c2b38cebd Reviewed-on: http://gerrit.openafs.org/4756 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6af6a6a7cb497d4e255bed7ccf07a5db06d16b91 Author: Christof Hanke Date: Wed Jun 1 11:48:46 2011 +0200 libafscp: fix install/dest in sep. Objectdir When compiling libafscp in separate objdir, make dest and make install fail, because of wrong pathes. Fix it. Change-Id: Id2b672bce308609d99b343322babe890ec8d6a38 Reviewed-on: http://gerrit.openafs.org/4761 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 750b8659281988a138db6f26f53d747175895186 Author: Jonathan A. Kollasch Date: Mon May 16 14:30:24 2011 +0000 Port cache manager to NetBSD-5 and NetBSD-current Change-Id: I3d1aa0b22bb8533718f48bd4424743299d5de019 Reviewed-on: http://gerrit.openafs.org/4661 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ec26dae2bf32e4187e6eb5ffa0e68da143ed3713 Author: Derrick Brashear Date: Thu May 26 02:04:08 2011 -0400 macos: bulkstat sysctl make bulkstat enable/disableable via sysctl Change-Id: Ib1657964d62e402e96762394b7b61ed5e58a5fc9 Reviewed-on: http://gerrit.openafs.org/4723 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6260c4ae51e7a2807596ddf1bd49620f98eed94c Author: Adam Megacz Date: Fri Mar 23 12:14:41 2007 -0700 make bozo honor -rxbind correctly Bozo needs to call rxInitHost() rather than rxInit() when -rxbind is present. This patch causes it to read NetInfo/NetRestrict earlier in the startup process so it can make that decision. FIXES 57286 Change-Id: I17058f4e8e5c23fdfcfe56178d5edc5dcceafb7a Reviewed-on: http://gerrit.openafs.org/4729 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 7270cf5607e24f8614d75cd40bc46574d330ffab Author: Derrick Brashear Date: Thu May 26 01:39:18 2011 -0400 macos: bulkstat caller reference handling if bulkstat is called and fakes up vnodes for non-dir cases, it can guess wrong, and we end up needing to fix up the type by swapping in a new vnode under the vcache. however, references are tracked on the vnode, and more importantly, callers can know about the vnode; unlinking a vcache from a vnode leaves null pointers to blow up on. thing is, we shouldn't end up with a un-fixed-up vcache in use: any caller of ProcessFS will notice if the vnode is the wrong type, and fix it. so in order to reach CStatd, we have to fix it. the only places where we can get a vcache in use not CStatd are: FindVCache, LookupVCache, GetVCache where InReadDir. The last happens only on Linux. LookupVCache doesn't happen anywhere that matters (CForeign, or we immediately dispose...). FindVCache is only called somewhere which won't lead to us fixing up during create, but that vnode isn't returned to callers; we finalize in the result of create and return the vnode that's linked to the vcache, which will be correct. so, the only other place we can have a reference which won't immediately get fixed up is in lookup, across the bulkstat call. if that's true, and we return from bulkstat a non-CStatd vcache, lookup will fill in the entry manually. so, if there are references remaining after we do a fixup, unmark CStatd so the caller (presumably lookup, given the above) will give back the vcache and retry, getting a corrected vnode as a result, with the reference on the vnode we want it on. Change-Id: I3b225c8d48067624f3cbac7b1f897e52193a8d55 Reviewed-on: http://gerrit.openafs.org/4722 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7133266bafbf238ef921690c40846f3ea2d2fc8b Author: Christof Hanke Date: Thu May 26 07:46:32 2011 +0200 linux: add read_descriptor_t configure test and ifdef With linux 2.6.8 the struct read_descriptor_t changed. Add a configure-test and respective ifdef to deal with that. Change-Id: Iff1a6252707cd2119bdc0382c641934119ea0422 Reviewed-on: http://gerrit.openafs.org/4719 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit baf7656f666e0d47047c545561345e7803b8a141 Author: Christof Hanke Date: Wed May 25 22:16:59 2011 +0200 autoconf: add test for typedef'd structs AC_CHECK_LINUX_STRUCT does not work for structs which are typedef'd. The gcc will complain with "error: storage size of ‘_test’ isn’t known" and fail the test. Thus the new test-macro AC_CHECK_LINUX_TYPED_STRUCT. Change-Id: Ib3e933c4e09a3e950ca8d8e7a66909d86f10cfdf Reviewed-on: http://gerrit.openafs.org/4718 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit 9703b023cc0f5088eab5135acf7417e90ebbb2cd Author: Ben Kaduk Date: Thu May 26 01:11:14 2011 -0400 FBSD: VIMAGE support Starting in FreeBSD 8.0, there is support for multiple virtual network stacks (generally to be exposed to separate jail(8) environments). It is enabled as a kernel configuration option, so our builds against GENERIC have not failed, but we fail to build when options VIMAGE is present. Fix our variable references accordingly. Change-Id: I679361b8ea62b0eae90c0aa61287dfc2dd189481 Submitted-by: Hiroki Sato of freebsd.org Reviewed-on: http://gerrit.openafs.org/4721 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit cc0ba3c430ce57fb7155a22a8ed9fa6c9fa57eec Author: Andrew Deason Date: Mon May 23 17:04:20 2011 -0500 tests: Make -flag the first parm in command-t Move the -flag parameter to be the first parameter, to test more of the positional argument handling. Change-Id: I637c58e8c76bfc23919f29a1c598084275426773 Reviewed-on: http://gerrit.openafs.org/4710 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 9cbd9d71b33e42600d1714ebfcaaa86ba700556e Author: Andrew Deason Date: Mon May 23 16:51:59 2011 -0500 tests: Use symbolic constants in command-t Change-Id: I1d7e47edc97dcdb855ad5ca732a2f015741c9d18 Reviewed-on: http://gerrit.openafs.org/4709 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 83322372fb3d62225f0ac733f63d5dd21e8685c0 Author: Andrew Deason Date: Mon May 23 15:42:10 2011 -0500 tests: Correctly pass string args in superuser-t We need to give a NULL pointer for string OUT arguments, so XDR knows to allocate a new string. Also free the string each time so it gets set back to NULL. Change-Id: I1eb0c63dc4019b855a2cbecd9e35393f2fbb0fd7 Reviewed-on: http://gerrit.openafs.org/4708 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6e2ecfbeebc255c490b9f7da129405ac3f78dacc Author: Simon Wilkinson Date: Mon Apr 25 09:35:56 2011 -0400 cmd: Add cmd_OptionAsUint Add an accessor function which can return a unsigned int for an option value. Change-Id: I33bc9a2618191ca60b95086624100b54efb05ab2 Reviewed-on: http://gerrit.openafs.org/4652 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 70624fd2ab0e580b7a34e0e9f3a83fc0d59b53c4 Author: Andrew Deason Date: Mon May 23 17:11:28 2011 -0500 cmd: Fix parsing positional args If the first parameter of a libcmd syntax is a flag, cmd_Parse was skipping over positional arguments, since j will be 0 at this point (the j variable is only used if we're processing an explicit switch). Effectively revert this area to what it was before a2f1ca5fd52ac2fb7e68b101bbe3da9878c10474 so such positional parameters work again. Also move the j variable to inside the only block in which it is used, to try and avoid such mistakes in the future. Change-Id: Ifa52cecf50a3f561c70de351a9ebd026e90eeeab Reviewed-on: http://gerrit.openafs.org/4711 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba76149a57f0cfd92672580b7047a557f159ee52 Author: Jeffrey Altman Date: Mon May 23 13:26:20 2011 -0400 Windows: ChangeLog for 1.5.9906 (1.6.0pre6) Change-Id: Ie799849d3e538b98afc49e6003b6b0f595308da5 Reviewed-on: http://gerrit.openafs.org/4706 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b3004fbd5007d400a4cd3fb2a5b1c52d98618aab Author: Antoine Verheijen Date: Tue May 17 09:40:15 2011 -0600 Replace uintptr_t type cast with uintptrsz in afs_vcache.c A recent change (commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0) to afs_vcache.c contains a call to afs_warn() whose second parameter contains a "(uintptr_t)" type cast as part of a double type cast. This presents an issue on some systems, such as OpenBSD, where this object type is defined in a header that is not presently included. This change modifies that type cast to instead use the AFS-internal "(uintptrsz)" type which should provide the same effect. Note that an earlier version of this patch ateempted to remove the "offending" type cast as redundant but it was pointed out that some systems require this kind of cascading type cast when casting pointers to integers to deal with possible size issues. Change-Id: Iea81b2be1050a1c929978a99c518d86c6d1f2118 Reviewed-on: http://gerrit.openafs.org/4671 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 98a4a5498f39e242b4cd933694a4626e208f43c6 Author: Simon Wilkinson Date: Sun Apr 24 15:28:02 2011 -0400 cmd: Include aliases in help output Include any command aliases in the output from the -help option Change-Id: Ifb2ac96d9ba6fc64bffff69bac9480a6b7e8568e Reviewed-on: http://gerrit.openafs.org/4651 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4999ed13d2355743e07587c8d7c4d23cbc073c5f Author: Michael Meffie Date: Sat May 21 20:56:23 2011 -0400 volinfo: print namei filenames of index files On namei fileservers, also print the namei filenames of the volume special files when the -header flag is given. Change-Id: I90112f13d0f39348ee3862fdbdb55074e8877108 Reviewed-on: http://gerrit.openafs.org/4696 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ae27283550dab33704f30e18975722e0ed2c5424 Author: Michael Meffie Date: Sat May 21 12:06:43 2011 -0400 volinfo: remove code duplication in HandleVolumes Reduce duplicate code for processing volume header files when printing header details (-header) and calculating the volume size (-sizeOnly). Change-Id: I1f1d3b3d065901379c289065dfa1999e249662a4 Reviewed-on: http://gerrit.openafs.org/4695 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c833ff6c5b7f9c27cf26eae4833b033bd7382c56 Author: Michael Meffie Date: Sat May 21 12:38:03 2011 -0400 volinfo: fix volume aux totals output Do not print the volumes aux totals prematurely when running volinfo with the -headers flag on an namei fileserver. Instead print the aux totals only once after the link table size is found. Change-Id: I4538e2fc8978530fd2e8593e0b343a2497c7a764 Reviewed-on: http://gerrit.openafs.org/4694 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b7fe087745923bdea4571870799e484da67221d2 Author: Michael Meffie Date: Sat May 21 07:28:41 2011 -0400 volinfo: print errors to stderr Print volinfo errors messages to stderr instead of a mix of stdout and stderr. Print a consistent program name. Change-Id: Ifadae52d56a75ff7d73d639ff1dd893b1a926a28 Reviewed-on: http://gerrit.openafs.org/4693 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ababc1ba4412ae94b29f8ba0832eac087a024af2 Author: Michael Meffie Date: Fri May 20 14:44:39 2011 -0400 volinfo: fix size totals when saving inodes Fix the volume size calculation when volinfo is invoked with both -sizeOnly and -saveinodes at the same time. Change-Id: Ifafe6a128918500ac6fd5f9a1e39de2d4aff785d Reviewed-on: http://gerrit.openafs.org/4691 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e3fb2740ba20e78fdc93308b6a2843454a6d269c Author: Michael Meffie Date: Fri May 20 13:53:48 2011 -0400 doc: document volinfo -filenames option Add the namei -filenames option to the volinfo man page. Note this option as implemented implies the -vnode flag, but for consistency with the other fields that modify the default mode output, it is documented to be accompany the -vnode flag. Change-Id: I7cc5cdf5e74e65ca25ecc086e550a468b803b971 Reviewed-on: http://gerrit.openafs.org/4690 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 97070b425d4c6e4fa4944160c0e7a6965ebb8e75 Author: Jeff Blaine Date: Wed May 18 23:49:52 2011 -0400 Added -dryrun Added missing information about -dryrun option Change-Id: I17f9e8c54c1d12c84476c9d19da48b0a5219e623 Reviewed-on: http://gerrit.openafs.org/4680 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 33cb8a53fdc8907dafed2e77cc1da539d17397c5 Author: Michael Meffie Date: Wed May 18 13:42:27 2011 -0400 volinfo: fix -filenames option check Fix the logic for checking the presense of the volinfo -filenames option. The original patch inadvertently added the -filenames check as an if-else cause to the -orphaned flag check, which prevents filenames from being printed when listing orphaned vnodes. Change-Id: I070d796e7ea9c0f5df9cf92a17eaa4004444d423 Reviewed-on: http://gerrit.openafs.org/4689 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 04087af8494b90f664ac5f274d5db4c12063f238 Author: Derrick Brashear Date: Fri May 20 14:13:01 2011 -0400 macos: bulkstat redux simplify the logic which can require sleeps in various vcache resolution paths. instead of the two-pass system we had before, just guess using the even/odd hack what type a vnode will be. if a vnode turns out to be a link and thus we are wrong, we do a fixup later. other callers who "race" with bulkstat (which is a supported feature, otherwise you'd have to block callbacks) will also call through a fixup to get the correct backing vnode type. this is necessary as the KPI doesn't let us change the type of a vnode after it's been created. side effect: eliminate many of the ugly cases where we had been sleeping waiting for a vnode to be finalized even before bulkstat. Change-Id: Ib888fa5577d48354725ea72305765e4341bc2366 Reviewed-on: http://gerrit.openafs.org/4677 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0cf06f620213fa62abc16bf717779a1333ce12a0 Author: Derrick Brashear Date: Fri May 20 14:10:49 2011 -0400 dynroot: mark vnode types on dynroot vnodes when we create a vnode using a dynroot fid, we weren't bothering to update the type from the default (typically VREG); most dynroot vnodes are actually VDIR... Change-Id: I1c54e8c2a3c7ffd234f3247d38730062484fec87 Reviewed-on: http://gerrit.openafs.org/4686 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ca425b7d49a2bf4c079aa38c0abf68596eca0b30 Author: Andrew Deason Date: Thu May 19 17:02:35 2011 -0500 SOLARIS: Reset syscalls on mod_install failure If our call to mod_install fails for any reason (for example, if the afs entry is missing from /etc/name_to_sysnum), we may still have set the sysent structures for setgroups and ioctl to point at libafs code. So calls to those syscalls will cause a panic, since the code they point to is no longer loaded. To avoid this, just reset the sysent entries back to what they were if we fail to load, just like we do when unloading the module. Change-Id: Ia0d6691780c749a0f550e640783c093ae45604ac Reviewed-on: http://gerrit.openafs.org/4685 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 89b22dfe8659cd2e576cc2cd2b455598db59aacc Author: Andrew Deason Date: Thu May 5 15:10:54 2011 -0500 libafs: Implement unixuser RW locks Currently code dealing with changing unixuser structs does not obtain any locks protecting the contents of the unixuser struct, though some functions like afs_GetUser have a parameter indicating what type of lock should be obtained. This can result in the token data for a user being changed at the same time another thread tries to use the token data. To ensure mutual exclusion of such operations, add a lock field to the unixuser struct, and actually lock it according to the intentions of the relevant code. Change-Id: Idd66d72f716b7e7dc08faa31ae43e9a23639bae3 Reviewed-on: http://gerrit.openafs.org/4636 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a82c0cc4167b729108813965bd39bf86ea15e6b Author: Andrew Deason Date: Mon May 16 13:45:49 2011 -0500 libafs: Always use anonymous VL connections afs_NewVolumeByName was using the areq given by the caller for afs_SetupVolume, which may represent authenticated credentials. Give afs_SetupVolume &treq instead, which will be anonymous, so we don't have to deal with rxkad for VL lookups. Change-Id: Ie990028133173c312d2e5d9de4baa82b99cfdf7d Reviewed-on: http://gerrit.openafs.org/4666 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f1928b9d26cfc415911a2e4346fbfefb909745ac Author: Jeff Blaine Date: Wed May 18 21:46:52 2011 -0400 Hide -noexecute in favor of -dryrun Makes all previous -noexecute arguments hidden (still callable) and replaces them with -dryrun whose help text has been made common where appropriate instead of the 3 previous ways the argument was explained. Change-Id: I0ef3daa88dc771d972131358dc6e8a23ecd5a33b Reviewed-on: http://gerrit.openafs.org/4678 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3ce2742c96027259de7811016be4d7548172fa76 Author: Jeffrey Altman Date: Wed May 18 13:51:53 2011 -0400 auth: failback to afs3-vlserver for afs3-prserver If the DNS SRV lookup is for afs3-prserver or afs3-kaserver, fallback to a lookup for afs3-vlserver since those services are traditionally hosted on the same machine as the vlserver. FIXES 129887 Change-Id: Iec553415cd4f491ea5c32923c4023619bf6320e8 Reviewed-on: http://gerrit.openafs.org/4676 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 96cd4a1862261257ed662c70f5b476bbe5591899 Author: Jeffrey Altman Date: Sun May 15 21:56:17 2011 -0400 Windows: lock protected fields must be 32-bit It is not safe to protect two 16-bit fields in a structure with different locks. Switch to using 32-bit fields. Increment the cm-memmap version number since the data structure sizes changed and the cache file must be invalidated. Change-Id: I867b4b85b4fd9fe0083ad9d0559311f1c287513f Reviewed-on: http://gerrit.openafs.org/4660 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 586139140f5b28a99ae80faea099166f7dfe45b7 Author: Jeffrey Altman Date: Sun May 15 21:53:56 2011 -0400 Windows: add lock assertions to cm_buf.c add lock assertions to cm_buf.c in hopes of detecting why periodic buf_scacheHashTable corruption is being detected. Change-Id: I247ad7090a9484ae76b2e56f6f53ef8ee5af1abc Reviewed-on: http://gerrit.openafs.org/4659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 76554bfc21af5df44af6c821fbed166eb66f9e53 Author: Jeffrey Altman Date: Sun May 15 21:51:14 2011 -0400 Windows: test return from krb5_cc_start_seq_get If krb5_cc_start_get fails when using Heimdal, the cursor is invalid and it is not safe to pass it into subsequent functions. Change-Id: I65193fb63c33ddcbf741c21b40128785404ea920 Reviewed-on: http://gerrit.openafs.org/4658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 884d0b058cea4ad6c9338fc7842ea0c619cb263d Author: Ken Dreyer Date: Mon May 16 19:53:43 2011 -0400 doc: -afsdb uses SRV records afsd's -afsdb option now uses DNS SRV records (RFC 5864). Update the manpages to reflect this. Change-Id: I944df36717b53d8545765bde68c309e0229cfc79 Reviewed-on: http://gerrit.openafs.org/4670 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear commit ef0ac2fbb026385f2306189230c2cff8706dff06 Author: Andrew Deason Date: Mon May 16 15:16:30 2011 -0500 viced: Don't VTakeOffline_r without glock We don't have the volume glock, so don't call _r functions. Change-Id: I7779412fdf1333941d320234e64000dfbfed0f4f Reviewed-on: http://gerrit.openafs.org/4669 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6df5547a7b93af74bc49ec8d4678aafd646dda1b Author: Andrew Deason Date: Mon May 16 15:02:14 2011 -0500 viced: Check vnode length on Rename and Link Commit 2578555d7e08131bf2fe4cdd0aa4b32567a76eb2 added vnode length checks when we create or remove vnodes, but not during Rename and Link operations (when vnodes are neither created nor destroyed). Add the check in Rename and Link. Change-Id: I8008380a2b9e286d2dcdabaed5ceba97909dbb37 Reviewed-on: http://gerrit.openafs.org/4668 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 24ddd06a0dc19ad7c0b2a2847d41a5ea69665b15 Author: Andrew Deason Date: Fri Apr 15 14:18:57 2011 -0500 doc: Add aklog_dynamic_auth manpage Add a manpage for the aklog_dynamic_auth LAM module. Change-Id: Ibb8583401d565ca0caea7688ac797aa85a0d6869 Reviewed-on: http://gerrit.openafs.org/4485 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit aafdc08cfc49da4c23ecd91f9e690fd70e95df55 Author: Andrew Deason Date: Thu May 12 10:57:09 2011 -0500 viced: Enable NAT ping on hosts Turn on NAT ping on the Rx connection for the callback channel for hosts. This should help improve behavior for clients behind NATs and stateful firewalls, even for clients that predate NAT ping functionality. Change-Id: I0f8e801c2225560192de9c09bfa06d0387e29af3 Reviewed-on: http://gerrit.openafs.org/4646 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 0376255747ac17ed41afbc219f5a5978e58d8e9c Author: Andrew Deason Date: Thu May 12 10:21:09 2011 -0500 viced: h_SetupCallbackConn_r in removeAddress_r removeAddress_r has some code that is identical to the h_SetupCallbackConn_r function. Call the function instead. Change-Id: I3416dd1b5c94f0e836c2461771389045994e7152 Reviewed-on: http://gerrit.openafs.org/4645 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 38efda16a2c5c9e74b5a23b5bdd2818a3353eec2 Author: Andrew Deason Date: Fri May 6 13:12:17 2011 -0500 dasalvager: unlink fsstate.dat when standalone If the DAFS salvager is running in a standalone mode, unlink the fileserver's fsstate.dat file if any volumes change. Otherwise, volume data could have changed and the fileserver will retain callback promises for the data in those volumes until it tries to attach the volume. This way, callbacks are broken via callback state reinitialization. A better solution is to record which volumes have changed, and the fileserver can break callbacks for them on startup. But this at least eliminates a regression from non-DAFS behavior. Change-Id: Ie443e7d43705c3015d21bd3cad1b1e05c88562be Reviewed-on: http://gerrit.openafs.org/4638 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cf9ef0bed92f63406123ff6bc706cf1ce4758b20 Author: Simon Wilkinson Date: Sun Apr 24 15:29:37 2011 -0400 cmd tests: Initialise string retval The cmd_OptionAsString function attempts to free the previous value of the string passed to it. Make sure that we initialise the return value to NULL before passing it in in the test suite. Change-Id: I8500d5e6812f4d1655fc50618db472c745604e41 Reviewed-on: http://gerrit.openafs.org/4653 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0 Author: Andrew Deason Date: Tue May 10 14:16:06 2011 -0500 libafs: Flush vcaches in afs_shutdown Currently, a few platforms (linux, linux24, solaris, irix) flush all vcaches during shutdown. However, they do this before calling afs_shutdown(), resulting in afs_FlushVCache queueing VCBs and possibly trying to give the callbacks back to the server. Instead of this, perform the flushes in afs_shutdown itself, so we do this after we try to give up all callbacks to all servers, and we do this while afs_shuttingdown is set, so we don't try to queue VCBs. This also consolidates some of the duplicated code to flush all vcaches, and now does this for all platforms. Change-Id: I69c9e0862972f18ecc29ff709943d9a77f2db0a9 Reviewed-on: http://gerrit.openafs.org/4641 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 330cc7c83bf8470e1e63f6e6d514f1e82008f167 Author: Andrew Deason Date: Tue May 10 13:45:26 2011 -0500 libafs: GiveUpAllCallBacks at shutdown again Commit cee2c677d7de66a510d05978e3b41dcd5d8aca78 caused the cache manager to give up all callbacks at shutdown. But 76158df491f47de56d1febe1d1d2d17d316c9a74 removed the call to afs_FlushVCBs in afs_shutdown. Put it back. Change-Id: I74b815af485482ab83b9115772e4f4221a731f3e Reviewed-on: http://gerrit.openafs.org/4640 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ae638fa383b8270fe2461a2ad91b9101c74f3593 Author: Andrew Deason Date: Tue May 10 12:54:53 2011 -0500 libafs: Do not write-lock afs_xserver on ICBS Our RXAFSCB_InitCallBackState* handler currently write-locks afs_xserver when it clears the SCAPS_KNOWN flag for the relevant server. However, the afs_xserver lock is for protecting the global list and hash table of server structures, and is not necessary to acquire in order to modify the flags of an individual server struct. For instance, CkSrv_GetCaps does not acquire any locks to modify the server flags. Taking this lock conflicts with a read lock on afs_xserver acquired by afs_FlushVCBs when it traverses the list of server structures. afs_FlushVCBs may contact a server that then calls InitCallBackState on us, causing a deadlock if ICBS waits for the afs_xserver lock. So, avoid locking afs_xserver in this case, to avoid that deadlock. Change-Id: Id4dea74ce85726a3da07f738e301600f46059297 Reviewed-on: http://gerrit.openafs.org/4639 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 881aaf80cd2590925fad3eb4746ccd914e7ffd0d Author: Russ Allbery Date: Sun May 15 00:32:40 2011 -0700 Fix misspelling of writable as writeable Caught by Lintian in the strings in the butc binary, so I did a global search for any other occurrences. Change-Id: I5d5b433e716a62dc43d1c5376841e41d49e29ba5 Reviewed-on: http://gerrit.openafs.org/4657 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8ee33373c1ef24572476d8189a3f6f7505bfc83a Author: Marc Dionne Date: Sat May 14 20:57:12 2011 -0400 Linux: fix reading files larger than the chunk size Commit 2571b6285d5da8ef62ab38c3a938258ddd7bac4e fixed an issue with the use of tmpfs as a disk cache and ftruncate() on files in AFS. But it introduced a problem reading larger files as reported in RT ticket 129880. What should be compared against the current cache file size is the offset into the current chunk, not the overall offset for the whole file. FIXES: 129880 Change-Id: I93008c8d0b1d70785b0b8a2e4289a04ac06cbbef Reviewed-on: http://gerrit.openafs.org/4656 Reviewed-by: Russ Allbery Tested-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b983054f88d69ca4c0cda07e94103f216bd881d Author: Andy Cobaugh Date: Wed May 11 17:02:40 2011 -0400 rpm: Really undefine %dist rpmbuild --eval '%undefine dist' wasn't sticking on redhat 5.x. I think the correct way to undefine this is to --define 'dist %undefined' Some redhat 5.x installs have %dist defined depending on what else has been installed. Change-Id: I9ad6854a337c2085bb2db5e5f98e7d2f9889c4e4 Reviewed-on: http://gerrit.openafs.org/4643 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 050945e949135c1b98ed353fc05fcf9b8c1587bd Author: Marc Dionne Date: Sat May 14 13:19:52 2011 -0400 Linux: fix permission op test for certain compilers Some compilers complain that _inode is used uninitialised here. Since this test requires -Werror, it causes the test to fail and our permission op to be used in RCU mode, leading to lockups. Initialise it to make the compilers happy. Fixes a lockup seen on kernels 2.6.38+ on Gentoo and Debian. Change-Id: Id6325e3a5a918906d547d241a39de777fb394fdc Reviewed-on: http://gerrit.openafs.org/4654 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e4dc78845cec721013be4170231936ef371afe2f Author: Derrick Brashear Date: Thu May 12 10:59:53 2011 -0400 afscp: tellmeaboutyourself stub wants host byte order we get network byte order addresses from rx_getAllAddr; swap back to host order. Change-Id: Id0c5e70399422593c574958f905984c9edf8e6d4 Reviewed-on: http://gerrit.openafs.org/4644 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4b1e329e30421b47426137d8007afdf7e2e43918 Author: Jeffrey Altman Date: Mon May 9 10:46:46 2011 -0400 Windows: always try afs/cell@USER-REALM first In the KFW_AFS library, always try afs/cell@USER-REALM first, even when KFW_AFS_klog() is called with an explicit realm mapping for the cell. An afs service principal from the user's realm is always preferred. No cross realm and if the realm is AD, the ability to avoid the inclusion of a PAC. Change-Id: Ia29085e03d7c8a7c05e0c8d7991bc48b780b84fa Reviewed-on: http://gerrit.openafs.org/4633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f0fe7537e7ea1dadfed7b96c90361497e624cd8c Author: Jeffrey Altman Date: Mon May 9 10:45:33 2011 -0400 Windows: support dotted names in aklog Do not reject dotted principal names if the registry configuration states that they should be accepted. Change-Id: I675bec085f61ae2f5dc1cfd93a811655f87e0577 Reviewed-on: http://gerrit.openafs.org/4632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 010fc998a51a0aae2499b128ee8c671885a84e13 Author: Andrew Deason Date: Thu May 5 17:13:21 2011 -0500 libafs: Put back GetCapabilities user reference afs_GetCapabilities gets a user reference for the conn for the GetCapabilities call. Put the ref back so we don't leak refs. Change-Id: I46304ea13c3d78216641f468718b23b665d046ff Reviewed-on: http://gerrit.openafs.org/4626 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 03f0c656c1734b9be4debdf19b8f10771ff4420a Author: Andrew Deason Date: Thu May 5 11:18:08 2011 -0500 libafs: Get rx conn ref with afs conn ref When we get a reference to an afs_conn with afs_Conn and its variants, we assume we can use the tc->id rx connection without holding any locks. However, if tc->forceConnectFS gets set, the tc->id connection can be destroyed and recreated out from under us. So, to avoid using a possibly freed rx connection, grab a reference to the rx connection at the same time as we grab a reference to the afs conn. And also put back the same reference with afs_PutConn. Change-Id: I442886ee89c6f3fa609e47261317e647e124eecc Reviewed-on: http://gerrit.openafs.org/4625 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cf1d9771f4782781fd35ed68dd9736242c27fc8e Author: Jeffrey Altman Date: Fri May 6 09:49:52 2011 -0400 Windows: replace CYGWIN envvar with CYGWINDIR The environment variable CYGWIN (starting with cygwin 1.7.1) is now used by CYGWIN to set configuration parameters for the cygwin runtime library. OpenAFS used it to indicate the location of the Cygwin install directory. Since there is a conflict, rename CYGWIN to CYGWINDIR. Change-Id: I98f6a7095ede4c6a91dd71d48312b0d1a55b8091 Reviewed-on: http://gerrit.openafs.org/4629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6c825ddd806b5ace6323b36988ab085eb8944ce0 Author: Jeffrey Altman Date: Thu May 5 20:36:38 2011 -0400 Windows: change log for 1.5.9905 Change-Id: If230ae5f0dcb811954130e118fc0ae81dc396111 Reviewed-on: http://gerrit.openafs.org/4627 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1f48bc7a30d5df88a1e5f539ee22df3952533a88 Author: Andrew Deason Date: Thu May 5 11:37:12 2011 -0500 libafs: Correct afs_LoopServers flags AFS_LS_DOWN was actually checking up servers, and AFS_LS_UP was checking down servers. Fix the handling of the 'adown' flag so we do the right thing. Also make afs_FlushVCBs use the symbolic name for adown. Change-Id: I601faf1bb712a2f76f0bb2447530af38111a71fd Reviewed-on: http://gerrit.openafs.org/4624 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a8e7cf15d1d0e772041adda1973bb141b95572f7 Author: Jeffrey Altman Date: Wed May 4 19:53:22 2011 -0400 vol: switch to rk_closesocket Use roken's rk_closesocket instead of #ifdef AFS_NT40_ENV conditional tests. Change-Id: I3602705cea61f07b0e05c633ab57125e43cde506 Reviewed-on: http://gerrit.openafs.org/4623 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit cb6cd6484edc0e026fe15e11fe86b9dcf106568d Author: Jeffrey Altman Date: Wed May 4 14:41:03 2011 -0400 afscp: use closesocket when closing sockets close() is not portable to platforms where a socket is not a file descriptor. Change-Id: I7077643f45b969f8aa274f4fbb0dfbf375d6542f Reviewed-on: http://gerrit.openafs.org/4620 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9c4772b7175a0bc85844c9b8bb8bdcd26bbce8c Author: Russ Allbery Date: Mon May 2 14:54:35 2011 -0700 Further fix gssapi.m4 for Heimdal without libroken The gssapi.m4 fix for Heimdal without libroken was incomplete. It now doesn't attempt to link with libroken when probing for GSS-API symbols. Thanks, Antoine Verheijen. Change-Id: Ie994c321f68d7ffba96d2cf31dcf287be8546121 Reviewed-on: http://gerrit.openafs.org/4607 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 48633351c597278d4c8efd5a80163f0637c85aaf Author: Jonathan A. Kollasch Date: Mon May 2 21:06:34 2011 +0000 NetBSD: DEBUG can not typically be defined Like IRIX 6.5, some NetBSD kernel structures change size in the presence of the DEBUG preprocessor symbol. Change-Id: I3c5acba7afd22be9b179f628dfa0c1c402c08e2a Reviewed-on: http://gerrit.openafs.org/4605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 350786b3e092150a91bb4542263f648d683e3b7c Author: Jonathan A. Kollasch Date: Mon May 2 20:03:50 2011 +0000 NetBSD: translate timeval structure format in clock_GetTime() Change-Id: I4fb81a5b809437786064402b3ced0b1659d4476b Reviewed-on: http://gerrit.openafs.org/4604 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 047cc473037efa62fa7698878e055ca4665e85ef Author: Andrew Deason Date: Wed Apr 27 16:24:46 2011 -0500 viced: Improve deleted client log messages Change the information logged related to deleted clients to be a little more useful. In particular this includes adding the client and host refcounts, to help see if the cause is a reference count leak. Change-Id: Iba156fb32a4838cdbd567ca4e55072337c63ba67 Reviewed-on: http://gerrit.openafs.org/4583 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b2c6a850738437256626e0dfe743a09224879ad4 Author: Andrew Deason Date: Wed Apr 27 15:36:44 2011 -0500 viced: Do not try to reuse deleted client When h_FindClient_r encounters a deleted client structure, it does not try to find a different client structure to use. Force it to use a new client structure by setting client to NULL when it detects a deleted client. This arguably reverts part of 4e55e30f5b2c149b350b6d6875793adf722fdc21, but the code paths in h_FindClient_r are very different now, so that commit is probably not too relevant. Change-Id: I8e5004c8a9a3d99919da8df4436e5aa97e338825 Reviewed-on: http://gerrit.openafs.org/4582 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 230869eba8d651a54a6b58a6a69e05ef058bfe33 Author: Jonathan A. Kollasch Date: Mon May 2 18:32:29 2011 +0000 Remove unused variable Change-Id: Ib91cf666f3b66b9d8aae7bfcab290e6fede61280 Reviewed-on: http://gerrit.openafs.org/4599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 66db3f38da5527d67631d85fd3ff5a9c77cc1f11 Author: Jeffrey Altman Date: Sun May 1 00:11:13 2011 -0400 Windows: Fix caching of non-existing vols In cm_UpdateVolumeLocation() the conditional that would trigger the immediate return of CM_ERROR_NOSUCHVOLUME was backwards which prevented the caching from working. cm_CheckOfflineVolumes() is called by the daemon thread to reset the status of offline volumes. Non-existing volumes are by definition offline and cannot be brought online. Therefore, the cm_CheckOfflineVolumes() function should skip volumes with the CM_VOLUMEFLAG_NOEXIST flag set. Change-Id: If4093132322e7dd02d71c0f18d6492abbea53e01 Reviewed-on: http://gerrit.openafs.org/4597 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1096c2db638052c5ddcc6f6a01a1513d947a7268 Author: Andrew Deason Date: Thu Apr 28 16:13:20 2011 -0500 Add missing LIB_roken references With the usage of asprintf in libcmd, some more binaries require libroken to link. Add LIB_roken to their link lines. In src/venus for the fstrace rule, this causes the HP-UX case to be identical to the default case, so just remove the HP-UX special case. Change-Id: Ib4677b17a194cf79742bd5767d3f5cf2442973d3 Reviewed-on: http://gerrit.openafs.org/4590 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit fd545c51fe34b1452f09d4fbf6458f5b1557e895 Author: Derrick Brashear Date: Fri Apr 29 03:59:19 2011 -0400 avoid downward vcache pressure when entries are free we try to keep VCACHE_FREE entries free. if there's already that many free, do nothing. Change-Id: I7e92430329a17250f94d0435de7641fa331dd461 Reviewed-on: http://gerrit.openafs.org/4595 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 76158df491f47de56d1febe1d1d2d17d316c9a74 Author: Andrew Deason Date: Tue Feb 15 12:04:32 2011 -0600 libafs: Drop xvcache for AllocCBR Normally when we AllocCBR, we are holding xvcache write-locked, since it is called from FlushVCache. Before a309e274632993c5aeec04c6e090f5ac95837a40, when AllocCBR needs to flush CBRs due to a lack of space, we hit the net, giving up callbacks on fileservers. This can cause a problem if one of those fileservers needs to contact us in order to complete that request, since the callback service thread may be waiting for xvcache, causing a deadlock (that is eventually broken by network timeouts). To avoid this, drop xvcache if AllocCBR looks like it does not have sufficient space. Fix all callers of afs_FlushVCache to handle the case where we sleep, since with this change, afs_FlushVCache can sleep on all platforms. This partially reverts a309e274632993c5aeec04c6e090f5ac95837a40, as it contains an alternative method of avoiding the xvcache lock in this situation. This commit restores much of the code path to be much more similar to how it used to be, except that it allows for dropping xvcache for AllocCBR. This should make any change to our prior behavior smaller/simpler, and thus safer and more consistent with existing clients. This reintroduces the hard limit to how much space we allocate for CBRs, although the part of a309e274632993c5aeec04c6e090f5ac95837a40 that raised this limit is retained. Change-Id: Id4aaa941b3908f59390873e83e23429041c0828f Reviewed-on: http://gerrit.openafs.org/3958 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2a2206bfe16815a6625fee4d37520e9676d88ab4 Author: Andrew Deason Date: Thu Apr 28 11:48:18 2011 -0500 libafs: Use vcount, not maxvcount to trim vcaches Every five minutes we afs_ShakeLooseVCaches to try and return the number of vcaches in use down to the originally configured -stat level (when we are using dynamic vcaches). We should calculate how many vcaches to flush based on the number of currently active vcaches (afs_vcount), not the peak number (afs_maxvcount). Otherwise, once we exceed the configured -stat level, we will always keep trying to flush numerous vcaches, even if we barely have any vcaches in use. Change-Id: I875fc1d33c817dde2230946b852bb74f8ffd84c2 Reviewed-on: http://gerrit.openafs.org/4584 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 92825d6d65dad47c86bee7b3e57618e983e6cf47 Author: Russ Allbery Date: Thu Apr 28 13:00:43 2011 -0700 Resync test harness with C TAP Harness 1.7 Includes the following upstream changes: Add a more complete usage message to runtests and add support for a -h command-line flag to display the usage message. is_double() now takes a third argument, an epsilon. Two numbers are considered equal if their absolute difference is less than epsilon. is_double() also now treats wanted and seen values of NaN (not a number) as equal. Thanks to PICCA Frédéric-Emmanuel for the proposed changes. The ok_program function in the shell libtap.sh library no longer strips text after a colon and a space from the program output if the expected status is non-zero. Instead, if program output may contain system-specific error messages after a colon and a space, put the new function strip_colon_error before the program to do this stripping. Thanks to Carsten Hey for the idea. strip_colon_error is now smarter about preserving an initial word ending in a colon (which is generally the program name) while still stripping error messages later in the line. The test_file_path function in the shell libtap.sh library now always returns the empty string, rather than possible absolute paths starting at /, if $BUILD and $SOURCE are not set. Flush standard error in the C TAP library before printing results for more deterministic output. Thanks to Carsten Hey for the idea. All of C TAP Harness now compiles with gcc -ansi -pedantic and should be fully C89-compatible. Note that either C99 or SUSv3 is required to build C TAP Harness. (This should not be a problem on any modern platform.) Based on work by Carsten Hey. Simplify and improve output formatting in the summary of failing tests in some edge cases. Add explicit license statements to the files meant to be copied into other packages rather than referring to LICENSE. Add a test_file_path() function to the basic C and shell TAP libraries, which searches the build and source directories for a particular file and returns the full path. This is a utility function that can be used to find test data files. Change-Id: I3ef84218f0e3a8b75f550c8b629b058330659b31 Reviewed-on: http://gerrit.openafs.org/4589 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e88e369c92e8a0c4bedd136edadb21d99988d587 Author: Russ Allbery Date: Thu Apr 28 16:10:23 2011 -0700 Fix various build problems with the test suite The cmd/command-t test requires libroken and was misspelled in the TESTS file. Multiple tests require LD_LIBRARY_PATH to be set to find libafsroken if it hasn't been installed, so set it when running runtests via make check. (Note that this means runtests -o will not work properly unless the user also sets LD_LIBRARY_PATH.) Change-Id: Ib64f0505b3b75db33adb6c7b6452dcaac0b05dbc Reviewed-on: http://gerrit.openafs.org/4594 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit dc3da0677264781bc99d079abfe35cd628113928 Author: Russ Allbery Date: Thu Apr 28 12:56:11 2011 -0700 Resync Autoconf macros from rra-c-util 3.3 This includes the following fixes: * Include krb5.h before probing for the IBM-specific header file for obtaining error strings to avoid Autoconf warnings on AIX. * Use [] to mark empty arguments to Autoconf macros. * Add an explicit license statement to these Autoconf macros, matching the normal Autoconf macro license. * Ensure rra_use_kerberos is always set so that other parts of configure can rely on it. Change-Id: I521d38ad6834808cf09c798aeba0efc0dd741fd6 Reviewed-on: http://gerrit.openafs.org/4588 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d6d5dfb60feb3fdbf4ac7b035730859eb7fb89e Author: Russ Allbery Date: Thu Apr 28 12:50:35 2011 -0700 Resync src/cf/gssapi.m4 with rra-c-util 3.3 (fixes OpenBSD) Resynchronize src/cf/gssapi.m4 with rra-c-util 3.3. This includes the following fixes: * Handle the Heimdal GSS-API library on OpenBSD, which does not have a separate libroken. Thanks to Antoine Verheijen for the analysis. * Search /usr/kerberos/bin for krb5-config even if that isn't on the user's PATH to find krb5-config on some Red Hat versions. * Use [] to mark empty arguments to Autoconf macros. * Add an explicit license (matching the normal Autoconf macro license). Change-Id: I6934ebcb3bfb0d763713aef159484b08849d4985 Reviewed-on: http://gerrit.openafs.org/4587 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit c7212aaaf155f60e28bf592a13e5a50c960e5017 Author: Andrew Deason Date: Thu Apr 28 13:55:09 2011 -0500 doc: Fix 'vos endtrans' copyright SNA owns this, not me. Change-Id: I0ca601504467b825fffeca5a0529a2a529e37383 Reviewed-on: http://gerrit.openafs.org/4586 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit af175ce2c7a4785ef1992d096adfdb27daa86ee4 Author: Andrew Deason Date: Wed Apr 27 14:23:43 2011 -0500 viced: Avoid ref leak on origin callback break When breaking a callback, sometimes we send a callback to the host that performed the callback-inducing operation. When we do this, currently BreakCallBack gives the origin host structure to MultiBreakCallBack_r, which avoids releasing that host after the callback is broken. However, BreakCallBack obtains a reference to every host to which it delivers a callback, even if it is the origin host, so a reference is leaked. Fix this by not ever passing a host to MultiBreakCallBack_r, and just have MultiBreakCallBack_r release a reference for every host to which it delivers a callback break. FIXES 129376 Change-Id: I88503f29f80d4233c062ff448fc4d912e401e8e4 Reviewed-on: http://gerrit.openafs.org/4581 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9a4e3ade396583d412a85c4e03238d18d5c533ee Author: Andrew Deason Date: Wed Apr 27 13:51:23 2011 -0500 viced: Transfer host ref in h_FindClient_r In h_FindClient_r, we can change which client structure we're dealing with if we find a different client struct in the Rx conn-specific data. We adjust the refcounts for the client structures themselves, but not the associated hosts. While the host structures should be the same most of the time, we are not guaranteed that, so adjust their refcounts as well. Change-Id: I01f447da3dd2dd4306525b99049c4cd7e27f5181 Reviewed-on: http://gerrit.openafs.org/4580 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7d72a8c5c4b9df417c9337c01e8a7f26d8f6280b Author: Derrick Brashear Date: Mon Apr 25 22:23:40 2011 -0400 IRIX: set vfs pointer when creating new vcaches add missing call to set our vfsp on irix. Change-Id: Id3b1c3d088e59ed535c20ef7516ce93004e78bff Reviewed-on: http://gerrit.openafs.org/4561 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a2f1ca5fd52ac2fb7e68b101bbe3da9878c10474 Author: Simon Wilkinson Date: Wed Apr 20 22:26:14 2011 +0100 cmd: Support splitting switches and values with '=' Some of our code uses arguments of the form -name=value. Add support to libcmd for dealing with this type of argument, where name is declared as CMD_SINGLE (or CMD_SINGLE_OR_FLAG) Change-Id: Ifb7486abc4f6bf26594936ef11749c4fe29a2e9b Reviewed-on: http://gerrit.openafs.org/4547 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 931a5696cbbf58504e8daf92f7c072b81ee93e7c Author: Simon Wilkinson Date: Tue Apr 19 19:59:13 2011 +0100 cmd: Tidy up -help output Tidy up the output that comes from cmd's -help option by wrapping at 78 characters, and picking the breaks sensibly. This changes: Usage: ./vos move -id -fromserver - frompartition -toserver -topartition [-live] [-cell ] [-noau th] [-localauth] [-verbose] [-encrypt] [-noresolve] [-help] to... Usage: ./vos move -id -fromserver -frompartition -toserver -topartition [-live] [-cell ] [-noauth] [-localauth] [-verbose] [-encrypt] [-noresolve] [-help] Change-Id: I494c287a9370d052763b464df33e69a936edef71 Reviewed-on: http://gerrit.openafs.org/4546 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d0d8b391b0c634f44cb019fd73fddf6ee523cfaa Author: Simon Wilkinson Date: Tue Apr 19 19:37:37 2011 +0100 cmd: Add support for params with optional values Add the CMD_SINGLE_OR_FLAG option which permits a parameter to either have a single value, or no value at all. If it has no value, then it behaves in the same way as the current 'flag' implementation. Change-Id: I49cf313f1d3b9c369f87b1ff66bfcc038b8aa08a Reviewed-on: http://gerrit.openafs.org/4545 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f8570d2b64e72d20c31c29878de0e737cf59dec3 Author: Simon Wilkinson Date: Tue Apr 19 12:20:14 2011 +0100 cmd: Add parameter aliasing Add support for adding aliases for parameters, in the same way as we can for syntaxes. This allows multiple different names for a single option, as well as providing a way around problems with abbreviations. Aliases may not be abbreviated. Change-Id: I5c440cf006cd5fd0065ecf1e54213745428063f7 Reviewed-on: http://gerrit.openafs.org/4544 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit da68fb9d1ce7adb3a800c402462b0872c769a609 Author: Simon Wilkinson Date: Tue Apr 19 11:41:54 2011 +0100 cmd: Add accessor functions for options Add a load of accessor functions to help with pulling values out from the the cmd_syndesc structure. The idea here is to make it simpler to manipulate command line values, as well as starting to hide the structure of the cmd_syndesc structure from callers, with a view to eventually making it private to the cmd library. Change-Id: I38757d776364ceacd43e98fda16e995da35da65c Reviewed-on: http://gerrit.openafs.org/4543 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit fae24dabd0f4ae2d072e6a569f7f1f83a8df1d4e Author: Simon Wilkinson Date: Tue Apr 19 09:01:25 2011 +0100 cmd: Add option to add a param at a specific pos Rather than having to use cmd_Seek, followed by cmd_AddParam, followed by another cmd_Seek, add a function which permits parameters to be added at specific reference points. This allows programs to declare a list (either as an enum or specific #defines) of parameter code points, rather than using raw numbers. Change-Id: I25c0d501e678aa2818d296c776d8c5d03b8cdabe Reviewed-on: http://gerrit.openafs.org/4542 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4aff5a87c2ff2dcff20eaed9bc58c9c8b5edad70 Author: Thomas L. Kula Date: Sat Feb 5 20:11:56 2011 -0500 Add -usetokens option to libadmin test 'afscp' This adds a -usetokens option to poorly named libadmin test 'afscp' program. If called with this flag, 'afscp' will assume you have already acquired tokens, and will fetch and use them. If ran with the -authcell option, it will look for tokens for that cell, otherwise it will look for tokens in the local cell. Since the function used to fetch local tokens is incompatable with the kas functions, all of the kas commands have been modified to complain and exit if any of them all called with -usetokens. Fixed whitespace, again. Change-Id: I4f9bcbae42f6eb179168bb5d152ed36df3db8dd5 Reviewed-on: http://gerrit.openafs.org/3899 Reviewed-by: Derrick Brashear Reviewed-by: Dan Hyde Reviewed-by: Steve Simmons Tested-by: Derrick Brashear commit 79d5b5cce65b10134004c4cb2b7b34ac509cba6a Author: Simon Wilkinson Date: Mon Apr 25 14:18:39 2011 -0400 Linux: Don't read pages beyond the cache eof If we attempt to read past the end of the current cache file (for example, when we're extending the file with ftruncate), don't force the backend filesystem to populate that page with non-existent data. This will hopefully fix a bus error when using tmpfs as a backing cache. FIXES 128452 Change-Id: I087aa1587885e97493130e5d05db6a1ed961181a Reviewed-on: http://gerrit.openafs.org/4562 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 64c92b24447aa1a86a4557d6bab3a72b38640fce Author: Andrew Deason Date: Tue Apr 26 14:44:46 2011 -0500 Build libafscp when we lack kerberos Currently, venus fails to build without kerberos, since the dependencies for afsio always include afscp.h, which does not exist when we do not build libafscp. To fix this the easy way, and since libafscp is still very useful without kerberos, allow libafscp to build without kerberos support (which limits it to anonymous connections only). Change-Id: Ief620ca99223f195795dcbe746b47fcbfa2e7450 Reviewed-on: http://gerrit.openafs.org/4577 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit f314dae7fdd06d80bd8d0f333fd8ace36708d28a Author: Simon Wilkinson Date: Tue Apr 26 15:48:32 2011 -0400 Irix: Add a simple osi_ReadRandom implementation Add an implementation of osi_ReadRandom for Irix, which just panics (Irix has no source of cryptographically safe entropy in the kernel). Whilst hcrypto requires an implementation of osi_ReadRandom, nothing in the current kernel module will cause it to be called, so this panic should never be reached. Change-Id: I7aa52f445182f8e660586241304a7379770afcaa Reviewed-on: http://gerrit.openafs.org/4575 Tested-by: BuildBot Reviewed-by: Chaz Chandler Reviewed-by: Derrick Brashear commit 9d547f2485791b10dbf3676e997353ca9abefde1 Author: Marc Dionne Date: Sat Apr 16 16:38:45 2011 -0400 src/afs: Set but unused variables warning fixes Fix a few simple cases of set but unused variables under src/afs. Change-Id: I78964b7128590d5db1f2c01dd7157c23966c26a0 Reviewed-on: http://gerrit.openafs.org/4491 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 9b405a7b082a8498fb6e918df73482ad05e251ea Author: Andrew Deason Date: Tue Apr 26 14:32:25 2011 -0500 Fix --without-krb5 Currently, specifying --without-krb5 causes the AM_CONDITIONAL KRB5_USES_COM_ERR to not be defined, which makes configure refuse to run successfully. Fix this by forcing KRB5_USES_COM_ERR to always be false if we are running explicitly without krb5. Change-Id: I96274847a3dbbb8436ef04f24476606cb15c6618 Reviewed-on: http://gerrit.openafs.org/4576 Reviewed-by: Russ Allbery Tested-by: BuildBot commit 5562fbd3046ec6736d3d5b4ebbaaf4fd175aa4d4 Author: Simon Wilkinson Date: Tue Mar 1 14:59:55 2011 +0000 Rewrite asetkey to support extended key types Rewrite the asetkey binary so that it can support managing extended key files. Change-Id: Iad53e8cd4c193d8410d5f85d46d72629399b3189 Reviewed-on: http://gerrit.openafs.org/4574 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 675bd1007de6594321c03d6f92261f909120643f Author: Chaz Chandler Date: Tue Apr 26 16:49:39 2011 -0400 afsio: remove unnecessary reference to malloc.h Fixes breakage on freebsd for missing malloc.h, reported by GAWollman, and, since roken.h already includes stdlib.h to pull in malloc, is no longer necessary Change-Id: Ie7785198124fe0dee394d7c15f032f0dadb6db8c Change-Id: I1d5947155ba33de61d8fd23197e11c51e4791935 Reviewed-on: http://gerrit.openafs.org/4578 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit e9ac2cdf0125b802f4de4fffa1863a5b557dc807 Author: Marc Dionne Date: Fri Apr 22 22:23:21 2011 -0400 ubik: add uvote_HaveSyncAndVersion Add a new function uvote_HaveSyncAndVersion() that combines the logic from uvote_GetSyncSite and uvote_eq_dbVersion, without releasing the vote lock in between. Make use of it in urecovery_AllBetter. Change-Id: Ia44337da0f4335bd312cd686904f633ac19f1b63 Reviewed-on: http://gerrit.openafs.org/4526 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9020e6e2f0357b1082705dcaa6626573433969ec Author: Marc Dionne Date: Fri Apr 22 21:24:34 2011 -0400 ubik: Defer updateUbikNetworkAddress until after RX startup The beacon package initialization has been moved to precede starting RX services, but the broadcast of addresses to other servers should be deferred until after RX is started. Make updateUbikNetworkAddress an exported function and call it from the general initilization sequence. Change-Id: I903398ed275f460cc8373340eed9dac6a560e1da Reviewed-on: http://gerrit.openafs.org/4525 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 89cdb34920e2e01adf045611ffd4d94abdbef87a Author: Marc Dionne Date: Sat Jan 29 14:37:23 2011 -0500 ubik: locking in recovery.c Locking changes in recovery.c: - In urecovery_Initialize, hold the DB lock over ReplayLog and InitializeDB - Hold the DB lock over larger portions of urecovery_interact. Some values which should be protected were examined and modified without holding any locks. - In the early part of urecovery_interact, only take the DB lock when it's really needed, now that some values are protected by other locks. - DoProbe is now called without the DB lock, so it doesn't need to drop and re-aquire it. Change-Id: I1899b672687f0ab0eb59c74ff802750cdc377ae6 Reviewed-on: http://gerrit.openafs.org/4524 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 44801d157e6fd0933f37f0fc6451e37bdca285f3 Author: Marc Dionne Date: Sat Apr 16 14:19:57 2011 -0400 ubik: always hold DB lock for urecovery_ResetState() ubik_ResetState requires callers to hold the DB lock, since it modifies urecovery_state. All callers of ubeacon_AmSyncSite outside of the beacon package hold the DB lock, but calls from the beacon thread do not, and can't block on getting the DB lock if we're sync site. Add a beacon internal version of ubeacon_AmSyncSite that skips the call to ResetState, and have the callers take the DB lock and call ResetState themselves if needed. They can take the lock in this case because we know we're not the sync site. Refactor the exported ubeacon_AmSyncSite in terms of this new function. Change-Id: I88b231010dd52adf6e43a17802e83d12568afc6b Reviewed-on: http://gerrit.openafs.org/4490 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b2e6b426e6351da8b13e1d8b55be220fc98df5e5 Author: Marc Dionne Date: Sat Apr 16 12:56:05 2011 -0400 ubik: set UBIK_RECLABELDB before propagating version Quoting Jeffrey Hutzelman: In udisk_commit(), when committing the first write transaction after becoming sync site, the database is relabelled. In this case, the UBIK_RECLABELDB recovery state bit should be set before propagating the label change to other servers, rather than after. This is because ContactQuorum_DISK_Setversion() will release the database lock, at which point the recovery state may be cleared by urecovery_ResetState() running in another thread. It is important that a relabelling which occurs before recovery state is cleared not result in the UBIK_RECLABELDB recovery state bit being set after; otherwise, the server may fail to correctly relabel the database the next time it becomes sync site. Change-Id: I9753a24c84cf45cdbb11a1d8b7ab262fbe487204 Reviewed-on: http://gerrit.openafs.org/4489 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a6091cacd89d430d01145efbcef528d550395f1c Author: Marc Dionne Date: Sat Apr 16 11:52:57 2011 -0400 ubik: remote: fix DB lock usage Many of the RPC functions in the remote package have a similar prologue that makes use of ubik_currentTrans before taking the DB lock. Take the lock earlier, and rely on the ubik_dbase global instead of the dbase pointer in ubik_currentTrans. In GetVersion, take the lock earlier to cover the call to ubeacon_AmSyncSite. Change-Id: Ib8480163f2cab2a6ff6a6462cb67fce02f3e8094 Reviewed-on: http://gerrit.openafs.org/4488 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a33f77b6e11214326f5e752de171602c0e9efe86 Author: Derrick Brashear Date: Tue Apr 26 10:46:41 2011 -0400 macos: further next version support try to optimize out things which will be missing Change-Id: Ibee45ae75fa0a5cbdad9eb7a83b12cfaba85b201 Reviewed-on: http://gerrit.openafs.org/4569 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 352c3e366c2e0a8de4550547192276e62afd2cc1 Author: Ben Kaduk Date: Sat Dec 18 23:52:43 2010 -0500 Rename libcom_err to libafscom_err We no longer provide a compatible libcom_err, and in fact we renamed the symbols in our libcom_err several years ago to reflect this fact. When we build on a system where KRB5_LIBS includes -lkrb5 -lcom_err , the new Unix build system will pick up our libcom_err (as $(AFS_LDFLAGS) is the first argument in AFS_LDRULE and pulls in a linker search path for our libcom_err) which does not provide all the needed symbols for libkrb5. Fully rename our libcom_err away to avoid these conflicts. FIXES 128640 Change-Id: Ifdd677609f432d42252b1716fc5e8755f3a44640 Reviewed-on: http://gerrit.openafs.org/3547 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8c46e5010c0b4e41ad66458b8723e32f99b427d Author: Marc Dionne Date: Fri Apr 22 15:23:27 2011 -0400 Linux: cleanup aio support Code that called directly into the aio operations (ex: readv/writev) would bypass the AFS specific operations found in afs_linux_read and afs_linux_write. Rework the handlers: - For newer kernels with aio, let the kernel use its default read and write operations, and define the aio_read and aio_write operations, with the AFS specific bits, calling into generic_file_aio_read/write. The kernels default read/write operations are just wrappers around the aio versions. - For older kernels, leave things as is, pointing read and write to afs_linux_read/write Change-Id: I2a12c6716dc1974683c2582eb9ada5f841067dd9 Reviewed-on: http://gerrit.openafs.org/4563 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e1414be76bed00d12030e2704dc6e7bcca04b6d1 Author: Simon Wilkinson Date: Tue Apr 19 11:47:08 2011 +0100 cmd: Split up dispatch function Split up the command line parsing behaviour out of the cmd_Dispatch function, and into a function of its own - cmd_Parse. This lets servers which only have a single "syntax" installed just parse, without needing to go through a dispatch function, and all of the control flow complexity that requires. Change-Id: Ic4325bf933ee5b28cb80db36ef9b2b5fb6763f41 Reviewed-on: http://gerrit.openafs.org/4541 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 898d84cefe4b0bf54cc77ccca998e596710a1ee6 Author: Simon Wilkinson Date: Mon Apr 18 08:31:42 2011 +0100 cmd: Add an option to disable abbreviations Add an option to completely disable the matching of abbreviations when parsing command line options. Change-Id: Ic3babf584c21f389503c9c69670d400d54a6f4a6 Reviewed-on: http://gerrit.openafs.org/4540 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 616a835ad21c54a469663b1cc8d2543849d0c646 Author: Simon Wilkinson Date: Mon Apr 18 08:25:55 2011 +0100 cmd: Add function to disable positional commands Add a new cmd_DisablePositionalCommands function which can be used to completely disable positional commands, for functions which have no desire to make use of them. Change-Id: I5646e9976e544f06902ea6f85043a6330b1ac2fe Reviewed-on: http://gerrit.openafs.org/4539 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 376e24b2ee910af99f65aba472e9553dc509aa5d Author: Simon Wilkinson Date: Sat Apr 23 11:42:54 2011 -0400 cmd: Add some tests to the test suite Add some tests for the command library to the integrated test suite in tests. These are far from complete, and are mainly there to ensure that we don't break any of this functionality when modifying the library. Change-Id: Ib6fbdca114c005c32c5ba8c41f9e350ca67e1fb8 Reviewed-on: http://gerrit.openafs.org/4538 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0631fb7567da72e2a9df393beff22fbb98b67011 Author: Simon Wilkinson Date: Sat Apr 23 10:44:53 2011 -0400 cmd: Make the original test suite build Make the original, command line driven, test suite build again Change-Id: I57f0ebb5b1d13acf0809c7fa005e3556e3edb798 Reviewed-on: http://gerrit.openafs.org/4537 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5cd4282758317b24d2f63408ab4c62551bbebc03 Author: Andrew Deason Date: Mon Apr 25 13:58:34 2011 -0500 pam: Fix password torching const-ness In some code branches, the PAM code "torches" a password by zeroing it. However, it does this through a const pointer which we otherwise know is not actually const. Make sure we get better type checking by doing this through a non-const pointer. Change-Id: Ibdb4c7b98baf964a8efdf0e8a9882f8ab29e22af Reviewed-on: http://gerrit.openafs.org/4554 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 94a9b2afd82b6729ddceb7ef736ddeb039e0ae1b Author: Andrew Deason Date: Mon Apr 25 13:53:52 2011 -0500 pam: Password is const in setcred afs_setcred.c gets the "password" pointer from pam_get_data, which always gives a const pointer (unlike pam_get_item used in afs_auth.c &c, which sometimes gives a const or not-const pointer, depending on the PAM implementation). So, declare password const, to get better type checking. Change-Id: Ic34ffa54bf0bcc19c8ed3cddc9ee1384ee2dd8f0 Reviewed-on: http://gerrit.openafs.org/4553 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8836c7ca6ab7ac4915a0282ad840bb45b8785906 Author: Jeffrey Altman Date: Mon Apr 25 21:41:17 2011 -0400 Windows: afskfw return error if krb5 not loaded If the Kerberos v5 library cannot be loaded (pkrb5_init_context equal to NULL) return a reasonable error code instead of returning success and doing nothing. Change-Id: I8f77b51089d8c2a147fc9edc575dc92cd254a876 Reviewed-on: http://gerrit.openafs.org/4560 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 55768cb94c3c33517a43885ffe17d6f551b93c1c Author: Jeffrey Altman Date: Mon Apr 25 21:40:28 2011 -0400 Windows: build afskfw.c without leashw32.dll remove our dependency on mit kfw leashw32.dll Change-Id: Ifd66d77d527de27258b041e128165f234fd79ee6 Reviewed-on: http://gerrit.openafs.org/4559 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit c22155f68cbcc206085c9b76a5b769a8399841f4 Author: Jeffrey Altman Date: Mon Apr 25 21:29:46 2011 -0400 Windows: avoid preprocessor symbols redefinitions In afskfw.h avoid preprocessor symbol redefinitions when RD_AP_TIME or INTK_BADPW are already defined. Change-Id: Iccc02abf1cfd7a7941494085c1c935e89f415801 Reviewed-on: http://gerrit.openafs.org/4558 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit de1d75da0de52b15228c215b2fbb832bb081e7da Author: Jeffrey Altman Date: Mon Apr 25 21:24:32 2011 -0400 Windows: NPLogonNotify provide password in all cases When calling KFW_AFS_get_cred() from NPLogonNotify() always provide the user password. Do not count on a credential cache existing from a previous call. Change-Id: Ie94229a5b708ced2c3965f7bb333a67ee4d629d5 Reviewed-on: http://gerrit.openafs.org/4557 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit df85c8095b6333214eed42205c8be4261a28dae4 Author: Jeffrey Altman Date: Mon Apr 25 21:23:34 2011 -0400 windows: improved logging from NPLogonNotify Improve the detail and formatting of the windows event log entries. Change-Id: I088f6d35afb91e146e8e6030f29dec39301b020b Reviewed-on: http://gerrit.openafs.org/4556 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 63fd8a3e5bcb66d7bbd7f795a8042f4a3eac87a0 Author: Simon Wilkinson Date: Mon Apr 18 08:19:09 2011 +0100 cmd: Cleanup Some assorted cleanup on cmd.c - don't cast NULL or malloc, and wrap some comment lines better. Change-Id: I43a757ec5a9c9b29a99b5a6490cf5e2f44489c90 Reviewed-on: http://gerrit.openafs.org/4536 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3ea39166d64d2e66cddef015734c2f91548423af Author: Marc Dionne Date: Sat Apr 16 11:22:54 2011 -0400 pam: Clear up PAM_CONST related warnings on Linux Commit 78d1f8d8 expanded the use of PAM_CONST and introduced many new warnings on Linux where pam expects "const" arguments. This clears up the warnings by doing the following: - Cast "user" to char * when kalling ka* functions - Change the signature of pam_afs_prompt and pam_afs_printf to use PAM_CONST - Use a separate non-const password pointer for pam_afs_prompt Change-Id: I460e1d1ca763f0aea5edcdaa208b9d4b8299ded0 Reviewed-on: http://gerrit.openafs.org/4487 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 3cb97cdaa867b0d9fef84c683251a0a8f59a1519 Author: Simon Wilkinson Date: Thu Apr 21 16:07:05 2011 +0100 Linux: Restrict # of cbrs we allocate at once With commit a309e274632993c5aeec04c6e090f5ac95837a40, we changed the number of CBRs that we allocate in a chunk from 300 to 1024. However, this change takes the amount of memory requried to allocate a chunk of CBRs above PAGE_SIZE on Linux. This changes the allocator that we use from kmalloc to vmalloc. Whilst we can, and do, prevent kmalloc from flushing filesystem pages when we invoke it, we don't have a similar level of control over vmalloc. In one reported case, clients deadlock whilst attempting to allocate this memory, in a call stack that looks something like: afs_Daemon -> afs_ShakeLooseVCaches -> osi_TryEvictVCache -> afs_FlushVCache -> afs_QueueVCB -> afs_AllocCBR -> osi_linux_alloc -> ... -> __vmalloc_node -> ... -> try_to_free_pages This is probably because we end up deadlocking in the writeback invoked by try_to_free_pages, likely due to locks which are held by ShakeLooseVCaches. As a quick fix for the problem, make sure that the memory we allocate always fits within a page, so we always use kmalloc for it. FIXES 129751 Change-Id: I8b5be06ed62764b67f99792df66e9cb0f8941fd6 Reviewed-on: http://gerrit.openafs.org/4510 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 211e906c86be9ad9cba324e776d56093579b6653 Author: Andrew Deason Date: Sat Apr 23 16:52:30 2011 -0500 viced: Release all hosts in h_Enumerate* h_Enumerate and h_Enumerate_r were not releasing all of the holds they obtained when the callback function caused the enumeration to bail early. Correct them so all host holds are released. Change-Id: I6f405fad3d2767c9e0b3567c40cbbd1de8ac26aa Reviewed-on: http://gerrit.openafs.org/4530 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b07814e037d19dc9868dd202e82d69b96fbdcae Author: Andrew Deason Date: Sat Apr 23 16:44:41 2011 -0500 viced: Print a warning when using a deleted client We should never get a deleted client back from GetClient. Log a message if we do, to explain why access may suddenly appear to fail, and assist in determining why. Note that we still try to service the request, since the accessing user may still have enough access to do whatever was requested. Change-Id: Ie1d0c2d8a33a68a760704bfff9f268c6c507118f Reviewed-on: http://gerrit.openafs.org/4529 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 484b5b4cf4f88a9ddd04cdbe870d9c2959ef266c Author: Andrew Deason Date: Sat Apr 23 16:32:10 2011 -0500 viced: Force valid host enumeration flags Make sure that the callback functions for h_Enumerate and h_Enumerate_r give us back valid flags values by aborting if they return an invalid value. Change-Id: Id34b461d5452ac318a1714b6c3ffdaf41015995c Reviewed-on: http://gerrit.openafs.org/4528 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5b9d427141f0a6fd0e83de9564e70ef2cfebf656 Author: Andrew Deason Date: Sat Apr 23 16:25:00 2011 -0500 viced: Fix host enumeration flags Do not give uninitialized flags values to h_Enumerate callback functions. In fact, do not give a flags value to h_Enumerate or h_Enumerate_r callback functions at all, since they are not actually used. Fix host enumeration callback functions to just return 0 or the relevant flags, instead of basing the return value off of the given flags value. Update MultiBreakVolumeCallBack_r to use the correct return values, since it currently tries to use the old meanings of the host enumeration return values. FIXES 129376 Change-Id: Ibb01ce62411602a9f83f437125fb87a7a84160b4 Reviewed-on: http://gerrit.openafs.org/4527 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ebf5329e8ca1b3c0b581f436b28f6affe2c7c454 Author: Jeffrey Altman Date: Mon Apr 25 07:58:49 2011 -0400 Windows: remove trailing whitespace remove trailing whitespace from NTMakefile *.h *.c *.cpp *.idl *.def *.txt *.htm Change-Id: I948a7511a20d0ad522b647b788536f9b6f5dda16 Reviewed-on: http://gerrit.openafs.org/4548 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d7b1e6a1adff564db219e69b3a8eeb485c7dbb56 Author: Simon Wilkinson Date: Sat Apr 23 11:28:49 2011 -0400 autoconf: Add required headers to net/if.h test On Darwin, net/if.h is only usable if sys/socket.h is included first. Do so, to stop autoconf from warning about this test. Change-Id: I9e7a2642cce86c5ad6ebb3ae3cb60401dd9c26cf Reviewed-on: http://gerrit.openafs.org/4535 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ce256d586468911d5501f667c53247a837378c06 Author: Simon Wilkinson Date: Mon Apr 25 13:56:38 2011 +0100 Windows: Remove duplicate file The 'Streamfiles.txt' file had been committed with both that name, and an all lower case name. This makes git very sad on systems with case insensitive filenames. Change-Id: I0284415649d7568f9834ccd4d2c6a1627d309fed Reviewed-on: http://gerrit.openafs.org/4550 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da3ee813960d90ea83851c47fbd59eb3012c7904 Author: Jonathan A. Kollasch Date: Thu Apr 21 10:20:55 2011 -0500 Fix build of user-space on nbsd50 and greater Change-Id: I7b2fef051da7c5ff820e9ecb1fe77b8d8d9e011a Reviewed-on: http://gerrit.openafs.org/4509 Tested-by: BuildBot Tested-by: Jonathan A. Kollasch Reviewed-by: Derrick Brashear commit 9fd238ea056b6883dd1caf6e8e724ad3ddabeb3a Author: Jonathan A. Kollasch Date: Thu Apr 21 08:24:15 2011 +0000 Add nbsd60 param files and autoconf logic Change-Id: I7fa40455315325f75d0fb754fc23620f12fd634a Reviewed-on: http://gerrit.openafs.org/4512 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bdb08420baa47626ac280810aa00cdd8d472d401 Author: Andrew Deason Date: Thu Apr 21 16:19:58 2011 -0500 Revert "aklog: Return token when performing 524 conversion" This reverts commit 65186d8390a06fb0b7331b2472db07b6fb306446, which was mistakenly merged to the wrong branch. Change-Id: I3b2bf874cca15b4248978575213eae21ece2207f Reviewed-on: http://gerrit.openafs.org/4519 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1b37cc8942e9b7c5072b2d4b2a1d4c9ff172e368 Author: Andrew Deason Date: Thu Apr 21 17:10:13 2011 -0500 libafs: Initialize _settok_tokenCell primary flag Always set the *primary flag to something in _settok_tokenCell. Otherwise, the lag may be unset, as it is not required to be initialized by all callers. Change-Id: I78c775f8cd70f74f6a344094a6a677cbc74f3281 Reviewed-on: http://gerrit.openafs.org/4521 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ce77b0e572de783f4455786ad2689f0f6ba90364 Author: Jeffrey Altman Date: Tue Apr 19 13:17:56 2011 -0400 Windows: change thyper to offset and fix error In cm_ReadMountPoint and cm_HandleLink the variable 'thyper' represets the 'offset' at which cm_GetData should fetch data. Rename 'thyper' to 'offset' and fix a coding error caused by misinterpreting the variable purpose. Change-Id: If60669d850f4bfba2aae6e4aaf642f7ec6f920b2 Reviewed-on: http://gerrit.openafs.org/4501 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b178496063be6d95f301ae13c3e655c8fe94febc Author: Simon Wilkinson Date: Thu Apr 21 18:18:54 2011 +0100 Darwin CM: afs_IsDynrootFid takes a fid ... ... not a vcache. Change-Id: Iff1f33f32ec0d208ff80a4c7bcc1ce1b3dccd9a3 Reviewed-on: http://gerrit.openafs.org/4511 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 65186d8390a06fb0b7331b2472db07b6fb306446 Author: Andrew Deason Date: Thu Apr 21 14:24:45 2011 -0500 aklog: Return token when performing 524 conversion We weren't actually returning a token and username from rxkad_get_converted_token. Do so. This is a 1.6-specific change. This issue was fixed on master when aklog was changed to use the new SetTokenEx family of pioctls in commit 53837416cbed3ba4d11f63015e1f13800519f2ed. Change-Id: I4c85c03be00c45fdae5657554dcd85b3a6301b23 Reviewed-on: http://gerrit.openafs.org/4513 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7ff99d1eee2974bfece09f137e3aa842bed7add0 Author: Derrick Brashear Date: Thu Apr 21 10:26:42 2011 -0400 afsio: fix objdir build use the relative path for afsio.c use objdir path for generated files Change-Id: I3b16108eacd949bcb1ddc2224961e87bce9999bb Reviewed-on: http://gerrit.openafs.org/4508 Reviewed-by: Jonathan A. Kollasch Tested-by: Jonathan A. Kollasch Reviewed-by: Derrick Brashear commit fe8897015c11d8d6b9b3e7e3a3646688ccb45683 Author: Marc Dionne Date: Tue Apr 19 22:42:12 2011 -0400 Unused variable warning fixes Fix several simple cases of unused variables. Change-Id: I6e61ea625c6bcef7b0bc70c61909f22d1f8dd9a7 Reviewed-on: http://gerrit.openafs.org/4504 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8588f4a9ccca164b566a4f855345f3d529f4125f Author: Jonathan A. Kollasch Date: Wed Apr 20 10:00:34 2011 +0000 Allocate system type ID numbers for i386_nbsd60 and amd64_nbsd60 Change-Id: I1860fbacb0d41a3d13b73b4248b920e17b731184 Reviewed-on: http://gerrit.openafs.org/4506 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 507c481a0a3bcb3ab1341f0c2b1ef00797160708 Author: Jonathan A. Kollasch Date: Wed Apr 20 09:53:52 2011 +0000 Make whitespace consistent in NetBSD system type ID number section Change-Id: If3835225bb85fd7469cd817dc48bc52f841081b7 Reviewed-on: http://gerrit.openafs.org/4505 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c721bff5035b6e2d87e10be0f4711133b33dc5dc Author: Marc Dionne Date: Sun Apr 17 14:06:57 2011 -0400 adminutil: parallel build fixes Rearrange the Makefile to make it more parallel build proof. Add some dependencies on the header files, and avoid rules with 2 targets. Change-Id: I267f25504137d58dd1a335eccb7c9b138a7c66ab Reviewed-on: http://gerrit.openafs.org/4497 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a1eed135d29f1030cdd409e9d9c824e6cd2a5f83 Author: Simon Wilkinson Date: Sat Apr 16 14:50:11 2011 +0100 FreeBSD: Don't ignore Makefile The file src/packaging/FreeBSD/Makefile is part of the repository, and so shouldn't be excluded by .gitignore (the exclusion is inherited from the top level). So, restore it with .gitignore in this directory. Change-Id: I841e67aba707fd7193ba0d15a11f969ffd55829c Reviewed-on: http://gerrit.openafs.org/4495 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f4ae9ef6531cb629e0bac2233d97cf8a0f3a698b Author: Derrick Brashear Date: Fri Apr 15 13:45:57 2011 -0400 libafscp: add lock support add support for locking as well as for tracking callbacks so a lock break can be detected Change-Id: Iff36c6528fc55cf250bc27d49af80123d7ecece3 Reviewed-on: http://gerrit.openafs.org/4476 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 04950bec1b1d6c1eeb782fff82d7568af44e7443 Author: Jeffrey Altman Date: Tue Apr 19 00:12:49 2011 -0400 Windows: avoid race when writing mountPointString cm_GetData() drops the cm_scache_t rw lock which permits other threads to access the data while it is in an inconsistent state. Avoid the race by using a stack allocated temporary buffer to receive the data from cm_GetData(). Only copy the data into the mountPointStringp buffer under the rwlock. Change-Id: Ica853976b1094be1087e49c22d878f8ae7fca03a Reviewed-on: http://gerrit.openafs.org/4498 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1105d63ddf5a32b9381ff47e8101c3f141366fa6 Author: Stephan Wiesand Date: Sun Apr 17 23:37:36 2011 +0100 make afsdump_scan get ACLs right This makes afsdump_scan get the ACLs right on little endian systems. It also corrects and slightly beautifies some output (indentation, cut&paste error for negative ACL label). Change-Id: I5a120630158e56fe8b55500ff9db70dded5fe0d9 Reviewed-on: http://gerrit.openafs.org/4494 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9f2fc1c70727d673a50703c272b304a663d171b6 Author: Derrick Brashear Date: Sat Apr 16 17:44:28 2011 -0400 roken header dependencies mean we need roken and probably more than just these but let's start here. Change-Id: Id0f174a84ecb8ffd1fbdcade6f139fc78c4b99e2 Reviewed-on: http://gerrit.openafs.org/4492 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fa6339d7ffc884b5251b3afe947bc39be350c118 Author: Andrew Deason Date: Thu Apr 14 14:36:36 2011 -0500 auth: Set correct flags in token_extractRxkad The flags that token_extractRxkad returns are flags that are passed to ktc_SetToken, not the flags that are passed directly to the PSetTokens pioctl. So, we should be setting AFS_SETTOK_SETPAG, which is interpreted by ktc_SetToken. Change-Id: Id63ba4d5874e43c8d1f02817bf33975516a974be Reviewed-on: http://gerrit.openafs.org/4480 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 03edae9cc562524c04e06734d12d87b9a7a4622c Author: Derrick Brashear Date: Fri Apr 15 13:36:04 2011 -0400 libafscp: fix kerberos bits get the correct afs principal. this entire blob will go away and be replaced by rxgk token getting, but deal for now. Change-Id: I8e63a5de74efa6c2eeec4c67b4d14d1f69396e41 Reviewed-on: http://gerrit.openafs.org/4475 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9bf314d90a1b639e46212ba077d95b2a45d79bca Author: Simon Wilkinson Date: Wed Apr 13 15:21:46 2011 +0100 libafs: Remove afs_write duplication The afs_write() code for memory and disk cache suffered from exactly the same duplication problems as the afs_read() code. Apply a similar fix - unify afs_UFSWrite and afs_MemWrite into a single afs_write function, place the UFS specific code into afs_UFSWriteUIO, and make use of the existing afs_MemWriteUIO for the memcache case. Change-Id: I074e1f56597e5cf04d13a45bcda5ad5fedb6377f Reviewed-on: http://gerrit.openafs.org/4465 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 25a46780fc0e9f64010cc06826e5753567c16647 Author: Derrick Brashear Date: Fri Apr 15 13:34:14 2011 -0400 libafscp fixes fix callback package in libafscp to track addresses correctly (use correct byte order) Change-Id: I58207492389869591e38e582f332c910cd53f169 Reviewed-on: http://gerrit.openafs.org/4474 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 94d44d59e3d18f1d450e495a55fdd927e7584948 Author: Chaz Chandler Date: Tue Jul 20 10:25:20 2010 -0400 afsio: rewrite using libafscp afsio is a utility for file transfer to and from AFS file space without the help of the AFS client/cache manager. Using libafscp, this (partially rewritten) version of afsio is able to accomplish (1) authenticated access to an AFS path or FID (an existing KerberosV ticket is required), (2) fall back on unauthenticated ("anonymous") access if authentication (token acquisition) fails, and (3) work independtly of the AFS cache manager (afsd need not be running, though CellServDB and ThisCell are currently required). issues: 1) libvldbint and libafsint are not compiled pthreaded. we link in what we need. this should be changed when we are all-pthreaded. 2) venus is not a pthreaded-directory otherwise. same deal: in an all-pthreaded universe, undo the bodge that we do here. 3) venus is not an all-krb5 directory either. slight ick. Change-Id: I946e6eef58ac77c6fb97be256c4c564188201262 Reviewed-on: http://gerrit.openafs.org/4381 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 44f13d8feb527fb982064469e513c5a0c9355d03 Author: Andrew Deason Date: Thu Apr 14 14:11:22 2011 -0500 RX: Remove allocation counters Remove the osi_alloccnt and osi_allocsize counters, and the associated osi_alloc_mutex. These counters are pretty useless since nothing looks at them, and their use of a mutex requires Rx to be initialized before XDR can be used. Removing them lifts this restriction. Change-Id: I22fa1335b6d34675d37cca41a2c393b9c20d3d24 Reviewed-on: http://gerrit.openafs.org/4478 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 21578144e08d46eeec9a2944e92e8d0d7a6dba57 Author: Andrew Deason Date: Wed Apr 13 12:39:19 2011 -0500 Suppress cmp component version error messages When we use cmp to determine whether to replace AFS_component_version_number.c, suppress stderr in addition to stdout, to slightly reduce output during the build. Change-Id: I4f687ce5ffff316d8f9806181bccf1c28d218932 Reviewed-on: http://gerrit.openafs.org/4471 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 27d08416afa2bbd9967d0f0648fa1e98ddbeda11 Author: Andrew Deason Date: Fri Apr 15 11:18:37 2011 -0500 AIX51: Fix PAGs On AIX 5.1 and later, we set a process' PAG by using the AIX PAG mechanism (and not by group ids), but we were determining what PAG a process was in by the group list. Instead use the PAG identifier. This effectively reverts 277c37f48c8126ba9cb986ffc7361fcb98e2bbf2, but it puts the kcred_getpag call in a different place that makes more sense in the current PAG code organization. Change-Id: If9fe621060a06664718a00acff91dea66760d5c2 Reviewed-on: http://gerrit.openafs.org/4479 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6c0d77b90525116ea5f6c4f71d663290eb63490b Author: Andrew Deason Date: Fri Apr 15 12:38:37 2011 -0500 tsm41: Reformat function definitions Make function definitions consistent with the formatting in the rest of the tree. Change-Id: Ifbccc02739f6fbc111e061397538a903b6f2289a Reviewed-on: http://gerrit.openafs.org/4477 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78d1f8d88334f711eaaf6555d3a962a504d3e80e Author: Andrew Deason Date: Wed Apr 13 10:52:50 2011 -0500 pam: Use PAM_CONST more often Some callers of pam_get_item et al were just casting their argument to a const void **. Some PAM implementations (Linux) want a const void**, but others (Solaris) do not. Use the PAM_CONST symbol already defined by autoconf to declare or cast the relevant variable const or not as appropriate. Change-Id: I81c7863797396eb146b78ffbb2586e4f3a1e854e Reviewed-on: http://gerrit.openafs.org/4470 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fbb4c6115b9af9c52ee06fa9c979a3f4195ad342 Author: Andrew Deason Date: Wed Apr 13 11:10:52 2011 -0500 pam: Check for null upwd from getpwnam_r The POSIX getpwnam_r can yield a NULL struct passwd pointer even when the returned error code is 0 (in particular, when the requested entry is not found). Just add a check for a null upwd to make sure we don't dereference a NULL pointer. Change-Id: I00e8d6c53e8228f468c984010695b798f5dcf999 Reviewed-on: http://gerrit.openafs.org/4469 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a7d4fbd36a120b16caaddcd9d1c7f550cb14aae5 Author: Andrew Deason Date: Wed Apr 13 11:08:09 2011 -0500 pam: Use POSIX getpwnam_r on Solaris _POSIX_PTHREAD_SEMANTICS is now always defined for Solaris, which means we get a POSIX-conforming getpwnam_r, which takes 5 arguments. So, add Solaris to the list of platforms that use a POSIX getpwnam_r. Change-Id: I1ad12420f56cf39816d94a8e9c9740436100134b Reviewed-on: http://gerrit.openafs.org/4468 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f26f7ed22629556d4f0035fbe4d25d9804305da1 Author: Andrew Deason Date: Wed Apr 13 12:15:12 2011 -0500 vfsck: Fix roken fallout Including roken.h in vfsck sources pulls in some more modern headers that vfsck code isn't used to. Accommodate: - Prevent roken.h from pulling in dirent.h so we don't conflict with the old-style directory defines for HP-UX. Also move the inclusion of the old-style directory defines to before roken.h, so we have the directory types defined in roken.h. - Remove some prototypes so the don't conflict with the prototypes in system headers. - Remove a couple of bizarre vprintf invocations, as they conflict with the actual vprintf definitions. Change-Id: Ifd7cd2544e75ed49b93ab491c4acadcb18528315 Reviewed-on: http://gerrit.openafs.org/4472 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit f4776f0a4d51472ee6f2406174b074c03213f7da Author: Derrick Brashear Date: Fri Apr 15 08:02:22 2011 -0400 kernel upcall rx env should shut down event daemon also shut down event daemon in upcall environment Change-Id: Ifd40754fc34bc8ea6f844867d1775a8b8b7a5044 Reviewed-on: http://gerrit.openafs.org/4473 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 80df5096e7179ab9c7562614180e2e90c083ff7c Author: Andrew Deason Date: Wed Apr 13 10:34:37 2011 -0500 Fix some configure header prereqs On at least Solaris, the configure tests for netinet/if_ether.h and security/pam_modules.h issued warnings because they existed but were not compilable. Perform the tests with the prerequisite headers of net/if.h and security/pam_appl.h, respectively, so autoconf will stop yelling at us. Change-Id: I05d637784954c10af468b6065acd78139fc45245 Reviewed-on: http://gerrit.openafs.org/4467 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8180f9abbfc79731e1557dbd78b26ecba81611d7 Author: Andrew Deason Date: Wed Apr 13 10:11:59 2011 -0500 RX: Include sys/file.h for rx_lwp.c rx_lwp.c uses FNDELAY, which requires sys/file.h on at least Solaris. So, include it. Change-Id: Ida652a3c9bfccb120a67f0c5d4f71537a11fa00f Reviewed-on: http://gerrit.openafs.org/4466 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 340a2c639a04fdd25af180309910dfb5a9b43b04 Author: Jeffrey Altman Date: Tue Apr 12 11:48:27 2011 -0400 asetkey: permit des-cbc-md5 and des-cbc-md4 keys A DES key is a DES key. Permit importing CRC, MD5 and MD4 when using non-MIT keytab support. Add a special error message that specifies what principal name, kvno, and enctype were being searched for when the error is KRB5_KT_NOTFOUND. Change-Id: I7d3b5fbc41db5e5e91278854ce52842720e6b5d3 Reviewed-on: http://gerrit.openafs.org/4458 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e56b1f79b925be3faf016505e14e7f37eb4c5b98 Author: Simon Wilkinson Date: Tue Apr 12 19:49:38 2011 +0100 libafs: Remove unecessary parameters to afs_read We were providing additional buffer and length parameters to afs_read which are now unused, as the necessary information is contained within the iovec. Just remove these parameters to tidy the code up a bit. Change-Id: I2ca80b20e253e0d54be759e6d504961958b40e6e Reviewed-on: http://gerrit.openafs.org/4464 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fd620283a926386d4a90e602a1a47ee622b6a483 Author: Simon Wilkinson Date: Tue Apr 12 19:41:30 2011 +0100 libafs: Remove afs_read duplication The disk cache and memcache afs_read functions are effectively duplicates of each other. Abstract out the common code into a generic afs_read() function, and put the cache type specific code into UFSReadUIO (there is already a MemReadUIO which contains the code necessary for the memcache). Change-Id: Ic66242fa4695a146ac874a82bd48a7c1f1f412a6 Reviewed-on: http://gerrit.openafs.org/4463 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 763ec5250deef6f0f8ae1c85b52bac3ffc1a6176 Author: Simon Wilkinson Date: Tue Apr 12 19:28:15 2011 +0100 fs: Abstract out code to get the last component fs.c contained two identical copies of code to parse a path, resolve any symbolic links in that path, and return the directory and basename. Abstract this code out into a single function, rather than maintaining two separate copies of it. Change-Id: Id9fc835506f90bae2fc1f0db18c640bf28f0d39d Reviewed-on: http://gerrit.openafs.org/4462 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b5bd42efb6d869f6abf3d041b861e77751898f67 Author: Simon Wilkinson Date: Tue Apr 12 19:48:02 2011 +0100 libuafs: Add afsd symlink to the clean rules The libuafs Makefile creates a link to afsd in the libuafs build directory. So, have the clean rule tidy it up after us. Change-Id: I24a3be34bc04dfa7c9db9be2ace4ab32f3f5d5f7 Reviewed-on: http://gerrit.openafs.org/4461 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b59da7674e2f931b85d111e6a92e12731888883e Author: Simon Wilkinson Date: Fri Apr 8 16:18:13 2011 +0100 viced: Remove logging duplication In lots of places in the fileserver we were doing ViceLog(0, (x)) osi_Panic(x) Remove this duplication by creating a new macro, ViceLogThenPanic, which does both of these in one fell swoop. Change-Id: Icea349d60298eba1cca4a45db790f21ba3e7b3c7 Reviewed-on: http://gerrit.openafs.org/4455 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d5ded9afa1764016977a17ef9346dc979bf70ca0 Author: Ken Dreyer Date: Mon Apr 11 17:24:41 2011 -0400 fix manpage for udebug -servers The proper option to udebug is "-server", not "-servers". Fix the manpage to line up with the binary. Change-Id: I3ec83c028dcefb827bd05666401e4a667e29fb6a Reviewed-on: http://gerrit.openafs.org/4457 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 81e77fa923cabb18c0b29b84a958eb6635524119 Author: Jeffrey Altman Date: Mon Apr 11 10:29:28 2011 -0400 roken: export tsearch, tdelete, tfind on windows Change-Id: Ic862b65a8c1b37bc3ca3da8db77ba76fe8879296 Reviewed-on: http://gerrit.openafs.org/4456 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d5349810730ff16c68280745398c136ddbdb2b8d Author: Derrick Brashear Date: Mon Apr 4 13:43:44 2011 -0400 afscp: build for windows attempt windows support for afscp Change-Id: I61cb1349466f24558b320bc40e3fae42ce654810 Reviewed-on: http://gerrit.openafs.org/4424 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit de0c72bf7c7d284f4d15d99c79b39e0c97f1a122 Author: Andrew Deason Date: Fri Apr 8 13:00:15 2011 -0500 DAFS: Request salvage on detach for volser When the volserver notices that a volume needs salvaging, mark V_needsSalvaged. So when we VDetachVolume the volume, we can then just request the salvage in the volume package. Fix the VolClone salvaging code to do this as well, instead of using the vol-private VRequestSalvage_r interface. Change-Id: I9d48e4ea18fe4e3e2e1dc38593db4beb5ad79a84 Reviewed-on: http://gerrit.openafs.org/4452 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 399655e3df3bf30d7878dec70402fc0021cae752 Author: Andrew Deason Date: Thu Apr 7 12:36:19 2011 -0500 volser: Avoid assert on ViceCreateRoot failure If IH_CREATE fails in ViceCreateRoot, it may just be due to an on-disk inconsistency. So, don't assert, but just return an error and detach the volume. Change-Id: I8acacff8c858b0d27234265fee5d7b49ebab5101 Reviewed-on: http://gerrit.openafs.org/4444 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 316b0421a27a4a76298f60ecd62b1236c971e512 Author: Andrew Deason Date: Thu Apr 7 13:51:14 2011 -0500 DAFS: Do not give back vol to viced after salvage If we VRequestSalvage_r a volume successfully, and we are not the fileserver, we will tell the fileserver to salvage a volume. So, we do not need to give back the volume afterwards, since telling the fileserver that a volume needs a salvage effectively gives it back (so the salvager can take it). So, clear needsPutBack so we don't try to also give back the volume, and avoid the fileserver yelling at us for trying to give back a volume that is checked out by someone else (or is not checked out at all). Change-Id: I168bcf7fe6dbc186064cdf38de1ddb287a26eff3 Reviewed-on: http://gerrit.openafs.org/4445 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 81c2416d8e09987ccee9fa5194ab1801c44380df Author: Derrick Brashear Date: Fri Apr 8 11:12:34 2011 -0400 add tsearch to Windows roken now has tsearch for windows. add it. Change-Id: I73f609d6285f52bb2b52f580b95ca4510204efa1 Reviewed-on: http://gerrit.openafs.org/4451 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 83bce754727c9f2b4206d4a7744854616433006b Author: Heimdal Developers Date: Sun Apr 10 22:13:08 2011 -0400 Import of code from heimdal This commit updates the code imported from heimdal to 988355d9d0d1953e8c17c4b5c935938573efe4ba (switch-from-svn-to-git-2070-g988355d) Upstream changes are: Derrick Brashear (1): roken: Make tsearch build on windows Change-Id: Ic0292c8cc7283c07ae56040c8e80b9b2cc99801f Reviewed-on: http://gerrit.openafs.org/4454 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b3b0c67808b76c0d7d1225956c5de21414490183 Author: Andrew Deason Date: Mon Aug 2 13:23:34 2010 -0500 XDR: decouple from system XDR implementation Since commit 7293ddf325b149cae60d3abe7199d08f196bd2b9 we have stopped trying to use the system-provided XDR implementation, but the xdr_ops structure was still structured to accomodate for the old limitations of the system XDR. Change xdr_ops so it is just always one consistent structure. This removes: - The AFS_XDR_64BITOPS define and all related code, since we never call the 64-bit versions of getint and putint ourselves - The rearrangement of getint32/putint32 depending if we are in Solaris kernel-land or not - The .x_control field Change-Id: I59b7579da1ea728eaba6b426011adbe4f7a331b6 Reviewed-on: http://gerrit.openafs.org/2503 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit da3921e7c78ec2f9a7861cfb5d06df96bb1e477f Author: Simon Wilkinson Date: Wed Mar 23 16:31:42 2011 +0000 ptserver: Add cmdline options for config and log Make it possible to set the location of the ptserver's configuration directory, and the file that it logs to, from the command line. This makes it possible to bring up a ptserver without requiring an installation on the system for testing purposes. Change-Id: I914eb842256eb74506490fcf5532b4138e6f3875 Reviewed-on: http://gerrit.openafs.org/4447 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 20f2f23be6cd5834997cb22ae2bbf4bec308c60c Author: Heimdal Developers Date: Sat Apr 9 09:46:26 2011 -0400 Import of code from heimdal This commit updates the code imported from heimdal to 2a32bf67f0a7c77b6adf6e7c23ec8abe7937a9ea (switch-from-svn-to-git-2067-g2a32bf6) Upstream changes are: Derrick Brashear (1): Add tsearch and friends, and a test program New files are: roken/search.hin roken/tsearch.c Change-Id: Ie7ddb2da595797ca354e36776ce813a03b3d462c Reviewed-on: http://gerrit.openafs.org/4453 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7a9aeaee11e76656c2d5aa7d5f0254cea55491c0 Author: Derrick Brashear Date: Fri Apr 8 10:59:35 2011 -0400 Import tsearch.c from roken Add tsearch.c (and search.hin) to the files we import from heimdal Change-Id: I6a7062b35177c6ecd4f78ae15d56d73600866d50 Reviewed-on: http://gerrit.openafs.org/4449 Tested-by: Simon Wilkinson Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 470e3f06d444413807208ba86bc5c83dbc744db9 Author: Simon Wilkinson Date: Thu Apr 7 18:07:32 2011 +0100 tests: Remove spurious rxgk reference A reference to the rxgk library crept into auth Makefile ahead of time. Remove it so that tests can continue to work in trees without rxgk. Change-Id: Ic1392aebf657d458a55f2dcf685d0616f0573622 Reviewed-on: http://gerrit.openafs.org/4446 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 325443e6178f9dcdba7326bdb675447ac72bd540 Author: Andrew Deason Date: Wed Apr 6 16:56:22 2011 -0500 afsd: Trim trailing slashes on Linux mntent When we write a mount entry on Linux when mounting /afs, trim trailing slashes on the mount path. Otherwise, the umount utility can get slightly confused, and leave the /afs mount entry in /etc/mtab after it's been unmounted. For full correctness we should probably completely canonicalize the path like the mount utility does, but it's unlikely that anyone will provide significantly weird paths for cacheMountDir, so don't bother. Change-Id: Ie8330f08918d52eee319dff5f6ad275c30164c67 Reviewed-on: http://gerrit.openafs.org/4442 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f1e04bedb26f84f061518a68a2dd75761b85c195 Author: Simon Wilkinson Date: Sun Apr 3 16:31:56 2011 +0100 Windows: Use roken gettimeofday implementation Use the gettimeofday implementation from roken, rather than brewing our own on Windows. Change-Id: I02fc1a7f0f6aded2e16e2ed53e04054546fc0535 Reviewed-on: http://gerrit.openafs.org/4433 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21ed5186ae04a5a3026bfe115404bfa24ec27bdb Author: Heimdal Developers Date: Thu Apr 7 19:39:30 2011 +0100 Import of code from heimdal This commit updates the code imported from heimdal to a597ccdde692709ab387cde21518f09eb501c5a1 (switch-from-svn-to-git-2063-ga597ccd) Upstream changes are: Simon Wilkinson (1): roken: Rename gettimeofday replacement Change-Id: I1e1ec03d9ab1953c50a5ef47a6f3feb0db150f49 Reviewed-on: http://gerrit.openafs.org/4443 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 222f8a5ea2cbf73db03ceacf68fa06c57769a0d2 Author: Simon Wilkinson Date: Thu Mar 24 12:28:10 2011 +0000 vlserver: Add options for config, log and db Make it possible to set the location of the vlserver's configuration directory, database file, and the file that it logs to, from the command line. This makes it possible to bring up a vlserver without requiring an installation on the system for testing purposes. Change-Id: I0a3fcc4fd10274588c1530f8b4f3e9782084c58c Reviewed-on: http://gerrit.openafs.org/4440 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit f2ec10782384469f276195457b13c139e4fd2cee Author: Andrew Deason Date: Thu Mar 31 12:51:44 2011 -0500 salvager: Do not AskDelete on GetInodeSummary fail GetInodeSummary can fail due to a number of different reasons, not just because the VG doesn't exist. If, for example, we just fail to write the temporary inode file, we will return with an error, but we should not AskDelete the volume in that instance. GetInodeSummary already has code to delete the volumes in question when no inodes are found, so remove the extra AskDelete after GetInodeSummary returns. Change-Id: I5df7a3ffed962b62409adbedfa1c1a0445dad2f8 Reviewed-on: http://gerrit.openafs.org/4438 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8084fc28a3069949bdc788f048fa8a96c012b96d Author: Andrew Deason Date: Thu Mar 31 17:22:12 2011 -0500 salvager: Error volumes on GetInodeSummary errors When GetInodeSummary fails due to an internal failure (not from just failing to find applicable inodes), currently it just returns an error, and does not return the checked-out singleVolumeNumber back to the fileserver. When we fail to gather inodes, we should force the volume to an error state, since we haven't salvaged the volume. But if we fail to find any applicable inodes, we just want to VOL_DONE the volume, since the header has possibly been destroyed, and the volume doesn't exist. So, issue an FSYNC_VOL_FORCE_ERROR command when we encounter errors in GetInodeSummary, except when we fail to find applicable inodes. Change-Id: I4aed126ec09c4b93cfd8572abeba3d22bff0e6a5 Reviewed-on: http://gerrit.openafs.org/4439 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b510fe30afb34202342364e96bd9030052e1567 Author: Marc Dionne Date: Tue Apr 5 21:30:20 2011 -0400 ubik: don't rely on timeout value after select() The value of timeout after a select() call should be considered undefined; relying on its value is not portable. Since IOMGR_Select doesn't modify the timeout it is given, the intention of the code seems to be to wait for gradually increasing timeout values, starting at 50ms. At least under Linux, the timeout gets set to 0 by select() if it waited for the full specified time, resulting in a much shorter maximum possible wait period. Initialize the timeout value for each loop according to the existing logic, to get consistent behaviour between the lwp and pthreaded code. Change-Id: I8d3e90fe4e94a378401dd0a6fb7d77266ec09e5a Reviewed-on: http://gerrit.openafs.org/4441 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 843d705ca6f0250c3760ec2aa1f3403d19de3df1 Author: Rainer Toebbicke Date: Mon Dec 6 15:39:25 2010 +0100 Atomically collect callbacks to be broken Collect callbacks to be broken in one go, otherwise a file server may lock out a client while new callbacks tickle in. With revised multi_Rx, responses get handled early, taking away an argument for issuing callbacks in small chunks -> crank up chunk size. Change-Id: I6822256715d1388aa1a44049315813ea08009105 Reviewed-on: http://gerrit.openafs.org/3909 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2386f5741d284a449f0260b91cde65209dc3c2bd Author: Andrew Deason Date: Tue Apr 5 14:51:26 2011 -0500 Correct strftime callers Some strftime callers were not using the resultant string appropriately. Correct them to have the same behavior as when we were using afs_ctime (which included a trailing newline). Change-Id: I1d23a6a06460cae3d2a253c9f084c22324fc7542 Reviewed-on: http://gerrit.openafs.org/4437 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit 23984368f50ad443be3c3082b58d6b892ae55a90 Author: Marc Dionne Date: Sat Mar 19 09:21:56 2011 -0400 ubik: take DB lock in ubik_GetVersion The lock is needed to copy the database version. Note that this function is currently unused in OpenAFS. Change-Id: I7938db18a6739d2a15ab27331dbf5945839127fc Reviewed-on: http://gerrit.openafs.org/4264 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5ac037294ec04f7c74aca37f9f37a445428a14a8 Author: Marc Dionne Date: Sat Jan 29 13:28:05 2011 -0500 ubik: DB lock usage in ubik_Flush and ubik_Write ubik_Flush and ubik_Write need to hold the DB lock to use iovec_info or iovec_data Change-Id: Iadc1ff0badc744aa5fdee433bb4b591217e4b453 Reviewed-on: http://gerrit.openafs.org/4263 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 5548f6540557795ded65a52c7066839c5eef468f Author: Marc Dionne Date: Sat Jan 29 12:09:30 2011 -0500 ubik: SVOTE_Beacon should hold the DB lock for CheckTid Change-Id: Iab51bf4aea704870813a4f4c082110ed7cd1eb04 Reviewed-on: http://gerrit.openafs.org/4262 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1e2a0e46ea2db58c0ab4d817412303ab90be1be2 Author: Marc Dionne Date: Mon Mar 7 13:55:19 2011 -0500 ubik: Document lock ordering Document the required lock ordering for the new locks. The text is adapated from Jeffrey Hutzelman's notes. Change-Id: I72d0578f456eab133f36e00a3e99051b9a733020 Reviewed-on: http://gerrit.openafs.org/4174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit e4ac552ab79be21d90397079eaf6be7050497752 Author: Marc Dionne Date: Thu Feb 3 20:51:06 2011 -0500 ubik: Introduce version lock The "version" lock is a new lock that protects the database version information. The goal is to allow the beacon thread to use the protected values without blocking for an extended period of time, which could occur if it was using the database lock. Reading requires holding either lock, while writing requires holding both locks. The following values are protected: ubik_epochTime db->version db->flags db->tidCounter db->writeTidCounter Based on analysis and design work from Jeffrey Hutzelman. Change-Id: Ib6e67360807eed8c36e35ec27d1eb938ac899e22 Reviewed-on: http://gerrit.openafs.org/4158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 5ceea5bbc6a3a69012d625d53149909490311e6c Author: Marc Dionne Date: Sun Jan 23 13:09:48 2011 -0500 ubik: Introduce new address lock Introduce a new lock to protect: ubik_server->addr[] ubik_server->disk_rxcid ubik_server->vote_rxcid ubikSecClass ubikSecIndex Globals are put into a new addr_data structure along with the lock. Based on analysis and design work from Jeffrey Hutzelman. Change-Id: I33ef58a36e87a3925b310052f83bb3c6dd60d785 Reviewed-on: http://gerrit.openafs.org/4157 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 2385d26293b9f5b3bd62b7afd5a4e9da17efe7cc Author: Marc Dionne Date: Sat Jan 22 22:17:14 2011 -0500 ubik: Introduce new vote lock Introduce a new lock to protect ubik data related to voting. Specifically, it protects the following globals: ubik_lastYesTime lastYesHost lastYesClaim lastYesState lowestHost lowestTime syncHost syncTime ubik_dbVersion ubik_dbTid Variables are grouped along with the lock in a new structure. Also introduce a few helper functions to safely deal with ubik_dbVersion: uvote_eq_dbVersion: Return true if the passed version is equal to the current ubik_dbVersion uvote_set_dbVersion: Set ubik_dbVersion to a specified value Change-Id: I9bb248d0dfedc363181661ea723cac0af4928644 Reviewed-on: http://gerrit.openafs.org/4156 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 7c4fc5278e037104450d22a199a46f938aa929aa Author: Marc Dionne Date: Sat Jan 22 13:51:07 2011 -0500 ubik: Introduce new beacon lock A new lock is introduced to protect beacon related data when compiled with pthreads. A global structure is added containing the lock itself and the global variables that it protects. The lock also protects some values in the ubik_server structures: lastVoteTime lastBeaconSent lastVote up beaconSinceDown Based on some analysis and design work by Jeffrey Hutzelman Change-Id: I13f72d32dce71d0686406efcd07b7ea7528722f1 Reviewed-on: http://gerrit.openafs.org/4155 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 73a79dba2cb51e27224a00a936782f1dd44f7bd3 Author: Heimdal Developers Date: Sun Apr 3 16:26:39 2011 +0100 Import of code from heimdal This commit updates the code imported from heimdal to 987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583) New files are: roken/gettimeofday.c Change-Id: Iac2227dcd58338e5a988ce614c136fb57da639dd Reviewed-on: http://gerrit.openafs.org/4432 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 184ab5d31dc33a3d41c5348e4e23d1e2c794df56 Author: Simon Wilkinson Date: Sun Apr 3 16:25:48 2011 +0100 Roken: Import gettimeofday Import the roken gettimeofday implementation, so we can use it on Windows. Change-Id: I198233c4e96708b56b6e7be3bbfc98bb14d37f84 Reviewed-on: http://gerrit.openafs.org/4431 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d20c76586a7621bff504abb3046d48acf774efff Author: Simon Wilkinson Date: Sun Apr 3 16:09:44 2011 +0100 Tidy up gettimeofday usage The roken gettimeofday implementation doesn't return timezone information. Audit the whole code to make sure that we don't rely on this, and tidy up those places where we were passing an unused timezone structure to the gettimeofday call. Change-Id: Ia83f86483a9c7262fc0904236c0d039a912e3731 Reviewed-on: http://gerrit.openafs.org/4430 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6f32cacd0157df3ca78b607505d93286dcc3a9b4 Author: Simon Wilkinson Date: Sat Apr 2 13:43:15 2011 +0100 Remove NINTERFACE define Whatever behaviour was controlled by the -DNINTERFACE define is long gone from our code base (git log -SNINTERFACE can't find any references, which suggests that its removal predates OpenAFS). Simplify our Makefiles by removing the definition Change-Id: Ic84261eb40aa7de9b7c0ec7b8372517b09e242d2 Reviewed-on: http://gerrit.openafs.org/4427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e723e6d9a422f5130c9d185918a088612027e62 Author: Simon Wilkinson Date: Sat Apr 2 13:33:36 2011 +0100 Replace afs_ctime with strftime and friends Replace our local afs_ctime() hack with strftime and localtime_r, which roken can provide for us if necessary. This avoids the compatibility problems inherent with ctime_r, and removes another bit of platform compatibility goo from libutil. Change-Id: I18ed36cc4dce9aa354ad1398710ab7db83c814a2 Reviewed-on: http://gerrit.openafs.org/4426 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0bdc5d6523c2a26a9eb689bdbb1d7a2b591a821 Author: Simon Wilkinson Date: Sun Apr 3 16:23:13 2011 +0100 configure: Check for localtime_r properly Fix our check for localtime_r so that it actually picks up if it's missing on Unix platforms, and gets libroken to build it. Change-Id: Ibf6e3a0272b08aa55e0ee9493f68b3c53a5b6938 Reviewed-on: http://gerrit.openafs.org/4425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 25ea3544d145ca375c86912458824f6f00384713 Author: Simon Wilkinson Date: Sun Apr 3 16:36:30 2011 +0100 util: Remove the unused magic.h header util/magic.h is unused, so get rid of it Change-Id: Ic01a7ad73203d25b25f7b7c4af0668ab6131f6c3 Reviewed-on: http://gerrit.openafs.org/4423 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit cdc612596dc57f0bf05532322f56d9ed85f89870 Author: Simon Wilkinson Date: Sat Apr 2 15:06:10 2011 +0100 xstat: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I750ac319feb38e416abb0b8e3575613309c6ab8e Reviewed-on: http://gerrit.openafs.org/4422 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f5ecc85e58f2991ad52a7ba357949c9306f72a9 Author: Simon Wilkinson Date: Sat Apr 2 15:04:24 2011 +0100 vol: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: Ie83e6ed3e6e5eaca063b9c6af836bcdc7decdf84 Reviewed-on: http://gerrit.openafs.org/4421 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3fef4d00c8b0c3d48acc5aec2c2960768cf144cb Author: Simon Wilkinson Date: Sat Apr 2 15:00:27 2011 +0100 vol: Don't use MAX_INT when UINT_MAX will do limits.h provides us with UINT_MAX, so use this for the maxmimum size of an unsigned integer, rather than trying to grow our own. Change-Id: Ia23c45a9e295589929374a8324ea2b3d268ae6c0 Reviewed-on: http://gerrit.openafs.org/4420 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bda87d7943d97a02fcc70e48caad65c09e2421b0 Author: Simon Wilkinson Date: Sat Apr 2 14:17:41 2011 +0100 viced: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Also add a selection of headers to the list that autoconf checks for Change-Id: Ic76bb02ff5353ceba380b78abc294251ecc66267 Reviewed-on: http://gerrit.openafs.org/4418 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 353857e7685c9acfcf7474fabe57c928c70c778f Author: Simon Wilkinson Date: Mon Apr 4 11:02:17 2011 +0100 Irix: Supress some more warnings in kernel builds Suppress the following warnings in kernel builds: *) The function "blah" was declared but never referenced (1174) *) The indicated trailing comma is non-standard (1201) *) The parameter "blah" was never referenced (3201) *) implicit conversion of a 64-bit integral type to a smaller integral type (3968) Change-Id: If6cf21f287b5aefa06daaa2807e05a84e391fa95 Reviewed-on: http://gerrit.openafs.org/4419 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 80ed51a053dd878a05606cc17f91fb15e44d809f Author: Simon Wilkinson Date: Sat Apr 2 14:04:27 2011 +0100 vfsck: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I7896d654d3b1e50352e92f1fbfb3211f79791116 Reviewed-on: http://gerrit.openafs.org/4417 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3c63b6e7845b261985b3fb37457ec65065254a1b Author: Simon Wilkinson Date: Sat Apr 2 13:54:06 2011 +0100 tsalvaged: Tidy up build rules COMMON_CFLAGS already includes XCFLAGS and ARCHFLAGS, so don't include them again in the salvager cflags rule Change-Id: Ib65e9235fa5d23473417f0d197a3610c9b17d1f0 Reviewed-on: http://gerrit.openafs.org/4416 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f5dc5551aaca99916b06bcca81c141eb36fb6e73 Author: Simon Wilkinson Date: Mon Mar 28 00:24:17 2011 +0100 venus: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I431cff2dbfa5ca57a9884d7d8eb1695d3f79affd Reviewed-on: http://gerrit.openafs.org/4415 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6465e4243c6398f60dff3037e27119bb067c5038 Author: Simon Wilkinson Date: Sun Mar 27 23:03:00 2011 +0100 uss: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I1d729adfd0a4cbe73b68e553ec122073a737c8a5 Reviewed-on: http://gerrit.openafs.org/4414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e21a4713a9fc2571032386e46560ec6cbee263e Author: Simon Wilkinson Date: Sun Mar 27 22:59:26 2011 +0100 usd: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I593ca273e11e4dd7bb0887e708189cc7a1181879 Reviewed-on: http://gerrit.openafs.org/4413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 800481a382ca77e1b75acee78edc744f5dfe2eed Author: Simon Wilkinson Date: Sun Mar 27 22:57:46 2011 +0100 update: Tidy up header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: If090da744a6b096bbfc79292402439a6994062ff Reviewed-on: http://gerrit.openafs.org/4412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2fcdc9298d11a2f038f6425e6c5c24bd23da6b8c Author: Simon Wilkinson Date: Sun Mar 27 22:55:05 2011 +0100 ubik: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: Iddd472b25de2d833b3235eceab593afdd1527e03 Reviewed-on: http://gerrit.openafs.org/4411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8abfa09ee3c4d4e6da26cedf116650bbb774842b Author: Simon Wilkinson Date: Sun Mar 27 22:50:23 2011 +0100 pthreaded servers: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I6e431eb16d35fd9bd4aa07e7a9b3e47ca7281fab Reviewed-on: http://gerrit.openafs.org/4410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a1b12b3eab5cb92c797ee5d7d7227c013c01420c Author: Simon Wilkinson Date: Sun Mar 27 22:46:46 2011 +0100 sys: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I66d38e30b43ae636a78a2225271b66756586f5a2 Reviewed-on: http://gerrit.openafs.org/4409 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 601fcf1d7f7c88cfc0ffd877c5458340b3e59098 Author: Andrew Deason Date: Fri Apr 1 13:43:13 2011 -0500 afs: Retry unlock after afs_StoreAllSegments HandleFlock calls afs_StoreAllSegments when unlocking an exclusive flock lock. This can drop the write lock on avc, so we must effectively retry the entire lock operation again, since the world may have changed while we were waiting to reacquire the lock on avc. So, retry once all of the lock checks up to that point, to ensure that a lock on the file actually still exists. FIXES 125446 Change-Id: If249b0e761b595062068d7a506be85a3307870e8 Reviewed-on: http://gerrit.openafs.org/4393 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ca6bdd1cf0fe3b265bcffd846afef19a0d7853f2 Author: Simon Wilkinson Date: Sun Mar 27 22:37:47 2011 +0100 scout: Tidy header includes Remove headers which are provided by libroken Change-Id: I4d9391016e4477242385687eec4f1825426fd00d Reviewed-on: http://gerrit.openafs.org/4408 Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 4659c5c9924171525454cd2a2280ed9370476998 Author: Simon Wilkinson Date: Sun Mar 27 22:34:01 2011 +0100 rxkad: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I7e07f98802ad059052d528a57278c971e857e074 Reviewed-on: http://gerrit.openafs.org/4407 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 24f229af511a45b88f98e272b00ca08a467a6f69 Author: Simon Wilkinson Date: Sun Mar 27 22:23:20 2011 +0100 rxgen: Tidy up header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: Idd399da7de85541fb84da55246168788a2ef88da Reviewed-on: http://gerrit.openafs.org/4405 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4281e46464af4bc0033a93b9618726385f12fa0f Author: Simon Wilkinson Date: Sun Mar 27 22:20:08 2011 +0100 rxdebug: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I47f804e455d0251dc30c5d5be2433f3ee7611fae Reviewed-on: http://gerrit.openafs.org/4404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a329e9a9d859fb99d6ed2d0143b5b55ef6b66106 Author: Simon Wilkinson Date: Sun Mar 27 22:18:23 2011 +0100 rx: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I7bb08d7ec7a75b485f7f619fd4d8179d4c7349f0 Reviewed-on: http://gerrit.openafs.org/4403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 24173064d99d0c6ff37cab7b045d80c80d901144 Author: Simon Wilkinson Date: Fri Mar 25 19:46:42 2011 +0000 procmgmt: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I82fb06f8d531476cc89e53ec189be15cb7ebf5d7 Reviewed-on: http://gerrit.openafs.org/4402 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b3f8fd344cca4e9150b5571f57a64deeeace1c64 Author: Simon Wilkinson Date: Fri Mar 25 19:42:50 2011 +0000 pam: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I9a8c2d588eb00d1315c660faa485037cef2f8e6d Reviewed-on: http://gerrit.openafs.org/4401 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cb87e0834cd6244ff886bd9f4ffb26e8a1a0f097 Author: Simon Wilkinson Date: Sun Apr 3 10:23:56 2011 +0100 roken: Add env functions to configure checks Add the putenv, setenv and unsetenv functions to the list of functions that configure checks for. This avoids the roken header redefining them to rk_*, which we're then not providing an implementation of. Change-Id: I63bd88326e933f0afed399233c38489cd2aea46b Reviewed-on: http://gerrit.openafs.org/4406 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 64a305971f984184e17d45592da72b607f0ab724 Author: Marc Dionne Date: Sat Apr 2 11:04:25 2011 -0400 Update README.WARNINGS, adjust warning inhibition flags Remove warning inhibition for fsprobe and uss_kauth, and adjust README.WARNINGS to the current status. Change-Id: Icc1f16a6ec70799c05abfcde557c66fae7c4311d Reviewed-on: http://gerrit.openafs.org/4400 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b3094a39b74c0c593f6dcac945ad5e4bbf155c2d Author: Marc Dionne Date: Sat Apr 2 09:43:26 2011 -0400 Convert ubik_Call(x) calls to ubik_x() Convert remaining ubik_Call(function, ..) users to ubik_function(..). Change-Id: I841d2f32d8fd6a5256e0a922827aad22d242d832 Reviewed-on: http://gerrit.openafs.org/4399 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit a0389f5592c25afb19befb5bf62833a0b0bc59cc Author: Marc Dionne Date: Sat Apr 2 09:03:55 2011 -0400 fsprobe: Fix usage message Fix the usage message to display the correct command name. Change-Id: I886ebd45554d7e7eb6254fa59fa010fd78e5952a Reviewed-on: http://gerrit.openafs.org/4398 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef105dcc4932da804750dea0c922d5814fc5bf15 Author: Marc Dionne Date: Sat Apr 2 08:40:15 2011 -0400 fsprobe: call RXAFS_GetTime directly Call RXAFS_GetTime directly instead of using ubik_Call which is not prototyped and has logic that we don't need/want here since we're targeting a specific server. Change-Id: Ia71d1cb164d3fe71f01c88fc720837c69566baf5 Reviewed-on: http://gerrit.openafs.org/4397 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 12ea4a6f7a38b152cd4b52d9569a7edc8eec887c Author: Simon Wilkinson Date: Fri Mar 25 19:36:35 2011 +0000 libwp: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I4952f8d115d38a3bd1dfe86478cd4a30f533e86f Reviewed-on: http://gerrit.openafs.org/4386 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit f5f0ce525a63264098cd0625769d642fe6f106ba Author: Simon Wilkinson Date: Fri Apr 1 16:37:32 2011 +0100 Linux: Fix USE_UCONTEXT detection On Linux, afs/param.h determines whether to use the ucontext() function based on the glibc version. However, the glibc version macros aren't available until a C library header has been included. There have been a couple of attempts to fix this. The first included afs_sysnames.h before the C library check, but this wasn't sufficient to pull in a header for all builds. The second included stdio.h before including afs/param.h in process.c. Whilst the second approach works, it has the drawback that it breaks our convention that afsconfig.h and afs/param.h must always be the first includes in a file. More seriously, it means that the behaviour of afs/param.h is different depending on where it appears in the include order - which is especially dangerous for 3rd party user. So, this patch tries to resolve all of this by explicitly including features.h before doing the glibc version checks. The only danger I can see here is that Linux platforms without glibc may lack a features.h, but I suspect we have trouble building on such platforms in any case. Change-Id: Ief96d32b10372225335e2d2fbb7205da4bf5fc0a Reviewed-on: http://gerrit.openafs.org/4389 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba9ae1ed7c269d7c080b5ce99b3b4bb2fe0a2a6f Author: Andrew Deason Date: Fri Apr 1 16:43:24 2011 -0500 afs: Avoid memory leak on recursive write flock When a process requests an exclusive lock on a file on which it already holds an exclusive lock, we basically form a no-op. However, HandleFlock was allocating a new SimpleLocks and attaching it to avc->slocks, without freeing the old SimpleLocks structure. Since we don't need to do anything if we already hold an exclusive lock, just break out of the loop right away when we detect that scenario. Thus we avoid adding a new structure to avc->slocks, and we avoid a memory leak. Change-Id: I27c3df1d7807a0b74cba11d6e4a563df8232932a Reviewed-on: http://gerrit.openafs.org/4395 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e0e648919157bb30507401c020ea67b040da6224 Author: Marc Dionne Date: Fri Apr 1 18:53:31 2011 -0400 crypto: return a value from krb5_abortx The krb5_abortx stub is declared as returning a krb5_error_code, so make it return something to avoid a warning. Change-Id: Ib5b915c1c4e034b5c8393206c80596e5d6d5fc8b Reviewed-on: http://gerrit.openafs.org/4396 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 841c8022e3978fffe1357f339d948e93c9db9d52 Author: Derrick Brashear Date: Fri Apr 1 12:17:13 2011 -0400 macos: no more startupitems if we're upgrading, a "cruft" startupitems script should just be nuked. FIXES 129601 Change-Id: Ic9295b19c893f154fd98a6ad1e5822c8b2ef44df Reviewed-on: http://gerrit.openafs.org/4387 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53377153eca062ae6252dc8c71e7f6cb16214076 Author: Chaz Chandler Date: Sat Jul 3 15:02:30 2010 -0400 libafscp: code cleanup This patch is intended to bring libafscp into accordance with the current OpenAFS coding standards while also fixing a few small issues. Apologies in advance for the numerous whitespace changes. Change-Id: I606ed5024395319e12e8759f31494ebd27ff6112 Reviewed-on: http://gerrit.openafs.org/4380 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f2e91cc3fe61956e7661eae9da82ddf746e63824 Author: Marc Dionne Date: Wed Mar 30 18:32:04 2011 -0400 Linux: Fix fallout from path_lookup commit Fix a few issues with the recent commit to deal withg the removal of path_lookup, spotted on RHEL 5: - the configure tests needs fs.h to be included before namei.h, to get the definition of struct inode - we need to avoid the use of struct path unless its needed; on older kernels the structure doesn't exist Change-Id: I6251a96a371a50548dcafc70d94e91b52fc2922a Reviewed-on: http://gerrit.openafs.org/4382 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4af8c88ff2a312e429ae5cb1ac4010ac517bfdd5 Author: Simon Wilkinson Date: Fri Mar 25 19:25:31 2011 +0000 log: Tidy header includes Remove headers which are provided by libroken, and reorder header includes so that they're a bit a more legible. Change-Id: I41258d5b906350bcdf4854b244799fc8907b2bfc Reviewed-on: http://gerrit.openafs.org/4385 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 75c14f9d695a484118971ce66455d9eacb3f6fe1 Author: Simon Wilkinson Date: Fri Mar 25 10:12:08 2011 +0000 libadmin: Tidy header includes Remove headers which are provided by libroken, and reorded header includes so that they're a bit a more legible. Add math.h to the list of headers that configure will check for Change-Id: I530afa77866a0aa3a33f8684ce9cf630aa347812 Reviewed-on: http://gerrit.openafs.org/4384 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 560b0b8c0b1e1777c3345af425d4a32354697c29 Author: Simon Wilkinson Date: Thu Mar 24 22:32:39 2011 +0000 libacl: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I67bb92abc985d1510d8b8a108f9b9e3a62525fd5 Reviewed-on: http://gerrit.openafs.org/4332 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a4e2c1cc7e6d98a4b826e2826bc26b771138ab1a Author: Simon Wilkinson Date: Thu Mar 24 22:17:55 2011 +0000 kopenafs: Tidy up headers Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: Ie4f0f87074b9f9c5a028098ea39e548d9932e54a Reviewed-on: http://gerrit.openafs.org/4331 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6bdba897f49b8358d3592588a78d9b59757a9c13 Author: Derrick Brashear Date: Wed Mar 30 09:46:43 2011 -0400 xdr symbol fallout changes to xdr make xdr_vector and xdr_reference missing from libuafs. fix it. Change-Id: I2c48716dc16c86ce91cfdd9deb61cc778f94275a Reviewed-on: http://gerrit.openafs.org/4379 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b69fd6d5631482a786c2223a7dec0b2c9a07f92 Author: Ben Kaduk Date: Tue Mar 29 22:26:50 2011 -0400 Unbreak make dest for FBSD It turns out that we do need an afs.rc.fbsd that is set up for transarc paths in this directory. To get it to work properly will require the user to symlink to it from a dir that gets checked by rcorder, but them's the breaks. Change-Id: I1786e4862768127f29a6d309097536829da3e029 Reviewed-on: http://gerrit.openafs.org/4378 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a4b8823950d0d7f3806fe9e7aed22502b72a79e4 Author: Antoine Verheijen Date: Mon Mar 28 10:05:40 2011 -0600 OpenBSD: Complete implementation of afs_osi_TimedSleep The OpenBSD version of afs_osi_TimedSleep() is missing the required afs_event structure and afs_getevent routine. This update adds them (by borrowing a copy of the code from the FreeBSD implementation). Change-Id: Ie470e83a56caecb9494bb86dc3ff0a18420bb56e Reviewed-on: http://gerrit.openafs.org/4373 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 920a00e075b679f59e31b9fcbe7f5db15e345a95 Author: Andrew Deason Date: Tue Mar 29 12:28:46 2011 -0500 vol: Add timeouts to SYNC server select() calls Normally *SYNC server processes wait indefinitely for activity to occur on one of the SYNC sockets. On some Linux kernels, there exists a race condition where data can come in on a socket, but the select() call continues to wait. To ensure that we do not hang forever in such a scenario, add a timeout to the select() call, which will ensure we notice the new data within 10 seconds. Raise the timeout on non-Linux to reduce impact elsewhere. The Linux kernel bug is tracked in , though that bug report may not represent all affected kernels. Change-Id: I3250eb53d59610ccbcffe9e8e283984d5ae0e2b4 Reviewed-on: http://gerrit.openafs.org/4377 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e2cd861cdf30735897cf32617b7641cbd2be1229 Author: Andrew Deason Date: Tue Mar 29 13:04:48 2011 -0500 Always set LIB_roken when we find libroken If we found an external libroken when configuring, we were not setting LIB_roken if --with-roken=DIR was not specified. Set LIB_roken when we find a libroken without --with-roken=DIR. Change-Id: I927647a14f4c5cd8925f0e719b0a9b4164584571 Reviewed-on: http://gerrit.openafs.org/4376 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e4095aab4ce53cd41e726f34e8810ea421dd7f41 Author: Russ Allbery Date: Mon Mar 28 12:56:10 2011 -0700 NEWS updates for 1.6.0pre4 Add additional 1.6.0 NEWS entries based on the release notes for 1.6.0pre4. Change-Id: Ibd681058f9534c9c270e6e0f127d3beb463c6a95 Reviewed-on: http://gerrit.openafs.org/4374 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8336d31ac5092a16cfb206707e69c19f07f99241 Author: Chas Williams (CONTRACTOR) Date: Wed Mar 16 10:32:48 2011 -0400 rx: always use/protect the xdr routines in the kernel This clears up some warnings about duplicate symbols with Solaris 11 since the Solaris kernel already has these routines. Since we never use stock kernel version of the xdr routines perhaps we should always use/protect our version of the symbols. Change-Id: I4b5b4a691fb838093aff728469d17c28dccbaaea Reviewed-on: http://gerrit.openafs.org/4252 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c40be933628653f10ecd1ddbb51bf1b786c3b1f3 Author: Simon Wilkinson Date: Thu Mar 24 21:58:29 2011 +0000 kauth: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. This adds arpa/inet.h to the list of headers that configure checks for Change-Id: I1792ede4be761238bb05567c1d763ed63f50051e Reviewed-on: http://gerrit.openafs.org/4330 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8608ca6771c9d254488f2929a4713b0f3f2f6c18 Author: Simon Wilkinson Date: Thu Mar 24 21:08:35 2011 +0000 gtx: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I444a8a325cca8da76f410185949103ccd873c743 Reviewed-on: http://gerrit.openafs.org/4329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ffd91d91f431a248c550a6f307af1a9dce285009 Author: Simon Wilkinson Date: Thu Mar 24 21:03:00 2011 +0000 fsprobe: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I0eee5dd0656e32617855ccf4a30d4c4be47b7da2 Reviewed-on: http://gerrit.openafs.org/4328 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e6aff0bcb69b13ae5ca1d983f9b54c3245b0cc2 Author: Simon Wilkinson Date: Thu Mar 24 20:58:46 2011 +0000 finale: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Also, tidy up translate_et_nt.c by removing the AIX specific code which will never be built, as this file is only compiled on Windows! Change-Id: Iec7a811f02eaf1a2ad573bbadc30d782426231d0 Reviewed-on: http://gerrit.openafs.org/4327 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5a9410189792235c1a8b7002c8988e4b20063c87 Author: Simon Wilkinson Date: Thu Mar 24 20:56:11 2011 +0000 dir: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I355cf33fdf72fed640c17ff5c2dfca1dd6f93d6f Reviewed-on: http://gerrit.openafs.org/4326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d1c83df1cce4084fad72a4fedfa5ad77d28ec05a Author: Simon Wilkinson Date: Thu Mar 24 20:50:21 2011 +0000 com_err: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I167b0fa7f48d7dd71efb43a4f137655b38137314 Reviewed-on: http://gerrit.openafs.org/4325 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3f3d0d999f1c6ab25271418c302a79e3e5661f10 Author: Jeffrey Altman Date: Mon Mar 28 08:29:25 2011 -0400 vol: remove flock emulation now provided by roken flock emulation is provided by rk_flock from roken. No need to provide a local emulation function in namei_ops.c. This change removes a macro redefinition warning. Change-Id: Id8b7cf030d8653ceb979db60c20ed28c03bd9737 Reviewed-on: http://gerrit.openafs.org/4365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 69b37fb3a7d231bb7ba1f8660f9c294fb1050049 Author: Simon Wilkinson Date: Mon Mar 28 14:52:33 2011 +0100 AIX: Add flock to roken Add the rk_flock() emulation function to roken, primarily for use on the AIX build, but it will also be used for WIN32 Change-Id: Ia8f11e19bbe9fdf721a7b72660d860624139d9b1 Reviewed-on: http://gerrit.openafs.org/4368 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 58017bf4720abd2acf84a64dcee21e70e8d6ed17 Author: Simon Wilkinson Date: Thu Mar 24 20:46:54 2011 +0000 cmd: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I424a0df98ff9334d9e46a9af2ba9d7f1861f501e Reviewed-on: http://gerrit.openafs.org/4324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ccfb125e8b944e516e5414935f800f9e65cef585 Author: Simon Wilkinson Date: Thu Mar 24 20:42:37 2011 +0000 bu*: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: If20a2ef67d4cbc70156c1707264a5b7360cfa11a Reviewed-on: http://gerrit.openafs.org/4323 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cce1bd6059fd9dc5e909a56e879331d6f46bdf99 Author: Simon Wilkinson Date: Thu Mar 24 20:07:37 2011 +0000 bozo: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: Ie4f1b955c111f30b98aa8793b3e3d15dd0bb9275 Reviewed-on: http://gerrit.openafs.org/4322 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6830269772271d7d25d5de98671e01a9da4863cd Author: Heimdal Developers Date: Mon Mar 28 14:44:20 2011 +0100 Import of code from heimdal This commit updates the code imported from heimdal to 987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583) New files are: roken/flock.c Change-Id: I7b9470cfdf99e41ea460772025767c47f6ad26f0 Reviewed-on: http://gerrit.openafs.org/4367 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b440e1a5513efca246368ffe4656e61b58b35a40 Author: Simon Wilkinson Date: Mon Mar 28 14:43:28 2011 +0100 Import flock.c from roken Add flock.c to our list of roken imports, so that we can use it on AIX Change-Id: I1f7b953c8853f4b021a486bb93ddc392c2c08e07 Reviewed-on: http://gerrit.openafs.org/4366 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d162266c4958b22cc45d65e3f204a96c218e5f6 Author: Marc Dionne Date: Sun Mar 27 10:59:55 2011 -0400 Linux: 2.6.39: replace path_lookup with kern_path path_lookup is no longer available, use kern_path instead. Change-Id: I42ae43114fe257fc65452f1b0a35d43595b0044b Reviewed-on: http://gerrit.openafs.org/4360 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 20da07abdf414ec86b2d6ead4cc2d9f59a1ee526 Author: Derrick Brashear Date: Tue Mar 22 12:47:16 2011 -0400 ihandle release locking simplification several callers drop locks so ih_release can be called unlocked, then relock. simply allow a locked call (via _ih_release_r). side effect: we had races before on refcnt check versus cleanup style. this addresses it, but only removes lock contention. Change-Id: Id2d132baa170894ba3ab0e1e8d0bcf9cf6c0c712 Reviewed-on: http://gerrit.openafs.org/4271 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit ae038f92501ef7c279849fd2749cf835f68930a8 Author: Simon Wilkinson Date: Thu Mar 24 19:56:35 2011 +0000 auth: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I2afd32d86b40b84c14f8a6021a583b6a4888780c Reviewed-on: http://gerrit.openafs.org/4321 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e922ac70925248af004972191cbd1db105b35d48 Author: Simon Wilkinson Date: Mon Mar 28 10:24:14 2011 +0100 autoconf: Add tests for resolver headers Add tests for arpa/nameserv.h and resolv.h, so that roken will look after including these files for us. Change-Id: Ifa6b7d877d67c967811017a25c98fab6bd571d4c Reviewed-on: http://gerrit.openafs.org/4364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 235aaced95300695ebe195c5af1d12cd2c54ab6d Author: Simon Wilkinson Date: Mon Mar 28 10:23:22 2011 +0100 fssync: Rename state The structure 'state' in fssync-debug conflicts with a structure of the same name in AIX's resolv.h header. Renaming the structure here to fssync_state to avoid the conflict. Change-Id: I15df31a48369f76ef927a5153d3415e821bc0c51 Reviewed-on: http://gerrit.openafs.org/4363 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1aab133e495a27fa4783379478c563d0ec066a9c Author: Simon Wilkinson Date: Thu Mar 24 19:27:21 2011 +0000 audit: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I5543c5c9c22828ee19460c2ab24065f508a6353f Reviewed-on: http://gerrit.openafs.org/4320 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c153ec0c9e1794b8ee545e99d8c00ab1eab04efa Author: Simon Wilkinson Date: Thu Mar 24 19:23:34 2011 +0000 vol: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: Ifd88310dc26ebfd995b4a25b2984ddb01606264f Reviewed-on: http://gerrit.openafs.org/4319 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8b88debf018a83ea0ec561a56db5c12be96eceda Author: Simon Wilkinson Date: Thu Mar 24 19:11:15 2011 +0000 volser: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Also, add sys/uio.h to the list of libraries that we check for. Change-Id: I03d9c143db42a1ec415ab5624e2cbede0d34e310 Reviewed-on: http://gerrit.openafs.org/4318 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f6d148f6e7b399221de28808d9a4167dfb77e37c Author: Simon Wilkinson Date: Fri Mar 25 00:37:52 2011 +0000 volser: More renaming of putshort and putint32 Commit 2d6bc153689f14f8690878b15d9fb711a56b0546 renamed the putshort and putint32 macros in dumpstuff.c to avoid conflicts with macros that are defined in resolv.h. However, an almost identical copy of that code also exists in vol-dump.c Rename putshort and putint32 there too. Change-Id: I9b98f99fb5c2b24b57e2bc480c891aa86b6df344 Reviewed-on: http://gerrit.openafs.org/4317 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8c1f7259314b1d81ce7be2fe7abe3f28672b2ce0 Author: Simon Wilkinson Date: Thu Mar 24 15:36:49 2011 +0000 afs_snprintf is dead, long live rk_snprintf We were shipping our own implementation of snprintf and friends, as afs_snprintf. Now that we're using roken everywhere, we can make use of roken's rk_snprintf, and no longer need to ship our own. As Window's snprintf isn't C99 compliant, roken always uses its own on this platform. The effect of this is that we can no longer use AFS_UINT64_FMT and AFS_INT64_FMT for snprintf calls (and the Log functions that call them). Instead, we need to always use the Unix format specifiers when calling these functions. Make thse changes across the whole tree. Change-Id: I3fffef97566f239ad639f15c4decd136d5bbd765 Reviewed-on: http://gerrit.openafs.org/4316 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a58639ee7b4c80de9f7c177549639cbf18b71e14 Author: Simon Wilkinson Date: Sun Mar 27 21:06:27 2011 +0100 Windows: Don't use %I for IP addresses %I isn't supported by the roken printf functions. In preparation for switching over to them, replace our use of asprintf to convert IP addresses to strings with the afs_inet_ntoa_r function. Change-Id: Id38dc56405071d62fb2b12e4f69905aa7a2026b0 Reviewed-on: http://gerrit.openafs.org/4362 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9376293634393597ac7db88593100937621f6c3f Author: Marc Dionne Date: Sun Mar 27 11:20:17 2011 -0400 Linux: 2.6.39: deal with BKL removal For 2.6 kernels the OpenAFS code is already BKL free, but the corresponding header file smp_lock.h is still included in various places. This header no longer exists, so remove all occurrences outside of LINUX24. Change-Id: Ib659fa787eab4b39efce5b0a62f5723950e79703 Reviewed-on: http://gerrit.openafs.org/4361 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d3d3d2c51ab12a1be5f19745dc0ebb7d306fcc3b Author: Simon Wilkinson Date: Thu Mar 24 10:57:47 2011 +0000 vlserver: Rationalise usage message Rather than having 2 copies of the usage message, just have one with #ifdef switches to disable options that are not available in that build. Change-Id: I5b2135fba3d42fdbb879d5e8cb61933f4929d598 Reviewed-on: http://gerrit.openafs.org/4305 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b1b8d7a4baa558565d4e441e57d4a9941da9ed3a Author: Simon Wilkinson Date: Thu Mar 24 10:28:59 2011 +0000 ptserver: Rationalise usage message Rather than having 4 copies of the usage message, just have one with #ifdef switches to disable options that are not available in that build. Change-Id: If888a64307b78189fcf617bbe0dc4ca9e55e8d2b Reviewed-on: http://gerrit.openafs.org/4304 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 96916c8fcfa6832bd485a9e0b9d61fa6b23a30d9 Author: Simon Wilkinson Date: Fri Mar 25 17:14:26 2011 +0000 HP/UX: Make more use of roken Make more use of roken on HP/UX by letting it provide definitions for random and srandom, and using its implementation of getdtablesize Change-Id: I1212c77ea9cc6ef436cfc5c16e893aefbc33d31b Reviewed-on: http://gerrit.openafs.org/4341 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c019e03e70e95258da1af40d96d9798db1b8b2d2 Author: Simon Wilkinson Date: Fri Mar 25 17:34:51 2011 +0000 crypto: Fixes for recent Heimdal changes The last Heimdal import changed the name of a number of structures so that they are private to the krb5 code. Mirror this by changing our prototypes to match the new names. This solves the key_type problem that we previously fixed by #defining key_type to hc_key_type, so remove that define. Change-Id: I9b3f1712b0bf6641a780cc4002e73f8a511ff080 Reviewed-on: http://gerrit.openafs.org/4340 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2343c67c7c2a312f9d8c0d2c5dd89077ac8e4b21 Author: Heimdal Developers Date: Fri Mar 25 17:18:37 2011 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 987658325eb7bd6b10882cc4cdd224499e7f7a03 (switch-from-svn-to-git-2052-g9876583) New files are: roken/getdtablesize.c Upstream changes are: Love Hornquist Astrand (2): prefix symbols that are _krb5_ structures prefix internal structures with _krb5_ Change-Id: I36aae13d877b6b40b8d2db47217884dc24f3f9c8 Reviewed-on: http://gerrit.openafs.org/4339 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit db3288b0e745884b96697df4e17c96fde4bfa304 Author: Simon Wilkinson Date: Fri Mar 25 17:17:47 2011 +0000 Add getdtablesize to the roken import Change-Id: I089e3976e90429e39102eeb82a74ece97e87bd25 Reviewed-on: http://gerrit.openafs.org/4338 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2d754dfd37a93f8ef21857b0eac52640259a5bff Author: Simon Wilkinson Date: Thu Mar 24 15:58:19 2011 +0000 aklog: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Also add pwd.h to the list of headers that we check for in configure, and that roken will include if they are available Change-Id: I61ab95eeca11127a33bb668dddfc24ec6ce7f8f1 Reviewed-on: http://gerrit.openafs.org/4303 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 54b9813fe95f51f23c8c710ec28081fcdb4bdcc2 Author: Simon Wilkinson Date: Thu Mar 24 15:50:47 2011 +0000 NO_DES_H_INCLUDE is no longer necessary Now that we're using hcrypto for DES, rather than rolling our own, we don't need to specific NO_DES_H_INCLUDE, so get rid of it. Change-Id: Id370ddacb0a57264cc8f5cdda3c59fbb627708af Reviewed-on: http://gerrit.openafs.org/4302 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4dd09ac28eb9dc40c904c00142ed8a960990b248 Author: Simon Wilkinson Date: Thu Mar 24 10:01:00 2011 +0000 ptserver: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Also reorder our headers so that they go #include #include #include (if required) #include [ ... out of directory headers ... ] [ ... local headers ... ] Change-Id: I9214f6bf65085947cfc588b47484e1b022ffc5b1 Reviewed-on: http://gerrit.openafs.org/4299 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7b4da89c8ed266959ec8d3ae4f6627b096206dee Author: Ben Kaduk Date: Fri Dec 17 01:16:30 2010 -0500 new files for FreeBSD packaging at 1.6.0pre3 Packaging for use with FreeBSD's Ports Collection. The directory layout is flattened, and a couple of files that do not make sense here are not included. The afsd rc script lives in packaging/ as it is not runnable in its committed form, it requires variable substitution that occurs at install-time from the Ports Collection. Change-Id: I72d6c2ee7106611b0ec9bfe3e47a471ed66b7255 Reviewed-on: http://gerrit.openafs.org/4351 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dce071acef1119aceca7eb80a66c035fb03e9259 Author: Ben Kaduk Date: Sun Nov 21 23:32:37 2010 -0500 Remove outdated rc file for afsd on FBSD The semantics of rc scripts have changed drastically since this was written. It will need to be rewritten from scratch; the new version will live in src/packaging/FreeBSD as afsd.in, as it is included with the port packaging in that form. Change-Id: I397f8d5a9dc0430f1a9e8f2f0f378585cee4bd3b Reviewed-on: http://gerrit.openafs.org/4350 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f901c0f5258c14f5d04d9b64ca5b472c468f60bd Author: Ben Kaduk Date: Sat Nov 6 00:30:12 2010 -0400 Remove stale FreeBSD packaging We no longer use the Transaarc paths, and the rc environment and packaging methods are quite different now. Change-Id: I6915f41455dcf0518472b0a81fe7e5c559d4a994 Reviewed-on: http://gerrit.openafs.org/4349 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9df32e55d4e5000b7f6c3c4d18f3498dd3d989c0 Author: Jeffrey Altman Date: Sat Mar 26 16:50:52 2011 -0400 Windows: export roken symbols rk_vsnprintf rk_vasnprintf Change-Id: I39344d10a599e7bdc761ae03853b679ab6edcb4f Reviewed-on: http://gerrit.openafs.org/4348 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 620ec4382fbf79908c62e4ce1e451b8743e457ac Author: Jeffrey Altman Date: Sat Mar 26 13:05:26 2011 -0400 Windows: change log for 1.5.9904 (1.6.0pre4) Change-Id: I0c302ef20bf245f927f3167d3c662334e71d81df Reviewed-on: http://gerrit.openafs.org/4347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 55781a831954cb1e7253a12e0f9b581b586c3603 Author: Andrew Deason Date: Fri Mar 25 15:54:01 2011 -0500 viced: REALLYCLOSE origfdP after CoW In StoreData_RXStyle, we save a pointer to the original FdHandle_t if we need to CopyOnWrite the target vnode, for the purposes of possibly copying additional data later on. After the CopyOnWrite call, this points to an inode that is not in the current volume, and is thus less likely to be accessed. In CopyOnWrite itself, the original file handle is FDH_REALLYCLOSE'd because of this, so the handle does not remain in the cache. Do the same in StoreData_RXStyle, so origfdP is always FDH_REALLYCLOSE'd after we have called CopyOnWrite. Change-Id: Ibe33d26120eb354318147f3a31fe32d38c6a70c6 Reviewed-on: http://gerrit.openafs.org/4344 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fa86aee76a3bf73d20771c24a3448b04cb6db932 Author: Andrew Deason Date: Fri Mar 25 15:44:57 2011 -0500 Revert "ihandle: Ensure FDH_REALLYCLOSE really closes" This reverts commit a50f4c8d802c7b1c258a9cbe388dfab50425596b. The only difference between FDH_CLOSE and FDH_REALLYCLOSE has to do with ihandle cache behavior. FDH_REALLYCLOSE just indicates that the reference we are closing is not likely to be used by other code, and should be kicked out of the cache immediately (thus closing the file descriptor). So, if there is another reference to that FdHandle_t, and it issues an FDH_CLOSE, it thinks that the reference is likely to be used again soon, and so the handle should not be kicked out of the cache. Thus, the behavior before a50f4c8d was already correct. Change-Id: I5a5c0c18b459f50e16c1d901ecc5f4eb18e8ef62 Reviewed-on: http://gerrit.openafs.org/4343 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1d51d2a6030fb8aabdae1fedb6846dc7ef9fbca Author: Jeffrey Altman Date: Tue Mar 8 11:04:07 2011 -0500 vol: avoid MAXINT redefinition warning in vnode.c Change-Id: Ifeed132ac477a83f21af5b52cba7b658fb083221 Reviewed-on: http://gerrit.openafs.org/4179 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e261238470ed28ee7c1068d914de171b34033e09 Author: Andrew Deason Date: Tue Mar 8 16:59:32 2011 -0600 SOLARIS: Perform daemon syscalls as kernel threads Add AFS_SUN5_ENV to the list of platforms where AFS_DAEMONOP_ENV is defined. Implement the necessary functionality so we spawn kernel threads when a daemon syscall is called. Remove the rxk_Listener wrapper, since it will be called in a separate thread via the afs_DaemonOp interface. Change-Id: I3c2570696a83f1837d08522fdd9dfc30dfefda4b Reviewed-on: http://gerrit.openafs.org/4189 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6143bb27d20380e689346b4e66c077e5d4cd6061 Author: Andrew Deason Date: Tue Mar 8 15:37:17 2011 -0600 libafs: Consolidate afs_DaemonOp code Create the AFS_DAEMONOP_ENV define to simplify the logic of when we perform afs_DaemonOp-y code paths. Also create the daemonOp_common function, to perform common pre-fork operations that are common between platforms. Change-Id: Id93e1ffd7b8f4c0029cf4632239a519a619e9f9f Reviewed-on: http://gerrit.openafs.org/4188 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99ed22fb02a3b44c03327a1fdd5ef56e211724b6 Author: Andrew Deason Date: Fri Mar 25 16:37:30 2011 -0500 SOLARIS: Correct ioctl syscall error handling Do not use the return code from ioctl for errno. Ioctl itself will set the errno and return value correctly, so don't mess with them. Change-Id: I26c3afb5c77a3fce57e0d53d8671541805b32e08 Reviewed-on: http://gerrit.openafs.org/4345 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 05241a59a1ce88d2f25d75127124971c55e1f677 Author: Andrew Deason Date: Tue Mar 8 14:59:44 2011 -0600 libafs: Indent afs_call.c ifdef maze Change-Id: I46198de875c16e221d4b75bb45afc9e2fd09dde1 Reviewed-on: http://gerrit.openafs.org/4187 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d971d235e986c4e9ca959cf458e1e2322d79ac63 Author: Andrew Deason Date: Fri Mar 25 14:11:16 2011 -0500 ihandle: One more indentation fix Change-Id: Icfed36ba0087d82706aea88e083576480244a9ad Reviewed-on: http://gerrit.openafs.org/4342 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c5be1f72875bcb083a9ddef4621efecf62aa880e Author: Andrew Deason Date: Thu Mar 24 17:57:32 2011 -0500 salvager: Stop asking for DAFSness on SYNC_FAILED Break out of the loop so we stop asking the same thing repeatedly. Change-Id: Ifcb2cd62589867927ab9f8be03bab7b981e5f761 Reviewed-on: http://gerrit.openafs.org/4315 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ad0afb57b9172bb7cfa0853b5f34259c0958d248 Author: Andrew Deason Date: Wed Mar 23 17:38:35 2011 -0500 DAFS: Allow the volumeSalvager to checkout volumes Change-Id: Ia255c866bbd4f6cb883383650373223f09875374 Reviewed-on: http://gerrit.openafs.org/4298 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1043c7ce7d68409c1debfada0a92c96a94a8980b Author: Jeffrey Altman Date: Fri Mar 25 08:58:20 2011 -0400 Windows: trailing dot not part of volume name When dynamically adding new cell mount points to the Freelance directory do not include a trailing dot when specifying the root.cell volume name. Change-Id: Idfae9e3f44380cbce49d77fff22bee15dc4856ce Reviewed-on: http://gerrit.openafs.org/4333 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 04bcfa2821c9deba151f562bb78452276d8d7443 Author: Derrick Brashear Date: Thu Mar 24 16:11:17 2011 -0400 add AFS_DEMAND_ATTACH_UTIL use this for non-pthreads "support code" e.g. salvager. Change-Id: I17825fa90de33a7a4d17f364713fd4602dae497b Reviewed-on: http://gerrit.openafs.org/4312 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 9b245d856b165f195b0da93df77e4a28a1698b46 Author: Simon Wilkinson Date: Thu Mar 24 15:26:38 2011 +0000 util: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times. Change-Id: I5e5e67b695f07bf121b0543c7f936278009eff15 Reviewed-on: http://gerrit.openafs.org/4301 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6960a3038a7b5d8dfc5e43fef43c62e0d6ce634c Author: Simon Wilkinson Date: Thu Mar 24 10:54:44 2011 +0000 vlserver: Tidy header includes Since we adopted libroken, we get a lot of header includes automatically from roken.h. Use these, instead of including lots of things multiple times Change-Id: I8b304bcd0e376601fbe622f7453d0295b188b697 Reviewed-on: http://gerrit.openafs.org/4300 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8234cc254406173a7ada9fb1b4a63ca8aa626bca Author: Andrew Deason Date: Thu Mar 24 10:22:52 2011 -0500 DAFS: Correct FSYNC_VOL_QUERY_VOP checks Check that the given partition matches the vp partition, and ensure the vp is not in an exclusive state when we check the state. Otherwise, we may return pending vol ops for a volume on a different partition, or we may incorrectly return that there is no pending vol op when in fact the volume does not exist at all. Change-Id: I3e28c0b7b372360d181a3310eb1fb7fce223ae59 Reviewed-on: http://gerrit.openafs.org/4308 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7b00c17b49fe6a54f99f3c23bfc307a4b10d88e2 Author: Russ Allbery Date: Thu Mar 24 12:56:56 2011 -0700 Correctly document the AFS client setuid defaults AFS no longer honors setuid status by default. Update the admin guide documentation appropriately and add a warning recommending against enabling setuid status given the limitations of the current AFS protocol. Reformat this section of the admin guide to make it easier to maintain. Change-Id: I6ea5859037d7d194df801f1a76583257cfc8bbe8 Reviewed-on: http://gerrit.openafs.org/4311 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 11ad1e467f9708f12fe09228cbb827b8f4e1225b Author: Jeffrey Altman Date: Wed Mar 16 02:17:38 2011 -0400 Windows: avoid recursive cm_CheckOfflineVolume Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used to prevent cm_Analyze() from performing recursive cm_CheckOfflineVolume operations that will exhaust the stack. Change-Id: Ia4ee14307bf812cc2208482a19c1a914aca3e447 Reviewed-on: http://gerrit.openafs.org/4240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 637f5b642aaee3a6f4642fd0ba15e2a9eec6c496 Author: Andrew Deason Date: Wed Mar 23 17:25:03 2011 -0500 salvager: Give back volumes when exiting early Sometimes the salvager exits a bit earlier than normal. For instance, when no applicable inodes are found for a volume group, or if the -inodes command line option was given. In these cases, we have already checked out singleVolumeNumber from the fileserver (if we're salvaging a single VG), so we need to give it back. So, give it back in those instances. Change-Id: I3ab732d3b640b76d3bdec7ac9d01e57dc5a54ade Reviewed-on: http://gerrit.openafs.org/4297 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dba991728ba5a90af316928348053189dac80398 Author: Andrew Deason Date: Wed Mar 23 16:46:47 2011 -0500 DAFS: Do not record vol ops for DELETED vols When a volume is VOL_STATE_DELETED, it effectively does not exist, so there is little point in recording a vp->pending_vol_op structure for it. Just let callers checkout the volume as they would a nonexistent volume: without recording anything about the operation. This just reduces some edge cases and confusing debugging info, so we don't have to worry about cleaning up pending_vol_op structures for nonexistent volumes. Change-Id: I56b92c3f2548ea48f9c61100be07edf9f7277fee Reviewed-on: http://gerrit.openafs.org/4296 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f2c1f2ee48663d00701e7cee52b99151e36b9534 Author: Andrew Deason Date: Wed Mar 23 16:12:20 2011 -0500 salvager: Do not AskOnline nonexistent volumes If singleVolumeNumber is not in our volume summary list, then the singleVolumeNumber volume does not exist. So, don't try to bring it back online. Still do try to make sure we don't have the volume checked out, though, so issue an AskDelete, so ensure that it's not checked out and that the fileserver does not think it exists. Change AskDelete so we don't care if we tried to delete a volume that the fileserver thinks already doesn't exist. Change the FSYNC_VOL_DONE handler so it does not complain about already-deleted volumes. Change-Id: I33dd876c0db91a3c8a5210fca329d63bf4b3d212 Reviewed-on: http://gerrit.openafs.org/4295 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 22149d82d465f5defbe329b3f9b3c5040a6293e9 Author: Andrew Deason Date: Wed Mar 23 15:19:03 2011 -0500 namei: Log ListViceInodes write failures If we fail to write to the inodeFile given by ListViceInodes, we should log the failure. Otherwise, no indication is given as to what failed, when a salvage gathers the inode list. Change-Id: Ia54105e1043969781711b9168c6787d07d1d319f Reviewed-on: http://gerrit.openafs.org/4294 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit d6557a9cf7b76af62cba986428cf0362d42eae9a Author: Andrew Deason Date: Wed Mar 23 14:30:18 2011 -0500 salvager: Fix conversion from stdio calls Commit 5247fa38a4faebfdffba178ca01e5b419f034d5d converted some I/O calls in the salvager from stdio to OS_OPEN/OS_WRITE/etc. Fix some of the conversions, including: - We need to pass O_CREAT to OS_OPEN calls, since we are creating these files - OS_WRITE returns the number of bytes written on success, not the number of "elements" like in stdio Change-Id: I789b7549c1eabeb821591bf9f42d810252fb11e1 Reviewed-on: http://gerrit.openafs.org/4293 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit a50f4c8d802c7b1c258a9cbe388dfab50425596b Author: Andrew Deason Date: Tue Mar 22 16:36:47 2011 -0500 ihandle: Ensure FDH_REALLYCLOSE really closes If FDH_REALLYCLOSE is given an FdHandle_t that has more than one user, currently it does effectively nothing. Ensure that the file descriptor actually gets closed on a subsequent FDH_CLOSE, but setting the new fd_needs_rclose field. Change-Id: I04794662ca64e6be718da82e10994a4a7bc0b39a Reviewed-on: http://gerrit.openafs.org/4274 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f41ee7d17267381c4e67eec2f35f298cc272397e Author: Derrick Brashear Date: Wed Mar 23 14:16:10 2011 -0400 macos next support first brush at supporting next macos. totally not lion about it. Change-Id: I4d2e05f68266ea82de710717c5340f16425f897e Reviewed-on: http://gerrit.openafs.org/4290 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cfab7a166a78905276dc4f0b310eb894893107ee Author: Derrick Brashear Date: Wed Mar 23 14:11:24 2011 -0400 osconf: reduplicate systype stuff in some cases there is more to do, and in some cases we probably already didn't build anymore, but, let's simplify. Change-Id: I779c3ba8f3f02e6202700d96ee92cd473de66af2 Reviewed-on: http://gerrit.openafs.org/4288 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d4ebebd0c3f89b65e93f0da6d53665271e6d2a61 Author: Andrew Deason Date: Wed Mar 23 11:07:03 2011 -0500 DAFS: Do not VDeregisterVolOp_r while exclusive We should wait for a volume to transition out of an exclusive state before calling VDeregisterVolOp_r on a volume, since some code may be examining the vol op outside of VOL_LOCK in an exclusive state. We should be doing this anyway before performing volume state checks, since we may be trying to e.g. attach the volume at the same time. Change-Id: I3a5b78b7c0033887a973ce941ced592df8c4bf3d Reviewed-on: http://gerrit.openafs.org/4287 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b0921071dd1b4d460d406985bba9619561444055 Author: Simon Wilkinson Date: Wed Mar 23 15:35:35 2011 +0000 rpm: Build srpms without %dist in their name On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This leads to makesrpm.pl building SRPMS with .el6 in their release. As we endeavour to use the same SRPM on all of our Fedora platforms, this is less than ideal, so change makesrpm.pl to squash the setting of %dist before building the RPM. Change-Id: I5b5b9db7654ce21a269233e8950d4f4d1df81ad7 Reviewed-on: http://gerrit.openafs.org/4285 Reviewed-by: Alexander Ivan Redinger Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9ac85bb2fd91baa4c3077d091f395f57e933018a Author: Andrew Deason Date: Tue Mar 22 16:18:17 2011 -0500 Fix ihandle.c indents ihandle.c had some blocks that were not indented. Indent them. Change-Id: I05442c6fabc19fab314f515fa950159de05b8c48 Reviewed-on: http://gerrit.openafs.org/4273 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ef9fc4fadaded1c0ea067b2fd1d423df826606ae Author: Jeffrey Altman Date: Tue Feb 17 04:37:27 2009 +0000 vclosevnodefiles-ihandle-leak-20090216 LICENSE IPL10 FIXES 124359 don't leak ihandles on close. this isn't a complete fix for the issue (cherry picked from commit b9816e12f7ed8213c9c4eaea09e992e69ce4ee05) This reverts the part of 12e85227c5dbfdb1258718ee3360bffacc4f96ac that reverted b9816e12f7ed8213c9c4eaea09e992e69ce4ee05. Change-Id: If4ac661a3a0f8abf7f6a79fa9d72d715861bcf51 Reviewed-on: http://gerrit.openafs.org/4272 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 81e7a5adf93a6b5eec104ca4bde429cf6cb0548a Author: Derrick Brashear Date: Tue Dec 7 21:26:59 2010 -0500 DAFS: fix forceDAFS support in salvager we need to get the shared partition lock for the per-volume forceDAFS case Change-Id: I7be91420bb0df5963e789c932e5c469fe02ec108 Reviewed-on: http://gerrit.openafs.org/3487 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9ecf28c6c7c232823ac9b44cd00db9afab81c91 Author: Derrick Brashear Date: Tue Dec 7 21:23:53 2010 -0500 DAFS: allow salvager to detect whether FSYNC server is DAFS in order to enable the right commands and print the right errors, query for DAFS-only FSYNC op. doesn't use bozo InstanceInfo as it's possible you can run fileserver outside of bos. Change-Id: Ib94f7b3a2960cd493f110af4d5dee7e97a6493c9 Reviewed-on: http://gerrit.openafs.org/3486 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d4e8b729d8f216e9f033e95194740ff4cb566688 Author: Russ Allbery Date: Tue Mar 22 02:04:46 2011 -0700 Update NEWS for 1.6.0pre3 release Add additional NEWS entries from the 1.6.0pre3 release notes. Change-Id: I46b306a7fc85f95be87c2b9eeaefae6b9816be8f Reviewed-on: http://gerrit.openafs.org/4270 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2578555d7e08131bf2fe4cdd0aa4b32567a76eb2 Author: Andrew Deason Date: Tue Mar 15 14:24:01 2011 -0500 viced: Check vnode length on dir ops The commit aadf69eabb1962496fa93745ab560a5b48cacd61 added checks on vnode length whenever we read or write from a vnode. Add the same check on directory vnodes when we modify the directory (whenever entries are added or deleted). Change-Id: I8aa438941f840019bc541d5a978610c4f78330c8 Reviewed-on: http://gerrit.openafs.org/4233 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f1c921fa1738c383fd576e287f356dd13f92a58 Author: Andrew Deason Date: Thu Mar 10 18:37:44 2011 -0600 vol: Correct VolumeNumber for large volume IDs VolumeNumber was using atoi to convert a volume header name to a volume ID. This can return just -1 for volume IDs larger than 2^31-1, though, so use strtoul instead. Change-Id: Ibae2d29f196646154fcc4f6ff174246e37b3d735 Reviewed-on: http://gerrit.openafs.org/4199 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85edec7105dd653ed1d8046b69b8262281e97bba Author: Andrew Deason Date: Thu Mar 10 17:59:39 2011 -0600 vol: Handle large volume IDs in VLockFile VLockVolumeByIdNB currently cannot handle volume IDs larger than 2^31-1. Fix this by using struct flock64, F_SETLKW64, and F_SETLK64 in the VLockFile functions where possible. Thanks to Simon Wilkinson for pointing out F_SETLK64. Change-Id: I422c685aec035716e2f42d13bd97541425ead6a2 Reviewed-on: http://gerrit.openafs.org/4198 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b146d627181f7b631da7655f338748a8f1d25272 Author: Andrew Deason Date: Thu Mar 10 16:41:02 2011 -0600 vol: Make VLockFile arguments consistent The Windows implementation of the VLockFile functions had the handle incorrectly declared in a few places (they accepted a struct VLockFile instead of an FD_t). Correct them, and make all VLockFile implementation functions declare 'FD_t's instead of 'HANDLE's or 'int's. Change-Id: I2bc414712599cb8f2a2f0a5034b583a15b2c3ad8 Reviewed-on: http://gerrit.openafs.org/4197 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a6f18413edceed1b0d532005eb62cb1886e7a6f3 Author: Andrew Deason Date: Thu Mar 17 16:32:00 2011 -0500 libafs: Do not osi_FlushPages for dirs Directory contents are never mapped or stored in pages, so dealing with page invalidation on directories is just overhead. So make osi_FlushPages a no-op when we're given a directory, which can avoid a lot of locks and other processing (particularly when we are called in afs_getattr in BOZONLOCK_ENV). Change-Id: I56fbd08c74d01a5fcb45a57e08bb31afcec9331d Reviewed-on: http://gerrit.openafs.org/4259 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a18175f479437f3a4fe68460538927630070cd13 Author: Andrew Deason Date: Wed Mar 16 11:48:08 2011 -0500 DAFS: DFlushVolume outside of vol glock DFlushVolume may traverse a long list of directory objects, and can even hit the disk, so we should drop the glock for it. This should be safe in DAFS, since we already transition the volume to an exclusive state before doing this, and DFlushVolume only deals with structures internal to the directory package and maintains its own locking. Change-Id: I6493042c8f36614b55d4dc40d97639e56b34fabd Reviewed-on: http://gerrit.openafs.org/4242 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8c418408016ff8d6be9f85c4666a49954f61dbd0 Author: Simon Wilkinson Date: Sun Mar 20 21:13:09 2011 +0000 util: Fix exec_alt exec_alt was failing its tests on Mac OS X (but passing them on Linux). It turns out that this is because it was failing to NULL terminate the string that it creates in construct_alt(), which copies in the characters from argv0, prefix and suffix, but never copies in a trailing NULL. Amend the code so that the trailing NULL from suffix is used to terminate the string. Change-Id: I286604fb09193367c4e7b2d80051832080362f79 Reviewed-on: http://gerrit.openafs.org/4267 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 1c1051ae19810acc6256abe25952375699e4237a Author: Simon Wilkinson Date: Sun Mar 20 19:23:29 2011 -0400 lwp: override dbg and optmz settings we were wiping out fun things like archflags. shouldn't be needed. let's just do this instead. Change-Id: I80b3453bb237b4995d642b947d03c17d82cda5e7 Reviewed-on: http://gerrit.openafs.org/4266 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 693a749595ec949e0e9620c66fa65bcf8f567927 Author: Simon Wilkinson Date: Sun Mar 20 19:15:30 2011 -0400 osx: restore atomic stats to knet pulled wrong version of change into master. put back atomic versions of stats. Change-Id: I3b8413e2606a8bc4bf55aa674860685b2ca2ced6 Reviewed-on: http://gerrit.openafs.org/4265 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ce5e263b488f8cb85662031ee08eea448dab2d27 Author: Andrew Deason Date: Wed Mar 16 14:44:56 2011 -0500 salvager: Fix volume parsing on 64-bit When an unsigned long is wider than an afs_uint32, comparing the afs_uint32 vid to ULONG_MAX is always going to be false (which the compiler can warn us about). Fix this by storing to an unsigned long, and converting to a volume id after ensuring that the result is not too large. Change-Id: Ifbd724dabd988bc4b1ba6ee8f3dc7fa1a0afb226 Reviewed-on: http://gerrit.openafs.org/4244 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit d73d9a1011cc3e1e5acfbc970434373f732c066e Author: Derrick Brashear Date: Wed Jan 19 23:11:11 2011 -0500 MacOS: allow cdead vcaches to be found in FindVCache if requested if we are trying to find a dead vcache, let it be found, don't immediately attempt to recycle FIXES 128511 Change-Id: I7f86f7d4a88e1b89887b64617246e750654b0334 Reviewed-on: http://gerrit.openafs.org/3691 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1da95520fa85c6589fdb32ce1ee9035d92b34f4f Author: Simon Wilkinson Date: Wed Mar 16 21:23:17 2011 +0000 util: Remove unnecessary uuid_mem* macros Once upon a time, in a galaxy far far away, uuid used bcmp and bcpy operations in kernel space. However, we changed that back in 2001, and since then the uuid_memcpy and uuid_memcmp macros have been redundant. Tidy up the code a little by removing them. Change-Id: I3abcff79b36a330f1619c3d7e0a791eac1cf69a1 Reviewed-on: http://gerrit.openafs.org/4253 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0a98548832472152304410e41306adcc5b91f6a2 Author: Simon Wilkinson Date: Wed Mar 16 18:11:21 2011 +0000 dir: Make test utility build again Make the 'dtest' test utility, which can be used to test the functioning of the dir package, as well as to manipulate the directories that it creates, build again. Change-Id: I3b87c691cc9cb7ffce9297243d4a709d2e94fd40 Reviewed-on: http://gerrit.openafs.org/4251 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b88cf2f1aa6934a0bdc5b4090fef941f51e8a366 Author: Simon Wilkinson Date: Wed Mar 16 17:42:59 2011 +0000 util: Remove remote.h remote.h is no longer used anywhere within the tree, and defines an interface that has never been provided by OpenAFS. Remove it. Change-Id: Id1007364f073c3bc2751491df371f51a37059381 Reviewed-on: http://gerrit.openafs.org/4249 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit af854b4e2f19e5f1a83b686e99ca3dd6122af942 Author: Simon Wilkinson Date: Thu Mar 17 19:28:23 2011 +0000 rpms: Make makesrpm.pl cater for new rpm names Starting from 1.6.0, our specfile no longer adds a stray '1.' to the start of the release field. makesrpm.pl was failing to deal with these new-style names and therefore not actually making an rpm. Fix this by conditionalising on the OpenAFS version when selecting which rpm to copy. Change-Id: I36b32ccc20baa167f46e5095eacb38a8e7d65e27 Cc: Alexander Redinger Reviewed-on: http://gerrit.openafs.org/4258 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear commit c10f5296d26eac9ac00018199ef579e8f6095c07 Author: Derrick Brashear Date: Wed Mar 16 01:06:43 2011 -0400 macos: kernel socket upcall support kernel socket upcall instead of listener env Change-Id: I1b66ce0877053700cd894f47017596fbe07e7384 Reviewed-on: http://gerrit.openafs.org/4239 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6ca42fe191862ffae740e157a190a1bd894b848d Author: Simon Wilkinson Date: Wed Mar 16 17:16:31 2011 +0000 util: Remove packages.h packages.h is unused within our tree, and contains nothing of any use to out of tree callers (it attempts to define bases for error codes, which has been superceded by our use of comerr) So, remove it. Change-Id: I22f2d3fba6ff960f00757c69f6beb5e7f25f9bba Reviewed-on: http://gerrit.openafs.org/4248 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 71380ee4f3522ba64ed60724a928f8efc16ca132 Author: Simon Wilkinson Date: Thu Mar 17 19:14:39 2011 +0000 rpms: Use new CellServDB Update the CellservDB referenced by the spec file to the latest one from grand.central.org Change-Id: I315419b45c124908a262420cd9bd3876fe0ba308 Reviewed-on: http://gerrit.openafs.org/4257 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 79ec0068740b3dc83bd92ac5fc25749d292f1f70 Author: Simon Wilkinson Date: Wed Mar 16 15:37:47 2011 +0000 util: Remove itc.h The itc.h header is never installed, or used in the OpenAFS tree. Remove it. Change-Id: Ia01f0f5353bc019c3fd0c311b2c7cfc157dca2dd Reviewed-on: http://gerrit.openafs.org/4247 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5df51a82947f0ff60d57f551c5faa136ad7f6e0f Author: Andrew Deason Date: Thu Mar 17 10:43:23 2011 -0500 viced: Actually print client CPS Client CPS was not getting output on SIGXCPU like the rest of the client information, since the conditional in the CPS loop was never true. Fix this so we traverse the CPS entries correctly. Change-Id: Ic3434000fbf90e96665779f21811bffcc3a19b45 Reviewed-on: http://gerrit.openafs.org/4256 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9bf4e02bbe8b6e552bc485701e56702856ffad9 Author: Simon Wilkinson Date: Wed Mar 16 15:34:54 2011 +0000 util: Remove isathing isathing.c only provided one function - util_isint, whose behaviour can be far better provided by careful application of strtol. Simplify our world a little by removing the file. Change-Id: I6a8460daaec092d4916d4a46e04df01d0dfc7ccc Reviewed-on: http://gerrit.openafs.org/4246 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d9f11cd85bd533df21be792b11fc21385c210b6b Author: Simon Wilkinson Date: Wed Mar 16 15:31:40 2011 +0000 kauth: Use strtol for integer argument handling Use strtol, rather than a combination of util_isint and atoi to handle integer arguments. This is much cleaner, far more portable, and removes a dependency on an internal library function that this file is the only user of. Change-Id: I3140a396ae3ec32e4498f62769f27c76f03001d9 Reviewed-on: http://gerrit.openafs.org/4245 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c4744cc699be19fffb49f39f469e91ef6aac6585 Author: Derrick Brashear Date: Thu Mar 17 01:25:35 2011 -0400 osx: decode-panic should work in add-kext only land in 64 bit 10.6, you need add-kext (not add-symbol-file) to decode a panic. deal accordingly Change-Id: I40f3c40150b98be2d80881ee56f8f8e33c92bc0f Reviewed-on: http://gerrit.openafs.org/4255 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0016e013aa012e179e7ac4c59b19a0ee1cbd0840 Author: Derrick Brashear Date: Thu Mar 17 00:11:43 2011 -0400 osx: prefs pane should properly detect version we use "new" afs conf after 1.4.6 or 1.5.36. detect correctly Change-Id: I7ae0005f7f1ca3a3164d12fab38e6d4da5c85168 Reviewed-on: http://gerrit.openafs.org/4254 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ffdc040d560a461abd59602ad62ba2fbf150227f Author: Simon Wilkinson Date: Tue Mar 15 21:48:43 2011 +0000 Throw the compiler a bone ... ... failing that, a semi colon. Change-Id: I39cf03f16f5faaf32e8335ea6453e76b0d1c67ef Reviewed-on: http://gerrit.openafs.org/4234 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a72ebfe324874dd405d18561baf5eaacb007950 Author: Derrick Brashear Date: Mon Mar 14 23:36:45 2011 -0400 macos: dont want bind 8 compat on leopard we removed it for i386, kill it for ppc also. Change-Id: I1c91a138ecbec9c25a9734f5a5bcdc1d08469404 Reviewed-on: http://gerrit.openafs.org/4229 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 4e2074b7bff9371809d13c56fd6725fc4df99180 Author: Jeffrey Altman Date: Mon Mar 14 22:55:26 2011 -0400 Windows: 1.6pre3 changes Change-Id: I87b1e29f26e1785fe7ab09c3641d7ad4281f9be8 Reviewed-on: http://gerrit.openafs.org/4227 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d92852ba99bc7591515992dfea3436d93c23b85 Author: Simon Wilkinson Date: Tue Mar 15 00:45:45 2011 +0000 Linux: Fix return codes from setpag Linux is a real stickler when it comes to error codes. Functions which return positive error codes into the kernel tend to have unfortunate effects. Because all AFS errors tend to be positive, most of our kernel entry points negate errors before passing them back to their caller. This causes problems when internal functions themselves return negative error codes. This was the case with the keyring functions, which ended up returning a negative code to setpag(), this handed that code ultimately up to the ioctl handler, which negated it (so turning it positive) before throwing it up to the kernel. The kernel sees this positive value as being a successful return, and so passes it direct to userland, rather than assigning it to errno. This led to the setpag() userspace function never being aware of keyring errors that had occurred in the kernel. Fix all this by making sure that all errors from the keyring code are made positive before being passed upwards in the kernel module. Change-Id: I31eeaf9a4819dc47052ea0ff3070bdaaf22f1f66 Reviewed-on: http://gerrit.openafs.org/4223 Tested-by: Marc Dionne Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ff2933a122ddf9421ebcacdc7e4ec5f44333f894 Author: Simon Wilkinson Date: Tue Mar 15 00:06:19 2011 +0000 Revert "Linux: normalize error return for emulated syscalls" This reverts commit 0bc837f68a72ba1f75d940cc5dd057774d9f36bb. Sadly, this change fixed setpag(), but broke all of the pioctls. The problem is actually a little more nuanced than we at first thought. What's happening is yet another case of Linux's special handling of negative return values. When an ioctl handler returns a negative return code to the kernel, it does errno = -code, and sets the return code to -1. If you pass it a postive return code, however, it just returns that straight to the application. The pioctl code gets this right. However, the setpag code doesn't, and so tries to return postive values, which is why ioctl appears to be returning the error code in the return value, not in the errno. Change-Id: I192ff45ad15b72a493a3c9c98546b026761dd95f Reviewed-on: http://gerrit.openafs.org/4222 Tested-by: BuildBot Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit c78694fdb76e9606a06cf834b80cbba827b8ff2b Author: Simon Wilkinson Date: Sun Mar 13 17:13:49 2011 +0000 auth: Use the UserListFileName function more The function UserListFileName exists to abstract the process of producing a full pathname for the userlist. Modify the rest of userok.c so that it uses it. Change-Id: Iac90e159dd8dc8344943e424615bf2aba1b31db3 Reviewed-on: http://gerrit.openafs.org/4215 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a1a3ac4024b53ae513b782db0dc968a34707874b Author: Simon Wilkinson Date: Sun Mar 13 16:54:34 2011 +0000 auth: Refactor CellServDB path creation Move all of the duplicated code that does CellServDB path creation into a common function. Use asprintf(), rather than strcompose in this function so we're using fewer fixed length buffers. Change-Id: I47ce92b97674bb09b5804ff5631fa47a21800902 Reviewed-on: http://gerrit.openafs.org/4214 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 13e622c939928fcd35433aa4843c09ab44a7ae79 Author: Simon Wilkinson Date: Sun Mar 13 21:47:43 2011 +0000 roken: Export rk_asprintf on Windows Add rk_asprintf to the Windows roken export lists Change-Id: Ie12c245aa2bf45fcbcfa5474e1dfaf3c32036bb4 Reviewed-on: http://gerrit.openafs.org/4216 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba67ef96bb5216ecb03d656af22b3b7f7542efef Author: Michael Meffie Date: Mon Mar 14 10:15:35 2011 -0400 readme typos Fix two typos in README. Change-Id: Icd03d015d5d08a26640e12eceb8185fa36087753 Reviewed-on: http://gerrit.openafs.org/4218 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1eb570996485023ce902393a251c5f4e92229d10 Author: Simon Wilkinson Date: Sat Mar 5 23:09:18 2011 +0000 auth: Rework afsconf_UpToDate to use CellServDB Rework the afsconf_UpToDate check so that it uses the modifcation of the CellServDB, and not the KeyFile to determine whether the configuration information has been changed under us or not. afsconf defines the CellServDB as being the single sentinel for a config directory being changed, and our tools are careful to always touch the CellServDB when updating anything else there. Also, rework the _afsconf_Check() code so that it uses afsconf_UpToDate, rather than including this logic twice. Change-Id: I8ef5f67afbb5982bb25e12407ea5dc5dc1512840 Reviewed-on: http://gerrit.openafs.org/4203 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 926755bf222cfaf39a4e4437c468a7a9030fe7a1 Author: Simon Wilkinson Date: Sun Mar 13 15:47:36 2011 +0000 tests: Fix KeyFile test so it works from harness The auth/keys test tries to find a file that's distributed as part of the test suite. However, it currently only looks in the CWD to find it. Modify the test so that if it's run from the test harness, it will use the harnesses SOURCE environment variable to locate the KeyFile Change-Id: I93e16a01eae79b38ab01c81a57d2a47c28479b27 Reviewed-on: http://gerrit.openafs.org/4213 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bc16fe0a43deb9309521af42c5db89ebbd87192e Author: Simon Wilkinson Date: Sun Mar 13 15:45:37 2011 +0000 tests: Fix the authcon test to avoid pthread errors Fix the authcon test so that it avoids pthread errors by initialising rx before calling into any of the rxkad routines. Change-Id: I175203fd91660e27a8b468e6f1c6189f32b22259 Reviewed-on: http://gerrit.openafs.org/4212 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4953ce8070497bc494e624d72271bcbc5dc1dbe7 Author: Simon Wilkinson Date: Sun Mar 13 14:45:04 2011 +0000 pt_util: Initialise empty database correctly Commit dc8f18d6f5003712bc9ef989363137a84953df07 broke pt_util's initialisation of empty databases. This is because Initdb was changed to call Initdb_check through the ubik_CheckCache wrapper. However, that wrapper was defined as a no-op in pt_util's ubik-shim. Modify pt_util's ubik_CheckCache so that it always calls into the wrapper routine - this mimics the old behaviour. Add a trival test for pt_util - check that we can build the database, using the example from the manpage, and then that the built database matches what we expect. Change-Id: I41aa9f6a531662230ed625cc3b1307016ef4107f Reviewed-on: http://gerrit.openafs.org/4211 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 83f0baef29fd4962f5cb8ac93fb332af87433a4a Author: Simon Wilkinson Date: Sun Mar 13 12:56:57 2011 +0000 DOC: pt_util now outputs ntohl'd epoch and version Commit 87e959e87df52e026ffcb2de8ecfcbf4889f7bd8 fixed pt_util so that the epoch and version is correctly byte-swapped on little endian systems. Remove the warning about this from the manpage as it is no longer relevant. Change-Id: Ic54223b0a8812825a1b7a8d2b8ee1b0c51ecea05 Reviewed-on: http://gerrit.openafs.org/4210 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f6f8158ada81a50961699de68f6f2348fcc4a955 Author: Simon Wilkinson Date: Mon Mar 7 17:23:51 2011 +0000 crypto: Add krb5_crypto_fx_cf2 to our prototypes Admit to having the krb5_crypto_fx_cf2 function in the kernel RFC3961 implementation - we're going to use it for for key combining Change-Id: Ibb11a4d7467bc18eb222d5f8902dc4181b30e92c Reviewed-on: http://gerrit.openafs.org/4204 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 47b23080a203abd0d9400c29407a9a3ce9845c54 Author: Simon Wilkinson Date: Fri Mar 4 22:57:15 2011 +0000 ubik: Allow servers to have more than 3 seclayers ubik has traditionally used the afsconf_ServerAuth function to fill in a single field in a pre-allocated list of security classes. This meant that we could never have a class with an index higher than 2 (rxkad). Setting the function to call, and the rock to that function was also accomplished by playing with global variables. Rework this so that a new function is used to set the security classes, which can allocate an arbitrary sized array of classes. Move the setting of this function, and of the authentication check function into ubik_SetServerSecurityProcs() Change-Id: I7cde73b05db4d51403469e2bead1d99d5ae88043 Reviewed-on: http://gerrit.openafs.org/4202 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7a0bbff4a61b1709cccc643ec8aa4440d2b4a936 Author: Simon Wilkinson Date: Fri Mar 4 22:37:10 2011 +0000 afsconf: Rework security flags BuildServerSecurityObjects takes a set of flags, which makes it hard to use it as a callback function. Rework this so that the security flags are part of the afsconf directory structure, and so BuildServerSecurityObjects only takes a rock, and its return parameters. Update all of the callers for this new function, and add tests for it to the test suite. Change-Id: I48219ed199d128c6aec3765ca425bda9e464b937 Reviewed-on: http://gerrit.openafs.org/4201 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 419fbfb4536242bbb6321d6e1c468ca939bf7009 Author: Simon Wilkinson Date: Fri Mar 4 12:12:24 2011 +0000 ubik: Remove dependency on auth When commit 8a09c220f4c5f881ea45be585b07b793038924d5 added support for token error recovery to ubik, it introduced a dependency on afsconf. This breaks the abstraction layer that had been in place, by requiring that the SecurityRock be an afsconf_dir (if you use a different rock, ubik will segfault) This change reinstates the abstraction layer, by requiring Ubik users who want token error checking to specify a procedure that can be used to check whether tokens are up to date. Instead of yet another global variable, we replace the existing CRXSecurity* variables with a single function that can be used to set security proc, token checking proc, and rock. Change-Id: I9036cf712f02610ed2e906602d3416436f69e98b Reviewed-on: http://gerrit.openafs.org/4200 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7e68671f6acf66b568672d94b37ef456b1de8813 Author: Chas Williams (CONTRACTOR) Date: Fri Mar 11 13:33:50 2011 -0500 solaris: fix typo in the solaris 11 startup script /etc/devlink.tab not /dev/devlink.tab Change-Id: Ib562156861c2eab86504d6a37e18bc9af92a007c Reviewed-on: http://gerrit.openafs.org/4206 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0884e9d0fddf2be81abf6468209048331efa8a1e Author: Andrew Deason Date: Thu Mar 10 14:55:50 2011 -0600 salvager: Do not abort on large volume IDs The salvager was parsing volume IDs just using atoi() and checking if the result was negative. Since the result is a signed int, this fails on any volume ID larger than 2^31-1. Change the parser to use strtoul instead of atoi, and change the check. While we're here, make a similar change to the DAFS salvageserver, too. Change-Id: Icc3377ee507150ff0c53b5bbff6172cb72bca703 Reviewed-on: http://gerrit.openafs.org/4196 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 433efb44edd2b9b6057ec2702671fb0848019016 Author: Simon Wilkinson Date: Sun Mar 6 17:22:14 2011 +0000 Don't use KERN_OPTMZ or KERN_DBG on Linux 2.6 With 2.6 Linux kernels, we just use the standard Kernel build system. As this system pays no attention to our settings of KERN_OPTMZ or KERN_DBG, don't bother setting values for these for 2.6 kernels. Change-Id: Ibb2302d63ecf3e32a24321028df6a9aad45769fc Reviewed-on: http://gerrit.openafs.org/4173 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a23b83391e90db41bf71dd81b9062e80fd22bec1 Author: Simon Wilkinson Date: Sun Mar 6 17:15:05 2011 +0000 Remove -D_LARGEFILE64_SOURCE on Linux Since 129b6954a6f491c6f3c3e417055bdc68d4726408, we've defined GNU_SOURCE on all Linux builds. This definition automatically sets _LARGEFILE64_SOURCE for us, so we don't need to explicitly set it in the platform specific configuration. Change-Id: I3d60a1eacbb045cdac283d9fe38261154740ef1b Reviewed-on: http://gerrit.openafs.org/4172 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 10da36ff0d903afbceef633ae5ce46b6c12ca006 Author: Simon Wilkinson Date: Thu Mar 10 00:20:26 2011 +0000 Remove redundant entries from MT_CFLAGS Don't include XCFLAGS in MT_CFLAGS, as this is now done elsewhere in the build process. Don't multiply specify -DAFS_PTHREAD_ENV, as all pthreaded build rules must defined this, and just doing so in one place is much cleaner. Change-Id: I2cc1f88119e9ad32151cb7575222c2d2c008005f Reviewed-on: http://gerrit.openafs.org/4190 Tested-by: BuildBot Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 57bc6aee44da919a080f8f6ca1e5561f24df9f92 Author: Simon Wilkinson Date: Thu Mar 10 10:41:57 2011 +0000 hcrypto: don't redefine key_type Linux's keyring code uses "struct key_type", which is also used internally by the hcrypto code. As, on some Linux variants, afs/sysincludes.h ends up including the keyring definitions, we need to rename our internal key_type definition to something that doesn't clash. Change-Id: Ibfb968db0db3e80d877881fc6da4b34428ee382f Reviewed-on: http://gerrit.openafs.org/4192 Tested-by: BuildBot Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 037acc5ac01884a8ad7439f228284e07d1972d63 Author: Simon Wilkinson Date: Thu Mar 10 09:43:35 2011 +0000 Revert "hcrypto: avoid key_type redefinition" This reverts commit 81487fcf3ae93d2efea6f0935a0493680b5d3d11. This change didn't receive sufficient review before it was pushed. It breaks builds on IRIX, and produces kernel modules that don't load on a number of other Linux-based systems. A correct fix for the underlying problem (that both Linux and hcrypto want to use the "struct key_type" identifier) will follow this patch. Change-Id: Ib215f9d8adde75180a86f985052c77600a294895 Reviewed-on: http://gerrit.openafs.org/4191 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3105c7ff0b4ae9c372dc4c1424f63b7f259dcda1 Author: Derrick Brashear Date: Thu Feb 17 00:04:06 2011 -0500 linux: defer vcache evictions when sleep would be needed because we're only willing to loop 100 times worth of "sleeps", on a machine with heavy vcache demands we can end up just growing the list huge. in the first pass, just clean up as many entries which do not require sleeping as needed. if we need more entries, make a second pass. Change-Id: Ie5af42e7c0287d7a093f9a5884c10813dbb8cb11 Reviewed-on: http://gerrit.openafs.org/3971 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 75c2f96364d598ec0c134cb6b366ce067b8b7f49 Author: Jeffrey Altman Date: Wed Mar 9 07:51:02 2011 -0500 Windows: handle rx busy call channel Register an error code for rx busy call channel detection. Force a retry whenever CM_RX_BUSY_CALL_CHANNEL is received by cm_Analyze(). Log the event to both the internal trace log and the Windows Event Log along with the server address. Change-Id: I196fb99d38bb89f57f296fd1b60d2a7f17fec80c Reviewed-on: http://gerrit.openafs.org/4183 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit eddcee3ad518dff9fbfda790640c5bfd2e97ef5a Author: Andrew Deason Date: Mon Mar 7 11:08:26 2011 -0600 RX: Avoid timing out non-kernel busy channels When we encounter a "busy" call channel (indicated by receiving RX_PACKET_TYPE_BUSY packets), we can error out a call with RX_CALL_TIMEOUT to try and get the application code to retry the call. However, many RX applications are not aware of this, and will just fail with an error upon receiving a single busy packet. So instead, make this behavior optional, and only do it if the application tells us what specific error it expects to receive when a busy call channel is detected. Enable this behavior for the Unix cache manager, as it can cope with receiving an RX_CALL_TIMEOUT error in this scenario. Change-Id: I2fe03c0ff81576da3b2ce2b4d27a16d5631c073e Reviewed-on: http://gerrit.openafs.org/4159 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b13a5a527d87c7b9a73fd92eb7633e1796e3337f Author: Andrew Deason Date: Tue Feb 15 21:23:06 2011 -0600 aklog: Do not include XCFLAGS twice In aklog, we set MODULE_CFLAGS to XCFLAGS and some other things. However, when using AFS_LDRULE or AFS_CCRULE, CFLAGS will contain MT_CFLAGS, which contains XCFLAGS. The end result is that the contents of XCFLAGS appear twice in the compilation invocation, breaking some platforms like HP-UX where the order of XCFLAGS relative to other things is a bit fragile. Fix this by removing XCFLAGS from the MODULE_CFLAGS definition. Change-Id: I5eef9764d758885a995269edc5bef91ff06db8b5 Reviewed-on: http://gerrit.openafs.org/3960 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5247fa38a4faebfdffba178ca01e5b419f034d5d Author: Jeffrey Altman Date: Sat Mar 5 14:34:05 2011 -0500 vol: FILE* to FD_t except logging and special ops Replace all use of FILE* with FD_t. Switch from afs_open to OS_OPEN. In the process: afs_flush and afs_fsync -> OS_SYNC afs_stat which is used to obtain the file size -> OS_SIZE afs_close or close -> OS_CLOSE Etc. While cleaning up, use afs_stat_st macro when declaring a struct stat because the structure and function are not guaranteed to be the same name on all platforms. These changes permit Windows to build the vol package without the use of the C runtime library. Change-Id: I9e0a7fdbeffa76c3c87aefce87ca1af495657a2f Reviewed-on: http://gerrit.openafs.org/4149 Reviewed-by: Rod Widdowson Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b082c05ba769ef8eee840985ebac290022cc0ba Author: Jeffrey Altman Date: Sat Mar 5 14:25:34 2011 -0500 vol: consolide afs_xxxx macros in ihandle.h Various definitions of afs_open, afs_stat, etc. were scattered across the .c sources within the vol package. Consolidate them all in ihandle.h which is included in all of the files and contains the OS_xxxx macros which will substitute for many afs_xxxx calls in future patchsets. Change-Id: I72363332fd5f1d330e225df51c68d4c113b59f3b Reviewed-on: http://gerrit.openafs.org/4147 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 67f01c2553067a4b7592a34917ce5a5148b67142 Author: Simon Wilkinson Date: Fri Feb 11 11:53:26 2011 +0000 Clarify the role of XCFLAGS and simplify MT_CFLAGS Tidy up the build system by making it clear that XCFLAGS is included for every build type. Also clean up MT_CFLAGS so that it doesn't statically include XCFLAGS, and remove the common AFS_PTHREAD_ENV define that's needed by every architecture. This fixes the problem that we had where directories built with the pthread or shared build rules weren't being compiled with checking enabled, as well as hopefully making the tangle of defines easier to understand. Change-Id: Ied6dd316147ee88dc7814f8937a204ef32c6c5e0 Reviewed-on: http://gerrit.openafs.org/4171 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ffad1001532f7681e5d77c5d6030625f15f281a7 Author: Marc Dionne Date: Mon Mar 7 15:31:53 2011 -0500 libadmin: minor warning fix have_quota is set but never used. Remove it. Change-Id: I2428ec274a3e3ad792608ae3a6d0b1af7985c6e8 Reviewed-on: http://gerrit.openafs.org/4177 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 81487fcf3ae93d2efea6f0935a0493680b5d3d11 Author: Derrick Brashear Date: Mon Mar 7 21:32:53 2011 -0500 hcrypto: avoid key_type redefinition struct key_type is redefined in crypto.h; originally defined in ./linux/security.h from ../afs/sysincludes.h from hcrypto/kernel/config.h Change-Id: Ib2a4244516c6c0947cb0959bdf9b06fb5a023a28 Reviewed-on: http://gerrit.openafs.org/4178 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit d69da816c6e961ef5e22df289ad5667cd8568b4c Author: Jeffrey Altman Date: Sat Mar 5 14:29:38 2011 -0500 vol: remove warning on use of DFlushVolume Include the afs/dir.h header on Windows to avoid warnings caused by the missing prototype. Change-Id: I841a330bb13c84076b1453befb1d8469ee64b82a Reviewed-on: http://gerrit.openafs.org/4148 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2a17517ee79dbea176464bf6e0ee0617df1aae6b Author: Simon Wilkinson Date: Sun Mar 6 18:18:07 2011 +0000 crypto: Avoid variadic macros The IRIX compiler doesn't seem to like variadic macros, so avoid using them within the RFC3961 kernel crypto implementation Change-Id: I4bfddb01eb86a96e981c148e26281cc73130f924 Reviewed-on: http://gerrit.openafs.org/4154 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ad63745f357e377c613881fa3470b85d4d36fe36 Author: Marc Dionne Date: Sat Jan 29 12:48:02 2011 -0500 ubik: cleanup DB lock usage in SDISK_SendFile Some failure paths can return from SDISK_SendFile with the database lock still held. Other failure paths will cause setlabel to be called without holding the lock. Rework the failure paths so we always release the DB lock before returning, and always hold it when calling setlabel. Change-Id: I4cf98ecc9874110273e2cb4f94c37bdb9b43f0a2 Reviewed-on: http://gerrit.openafs.org/4151 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1ff74829f13c127abd5cd8e70f18bcfd33f240ff Author: Marc Dionne Date: Sat Mar 5 11:40:41 2011 -0500 ubik: refactor pthread creation code Refactor thread creation into a new ubik_thread_create function. Eliminates some code duplication. No functional changes. Change-Id: I7e8c84e138db5503eab109336734c348da98fc04 Reviewed-on: http://gerrit.openafs.org/4146 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit cb0264c80f58b7f788ff30c1aeb41c33e8104f6b Author: Marc Dionne Date: Sat Mar 5 11:19:10 2011 -0500 ubik: remove unused code Remove some unused code and associated comment. rx_Init does belong earlier in the sequence. Change-Id: I9db399b8ae3343e0c2c14f64150d55a2411899c3 Reviewed-on: http://gerrit.openafs.org/4145 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 7caf4143e2e2b05c074399dff5ea28ffb16fb29d Author: Marc Dionne Date: Wed Jan 19 21:57:58 2011 -0500 ubik: Rearrange some initialization code Some basic initialization should precede creating the RX services. Change-Id: Ic88d639be12ee8edd2ec7b61c2a5df435b59f663 Reviewed-on: http://gerrit.openafs.org/4144 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit fc26ba30c3011f462f623b594489049c1846d279 Author: Marc Dionne Date: Sat Jan 29 11:14:50 2011 -0500 ubik: make uphys_close static This function is not used outside of phys.c, so make it private. Change-Id: Ie84864cd8a2c0f423af604e45cd406acecf05957 Reviewed-on: http://gerrit.openafs.org/4143 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 338dcf5a55f7af8b8eaa3339ba36347fd2cd241f Author: Marc Dionne Date: Sat Mar 5 10:27:36 2011 -0500 ubik: remove successive Quorum_EndIO, Quorum_StartIO calls Refactoring brought these 2 calls together. They can be optimized away. Change-Id: I22b71bd8e63cdd956a0e5420ae5247eec7f3a6a2 Reviewed-on: http://gerrit.openafs.org/4142 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit bbf406da30428a22b4a6d28a7d36dbb786013cfa Author: Ryan C. Underwood Date: Sun Mar 6 10:40:53 2011 +0000 Fix positional I/O support for largefiles Commit 335ccb40 introduced positional I/O support for the fileserver, but didn't handle the largefile versions of preadv and pwritev. As a result, the fileserver cannot handle files of more than 2Gb in size. Fix this by using preadv64 and pwritev64 where O_LARGEFILE is defined, in the same way as for all other I/O primitives. Change-Id: Ia9f6411d0c8115176e1ec42dd9f72c96ba939bab Reviewed-by: Simon Wilkinson Reviewed-on: http://gerrit.openafs.org/4152 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 98a0c2f47b8641e3e31ed7d2f7d84c2eb484ef51 Author: Simon Wilkinson Date: Sun Mar 6 16:06:36 2011 +0000 Disable vectored positional IO if no 64bit support In order to support vectored positional I/O, and large files, we need there to be an implementation of preadv64 and pwritev64. If this isn't present, then just disable HAVE_PIOV. Change-Id: I78b1e09f8a836534f49594300b4f58d661eebd46 Reviewed-on: http://gerrit.openafs.org/4153 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 225e5b77ff65e96b4be1a6be97afd65a2abefc12 Author: Jeffrey Altman Date: Sat Mar 5 09:58:17 2011 -0500 volser: warning removal remove assigning size_t to int warnings when size_t is larger by declaring appropriate variables as size_t. remove signed vs unsigned warnings Change-Id: I998d7b0aa75bc03a6fa872a3628c43ebe08b4f99 Reviewed-on: http://gerrit.openafs.org/4137 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d6a627d1e5e90c54c14bb0e915a32483645fa9d4 Author: Marc Dionne Date: Wed Jan 19 21:52:04 2011 -0500 ubik: add lock initialization function Add a new lock initialization function and call it from the initialization sequence. Users of the locks can assume that they are already initialized. Change-Id: I8e86f460cb705c8de12bac9367358c93f1423591 Reviewed-on: http://gerrit.openafs.org/4141 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba80a8a88b0f934b67171faefb75d0757b1a7421 Author: Marc Dionne Date: Wed Jan 19 21:39:44 2011 -0500 ubik: rename DInit, call from initialization sequence Rename DInit to udisk_Init, and call it from the general initialization sequence. udisk_begin can now assume that this has been done. Change-Id: I88f38b7a846b635e0c42f42cdf8c9005bb4bf62d Reviewed-on: http://gerrit.openafs.org/4140 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit a0d56ceb94a0362d79f2db6d6258bd6d27c582cb Author: Jeffrey Altman Date: Sat Mar 5 18:34:57 2011 -0500 ubik: build all files for pthread version Build all files for pthreads from the ubik directory. No longer require src/tubik/NTMakefile. Add missing library to tbutc linkage requirements. Change-Id: If517ce528e5dde9b600824897e1304949b2c2719 Reviewed-on: http://gerrit.openafs.org/4150 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 03651201ef2b2e3745ff3cf36af41f3ea27154b1 Author: Jeffrey Altman Date: Sat Mar 5 10:06:50 2011 -0500 volser: restore diskPartition[64] lock_fd comment The diskPartition[64] wire structures contain an int to represent the file descriptor. This field is too small to represent the Windows file descriptor which is a 64-bit HANDLE. A comment had been added by Rod Widdowson. Restore it. Change-Id: Icf513060802e7f057f6ca735afb26d22edbf6446 Reviewed-on: http://gerrit.openafs.org/4138 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 06c3c3712c2525f26d1480ef09800b9270a3d01f Author: Jeffrey Altman Date: Sat Mar 5 09:38:08 2011 -0500 volser: cleanup volser_internal.h remove yesprompt() prototype for function that no longer exists make dump_sig_handler(), sortVolumes(), VolumeExists(), CheckVldbRWBK(), CheckVldbRO(), and CheckVldb() static within vsprocs.c Change-Id: I2130ac0d2f0dbfe6bf3315450ba342b6e9d51b6b Reviewed-on: http://gerrit.openafs.org/4136 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5b614c6cb0ccae122cc82edabdde9b3eb1bddf19 Author: Marc Dionne Date: Wed Jan 19 21:25:21 2011 -0500 ubik: remove unused UBIK_PAUSE code This code has never been enabled, and is apparently not needed, so remove it to simplify maintenance and future changes. Change-Id: I7ff589e6bf1934aa0ae378ce550c8b69c508d171 Reviewed-on: http://gerrit.openafs.org/4139 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4bd0f17e6d598d4d98ed80d5d1f95bc4b2a7e622 Author: Jeffrey Altman Date: Sat Mar 5 09:21:15 2011 -0500 volser: make private lockproc routines private FindIndex and SetAValue are only used within lockprocs.c. Make them static and remove them from lockprocs_prototypes.h Change-Id: I09774fdc2368941191e17d9ce1fc13a4ff5bec42 Reviewed-on: http://gerrit.openafs.org/4135 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4b4534819209468a007a991e8f73e1c0a4ac0089 Author: Simon Wilkinson Date: Fri Mar 4 10:29:45 2011 +0000 Unix CM: Remove redefinition of "inline" discon.h contained a redefintion of "inline" for non-gcc compilers that's a left over from when it used "static inline", rather than "static_inline". Remove the redefinition, as it's now both uneccessary, and confusing. Change-Id: I2d173385f4c3fe4b707cf86c76984b283714ced7 Reviewed-on: http://gerrit.openafs.org/4129 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9e539fbea456cdb416a487364d67ab54da1249a7 Author: Jeffrey Altman Date: Sat Mar 5 00:40:13 2011 -0500 Revert "Convert from using nvldbentry to uvldbentry" This reverts commit 4f1efdc8b73ed734197925766530d033c6f9794a. The conversion to uvldbentry produced too many negative side effects. Revisit support for multi-homed servers when vos is executed from a machine that can only see a random subset of the addresses assigned to the server in the future. Change-Id: Idec5f1a3126266609edb3f657c34c160086ecbe7 Reviewed-on: http://gerrit.openafs.org/4131 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ca0ae15d621dbd90339408a26715a107d1f69f23 Author: Jeffrey Altman Date: Fri Mar 4 23:40:31 2011 -0500 Revert "modify FindIndex to compare uuids" This reverts commit 9aad0979e9ff0601c249eb66a6ecfb3e76264702. This is being pulled as the entire nvldbentry to uvldbentry conversion is being reverted. Change-Id: Ib226c593b4c1db345758cd8b345a319e6107d3ee Reviewed-on: http://gerrit.openafs.org/4130 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 64d52938ee26e160a6e2cd64253df096eb5d0c1e Author: Andrew Deason Date: Fri Mar 4 11:35:06 2011 -0600 viced: Set HWHO_INPROGRESS in CheckHost_r When we are probing a host in CheckHost_r, set the HWHO_INPROGRESS flag on the host, so other threads know that the host is locked while we are waiting for a probe response, and the h_threadquota mechanism can work correctly. Change-Id: I37e3b37ea98d8d42578bf85a3b5aaaff4c4a7331 Reviewed-on: http://gerrit.openafs.org/4126 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d1335ad7104a6fa67525b84d70a33e7bb1b6c6a Author: Jeffrey Altman Date: Fri Mar 4 11:04:40 2011 -0500 Windows: mp target trailing dot not part vol name Instead of passing "root.cell." into cm_FreelanceAddMount pass in "root.cell" and add the trailing dot within the function. Change-Id: I5d27c6c34a3197a451491a0bbdf6c854394ce572 Reviewed-on: http://gerrit.openafs.org/4124 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit dec0ba1cfaf7dd6a4ed23a2f656bd6272600d51c Author: Jeffrey Altman Date: Wed Mar 2 14:06:48 2011 -0500 Windows: avoid use of cm_buf for MPs and Symlinks In the Windows cache manager, the symlink and mount point target strings are stored in the cm_scache_t mountPointString and are not accessed out of the cm_buf_t for offset zero except when populating the mountPointString. As a result, every mountpoint and symlink object that is read into the cache wastes a cm_buf_t which could otherwise be used to store additional file or directory data. Add cm_GetData() function which is similar to cm_GetBuffer() except that it reads data from the file server into an arbitray memory location instead of a cm_buf_t object. Use cm_GetData() to read directly into the cm_scache_t object. In addition, further optimize the communication with the file server by using cm_GetData() to perform a RXAFS_FetchData RPC to obtain both the target string and the status information instead of RXAFS_FetchStatus which only returns the status information in cases where there are no outstanding callback registrations on the object. RXAFS_FetchStatus is still used when a callback is active in order to obtain access permissions for new users. Change-Id: I4d797479624f2e29121b16d3aa381296a57aeaa6 Reviewed-on: http://gerrit.openafs.org/4111 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 974e95302a312c03cd735c0fdaa67fb02d254e26 Author: Andrew Deason Date: Fri Feb 25 16:58:30 2011 -0600 vol: Check for blank vnode in VAllocVnode_r When we alloc a vnode in VAllocVnode_r, we look up that vnode in the vnode cache, to see if a vnode struct already exists for it. If it doesn't, we check the vnode index to ensure that the vnode actually is not in use (among other things). However, we do not perform the same check for a vnode already in the cache. Add this check, to make sure that we don't allocate an already-used vnode number, even if the bitmap is screwed up. Change-Id: I63b3aa752d359a2ff8282b193e658d74d6b9719c Reviewed-on: http://gerrit.openafs.org/4060 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear commit b41575d176c2d485d55aed8780bfab9db4b7587d Author: Andrew Deason Date: Fri Feb 25 16:01:32 2011 -0600 DAFS: VnLock after VnWaitQuiescent in VAllocVnode In VAllocVnode, we write-lock the newly-allocated vnode. In DAFS, however, we need to VnWaitQuiescent_r before VnLock'ing, since VnLock in DAFS just sets the writer tid/pid. So, in VAllocVnode, move the VnLock call to after we wait for quiescence, so we don't stomp over the vnode when someone else has it write-locked. Change-Id: Ib234634dba9d09eea877bc91660ea3a8a4e2b746 Reviewed-on: http://gerrit.openafs.org/4059 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear commit 08ffe3e81d875b58ae5fe4c5733845d5132913a0 Author: Andrew Deason Date: Fri Feb 25 14:43:09 2011 -0600 DAFS: Wait for exclusive ops in VFreeBitMapEntry_r VAllocBitmapEntry_r puts the volume in an exclusive state and drops VOL_LOCK when traversing the volume bitmap and updating the bitmap. So, VFreeBitMapEntry_r must ensure the volume is not in an exclusive state, to make sure that VAllocBitmapEntry_r is not updating the bitmap at the same time. Do so, by waiting for the volume to come out of exclusive state at the beginning of VFreeBitMapEntry_r. Change-Id: I5fdd344e4d9d12451fd65a767fa5672c8be70a39 Reviewed-on: http://gerrit.openafs.org/4058 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a862d2df93fd4e8c8c7a0b8eebe9e59b75f54072 Author: Andrew Deason Date: Wed Mar 2 14:11:43 2011 -0600 vol-salvage: VOL_DONE deleted volumes When the salvager deletes a volume (because it is an invalid RO clone, or because there is no data associated with the volume), we should inform the fileserver that the volume is gone. Otherwise, the volume in the fileserver can get put into an error state (in DAFS) when it tries to attach the volume, preventing anything from creating or using that volume. Change-Id: Iae7763b752a2bab7a529dd327d034fdb9e18664a Reviewed-on: http://gerrit.openafs.org/4118 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 40049c56791f3488640ae65c5dc5c4d6503375bd Author: Andrew Deason Date: Wed Mar 2 15:39:51 2011 -0600 DAFS: Clear salvage stats on VOL_DONE When we VOL_DONE a volume, the volume has been deleted, so the salvage stats/information are no longer relevant. Clear them out, so we don't think the volume is still salvaging. Change-Id: I5dbde1609ba7659203fb1904571871d6ffc66539 Reviewed-on: http://gerrit.openafs.org/4120 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ddf5ae4f746f2b5e522e10cfcacb6225499e7956 Author: Andrew Deason Date: Wed Mar 2 15:02:40 2011 -0600 DAFS: Allow LEAVE_OFF for DELETED volumes When a volume is VOL_STATE_DELETED, it effectively does not exist to other programs over FSSYNC. So, do not prevent someone from issuing a FSYNC_VOL_LEAVE_OFF for a VOL_STATE_DELETED volume. Change-Id: Ifb8f5437c7f6888bc06968297d841072d1f3316a Reviewed-on: http://gerrit.openafs.org/4119 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bb25fc6418bac937b31476754a09199636c24211 Author: Andrew Deason Date: Wed Mar 2 14:10:33 2011 -0600 vol-salvage: calloc volume summary structs Calloc volume summary structs instead of malloc'ing them, in vol-salvage.c. This way, new fields added to struct VolumeSummary will be known to be zeroed by default, without needing to update all of the allocating callers. Change-Id: I8c647cd9dec7aaf14183452126049323859ac7a3 Reviewed-on: http://gerrit.openafs.org/4117 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit aadf69eabb1962496fa93745ab560a5b48cacd61 Author: Andrew Deason Date: Thu Mar 3 16:02:47 2011 -0600 viced: Check vnode length on read and write When reading or writing a file vnode, check that the length of the vnode in the vnode index matches the size of the on-disk file containing the data for the file. If it does not match, take the volume offline (and for DAFS, demand-salvage it). Change-Id: I20e02cd84c8425cf0835c104a8e695a0cb6665d9 Reviewed-on: http://gerrit.openafs.org/4121 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b2c979a9de26b1bb28ecde208edeb1e673a03b6b Author: Michael Meffie Date: Thu Mar 3 20:22:54 2011 -0500 rpm: fix ChangeLog filename in doc rpm Fix an rpmbuild error introduced in commit 8d157961. Change-Id: I3b74d2602b74d62f64c0cbd01cde5f63e73259f6 Reviewed-on: http://gerrit.openafs.org/4122 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 22365ab37ac823b6734f4fc0ad79f10b6ee14390 Author: Andrew Deason Date: Wed Mar 2 14:13:25 2011 -0600 vol-salvage: Fix AskOnline error message Change-Id: I7d43588b548c81fdeb7b8b8630ddd9a81f8c49dd Reviewed-on: http://gerrit.openafs.org/4116 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7f31a11d110085ae528d4555d34744c0832008b0 Author: Andrew Deason Date: Wed Mar 2 13:12:25 2011 -0600 Give a default reason in *sync-debug If no -reason is given for fssync-debug calls, we currently just transmit garbage to the fileserver or salvageserver. Instead, give a default (the *_WHATEVER constant), so we do something consistent. Change-Id: I8fb134c8b16a1fca1b1ed804241d0b232e7e2a7c Reviewed-on: http://gerrit.openafs.org/4115 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cfcb911e9b6170d4a3a784b06eda3955ae5d5320 Author: Simon Wilkinson Date: Tue Mar 1 18:03:03 2011 +0000 Tidy up assorted clean targets Improve assorted clean targets so that they properly clean up all of the default build products. Add rxosd to the list of directories to clean Change-Id: Id4987ec00654d7b3bd3b42eddefbcc50b5bdb03e Reviewed-on: http://gerrit.openafs.org/4114 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 169bc2d5be039b75347a455c9fa5922d1a3380fb Author: Simon Wilkinson Date: Tue Mar 1 16:37:32 2011 +0000 tests: Remove errant rxgk build rule A reference to tests/rxgk slipped in to an earlier commit. Remove it as OpenAFS doesn't have rxgk in its tree yet Change-Id: I4cc9c2fefa904a70efbce03e2ce4411b4554d90a Reviewed-on: http://gerrit.openafs.org/4104 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d0d69ccb643104d06a3036da4b70bd878062f743 Author: Simon Wilkinson Date: Tue Mar 1 14:23:47 2011 +0000 auth: Add GetAllKeys function Add support for a GetAllKeys function that can be used to list all of the keys in a configuration directory. Change-Id: I0711fde6afc2941a5f03f2e26ea89ae73750c1a9 Reviewed-on: http://gerrit.openafs.org/4103 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d2688a0cf10ddd6767d68179707cb2e21168b118 Author: Simon Wilkinson Date: Tue Mar 1 14:35:35 2011 +0000 kernel crypto: Tidy up includes Don't include the whole of afsincludes.h when building our kernel crypto interface, as it can lead to symbol collisions on Fedora 10 and later. Instead, just include rx/rx.h, which is sadly required to get an osi_Assert prototype, and explicitly prototype our osi_readRandom() function Change-Id: I55d03d76ac0cc8f490aa30f6986115cefae8f427 Reviewed-on: http://gerrit.openafs.org/4101 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 89ae0b12f20eea8a8b0a3fe493dc52d2def436ce Author: Derrick Brashear Date: Tue Mar 1 16:43:10 2011 -0500 tweak uvldb-making function in order to properly simulate a uvldb, swap in the right fields, and mark it correctly. Change-Id: I143784c0ca137e36ce6f7eddb54db3d9ac85bd37 Reviewed-on: http://gerrit.openafs.org/4107 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 7d516192bed12aa3137bcb86cbe0d8ecd492415c Author: Derrick Brashear Date: Wed Mar 2 08:12:38 2011 -0500 rx: cancel growmtu event on resetcall attempt at fixing issue reported by Ryan Underwood. Change-Id: I0d90fc4c517a3892564abd98d94a948741e1a394 Reviewed-on: http://gerrit.openafs.org/4108 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 14d30b74ee2aee3a203e5aee3f42bc6db096ef33 Author: Simon Wilkinson Date: Tue Mar 1 14:01:46 2011 +0000 ptuser/hpr: Don't check for a KeyFile ptuser and viced's hpr were checking for a KeyFile before calling ClientAuthSecure. If a KeyFile doesn't exist, then they would display a warning message, and use an rxnull connection. However, ClientAuthSecure will return a rxnull connection if it can't find a KeyFile. So, simplify all of this to just use ClientAuthSecure, which knows better than we do what keys are usable and which aren't. Change-Id: I14b6170ec49e0ca85bc371d3bdfa04aecf39f150 Reviewed-on: http://gerrit.openafs.org/4100 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c87f13ff687ffa606f4e729af6a03d6f247d42d7 Author: Simon Wilkinson Date: Tue Mar 1 13:59:19 2011 +0000 ptserver: Always set up Ubik security ptserver was checking for the existence of a suitable KeyFile before setting up Ubik's security classes. This is uneccessary, because the behaviour of the afsconf_* functions when a KeyFile doesn't exist is the same as Ubik's default mechanisms. So, simplify (and future proof) the code by removing the KeyFile check. Change-Id: I03df04e99ca4c043c15fc5f5701f8438912a7633 Reviewed-on: http://gerrit.openafs.org/4099 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d6b4a69444a28617a09c76ff4b2a82168b08fa5e Author: Simon Wilkinson Date: Tue Mar 1 00:13:00 2011 +0000 auth: Add Ktoken.xdr.c to the clean rule Ktoken.xdr.c was being built, but not cleaned. Fix this by adding it to the clean rule. Change-Id: I8a8a1de86fa28cc4280a08cb24770949b236ffdf Reviewed-on: http://gerrit.openafs.org/4098 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 08b7ca67a781ec93ae71677dd165133d9679a9bc Author: Chaskiel Grundman Date: Fri Jul 2 14:08:23 2010 -0400 libafscp: a library for "clientless" operations libafscp provides the ability to accomplish many of the functions of an AFS client without a running afsd cache manager. It is being introduced into the OpenAFS source tree in order to improve the capabilities of several utilities but may have additional benefits for testing clients and servers and for use on platforms which do not have afsd support. Change-Id: I24ee9416662c15b2d267317cea6fe0b7439ee022 Change-Id: I61037736e6edd01106b5b5ed982b211c16e1e7d9 Reviewed-on: http://gerrit.openafs.org/2371 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2d6bc153689f14f8690878b15d9fb711a56b0546 Author: Simon Wilkinson Date: Tue Mar 1 00:11:01 2011 +0000 volser: Rename putshort and putint32 dumpstuff.c defines macros for putshort and putint32. However, the name 'putshort' conflicts with a macro defined on Linux in resolv.h (which is included by roken.h) Just rename putshort to afs_putshort and putint32 to afs_putint32 to solve this problem Change-Id: Ib58cb7d8e606199c3f6a88be68e81f36c17d2df4 Reviewed-on: http://gerrit.openafs.org/4097 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7cd992d7037154b0edb09c9e1a1318b42d085485 Author: Simon Wilkinson Date: Tue Mar 1 00:08:12 2011 +0000 roken: Fix out-of-tree libroken builds The libroken configuration script is supposed to support using a libroken which is installed out of the OpenAFS tree, but which isn't in the standard search paths, by using --with-roken=/path/to/base This didn't previously work. Fix this so that it works correctly, and also fix a few problems with libafshcrypto, which assumed that LDFLAGS_roken would always be -L$(TOP_LIBDIR) Change-Id: I1219692f601a621e6c08ae26516136ed0cc03845 Reviewed-on: http://gerrit.openafs.org/4096 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c525b92d3d85fbfdaca82b9e807487df66a819eb Author: Simon Wilkinson Date: Sun Feb 27 11:43:11 2011 +0000 Fix grammar in configure check description "checking for kernel module build works" -> "checking if kernel module build works" Change-Id: Ie87a31d7ccf984744d0cd65b63160852c7a8d1bd Reviewed-on: http://gerrit.openafs.org/4094 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2681c49ada5679922f949e9c7d0010f2ee705dab Author: Andrew Deason Date: Mon Feb 28 14:03:46 2011 -0600 Revert "LWP: remove ucontext header from preempt module" This reverts commit fbac809a46376fcf60d3dcedc0be962c43d9c74e. The ucontext header is only included in lwp.h for platforms that use ucontext as a means for context-switching in LWP. The preempt module needs the ucontext header for signal handling on some platforms (at least Solaris). So, ucontext.h may not be included by lwp.h on these platforms, if that platform does not use ucontext for LWP context-switching. So we need to explicitly include ucontext.h in preempt.c. Change-Id: Ie08f20c7375d6ff1b185f64da70c983dbe19ac47 Reviewed-on: http://gerrit.openafs.org/4095 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fbcc8ac2646cf0b4b3de15967e064abfccbd7710 Author: Simon Wilkinson Date: Mon Feb 28 14:17:28 2011 +0000 Revert "Make osi_fetchstore.c protocol independent" This reverts commit 951612f4508b0c2ace4676f263df8dd4b566dd44. In testing, this change causes RXAFS_EndStoreData to intermittently fail with an RX_CC_UNMARSHALL error code. The error is returned when the first 32bit word is read from the RX stream from the server. Before this happens, the call is not in an error state. As this problem makes the cache manager unusable for other development, back the changeset out for now. Change-Id: If8268faa7bee2651273d7fbb0e235ddb02d6284b Reviewed-on: http://gerrit.openafs.org/4093 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4397159a1c84c890a4f2a84fa2282f0ab9b74154 Author: Derrick Brashear Date: Sat Feb 26 21:55:19 2011 -0500 arm darwin update some stuff that got lost from the last batch Change-Id: Id892a8fce7c90a07c359d77282c557a0a9b41cd2 Reviewed-on: http://gerrit.openafs.org/4064 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fbac809a46376fcf60d3dcedc0be962c43d9c74e Author: Derrick Brashear Date: Sat Feb 26 21:51:50 2011 -0500 LWP: remove ucontext header from preempt module it's already included by header. don't include it again. Change-Id: I97c85dd10db94e0a50133b922adb6d0b0b193cf7 Reviewed-on: http://gerrit.openafs.org/4076 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 86f7ac2f57591cf72ae22f8d1267efcc8e0b6641 Author: Derrick Brashear Date: Sat Feb 26 21:44:37 2011 -0500 avoid unneeded rebuilds due to component version if the component version file does not change, don't touch it and force a rebuild Change-Id: I8f864b0bdc56d04451e961fdeeb90c3bc6731d2b Reviewed-on: http://gerrit.openafs.org/4075 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e16d015a3eec3cf2fb79b27b39bd567bb4f07581 Author: Derrick Brashear Date: Sat Feb 26 21:42:40 2011 -0500 generated mode: fix result don't leave build results which will interfere with the next phase around Change-Id: If7e5f4773b7c79f7deceb88d7393cbb65a220bd5 Reviewed-on: http://gerrit.openafs.org/4074 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 94d8451a8ca43cc5119522cdcc804db4b0f963d9 Author: Jason Edgecombe Date: Sat Feb 26 17:18:25 2011 -0500 DOC: Add a missing quote in the QuickStart Guide Change-Id: I89fede614b6b1fcc28f282e2d610aa47c916f757 Reviewed-on: http://gerrit.openafs.org/4072 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 358f2a23079f940e9adb741d2526895d620d1ced Author: Andrew Deason Date: Thu Feb 17 11:57:53 2011 -0600 LINUX: Include key-related headers in osi_compat.h Include keyring-related headers in osi_compat.h, so we get the proper types defined for keyring-related functions. Also only define keyring-related functions if we have keyring support. Change-Id: Ie7d748f1426ce883c61ae8f30dbce1f0a1bf6bab Reviewed-on: http://gerrit.openafs.org/3895 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c576ca12b6618d2a121b29562aa70532b4cf65a9 Author: Anders Kaseorg Date: Tue Feb 22 18:18:17 2011 -0500 Linux: Reduce key_alloc flags confusion KEY_ALLOC_IN_QUOTA should be 0, not 1. Fortunately this was overridden by the earlier correct definition in osi_compat.h. Change-Id: I91a3b16dca0af182ddc3441437be781e689645a7 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4033 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit 9eafe7e6a8e18f63cc59b3395ae8f0d55a6c95f8 Author: Simon Wilkinson Date: Fri Feb 25 01:30:02 2011 +0000 auth: Rework PickClientSecObj When called in localauth mode, this function was using afsconf_GetLatestKey to check that the machine has a key file. However, the ClientAuth and ClientAuthSecure functions then go on to do exactly the same thing. Instead, pick up on ClientAuth returning a rxnull security layer, and trigger the NOTFOUND error based on that, rather than on the absence of an old-style key file. Change-Id: Ifb2d3a98bca5d1d67e303dcfeab1bb6f1efdc570 Reviewed-on: http://gerrit.openafs.org/4053 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 77c9405023f549bc8fb0c243e0b39153ac41753e Author: Simon Wilkinson Date: Fri Feb 25 01:28:30 2011 +0000 auth: Fix use of expires in PickClientSecObj The expires pointer was being zeroed in PickClientSecObject, rather than zeroing the value pointed to. This meant that we would never return any expiry time for the selected token. Change-Id: I9d8e29cdd0c14a1e839a6719390e7f690493f56c Reviewed-on: http://gerrit.openafs.org/4052 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fcbb656cf7b29b2f03592f3b56556e18b173092a Author: Simon Wilkinson Date: Fri Feb 25 01:23:38 2011 +0000 auth: Correctly write empty keyfiles The new key handling code was creating empty keyfiles that were 0 bytes in length. The correct format for an empty keyfile is a file containing a single 0 word (the number of keys in the file). Update the code to write this form of empty KeyFile. Change-Id: I93bf23f6044a70a74f52b94c4656cbd4bc4fc35b Reviewed-on: http://gerrit.openafs.org/4051 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 80f6e4fa8bbc468fe75692a4730cf822a4e0d686 Author: Simon Wilkinson Date: Fri Feb 25 01:21:38 2011 +0000 auth: GetLatestKey should allow NULL return values Existing callers in the code use afsconf_GetLatestKey(dir, NULL, NULL) to check for the existence of a key file. We need to permit NULL values for the return pointers to this function. Also update the tests to check for this behaviour. Change-Id: I94e74138ddeed8d167c1e6f12e297411c638e1b9 Reviewed-on: http://gerrit.openafs.org/4050 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1bc528d008fe11c43da6f6eef4210561bab33cbc Author: Simon Wilkinson Date: Thu Feb 24 13:52:40 2011 +0000 tests/auth: Refactor common code Pull the common code for creating a configuration directory out of the keys and superuser tests into a single file. This both cleans up the existing tests, and makes it easier to add new ones. Change-Id: I08058117e08da3a3baf750b3b14ef6780f942206 Reviewed-on: http://gerrit.openafs.org/4049 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 30adc223b11cb76b5085715d944c3bb2d766f6d8 Author: Jeffrey Altman Date: Fri Feb 25 15:32:37 2011 +0000 man-pages: add generated vos*.pod to clean rule 9ec343cf4292e178fa1e4a9757232dc983ea9ba3 failed to add the newly generated vos_addsite.pod, vos_copy.pod, and vos_zap.pod to the clean rule. Change-Id: Ia18559076e979dfd16ecac6d4cc89d92d83d930f Reviewed-on: http://gerrit.openafs.org/4061 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 559152ac107f91c8c2f11a909ef638551227b04a Author: Anders Kaseorg Date: Tue Feb 22 19:18:30 2011 -0500 Linux: install_session_keyring: key_alloc flags are unsigned long Change-Id: I3bdecd77e06928fd22cf0cf6bd92af2dccf62896 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4034 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c3499218ad604b1985239334d77dd0a94c7128bb Author: Derrick Brashear Date: Mon Feb 14 00:20:40 2011 -0500 MacOS: aklog auth plugin the AuthorizationPlugin subsystem replaced the old loginplugin method. As it is now usable for us, provide a plugin which can take advantage of it. LICENSE BSD Change-Id: I66de192c6028c195c3bb6809c451281d9937fb26 Reviewed-on: http://gerrit.openafs.org/3939 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 44046857f6509e511a64acfdd04e362bc5205d17 Author: Chas Williams (CONTRACTOR) Date: Sat Feb 19 10:19:24 2011 -0500 lwp: test for working swapcontext() and friends The USE_UCONTEXT was a temporary fix until someone wrote a reasonable test of the user context swapping functions. While these are present on many operating systems, they simply aren't complete. This test correctly fails on IRIX, MacOS and some versions of Linux (in particular, ppc 32-bit binaries on a 64-bit processor). Change-Id: Ie2f340d661002c8f3c78dddbaf755257cb4ca286 Reviewed-on: http://gerrit.openafs.org/4018 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6201e3baa0d42688434bd8c1d46c62a6ab39d19c Author: Rod Widdowson Date: Sat Jan 22 16:25:42 2011 +0000 vutil.c: use OS_XXX rather than afs_XXX This checkin replaced the use of afs_open/close with OS_OPEN/OS_CLOSE Change-Id: Ie0f4edc90cf584112a54a5f8a1676014cc15eeac Reviewed-on: http://gerrit.openafs.org/3741 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit b71a2daaf0bc8f6c392be0d1f669d58c81c519c7 Author: Rod Widdowson Date: Thu Feb 3 11:44:12 2011 +0000 namei_ops.c use OS_XXX rather than afs_XXX This checkin removes all uees of afs_open and replaces them with OS_OPEN. It converts direct call to read/write/close to OS_XXX The exception is afs_stat which is left in place as this is unix only and rerquires separate handling. Change-Id: Iaab6cb57b6f4b5a131fb77d64d794893f795b59c Reviewed-on: http://gerrit.openafs.org/3888 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 63fb786c541926dbf03a9452288c6a938c7cd6c4 Author: Andrew Deason Date: Mon Feb 21 12:39:48 2011 -0600 rx: Reset fd_set in LWP rxi_Sendmsg When we select() on the socket fd in rxi_Sendmsg, we do not reset the fd_set, and just use the same memory for any necessary subsequent select()s. However, if the select returned on EINTR, the fd_set may be cleared, and so we may try to select() on an empty fd_set forever. To be sure that we don't do that, reset the fd_set to the socket fd every time. Change-Id: I5273351c70e593ad1b7849f4f56de1fcb12d1bbf Reviewed-on: http://gerrit.openafs.org/4028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit df7cca0fa8c5cbeca8cdb9f065e47f4c927dbbe3 Author: Derrick Brashear Date: Wed Feb 16 12:18:58 2011 -0500 MacOS: don't install growlagent into prefpanes dir we have more than one tool now. don't misinstall into the prefpanes directory Change-Id: I9fecc4d448edee54292a5c809caf7721960188ce Reviewed-on: http://gerrit.openafs.org/3963 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5074de30f71b9dc2fd406b6e71ed4b226294a442 Author: Andrew Deason Date: Mon Feb 21 14:13:22 2011 -0600 cmd: Fix objdir builds Commit 8eca6a1153eb7768c2f29ea2d48f01f6988cbfe3 broke objdir builds by not specifying ${srcdir} for cmd.c. Fix that. Change-Id: Ifd9fe13834b785058c8b69a60509838b74c4a027 Reviewed-on: http://gerrit.openafs.org/4031 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 153cb5a3ca34c07a899841ae917b7b882e7ae433 Author: Andrew Deason Date: Mon Feb 21 14:56:48 2011 -0600 budb: Fix objdir builds Change-Id: I83851af2ca29ee42ce8f50eba733faf763c39c55 Reviewed-on: http://gerrit.openafs.org/4030 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 61453d8f33f6508f8464ffba0657aefb6c7eae3b Author: Andrew Deason Date: Mon Feb 21 13:49:59 2011 -0600 Fix budb build rules for tbudb and WINNT Commit 0d0b5048a5b68d4079b13609775f9234183d1947 only fixed the budb Makefile.in. Make the analagous changes to tbudb/Makefile.in and NTMakefile. Change-Id: I4fa00e630aafcfa9d4d41a1948f3eae750900526 Reviewed-on: http://gerrit.openafs.org/4029 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cfb5424768c749520c534f8c6d22161cee1daa53 Author: Andrew Deason Date: Sat Feb 19 21:14:11 2011 -0600 HPUX: Fix osi_debug.c includes osi_debug.c was trying to include fcrypt.h and private_data.h. But the former is in the rx subdirectory, and the latter is in src/rxkad. So, specify a more complete path for fcrypt.h, and put src/rxkad in the include list for osi_debug.c so we can build again. Change-Id: I5754f56354f40bd3697ac286cb0820041fda0b00 Reviewed-on: http://gerrit.openafs.org/4024 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 0d0b5048a5b68d4079b13609775f9234183d1947 Author: Simon Wilkinson Date: Mon Feb 21 00:29:33 2011 +0000 budb: Only have one build rule for budb_errs.c budb had two build rules that could produce budb_errs.c, but only one of them also produced budb_client.h. This led to problems with parallel makes, as depending on which rule fired first, budb_client.h might, or might not, exist. Rework all of this so that it's cleaner. Instead of producing two copies of the error table, just make budb_client.h a static file, and include the dynamically generated budb_errs.h from it. This reduces code duplication, and means that we have to run compile_et one less time. Change-Id: Ib9b982454cc3f1ef3bdeb629c64dbb9901397fdb Reviewed-on: http://gerrit.openafs.org/4027 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 019a473e576944003acbe3630d0b8bc0bdcce984 Author: Marc Dionne Date: Sun Feb 20 09:40:15 2011 -0500 libuafs: add UAFS.pic to .gitignore Add UAFS.pic to .gitignore, it's a generated directory. Change-Id: Ibbd5fa482e96b4d4e39402b5cb2a3cc7356c0662 Reviewed-on: http://gerrit.openafs.org/4022 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36f89a2ce4fdb488480a5979e4f096cf3bdacf3d Author: Marc Dionne Date: Sat Feb 19 15:11:30 2011 -0500 crypto: return a value from the krb5_init_context stub The krb5_init_context stub is declared as returning an int, so make it return 0 to avoid a warning. Change-Id: I1e04d6953cf4daed67c7b1de9414113812148931 Reviewed-on: http://gerrit.openafs.org/4019 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 839b62ab414fde02e1a2093bc036c63c708d861d Author: Andrew Deason Date: Fri Feb 18 15:49:03 2011 -0600 LINUX: Replace dcache.h for fs.h in config tests When detecting if we have certain Linux kernel features, we only include dcache.h. On some kernel versions (at least 2.4.27), compilation fails if we include dcache.h directly (due to e.g. list_head not being defined), which causes false negatives in tests such as the test for dcache_lock. If we instead include fs.h, which includes dcache.h, the tests succeed when they should succeed. So, use fs.h instead of dcache.h. Change-Id: I43fbbc7e5a952d9effbbac16adb9891c36f729bd Reviewed-on: http://gerrit.openafs.org/3989 Tested-by: BuildBot Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 2afbe1378812ca8ac120aa14fcb173c093748682 Author: Chas Williams (CONTRACTOR) Date: Sat Feb 19 08:26:20 2011 -0500 lwp: fix the rw test program We should not need to prototype calloc() anymore and osi_Assert() has been replaced with assert() apparently. Change-Id: I3ef6178c589cabcd0637cd88c35d2276833b4590 Change-Id: I0626475f120ff9a373e0251f3c4485c052922747 Reviewed-on: http://gerrit.openafs.org/3991 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0491b2846f81defe92e3fcf8bc4481637ec109b3 Author: Ben Kaduk Date: Sat Feb 19 22:41:19 2011 -0500 FBSD: remove prtactive It is unused and has been removed by upstream. Since we don't particularly need it for older versions, remove it unconditionally. Change-Id: If209f7d11d5f4aa4ba77f934d865c905761b05ca Reviewed-on: http://gerrit.openafs.org/4020 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2c807d053822b7b2591561599285d103efa12bfd Author: Simon Wilkinson Date: Sat Feb 19 18:04:43 2011 +0000 osconf: pic_regex.o is now regex_pic.o pic_regex.o was renamed as regex_pic.o in commit 43b8bcf2a7c7dfd855a9f2bf274a93289a4941c6, but osconf.m4's definied of REGEX_OBJ_PIC wasn't updated at the same time. Fix that. Change-Id: I4523f99d94f158329e8e0eccde575733d28fbf51 Reviewed-on: http://gerrit.openafs.org/4021 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b719ad74865c63a04188dc124fd96def6cba1c04 Author: Simon Wilkinson Date: Wed Feb 16 21:57:59 2011 +0000 hcrypto: Use new LWP_CCRULE Use the new centralised LWP_CCRULE, rather than brewing our own. Change-Id: I3eda193371c28972a048f3c0c125d10161420fd7 Reviewed-on: http://gerrit.openafs.org/4016 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c7c6a2ca5c45367d1a8ed1710a4c99f8e3c5f6b Author: Andrew Deason Date: Thu Feb 17 14:33:07 2011 -0600 Document dropbox permissions Document the behavior and potential problems with granting 'il' rights to create dropboxes. Do this in the manpage for 'fs setacl' and chapter 4 of the User Guide. Change-Id: Ic4e8ee016290080d78037a5c2c3802ce4e2e342c Reviewed-on: http://gerrit.openafs.org/3977 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2b094cae6c39bc9e2d8f23f4654e137876b25d57 Author: Simon Wilkinson Date: Fri Feb 18 00:36:33 2011 +0000 RedHat packaging: Use %{dist} not %{osver} There's a standard mechanism for defining a RPMs target distribution in the Fedora and RedHat worlds. This is to use the %{dist} macro, and to insert it at the end (not the beginning) of the release field. Move over to using this standard mechanism, and modify the build system to match. Note that this means that RPM names have now changed slightly. Change-Id: I5a4f1ad827223f48658f595ac424ab64fe98ed39 Reviewed-on: http://gerrit.openafs.org/3981 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fd010651194f4c9f1324ea7aa8d84426ce9827e4 Author: Andrew Deason Date: Thu Feb 17 15:47:00 2011 -0600 afsd: Make mountdir check kernel-specific Checking if the /afs directory exists only makes sense for the kernel afsd. The libuafs afsd does not care if the mount directory actually exists on the machine or not, since it may not interact with the mount directory path on the local machine at all. So, make the mountdir check code be a new afsd function (afsd_check_mount), and have it stat() the mount directory only in the kernels-specific afsd. Change-Id: Ic0b524e23f518c4f3c9954e6b9614bca984306a3 Reviewed-on: http://gerrit.openafs.org/3980 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 383d99d04b2ca3254264d9a948aea19a0235fe80 Author: Jeffrey Altman Date: Fri Jan 14 10:45:06 2011 -0500 Windows: Change GiveUpAllCallBacks default to On Change-Id: I2a87f0b22dc1d4d21eae4877f7e367a18bab4283 Reviewed-on: http://gerrit.openafs.org/3660 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cee2c677d7de66a510d05978e3b41dcd5d8aca78 Author: Derrick Brashear Date: Wed Dec 1 15:23:11 2010 -0500 unix: giveupallcallbacks at shutdown just try to give up callbacks at shutdown. at this point if you're running 1.4.5 or older, you're sad anyway. Change-Id: I7d9e9f1de45980f064bccaab338499789aa40646 Reviewed-on: http://gerrit.openafs.org/3404 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 249d65e72592b707fcc794be5f8af10a67c55e26 Author: Marc Dionne Date: Sat Jan 22 16:04:47 2011 -0500 ubik: Abstract common code in ContactQuorum* functions These functions are mostly identical except for the arguments and the called operation. Move as much common code as possible to an iterator function and a return code check function. The DISK_WriteV case is treated a bit differently since it can fall back to using DISK_Write. This reduces code duplication and shoud simplify maintenance and future changes. There should be no functional changes. Change-Id: If2f88c670da47eaad4baa81975ecc307013f5ce8 Reviewed-on: http://gerrit.openafs.org/3970 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 470a6d46175125bfe15bb267ee8f77d60132592a Author: Derrick Brashear Date: Mon Feb 7 10:54:51 2011 -0500 fileserver: dropbox mode shouldn't allow readback from anonymous if you're writing files as anonymous, don't let them be read back. things which potentially need to page back in will just have to be authenticated, or lose. Change-Id: I71a6096239eb59b40a9df09460e8db160e9342da Reviewed-on: http://gerrit.openafs.org/3901 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit dacbfdf82cf20c5ebaab1f19d619ca2b58528d2e Author: Andrew Deason Date: Thu Feb 17 12:37:49 2011 -0600 shlib-build: Add -p option Add a -p option to shlib-build option to generate "plain" shared objects. That is, shared objects that are intended to be e.g. dlopen()'d, and are not intended to be libraries dynamically linked to from other code. Such shared objects do not need a library name, version numbers, export lists, etc. Change-Id: I649c1b697a79936c1d580199291124398b05e56b Reviewed-on: http://gerrit.openafs.org/3975 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d87db62f4b9605539f9e9bd89fcbdb23202a846 Author: Andrew Deason Date: Thu Feb 17 12:28:44 2011 -0600 shlib-build: Fix usage message Change-Id: Ieb7181784f736a2295fffbea80da55d6a5c099cd Reviewed-on: http://gerrit.openafs.org/3974 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 18b24156f1dc0f727260724023eed583b460218b Author: Andrew Deason Date: Thu Feb 17 15:15:06 2011 -0600 afsd.fuse: Force internal mount dir to /afs Commit 1f1545dfb708b6f70065da58b44676b8eafef772 made it so the argument given to -mountdir sets the internal mount directory. However, afsd.fuse assumes that the mount dir is always /afs internally. So, use the uafs_setMountDir function to reset the internal mount dir to "/afs", so afsd.fuse can work with non-/afs mountpoints. Change-Id: I985f1a25d04af4027c7adef69231e2f56e026d24 Reviewed-on: http://gerrit.openafs.org/3979 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 445548636f4d57aaa8e29912803e242f772959c7 Author: Andrew Deason Date: Thu Feb 17 15:14:41 2011 -0600 UKERNEL: Add uafs_setMountDir Replace the function uafs_mountWithDir with uafs_setMountDir, and adjust the one caller. This allows libuafs users to manually set the mount dir after e.g. the mount dir is set from afsd options. Change-Id: I85a967ce27a72f54c1ab29b007dbb8634017c897 Reviewed-on: http://gerrit.openafs.org/3978 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7bbec1f86bbdbf351d36863dc5d971f61051b170 Author: Andrew Deason Date: Thu Feb 17 11:53:08 2011 -0600 LINUX: Fix osi_compat.h include guard Change-Id: I96565ba0adef3d3be646c1ed02c7d022e216f911 Reviewed-on: http://gerrit.openafs.org/3973 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 43b8bcf2a7c7dfd855a9f2bf274a93289a4941c6 Author: Andrew Deason Date: Wed Feb 16 16:24:47 2011 -0600 util: Use foo_pic.o instead of pic_foo.o Be more consistent with the rest of the tree, and name PIC object files with the convention foo_pic.o. Change-Id: Ib3b9642534c51ffb10fe3c86f779b4e9df6af4c1 Reviewed-on: http://gerrit.openafs.org/3968 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4f3b6a5b3c63ee34d65f202730ff2ce68627b2e5 Author: Andrew Deason Date: Wed Feb 16 15:58:41 2011 -0600 Fix PIC CFLAGS Commit 8eca6a1153eb7768c2f29ea2d48f01f6988cbfe3 just used -fPIC to generate position-independant code. However, the flag to turn on PIC varies depending on the compiler, and is not always -fPIC. Just use SHD_CCRULE instead, which will get us the correct PIC flags. Change-Id: I61d698587cc3959b35ec27abe3c3b19adab5d8f1 Reviewed-on: http://gerrit.openafs.org/3962 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 31e730330849eae7d31c282b24d16ebeea7147ca Author: Simon Wilkinson Date: Wed Feb 16 20:41:02 2011 +0000 Add CCRULE variants for each build type Add explicit LWP, PTH and SHD variants of the CCRULE variable for LWP, pthreaded and shared-library builds respectively. This allows Makefiles which support building more than one target type to use these rules directly, rather than brewing their own. Modify all of the AFS_CCRULE definitions in the build type specific Makefiles to reference these rules, so we aren't specifying things twice. Change-Id: I79bb394cca8971ce71b10ef55b75d5169bf6b80c Reviewed-on: http://gerrit.openafs.org/3966 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit dae5b59337674304495b3f9f678088c317f002c5 Author: Marc Dionne Date: Sat Jan 29 12:31:24 2011 -0500 ubik: remove unused OLD_URECOVERY code OLD_URECOVERY is never defined and only serves to preserve unused code. Change-Id: Iefc0fcfd177fa134a74cee05b0b45e6bf075ad1c Reviewed-on: http://gerrit.openafs.org/3969 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1f1545dfb708b6f70065da58b44676b8eafef772 Author: Andrew Deason Date: Fri Jan 28 11:11:20 2011 -0600 libuafs: Allow -mountdir to override uafs_Setup For some reason, uafs_Setup accepts a parameter specifying the AFS mount point, and we effectively ignore any -mountdir option specified in the string arguments. Allow -mountdir to override the mount point specified in uafs_Setup, by changing afs_mountDir &co during afsd_mount_afs(). Change-Id: I4ea88923c0a8392d280c1a8f0ca4d3adf741f7f6 Reviewed-on: http://gerrit.openafs.org/3897 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9315c66f15fb0d178e1c322cf14c0d64eea46c65 Author: Andrew Deason Date: Mon Feb 7 13:13:31 2011 -0600 viced: Enforce lwps limit for -L Previously, we only enforced the calculated lwp/thread maximum when the -p argument was specified. When -L was specified, we set lwps to 128, which can be over the max of (effectively) MAX_FILESERVER_THREAD-FILESERVER_HELPER_THREADS, depending on the value of MAX_FILESERVER_THREAD. Instead, enforce the lwps min/max after all code to set the lwps has run. Change-Id: Ia9fc29855e74631509ea558cfe1b17fcf46e900e Reviewed-on: http://gerrit.openafs.org/3903 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 687fe37614a6f5f9083818931b72ac326eaee43a Author: Simon Wilkinson Date: Mon Sep 13 13:54:32 2010 +0100 rfc3961: Add a kernel rfc3961 implementation Add the necessary mechanisms to build Heimdal's libkrb5/crypto_*.c in the kernel. This provides the kernel module with a RFC3961 implementation. In theory this could also be used to provide a RFC3961 implementation on top of an EVP-based crypto library in userspace, but at the moment we're just using Heimdal directly for this. Change-Id: Ie57391da0dabd2dca8b305e23f0c0faa056a4675 Reviewed-on: http://gerrit.openafs.org/3948 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 57b9febc61ee7289f328f29a3ede40d765fa0894 Author: Heimdal Developers Date: Thu Jan 27 12:22:24 2011 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 8ce821c38744b30e226ff024f675668b991b984d (switch-from-svn-to-git-1998-g8ce821c) New files are: krb5/crypto-aes.c krb5/crypto-evp.c krb5/crypto.c krb5/crypto.h krb5/data.c krb5/keyblock.c krb5/store-int.c Change-Id: I511d54e1353a3662babd2d12611fd31b8e3061a5 Reviewed-on: http://gerrit.openafs.org/3947 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2557da6fc04f657b07bc2ac019e9e21955b7325a Author: Simon Wilkinson Date: Wed Nov 17 21:57:42 2010 +0000 Add rfc3961 crypto files from Heimdal Add the Heimdal files which are necessary to produce a kernel rfc3961 implementation to the import list. Change-Id: If080207cd882b277548f503e5eb139fe9a54f495 Reviewed-on: http://gerrit.openafs.org/3946 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 465321e3f43645efedb44168968f871fe5be4daa Author: Simon Wilkinson Date: Sun Sep 12 18:40:08 2010 +0100 hcrypto: Add hcrypto EVP support to the Unix CM This commit adds the files which are necessary to support hcrypto's EVP interface to the Unix cache manager build. Only a small number of EVP ciphers and hashes are currently supported - * aes_128_cbc * aes_256_cbc * sha1 Note that the EVP interface is the only supported mechanism to use the AES cipher - directly calling the underlying crypto functions is not recommended and may break at any time. Change-Id: I662073e578b29db1707c6b6433209e75e4db455d Reviewed-on: http://gerrit.openafs.org/3945 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b4350fab31ab91373caac4601d26cd0451da0aa4 Author: Simon Wilkinson Date: Sat Sep 11 13:02:49 2010 +0100 Unix CM: Add osi_crypto crypto interface Add a new osi file to the cache manager. This file includes functions which interface hcrypto with the kernel's own cryptography library. At the moment, the only such function is osi_readRandom which returns a block of random data from the kernel's PRNG. Change-Id: Ib728f5bb638ef634efe4822da24bb7cca723983f Reviewed-on: http://gerrit.openafs.org/3944 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 22b47b65c74d42eaa00e8ac8ad442fee3d2ceacf Author: Andrew Deason Date: Wed Feb 16 09:49:03 2011 -0600 Makefile whitespace fixes Some "make"s get tripped up by recipe lines starting with anything but a tab character. Most of the time we start ours with tabs, but fix a few instances where they begin with spaces. Change-Id: I2c17c68deb1b7641ca73e84ec0043b62ce3c54ba Reviewed-on: http://gerrit.openafs.org/3961 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0bb6170b222ee2e9a0a3d224dac890adaed945a9 Author: Andrew Deason Date: Tue Feb 15 17:21:49 2011 -0600 vol: Restore inode OS_READ/WRITE Commit 335ccb4082657b7d0e4e9af1076356cf115642d2 removed the OS_READ and OS_WRITE definitions for non-namei code. We need those definitions to build the pread/pwrite emulation functions, so put them back in. This allows us to build the inode fileserver backend when we do not have native positional I/O. Change-Id: I3c066dacbee20301b38f074142cb6b6bb6b05de7 Reviewed-on: http://gerrit.openafs.org/3959 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d06a4a557675b68421f2272d0153ca04128f6994 Author: Simon Wilkinson Date: Thu Sep 2 08:44:27 2010 +0100 Autoconf: Add GSSAPI autoconf rules Add rules to autodetect the location of a system's GSSAPI libraries, using the gssapi.m4 script from rra-c-util 2.6 Change-Id: Idabb8fdb138a2dac6983aa4d5fd8a2f558ee08be Reviewed-on: http://gerrit.openafs.org/3943 Tested-by: Christof Hanke Reviewed-by: Derrick Brashear commit 11b2c6d6fe4dbbf5a54ae1e08e979c35ab6b7fa0 Author: Andrew Deason Date: Mon Feb 14 13:53:11 2011 -0600 HPUX: Disable positional I/O Some versions of HP-UX have the pread() and pwrite() functions, but they behave in odd ways; most notably, ignoring the offset argument when _FILE_OFFSET_BITS is defined to 64. This is noted in recent gnulib documentation , and slightly less clear references to pread() being broken can be found on the development mailing list for git itself. It is not completely clear what specific HP-UX versions are affected by this. An autoconf run-time test may also be insufficient, because the same binaries should be usable on machines with broken and non-broken pread() implementations. So, to be safe, disable positional I/O on HP-UX unconditionally. Change-Id: I09b8d9c441622c961d1df90fe27eeccaa948f5c4 Reviewed-on: http://gerrit.openafs.org/3949 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f378dcf785967374309523a02ea06d6d1a3ff148 Author: Russ Allbery Date: Mon Feb 14 12:36:18 2011 -0800 Update 1.6 NEWS entry based on 1.6.0pre2 release notes Change-Id: Id795a74910bc881f8e93c8e80b9cb55ff48c3b15 Reviewed-on: http://gerrit.openafs.org/3950 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fe231190d8df1567ae4d4e0b474131b9e2621cda Author: Simon Wilkinson Date: Sun Jan 30 19:27:17 2011 +0000 Linux: Fix RX atomics for kernel mode Fix a mistake with the definition of rx_atomic_set, and add the missing declaration of rx_dec_and_read for Linux kernel builds Change-Id: Ieed7a369670c051abc02d8cc831e8736969fb67a Reviewed-on: http://gerrit.openafs.org/3942 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91f9a7f64b848b6c2b0b16b817640e54ac59f308 Author: Derrick Brashear Date: Mon Feb 14 11:03:17 2011 -0500 1.6.0pre2 release notes add release notes for 1.6.0pre2 Change-Id: I05eb7d02b3daa9935eec6cbc7f6b8f1de78c23f0 Reviewed-on: http://gerrit.openafs.org/3940 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit da912adbf1512702a17b8e381af3d0225875e67c Author: Jonathan Billings Date: Fri Jan 7 10:44:27 2011 -0500 RedHat: Change the defined initdir path to /etc/rc.d/init.d On Red Hat systems, /etc/init.d is a symlink to /etc/rc.d/init.d. We should use the actual path for packaging the init scripts, to avoid any issues with package verification. Change-Id: I476193b3fd534c8aa70c67970bf2765a30f4c4d5 Reviewed-on: http://gerrit.openafs.org/3625 Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8eca6a1153eb7768c2f29ea2d48f01f6988cbfe3 Author: Andrew Deason Date: Mon Dec 13 13:11:02 2010 -0600 Add PIC variant for libuafs Build a libuafs that is built with PIC, so it can be used in shared libraries on all platforms. Also build PIC variants for libafsutil and libcmd, since we need them for a PIC libuafs anyway. Change-Id: I017fa22c3b4dd661123ea92da7b3e5b69ee5c170 Reviewed-on: http://gerrit.openafs.org/3896 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit adca541d70ef2e9d87b000ad570440a13e431014 Author: Simon Wilkinson Date: Sat Jan 1 23:41:29 2011 +0000 auth: Rewrite KeyFile handling code Extend the KeyFile API so that we can support arbitrary numbers of different key types, each with their own key version numbers and sub types. Completely rewrite the KeyFile implementation with this in mind, but implement all of the "old" API in terms of the new one. Given that the existing KeyFile is modified by third party programs, we retain that as the storage location for all afsconf_rxkad keys. Only keys with a type of 1, or above are stored in the new extended keyfile. Change-Id: I903a1de938544541a1bfecedb2a039ba24bdfdbc Reviewed-on: http://gerrit.openafs.org/3772 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 278798be3f4d16a27b73fa2d27df01fe704eb881 Author: Jeffrey Altman Date: Sat Feb 12 21:10:44 2011 -0500 Windows: Release Notes updates for 1.6pre2 A fairly thorough review of all sections to ensure that the information is up to date. Significant reformatting caused by XML editor. Change-Id: Iad988b91091a02a7b5de2a1d1fae052fc5ee897f Reviewed-on: http://gerrit.openafs.org/3936 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 281f5bf5fbb0a546edcce62ef4e097ae9bbdbf73 Author: Marc Dionne Date: Wed Feb 2 21:55:27 2011 -0500 Linux: 2.6.38: dentry->d_count is not an atomic d_count is now an int protected by the dentry's d_lock. Take the lock when we use it, instead of using an atomic_* function. Change-Id: Ib70e4a5315cc343518fa983e47bc7ff925acfc7f Reviewed-on: http://gerrit.openafs.org/3883 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c4ceaa632d5bcf62272637665368768d772e962c Author: Jeffrey Altman Date: Sat Feb 12 14:24:02 2011 -0500 Windows: ChangeLog updates for 1.6.pre1 Change-Id: I17de717ffd597c45720a4fbd39a14c5df67f870c Reviewed-on: http://gerrit.openafs.org/3926 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e4119971b0131411dc686adcbfc6b5bb3c9b52f1 Author: Jeffrey Altman Date: Sat Feb 12 11:52:12 2011 -0500 Windows: Fix GetIoctlHandle path construction GetIoctlHandle() is used to construct the magic pioctl file path used to initiate pioctl operations with the cache manager. The first error introduced double directory separators. The second error was testing an uninitialized value which could have resulted in a missing directory separator. Change-Id: I4e863b854ea12b69858be712455dc6b6a0d36c39 Reviewed-on: http://gerrit.openafs.org/3925 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e6411317ce21bb92e644e7126228318e8e672756 Author: Jeffrey Altman Date: Sat Feb 12 11:45:15 2011 -0500 Windows: Fix symlink and mount point make \\afs\xxx handling When processing a request to make a symlink or a mount point in the afs root volume (\\AFS) the smb redirector will fail the request because a server name by itself is not a valid path. Therefore, we insert the "all" share component to refer to the root volume as a valid path. \\AFS\foobar becomes \\AFS\all\foobar. A recent change stripped the trailing slash from the string returned by Parent(). This broke the test that determines whether or not the provided path that failed the IsAFS() test is in fact referring to the \\AFS server and requires the insertion of the "all" share name. This patchset permits the test to work with \\AFS or \\AFS\ and removes extraneous directory separators from the generated path containing the "all" share. Change-Id: Ia3b28d83302d9737bd149b4a22bc3ee3a6c8da46 Reviewed-on: http://gerrit.openafs.org/3924 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1a474ac28719c1b2187435de117a87c8dcca8bd9 Author: Simon Wilkinson Date: Wed Feb 9 19:37:18 2011 +0000 util: Actually install thread_pool_types.h The action portion of the rule for thread_pool_types.h was missing, so the file was never installed. As that file is a dependency for the whole of the util directory, it would result in util being completely rebuild with every make invocation. Add the missing installation rule, so we don't rebuild quite so often! Change-Id: Idb201c239b6b37a25567cf231059ef05536fc258 Reviewed-on: http://gerrit.openafs.org/3921 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f132054e4f3a7633eb60f3abdbdc27233ec344f5 Author: Marc Dionne Date: Wed Feb 9 17:06:00 2011 -0500 scout: restore parallel make Restore the + in the scout Makefile section, lost with commit 4a6a00d6. Lets scout benefit from a parallel make and avoids a warning. Change-Id: Ie4c35c93afae4bfefaae0a0db9d676200cb3ee7b Reviewed-on: http://gerrit.openafs.org/3910 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 296cf7d1630c57874b870e161bac5db9fe4dab48 Author: Marc Dionne Date: Thu Jan 27 19:07:32 2011 -0500 ubik: always prefer a dirty cache page for write transactions If a write transaction is running concurrently with a read transaction, a DRead in the write transaction may return a clean cache page brought in by the read transaction, instead of a previously written dirty page from the same transaction. This can result in loss of the written data. Fix by making sure there is not a dirty version of the requested page before returning a clean one. Bug spotted by Jeffrey Hutzelman. Change-Id: I20543693c98218d8ec1f791508d9404043819376 Reviewed-on: http://gerrit.openafs.org/3764 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit be4abb4ec83a47477b254f2b3375742c4efbb063 Author: Rainer Toebbicke Date: Thu Jan 27 15:03:57 2011 +0100 Early dispose of replies in rx_Multi Handles replies as soon as they arrive in rx_Multi, limiting strain on RX packet queues on massive rx_Multi loops. Change-Id: I345f7dba1707beeb75bcc65bb519afb9dc741973 Reviewed-on: http://gerrit.openafs.org/3765 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit bf72dbf3d5550857a8d41c910baaa722690c1eee Author: Derrick Brashear Date: Mon Jan 31 11:04:08 2011 -0500 evalmountdata null pointer before use volnamep can be used uninitialized. fix that. Change-Id: I4aafb3bc56241b4cfc7ccd0a9cfa9e57bd97157a Reviewed-on: http://gerrit.openafs.org/3777 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2eca7aef7b2940e4ef5f9901ce28481af6edb6dd Author: Marc Dionne Date: Fri Jan 28 20:59:17 2011 -0500 Linux: 2.6.38: deal with dcache_lock removal dcache_lock is gone in 2.6.38, and some of the vfs locking rules have changed. Of interest for openafs: - inode->i_lock protects the d_alias list - dentry->d_lock protects d_unhashed() Add a new configure test for dcache_lock, and replace its use by the appropriate new lock(s). Change-Id: Ic8d860d4f9f6438e966c15f5178c0d82343e3e1c Reviewed-on: http://gerrit.openafs.org/3771 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5bcc0ea735ea519298c98b46c66bf1326cdee5e4 Author: Marc Dionne Date: Fri Jan 28 19:41:32 2011 -0500 Linux: 2.6.38: Adjust for permission inode operation changes The permission i_op has a new signature with a flags argument, and must now deal with RCU path walking. - Fix existing configure test for this i_op, it succeeds when it shouldn't - Add a new configure test for the new signature - Make our permission i_op "RCU-walk aware" - return ECHILD if called in that mode Change-Id: I42a171694717f4621f29f9f59e4f6049926862a3 Reviewed-on: http://gerrit.openafs.org/3770 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ca38c9546e323b59189670b80740510fb9ec5269 Author: Marc Dionne Date: Fri Jan 28 19:03:39 2011 -0500 Linux: allow compile flags to be passed to AC_CHECK_LINUX_BUILD Some linux autoconf tests require particular compile flags such as -Werror. Add a parameter to the AC_CHECK_LINUX_BUILD macro that lets the caller pass in any needed special flags. Adapt a few existing tests that were still using AC_TRY_KBUILD directly. Change-Id: I4a5e3db74f6fb9c35bfa7b2964a294f646e78626 Reviewed-on: http://gerrit.openafs.org/3769 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f47487db051ba6b51ae12daf7edc09ecfd3c38cd Author: Andrew Deason Date: Thu Feb 3 15:40:48 2011 -0600 ConvertROtoRW: Use old copyDate for creationDate When we convert an RO volume to an RW, currently we just copy the copyDate and creationDate from the RO metadata into the RW. But the copyDate and creationDate fields have different meanings for RW and RO volumes: for ROs, the creationDate is merely the last time the data was updated from the RW during a release operation. So, if the copyDate is older than the creationDate, use the copyDate as the new RW creationDate instead. This will probably not match the creationDate of the original RW, but it will be closer to it, and it will more accurately represent the conceptual "created time" of the new RW. Doing this can avoid forcing an unnecessary full dump on a subsequent release of the resultant RW volume, since the creationDate is more accurate. Change-Id: Ibfffbdc4a79a568261e9e116f6991a3af9db5e0c Reviewed-on: http://gerrit.openafs.org/3891 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ae11ef7898ecffe8eb2a38151602572c24e32a76 Author: Jeffrey Altman Date: Mon Feb 7 16:44:09 2011 -0500 Windows: correct pthread_xxx_init semantics pthread lock and conditional initialization semantics do not require that the lock structure be zeroed before pthread_xxxx_init() functions are called. Since the Windows CriticalSection initialization does require that the memory be zeroed, the pthread_xxxx_init() functions must zero the memory just in case before performing the CriticalSection initialization. Change-Id: I61e78ca7cbc10f7d4144b8efcbb38f67bb8fd695 Reviewed-on: http://gerrit.openafs.org/3904 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 380cc22a45dff7e40cd50d57a56742b59ccc4952 Author: Andrew Deason Date: Thu Jan 27 13:13:21 2011 -0600 afscp: Fix -s option for writes When writing to AFS with afscp, the -s option was sleeping before any StoreData RPCs actually got issued to the fileserver. Move the sleep to after we have done one rx_Read/rx_Write, so we sleep after starting to contact the fileserver, to make sleeping while writing more consistent with sleeping while reading. Change-Id: Ib4e93b65f50cbad30d057ad7905617d00070c1a4 Reviewed-on: http://gerrit.openafs.org/3762 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 15c497e90edc69312dba6843521ff08f0ac19248 Author: Jeffrey Altman Date: Wed Feb 2 19:24:00 2011 -0500 Windows: remove duplicate advapi32.lib references advapi32.lib is included in the conlibsdll macro. No need to include it in the link list twice. Change-Id: I2f9725f8b48b26afc959477d2fe2f2925f357ee7 Reviewed-on: http://gerrit.openafs.org/3882 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit dca093a17097f7e24d43afe4544e4be896b86680 Author: Ken Dreyer Date: Thu Feb 3 15:22:02 2011 -0500 spelling/grammar fixes for manpages Several small fixes for spelling and grammar. Change-Id: I5c1cbc933cd683f997b8bb649408d57d84a110f2 Reviewed-on: http://gerrit.openafs.org/3890 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad05600d86d6737f55d7b785bc7c503c4a45be00 Author: Ken Dreyer Date: Wed Feb 2 11:49:31 2011 -0500 spelling/grammar fixes for vos_clone manpage Small spelling/grammar fixes for the vos_clone manpage. Change-Id: If312799b9e95476a1de2d386e6d51cd800c7e069 Reviewed-on: http://gerrit.openafs.org/3879 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ba51b43e3558058b949ccc5de1d4559e4caf9d9b Author: Andrew Deason Date: Mon Jan 31 15:00:09 2011 -0600 Rx: Do not stop keepalives on ACKALL receipt We need to still keep sending periodic keepalives after receiving an ACKALL, since the call is not done yet. ACKALLs can be received when the peer has received all data from us, well before the call has finished. This is particularly noticeable for long-lived calls that have little data transfer, such as AFSVolForward and AFSVolForwardMultiple. This reverts commit b1549f29a9515de09d4a64bfb28bf5afdfee2615, which was intended to be part of a fix for RT 20727. FIXES 128848 Change-Id: I319e6e95d699ea87ecc72888452b5e1e6fcd88b0 Reviewed-on: http://gerrit.openafs.org/3876 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c15468e2605446fa89e351131ba429a360d823f8 Author: Andrew Deason Date: Mon Jan 31 11:18:39 2011 -0600 afsd: Do not check for /afs if -nomount If -nomount was passed, we don't try to mount /afs. So, there is no reason to require its existence. Change-Id: Id426f345b94de8f2d673af62fe14f803d1c77752 Reviewed-on: http://gerrit.openafs.org/3822 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit efe4a20c46c73c39bd979437956beddcd3057bc3 Author: Jeffrey Altman Date: Mon Jan 31 11:43:39 2011 -0500 Windows: No NCBRESET when probing Loopback after start The Netbios NCBRESET command resets all of the Netbios state associated with the LAN adapter including the name bindings. In response to a detected LAN adapter IP address change, the smb_LanAdapterChange() function is called to determine if any Netbios LAN adapter bindings that were in use or should be in use by afsd_service were altered. As part of the check, lana_GetUncServerNameEx() is called which in turn calls lana_FindLoopback() which in turn issued a lana_IsLoopback() for each LAN adapter with the 'reset adapter' flag set to TRUE. Calling lana_IsLoopback() with 'reset' equal TRUE was fine when lana_GetUncServerNameEx() was only called from smb_Init(), but it is not fine when called after the service is processing calls. By resetting the adapter the binding of the netbios name "AFS" (or "-AFS") is removed and all outstanding calls are canceled. If the SMB redirector attempts a reconnect during the window before NCBADDNAM is called to re-bind the name, a negative cache entry will be placed in the netbios name lookup table that will prevent the SMB redirector from connecting to the client for several minutes. If the environment is one in which frequent IP address change events are triggered, it is possible that the SMB redirector will never be able to reconnect to the service. This patchset adds a flag, LANA_NETBIOS_NO_RESET, to the lana_GetUncServerEx interface which permits smb_LanAdapterChange() to avoid the undesirable reset. This negative flag was selected in order to avoid changing the current default behavior as the lanahelper library is used by out of tree installers and it is preferred that OpenAFS avoid breaking them unnecessarily. Change-Id: I094af7b342d27c65025235888705af8af1a7d56e Reviewed-on: http://gerrit.openafs.org/3821 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d12d2c08eef5b2bffccefac61465b7d4e40bba9f Author: Derrick Brashear Date: Mon Jan 31 15:07:45 2011 -0500 evalmountdata: put back colon in .:mount syntax only if we removed it we looked for a set character (not NULL) at cpos before, instead of looking for a non-NULL pointer. fix it. Change-Id: Iaa370980b6482f1c50e11f161e3208c039043a6f Reviewed-on: http://gerrit.openafs.org/3874 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 66bd7cf95ead1c27d81a25f4ca75b49ec173c136 Author: Simon Wilkinson Date: Sun Jan 30 20:54:30 2011 +0000 tests: Fix auth/superuser-t.c to work on Linux Fix the superuser tests so that they can be run on Linux. This requires explicitly including sys/wait.h so we can use waitpid, and changing some initialisation ordering so that we initialise the RX library before we try and fake an rxkad token. Change-Id: I8439ff6211a50c749ea22819e2d836409a64d2ad Reviewed-on: http://gerrit.openafs.org/3776 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60eff137a99ed7d9d5e70966c6f86425ae93b82b Author: Simon Wilkinson Date: Sun Jan 30 18:35:28 2011 +0000 bozo: Fix linker problem on Linux Some unconnected changes break the Linux linker when faced with this library list. librx is included too early, and liblwp isn't included after the second inclusion of librx. Reorder the library list to fix this problem, and so it matches the library order in the rest of our modules. Change-Id: Iba19111f613c70c8a6e66539b437a99d58faf7f4 Reviewed-on: http://gerrit.openafs.org/3775 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c8b0c9ca9478851ea35034f0fcaf01e1583c7b28 Author: Simon Wilkinson Date: Sun Jan 30 19:11:57 2011 +0000 Windows: Install rx_atomic.h Install the rx_atomic.h header into the build-wide header directory, so that modules other than RX can make us of it. Change-Id: Id3c3d0c486412942fb0772d7a8cf5d2fc1bf8876 Reviewed-on: http://gerrit.openafs.org/3774 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c0254b5652bff52ba6c13546beda323d8ed1bb88 Author: Simon Wilkinson Date: Fri Jan 28 15:20:25 2011 +0000 Unix CM: Move kernel crypto include files Move the crypto include files which are used for kernel builds into the hcrypto directory where they logically belong. Change-Id: Ic904e63e48d09e6a2049f4e1c4433980ecf0fa1e Reviewed-on: http://gerrit.openafs.org/3767 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 67195401c915b23e092f98c89ab5f5580a9cf3f6 Author: Jeffrey Altman Date: Sat Jan 29 23:24:16 2011 -0500 Windows: out of order locks cm_CheckCBExpiration The recent refactoring of cm_CheckCBExpiration introduced a lock ordering error between the cm_scache_t rw lock and the cm_scacheLock. This patchset fixes the error by dropping the cm_scacheLock as each cm_scache_t is being processed. Change-Id: Ib9e45abc5a43ca550d4a2a7923e3b30017e9fbf9 Reviewed-on: http://gerrit.openafs.org/3773 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d8a2291c06b6c7ec86b5556ff742c4afb7d28736 Author: Simon Wilkinson Date: Fri Jan 28 15:01:21 2011 +0000 aklog: Use correct CFLAGS The aklog Makefile was setting XCFLAGS, but then not actually using them which meant that we never used the correct include path for the Kerberos libraries, or defined ALLOW_REGISTER Change-Id: Iae573bc216b42bdf9aa49e9f5f42a883e08b6265 Reviewed-on: http://gerrit.openafs.org/3766 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 299e942ae98dfea3a4804c724e5d440715974e0c Author: Rod Widdowson Date: Fri Jan 28 16:49:03 2011 +0000 Do not compare an FD_t < 0 FD_t is an abstract type. Invalid file decriptors are == INVALID_FD. In most places this module does the right thing. Fix the last stragglers where it is testing as less than zero. Change-Id: I9ae3db8775ce69da070a4ebef5a532e1db035977 Reviewed-on: http://gerrit.openafs.org/3768 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 52556d50298e4a636f07e9a3cf0b6557c882c82d Author: Marc Dionne Date: Tue Jan 25 18:18:56 2011 -0500 linux: 2.6.38: Make d_revalidate RCU-walk aware Signal to the vfs that we don't support path RCU walk in d_revalidate. It will call back in non-RCU mode. Change-Id: I15d0d30131b205a38577666122b067807282a7cd Reviewed-on: http://gerrit.openafs.org/3759 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 08bb83d95027bb3ac68834d12b72bdc647fa24a9 Author: Marc Dionne Date: Tue Jan 25 17:17:21 2011 -0500 linux: 2.6.38: New d_op handling In 2.6.38, the super block structure has a new field to hold the default dentry ops. The vfs will automatically set it for new dentries in most cases. Set s_d_op to our set of operations, and omit setting the dentry ops where the vfs will already do it (and where new locking rules prohibit it). Change-Id: I9d738bdd528577d0a7ccd307246b5e935379c84d Reviewed-on: http://gerrit.openafs.org/3758 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 54fb96d2b6517ae491fd7a7c03246850d29156d5 Author: Andrew Deason Date: Thu Dec 2 17:13:17 2010 -0600 RX: Avoid retrying calls on busy channels When we receive an RX_PACKET_TYPE_BUSY packet, we currently ignore it. This is a problem when the server has a long-running call on that same call channel that we don't know about, since we will then keep retrying the call on the same channel and keep getting RX_PACKET_TYPE_BUSY responses. Try to avoid this by returning the RX_CALL_TIMEOUT error when we get a BUSY packet and there are other free call channels available on the conn. When the application gets the error and retries the call, we avoid using the same call channel again where possible. When all of the call channels appear busy, we revert to effectively the old behavior of retrying the call on the same channel until we get an RX_CALL_DEAD (or similar) error. FIXES 128671 Change-Id: I29b84aa36dcc856528c30d26811e5d6c4b78a1ca Reviewed-on: http://gerrit.openafs.org/3431 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 29ef47dfab86f7b226e0518b1365c27a8eb5126f Author: Heimdal Developers Date: Thu Jan 27 12:18:44 2011 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 8ce821c38744b30e226ff024f675668b991b984d (switch-from-svn-to-git-1998-g8ce821c) Upstream changes are: Asanka C. Herath (2): Revert use of backslash as an escape for double quote in config strings Condition roken's ssize_t definition for compatibility Love Hornquist Astrand (1): don't undefined SLIST Change-Id: I8855e060e88008f95eb2b24b029843081702fc04 Reviewed-on: http://gerrit.openafs.org/3761 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 962a95c21cc82a8bbb1dc1233c91acd7236fc8e4 Author: Jeffrey Altman Date: Wed Jan 26 20:10:57 2011 -0500 Windows: Correct cm_volume locking cm_volume_t flags was used for two categories of flags. The first protected by the cm_volume_t->rw lock. The second protected by the global cm_volumeLock. Separate the flags field into two afs_uint16 fields and break the flag space into FLAG and QFLAG. Add assertions to the volume LRU functions to ensure that they are always called with cm_volumeLock write-locked. Correct two locations where cm_AdjustVolumeLRU() was called read-locked instead of write-locked. Change-Id: I7991b995a3c981cd5d08d9cbba09badc81518a5a Reviewed-on: http://gerrit.openafs.org/3760 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5817a13b84496c087b350be50c17a8b0f9aac9d5 Author: Andrew Deason Date: Tue Jan 25 10:46:38 2011 -0600 vol-salvage: Only delete bad vnodes during !check In SalvageIndex, if check is true, we're only supposed to check for consistency and not actually change anything (this is enforced by an assert later on). The check for vnode magic consistency breaks this assumption, and just always fixes the vnode. Change this so we just error out if check is set, and the vnode magic is wrong. Change-Id: I9e2d3bd5e9e340a9b2ac66d70d52aa110b512561 Reviewed-on: http://gerrit.openafs.org/3756 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 14f5466eeea8cc088d64c6f270c05be457a01cfe Author: Derrick Brashear Date: Tue Jan 25 13:32:38 2011 -0500 MacOS: fix SetFile call in growlagent makefile somehow this got corrupted earlier. fix it to use the right arg. Change-Id: Ic597412819a9186d7b4b0b0c7e93e7c75b9a979a Reviewed-on: http://gerrit.openafs.org/3755 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5fe04739e0407079a0439f28c6aaaa86d5399e71 Author: Jeffrey Altman Date: Thu Dec 2 00:36:58 2010 -0500 Windows: cm_GiveUpAllCallBacksAllServersMulti() Implement a multi_RXAFS_GiveUpAllCallBacks version of cm_GiveUpAllCallBacksAllServers() and use it in place of the non-multi version. Change-Id: I6d630ab7a5cf3a3434d088a9e8cde046b541cd3f Reviewed-on: http://gerrit.openafs.org/3648 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4f838b03bbf9ea0e1ede8a188ea6dde3efb4e231 Author: Rod Widdowson Date: Sun Jan 23 14:29:51 2011 +0000 Windows: fix parameters and return value from nt_seek SetFilePointerEx takes specific values (FILE_BEGIN/FILE_CURRENT/FILE_END) whilse fseek requires SEEK_SET, SEK_END, SEEK_CUR. It turns out that these overlap, but we should not let that pass unchallenged. SetFilePointerEx returns nonzero for success zero for failure. fseek returns the other way around. Neither of these changes currently matter, but we should fix them. Change-Id: Ib31cf6265fa1e714232ff0d2e099c657e41f17e9 Reviewed-on: http://gerrit.openafs.org/3746 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6d2636b886789f2ddc6374c6b7e58ccd28d518aa Author: Rod Widdowson Date: Sun Jan 23 10:59:28 2011 +0000 Windows: read and write take void* buffers, open takes a const char* nt_read and nt_write were defined to take a char* buffer which was then cast to a void *. Meantime every call of OS_READ and OS_WRITE were casting to a char*. Equally every call of OS_OPEN was passing down a const char*, causing warnings. This checkin fixes this: nt_read : char* to void* nt_write: char* to const void* nt_open char* to const char* Change-Id: Id4e138b9d347e1a9f35241e162a105d5f462b168 Reviewed-on: http://gerrit.openafs.org/3744 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 42c5806599c1df65ee8ec1272f691df30ea44d4c Author: Antoine Verheijen Date: Mon Jan 24 00:38:03 2011 -0700 OpenBSD: Eliminate complaint about built-in malloc. With OpenBSD 4.8, OpenBSD now uses gcc 4. With its new defaults, the OpenAFS compile of the kernel module now complains incessantly about the conflict between the built-in malloc versus the kernel version (which has extra parameters). Therefore, set -fno-builtin-malloc when compiling the kernel module to remove the noise since the differences can't be reconciled otherwise. Change-Id: I7e28e6275ca90f73a8d1f65d82f1ccf2cc3a0ead Reviewed-on: http://gerrit.openafs.org/3751 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e1b0a95352e2e6aa312a526ffcc8a2f77a8fb7df Author: Antoine Verheijen Date: Mon Jan 24 00:34:56 2011 -0700 OpenBSD: Remove user.h from dir.c for OpenBSD 4.8 OpenBSD 4.8 no longer needs to include h/user.h in dir.c and it's presence now gets in the way of the compile so remove it. Change-Id: Ie270f94db69f344c5c1a3942db395dbe3a47d5e9 Reviewed-on: http://gerrit.openafs.org/3750 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e4660dd8cfb314971224dac5d1d13426d56494dd Author: Antoine Verheijen Date: Mon Jan 24 00:17:46 2011 -0700 OpenBSD: curproc has moved in OpenBSD 4.8 With OpenBSD 4.8, curproc has moved from h/proc.h to h/systm.h. Fix rx_event.c to reflect this change. Change-Id: I38d4676d445bfafa47f2ae973d789d0b9f6a687a Reviewed-on: http://gerrit.openafs.org/3749 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit be0e9fb703d9ca0ae17f1117cd53796f82d7fb30 Author: Antoine Verheijen Date: Mon Jan 24 00:16:02 2011 -0700 OpenBSD: Add support for OpenBSD 4.8 Add param headers and other config info for OpenBSD 4.8 support. Change-Id: I3af37dd79260d29bb7f3793c9a965bb84faab31f Reviewed-on: http://gerrit.openafs.org/3748 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 40497fa667d15aaaa8f6befdc45cff40cc544616 Author: Rod Widdowson Date: Sun Jan 23 14:32:04 2011 +0000 Windows: remove unused label in ntops.c The label 'retry' in nt_open is not used and was causing a warning. Remove it. Change-Id: I964d954e4f9cdb672c689a6e757a5f62bea8f65c Reviewed-on: http://gerrit.openafs.org/3747 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ffb0cdcc91d86f6e7b62561aebe6dcb722c3d768 Author: Rod Widdowson Date: Sun Jan 23 12:04:59 2011 +0000 Windows: remove faulty assumptions about device names in vol-salvage The implementation has an assumption that all disk volumes have an object name of \Device\HarddiskXXX (where XXX is a number). This is wrong since the name is purely a convention and since about WXP they have been called \Device\HarddiskVolumeXXX. Either way it is spurious to assume the format and then try to compare the XXX. This change just compares the strings. This is done in a case insenstive manner which is the safer option. It is quite feasible, but very unlikely that someone will uses 'case sensitively different' object names. Change-Id: Ifa91c88f2b17f747f30541b8833b722cf5993e48 Reviewed-on: http://gerrit.openafs.org/3745 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f60bca943f7bc6352a5f7beedbb7ca47559f3513 Author: Jeffrey Altman Date: Fri Jan 21 20:13:45 2011 -0500 Windows: more exports afsauthent.dll pr_SIdToName afsconf_GetExtendedCellInfo afsconf_UpToDate required for new Explorer Shell functionality Change-Id: I085d32b9786d9bf26d527cc3dd49c2d51ab1cb56 Reviewed-on: http://gerrit.openafs.org/3739 Tested-by: BuildBot Reviewed-by: Stefan Kueng Tested-by: Stefan Kueng Reviewed-by: Derrick Brashear commit de7af90fb8a1a132fb44fcc3d732fb593a45f6db Author: Jeffrey Altman Date: Sat Jan 22 12:15:03 2011 -0500 Windows: log and invalidate invalid dir pages If when parsing a directory page in cm_ApplyDir the consistency checks fail, log a message and invalidate the page in case it was a transient failure. Change-Id: Iab690cd876a717fbdef30fb78e4ed559fa7e0a5a Reviewed-on: http://gerrit.openafs.org/3742 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cd6bd75d1c97ce87ab1597d80fcd3cee2ea18825 Author: Antoine Verheijen Date: Fri Jan 21 09:25:22 2011 -0700 OpenBSD: Make OpenBSD 4.7 param headers consistent OpenBSD follows the policy of using a separate common param file (post 1.4.x). However, when introducing support for i386 OpenBSD 4.7, this was not done and a single param config header file was created instead. This patch changes the param files for OpenBSD 4.7 so that they are consistent with the other OpenBSD versions by using a separate common param header file. Change-Id: I9d828d2447a2d018eeea0fbe9f4c047ac819d209 Reviewed-on: http://gerrit.openafs.org/3725 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5fdc2679dc973fa45bf4b3bc7f21a527492868db Author: Jeffrey Altman Date: Thu Jan 20 02:15:18 2011 -0500 vol: fix CreateFile params nt_unlink and nt_open nt_unlink: when opening a file handle to assign delete on close status the caller must request DELETE permission. nt_open: make sure that DELETE permission along with FILE_SHARE_DELETE is requested if we wish to permit another CreateFile call in the future to assign delete on close. Change-Id: Ib971ecc098dbc5eb64dcbfed93c334397c9d8ac9 Reviewed-on: http://gerrit.openafs.org/3711 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Derrick Brashear commit d6528628b4dcadce47bb1a9244768ca3d43b0bf3 Author: Jeffrey Altman Date: Thu Jan 20 02:19:03 2011 -0500 vol: namei_ops improve readability; fix namei_create on Windows use NAMEI_SPECDIRC, NAMEI_INODESPECIAL, INVALID_FD and other preprocessor symbols in place of numeric constants. namei_create() on Windows must call namei_CreateDataDirectories() and retry if the afs_open() call fails with either ENOTDIR or ENOENT. modify namei_HandleToName() on Windows to make its decision process clearer. Change-Id: Ib1dfbaa3afe81f57685c95cdcae749c67cc95598 Reviewed-on: http://gerrit.openafs.org/3712 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit eb6f3a89a3f4da6d3de2d4ae34743014e4eb0fb2 Author: Jeffrey Altman Date: Thu Jan 20 02:06:12 2011 -0500 vol: add comment nt_unlink cannot with fopen handles On Windows, files opened via the CRT fopen or open POSIX compatibility functions cannot be marked for delete on close. Add a comment until such time as the use of fopen and open on Windows can be replaced. Change-Id: I9cec46bef332c981b2f64ba85e310783e3c71bc9 Reviewed-on: http://gerrit.openafs.org/3707 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Rod Widdowson commit 55ca096adbaf0256c2a21d28060cbc667cf6b69e Author: Jeffrey Altman Date: Thu Jan 20 02:03:56 2011 -0500 vol: remove potential data loss warnings in vol-salvage.c afs_sfsize_t is not always the same size as 'int'. Avoid warnings by using afs_sfsize_t in the appropriate locations. Change-Id: I88f7458421c3a9c2081597e5481d352bd5a2927a Reviewed-on: http://gerrit.openafs.org/3706 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Rod Widdowson commit 01fc5d0577409c889ca5ad6f3bc1d624138922bc Author: Jeffrey Altman Date: Thu Jan 20 02:01:38 2011 -0500 vol: use correct file name base for temporary file Inconsistent use of temporary file name bases resulted in the temporary files never being deleted. Change-Id: I0be59282488bb2db0f1b7b5200df5bd6ac285711 Reviewed-on: http://gerrit.openafs.org/3705 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 089a3f5e8b0b00942cd0ccff5be7b4f671fcbf82 Author: Jeffrey Altman Date: Thu Jan 20 01:59:46 2011 -0500 vol: use OS_UNLINK instead of unlink Use OS_UNLINK in order to ensure that platform specific unlink functions are called. OS_UNLINK is unlink on Unix. Change-Id: Idcfc18345abe5532e9ebe97fc757d6f435c2af52 Reviewed-on: http://gerrit.openafs.org/3704 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 141aca818ef9e5a6af309edc9512cc5cfee38e90 Author: Jeffrey Altman Date: Thu Jan 20 01:56:33 2011 -0500 vol: fix namei_ListAFSSubDirs on Windows The directory level represented by 'dirp2' does not exist on Windows. Do not attempt to close the DIR object that was never opened. Remove unnecessary function prototypes. Change-Id: Ib6b27e52f0120115173cb04893092ba6f2da32fe Reviewed-on: http://gerrit.openafs.org/3703 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 259a0e886a29874420010544e33a789cac1692c1 Author: Jeffrey Altman Date: Thu Jan 20 01:51:26 2011 -0500 vol: use OS_DIRSEP in many more places For consistency use OS_DIRSEP and OS_DIRSEPC throughout the package. Change-Id: I7bb93b4fe7324492e71a6d303e2b74723aaefc5a Reviewed-on: http://gerrit.openafs.org/3702 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8bb5e291777a0439c7a15262bdbc70d8bd9cc4a6 Author: Jeffrey Altman Date: Thu Jan 20 01:45:29 2011 -0500 vol: fix _namei_examine_reg DELETE_ZLC usage replace 'i' with 'dirl' and assign the new variable a value before using it. Change-Id: Ia93b6c75154b6f2a9238f0e9c2881d6c79c36540 Reviewed-on: http://gerrit.openafs.org/3701 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 270e5c01784f6459dd3d1dec81b714a6d7f2baea Author: Jeffrey Altman Date: Thu Jan 20 01:39:11 2011 -0500 vol: make it clearer that SetOGM is not impl on Windows Separate the SetOGM function into two implementations to match the other OGM functions. Implement the Windows version as returning -1 always. In the future, the OGM functions could be renamed to express their purpose: saving and restoring the volume id and tag associated with a file. Windows currently encodes this information using the CreationDate and the file name but in the future this information might be stored in an alternate data stream. Change-Id: I7e60cceb4548b7ad3a1e045f390e7052fece4926 Reviewed-on: http://gerrit.openafs.org/3700 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 959a892afcc1f33871489912a8ea183fc7fca6c2 Author: Jeffrey Altman Date: Thu Jan 20 01:35:08 2011 -0500 vol: avoid double dir separators from addtoname The manner in which addtoname() is used can often result in double dir separators in path names. Check for it and avoid doubling the separator in addtoname() Change-Id: Ie33459bec3bcc93f81f13020cd35ed8c473b6ca5 Reviewed-on: http://gerrit.openafs.org/3699 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Rod Widdowson Tested-by: BuildBot commit 9e689e96099dba5227e62ea2c6069062daaac85a Author: Jeffrey Altman Date: Thu Jan 20 01:23:37 2011 -0500 vol: clear ih_synced before dropping lock in ih_reallyclose() clear ihP->ih_synced before dropped the IH_LOCK. ih_reallyclose() is already committed to performing the OS_SYNC() call. Failing to clear the ih_synced flag before dropping the lock permits another thread, the ih_sync_all() thread for example, to also conclude that it must sync the file. Change-Id: Icb928f7d2ec2342a57ed21b440ae0580c980e9d2 Reviewed-on: http://gerrit.openafs.org/3696 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6f39035c92713b08065bee28ffdf06c5fe32a971 Author: Derrick Brashear Date: Wed Jan 19 22:56:12 2011 -0500 MacOS: don't allow krb5 at login when AD plugin authenticates if AD is being used to verify authentication (e.g. via builtin) don't allow get krb5 at login to succeed. since a helper does this we can't grey the option, but we can decline to act on it. Change-Id: I1f2bb891377c3ed9765f9e58141c77ec54d3ae22 Reviewed-on: http://gerrit.openafs.org/3690 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Tested-by: BuildBot commit 53dcb4a56ee690df8cc787e0cf1557d1484be13e Author: Jeffrey Altman Date: Thu Jan 20 02:14:14 2011 -0500 vol: nt_DriveToDev must return a value Change-Id: I27cf468e9d61542f9893367a18c2f7dd6854cdf6 Reviewed-on: http://gerrit.openafs.org/3710 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1ad22ed7e14d1ed643add0dbf80c82b96ae69fc8 Author: Jeffrey Altman Date: Thu Jan 20 02:11:57 2011 -0500 vol: nt_open should not create missing directories Revert the prior change that added directory creation to nt_open(). nt_open() should fail and the caller should create the directories. Failure to do so results in an incomplete tree which confuses the salvager. Change-Id: Ieb2a05baada2531dad1869e95823fe2006bdc2c6 Reviewed-on: http://gerrit.openafs.org/3709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3c25ae062a30c83f6dfb388f31878555d6cb63d7 Author: Jeffrey Altman Date: Thu Jan 20 02:09:44 2011 -0500 vol: Make ntops functions 64-bit capable Add 64-bit offset and length support to ntops functions. Change-Id: I1804d49df344839598c39084b7763cec4100c8c7 Reviewed-on: http://gerrit.openafs.org/3708 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 48508a202129be6e56beaec56314cc13d68d69f5 Author: Jeffrey Altman Date: Thu Jan 20 01:33:27 2011 -0500 vol: avoid defining unused struct on windows namei_ogm_t is not used on Windows. There is no equivalent to owner/group mode. Change-Id: Ib0675f106bf5e77b006ebe5eae5d67ee232313e0 Reviewed-on: http://gerrit.openafs.org/3698 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5184261cde260f1aaf67a7cb2fea1b9ba3a4b2b0 Author: Jeffrey Altman Date: Thu Jan 20 01:31:41 2011 -0500 vol: indent cpp definitions; add NAMEI_SPECDIRC Change-Id: Id6d962a7c9e78f6a4b4bb7a6250e77efd40cc3c4 Reviewed-on: http://gerrit.openafs.org/3697 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fe9285f77a680b6e6d0995166f3c384aac676a8c Author: Jeffrey Altman Date: Thu Jan 20 01:20:05 2011 -0500 vol: remove [UN]LOCKFILE data loss warnings on Windows Cast to DWORD since the results of the mask and shift are guaranteed to be 32-bit. This avoids sixteen warnings. Change-Id: Ifdb9356e207b4b8791b5923985a70efeb457edb1 Reviewed-on: http://gerrit.openafs.org/3695 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6bf5f463c7957e71e15f6b98cdb3afb24f2fbe6a Author: Jeffrey Altman Date: Thu Jan 20 00:57:03 2011 -0500 Windows: build mtafsdir.lib and use it The executables built in src/vol are pthreaded. Therefore, they require a pthread safe version of the src/dir objects. Instead of building the dir object files in yet another directory, create a mtafsdir.lib in src/dir and use it in src/vol, src/tviced and src/tsalvaged. Change-Id: I50017bd56ec741af1ff3fc1dd39208e610369088 Reviewed-on: http://gerrit.openafs.org/3693 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Derrick Brashear commit bc674908ca5100a0734069a019d9a31788dd52fb Author: Toby Burress Date: Wed Jan 19 23:32:01 2011 -0500 FreeBSD: properly identify the rxk_Listener so that msleep() returns afs_osi_Wakeup() was not being called with the proper argument, causing afs_osi_Sleep() to fail forever while waiting for rxk_Listener to wake up. Change-Id: I1b650c57ae507987359d0cb230400d3d23984cfa Reviewed-on: http://gerrit.openafs.org/3692 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 02a1eb4aae5e8df97fbb6dbcb9845e37195a7dbd Author: Antoine Verheijen Date: Wed Jan 19 16:06:03 2011 -0700 OpenBSD: Change code optimization setting Change the optimization level set when optimization is enabled during build from the sytem default of '-O' to '-O2' for OpenBSD systems. Change-Id: I20962c124da5426409638453e1efdd37b4e5f393 Reviewed-on: http://gerrit.openafs.org/3689 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b932375ecca3fefc1190a8d23d5c24ae538cfae Author: Antoine Verheijen Date: Wed Jan 19 15:57:25 2011 -0700 Move check for unspecified CFLAGS in configure.ac configure.ac provides a check to see if the user has specified CFLAGS and if not, it sets CFLAGS to a blank (not NULL) string so that the resultant configure script does not set '-g' and/or '-O2' by default. This check occurs after AC_USE_SYSTEM_EXTENSIONS in the configure.ac file. However, on at least some systems, such as OpenBSD, AC_USE_SYSTEM_EXTENSIONS expands to include the code that configure uses to set '-g -O2' so the check has no effect and '-g' or '-O2' can not be turned off. This patch moves the "CFLAGS specified" check so that it precedes the AC_USE_SYSTEM_EXTENSIONS directive, in which case everything works. Change-Id: I68ed5a3c5129a55f7dcd7413c93f35cc7cb14b9c Reviewed-on: http://gerrit.openafs.org/3688 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a5441776b639cd32c2271917dd55fa491f9e512f Author: Antoine Verheijen Date: Wed Jan 19 14:14:47 2011 -0700 OpenBSD: No ruid/rgid in cred structure. OpenBSD does not retain ruid or rgid values in the afs_creds_t structure (ucred). This patch, therefore, removes any references to them in the afs.h file. Since no attempt is made to actually use the removed code (or macros) on OpenBSD, at least at this time, this does not result in any real functional change. Change-Id: Iaceb792f0c39ba6f7caa205bc66af16a23193549 Reviewed-on: http://gerrit.openafs.org/3687 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 646a6a41698da45550a3cb899f104d9e3e548ea4 Author: Antoine Verheijen Date: Wed Jan 19 13:43:21 2011 -0700 OpenBSD: Don't call non-existent routines in osi_vfsops.c The OpenBSD version of osi_vfsops.c makes calls to routines that do not exist in the system and aren't needed. In the past, these calls were wrappered by an #ifdef for AFS_DISCON_ENV which was never defined. That #ifdef is now gone so this patch removes the calls to these routines, which are remnants of the NBSD origins for this particular code. Change-Id: I8cc97fde8cd5cf6c241dd3074c0f97b5d3e2ccfd Reviewed-on: http://gerrit.openafs.org/3686 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 5ff6c88fcc0c35843e91dc45e4bd297efd0d4445 Author: Antoine Verheijen Date: Wed Jan 19 13:30:24 2011 -0700 OpenBSD: Fix parameters in call to afs_close() OpenBSD passes an extra parameter in a call to afs_close() in its OS-specific code. It went undetected in the past but now causes compile headaches because of more accurate prototypes in the header file. This patch removes the offending extra parameter (which never actually caused any problems because it was the last one in the parameter list). Change-Id: I6bde0c6c98867c47a574fa5e3e01ec560deb17b0 Reviewed-on: http://gerrit.openafs.org/3685 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d8e3392b77d72f6d05b94fa9c48813ceed5980d Author: Antoine Verheijen Date: Wed Jan 19 13:13:09 2011 -0700 OpenBSD: Install no-NFS version of libafs The build process for OpenBSD builds the no-NFS version of the kernel module but, at install time, the NFS version is subseuquently built and installed while the no-NFS version is ignored. The NFS version does not load and is not needed in OpenBSD so this patch makes sure that the no-NFS version is installed and used. Change-Id: I1d07334121911c22aea1f6d157f34e1b40e5b780 Reviewed-on: http://gerrit.openafs.org/3684 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9743a644adb37230eae3b11ad3e4a1e8e7a1ebce Author: Derrick Brashear Date: Wed Jan 19 14:58:59 2011 -0500 MacOS: panic decoder should check for unloaded kexts if the openafs kext was unloaded from under us, try to handle that. Change-Id: I6a5e56da3c4b6290b71dd10e919a0f374998338e Reviewed-on: http://gerrit.openafs.org/3683 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d5367b5f1494ca2cf09f62d7f2ffa6304e38a648 Author: Antoine Verheijen Date: Wed Jan 19 11:52:10 2011 -0700 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 Reviewed-by: Derrick Brashear commit 1c7420422313375f7132479c588f09eabac73c70 Author: Antoine Verheijen Date: Wed Jan 19 11:20:21 2011 -0700 OpenBSD: Remove macros definitions for afs_osi_Alloc et al. The afs_osi_Alloc, afs_osi_Free, etc. routines are now defined in afs_osi_alloc.c so the macro definitions defined by osi_machdep.h for OpenBSD are no longer needed and, in fact, interfere with the compile. Remove them. Change-Id: I98a261b5cd5e44136e4dde677f86d90212b0cfba Reviewed-on: http://gerrit.openafs.org/3681 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 26f0ddd0cd3c7c34880e8717d59ee1d653036455 Author: Jeffrey Altman Date: Sun Jan 16 16:42:15 2011 -0500 volser: select() cannot be used to sleep on windows On Windows must use Sleep() instead of select() with no fd_set parameters. Change-Id: I693718c74dd9be0b4eb58ec26afac0882845e71c Reviewed-on: http://gerrit.openafs.org/3675 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason commit 8895fe0fab04d49f8c2b279d915c5f292b55c2be Author: Jeffrey Altman Date: Sun Jan 16 15:49:02 2011 -0500 Windows: refactor cm_CheckCBExpiration multihomed cm_CheckCBExpiration() is refactored to make it easier to read the decision process. cm_CheckCBExpiration() determines when a callback is no longer usable and as a result the object status info should be discarded. The windows cache manager preserves status info past callback expiration if all of the sources of a volume became inaccessible prior to the callback expiration time. The cache manager was improperly preserving the status info for objects when the callback was issued by a multi-homed file server when only the interface that issued the callback is down. A separate cm_server_t object is used to represent each file server interface. When one interface goes down and others are left up, the cache manager will now replace the down cm_server_t reference for one that is up. This substitution is performed as a side effect of computing the effective downTime in cm_CBServersDownTime(). Change-Id: Ia6336a3bdd0219497fd47460accddd0cd2629f00 Reviewed-on: http://gerrit.openafs.org/3674 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f25cbdf09ff890846a68f619ccb1d00ab2b3c7a8 Author: Jeffrey Altman Date: Fri Jan 14 00:22:39 2011 -0500 Windows: use cm_ServerEqual() in cm_Analyze() In cm_Analyze() when processing VNOVOL, VMOVED or VOFFLINE errors do not use pointer equivalence as the test to determine if a server is affected by the error. Use cm_ServerEqual() instead. Fix cm_ServerEqual() to work even when both cm_server_t objects are not UUID aware. Change-Id: Icb83ba77984075216a44cdeba689bc05e98ed92a Reviewed-on: http://gerrit.openafs.org/3659 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7c0d4b331e8d1f962aae5328490944182311a569 Author: Rainer Toebbicke Date: Tue Jan 18 14:56:17 2011 +0100 Re-enable rx connection hard timeout A missing "conn->" in rxi_CheckCall prevents checking hard connection timeouts. Change-Id: I893a1ba71957e2a830029dfc4e3ac51fa461d6ca Reviewed-on: http://gerrit.openafs.org/3677 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 802899aac022ab537159f3cd4435d072b5edc4be Author: Andrew Deason Date: Mon Jan 17 12:35:46 2011 -0600 vol: Windows requires binary fmode for salvaged Same as 98f633c60d20834cee0bbc0770a3146b06642a59, but for the salvageserver. Change-Id: I961e31fd6a2a6e08e3bd4381793195bb1e388e7c Reviewed-on: http://gerrit.openafs.org/3676 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 038264b4d62803bd71ac0d7706b56b7f18f31dca Author: Jeffrey Altman Date: Sat Jan 15 11:49:54 2011 -0500 vol: use OS_UNLINK() instead of unlink() OS_UNLINK provides the platform specific mechanism for unlinking objects. Change-Id: Id0a1f50e57fe3c21c46e137e86507bf28bafa046 Reviewed-on: http://gerrit.openafs.org/3670 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a65ea91e2a6ab3870fe2e9e1a17c82e2a62c2910 Author: Jeffrey Altman Date: Sat Jan 15 11:54:40 2011 -0500 vol: construct proper VolDir path on Windows namei_HandleToInodeDir initializes the path name with the nt_drive value. Therefore calling addtoname(name, name->n_drive) produces the invalid path "D:\D:\\Vol_.....". Remove the unnecessary addtoname() call. Change-Id: I4933d3f4fda76050eecde3caeaa6bc30011cd974 Reviewed-on: http://gerrit.openafs.org/3672 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bae39a9aa3738878708f4c67d17750beca4d6dca Author: Jeffrey Altman Date: Sat Jan 15 11:52:45 2011 -0500 vol: fdHandleAllocateChunk should init all fields fdHandleAllocateChunk() failed to initialize the fd_ihnext and fd_ihprev fields. Change-Id: I605b6fc3c4cefe6e5c4169762fbd6047fb895b70 Reviewed-on: http://gerrit.openafs.org/3671 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 47e2149335066883450cb2a751bd057dcd1af79d Author: Jeffrey Altman Date: Sat Jan 15 11:47:47 2011 -0500 vol: use OS_DIRSEP when constructing paths Do not assume that / is the directory separator when constructing paths for internal consumption or log messages. Use OS_DIRSEP or OS_DIRSEPC as appropriate. Change-Id: Ifed618dfa30f2aee27de1ef57de5e504d6701d4d Reviewed-on: http://gerrit.openafs.org/3669 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ecf55b063e7c9bbbac426831dfe504c1db92bb52 Author: Jeffrey Altman Date: Sat Jan 15 11:44:08 2011 -0500 volser: use OS_CLOSE() instead of close() Use OS_CLOSE() instead of close() when closing vol package allocated file descriptors. On Windows, close() != nt_close(). Change-Id: I5737c0e4e83534bd5f4183dde195c4b8091474c1 Reviewed-on: http://gerrit.openafs.org/3668 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 05d5f012e0be9be1c2c82871a75ac76d437b9688 Author: Jeffrey Altman Date: Sat Jan 15 11:39:39 2011 -0500 vol: initialize FdHandle_t stack objects In namei_create() a temporary FdHandle_t is allocated on the stack but was never initialized. Depending on what prior data was on the stack the FdHandle_t could result in subsequent operations failing in unpredictable ways. Change-Id: I6246930adc87cf84ad9c0913cda2d00e6f851bc1 Reviewed-on: http://gerrit.openafs.org/3667 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 714b3ffb2258b316621415c2e81372dc48b4119d Author: Jeffrey Altman Date: Sat Jan 15 11:07:19 2011 -0500 vol: Fix ntops to provide expected semantics nt_open() can be asked to open a file with a path containing directory components that do not yet exist. Modify nt_open() to automatically create directories if necessary. nt_read() and nt_pread() should not treat partial reads due to reaching EOF as an error. Instead, return the bytes read. Change-Id: If088393a842d6f6d7ad901345e94e92d23f2321c Reviewed-on: http://gerrit.openafs.org/3666 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 98f633c60d20834cee0bbc0770a3146b06642a59 Author: Jeffrey Altman Date: Sat Jan 15 11:04:48 2011 -0500 vol: Windows requires binary fmode for salvager In order for salvager to work properly it must read and write data in binary mode. On Windows, this is accomplished by calling _set_fmode(_O_BINARY) to set the default mode for fopen(), etc. Change-Id: Ieb00222ceccb6f044453b60d288e2badf713e517 Reviewed-on: http://gerrit.openafs.org/3665 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e8e69d5b2c611df249fd613ed068fc030a0e30d1 Author: Jeffrey Altman Date: Sat Jan 15 11:01:55 2011 -0500 vol: fix OS_LOCKFILE/OS_UNLOCKFILE for Windows On UNIX the OS_LOCKFILE and OS_UNLOCKFILE macros return zero on success. Since Windows LockFile() and UnlockFile() return non-zero (TRUE) on success, negate the return value as part of the macro definition. Change-Id: Icb4c8555de9a16fdfddcaeb9ede28bbd401e76b7 Reviewed-on: http://gerrit.openafs.org/3664 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ac79869f62d667737ea0020218eb4dc90a731171 Author: Andrew Deason Date: Fri Jan 14 15:13:46 2011 -0600 RX: Pre-10 Solaris lacks atomic inc/dec The atomic primitives in Solaris before Solaris 10 lack atomic_inc_32 &co. Make things easier and just implement them in terms of atomic_add_32 &co when we are older than Solaris 10. Change-Id: I70c829ef969824efd7843df80bd48e98477a5574 Reviewed-on: http://gerrit.openafs.org/3663 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9cc9b0d618ba1c787a8a684077c1d2f205b8889c Author: Andrew Deason Date: Fri Jan 14 14:52:10 2011 -0600 RX: Include netinet/ip6.h before inet/ip.h Some older Solaris (at least some Solaris 8) requires netinet/ip6.h to be included before inet/ip.h, or the compiler chokes on some ipv6-related declarations in inet/ip.h. So, include it. Change-Id: Icabc32c093fab5e3442701b2ea6ae593d7fceb7e Reviewed-on: http://gerrit.openafs.org/3662 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2045653647fc2de451c9615f18316416de7e1657 Author: Andrew Deason Date: Fri Jan 14 14:00:14 2011 -0600 merge-pod: Be more compatible with older perl merge-pod works fine with perl 5.00503, if we eliminate the 3-argument invocation of open(). So, replace the open() calls with their 2-argument equivalent, and relax the version requirement a bit. Change-Id: Ibeda39f2620ab1056e2d42838833d140ec3c053f Reviewed-on: http://gerrit.openafs.org/3661 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3c91f1d88165dca085a26b87f2c0148e84e179d2 Author: Ben Kaduk Date: Thu Jan 13 20:16:44 2011 -0500 FBSD: remove vestiges of Giant We do not support versions of FreeBSD that used Giant to serialize access to vnode fields, and we always use the same locking (which really ought to be MPSAFE). Always set the MPSAFE flags as needed, and do not bother to call VFS_[UN]LOCK_GIANT which will never do anything for us. Change-Id: I973a24d43563f289d4a2baa6e067fbba72d17ed9 Reviewed-on: http://gerrit.openafs.org/3656 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a61a719d35cd6008f35c4f5cb8aaa83453d1d8c1 Author: Jeffrey Altman Date: Fri Jan 14 00:15:10 2011 -0500 Windows: fixup gettmpdir() Use InterlockedCompareExchangePointer for hostparse() instead of fudging it and leaking memory. If the max path length is MAX_PATH must allocate MAX_PATH+1. Change-Id: I9162188c78922202b40859249736a23beae60b3e Reviewed-on: http://gerrit.openafs.org/3658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e50cab06c4a5dad37b27f411dfd511130567726d Author: Jeffrey Altman Date: Fri Jan 14 00:13:49 2011 -0500 Windows: osilog param size is size_t The parameter size is size_t which permits pointers to be stored on 32-bit and 64-bit systems. Make sure we store it as size_t instead of truncating to long. Change-Id: I96aaf231eedef742095edf247dc1013e3d90257e Reviewed-on: http://gerrit.openafs.org/3657 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa3584a48f646f5384f0950d9a560226ac3a3460 Author: Andrew Deason Date: Mon Jan 10 17:13:15 2011 -0600 RX: No userspace atomic_ops in Solaris pre-10 The atomic_ops(3C) family of functions do not exist in userspace before Solaris 10. So, only use them for rx_atomic operations if we're on AFS_SUN510_ENV, or if we're in the kernel. Also, include for kernel code and for userspace. Although they are currently equivalent, they are documented as separate, and pre-10 lacks . Change-Id: Id71857efcd6460f8223302850b548754c19d076f Reviewed-on: http://gerrit.openafs.org/3652 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6edcb1830480ef55d9dcb8a3b4735c30d802cbe4 Author: Derrick Brashear Date: Wed Jan 12 16:45:57 2011 -0500 afsd: CellItems doesn't apply to memcache mode avoid a potential panic from passing a bogus path into the kernel for evaluation, in memcache mode. Change-Id: Iaa11eded2e8946207f7df9e77c3de1e5ff4f963e Reviewed-on: http://gerrit.openafs.org/3651 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d03eef7217be8f0b72f34ab023e69c976dea84d Author: Andrew Deason Date: Wed Jan 12 10:29:46 2011 -0600 SOLARIS: Include sys/varargs.h for kernel stdarg When compiling for the kernel, pre-10 Solaris seems to want instead of , as documented in the Solaris man pages. So include instead of where we need variable arguments (afs_warn.c). Change-Id: Id16453b1f7bb9f42d0cc9ca504ac64d04fb0b684 Reviewed-on: http://gerrit.openafs.org/3653 Tested-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8c541079573274d726180d3d9679c6a26cda84ea Author: Marc Dionne Date: Mon Jan 10 21:31:18 2011 -0500 Cache bypass: fix use of incorrect "states" Test and set the correct field for cache bypass flags. There was some confusion between cachingStates and the states associated with vcache entries in a few places. Change-Id: Iae957b6f838a44d75776e49662b4aba685800d19 Reviewed-on: http://gerrit.openafs.org/3637 Reviewed-by: Matt Benjamin Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 336256c7a0e7d54495a070895c9d8c2057168839 Author: Andrew Deason Date: Mon Jan 10 12:11:22 2011 -0600 LINUX: afs_linux_put_link is void The put_link callback doesn't return a value, so declare it as such. Change-Id: Icdc19de48747fdfbd3349b2ef0c2b51d5a369550 Reviewed-on: http://gerrit.openafs.org/3636 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8d157961e96ec6b504ea40dcef51fb4a8d61d371 Author: Stephan Wiesand Date: Sat Jan 8 17:13:27 2011 +0100 rpm: don't package files twice The LICENSE and two manpages were included in the main package as well as one of the others. Remove duplicate entries. Change-Id: I7626d758a65fe305f18e7cc9099d1fe1b4f86c6f Reviewed-on: http://gerrit.openafs.org/3628 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60322b46755d0bfedc239e3e9287f6ae625cd836 Author: Andrew Deason Date: Fri Jan 7 20:48:18 2011 -0500 git-version: Do not specify --ignore-submodules Only new git versions reognize the --ignore-submodules option to diff-index and diff-files. Do not pass this, to make git-version more likely to work across different versions, as we don't have any submodules in the tree anyway. Change-Id: Ic9dbd9ec5f332f36cec291fc3d324db14615f831 Reviewed-on: http://gerrit.openafs.org/3627 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9f584e811486da7129a61da554fae09029b0de67 Author: Jeffrey Altman Date: Sat Jan 8 12:21:23 2011 -0500 Windows: refactor buf_Get() to improve readability Refactor buf_Get() by using a switch() instead of a jumble of if() conditionals. Improve comments to make it clear that given the current use and implementation of cm_BufRead() from cm_dcache.c that created buffer pages will never be populated with actual data. Change-Id: Ib3f5778ae32f210127537e16ecc32e1598dbefc7 Reviewed-on: http://gerrit.openafs.org/3630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f58b17a6150f8d303b408f9eed27bf0e850ec580 Author: Jeffrey Altman Date: Sat Jan 8 12:19:07 2011 -0500 Windows: remove all refs to unused buf_GetNew() Change-Id: I09b87a2042efff1b5930ebe6e50a64379d592bc2 Reviewed-on: http://gerrit.openafs.org/3629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3f0c08ad93bf98fbe64d5714649d675712410cc9 Author: Tom Keiser Date: Wed Oct 13 01:16:25 2010 -0400 provide more verbose logging when VGetVolumeByVp_r fails FSYNC_com_VolOff() commits sepuku when VGetVolumeByVp_r() fails to return a heavyweight ref to the volume. This small patch provides more detailed debugging information so we have a better idea why VGetVolumeByVp_r failed. Change-Id: I9b8b6e734653701c4f35b458f4c4701a2b0d2d5e Reviewed-on: http://gerrit.openafs.org/2969 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9bb6b06c76802f8080c4c19b99efa7c6423f9021 Author: Jeffrey Altman Date: Tue Jan 4 11:18:25 2011 -0500 Windows: remove unused vars from cm_server.c Change-Id: Ia2e1d5ecbc5dbc349ac8e7bfcb63b42545f876f5 Reviewed-on: http://gerrit.openafs.org/3617 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3ab948769cae172d1bf16cb870f0ff2e7627bae6 Author: Jeffrey Altman Date: Wed May 12 11:27:17 2010 -0400 Windows: netidmgr_plugin move roken.h to afscred.h Due to historical issues with the MIT KFW headers the netidmgr plugin must define _USE_32BIT_TIME_T which alters the size of time_t in all C RTL data structures that include it. roken.h must be included after this definition in order for it to do the right thing in conjunction with the MIT KFW headers. This means that an exception to the rule that roken.h must be one of the first three files included in every source file in the tree must exist for this directory. In the netidmgr_plugin directory, afscred.h includes roken.h and afscred.h is the first header included in all other files. Change-Id: I11214e5eaac0144aaf04c3a21bb92d521d75c6e1 Reviewed-on: http://gerrit.openafs.org/3616 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 605b7c3baaeb7553cb2e150f1156eba6be04c1f8 Author: Jeffrey Altman Date: Mon Jan 3 21:07:10 2011 -0500 Windows: permit clean when switching platforms When switching between i386 and amd64 in the same build tree the "clean" make directive would fail due to NTLang.bat not having been built in the new platform's destination directory. Force NTLang.bat to be built as a dependency of cleanup and delete it at the end along with the version files. Change-Id: I49a44204c636ab9ad89be44d4fad20ed6050fdda Reviewed-on: http://gerrit.openafs.org/3615 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bf163cbebfec97b83c070d22fed1eabf7a2da629 Author: Simon Wilkinson Date: Mon Jan 3 10:47:30 2011 +0000 roken: Check for bswap16 and bswap32 defines Our imported roken.h provides definitions for bswap16 and bswap32, but configure doesn't check to see if those functions already exist. On operating systems where they do, and where the header containing them is included in our build, this results in compilation errors. Add a configure test for bswap16 and bswap32, which is complicated by the fact that they may be macros, or static inline functions, so a simple CHECK_FUNCS won't work. Change-Id: Iae3411bf4bb22af8cfd770e01026a28e1863e078 Reviewed-on: http://gerrit.openafs.org/3613 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 735f5b051521d047b18bef867042f59dc006098e Author: Simon Wilkinson Date: Sat Sep 11 12:53:07 2010 +0100 Unix CM: Don't blow up if we have non-rxkad tokens The legacy GetToken compatibility code assumed that we would always have at least one rxkad token for a cell, and segfaulted if we didn't. Just return as if we have no tokens if a cell doesn't have an rxkad token. Change-Id: Ica64882c1a64cf140ad6c277c70fbfb747ea6235 Reviewed-on: http://gerrit.openafs.org/3614 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c8fc94fb86255a2c5cbd1613b33e32ec3a4d3b21 Author: Simon Wilkinson Date: Mon Jan 3 10:40:56 2011 +0000 autoconf: Tidy up header includes Tidy up our list of header includes so it's easier to see what we're testing for. The list is now one-per-line, in alphabetically sorted order. Note that this won't affect our use of the default include set, as autoconf will already have tested for all of those before it starts this CHECK_HEADERS run. Change-Id: Iffc8c3bc7cbd56d87508ebdde38e61f8747d0501 Reviewed-on: http://gerrit.openafs.org/3612 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a0adc8cd6ef62deaef8c2861f8a94f23a007fc81 Author: Simon Wilkinson Date: Thu Dec 30 16:30:37 2010 +0000 auth: Move key related code to its own file Move all of the libauth code which does KeyFile management out into its own file, in preparation for a major rewrite. Change-Id: Id880136307cba726c04a003700ba70f3d74b297f Reviewed-on: http://gerrit.openafs.org/3611 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cfee25cdc885a5ad669b206ab4e96fa09d1c19a6 Author: Simon Wilkinson Date: Thu Dec 30 17:52:00 2010 +0000 libadmin: Don't use internal struct for key data The afsconf_dir structure should be regarded as private to the libauth library, which provides accessors for the commonly used parameters within it. Rework libadmin so that it uses those accessors when looking up key data. Change-Id: I9a623ccadba95622894931ee25319d3bcb019136 Reviewed-on: http://gerrit.openafs.org/3608 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e0efb936ffd012308e30e96c461cf720c2bd3bf0 Author: Simon Wilkinson Date: Thu Dec 30 17:56:36 2010 +0000 tests: Add more tests for auth KeyFile handling Add tests to make sure that we serialise updated KeyFiles to and from disk correctly, and that the restriction on 8 keys in a KeyFile is enforced by AddKey Change-Id: Iac5bf7157534879824da92ea58f1515672d59298 Reviewed-on: http://gerrit.openafs.org/3610 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d7a0615d838ac687f352f60690f60c4f97ae846 Author: Simon Wilkinson Date: Thu Dec 30 17:53:59 2010 +0000 roken: Export more snprintf symbols Export more of the snprintf symbols from librokenafs, so that we can actually make use of them. Change-Id: Ida347c516bec6444d26d0e148ffd781999f0b364 Reviewed-on: http://gerrit.openafs.org/3609 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 13ae3de3f6ce5de2395823ee5f862a863caf2e51 Author: Simon Wilkinson Date: Sun Feb 14 10:01:14 2010 +0000 Add "brief" option to rxgen Add a new -b option to rxgen that turns on "brief" output. This makes a number of changes to the data definitions produced by rxgen so they can be more easily used by the calling code. The changes are: *) Use the new struct rx_opaque structure for all opaque data definitions, rather than defining each as a unique structure. This permits moving opaque data between rxgen structures to be performed by simple assignment. *) Use anonymous structures for internal definitions. Currently rxgen also uses the field name as the structure name, which prevents the use of a field name more than once within a source file. *) Don't embed the structure name within the names of the elements within the structure. This significantly reduces the length of assignment code, and makes for more readable callers. Change-Id: I8cad7e6051f12238a77cf006b0854fb38b54f61a Reviewed-on: http://gerrit.openafs.org/2585 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b114faf52f3af0debadc1f045be6212084a70305 Author: Simon Wilkinson Date: Thu Dec 16 11:36:43 2010 +0000 rx: Implement rx_atomic_dec_and_read Add a function which decrements an atomic counter, and returns the result. This is essential for implementing reference counting. Change-Id: Ib173f078bcf117369a82f981d58124018648a71c Reviewed-on: http://gerrit.openafs.org/3581 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 50b1c161e8bed6ad3625b4156dc6481c77ecd866 Author: Simon Wilkinson Date: Thu Dec 16 11:35:54 2010 +0000 rx: Protect rx_atomic.h against multiple inclusion Add #ifdef guards so that rx_atomic.h can't be included in the same C file multiple times. Change-Id: Ic62287ce4a21b9efbfd9530e2517029a69217a56 Reviewed-on: http://gerrit.openafs.org/3580 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1879e1bce21918cecaee505656664be0fb6b8bce Author: Simon Wilkinson Date: Sat Jan 1 23:58:20 2011 +0000 auth: Don't crash if UserList contains bogus line If the first line of the UserList was bogus (caused ParseLine to return an error), then we would attempt to free the contents of an uninitialised identity structure, and crash. Initialise the structure so this no longer happens. Change-Id: I55074a5eb616ac48d8a278db2d8389d3b0e112a6 Reviewed-on: http://gerrit.openafs.org/3607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a7fb4262597c07ca5da9709df75a2007b92b222b Author: Simon Wilkinson Date: Sat Jan 1 23:51:18 2011 +0000 rx: Don't crash when emptying an empty identity In common with our other freeContents functions, freeing the contents of a structure which is already empty shouldn't crash. Change-Id: I93b54c0e450d2184c10575b50dadfd1471d43289 Reviewed-on: http://gerrit.openafs.org/3606 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 616763cd077fab807da21590bd9ad3b0b02ea844 Author: Vincent Archer Date: Thu Dec 30 11:34:28 2010 -0500 Windows: MIT license applies to parsemode() Vincent Archer grants permission to OpenAFS to re-license his MINIX contributions under the MIT license. A copy of the e-mail granting permission is located in OpenAFS RT issue 128805. FIXES 128805 Change-Id: I59774d14a0099f5a48dbc9dbf13157136b8c681f Reviewed-on: http://gerrit.openafs.org/3605 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b6576d8cb554af50dfe7b6d9b668bd35ff202a83 Author: Jeffrey Altman Date: Wed Dec 29 11:35:17 2010 -0500 Windows: buf_CleanAsync scp->fid == bp->fid If buf_CleanAsync or buf_CleanAsyncLocked are called with a non-NULL cm_scache_t parameter, that status object's fid must be the same as the associated cm_buf_t object. If not, the wrong locks will be held. If the cm_scache_t parameter is NULL and cm_FindSCache() returns NULL, it means that the cm_scache_t object associated with the bp->fid has been flushed from the cache. cm_GetSCache() must therefore be called to allocate a new status object for the FID. If the status object cannot be allocated, then any dirty data stored in the buffer will be discarded. Change-Id: Ie5d4eb8a1090d4b3c0753b7ddee2de0799485a2e Reviewed-on: http://gerrit.openafs.org/3604 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4e3207335771b78ff27a1f1c0755cdfcf78d7f30 Author: Jeffrey Altman Date: Tue Dec 28 14:39:47 2010 -0500 Windows: fs checkserver skip multi-homed up server Multi-homed file servers can be detected by comparing the uuid for the cm_server_t entries. If a server has at least one up interface, do not list it as being down in the "fs checkserver" response list. Change-Id: I718eeee3316d05a33a4af97ca6c7fd947db41f44 Reviewed-on: http://gerrit.openafs.org/3603 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e4b59c633962d7784485f8e2d4185edaf91bf23d Author: Jeffrey Altman Date: Wed Dec 22 23:23:48 2010 -0500 Windows: fs checkservers should list vldb as well The Windows fs checkservers has only listed offline file servers. Include vldb as well to match the Unix cache manager. Change-Id: I81b8e4a1a813fcd8f19e3dc58c75ef161795518c Reviewed-on: http://gerrit.openafs.org/3602 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 463b045b9fe4a412877c2a65f5deafb1442c1bf1 Author: Jeffrey Altman Date: Mon Dec 27 19:34:14 2010 -0500 vos: do not mix memory allocation methods ListVLDB mixed memory allocated with xdr_alloc() and memory allocated with malloc(). This is not safe to do since it is possible on some platforms for xdr_alloc() to allocated memory using a method other than the malloc() linked to the vos executable. Instead of stealing the xdr_alloc()'d buffer, allocate a new buffer and copy the contents. Change-Id: Icdda3d4d0b7c15464fe7f48123f3e0ebed4c2cc5 Reviewed-on: http://gerrit.openafs.org/3600 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8e9fff9ed8d773e4a22730d485c0617c456bb0e0 Author: Jeffrey Altman Date: Mon Dec 27 17:57:59 2010 -0500 Windows: cleanup preprocessor definition namespace Do not use reserved preprocessor symbol names. Instead use OPENAFS__
_H formatted names where is the subdirectory path from src/ in which the header file originates in the repository. Change-Id: I998d7feeddeb9660f3fc514e2ba752c54e402a24 Reviewed-on: http://gerrit.openafs.org/3599 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 683747b9c4b3d9d77fb8c68df09a59807d027a42 Author: Jeffrey Altman Date: Fri Dec 24 13:36:51 2010 -0500 Windows: separate parsemode from fs into own file Separate parsemode() from fs.c into parsemode.c. Restructure the function prototypes and the fs.h header to permit building fs.exe from multiple source files. Change-Id: I80840899706fd585addd165edc13a9e79928427a Reviewed-on: http://gerrit.openafs.org/3591 Reviewed-by: Russ Allbery Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a7836dda8c1aab18c937c7e8909d4d9a678a53fa Author: Jeffrey Altman Date: Fri Dec 24 10:06:05 2010 -0500 vos: free ubulkentries with xdr_free Instead of using free() to free the ubulkentries data structure use xdr_free(). Change-Id: I367e984d1777fcc8a3ec81b501174fae2fd0c8ff Reviewed-on: http://gerrit.openafs.org/3590 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman commit 9f17cef3d3614d79b3ab2dc6807f9d0f928ab6db Author: Simon Wilkinson Date: Mon Dec 27 20:29:48 2010 +0000 tests: Add tests for afsconf_'s key functions Add tests for all of the public functions that afsconf exports to manipulate KeyFiles. Include a sample Keyfile to start with, to ensure that we can continue to read KeyFiles produced by current versions of the code. These tests are here to catch regressions with a forthcoming rewrite of KeyFile handling. Change-Id: I02aaff82aa7e1b7a73981c7cf26a81164e0dd932 Reviewed-on: http://gerrit.openafs.org/3598 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8992210f27671673a89a541776aa105238ad14cf Author: Simon Wilkinson Date: Sun Dec 26 14:54:43 2010 +0000 Don't trust # of entries from ListAttributes ListAttributes returns the number of entries in its array as an RPC argument. But, we can't trust this, as it could be manipulated and end up pointing past the end of the returned array (which is counted, so the entries argument is actually pointless). Add bounds checking to the functions which use this value to prevent this problem. Change-Id: I62398d8f6b5c54318c1a42f1bad67a21c90ef944 Reviewed-on: http://gerrit.openafs.org/3597 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 95ef4cfd394345ed4c1f7902fa9dc198dcbec938 Author: Andrew Deason Date: Tue Dec 21 21:40:19 2010 -0500 Remove extra trailing \s in Makefiles Remove a few extra trailing \s in Makefiles in viced and bozo. Some 'make's (such as the make on HP-UX) interpret this to e.g. include the following "headers=" stuff to be included in LIBS, which obviously causes problems. Change-Id: I7a49ce5b8d40636bb3b4fe7978aa25b5411c7eed Reviewed-on: http://gerrit.openafs.org/3575 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 02a2f6005042b9370350bdc03d4aab83355b205d Author: Simon Wilkinson Date: Sun Dec 26 14:14:38 2010 +0000 volser: Fix broken bulk conversion The converstions between the original, N and U bulk list return values were all broken in various ways: 1/ Shifting from malloc to xdr_alloc() (in 4f1efdc8b73ed) subtly changed the behaviour when handling an empty list. The correct XDR representation of an empty list is {0, NULL}, not {0, &memZero}. Fix the code so that if the source list is empty, an empty destination list is returned. 2/ The destination list length was never being filled in. This means that xdr_free() could not be safely used on this list, as the wrong length would be passed to the allocator. Fill in the destination list length as part of the conversion. 3/ xdr_free(...) is a no-op when called with an empty list - there's no need to check before calling it. Remove these checks to improve the code's readability. 4/ xdr_free(...) should only be called when the RPC returned sucessfully. The stub is responsible for freeing data should the call fail mid way through unmarshalling. 5/ Where an RPC returns the number of entries independently of the length of a counted array, it is unsafe to use that length to iterate the array without checking that it is within the array bounds. Instead, just use the array length when performing conversions. Change-Id: Ied9a77849062e5a1e506f13d4d90d116cefe41e4 Reviewed-on: http://gerrit.openafs.org/3596 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3503f32848ab3fcb0df5a0b40518106bf19cee6e Author: Simon Wilkinson Date: Sun Dec 26 14:00:42 2010 +0000 vos: Abstract out bulk list conversion Pull the various segments of code that do bulk list conversion into their own functions. This is purely code reorganisation at this point, fixes for these functions will follow in subsequent patches. Change-Id: I941e94aaf776ece85f041d02f5bdbaad5cf5b129 Reviewed-on: http://gerrit.openafs.org/3595 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b3c3fe137ed89f698fdd0a12e68582141d216548 Author: Andrew Deason Date: Wed Dec 22 10:46:11 2010 -0500 Link hcrypto before roken We must e.g. -lafshcrypto before we -lrokenafs, since stuff in hcrypto can use functions provided by roken (such as ct_memcmp or rk_cloexec_file). Fix any users of LIB_hcrypto that do not do this to put LIB_roken after LIB_hcrypto. Change-Id: I55f5589a521ed7da7a6692d817e94f18076ff4bc Reviewed-on: http://gerrit.openafs.org/3584 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 676a4efc232bc77fe20e46c2dbe45e89f89cd670 Author: Russ Allbery Date: Fri Dec 24 10:53:22 2010 -0800 Update NEWS for 1.5.78 and 1.6.0pre1 Based on the release notes. Add an entry for 1.6.0 with in progress instead of a date to hold the release notes for 1.6.0pre1 rather than creating separate entries for each release candidate. Users who track the release candidates can refer to the public announcements, and this will be cleaner when reading history later on. Change-Id: I8d14dd0ec030e3d047f1d2e85c888c1d86e7f3c0 Reviewed-on: http://gerrit.openafs.org/3592 Tested-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 83ac1558b6cc8245166d997a44297eb197348616 Author: Simon Wilkinson Date: Fri Dec 24 18:32:30 2010 +0000 auth: Add more tests and resulting fixes to userok Add tests for the functions afsconf_SuperUser() and afsconf_SuperIdentity(). These had been missing tests because testing them requires starting a client and a server, so amend the superuser-t tests so that they can start up a simple server. Fix a number of problems that the tests expose, with setting (and freeing) identities in corner cases. Change-Id: I29f5f9eda7f532c98183d588e488d704f8efad88 Reviewed-on: http://gerrit.openafs.org/3593 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit affc978be7ba3c36c9b7a6a94fb5e907beebed99 Author: Derrick Brashear Date: Thu Dec 23 13:20:42 2010 -0500 DAFS: listvol + unsalvagable volumes = intolerable delay a non- inService volume (or more) plus vos listvol equals pain. return Salvaging instead of waiting for it in the listvol case. Change-Id: I02bdbb6448bcf56e97db9324aa723cc753a37632 Reviewed-on: http://gerrit.openafs.org/3588 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 651f66b0ffed08da82b352e3e252a03b8b13c780 Author: Andrew Deason Date: Wed Dec 22 09:46:48 2010 -0500 Prefer libHcurses over libcurses Use the HP-UX-specific libHcurses instead of libcurses, like we used to. Otherwise we fail to link some gtx programs. Change-Id: I7b8a012d5d263c611a144e05466c5435b5ff310a Reviewed-on: http://gerrit.openafs.org/3583 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 1bc23299720fc57dfefbb588f1f3de0ec792e069 Author: Andrew Deason Date: Wed Dec 22 00:02:45 2010 -0500 HPUX: Put __HP_CURSES back in We need __HP_CURSES to be defined in order to get the _maxx WINDOW* field among other things. Define it on HPUX again (it was taken out as part of 4a6a00d6f45bd0ac94e2eb05adee41552073643a). Change-Id: I3a17f270a034d97eea04580b8eae98a1784b5640 Reviewed-on: http://gerrit.openafs.org/3582 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e9e52ebc465d06bbb40bbee2d86b6a93efb44c24 Author: Simon Wilkinson Date: Thu Dec 16 10:46:43 2010 +0000 rx: Make rx_atomic.h a shared header Copy rx_atomic.h into the shared header directory so that it can be used by other modules within the AFS build. Note that we can't actually install this header onto the system (and it cannot be included by headers which are installed) because it uses autoconf defines to control its behaviour. Change-Id: If543f998faa0608b4f7efab90db31f072f9e9981 Reviewed-on: http://gerrit.openafs.org/3579 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c845670469b3f988e96cb7854e46974407447457 Author: Derrick Brashear Date: Tue Dec 21 09:08:03 2010 -0500 LWP: kill dead code the pthreads-wrapper LWP doesn't currently compile. it will need to be revisited if we ever care. remove it (as well as a bit of other unused code) Change-Id: I61e7bc493127ec49347ca02b24db8fa79e4cbb28 Reviewed-on: http://gerrit.openafs.org/3564 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5d218831f3186d0d1dc7d3b00dd4a3b6a4a8757c Author: Derrick Brashear Date: Mon Dec 20 16:36:42 2010 -0500 LWP: don't copy pid to a null pointer In LWP_CreateProcess we take a pid. if it's null, don't crash. Change-Id: I2a491788f5ce23a094e65192164838d5bbfc4b31 Reviewed-on: http://gerrit.openafs.org/3556 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa4b1f3aeb33c28b2d8e2724542d1696fcc87773 Author: Andrew Deason Date: Tue Dec 21 10:31:39 2010 -0500 LINUX: Avoid unnecessary afs_ShakeLooseVCaches Before some of the NewVCache refactoring, we only called afs_ShakeLooseVCaches when afs_vcount was over (or equal to) afs_maxvcount. Do this again, so we only try to shake loose vcaches when we need more vcaches. Otherwise, we will call afs_ShakeLooseVCaches every single time we want a new vcache when dynamic vcaches are disabled (such as 2.4 Linux), and we log a warning when we can't free any (which is likely when there are only 1 or 2 vcaches in use). FIXES 128756 Change-Id: Ia06f76a6f719e69881b91fb2d975cfc33c85c370 Reviewed-on: http://gerrit.openafs.org/3569 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2ce159fbf474b96ecd2a4224751d4655230bba51 Author: Andrew Deason Date: Fri Dec 3 17:20:54 2010 -0600 LINUX: Reduce stack depth on recursive symlink res Instead of calling vfs_follow_link inside afs_linux_follow_link ourselves, we can just resolve the next step of the symlink resolution and set the result in nd_set_link(), freeing the string in .put_link(). For kernels without a usable symlink text cache, this reduces call depth when resolving a path containing many symlinks by two frames per layer of indirection, allowing for more deeply-nested symlink paths to be usable. Change-Id: I6886c3b67089c8028fd6ad93ab10eb9173bd6fbe Reviewed-on: http://gerrit.openafs.org/3433 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 64e564b29e95898a6eb85dc527d046aab241fb8f Author: Andrew Deason Date: Mon Dec 20 17:29:37 2010 -0500 Cache bypass: remove ifdefs under src/afs/LINUX24 Same as commit 9657695d34badaac654227be8c731a1512f2106b, but for LINUX24. Remove the AFS_CACHE_BYPASS references in LINUX24, since it is always enabled. Also remove messages about a "cache bypass patched module". Change-Id: I79526ed78752a4c3da7123e5af1c5eb6afc19fe3 Reviewed-on: http://gerrit.openafs.org/3568 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 468ff8e4d298baba9c2d4f96d1a3ec12cf64d0c7 Author: Derrick Brashear Date: Tue Dec 21 09:17:38 2010 -0500 DARWIN: replace resource merge script ref with binary Ro is a helper tool; use Rez directly Change-Id: I7b3f8105344960a149d7fa0ee1fbb3a332486a04 Reviewed-on: http://gerrit.openafs.org/3565 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0ef3ce2006b81f590c62a51b7ec903ebff24b9c8 Author: Derrick Brashear Date: Tue Dec 21 08:58:31 2010 -0500 DARWIN: make growlagent build not run afoul of ._ fun in some cases a git checkout would promptly merge the ._ file away, meaning a subsequent build would fail. just use the developer tools to set an icon instead of clever tricks. Change-Id: I34290f0f32cb7ae72a298a7af1ed4bd6a8ef9224 Reviewed-on: http://gerrit.openafs.org/3563 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9de81541aadd179aac6daa1c64b6a9cfda158b81 Author: Derrick Brashear Date: Tue Dec 21 08:57:05 2010 -0500 DARWIN: make ARCHFLAGS propagate to shlibs in order that configure not expand ARCHFLAGS (so we can override from shell) escape the variable. Change-Id: I9d5c3f4cc58c66be7ffefbd134ba476673be6ea8 Reviewed-on: http://gerrit.openafs.org/3562 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1cb3607ff66b7fc6201fab2af57761156b1927f Author: Ben Kaduk Date: Sun Dec 19 19:33:28 2010 -0500 FBSD7: Don't sleep with the glock On FreeBSD 7.X, vinvalbuf() can (will) sleep; this results in a panic when the kernel is configured with WITNESS and we hold the glock around it. Drop the glock in this case. Change-Id: I0036aad3059805d77afe9aa9bf7f5d421d6810f8 Reviewed-on: http://gerrit.openafs.org/3551 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6040a4daa0b04085f18a8e232a1a99dc7cc36cf5 Author: Ben Kaduk Date: Sat Dec 18 23:52:44 2010 -0500 Bring FBSD 7.X client back to life Having been untested for quite some time, we had several places that needed more conditionals to compile on FreeBSD 7. Now we compile and start on 7.3-RELEASE, but have locking issues under actual use. It seems that we are also incompatible with the Heimdal 0.6.3 in the base system -- aklog is unable to actually obtain the needed credential when compiled against that kerberos implementation; using MIT krb5 1.6.3 from ports works without incident. FIXES 128612 Change-Id: I831cea711067d04dc276deb171faf3369c55b775 Reviewed-on: http://gerrit.openafs.org/3548 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 28032bc1c1aaa4c25e94025a8fa9e2b4e8131ce3 Author: Ben Kaduk Date: Sun Dec 19 00:06:13 2010 -0500 FBSD: StopListener glocking fixup afs_osi_Sleep requires the glock (so that it can sleep on it); we dropped the glock earlier in osi_StopListener because soshutdown and soclose can sleep, but we must (unconditionally!) acquire it for our loop waiting on rxk_ListenerPid. Change-Id: I38c3ab6689a6af7f1693bd3c8348068ee280e530 Reviewed-on: http://gerrit.openafs.org/3549 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ad0b390ec5303576cee37fa49bfd2a732b365a83 Author: Andrew Deason Date: Mon Dec 20 11:05:46 2010 -0500 LINUX24: Define afs_linux_can_bypass We call afs_linux_can_bypass, so make sure it exists. Change-Id: Ie4393cc57af1a52748b76d3403370fbd788d9f8a Reviewed-on: http://gerrit.openafs.org/3554 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 6f65ace58d2c50313e307204c0e4a6408483a211 Author: Andrew Deason Date: Mon Dec 20 10:07:11 2010 -0500 LINUX24: Include linux/pagemap.h For 2.4 Linux we need to include linux/pagemap.h, otherwise we get undeclared references to KM_USER0 and PAGE_CACHE_SIZE. Change-Id: I1bd6c6484a9b46f923fa31d1d45fbfedc243abbd Reviewed-on: http://gerrit.openafs.org/3553 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f89d4ad348f1b20b9f27e8985fa09eafb6212e0 Author: Derrick Brashear Date: Mon Dec 20 16:24:26 2010 -0500 backup: pass in valid dummy pid for LWP LWP_CreateProcess needs memory passed in; instead of a null pointer, pass in a pointer to a PROCESS. Change-Id: I451d803461252e3afb5d89b840a1ee047228d204 Reviewed-on: http://gerrit.openafs.org/3555 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 37c20528df26a43ec81b8e0f7658f1516d3c1b39 Author: Ben Kaduk Date: Sun Dec 19 19:29:17 2010 -0500 Zero rx_multi_lock before initializing it FreeBSD's kernel debugging facilities will panic if it detects an attempt to re-initialize an already-initialized lock, as detected through some particular bits being nonzero. Zero everything out before starting, to prevent this panic. Change-Id: I7f3abae978d1cbe7eb4908d90c52a0dc46b81e08 Reviewed-on: http://gerrit.openafs.org/3550 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit afef1712f28a1c83cfb732d1c4fde7faec4811fc Author: Jeffrey Altman Date: Sat Dec 18 18:39:07 2010 -0500 Windows: fs chmod and display mode in fs examine Make use of the new pioctl VIOC_GETUNIXMODE and VIOC_SETUNIXMODE operations to display the current mode in fs examine and permit setting the mode with "fs chmod". The mode string parsing makes use of Vincent Archer's code from Minix. The required copyright statement and license is attached to parsemode(). afsconfig-windows.h gains definitions for various mode symbols that are not defined by Visual Studio runtime headers. Change-Id: I624f73154b7f177f93289e2641da5d9478ea931c Reviewed-on: http://gerrit.openafs.org/3546 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb4c0234b2fa5ae91097b6c40cbfda6ed7484eb0 Author: Jeffrey Altman Date: Mon Dec 20 09:59:43 2010 -0500 Windows: clear mountPointStringp on status change If the data version of the cm_scache_t changes, we must clear the mountPointString. Otherwise, if the object is a mountpoint or symlink, cm_HandleLink() will not attempt to build the new target string. The Windows CM never updates the contents of a mountpoint or symlink. It always destroys the old and creates a new one. However, the Unix CM simply updates the link data. Apparently, the Windows clients have never noticed. Change-Id: If2297ed0a323411df13b7828d11dbb653669d351 Reviewed-on: http://gerrit.openafs.org/3552 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 27469e59b134efef6c908a1bfa8162d4bf9b8275 Author: Jeffrey Altman Date: Sat Dec 18 18:36:18 2010 -0500 Windows: Add VIOC_GETUNIXMODE and VIOC_SETUNIXMODE Add pioctls to get and set the UNIX mode bits for an object in AFS. Change-Id: I220047d8be50b5db511e41004b8248859f479c0c Reviewed-on: http://gerrit.openafs.org/3545 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 16dac6d4a6c9b19588daf6f11fa33940a381e23c Author: Jeffrey Altman Date: Sat Dec 18 18:27:49 2010 -0500 Fix fallback processing for ktc_GetTokenEx() The fallback processing after ktc_GetToken() generates a token set or fails. Immediately return 'code' to the caller after freeing ktcToken. Change-Id: If82c5c94b75152eaa4d077b428238e8f77478d05 Reviewed-on: http://gerrit.openafs.org/3544 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f32a0df37be23fd87fa24187bbdd6a1ec73a2b27 Author: Derrick Brashear Date: Fri Dec 17 21:16:52 2010 -0500 darwin: fix fixed setpag error handling looks like testing 9da7f3cc73bf990427a9dd80ba2bbbb618383ea3 failed to have the right dependencies. fixing the fix! Change-Id: Ib295e819667c895bfe52c4d5b217ebbeaf1e4c52 Reviewed-on: http://gerrit.openafs.org/3542 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 98c6aadfa1c438fc9ae2cc47ddec739d0c7a8b8b Author: Derrick Brashear Date: Wed Dec 15 05:22:26 2010 -0500 macos nfs translator vnode ref fix code won't trigger today but we might as well get it right. we already ref the vnode. don't leak refs. Change-Id: Ib2aa87ffbb8c6bbd38d8858328d26f1a37cf04b9 Reviewed-on: http://gerrit.openafs.org/3532 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1519144f83925d82117f31ce0872f77660f197ee Author: Anders Kaseorg Date: Sat Nov 6 03:03:19 2010 -0400 Linux: Fix AFS_NORETURN violation with osi_AssertFailK Commit d86f0c44d3c5910a6b54895484dc0286eac9bc73 changed the AFS_LINUX26_ENV implementation of osi_AssertFailK so that it returns, contradicting its AFS_NORETURN prototype, in an effort to make the following BUG() display the right line number. To fix this, move the returning implementation into its only caller, the osi_Assert macro. This fixes possible compiler misoptimizations due to rx_kcommon.c:255:1: warning: ‘noreturn’ function does return Change-Id: Ibbcc630037002ce4659e2e6a36b39d271f9bdc58 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3276 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit acfc61eca83ecc895e51ae512c1919e7997a560e Author: Simon Wilkinson Date: Mon Oct 25 11:26:51 2010 +0100 opr: Add new queue implementation Add a new queue implementation for OpenAFS. This has a similar calling form as the current RX queue implementation, but is implementated using type safe functions, and supports structures with multiple queue headers. This permits threading a structure onto multiple queues at the same time. The eventual intention is that this queue implementation will replace both rx_queue and the Unix cache manager afs_q. Change-Id: I8f815872b017a85eb52a6e6451cdcee3eb869519 Reviewed-on: http://gerrit.openafs.org/3139 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e8d8a2240a57f9f4a11ee45b60c229d3f8447b86 Author: Derrick Brashear Date: Wed Dec 1 15:22:30 2010 -0500 refactor afs_CheckServers basically, we need the ability to reuse this function, so, let's make it work differently so we can. Change-Id: I41a7e1dc62feeb137f1a7f5c939f54cb59cc6c13 Reviewed-on: http://gerrit.openafs.org/3403 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e00fc6f0e412f438f2f72f8b427c21810d00109 Author: Andrew Deason Date: Wed Dec 8 18:16:14 2010 -0600 Add ioctl-based AFS calls for Solaris 11 Switch from using syscall-based AFS calls to ioctl-based AFS calls, since syscall 65 was repurposed in some kernels in Solaris 11 and OpenSolaris. Update the provided afs init script to accomodate the additional steps needing for starting the AFS client. Partially based off of some work by Derrick Brashear. Change-Id: If694af8ac576856fed113851f1be4154b4d970d3 Reviewed-on: http://gerrit.openafs.org/3498 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8815f5099129a4aa303bdda3adaea831914e98e5 Author: GCO Public CellServDB Date: Mon Dec 13 10:53:05 2010 -0500 CellServDB update 13 Dec 2010 Change-Id: Ic3c96d99656f50da82243385cb7f9bcdf78f12e4 Reviewed-on: http://gerrit.openafs.org/3503 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f8400699a881eb4f675cba1fbcd7f7ac6eecd355 Author: Jeffrey Altman Date: Sat Dec 11 23:28:02 2010 -0500 Windows: log error code for smb lan thread fail When creation of the smb_LanAdapterChangeThread fails log the error code as part of the panic message. Change-Id: Iac034bdf2f04aed08cf77702c701882c31a10b36 Reviewed-on: http://gerrit.openafs.org/3502 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6229ffb7ae365174ccacabe00d1e986d2f9b2019 Author: Jeffrey Altman Date: Sat Dec 11 06:19:54 2010 -0600 Windows: PerformanceTuningInterval Merge error Due to a merge error, if RankServerInterval was set via the registry, its value would also be used for the PerformanceTuningInterval. Fix it. Change-Id: I6605146db0c25ecbf0d20f9d7198934f5bf411ad Reviewed-on: http://gerrit.openafs.org/3500 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2cd0a1e4ff82349f8671783e40ea478096d69b56 Author: Andrew Deason Date: Fri Dec 10 14:43:24 2010 -0600 Add afs init script for Solaris 11 Change-Id: I978454a5d34aee412ec3e3d57a38859b1405e5fb Reviewed-on: http://gerrit.openafs.org/3499 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit f88c91f7778b9a8bf920dce08ccab76ac0b1b433 Author: Andrew Deason Date: Wed Dec 8 14:57:13 2010 -0600 DAFS: Avoid logging harmless LEAVE_OFF failures The DAFS volserver can create temporary destroyMe volumes, which it then tells the fileserver to keep offline with an FSYNC_VOL_LEAVE_OFF message. When the fileserver doesn't know that the volume exists, currently it responds with SYNC_DENIED, which causes the volserver to log the error with a "negative response on circuit FSSYNC" message. These are harmless, though, since leaving a volume offline that the fileserver does not know about is a no-op. So return the SYNC_FAILED code instead, which does not get logged, and is more consistent with some other FSYNC handlers like FSYNC_VOL_DONE. Change-Id: I315d091fb419767ae33c1846d90e5ef83372477d Reviewed-on: http://gerrit.openafs.org/3494 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95fc9ece507d3c5bd7914afadaaae9456eea9b7a Author: Andrew Deason Date: Wed Dec 8 12:41:44 2010 -0600 DAFS: Fix VOL_QUERY_VOP error codes Volumes in the VOL_STATE_DELETED state effectively do not exist. So, when receiving an FSYNC_VOL_QUERY_VOP request for a volume, report FSYNC_UNKNOWN_VOLID for a volume in the VOL_STATE_DELETED state. Similarly, if the volume exists but on a different partition, we should return the FSYNC_WRONG_PART reason code. This allows volumes to be usable by the volume server in some corner cases. For example, when a volume X exists on partitions A and B, and the volserver deletes X on B. The fileserver then puts volume X in the DELETED state, allowing checkouts over fsync, but FSYNC_VOL_QUERY_VOP reports that no vop exists. With this change, FSYNC_VOL_QUERY_VOP will instead report that the volume does not exist, and so FSYNC_VerifyCheckout can succeed for such volumes. Change-Id: I6c4f7deead745ddba44963a9f66a9f2ef25686a5 Reviewed-on: http://gerrit.openafs.org/3493 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9da7f3cc73bf990427a9dd80ba2bbbb618383ea3 Author: Andrew Deason Date: Thu Dec 9 13:02:16 2010 -0600 DARWIN: Fix setpag syscall error detection Darwin uses the same variable as the return value for ioctl_afs_syscall, and as the last 'out' parmater, so the return value for ioctl_afs_syscall will always overwrite whatever is written to the last 'out' parameter. Instead, record two different variables, and allow the returned error to overridte the error set as the last parameter. Change-Id: I7db1b226612c55c892810ce446b486b7e503529c Reviewed-on: http://gerrit.openafs.org/3497 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f46bba8611ceca7a6957b6aa9dee35990cae91f2 Author: Christof Hanke Date: Sat Dec 4 09:09:59 2010 +0100 Fix mech of building export on AIX Presently, the distinction between 32Bit and 64Bit AIX is done by inserting a "#" (comment-sign) into the Makefile. This fails on some AIX-installations. Thus, just use normal conditionals for distinguishing betwenn 32 and 64 bit. Change-Id: Ie83bbdcd3c7c4b7b0858c9691bf6e1bf6c4ba32a Reviewed-on: http://gerrit.openafs.org/3434 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b20329e01968d3562f78382b27f7de9948a96899 Author: Andrew Deason Date: Wed Dec 8 11:40:24 2010 -0600 Fix AUD_HOST callers Servers using the AUD_HOST audit message should give the host IP in network-byte order, as that is how the auditing code interprets it. Fix the users of AUD_HOST that do not do so. Change-Id: Iaf6abec850e691febfa3e07bff368eab6fb71409 Reviewed-on: http://gerrit.openafs.org/3492 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ddc4057ce786ebbe75b8b2c971b1013187062f1f Author: Andrew Deason Date: Tue Dec 7 13:49:47 2010 -0600 tvolser: Link libafsrpc after libusd libusd can contain a reference to AssertionFailed, which is in libafsrpc. So link libafsrpc after libusd, so it gets resolved when building e.g. vos. Change-Id: I30140b5ede5afa2495f4c2b7b7edbbd878bf6dca Reviewed-on: http://gerrit.openafs.org/3477 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4dd9bc32a3846cd97a3b0f9cae5af049ae87dd0a Author: Andrew Deason Date: Tue Dec 7 13:31:36 2010 -0600 auth: Return SuperUser identity for localauth The caller expects identity to be populated when we return 1. So for localauth, give it an identity. Don't set uname, and in fact, move the uname declaration so that it is clear that it's not used for most of this function. Change-Id: I4dcd466b25f578362290ed2fc65b5bd6e23a91e4 Reviewed-on: http://gerrit.openafs.org/3475 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c1b71c4e7b4575d6a5b00214bc42a682fc7286eb Author: Andrew Deason Date: Tue Dec 7 16:04:11 2010 -0600 auth: Move to a named constant Add a #define for "" and related values. Use them. Change-Id: I0e1d374403a0ad20be6a2839e37a5894b15446cd Reviewed-on: http://gerrit.openafs.org/3482 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3fd789dfbdc05c7c00798bc305d743deea05e155 Author: Anders Kaseorg Date: Wed Dec 8 01:21:16 2010 -0500 rxi_NatKeepAliveEvent: Shrink excessive stack buffer Fixes rx.c:6138:1: warning: the frame size of 1600 bytes is larger than 1024 bytes Change-Id: I2f5b4961a7d929454a99ea99c637d1a0b2468a14 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3491 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7b7cd95ec0adc2c58b0387a5ff788251127f504e Author: Derrick Brashear Date: Tue Dec 7 21:08:51 2010 -0500 DAFS: make FSYNC_VOL_QUERY_VOP DAFS-only all the support code handles this only for DAFS. the case statement should treat as unknown if it is. Change-Id: I14816875b7a0b172d6f6fc9893cb0add90503111 Reviewed-on: http://gerrit.openafs.org/3485 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fea0ee62ab854148a354c1aa9ebc5f042448210e Author: Derrick Brashear Date: Tue Dec 7 20:43:55 2010 -0500 DAFS: fix ifdef there's no DEMAND_ATTACH_ENV ifdef. don't use it. Change-Id: I2f6f9c57b187fcb514f318d977a15de1889f9055 Reviewed-on: http://gerrit.openafs.org/3484 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 592a33a4787db88993a7bf9d8f5ad8c11a576b56 Author: Andrew Deason Date: Tue Dec 7 10:50:31 2010 -0600 SOLARIS: Free vcache mappings on shutdown Right before shutdown, go through all of our vcaches and flush them, freeing any pages associated with the vcaches. If we don't do this, pages associated with our vcaches may still be around after we shutdown and the module is unloaded, causing a panic when the kernel tries to deference the page's vnode. Abstract out afs_freevfs() following the gafs_foo/afs_foo convention from the vnode ops, since we're calling this in two different places. Change-Id: I64b88799acce3a55648ec94b53ed63319cd04698 Reviewed-on: http://gerrit.openafs.org/3472 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9aad0979e9ff0601c249eb66a6ecfb3e76264702 Author: Jeffrey Altman Date: Mon Dec 6 23:24:18 2010 -0500 modify FindIndex to compare uuids If FindIndex is provided a server address and entry has a valid uuid, obtain the uuid for 'server' and use that search for a matching entry. This modification is necessary in order to permit operations against multi-homed servers in split horizon DNS configurations. Change-Id: I8929c500eb4f71c8cf0aa8328bc3b3a0345368aa Reviewed-on: http://gerrit.openafs.org/3468 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 90199686e6c6cd74d81fa569faa7f68e76d808cd Author: Derrick Brashear Date: Tue Dec 7 01:13:09 2010 -0500 afsconf_SuperUser verify identity before use if we didn't get an identity back, don't try to use it. Change-Id: Iff6069b9231c3adc3f74cbf7fff4dffcfc289cd3 Reviewed-on: http://gerrit.openafs.org/3471 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cb02cfcdfb78ccb680b0c5fb753115e2375a1d9f Author: Jeffrey Altman Date: Mon Dec 6 23:23:01 2010 -0500 Windows: partial impl of TokenEx functions No pioctl yet but implement enough so that GetTokenEx and ListTokensEx can provide results. Change-Id: I261f21db6e10502602aa0cb453b24632fdefd25c Reviewed-on: http://gerrit.openafs.org/3469 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f71219918e604a2909774e360cbfea9f9e3d9dcc Author: Jeffrey Altman Date: Tue Dec 7 00:02:33 2010 -0500 Windows: test for path in afs before symlink test Check that the path is in afs before testing to see if it is a symlink Change-Id: If22331595b675bf9347d832eca70edfc6d1d0365 Reviewed-on: http://gerrit.openafs.org/3467 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ac1c4b30ba25ce49fdd18f37399a1194d934ab8e Author: Andrew Deason Date: Mon Dec 6 14:27:22 2010 -0600 RX: Always define kernel XDR symbols to be AFS XDR Always define xdr_foo to afs_xdr_foo when we're in the kernel. Otherwise, we can get warnings that our xdr_foo symbols are colliding with the xdr_foo symbols from the kernel. Change-Id: I74b2cdd24f01734c2c36506bb5bab0b386d46094 Reviewed-on: http://gerrit.openafs.org/3465 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1c45cc746e7484e72191fc8d010640692e90bc82 Author: Andrew Deason Date: Sun Nov 21 21:29:11 2010 -0500 Remove unreached lines Fix some macros to eliminate unreached trailing empty statements (such as: "{code = foo; goto error;};"), and other oddities causing "statement not reached" warnings. Also eliminate a couple of code blocks that were never reached. Change-Id: Iac626976268e13f5ef05f379ad1c9b5437c57f86 Reviewed-on: http://gerrit.openafs.org/3368 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 94591a635bdd23ba74298c64273d4688405aa370 Author: Andrew Deason Date: Mon Dec 6 16:11:24 2010 -0600 vol_split: Recover from stream open failure Make sure we go through the error recovery code when we can't create a stream, instead of just returning without cleaning up. Change-Id: Ie3a5be9a81b36624a7d49958233c42e82a0e4bfa Reviewed-on: http://gerrit.openafs.org/3466 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8f7ae51c6145f4c284298a1dcc6efd5562246243 Author: Andrew Deason Date: Mon Dec 6 15:41:33 2010 -0600 tubik: Link with libafsauthent libubik_pthread.a requires libafsauthent.a, since we make use of afsconf_* functions. Add libafsauthent to LIBS and make tubik depend on it. Remove linking to liblwp while we're here, as we should not be using any LWP code. Change-Id: Ie028fedfbc3e7a8a78dc69a2c38be99eb72602da Reviewed-on: http://gerrit.openafs.org/3464 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2a64776a50591323ba909fcbcaf39a2893e5238c Author: Andrew Deason Date: Mon Dec 6 13:29:31 2010 -0600 roken: Export rk_daemon, not daemon We never export a function called 'daemon'. We only export a function called rk_daemon, and the define daemon to rk_daemon. So, only include rk_daemon in the map file, since that is the only symbol that will appear. Change-Id: Ib0f5ba88ba6d8bdefe3191050bc9e9e36f1b9134 Reviewed-on: http://gerrit.openafs.org/3463 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6bcee8821fba5a3df593f0b93ae58fac8ed03070 Author: Andrew Deason Date: Mon Dec 6 12:46:06 2010 -0600 SOLARIS: Fix some rx_atomic.h warnings Include atomic.h so we get atomic_* prototypes, pass atomic->var in rx_atomic_sub, and pass unsigned int*s to the atomic_* functions. Change-Id: Ic8d745bc1726c850bd15d38702163e92587bb0a5 Reviewed-on: http://gerrit.openafs.org/3462 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 37817796c4890683a7e41ed0f3a2fa6a53e1edc7 Author: Andrew Deason Date: Thu Aug 12 14:38:55 2010 -0500 libafs: Set tvcp->callback before BulkStatus When we call InlineBulkStatus or BulkStatus, we currently do not touch tvcp->callback for any of the vcaches before making the call. This can cause us to not notice an InitCallBackState issued by the fileserver before the BulkStatus call returns, since the InitCallBackState handler looks at tvcp->callback to determine what vcaches to clear callbacks for. In turn, this can cause us to think we have a callback agreement with the fileserver on one of the BulkStatus'd files, when the fileserver does not actually have such a callback agreement. So, set tvcp->callback to the server we are contacting, so if we get an InitCallBackState call from that fileserver, the CBulkFetching state will be cleared, and we will correctly discard the callback information for that vcache. Change-Id: Ib8790c8f9621d7a9da12588ea6115f9cb3ff9022 Reviewed-on: http://gerrit.openafs.org/2548 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 58837dbc56251cf640ad46273c534b71f4fc40e3 Author: Chaskiel Grundman Date: Mon Dec 6 12:43:12 2010 -0500 linux: avoid leaking parent when revalidating and it is /afs we happily go to the "good dentry" path and exit, leaking the result of dget_parent, if parent is globalVp. Let's not Change-Id: I3848a1aa2611d17ba08e04b3f33f22623645d233 Reviewed-on: http://gerrit.openafs.org/3448 Reviewed-by: Chaskiel Grundman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a433f750ad7f0a3c0adbf4c5d6221b7517c0eedb Author: Stefan Kueng Date: Sun Dec 5 18:48:56 2010 +0100 Windows: fix checked UNICODE build of talocale src/WINNT/talocale failed to build/link for checked builds. Fix it. Change-Id: I39eb1605f67afdbd0f4ad04bb7ec560501410fbe Reviewed-on: http://gerrit.openafs.org/3446 Tested-by: Stefan Kueng Reviewed-by: Stefan Kueng Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6fe9313180dfe1d509ae97a1e16a67195357cf7b Author: Jeffrey Altman Date: Sat Dec 4 18:03:21 2010 -0500 Windows: Build afs_shl_ext.dll with talocaleU.lib Use the Unicode version of talocale to properly read resource strings. Change-Id: Ifb373a3b405922ecbdce4edb2ec86c31551d4dfa Reviewed-on: http://gerrit.openafs.org/3442 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3756fc78af48c5543c267b086fbd4872fea2e33c Author: Jeffrey Altman Date: Sat Dec 4 18:02:38 2010 -0500 Windows: install afs_shl_ext icon files mount.ico and link.ico to dest\root.client\usr\vice\etc Change-Id: Ic66f3cef73170d9101b12695a12ec41cdca6c89a Reviewed-on: http://gerrit.openafs.org/3441 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1d7534fb95a8fb77d6b0f3fe0816094b36bde850 Author: Jeffrey Altman Date: Sat Dec 4 17:59:36 2010 -0500 Windows: build a UNICODE version of talocale.lib Add src/WINNT/talocale_unicode that builds a UNICODE version of talocale, talocaleU.lib Change-Id: Iec343adbbab23fefa2dd9f474d23e593810552e9 Reviewed-on: http://gerrit.openafs.org/3440 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 24a9ba4b829a871defea75ddf17fb621035ca008 Author: Jeffrey Altman Date: Sat Dec 4 17:56:44 2010 -0500 Windows: fix UNICODE build for talocale src/WINNT/talocale has not been built for UNICODE in a long time. Fix it. Change-Id: Ia8b182b711838e2d6592f9040d2173f5977f9cfd Reviewed-on: http://gerrit.openafs.org/3439 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3ff9c24c0e2d72dcce65fc7706dcdb1cd3090965 Author: Stefan Kueng Date: Sat Dec 4 10:56:01 2010 +0100 Windows: afs_shl_ext improve overlay handlers Add link.ico and mount.ico Windows icon files. Use these images as overlays instead of extracting an image from shell32.dll which is a bad idea. See Change-Id: I624f959229a91329507aec5ff61045c49d296401 http://blogs.msdn.com/b/oldnewthing/archive/2005/10/26/485133.aspx Reviewed-on: http://gerrit.openafs.org/3445 Tested-by: BuildBot Tested-by: Stefan Kueng Reviewed-by: Stefan Kueng Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 92183f4ac31f20862a992b8b3d52dcbe0ebb7eb9 Author: Stefan Kueng Date: Fri Dec 3 22:58:54 2010 +0100 Windows: afs_shl_ext Show icon mount point overlay Change-Id: I8feb71e41e423c5e7484998bdac8a913595db9c4 Reviewed-on: http://gerrit.openafs.org/3444 Tested-by: BuildBot Tested-by: Stefan Kueng Reviewed-by: Stefan Kueng Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f8f8c0a48fbe086870a0cf35a62278c2b4ab743b Author: Stefan Kueng Date: Fri Dec 3 21:24:33 2010 +0100 Windows: afs_shl_ext folder bkgrnd context menu Make the context menu handler also work for folder backgrounds and on Win7 for library folder backgrounds For folder backgrounds, the shell passes the PIDL of the folder instead of a data object. Extract the path from that PIDL. Also extended the register function of the dll to add the required registry keys. Change-Id: I8928efd25058dced3820478a2858ce20336b4301 Reviewed-on: http://gerrit.openafs.org/3443 Tested-by: BuildBot Tested-by: Stefan Kueng Reviewed-by: Stefan Kueng Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 166de9ffa29244f38f1d2c1e8b0fa9a9fd1802b5 Author: Jeffrey Altman Date: Wed Dec 1 18:47:29 2010 -0500 Windows: Remove fallback from GetCaps to GetTime If the file server responds to RXAFS_GetCapabilities with RXGEN_OPCODE the server is up and there is no need to fallback to RXAFS_GetTime. Remove the code that performs the extra work. Change-Id: Ieb0d1cce6f356a8988f2464227dec9b6cd9e6fcf Reviewed-on: http://gerrit.openafs.org/3419 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c370ed1e58310cb0202a5d2c826ba6569da831c Author: Christof Hanke Date: Sat Dec 4 11:03:13 2010 +0100 Add .gitignore for tsm41 Just ignore some files created during the build. Change-Id: Ifb276b2a71fe8e58517605584e918d990b8f2f5d Reviewed-on: http://gerrit.openafs.org/3435 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit fb325c3c63d844eda1da23e2ab5facba14994a6f Author: Andrew Deason Date: Fri Dec 3 16:39:57 2010 -0600 LINUX: Define zero_user_segment When the kernel does not have the zero_user_segments function, we define it ourselves. Also define the zero_user_segment function, since we use it, and a kernel lacking zero_user_segments will also lack zero_user_segment. Change-Id: I5c786d2af27227793a7a2768d1af76ccd2d6a415 Reviewed-on: http://gerrit.openafs.org/3432 Tested-by: Andrew Deason Reviewed-by: Matt Benjamin Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba63d22bfb0b18ab054c39cafafeb8c6881fe687 Author: Antoine Verheijen Date: Fri Dec 3 00:30:20 2010 -0700 OpenBSD: Remove duplicate assignment of COMMON_INCLUDE in libafs When building libafs, the make file variable COMMON_INCLUDE is assigned a value in two places: Makefile.common.in and MakefileProto.OBSD.in. The assignment in the latter place is both wrong and unnecessary. Remove it. Change-Id: Ie322f01b023898d4f246243ee3d196aa714147df Reviewed-on: http://gerrit.openafs.org/3430 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b23163f05e55128cc0dc874396a765a400a77fd5 Author: Antoine Verheijen Date: Fri Dec 3 00:26:24 2010 -0700 Move include of sys/types.h in kopenafs.c The netinet/in.h header file requires the inclusion of sys/types.h (or some portion thereof). Most systems include it implicitly within netinet/in.h. Some, such as OpenBSD, do not. In kopenafs.c, sys/types.h is included after netinet/in.h which is fine in most cases but means that, as a result, it will not compile on OpenBSD. Moving sys/types.h before netinet/in.h solves this problem (and should cause no problems on any other system). Change-Id: Ifc3295f3eb4f0b2b4718d0b2aa6dcbb2b06da8df Reviewed-on: http://gerrit.openafs.org/3429 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit be770d4336c2fd7b8a83f18577ae6bb23a3f3e99 Author: Derrick Brashear Date: Thu Dec 2 13:11:33 2010 -0500 properly mark servers down for rx errors except OPCODE if we get a negative (rx) error, it means the server is down, *except* for RXGEN_OPCODE. make this handling consistent Change-Id: I8459ec49ca311dc336aed8da7b106fe0f647fc32 Reviewed-on: http://gerrit.openafs.org/3407 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cb9e029255420608308127b0609179a46d9983ad Author: Matt Benjamin Date: Wed Nov 3 17:02:19 2010 -0400 unix cm rx-oblivious connection pooling Implements a connection pool for Rx client connections with the same credentials. The code trivially avoids the limit on Rx call channels, without touching Rx directly. The conn call limit is known to be hit in cache-bypass, and probably other use cases, so there is an incentive to address it potentially sooner than larger Rx changes are ready to merge. Upgrade to exclusive lock before calling find_preferred_connection. Unset trace option. Fix a warning around modular increment of select_index, we'll go with the change suggested by Marc, I don't see a real need to save the value mod CVEC_LEN. Change-Id: I956aa22cd52b1c43187c7e03230e36820ba11c4d Change-Id: Ie5f936ba912bcfe0544dbc1d035bb74e5ddc50f8 Reviewed-on: http://gerrit.openafs.org/2216 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bd2e024dc230693b1c6cbcfe40d4270a475b02d0 Author: Derrick Brashear Date: Thu Dec 2 01:48:53 2010 -0500 balance afs_vcount in non-linux CM when we dole out a vcache, count it. Change-Id: Id0f9e20b4b8a9de6ee83dcb383c3a152f6b733e6 Reviewed-on: http://gerrit.openafs.org/3423 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6eb1088aad9163ab8d4a4dda513444290c55daa6 Author: Derrick Brashear Date: Thu Dec 2 01:55:34 2010 -0500 freebsd: properly track vcache references previously both root and reclaim could end up leaking refs. fix it. Change-Id: Ib3c9dab2f31b988a2887821f5192ff1fad0e732c Reviewed-on: http://gerrit.openafs.org/3424 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a54f8d51f43e6d917fe2f6c29cf918da361c701c Author: Derrick Brashear Date: Thu Dec 2 01:02:04 2010 -0500 osconf quoting for macros fix quoting to avoid substing during configure, instead let it happen in make Change-Id: I31ec2e7f15ca14f337b4f3f43dd1ef5c0b423756 Reviewed-on: http://gerrit.openafs.org/3420 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e2d9008e74fc7b35792e7cbf57f4f537f787d45f Author: Derrick Brashear Date: Wed Dec 1 16:18:25 2010 -0500 configure: add lresolv to MT_LIBS because of how we configure afsdb, we can end up needing libresolv but not configuring it for threaded code. link it in. at the same time, make sure the link can succeed on e.g. macos Change-Id: Ibf2445638f36d543a0df8be1eaccfc0c31b72ae1 Reviewed-on: http://gerrit.openafs.org/3408 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eaaba59773002ca3ba3e15d1aea69ae4b9493359 Author: Antoine Verheijen Date: Wed Dec 1 15:40:04 2010 -0700 OpenBSD: Fix variable name typo in osi_vcache.c The osi_PostPopulateVCache() routine in the OpenBSD version of osi_vcache.c tries to use the non-existent variable "vc" instead of "avc". This fixes it. Change-Id: Idac09739d36e253518fbdbd600ab43c9ea87da3a Reviewed-on: http://gerrit.openafs.org/3418 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d33b44b63f1928f62d4adaf4fa108d47c09273ce Author: Heimdal Developers Date: Thu Dec 2 00:27:55 2010 -0500 Import of code from heimdal This commit updates the code imported from heimdal to 42f9c644cf00be752f09d85a9664bf2e3502101c (switch-from-svn-to-git-1962-g42f9c64) New files are: roken/write_pid.c Change-Id: I7b48eae393b26c6afe9e9b7dd9f26d8db2d1c6fc Reviewed-on: http://gerrit.openafs.org/3421 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 35daebc577ab11a5fd80d678764a3a681cc5f2f3 Author: Antoine Verheijen Date: Wed Dec 1 14:24:26 2010 -0700 OpenBSD: Fix use of mstat Length field in osi_vm.c The code for osi_VM_FlushPages() in osi_vm.c for OpenBSD incorrectly tries to access field "m.Length" in the vcache structure "avc" instead of "f.m.Length". Change-Id: I44ac0bbbd0e6279c54be185fbf9514b23c65017b Reviewed-on: http://gerrit.openafs.org/3417 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 622403c87a8cbcedcd1212fd32414285d103887b Author: Ben Kaduk Date: Sat Nov 27 23:25:03 2010 -0500 FBSD: clean up rx_socket teardown We had previously been waiting for the SO_ISDISCONNECTED flag to show up in the so_state field, but the flags are not really used for stateless protocols such as UDP, and that flag never shows up. Even with a full three-second wait, the rxk_Listener sometimes still failed to fully terminate, preventing the reuse of the rx port for a restarted afsd. Copy from Solaris and loop until rxk_ListenerPid is zero, doing bogus one-byte NetSends in the body of the loop. Change-Id: I6a5ad4509549fa64c551af642ef5867602b182c0 Reviewed-on: http://gerrit.openafs.org/3391 Reviewed-by: Matt Benjamin Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 341d8bf1313434acf3acded90cfcffd575adc4e5 Author: Heimdal Developers Date: Wed Dec 1 18:02:30 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 42f9c644cf00be752f09d85a9664bf2e3502101c (switch-from-svn-to-git-1962-g42f9c64) Upstream changes are: Asanka C. Herath (9): Windows: Registry based configuration Rename get_entry() -> _krb5_config_get_entry() Deal with quoted strings when reading lists of config strings Add missing export and calling convention annotations Windows: Build and export localtime_r Windows: Older Windows SDKs need More compatibility macros Increase KBR5_BUFSIZ to 2048 and use it in config_file.c Deal with backslash escaped quotes Love Hornquist Astrand (3): provide symbol renameing for sha512 and sha384 less exit with failures add random abstraction Change-Id: I495fa8e9c1c037d6dee191279c1155a4ec6be945 Reviewed-on: http://gerrit.openafs.org/3400 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8e3c678ef15d04a527b671e08683e3fa30c5c873 Author: Simon Wilkinson Date: Wed Dec 1 18:07:24 2010 +0000 util: Add definition of KRB5_BUFSIZ A forthcoming Heimdal update will require that KRB5_BUFSIZ be defined in order to use its config parsing code. Define it in our hacky krb5_locl.h Change-Id: Ieda8df8f31a759927fade44f9196e7411f4a0a59 Reviewed-on: http://gerrit.openafs.org/3399 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f0f4770ab2ec60b18091594608b3f6e2e0fba148 Author: Simon Wilkinson Date: Wed Dec 1 17:42:23 2010 +0000 Build and use roken's mkstemp Add roken's mkstemp to the build on all platforms, either through configure (Unix) or explicitly (Windows). Change all callers so that mkstemp is used unconditionally, rather than falling back to more risky alternatives. This is based on original change from Russ Allbery submitted as http://gerrit.openafs.org/2146 Change-Id: Ia1def41e438e6517b3e7cd5790df3c99eddb8ef6 Reviewed-on: http://gerrit.openafs.org/3398 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8a4b3cff15fa678a3d5ba23982ab79275dc83e37 Author: Heimdal Developers Date: Wed Dec 1 17:35:50 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 5b91f58f350c92fb9eacd1ebac558381b0b8deac (switch-from-svn-to-git-1705-g5b91f58) New files are: roken/mkstemp.c Change-Id: I42cf73fd2943e2d5cfa629d3ce05f20a065428a1 Reviewed-on: http://gerrit.openafs.org/3397 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f3c74fdd04b9cd837911e10db738e2dbca3d884d Author: Simon Wilkinson Date: Wed Dec 1 17:27:46 2010 +0000 Import mkstemp.c from libroken Change-Id: Idd8688cc731436ff1fe5708e273045b96085e986 Reviewed-on: http://gerrit.openafs.org/3396 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2d2ac3ca5fbd221d297861c0b5c409e9e004545c Author: Antoine Verheijen Date: Wed Dec 1 13:22:45 2010 -0700 OpenBSD: Use Darwin version of afsi_SetServerIPRank() for OpenBSD 4.7 and above. With OpenBSD 4.7, the ia_subnet and ia_subnetmask fields have been removed from the in_ifaddr structure as part of a cleanup that considers them unnecessary. Thus, the version of afsi_SetServerIPRank() that OpenBSD was using no longer compiles. On the other hand, the Darwin version of this routine seems suited to OpenBSD's needs since it doesn't use those fields so we'll use that version for OpenBSD 4.7 and above instead. Change-Id: I27333056378a023e175bddeb637288fc6d1b6e88 Reviewed-on: http://gerrit.openafs.org/3405 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2822416059fe192dc7e3c261b1e93510f2f10f3e Author: Antoine Verheijen Date: Wed Dec 1 11:54:23 2010 -0700 Darwin: Assign correct value to myDstaddr in afsi_SetServerIPRank() The value in sin->sin_addr.s_addr that's assigned to myDstaddr in the Darwin version of afsi_SetServerIPRank() is in network byte order but really needs to be in host byte order. Note: This patch assumes that change I66f5c790d8c55b359e3550b6d71f3abe040a2820 has been previously installed. The patch fails otherwise. Change-Id: I3078da1efb94f87f84dbe357f3272d908818256b Reviewed-on: http://gerrit.openafs.org/3402 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8fa01c4d602fac6d5d81b119d0593f02087e4302 Author: Antoine Verheijen Date: Wed Dec 1 11:37:02 2010 -0700 DARWIN: Fix processing using rx_ifaddr_* macros in afsi_SetServerIPRank() The macros rx_ifaddr_address, rx_ifaddr_netmask, and rx_ifaddr_dstaddress all expand to a call to memcpy() which returns the destination address as its return value. The test in the DARWIN version of afsi_SetServerIPRank() for completion when using this macro, however, seems to assume that success returns zero, which is wrong and results in myAddr, subnetmask, and myDstaddr always being set to zero. This patch corrects this behaviour. Change-Id: I66f5c790d8c55b359e3550b6d71f3abe040a2820 Reviewed-on: http://gerrit.openafs.org/3401 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32226d1454129bacd44f818f6d32d807bc0cc771 Author: Jeffrey Altman Date: Mon Nov 29 17:47:10 2010 -0500 Windows: permit code signing without timestamps If CODESIGN_TIMESTAMP is not defined, permit code signing to occur but do not ask signtool to contact a timestamp server. Change-Id: I801264192caaf871225b001c6f96c0317e115578 Reviewed-on: http://gerrit.openafs.org/3393 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc54175e43ce14c01f9c103541ffad795b17629c Author: Christof Hanke Date: Sun Nov 28 13:01:12 2010 +0100 Unix afsd: Check for mountpoint /afs first Check for the existance of the mountpoint before trying to start. Change-Id: I56c7a69b2b24c465f987e33c3f88c6ac37e40dd0 Reviewed-on: http://gerrit.openafs.org/3392 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a2d1973fc5c2aac05beef5d64e7a486757c54af Author: Marc Dionne Date: Tue Nov 23 19:08:24 2010 -0500 Cache bypass: switch to rx_Readv Tests show that cache bypass doesn't scale very well past a few concurrent processes, with a lot of lock contention in the RX layer. Switching the implementation to the iovec based rx_Readv alleviates much of this. Also take advantage of the fact that the upper layer readpages only sends down contiguous lists of pages, and issue larger read requests and populate the pagecache pages from the iovecs we get back. The loop logic is changed significantly to accomodate the new pattern. Read throughput is improved by about 30-40% for some parallel read benchmarks I use. Along with some other tweaks, it can allow the throughput to be more than doubled. Change-Id: I56877ec15eba035429bd4ea32731687c862f151f Reviewed-on: http://gerrit.openafs.org/3375 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3f69d7247cfbd809aeed1e4d943c2b21da035654 Author: Steve Simmons Date: Tue Aug 31 13:16:15 2010 -0400 More deprecations noted. Change-Id: Id0d15f0f065dbbd82287258175530527e7cde36f Reviewed-on: http://gerrit.openafs.org/2633 Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit ae1d000b71514ab8a62496dd712b8fe4be224e18 Author: Derrick Brashear Date: Tue Nov 16 12:38:06 2010 -0500 external import script should rebase away whitespace and provide an option not to. Change-Id: I3a81de0c4786cfc9e5d4b92bb175528ed1334b90 Reviewed-on: http://gerrit.openafs.org/3315 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0c92add0d74a3e31800387073871ec414cd5ed5a Author: Simon Wilkinson Date: Mon Nov 1 19:19:55 2010 +0000 .gitignore update Update assorted .gitignore files with missing build products Change-Id: Ibeb928b9c2f6abab6f35ed450c5110aee1fc4905 Reviewed-on: http://gerrit.openafs.org/3212 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d8e382df39aa5a92950a1219002a85e5457d8a97 Author: Andrew Deason Date: Thu Sep 9 09:41:40 2010 -0500 vos: Improve release recovery on timed-out trans When a portion of 'vos release' takes long enough that a transaction on one or more RO sites times out, it retries to release to those sites. However, it does not take into account the situation where the transaction on the original RO clone has also timed out, which it usually will have if we took a long time to get to the ForwardMulti stage for any reason. Add a check to see if the clone RO transaction has timed out, and if so, recreate the transaction on it. Check if the volume appears to have changed at all, and if it has, bail out. Change-Id: I7dd69c83e41216246e40159e8d9c1417e15355f4 Reviewed-on: http://gerrit.openafs.org/2726 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8a09c220f4c5f881ea45be585b07b793038924d5 Author: Derrick Brashear Date: Tue Feb 16 01:13:57 2010 -0500 ubik sync client error recovery give ubik server "client mode' error recovery for token errors Change-Id: Ibd6cad6ecf067da7da5724491756576d1ffedb03 Reviewed-on: http://gerrit.openafs.org/3150 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a2c31a754c2d75dcf6a674f365ad50fc40f595ec Author: Jeffrey Altman Date: Fri Nov 26 02:55:03 2010 -0500 Windows: NSIS installer requires the architecture for CL=1400 The NSIS installer at present is 32-bit only. Production releases of OpenAFS have always been performed using the CL=1310 compiler so it wasn't noticed that src/WINNT/install/NSIS/NTMakefile did not define the ARCH (architecture) for the purpose of identifying which redistributable runtime library installer should be integrated into the build. For the CL=1310 compiler there are not prebuilt installers for OpenAFS to integrate. Change-Id: Ide80d5013f55dbcd97b7b099de7066c5afd0df14 Reviewed-on: http://gerrit.openafs.org/3388 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5186e1686f1eaa1f5aaddfaa90da715aba045f67 Author: Jeffrey Altman Date: Fri Nov 26 02:51:16 2010 -0500 Windows: make use of AFSDEV_BIN and set the PATH ntbuild.bat defines AFSDEV_BIN which is set to the list of directories from which executables required for the build process will be executed. However, this value was never used to modify the PATH environment variable. Make it do so. Change-Id: I3ac65a7ceea54cbcf1d2c41f6b0e7af9de960224 Reviewed-on: http://gerrit.openafs.org/3387 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4a6a00d6f45bd0ac94e2eb05adee41552073643a Author: Christof Hanke Date: Sun Nov 21 23:01:53 2010 +0100 check curses-libs by configure Presently, the used curses-library are determined by OS. The leads to a build error when no curses-headers are installed. Use configure to test if curses.h or ncurses.h is present. ncurses takes precedence over curses.h. If neither the curses- nor ncurses-libs are available, do not build afsmonitor and scout. A summary at the end of the configure should make this clear to everyone. The variable TXLIBS has been renamed to LIB_curses. Change-Id: I3f661e0b6199be41818dc22149b061e3d599b77f Reviewed-on: http://gerrit.openafs.org/3345 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c1e874b4e2250438e0e6b0fe54ecd265356b3ee6 Author: Christof Hanke Date: Sun Oct 17 08:54:06 2010 +0200 Add output-table to libafsutil This adds the complex structure Table to libafsutil. All binaries linking to libafsutil can use this to store their output in the table. This table can be sorted by a predefined column. The available output formats are ASCII, CSV and HTML. Change-Id: Id0a00d996a94fee08538226317c60e5bf5082051 Reviewed-on: http://gerrit.openafs.org/1970 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d0acb0a83e4834a1d99457435a4bac684b0047e2 Author: Ben Kaduk Date: Sat Nov 27 00:45:26 2010 -0500 Fix FBSD build after warning cleanups The preprocessor if directive needs a matching endif, not plain end. Change-Id: I423b32326cae60073d110165f94ba278521634ee Reviewed-on: http://gerrit.openafs.org/3390 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a4e4ed9de93d202d21cab4c40d37fcfacc85694e Author: Ben Kaduk Date: Fri Nov 26 23:28:50 2010 -0500 Catch up on FBSD releases Add param.foo.h and sysname entries for the past and forthcoming FreeBSD 7.2, 7.3, 7.4, and 8.2 releases. Also update the MakefileProto.FBSD.ins that need touching, simplifying the libuafs one in the process. Change-Id: I6a7ff217572daac96f6fa6eb104eb7b1305c5ff6 Reviewed-on: http://gerrit.openafs.org/3389 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ebd18bfade80bd66422aad4310375ee460cd1ed5 Author: Ben Kaduk Date: Sat Oct 30 02:23:24 2010 -0400 FBSD: warning cleanups Only declare 'p' if it will be used; other unused variables; signedness mismatches. Kill spl with fire. Change-Id: I03ada8b358f64342bc61bdef03df9dfecc550a6b Reviewed-on: http://gerrit.openafs.org/3200 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a414636a667c395fc0af8270726f238a392fb5d7 Author: Andrew Deason Date: Sun Nov 21 21:20:42 2010 -0500 Utilize --enable-warnings for SUNWspro Add the necessary options for the Solaris Studio compiler to enable more warnings, when specified in the ./configure invocation. Change-Id: I30e2a4a4bddad6beb4c50c3e10775c09916bf0df Reviewed-on: http://gerrit.openafs.org/3367 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 18793d4bfaeb88fd456c8d489165139126c0d293 Author: Andrew Deason Date: Mon Nov 22 22:54:32 2010 -0500 Only specify CFLAGS_NO* with --enable-checking Currently we are always specifying e.g. CFLAGS_NOUNUSED as -Wno-unused when we think we are compiling with gcc. Since autoconf always tries to use gcc when possible, this breaks the build if we have a gcc available but we use another cc for building. This should be fixed otherwise, but in the meantime at least make this only happen if warnings are actually turned on, so the build is less likely to break with a default ./configure invocation. Change-Id: I65d859db1fc0bb0930092fa8cfd6a0577d1c6ce2 Reviewed-on: http://gerrit.openafs.org/3366 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 222067f6f8fd4f596302befbc48918e10547ed1d Author: Andrew Deason Date: Sun Nov 21 18:57:22 2010 -0500 Solaris: Support -i in shlib-build Our librokenafs.map file contains symbols that we may not actually define, since the list of exported symbols varies depending on the platform's capabilities. This causes errors during linking, which can be suppressed by marking all symbols as "= EXTERN". Do so by having shlib-build modify the mapfile at link-time, when -i is specified to indicate ignoring undefined symbols. Change-Id: I043fca6c8206a19fb7bddbc8e624baeaaff3ab00 Reviewed-on: http://gerrit.openafs.org/3365 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit be6fb658fe717469470bcd28c46bee1901c4d96c Author: Andrew Deason Date: Sun Nov 21 21:40:28 2010 -0500 afsd: Remove unused definitions Remove some #defines for s_host and similar things. They are not used anywhere, and they can cause warnings for e.g. s_host being redefined. Change-Id: Ibb549bde4428304c39a67fbfee507e5234a21546 Reviewed-on: http://gerrit.openafs.org/3364 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e4059c1b812410bd96481cc60c86c67f8733b66f Author: Andrew Deason Date: Mon Nov 22 22:23:02 2010 -0500 vol: Move VOL_CV_TIMEDWAIT to volume_inline.h Some platforms will give errors for the vol package glock not being defined in VOL_CV_TIMEDWAIT, since some utilities include volume.h (with pthreaded ubik enabled) but do not have the vol glock. This isn't a problem for the other CV_WAIT (et al) macros, since, being macros, they are not expanded if never referenced. Since VOL_CV_TIMEDWAIT is a static inline function, however, and at least some platforms try to compile/link it even if it's not referenced. So, move it to volume_inline.h, which is only used by the volume package itself, where we will have the vol glock. Change-Id: I3e1513869c03d16d274c23e0bbb075df85d6d3a3 Reviewed-on: http://gerrit.openafs.org/3363 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit af5599483c5496bfc4ef3332899d1fdb0085c8d3 Author: Andrew Deason Date: Tue Nov 23 13:24:16 2010 -0500 FUSE: Link to afshcrypto and crypt afsd.fuse requires -lafshcrypto and -lcrypt, so link to them when linking. Change-Id: Id4bd4caf5e187a1394a62761a1c19caeeeb041cc Reviewed-on: http://gerrit.openafs.org/3362 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 04a5ede2bac8cb366e37d39ca4ea4c7e3b3aa69c Author: Ben Kaduk Date: Tue Nov 23 21:10:16 2010 -0500 Fix build for archs with -lcrypt The linktest utility calls crypt(3), and needs -lcrypt on some architectures. Provide the $(LIB_crypt) argument in the makefile as appropriate. Change-Id: I47b54fa80839062908df2d0a423ad72a628c1e76 Reviewed-on: http://gerrit.openafs.org/3376 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0aa5cdd72f4dd9ec7edba177efde3fb9aaedf58a Author: Simon Wilkinson Date: Mon Sep 6 09:39:59 2010 +0100 aklog: Build a pthreaded, rather than lwp, version Make aklog (and friends) use pthreads, rather than lwp. Change-Id: I49114caa74357b3b35626db6a7439128aec0acb6 Reviewed-on: http://gerrit.openafs.org/3356 Tested-by: Chaz Chandler Reviewed-by: Chaz Chandler Reviewed-by: Derrick Brashear commit 1e03a0fa74cef95a557dc03da20413ee7236d34a Author: Chaz Chandler Date: Thu Nov 25 00:43:28 2010 -0500 Add explicit libafsauthent dependency for aklog Prevents occasional failures with parallel builds by ensuring libafsauthent is built before aklog, which needs it. Change-Id: Ibb0bdda3ce1fa306dfee1343e0b8b97486ee5efb Reviewed-on: http://gerrit.openafs.org/3386 Tested-by: BuildBot Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Derrick Brashear commit 93ab13cbf3cfee30524f63925a11a0ab0c55d600 Author: Derrick Brashear Date: Sun Oct 31 22:21:19 2010 -0400 aklog weak warning make aklog guess when you need to enable weak crypto Change-Id: I5f79e654d2ebcd8500d66d20f00edb49b9d62323 Reviewed-on: http://gerrit.openafs.org/3209 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d29550a438a60dd918938f484c7b75e25478abd9 Author: Andrew Deason Date: Wed Nov 24 10:03:19 2010 -0500 ubik: Log a message when we replay the trans log It can be helpful to know that an interrupted transaction was replayed on startup, and this should be rare. So log a message when that happens, indicating what db version we replayed to. Change-Id: I8b2562dea2811190d1a45ba47f362a2441f39dfa Reviewed-on: http://gerrit.openafs.org/3385 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1e8598b334b4354a3998b1e5fe189f3f33957048 Author: Andrew Deason Date: Wed Nov 24 09:36:05 2010 -0500 ubik: Replay the transaction log label correctly Commit eec0d94f519b3e27f255b9b7a637df043951424e fixed the transaction replay log code to correctly identify valid transaction logs on little-endian systems, but missed ntohl'ing the database label read in a LOGEND opcode. Fix that, so the database is labelled correctly when replayed from a transaction log. And while we're here, actually pass a struct ubik_version* to adbase->setlabel, to make it a little more clear what's happening. Change-Id: I7edc33a4539f3b2fa342335c08f958b5dfb97f57 Reviewed-on: http://gerrit.openafs.org/3384 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0af17e7eccb79dd7d618c98dc0b489d55209df50 Author: Simon Wilkinson Date: Wed Sep 15 11:17:14 2010 +0100 auth: Allow identities in the UserList Extend the userok interface provided by the auth library to permit the addition, deletion and inspection of identities within the UserList. A number of additional functions are added, as direct replacements for their Kerberos v4 only counterparts - these are: *) afsconf_DeleteIdentity *) afsconf_GetNthIdentity *) afsconf_AddIdentity *) afsconf_SuperIdentity In addition, a new function is added to allow the status of any given identity to be queried *) afsconf_IsSuperIdentity New form identities are stored within the same UserList file as Kerberos v4 identities. We take advantage of the fact that the current code skips any entry with a leading whitespace. Identities are stored as a single line, with a leading space, followed by the integer representation of their type (0 for Kerberos 4, 1 for GSSAPI), followed by the base64 encoded representation of their exported name, followed by the display name of the identity. Each field is whitespace separated. For example: 1 BAEACwYJKoZIhvcSAQICAAAAEHN4d0BJTkYuRUQuQUMuVUs= sxw@INF.ED.AC.UK is the representation of the GSSAPI identity "sxw@INF.ED.AC.UK" An addition to the test suite is also provided which will test all of the existing, and new super user manipulation functions. Change-Id: I50648bb1ecc3037a90d623c87a60193be4f122ff Reviewed-on: http://gerrit.openafs.org/3355 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 46a6d6129d80c4027d8a9f0e1d06b32cc12d6367 Author: Marc Dionne Date: Tue Nov 23 18:39:33 2010 -0500 Cache bypass: Only compile bypass code for the Linux kernel Only compile the afs_bypasscache.c code if AFS_LINUX24_ENV is set, since it's currently the only case where the code is actually used. Only sections that caused problems for UKERNEL were previously ifdef'ed. Besides making the code cleaner, the main effect of this change is to prevent compiling most of the bypass code for UKERNEL where it isn't currently used. If support for bypass is added for other platforms eventually, the code here would need to be reworked anyway, ideally abstracting out and moving any OS specific bits into the platform subdirectories. Change-Id: If39294926ea38896ce2dedd1e46b2da0d622cae5 Reviewed-on: http://gerrit.openafs.org/3374 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 9657695d34badaac654227be8c731a1512f2106b Author: Marc Dionne Date: Tue Nov 23 18:21:16 2010 -0500 Cache bypass: remove ifdefs under src/afs/LINUX Compile cache bypass code unconditionally under src/afs/LINUX since it is now always enabled. Also remove syslog messages about a "cache bypass patched module" when loading and unloading the module. Change-Id: Id83487fe9704c5be8a70fc7c60dfe4d864ab27cf Reviewed-on: http://gerrit.openafs.org/3373 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 1de6d5bb0122d00c398202451bf88042ea08aa3e Author: Marc Dionne Date: Tue Nov 23 17:50:25 2010 -0500 Cache bypass: Remove AFS_KMAP_ATOMIC Since AFS_KMAP_ATOMIC is defined unconditionally, remove the ifdefs and the code for the !AFS_KMAP_ATOMIC case. We probably don't want to support this feature on a kernel old enough not to have kmap_atomic. This should exist on all 2.6 and even 2.4 linux kernels. This simplifies the code for maintenance and later changes. Change-Id: I5d111d65066990123db917ac105a5a14db3b305f Reviewed-on: http://gerrit.openafs.org/3372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit b9a0be5b07e750401d9659678d922a729a55ed48 Author: Jeffrey Altman Date: Wed Nov 24 07:29:12 2010 -0500 rx: add rx_opaque and rx_identity exports rx_opaque_new @289 rx_opaque_alloc @290 rx_opaque_populate @291 rx_opaque_copy @292 rx_opaque_freeContents @293 rx_opaque_zeroFreeContents @294 rx_opaque_free @295 rx_opaque_zeroFree @296 rx_identity_match @297 rx_identity_populate @298 rx_identity_copy @299 rx_identity_copyContents @300 rx_identity_new @301 rx_identity_freeContents @302 rx_identity_free @303 Change-Id: Iaf52fdc65178db64c373b2f747ac133fdb713364 Reviewed-on: http://gerrit.openafs.org/3383 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 61ddfbaa19f28bd8b352dea307ab752239470026 Author: Steve Simmons Date: Tue Aug 31 19:21:50 2010 -0400 Update the man pages pod source adding text to discourage use of uss. Usually the text added was a copy of a CAUTION section that had already been added in a few places. This change applies it consistently across all uss-related man pages. In pod1/afs.pod that text would be excessively wordy; a briefer note is used there to direct the reader to the full text. This is a partial fix for RT bug #128018. It does not fully close the bug; the AFS Administrators Guide needs to be updated as well. Change-Id: Id64646d20a9b22c0e11c9654842fa255fb4258ea Reviewed-on: http://gerrit.openafs.org/2637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b43bd696b71535abc24e7023ec3095f0f7e3db06 Author: Heimdal Developers Date: Wed Nov 24 10:59:06 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 5b91f58f350c92fb9eacd1ebac558381b0b8deac (switch-from-svn-to-git-1705-g5b91f58) Upstream changes are: Simon Wilkinson (1): hcrypto: Remove getarg.h include from validate.c Change-Id: Id59ef59c0f521d1266789afb6ee9555319472770 Reviewed-on: http://gerrit.openafs.org/3382 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ea622b0967788801ce2f532a768aaad6267ef37b Author: Jeffrey Altman Date: Wed Nov 17 22:39:12 2010 -0500 Windows: build src/rx/tests Now that we have roken integrated build src/rx/tests as a standard part of the build. Change-Id: Ic2e6e9229f92c302bd4cfaa173c6d1b5e15d9b55 Reviewed-on: http://gerrit.openafs.org/3324 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f5fb20a0e364ee58020e8d4a244752e88ea619fa Author: Heimdal Developers Date: Wed Nov 24 10:35:48 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 9fc90e01b55966b6a3e5a161b4806a5171af789d (switch-from-svn-to-git-1704-g9fc90e0) Upstream changes are: Simon Wilkinson (1): roken: Remove multiple prototype for hstrerror Change-Id: I74c269b37f1b4c39db7de770d56247198c295dfe Reviewed-on: http://gerrit.openafs.org/3381 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5b1a7c35bb41fd7c33f5e1cc4679627ab59d9be2 Author: Jeffrey Altman Date: Wed Nov 24 05:24:43 2010 -0500 Windows: indicate that roken is a dynamic library for roken.h Since the windows build of roken is a dynamic library we must define ROKEN_LIB_DYNAMIC so that roken.h will specific the correct values of ROKEN_LIB_VARIABLE, ROKEN_LIB_CALL, and ROKEN_LIB_FUNCTION. Change-Id: I93a14f355d2f1984722d64fcca14336e1c1ec4d9 Reviewed-on: http://gerrit.openafs.org/3380 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit aa3fae3ba5144f0f47a95306dd6acdea21749383 Author: Jeffrey Altman Date: Wed Nov 24 00:44:52 2010 -0500 Windows: roken getopt renamed to rk_getopt, vars exported Since the function was renamed, modify the export list Add rk_optarg, rk_optind, rk_opterr. Change-Id: I19ffdba5df79293d6a07c9ae6ba476dd77027843 Reviewed-on: http://gerrit.openafs.org/3377 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aa64a29fec4f986300103fd1b3b1a59e1a0de374 Author: Heimdal Developers Date: Wed Nov 24 09:45:03 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to f317b91b1b4b8d030fc2ab188b6aa526e9e7cb84 (switch-from-svn-to-git-1703-gf317b91) Upstream changes are: Jeffrey Altman (1): roken: Prototype getopt Change-Id: I766ff1c19d4dcb74be18ea96d0ea1f24898eb6e9 Reviewed-on: http://gerrit.openafs.org/3379 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa3669ee0bcd8005d684e9077bf7ed1b4ff43e07 Author: Heimdal Developers Date: Wed Nov 24 08:14:40 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 0cc7b890e2632a7cb26517825deb802f79e838f8 (switch-from-svn-to-git-1702-g0cc7b89) Upstream changes are: Asanka C. Herath (3): Annotate exported variables in getopt.c Windows: Support building roken as a DLL Declarations for getopt externs Simon Wilkinson (1): roken: getopt should include roken.h Change-Id: I5ef850bcac7dace3a8206958783ed6fd5830492e Reviewed-on: http://gerrit.openafs.org/3378 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9484302fff64fe9466895fb9629f36b9752744d2 Author: Jeffrey Altman Date: Wed Nov 24 00:44:02 2010 -0500 roken: modify build configuration to permit Windows to work When building roken the library must be built with different ROKEN_LIB_xxx macro values than when the library is being linked against. In particular, ROKEN_LIB_VARIABLE needs to be exported when building and imported when linking. Change-Id: I353c796a81fb92e5066d76a269d8371150d4756c Reviewed-on: http://gerrit.openafs.org/3330 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 467b0fadf75df73593c85b45bf15d8e51bd8ae23 Author: Jeffrey Altman Date: Tue Nov 23 12:18:38 2010 -0500 rxkad: rename bswap32 to octetswap32 In bg-fcrypt.c the bswap32 macro has a name conflict with roken. Rename it to octetswap32. Change-Id: I1466c2abb4883c8856962b232859e49014a04796 Reviewed-on: http://gerrit.openafs.org/3361 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 000fb2e45a126ea864292b4dd85b216cdb9b6ee0 Author: Jeffrey Altman Date: Tue Nov 23 12:11:46 2010 -0500 rxkad: fix bg-fcrypt to work with roken On Windows, roken.h defines iov_len as len and iov_base as buf so that it can use _WSABUF as the iovec structure. This has negative consequences when there are local variables iov_len and iov_base as the same time as there are variables len and buf. This was the case in bg-fcrypt rxkad_EncryptPacket and rxkad_DecryptPacket. As a result, rxkad compiled cleanly but did the wrong thing. This patchset renames iov_len to ilen and iov_base to ibase in order to avoid this issue. Change-Id: Iede2d249b6399fed3e718e782b9bf1315fada93b Reviewed-on: http://gerrit.openafs.org/3350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7c4ee52c1a70838284c1354c654233fa20a341f3 Author: Simon Wilkinson Date: Tue Nov 23 11:31:27 2010 +0000 roken: Add the strsep function Add the strsep function (as rk_strsep) to the OpenAFS roken build. This function is required by Windows, and is now checked for on Unix. Change-Id: I71d8e11a30c34aaa89d85d1e6e527d594d5734af Reviewed-on: http://gerrit.openafs.org/3371 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 655f0523f20333b08669567f5740de2033359427 Author: Heimdal Developers Date: Tue Nov 23 11:22:51 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to bd78baf668eca011257f05fef8334e0967500456 (switch-from-svn-to-git-1696-gbd78baf) New files are: roken/strsep.c Change-Id: I10c99e408db40f6bcdb0e2c243c3016cd2bf1faa Reviewed-on: http://gerrit.openafs.org/3370 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da29c18f1d417e692b8a44d3398dda23ee0b1d91 Author: Simon Wilkinson Date: Tue Nov 23 11:10:32 2010 +0000 Imports: Import heimdal:lib/roken/strsep.c Add Heimdal's roken strsep implementation to the list of files to import into our repository. Change-Id: I27a5f6b95e434a630c0278fc0362dbda6af1321a Reviewed-on: http://gerrit.openafs.org/3369 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa6bbf1d327f6d2e79bb4b95064e14dd301d5bbe Author: Simon Wilkinson Date: Sun Nov 21 10:09:42 2010 +0000 roken: Add base64 functions to libroken Install the base64.h header, and add the base64_encode and base64_decode functions to the library Change-Id: If0ed8fb13cecb6f4a48b4208fbef8c800a5284d5 Reviewed-on: http://gerrit.openafs.org/3354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 097bb407d9dbf5ac62341653917ff8eccd0f3c1e Author: Simon Wilkinson Date: Mon Nov 22 14:21:28 2010 +0000 rx: Store identity type in rx_identity_new rx_identity_new was failing to record the type of the identity, resulting in all identities being marked as Kerberos v4. Change-Id: I35058a3db14874b64d3cad2ffd43db371c34aebe Reviewed-on: http://gerrit.openafs.org/3353 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d3a0537b7772e087437913a115f88c8f48e0348c Author: Simon Wilkinson Date: Sun Nov 21 10:16:26 2010 +0000 rx: Rework identity copying Change the behaviour of the rx_identity_copy function so that it copies the whole identity, not just the contents. Add a new function rx_identity_copyContents which just copies the contents of an identity into an existing identity structure. This restores symmetry with the free and freeContents functions. Change-Id: I692ac8434b1538c283a8ae713956be8ae67cccfd Reviewed-on: http://gerrit.openafs.org/3352 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 76de77c7f9a6f58e7d7e85554decaa2ac959db07 Author: Ben Kaduk Date: Sat Nov 6 00:02:31 2010 -0400 FBSD: close race in afs_root Previously, we called afs_PutVCache(afs_globalVp) directly. This is unsafe because PutVCache acquires locks which can sleep, losing the serialization of the GLOCK. In rare circumstances, this can result in two threads simultaneously making that call, and the second one would panic in vputx() with a negative refcount. Close the race by using a local variable for the afs_PutVCache() calls, applying the change to afs_globalVp before dropping the GLOCK. While here, fix up other race conditions. Change-Id: Id62f27d4469a96c9becd9b031125bd6c910c3e9b Reviewed-on: http://gerrit.openafs.org/3275 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f26f4651516b36263fd1de3c3aaa461ce623e71d Author: Heimdal Developers Date: Mon Nov 22 23:17:18 2010 +0000 Import of code from heimdal This commit updates the code imported from heimdal to bd78baf668eca011257f05fef8334e0967500456 (switch-from-svn-to-git-1696-gbd78baf) Upstream changes are: Jeffrey Altman (1): Windows: Include winsock2.h before ws2tcpip.h Change-Id: I7eca90ad36d84ccec6ac416d82246f6b28f06948 Reviewed-on: http://gerrit.openafs.org/3360 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 53d1fae4c422317dab0b7bf7fb0dedc5eb1f3607 Author: Derrick Brashear Date: Mon Nov 22 11:36:55 2010 -0500 redhat init script fix missing space the if [] needed a space before the ]. fix it. Change-Id: If53524e0c70cccf64b9a53d11a81deebf2c972ec Reviewed-on: http://gerrit.openafs.org/3357 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eee9fe09452a1c05153042dffb5a6c4fbed0fb5b Author: Simon Wilkinson Date: Mon Sep 13 08:24:12 2010 +0100 userok: Allow NULL components in kerberosSuperUser Modify kerberosSuperUser so that it can support callers passing NULL, rather than just empty, instance and cell strings Change-Id: Ifc21eb0c4f562d65519e31db32723c3a2d19b363 Reviewed-on: http://gerrit.openafs.org/3351 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e6a2183f0c21bb12f38962a4c4d61a6511322271 Author: Jeffrey Altman Date: Mon Nov 22 00:05:00 2010 -0500 Windows: update nsis installer for hcrypto and roken Change-Id: I669653fa610908beb33f9a64f05b4d1aa5d28751 Reviewed-on: http://gerrit.openafs.org/3349 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0cbb18ba9dd9637b8747cc7d8b952bf7def06ba0 Author: Jeffrey Altman Date: Mon Nov 22 00:04:23 2010 -0500 Windows: update wix installer for afsroken.dll Change-Id: Ice566d3fe53c2c97bd2703165d8701f34a09cba7 Reviewed-on: http://gerrit.openafs.org/3348 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5264ab83366a5a2825e3f6a8eb4e66736b61b40d Author: Christof Hanke Date: Mon Nov 22 08:39:11 2010 +0100 use intptr_t instead of ifdef Remove another ifdef AFS_64BITUSERPOINTER_ENV from the code. Change-Id: I1b932b892b39b824ba6ef521f0621fd3e7a51c74 Reviewed-on: http://gerrit.openafs.org/3343 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 03ab065e0ccf291d45a93b7d63c022bcad3aac34 Author: Christof Hanke Date: Sun Nov 21 20:09:23 2010 +0100 use computed values in src/gtx/curseswindows.c compiling failed, because of -Wunused-value. Use the return code of wstandout and wstandend and pass it upwards. Change-Id: I6ae101edb36e31247ff772f5dc59104eb7856138 Reviewed-on: http://gerrit.openafs.org/3344 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 811948f5da27becaeea6daf957a797ba383a3b21 Author: Simon Wilkinson Date: Sat Nov 20 10:25:06 2010 +0000 Imports: Add reporting of new and removed files Make the commit message produced by import-external-git.pl also report which files the script added and removed. Whilst this information is available from the patch itself, having it in the commit message makes it much easier to tell what happened when reviewing history through git log. Change-Id: I59e7deb0f4f1e8c22d07222e1789c66c65612992 Reviewed-on: http://gerrit.openafs.org/3334 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 684ce2682e71f2c5078016bec836985c66ea4f63 Author: Simon Wilkinson Date: Tue Nov 2 09:46:05 2010 +0000 hcrypto: Cleanup all build products make clean in hcrypto was missing rand-fortuna_lwp.o. Fix that. Change-Id: I137218ebd8d863fe653ac41aa4de9b71e4ebd76d Reviewed-on: http://gerrit.openafs.org/3218 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit acdef43d818ee56e6c1f1dc29f508c02793c8355 Author: Christof Hanke Date: Fri Nov 19 21:30:21 2010 +0100 use proper 64bit casting for pointer-math building with "./configure --enable-checking --enable-supergroups" fails, because on 64bit, the casting in map.c gives a warning. Just add another ifdef and cast according to the size of a pointer. Change-Id: Icb35d79f56cf8fec48c863061a524f9e29e6acd8 Reviewed-on: http://gerrit.openafs.org/3341 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 01b9cee0d0d4a328b662c0138efcd8506126084c Author: Christof Hanke Date: Sun Nov 21 12:13:34 2010 +0100 remove unnecessary dependency fms in bu_utils is not using curses at all. Just remove the dependency from the Makfile Change-Id: I6d02e60508a2c9b5eb2290c3bf2f9e4ee164fde0 Reviewed-on: http://gerrit.openafs.org/3342 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit e9df8bb9b02cf34aeaf4b67998138126a22704a6 Author: Jeffrey Altman Date: Sat Nov 20 16:53:31 2010 -0500 add src/roken/roken.h to src/roken/.gitignore roken.h is a generated file. Add it to .gitignore Change-Id: I330d08da951efdef01d9751b8ce9bb062dc235f5 Reviewed-on: http://gerrit.openafs.org/3338 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c16ac6ce15cffecbe3ec3d97e384d3e645eb9fc7 Author: Jeffrey Altman Date: Sat Nov 20 16:26:22 2010 -0500 Windows: permit aklog to build with krb4 support and roken aklog.c defined S_ISDIR() which is now defined by roken.h krb4 declared the types uid_t and gid_t which are defined by roken.h. There is no mechanism to disable the declarations within the krb4 header (conf-pc.h) even those the declarations were never required by the Kerberos v4 DLL. The patchset hacks the in tree local copy of the kfw\inc\krb4\conf-pc.h header to avoid the conflict. There is still an annoying warning due to kfw\inc\krb4\krb.h providing a conflicting prototype for gettimeofday() but the function is not used within aklog so there is no harm from it. Change-Id: Icbb326bf8e703957cf4ce9bc991075b90aff6f08 Reviewed-on: http://gerrit.openafs.org/3337 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 45d5f88766fe86e6fd4ef0684ddc26ad7319c927 Author: Jeffrey Altman Date: Sat Nov 20 16:03:31 2010 -0500 Windows: Have get/free addrinfo and nameinfo functions roken defines replacements for getaddrinfo, freeaddrinfo, getnameinfo, and freenameinfo which are provided by winsock. Add HAVE_xxxx macros as required to prevent roken substitution from taking place. Change-Id: I2308f63d78234893a8d5031bf6237cabd5d46bd9 Reviewed-on: http://gerrit.openafs.org/3336 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f917d45906fd20f1427ef5ee4ccdbc60971defa3 Author: Jeffrey Altman Date: Fri Nov 19 12:45:50 2010 -0500 Windows: Add hcrypto to the msi installer Change-Id: Ia89433b82001a7ec369ef7f8e689d40979c61206 Reviewed-on: http://gerrit.openafs.org/3333 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 358f69e561a32133971e5c00d22d7614549acef0 Author: Jeffrey Altman Date: Sat Nov 20 11:47:11 2010 -0500 Windows: more libroken fixes param.i386_w2k and param.i386_nt40 were not updated for libroken as part of e2b4fde0b5850e42cb0ed00852f581fb7d24f8ff Change-Id: Iffb5504150ac46ab430d72ac623c7e2d0fbe39dc Reviewed-on: http://gerrit.openafs.org/3335 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4affa40db8c6c2c9908a77101ee001c3762f9593 Author: Jeffrey Altman Date: Fri Nov 19 00:07:36 2010 -0500 Windows: conditionally set tray icon state If the checkbox IDC_TRAYICON is not present in the dialog, do not attempt to use its value as a setting for Config_SetTrayIconFlag(). FIXES 128591 Change-Id: Iebee8198ec25e1841f6fa49b9850a16329f2cbdd Reviewed-on: http://gerrit.openafs.org/3331 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 75aacd6a10b1ebd426907268aa584bdd1be61833 Author: Jeffrey Altman Date: Wed Nov 17 22:33:48 2010 -0500 more rx/tests cleanups Include roken.h, always reference rx headers with rx prefix, add a resource file for Windows, remove warnings from testclient and testserver. add a .gitignore file. Change-Id: If75560ff9b21dc9a1abf99159d26214eb6b0b9a3 Reviewed-on: http://gerrit.openafs.org/3323 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c77a6ca2460c3e79125a614037824db35480905 Author: Felix Frank Date: Sat Nov 13 00:10:31 2010 +0100 rxgen: add *TranslateOpcode functions to XDR code Administrative commands and server binaries can benefit from the ability to translate RPC OpCode numbers to proper function names. For this purpose, rxgen now emits the function char *PKGTranslateOpCode(int) where PKG is replaced by the respective package prefix. The function is generated in the exact same way that ExecuteRequest is. This way, the right optimization (array storage vs. generated case statement) according to the respective sparseness of OpCodes in the different RX packages is maintained. Change-Id: Ib083597c0841f50518afd2b159b98c0447e13da0 Reviewed-on: http://gerrit.openafs.org/3305 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d37679f4fdb1b10284046c05d2c7b110b37a4120 Author: Andrew Deason Date: Fri Nov 12 10:32:57 2010 -0600 doc: Do not process .in files for html We do not want to process .pod.in files when generating HTML versions of the man pages. Change the filename filtering logic to only accept .pod files, so we'll also skip over all other stuff we don't want, like CVS or fragments directories. Change-Id: Ic7da67dd5297aa52a67a8a0dc0b9cc7904cfa2b4 Reviewed-on: http://gerrit.openafs.org/3302 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit df05b71d9bcbf44865954a07cca4704207706b0a Author: Simon Wilkinson Date: Sat Apr 24 15:43:59 2010 +0100 Use hcrypto for kernel md5 Use the hcrypto code for kernel md5 too. Change-Id: I84663a5e29ef8ce4cb0f20be0604198c13b72c43 Reviewed-on: http://gerrit.openafs.org/2578 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9b8fd81bf14c04d33113e9e4df4e1ca7573e49d Author: Simon Wilkinson Date: Thu Apr 15 18:40:31 2010 +0100 Remove local crypto This change removes all of the local crypto use in userspace, in favour of using our shiny new afshcrypto library. Change-Id: Iac21b42e49bac424cc28c449a31f2da44121b7e5 Reviewed-on: http://gerrit.openafs.org/2577 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a17bf58c08edcda0cb09f20e2e9f9a41105085e0 Author: Simon Wilkinson Date: Sun Oct 31 00:52:06 2010 +0100 Replace bits of libutil with libroken Replace all of the bits of libutil that were originally culled from libroken with libroken originals. Change-Id: I361d7a8d134a361caa2da16963408c74c55a1d4e Reviewed-on: http://gerrit.openafs.org/3211 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 66f5fc4322c578717ef208aa1e969d05e5a9a570 Author: Simon Wilkinson Date: Sat Oct 30 15:27:51 2010 +0100 hcrypto: Use system wide libroken Use the system wide libroken, rather than building our own bits locally, for libafshcrypto. Change-Id: I93eaa3a1d6b9290e30c0892a3313a8eaa639d52a Reviewed-on: http://gerrit.openafs.org/3206 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c953505a5946d615b3fcaf49e4247f9a3d734f93 Author: Simon Wilkinson Date: Mon Nov 1 09:03:43 2010 +0000 Build: Fix broken bracketing in shared Makefile There was a stray ( in the shared library build system. We hadn't noticed this, as the only place that uses the shared makefile and produces binaries is the hcrypto test suite that isn't built by default. Change-Id: I1414c0e1db52307f8ffff4214f411bc028c03fd5 Reviewed-on: http://gerrit.openafs.org/3210 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d0c1696d811c3af4fc8ad693e3873fce81b20626 Author: Jeffrey Altman Date: Thu Aug 12 11:15:58 2010 -0400 Windows: build tsalvaged on Windows Build the pthreaded salvage server on Windows. (This work is not yet complete.) Change-Id: I6c2656131a4e49d2bc5869c21f3aa5056a1f3a66 Reviewed-on: http://gerrit.openafs.org/3328 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ef39934285e95277d3ae94bacc62d59f592209c Author: Jeffrey Altman Date: Thu Aug 12 11:12:51 2010 -0400 Windows: build tptserver on Windows Build the pthreaded ptserver on Windows Change-Id: I556610a7ae7d14e0ec1955e70b72e2edc6912529 Reviewed-on: http://gerrit.openafs.org/3327 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8073ef008b826c520cbb8dc11b2e0708f3d5ec28 Author: Jeffrey Altman Date: Thu Aug 12 11:11:25 2010 -0400 Windows: build tubik Build the pthreaded ubik library on Windows Change-Id: Id6112ef95b60a5f786fa60473ca8ae1a9a3b5201 Reviewed-on: http://gerrit.openafs.org/3326 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fb6b22cf77039962f22f462ee602f0e4a8153817 Author: Marc Dionne Date: Fri Nov 5 17:30:02 2010 -0400 Linux: define llseek operations With kernel 2.6.37 it is now mandatory to define the llseek operation for files and directories. If these are not defined, no_llseek is called, and any attempt to seek returns ESPIPE. Most file systems use generic_file_llseek, but it seems safer to use default_llseek which is what the vfs used to call for us by default. In 2.6.37 these two functions are actually functionally identical. Change-Id: I7ad736e3953c4feaa51afb9f7ff2760c3140373f Reviewed-on: http://gerrit.openafs.org/3292 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit c737d5382b1f3f5dc10eacfe5ecf8a7391f47cf2 Author: Jeffrey Altman Date: Thu Nov 18 00:58:08 2010 -0500 Windows: add roken.h to src/roken cleanup list Change-Id: I09949bfbbdc9def9930696215c58fa94702f1035 Reviewed-on: http://gerrit.openafs.org/3325 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0c2aa7d5f4b769da9ddf7167244bcf8041b9213e Author: Jeffrey Altman Date: Wed Nov 17 21:42:00 2010 -0500 Windows: Add CODESIGN_OTHER option to make signtool rules Some organizations may need to pass additional parameters to signtool.exe. Add the optional CODESIGN_OTHER value to permit arbitrary additional parameters to be specified. Change-Id: Idba3a06585b11b3bb80854049a8ebcd1f7e2550a Reviewed-on: http://gerrit.openafs.org/3322 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 86b7f140e0e3d928a619e08b832ef3ae7690fad7 Author: Jeffrey Altman Date: Mon Nov 15 14:47:22 2010 -0500 volser: remove unused yesprompt function In src/volser/vsprocs.c is an unused function, yesprompt. Get rid of it. Change-Id: Ie87e89f58a0ad0dc37d38fa48a178d19d7459515 Reviewed-on: http://gerrit.openafs.org/3309 Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Tested-by: Jeffrey Altman commit 4f1efdc8b73ed734197925766530d033c6f9794a Author: Jeffrey Altman Date: Sun Jun 6 11:03:44 2010 -0400 Convert from using nvldbentry to uvldbentry The support routines relied upon by vos use the older nvldbentry data structures which do not include the UUID for the server. This patchset updates the code to use the uvldbentry structure so that a future patchset can make use of UUID values when available. Any functions from vsprocs.c which are referenced by vos.c are considered public. This includes all of the VL_xxxx, UV_xxxx and Lp_xxxx functions, the EnumerateEntry, SubEnumerateEntry, and host mapping functions. For any which references an nvldbentry as a parameter a new 'U' version is created that accepts a uvldbentry. These new 'U' functions are then used throughout vos.c and the internal routines. Change-Id: Ib95e4c38574c97284e6b8eee06d92555365a179e Reviewed-on: http://gerrit.openafs.org/2089 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e2b4fde0b5850e42cb0ed00852f581fb7d24f8ff Author: Simon Wilkinson Date: Sat Oct 30 15:17:09 2010 +0100 libroken: Build on windows A minimal change set to get libroken to build on Windows. Sadly, libroken contains definitions for a number of platform compatibility macros which were previously scattered throughout the windows code. These scattered macros have to be removed in order to build libroken. The impact of this removal is that a very large number of files throughout the tree require the addition of "roken.h" to pick up the new compatibility code. The bulk of this change is adding these includes. In addition, some of the added includes add roken dependencies to the Unix build. So, also add libroken to the build rules in affected Unix Makefiles. Change-Id: Ifba431bd37e67b1e273fbc6f69b805a232193456 Reviewed-on: http://gerrit.openafs.org/3205 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ccb6e3a5d64aced06c3ff415806735bddf0a900d Author: Simon Wilkinson Date: Wed Nov 17 12:43:07 2010 +0000 Add snprintf to roken for Unix builds vsyslog on AIX (added to rokenafs by commit f21fbf6b9ce1dfcb0ea1ef52c686d1370c810609) requires rk_*printf, add them to the libroken build. Change-Id: I243cb89b5715be03920c562559b326786a9e9518 Reviewed-on: http://gerrit.openafs.org/3320 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f21fbf6b9ce1dfcb0ea1ef52c686d1370c810609 Author: Derrick Brashear Date: Tue Nov 16 14:04:30 2010 -0500 roken build vsyslog in order to make aix happy, build vsyslog if we have it. Change-Id: I78e7870ed4fef7ee9d41b0ae6096e6c2b1c6cc19 Reviewed-on: http://gerrit.openafs.org/3316 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 901460e50501e7d46fd56f94b96a93b407441532 Author: Heimdal Developers Date: Mon Nov 15 15:35:31 2010 -0500 Import of code from heimdal This commit updates the code imported from heimdal to 387b0fa7baf724cc260559ff8774c04e0e8f7487 (switch-from-svn-to-git-1676-g387b0fa) Upstream changes are: Andrew Tridgell (1): heimdal: fixed a shadowed variable warning for error_message Change-Id: I515500ae3c79b3f87393c5fd4f7640d64104ca53 Reviewed-on: http://gerrit.openafs.org/3311 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef8c3db90ae9ec25705027c609a1bae5f186c4f1 Author: Andrew Deason Date: Wed Nov 10 09:11:47 2010 -0600 Use afs_foff_t for file offsets Some callers in vol and volser were not using afs_foff_t for file offsets for calls to STREAM_ASEEK, FDH_TRUNC, FDH_PREAD, or FDH_PWRITE. Most notably, in code for volume cloning, purging, and dumping operations. Fix them to use afs_foff_t to prevent errors when dealing with large special files. Change-Id: I531fa8cb3070007a9c03e5e19c70d546f272a12c Reviewed-on: http://gerrit.openafs.org/3289 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit b2e0017eba395999fbb74a79a9d31685a1edb936 Author: Derrick Brashear Date: Mon Nov 15 15:28:00 2010 -0500 import vsyslog from roken for AIX AIX wants vsyslog. pull it in Change-Id: Ia4160f10bd7b1fd3399e71f3abc49146be57a20b Reviewed-on: http://gerrit.openafs.org/3310 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c07b47169adb85621c328a3687ea62ef84e43bb1 Author: Anders Kaseorg Date: Sat Nov 6 03:17:17 2010 -0400 Linux: Fix prototypes for afs_xsetgroups and sys_setgroupsp and friends Fixes some “warning: function declaration isn’t a prototype”, and makes the prototypes consistent with the corresponding definitions. Change-Id: I7dce475800b585c3cc8a735d0a2f92ca339c9fac Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3278 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 90679bf5118557970f00b98dcab0032d3580deb6 Author: Hartmut Reuter Date: Fri Nov 5 11:31:28 2010 +0100 RXOSD and VICEP-ACCESS fields and bits in afs.h struct vcache gets two new fields: int protocol which in the lower 16 bits contains the protocol number 1 classical rx-fileserver, 2 rxosd, 4 direct access to visible vicep partitions. void *vpacRock which for visible files in a vicep-partition contains a pointer to a struct known only inside afs_vicep.c which contains the pointer to the open file and other information. Change-Id: I9d471a010d99bfa53ac59be3e7daad72e29d02ee Reviewed-on: http://gerrit.openafs.org/3013 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 14980b477822ecc66e95f8c2a71f0fc11839afbd Author: Anders Kaseorg Date: Sat Nov 6 03:15:06 2010 -0400 Linux: Fix prototypes for sys_setgroups_stub and sys32_setgroups_stub Fixes “warning: function declaration isn’t a prototype”. Change-Id: Idfff2a19496ee7d848800c3b913d779e52187021 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3277 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a0cc81c0894193db11860d8fe40380c7198741a9 Author: Andrew Deason Date: Wed Sep 1 15:10:56 2010 -0500 ubik: Record the last write tid in writeTidCounter ubik is currently tracking writeTidCounter for write transactions separately from regular transactions (assigned from tidCounter). Specifically, tidCounter is incremented twice for each transaction, but writeTidCounter is incremented twice only for write transactions. As a result, writeTidCounter and tidCounter tend to drift far apart. This is a problem, since the tid for DISK_* calls uses the transaction id of the current transaction (based on tidCounter), and VOTE_Beacon uses writeTidCounter for its transaction id. So, in effect, the tid in VOTE_Beacon is completely bogus and unrelated to the transaction id of the actual current write transaction. This can cause valid write transactions to become invalidated when tidCounter becomes negative, since VOTE_Beacon will send a positive tid, and if there is a current in-flight write transaction with a negative tid, SVOTE_Beacon will deem the transactions inequal and will abort the write transaction. So instead, record the transaction id counter for the last write transaction in writeTidCounter. This way, when we call VOTE_Beacon, we will use the correct transaction id counter for the current write transaction, and SVOTE_Beacon on the remote site will not invalidate the transaction. Change-Id: I66f290d21fefdfcf9bd9deb704eefff987fe6970 Reviewed-on: http://gerrit.openafs.org/2647 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bdbc4494602cf142e2dc046a234dd4ba8610cd51 Author: Derrick Brashear Date: Thu Nov 11 18:48:18 2010 -0500 avoid requeueing callbacks during shutdown when linux calls osi_linux_free_inode_pages we can try to queue a vcb. this is foolish as we are shutting down. so, don't. Change-Id: I18290396d9107455453de28097e7fad58526ae06 Reviewed-on: http://gerrit.openafs.org/3297 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 00023f168e0e097c6a7e9da4450a009e4818a1a5 Author: Andrew Deason Date: Wed Nov 10 15:35:17 2010 -0600 afscp: Add -s option Add an -s option to afscp, to specify an amount of time to sleep in the middle of a read or write operation. This can be helpful in simulating a slow client. Change-Id: I51228033ff485a92a7805a76e2d6645ec4123495 Reviewed-on: http://gerrit.openafs.org/3291 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3ecd65d3375f0a4fa4c28f9b59cdf6a1f6fd51b8 Author: Rainer Toebbicke Date: Mon Nov 8 21:59:09 2010 -0500 Lockless path through afs_linux_dentry_revalidate Permit a popular path through afs_linux_dentry_revalidate to pass without taking a lock which it actually does not need. This affects multi-core software-build nodes in particular, where serialization and high stat() counts restricts useful processing to a single core. Change-Id: I6151a1240519d9f91f6e258af71b797ce276f4e1 Reviewed-on: http://gerrit.openafs.org/3298 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f7a51aa5115a9073771bc396e25d510aeae71e8 Author: Andrew Deason Date: Tue Oct 12 17:46:36 2010 -0500 viced: Add options for interrupting clients Add the -offline-timeout and -offline-shutdown-timeout options to the fileserver, to implement interrupting clients accessing volumes we are trying to take the volume offline. Document the new options. Currently this is only implemented for read operations. Implementing this for write operations and callback breaks will require more work. This also removes the VGetVolumeTimed interface from the volume package, since the fileserver was the only user and with this change the fileserver now uses the VGetVolumeWithCall interface. Change-Id: I2c6246d522d37dfd2fa0ecf69d6f71803b2acc03 Reviewed-on: http://gerrit.openafs.org/2984 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 57a5da63439c2e2b88dd32dc8aa42dc2f6eef116 Author: Andrew Deason Date: Fri Oct 29 11:29:37 2010 -0500 vol: Interrupt RX calls accessing offlining vols When we are waiting for a volume to go offline, only wait a certain amount of time for it to go offline before we interrupt all RX calls associated with that volume. This amount of time is configurable in the new offline_timeout and offline_shutdown_timeout volume package option fields. Change-Id: Ib6beb3c37f44dcc067c1c94506804f61752cc4ff Reviewed-on: http://gerrit.openafs.org/3216 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 33409b2c849d7fae3b10b3202bb15e338ae5b982 Author: Andrew Deason Date: Fri Oct 29 11:14:49 2010 -0500 vol: Add interfaces for registering RX calls Add VGetVolumeWithCall and VPutVolumeWithCall, to associate RX calls with volume heavyweight references. Also add the interrupt_rxcall field to the volume package options structure. This also adds the VIsGoingOffline function, so a caller can tell when a volume is going offline. Change-Id: Iacb7738775c8e3aa611360320ca739f5de4ba625 Reviewed-on: http://gerrit.openafs.org/3215 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit db6ee95864a8fc5f33b7e95c19c8ff5058d37e92 Author: Andrew Deason Date: Wed Oct 27 17:34:40 2010 -0500 vol: Add VGetVolumeTimed Replace the VGetVolumeNoWait interface with the more general VGetVolumeTimed interface, which allows for waiting for offlining volume for arbitrary amounts of time (instead of just "waiting forever" or "not waiting at all"). Also add VOL_CV_TIMEDWAIT and VTimedWaitStateChange_r as necessary to implement this. Change-Id: I3d9ea7a89f16ec5fd185eae7679e84033eb2d581 Reviewed-on: http://gerrit.openafs.org/3214 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 9266a08d8c77376c95085b16af492f9b055873a4 Author: Jeffrey Altman Date: Sun Nov 14 00:00:22 2010 -0500 Windows: ktc_ListTokensEx stub assignment error Improper use of == instead of the intended = within ktc_ListTokensEx. Change-Id: Id8b49ef91d83000c0685a37bab4a2ca44fc037b4 Reviewed-on: http://gerrit.openafs.org/3304 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 919c31ecad5633efdf24a747839e926573629c7f Author: Jeffrey Altman Date: Sat Nov 13 23:58:46 2010 -0500 Windows: clean token.h/token.xdr.c from src/auth The new token interface generates token.h and token.xdr.c from token.xg in the src/auth directory. Add the missing clean target for these files. Change-Id: Ic689a5cad3643b450963f10abee725e0010f1e15 Reviewed-on: http://gerrit.openafs.org/3303 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 88fc9ada4cfaee354199480916d139400ee0ef5b Author: Andrew Deason Date: Thu Sep 30 12:39:22 2010 -0500 viced: Allow checkout of VOL_STATE_DELETED volumes The fileserver allows nonexistent volumes to be checked out. Since VOL_STATE_DELETED volumes conceptually do not exist, we should also allow them to be checked out. Change-Id: Ibc0f761569b339579acff03a3cbd9f795f783e0a Reviewed-on: http://gerrit.openafs.org/2873 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4669a55b58ddb6905424c4f8123d7e631f52eb35 Author: Andrew Deason Date: Fri Nov 12 10:03:43 2010 -0600 doc: Fix fileserver synopsis The fileserver synopsis was missing the leading 'fileserver' before the options list. This causes the options list to not be interpreted as POD, and so you get a lot of ugly unprocessed POD markup in the man page. Fix that. Change-Id: I8e2faf6d46a81185967d30b1669d3f48cbf269dd Reviewed-on: http://gerrit.openafs.org/3301 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ec9675bed293c0321cb5dbddbdb02d47e955ccc6 Author: Hartmut Reuter Date: Thu Nov 11 16:12:18 2010 +0100 Use port in ugen_ClientInit Use the port information in ugen_ClientInit also if no server was specified and info.hostAddr[i].sin_port is not set. Change-Id: I7f53f1bea0b034018d44acf0d0ae3b3a39b85134 Reviewed-on: http://gerrit.openafs.org/3293 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8078c4dcf2dd5a922225f0e37babf1b357b5e72d Author: Andrew Deason Date: Wed Nov 10 15:21:07 2010 -0600 afscp: Always show fetch/store errors When we get an error from a fetch or store operation, show what the error was, instead of just saying "some network error occured". Change-Id: I4b1baca0e1b11bd048014ef2b4f4789c7813f0e7 Reviewed-on: http://gerrit.openafs.org/3290 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 97474963e58253f8c891e9f6596403213d53527b Author: Andrew Deason Date: Thu Nov 11 14:45:04 2010 -0600 vos release: Avoid full dump on all sites Commit 9fed169b1c5c823fd96cea94daf712b2cf06c901 attempts to remove any remote RO site that has RO_DONTUSE set. However, we set RO_DONTUSE on all sites earlier in the release process if this is a full release, resulting in all sites getting a full dump. Correct this by remembering in 'origflags' what flags each site has before we messed with the vldb entry. Thanks to Mike Meffie. Change-Id: I8c9582c9f7aaee92637ddc1ad11aed96fd69686b Reviewed-on: http://gerrit.openafs.org/3296 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie commit 6d5c1873b5d62539f355e361d8c0eb0377375b44 Author: Andrew Deason Date: Thu Jul 29 17:02:38 2010 -0500 Fix util test dependencies The test programs in tests/util did not depend on libutil.a or libtap.a. So, if libutil.a changed, they were not relinked. Add the dependencies so correcting a part of libutil will cause the tests to actually reflect the change. Change-Id: Iad9d15ef6affd8178d7ef7cb919f66dcce8c61da Reviewed-on: http://gerrit.openafs.org/2484 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c8dc68299d47ae4d7f0c9a1354de9ddd37ff86fc Author: Michael Meffie Date: Thu Nov 11 12:17:05 2010 -0500 viced: fix missing host lock in h_Enumerate The global host lock must be held over h_Release_r. Fix the the case in h_Enumerate where h_Release_r is called without the global host lock held. Change-Id: I010338edf0a515f543e3468afff907e97eb07163 Reviewed-on: http://gerrit.openafs.org/3294 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fabd590cc4b0142fe97c4ffa6a4669fe5d44c359 Author: Andrew Deason Date: Wed Sep 29 11:48:44 2010 -0500 salvager: Do not break cbks when salvaging parts When salvaging whole partitions / whole servers, the fileserver is assumed to not be running. So only break callbacks if we are salvaging a single volume. If we are salvaging a whole partition, do not tell the fileserver to break callbacks on changed volumes, since the fileserver will not be around and we will just hang. Change-Id: Ia158d5a00574a6907b9b040510ef7d827a2ee05d Reviewed-on: http://gerrit.openafs.org/2865 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 19d2e0e34b5f100fdbec1da8373badd624c02248 Author: Tom Keiser Date: Thu Oct 14 01:24:03 2010 -0400 vol: make namei_ListAFSSubDirs deal with multiple/bad linktables The salvager ends up deadlocking when multiple linktables exist in the same volume group special directory. The issue is that we open and flock all discovered linktables, but only close out the last one found. Consequently, when our child scans the linktables again, we deadlock against the locked and leaked descriptor(s) our parent left around before forking. While we have so far been unable to root-cause the actual creation of spurious linktables, this patch will at least stop the salvager from deadlocking against itself when this occurs. Change-Id: I67821f2c99663c56e4ec0b008e1d2d3a8751df0e Reviewed-on: http://gerrit.openafs.org/2979 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f9409fcdffa594aff9530038a5ac81a2495da3b6 Author: Alejandro R. Sedeño Date: Fri Nov 5 17:24:43 2010 -0400 Linux: use DEFINE_MUTEX for afs_linux_alloc_sem on newer kernels DECLARE_MUTEX is gone as of 2.6.37; afs_global_lock switches from DECLARE_MUTEX to DEFINE_MUTEX at 2.6.16, so do the same here. Change-Id: If2ea5e1d3b5406c631cade1128425b5be79ffd4a Signed-off-by: Alejandro R. Sedeño Reviewed-on: http://gerrit.openafs.org/3273 Reviewed-by: Marc Dionne Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8ec31f26770ef1e85fb3a6005467f0e2d3ce1715 Author: Marc Dionne Date: Sun Nov 7 13:14:55 2010 -0500 Cache bypass: make readpage deal with reads at end of file When a file's size is an exact multiple of the page size, the vfs will issue a readpage for an extra page at the end, for which there is no data. Deal with it here instead of letting it trickle down to the background daemon, which will issue an unnecessary read to the server, and maybe get confused because there is no data. Change-Id: If86ed785c4e9d50edb1a960142f726fa869c50fc Reviewed-on: http://gerrit.openafs.org/3281 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5988923898e15cb50d550e54119869b38cb5bc5b Author: Andrew Deason Date: Thu Sep 30 11:34:59 2010 -0500 volser: Do not FSYNC_VOL_DONE temporary volumes Currently, the volserver just looks at the destroyMe field in a volume header to see if it should tell the fileserver a volume has been deleted (FSYNC_VOL_DONE opcode). However, temporary volumes created by the volserver (such as new volumes or clones) have destroyMe set, but are obviously not deleted, and so the fileserver should just be told FSYNC_VOL_LEAVE_OFF about these volumes instead. With commit bb9caf9822a53ad07cd3a5d6cea7f6b7eeeedd59, FSYNC_VOL_DONE and FSYNC_VOL_LEAVE_OFF actually do different things, so this does make a difference. Note that this commit slightly changes the meaning of the vp->needsPutBack field. Now it must be set to VOL_PUTBACK_DELETE to tell the fileserver that the volume has been deleted, and set to VOL_PUTBACK if it just needs to be given back to the fileserver. Change-Id: I020679c853b93593e5c75c4f30ac56312ba0f8d6 Reviewed-on: http://gerrit.openafs.org/2872 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b6b2b3cab09eacf9b03638d8770c83aeb0b8fea Author: Marc Dionne Date: Sun Nov 7 13:35:36 2010 -0500 Cache bypass: adjust read size for non-contiguous readpages The bypass code's readpages does deal with a non-contiguous list of pages, but it doesn't adjust the size of the read it requests from the background daemon accordingly. As a result we'll ask the server for pages we were not asked to read. Change-Id: I5468a4a68f4f415961298144f5bb581faeda540a Reviewed-on: http://gerrit.openafs.org/3282 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: BuildBot commit df682aa34170d285247c5486050db3ee7d3774f0 Author: Jeffrey Altman Date: Mon Nov 8 11:07:14 2010 -0500 rxperf: use parallel connections When the number of threads exceeds RX_MAXCALLS allocate additional rx connection objects. Change-Id: Ib935b453672e68b88ec816770990070514c48222 Reviewed-on: http://gerrit.openafs.org/3285 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cb7a5ce44470112d3ba5e341322bb9e7d029e101 Author: Simon Wilkinson Date: Sat Nov 6 15:18:14 2010 -0400 RX: rxi_PrepareSendPacket drops call lock; WaitforTQ required Since rxi_PrepareSendPacket drops the call->lock during processing the caller must perform a rxi_WaitforTQ prior to manipulating the transmit queue. Change-Id: Icd16444d84235c1fb647bf96bd85706c7396a4bb Reviewed-on: http://gerrit.openafs.org/3279 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e890f090e11d09b6e6b929642cbd92a56fb6e66e Author: Andrew Deason Date: Fri Nov 5 16:48:28 2010 -0500 vol: Do not give back not-checked-out vols VAttachVolumeByName_r has logic to give back a volume over FSSYNC if we checked out a volume but failed to attach it for whatever reason. However, the logic used for determining if the volume was checked out or not is a bit inaccurate (even moreso than the comments imply), potentially causing us to VOL_ON volumes that don't exist at all. Instead of trying to guess based on various conditions whether or not we checked out the volume, keep track of a variable that is only set when we actually checkout the volume from the fileserver. Then only give back the volume if it is set. Change-Id: I03197eca3e1a31a4b9566552eb9032fdc7cc5909 Reviewed-on: http://gerrit.openafs.org/3274 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e4250dc64eb26b5da1480e9f5bd58d016f81847f Author: Marc Dionne Date: Sun Nov 7 15:06:16 2010 -0500 Cache bypass: release and unlock pages when we get 0-length reply In some cases, such as reading past the end of file as known to the server, fetchdata will get a 0 length reply. Deal gracefully by unlocking and releasing any pages reserved by readpages. Failure to do so here leads to deadlocks later as we can exit with some pages still locked. Change-Id: Ic9e496c8c64d5e94f2cf9976d160ef5873f27249 Reviewed-on: http://gerrit.openafs.org/3283 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f78b29b900028d67c51de7ae6c9e46b94602196c Author: Simon Wilkinson Date: Fri Oct 1 09:36:06 2010 +0100 rx: Reorganise includes RX files were including the same header set in three different places, once for user-land builds, once for kernel builds and once for ukernel. The duplication was a bit pointless, and really frustrating when adding new headers. So, reorganise the includes so that we only list headers that are used in all three builds in one location. Also take the opportunity to indent the #ifdefs so that it is clear what is going on, and to remove some more of AFS_OSF_ENV and AFS_AUX_ENV from kernel builds. Change-Id: Ic2b5d39de4dd406bbc0acaa29fc876ac882ccf10 Reviewed-on: http://gerrit.openafs.org/3160 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 27f00bb29665d6a9c725817f105cfba48af4adbe Author: Michael Meffie Date: Fri Nov 5 08:27:37 2010 -0400 Windows: fix keystroke delay in waitkey Fix the keystroke delay in the pthreaded wait for key function. Change-Id: I79293ceca57a418d23b0a211f875c17b805f9391 Reviewed-on: http://gerrit.openafs.org/3268 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aac929badb5e40a59ae77ae69fc43df8f6f376fc Author: Michael Meffie Date: Thu Nov 4 09:26:25 2010 -0400 avoid private stdio fields in waitkey Use the stdio_ext functions provided by solaris and glibc instead of directly accessing private stdio FILE structure members. This is needed for 64-bit solaris builds and is more portable in general since the FILE structure is meant to be opaque. Remove the duplicated code in the pthreaded butc package. Change-Id: Idbefa88e2563bb117322e818b1300b324fc3626d Reviewed-on: http://gerrit.openafs.org/3257 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef4b9e13ef6a79d7e5f540297e486189fdedf085 Author: Andrew Deason Date: Fri Nov 5 14:34:05 2010 -0500 DAFS: Do not let VScheduleSalvage_r free vp In VScheduleSalvage_r, we were calling VCancelReservation_r, which has the possibility of free'ing vp. Since we still use vp after doing this (and since we're already inside VCancelReservation_r to begin with), we must not free vp. Instead, just decrement nWaiters without triggering any of the dtor code in VCancelReservation_r. This is safe as long as all VScheduleSalvage_r callers ensure that they check to free the vp if necessary, which they all do. Thanks to Derrick Brashear. Change-Id: Iebdbdf47c6307cd7c036b88ad4dbc25bc7a3279a Reviewed-on: http://gerrit.openafs.org/3272 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8d1fe61f4a0d906d4086b71c88b0a3ab278b12c Author: Derrick Brashear Date: Thu Oct 28 01:03:49 2010 -0400 merge ntops and namei instead of having 2 implementations of nearly the same thing, merge what we can. this can get closer, probably, but this is a start. Change-Id: I8446649e37ab0856e6e40933a44a35edbc708638 Reviewed-on: http://gerrit.openafs.org/3180 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bb1dd6c95025b40d64f8ea4deeeba3c3c1f10a50 Author: Jonathan Billings Date: Fri Nov 5 09:38:43 2010 -0400 RedHat: Remove potpourri.h from RedHat SPEC file manifest potpourri.h is no longer needed, so it should be removed from the list of files to be installed. The missing file was causing the RPM package build process to fail. a reverse-cherry-pick of fb7e276efdf1c68144c8d210582c0b66ab1ab081 Reviewed-on: http://gerrit.openafs.org/3267 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: Ib4c585130da68f0bb8cab8eb8ffdb7d8980a11d9 Reviewed-on: http://gerrit.openafs.org/3270 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f2c6ae300a211460c24c87752cf9400b9e61ee1f Author: Marc Dionne Date: Thu Nov 4 20:49:41 2010 -0400 Cache bypass: Fix oops in bypass transition functions The FCSBypass flag might change between the time we check it before entering afs_TransitionToCaching or afs_TransitionToBypass and when we check it again within the functions. Instead of panicing, just exit if someone beat us to it. Also move the checks within the write lock region to make sure the code doesn't get run multiple times. Change-Id: I4319896e522d0681c548299d2bd547e71998cc88 Reviewed-on: http://gerrit.openafs.org/3266 Reviewed-by: Jeffrey Altman Tested-by: Marc Dionne Reviewed-by: Derrick Brashear commit 732a4c52d5e4836d8219dd03c2e9e17e89e395a5 Author: Andrew Deason Date: Thu Nov 4 12:07:17 2010 -0500 RX: Fix old rx_stats incrementors A couple of places were still trying to increment rx_stats members by just ++'ing them. Update them to use rx_atomic_inc. Change-Id: I35f5b24a08952d308074851623b06580e4b2b93b Reviewed-on: http://gerrit.openafs.org/3263 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 354d21878ed401c644a5392f86af3fe6e660801f Author: Andrew Deason Date: Thu Nov 4 11:46:10 2010 -0500 krb5_free_string takes a krb5_context Give krb5_free_string a krb5_context, not just the string to free. Change-Id: Ic24794286716669679ea278d20b279a458683103 Reviewed-on: http://gerrit.openafs.org/3262 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e8c93c424fc6bd936386f745b50e0a77384ad14d Author: Andrew Deason Date: Thu Nov 4 11:37:31 2010 -0500 tsm: Make explicit rules for stem-changing targets If the stem changes for generating a .o from a .c file, implicit/suffix rules will not apply. That is, if we specify the dependencies for 'bar.o' in a Makefile as so: bar.o: foo.c This will not match an implicit .c.o rule, since the filename stem changes. We must add an explicit AFS_CCRULE invocation to make the rule do anything. This fixes this problem for the src/tsm41 directory. It may exist elsewhere, but it's difficult to find unless the build breaks. Change-Id: I090c074beec120201f334b8bc613170cd4345dde Reviewed-on: http://gerrit.openafs.org/3261 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d6860c852296d96eac2785739bcfb9de76cd92d Author: Andrew Deason Date: Thu Nov 4 10:57:30 2010 -0500 UKERNEL: f_fsid is a struct on AIX The statvfs f_fsid member is a struct with two fields on AIX when _ALL_SOURCE is defined (which we define to get various extensions). So in the AIX case, use it as such a struct instead of a single integer. Change-Id: Ibd94d6b38b0cdc08b5812fe29e4e93344765ff05 Reviewed-on: http://gerrit.openafs.org/3260 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8401d0281f833638c1cfc5cb862d77fe97232ecb Author: Andrew Deason Date: Thu Nov 4 10:33:17 2010 -0500 afsd: Pass cacheMountDir to aix_vmount cacheMountDir is no longer global, so aix_vmount() needs it passed as an argument. Do so. Change-Id: I26c56b49f5ec675277d137424f672f0b727f705d Reviewed-on: http://gerrit.openafs.org/3259 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f4460e1e9efb562ae194a40aa0827423142e048 Author: Andrew Deason Date: Thu Nov 4 10:30:31 2010 -0500 Use termios.h for winsize test where available The configure test for 'winsize' existence was using sys/termios.h, but some platforms (AIX) have termios.h but no sys/termios.h. So, use termios.h instead where available. Change-Id: I284b7fa27ceeed84d9e14b62032176846d764bf2 Reviewed-on: http://gerrit.openafs.org/3258 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6f1da57603cf86109e096001018ba9b0f1dd18b5 Author: Marc Dionne Date: Tue Nov 2 18:14:07 2010 -0400 volser: add missing Makefile dependencies Add some missing dependencies in the volser Makefile to prevent trying to compile while a header file is still being generated. This caused parallel make errors on some slower systems. Change-Id: Ieab26cf03a86e340f442d683512a7326eec7834d Reviewed-on: http://gerrit.openafs.org/3244 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 2ea841feac2de8ade987c18cb7043aacfebe0d83 Author: Marc Dionne Date: Tue Nov 2 20:54:20 2010 -0400 Linux: 2.6.37 - replace get_sb with mount With kernel 2.6.37 the new entry point for mounting a filesystem is the mount() operation instead of get_sb(). Replace afs_get_sb with afs_mount if the new operation is available, and use mount_nodev instead of get_sb_nodev. Note that this is not strictly required for 2.6.37 since the old interfaces are still around, but we might as well switch now. Change-Id: Icc73a552fd53148bdd7b84e6d3266491488d9ed2 Reviewed-on: http://gerrit.openafs.org/3245 Reviewed-by: Marc Dionne Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 951612f4508b0c2ace4676f263df8dd4b566dd44 Author: Hartmut Reuter Date: Tue Nov 2 12:15:42 2010 +0100 Make osi_fetchstore.c protocol independent For future use of OSD and vicep-access osi_fetchstore.c should not depend on the rx-fileserver-protocol but call instead the routines pointed to by ops. Some code beautyfication in afs_fetchstore.c to use nBytes instead of code. New global variable afs_protocols in afs_fetchstore.c which will be used in RXOSD/VICEP-ACCESS programs in the future. Change-Id: Id6b6e6c794b4fb00ad4719670caefd381f98949b Reviewed-on: http://gerrit.openafs.org/2952 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c61e1aeeef8f81f75084f457e4d6e5e1d754cfa5 Author: Rod Widdowson Date: Fri Oct 29 14:21:37 2010 +0100 Docs: Specify where the Windows mini dump file is written Change-Id: Ia97bc5f22f10c35e2d2928ca8ed618583f06563e Reviewed-on: http://gerrit.openafs.org/3187 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d5ce8d19ace9b87816dd36663420136f5f2ad746 Author: Derrick Brashear Date: Tue Nov 2 14:47:35 2010 -0400 rx mutex inversion fix as discovered by Benjamin Kaduk, we were usually holding rx_refcnt_mutex but briefly, and here we held it longer, and thus around acquiring freepktQ mutex. undo it by simply setting STATE_RESET sooner as newcall does. Change-Id: I3ae6fce1832d79c7cf17e93831cf8f30aebeb82b Reviewed-on: http://gerrit.openafs.org/3219 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 862e29a98aee72918fc25e960556f732ba80522c Author: Jeffrey Altman Date: Tue Nov 2 16:16:20 2010 -0400 Windows: Do not leak cm_volume_t objects from the LRU queue During cm_volume_t object recycling the object is removed from the LRU to ensure that a single object is not recycled by multiple threads at the same time. Before cm_FindVolumeByName() exits the object must be re-inserted into the LRU if it is not present. LICENSE MIT Change-Id: I3feb3fb55beddffdbbf52a79efcc8d44af39b891 Reviewed-on: http://gerrit.openafs.org/3220 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 58901738ad6280d0777dd8e77f8c09cc45da04bc Author: Jeffrey Altman Date: Thu Oct 28 00:37:03 2010 -0400 vol: attach2 must always return with VOL_LOCK held attach2() is required to return with the VOL_LOCK held even though it is called without it. This must be true for error conditions as well. Not all error paths are obtaining the VOL_LOCK before returning. Add out paths for lock held and lock unheld error cases. Change-Id: Ib6a05a9bafd9eb3a26a1dd3881d19baa6d59a05e Reviewed-on: http://gerrit.openafs.org/3177 Tested-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c120f5c9b64a1333f965125dcfc435e922b47356 Author: Chas Williams (CONTRACTOR) Date: Sat Oct 30 18:10:34 2010 -0400 afs: minor cleanup for LINUX struct vcache mapcnt is no longer used in either linux client and should be removed to save a little space/sanity. Change-Id: Iea734fcbcb7bb639ea080de7b5bf70238bcb60f2 Reviewed-on: http://gerrit.openafs.org/3207 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear commit 0aa7fac246ce044c757530ebe96d3a05c2f33894 Author: Andrew Deason Date: Fri Jul 2 16:57:42 2010 -0500 DAFS: Fix demand-salvages of attached volumes Currently, when an error is encountered for an attached volume, we call VRequestSalvage_r, which makes the volume go into the VOL_STATE_SALVAGING state. This state implies that the volume is offline, however, which is not necessarily the case if we're calling VRequestSalvage_r from, for example, VAllocVnode_r or VUpdateVolume_r. So now, make a new state called VOL_STATE_SALVAGE_REQ to indicate when a salvage has been requested but the volume is not offline yet (and thus is not yet ready to give to the salvager). If VCheckSalvage finds a volume in this state, it offlines the volume first. The FSSYNC VOL_OFF handler now checks for this state, and if we're giving the volume to the salvager, we wait for the volume to exit that state. VRequestSalvage_r also gains a new flag, VOL_SALVAGE_NO_OFFLINE. This is to ensure that the existing salvaging code paths for unattached volumes does not change (for when VRequesetSalvage_r is called from attach2). If this flag is passed, we do what we used to do, which is just salvage the volume without offlining it. Change-Id: Ie709ac7013ab2b52c87fa408c254651abe5e6af3 Reviewed-on: http://gerrit.openafs.org/2329 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 138ac6577eab40e25a796f7c18f3c39add000ed2 Author: Andrew Deason Date: Mon Nov 1 15:34:26 2010 -0500 Cleanup VOffline log message for non-DAFS Commit fd592c7674d4aa44dda90998b54d7b56947f6ed8 fixed the 'Volume X (Y) is now offline' message for DAFS, but the same problem persists for non-DAFS. Fix the non-DAFS case. Change-Id: I7b19a3c2cad8b7233eb03a83598f9bf95db5ac65 Reviewed-on: http://gerrit.openafs.org/3213 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 81602ffa3b6d981ab96ca17d970e585b7be28e6d Author: Andrew Deason Date: Mon Nov 1 17:30:20 2010 -0500 QSG: DAFS uses dasalvager For DAFS, you want to use 'dasalvager' not 'salvager'. One place was still referencing 'salvager' in a DAFS example, so fix it. Change-Id: Id671fa6125212beb1fb7f23a8743c1288848ee12 Reviewed-on: http://gerrit.openafs.org/3217 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 572f9baaeb626293f4db62a66db1ea9b9a373c03 Author: Derrick Brashear Date: Sun Oct 31 21:58:37 2010 -0400 check for error_message IRIX apparently has enough krb5 to try building aklog, but no error_message. ok. so let's cope Change-Id: I3cb6d529829de348f73d5c9f5380e153f8ccce52 Reviewed-on: http://gerrit.openafs.org/3208 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit af0951f373224ce17b341bc5d227fdd5ea621762 Author: Derrick Brashear Date: Fri Oct 29 13:47:17 2010 -0400 kill off afs/debug.h as reported by Marc Dionne, debug.h was still redefinining assert() yeah, let's be done with that. Change-Id: Icf2cf3db0f4972ebd4ee8cc0547e436b612e8bbc Reviewed-on: http://gerrit.openafs.org/3194 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5e47d03ed37b87da72f4c1f8fca7a5efff6b0bb3 Author: Simon Wilkinson Date: Fri Oct 29 12:10:16 2010 +0100 Add libroken as its own library Include libroken as a library in its own right, so that the whole of the code can benefit from it. This change purely adds libroken for the Unix build system. It doesn't replace those pieces of libroken in hcrypto or util, or enable it for Windows. There is also the option of using a system-install libroken, if one is found at configure time. *) If --with-libroken=yes, or is not supplied than a system library will be used if suitable. Otherwise, we'll use the internal libroken *) If --with-libroken=/path/to/installation then the libroken at that path will be used. If there is no libroken there, or it is not suitable, an error will be returned *) If --with-libroken=internal then the internal libroken is used, regardless of what is present on the system. We deliberately do not provide installed headers for the internal libroken. If other applications wish to make use of libroken, then they should use the Heimdal one, rather than piggybacking on ours. Change-Id: Iff01e1e17090404cc8e4783108ae8a8784170918 Reviewed-on: http://gerrit.openafs.org/3191 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b5d0c34fcdff6bde79cf0e498044e8a200052084 Author: Heimdal Developers Date: Sat Oct 30 15:00:38 2010 +0100 Import of code from heimdal This commit updates the code imported from heimdal to a3afa695ee3eb1ff5ad8de3e80c20d5049fce934 (switch-from-svn-to-git-1619-ga3afa69) Change-Id: I5aafccd5a2afb46d312d0ebf93050eded29ced30 Reviewed-on: http://gerrit.openafs.org/3204 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6ab0529a70f76758fa4442913128aa40b0bec84b Author: Simon Wilkinson Date: Sat Oct 30 14:53:39 2010 +0100 auth: Use Kernel XDR for kernel tokens For consistency, we should use a version of token.xdr.c built with the -k flag when we build it into our kernel modules. Change-Id: I08e7a1966664141af6c4ed160d3fb860eb5821bd Reviewed-on: http://gerrit.openafs.org/3202 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c094874817d00dc0df7d48c070f0b5d4673ee349 Author: Simon Wilkinson Date: Fri Oct 29 19:19:48 2010 +0100 util: netutils never builds in the kernel ... ... so stop pretending that it does. Change-Id: I9d1d7c9b8c826f18e7f02decdb555956b257e155 Reviewed-on: http://gerrit.openafs.org/3201 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0a87f5852ab98ccdc01699935208a418aacb7852 Author: Heimdal Developers Date: Wed Oct 27 21:26:47 2010 +0100 Import of code from heimdal This commit updates the code imported from heimdal to a3afa695ee3eb1ff5ad8de3e80c20d5049fce934 (switch-from-svn-to-git-1619-ga3afa69) Change-Id: I57e56bbad5811d47194459618ffc6e361f01a876 Reviewed-on: http://gerrit.openafs.org/3190 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 88e2a2f26623b2fdc0c9e5887fea169eca7302c5 Author: Simon Wilkinson Date: Sat Oct 30 14:58:31 2010 +0100 Import still more files from libroken This time, these are files which are needed to get Windows going. Change-Id: I262c5770ec04318f02cbc3e02520e63e09bc4dc6 Reviewed-on: http://gerrit.openafs.org/3203 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a546fc1707bc32ecb71d42dd48f91eebe3876439 Author: Marc Dionne Date: Fri Oct 29 16:23:07 2010 -0400 Linux: remove stale prototype and references for read_super The 2.6 code doesn't have an afs_read_super, so remove the prototype and the outdated comments that reference it. Change-Id: I1ff5c836ea0ba326d4512ddcfab3f34765347331 Reviewed-on: http://gerrit.openafs.org/3199 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9c8d58cd93b98120a7ff31a90b3f9f0ef354a1bc Author: Jason Edgecombe Date: Tue Oct 26 15:00:58 2010 -0400 Quickstart Guide: Add some verbiage about /vicepXX/AlwaysAttach Change-Id: I18f8276933d69ebf7de247bd98c46b30f9e5f372 Reviewed-on: http://gerrit.openafs.org/3158 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a43605e7bf16e8e1101ed6d6e085826cf085c897 Author: Marc Dionne Date: Fri Oct 29 16:09:45 2010 -0400 rxosd: allow parallel make Build rules that use COMPILE_PART1 must be prefixed with + to indicate to make that the subprocess is a make and that it can run with parallel jobs. Change-Id: If48b32b885c7c5be6a820cd44a83d01d1eecd20d Reviewed-on: http://gerrit.openafs.org/3198 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1fa575c09ea7aa66e657b226465cb90dbba4af70 Author: Phillip Moore Date: Tue Oct 19 12:17:20 2010 -0400 Fix fs bypassthreshold to accept a size of -1 to disable The fs bypassthreshold command assumes a value of -1 means the feature is disabled, but the CLI refused to accept this argument, since it is not strictly a digit (according ti isdigit()). This patch accepts the string -1, and makes it possible to both enable AND disable this feature. Change-Id: I87720b2dcfc4e9ee9f322c4841836b74440ac442 Reviewed-on: http://gerrit.openafs.org/3009 Reviewed-by: Matt Benjamin Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c77ac5ce976b6f3e5a13a3f739ddbb6e32a177b1 Author: Phillip Moore Date: Tue Oct 19 11:31:47 2010 -0400 fs getfid defaults to '.', like other path-related commands I noticed that all of the other commands that accept a list of paths use the SetDotDefault() function to default to ".", when no arguments are given. This patch adds that call to getfid, making it more consistent with similar commands. Change-Id: Ia50c6805996d338cbd8d006107caa4ea56178c8e Reviewed-on: http://gerrit.openafs.org/3008 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit d390df097cac0fb7815c43e071040559612b6360 Author: Phillip Moore Date: Tue Oct 19 11:23:46 2010 -0400 fs getfid output changed for consistency with Windows implementation This patch removes the redundant volume ID from the output of fs getfid, and replaces it with the cell name, which is what the Windows implementation provides. Change-Id: I7ce009733a204eeb744683d9c4355c436e9e07aa Reviewed-on: http://gerrit.openafs.org/3007 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit b04a450df2e54a549f9c7e014016475fa566937b Author: Phillip Moore Date: Tue Oct 19 08:24:41 2010 -0400 Makes fs getfid error handling consistent with other fs commands This patch makes the fs getfid command print errors for paths that can't be handled correctly, instead of quietly ignoring them, and it also returns an error code if any such paths are encountered. This makes the behavior consistent with other fs commands, such as listquota, whereis, etc. FIXES 128372 Change-Id: Ibb6e3f6cee5dccbf9347dfa8bfee8776a7552b91 Reviewed-on: http://gerrit.openafs.org/3005 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4f5cdd73f665434f531144151f9b6e1f4702cf02 Author: Rod Widdowson Date: Fri Oct 29 19:57:50 2010 +0100 QuickStart Unix: use dafs type and name for demand attach file services bos create dafs dafs [...] (not fs). Change-Id: I7c06666da4733144ec0709f2783dcb431c6a5891 Reviewed-on: http://gerrit.openafs.org/3197 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aad83a30a82407bfa6ac15b49fd31d69b563e898 Author: Ben Kaduk Date: Fri Oct 29 03:18:02 2010 -0400 FBSD: correct and simplify vcache eviction routines osi_VM_FlushVCache and osi_TryEvictVCache were both attempting to be wrappers around vgone(), with some checks before hand. Implement the latter in terms of the former to prevent code duplication and propagation of incorrect code. Additionally, correct the locking around vgone(). The vnode lock must be held, and we must also increase the vnode's hold count so that it does not disappear out from under us. As we need the interlock to check the usecount, keep it locked until we lock the vnode lock, for extra protection. As an added bonus, we no longer try to call vgonel(), which is not an exported symbol and merely happened to work due to the current kernel linker implementation. Remove some stale comments. With this change, a parallel buildworld completes on my four-core machine. Change-Id: I665607da25518ddd786869b139d87baed8a05e9f Reviewed-on: http://gerrit.openafs.org/3196 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b6367aa84b9d1c7529b6f3a12bbfeacc91384ffb Author: Ben Kaduk Date: Fri Oct 29 12:01:04 2010 -0400 FBSD: lock interlock around v_usecount accesses The FreeBSD vnode locking strategy requires that the vnode interlock be held for all accesses to v_usecount, such as those used by our VREFCOUNT and VREFCOUNT_GT macros. Conveniently, a wrapper function is provided that takes the lock around its access of the element, vrefcnt(). Use it for our macros. Change-Id: Ia88eb21046fe844a6adb830734dcae2f76ef2dc5 Reviewed-on: http://gerrit.openafs.org/3195 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 812333c9a0d4722142d22186fe9b07b39fe6993b Author: Derrick Brashear Date: Tue Oct 26 20:13:38 2010 -0400 RPM scripts should allow newbinary restart to restart add a mode where a newbinary restart can be used instead of condrestart to induce a restart. also, on upgrade, don't turn on the server RC script if it was previously manually disabled. Change-Id: I0e45be751cb2c5d9392d85467a979a22f5a777cf Reviewed-on: http://gerrit.openafs.org/3163 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0e8cce457763b131de48395a9beed889fd529c1f Author: Chas Williams (CONTRACTOR) Date: Tue Oct 19 14:50:35 2010 -0400 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 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 061b7146566b00a33958ecc9d4cbea9b14a36697 Author: Chas Williams (CONTRACTOR) Date: Tue Oct 19 12:30:02 2010 -0400 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 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit ebeac56867acdb168b711ae103d7e5869011c947 Author: Chas Williams (CONTRACTOR) Date: Tue Oct 19 12:19:16 2010 -0400 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 Tested-by: Derrick Brashear commit 80ede164757ad54ddd59b638f2c007f8ad900c3e Author: Hartmut Reuter Date: Tue Oct 26 19:43:59 2010 +0100 What the cache manager needs to know about rxosd this patch contains only the RPC interface to rxosd which already contains the definition of all RPCs not just those few used in the cache manager. The code which calls these RPCs will follow in subesquent patches. Change-Id: Ia90934b06e809d0a34ed5d4a0d77eed78b74780c Reviewed-on: http://gerrit.openafs.org/3192 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6aa9a8b9f6a8720ff8b5e983cc5a7005363747e2 Author: Rod Widdowson Date: Fri Oct 29 18:01:13 2010 +0100 windows: terminate multi_sz correctly CreateProcess requires a null-terminated list of null-terminated strings as an environment parameter. A missing level of indirection was causing the final null to be missed, meaning that if bosserver ran from somewhere which had an environment the create process would fail. Fix the null termination. Change-Id: I3496d1c76570b80c760d0c0d8ee7fe046cec75b6 Reviewed-on: http://gerrit.openafs.org/3193 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5fce5754cee4f466f99681fcd7f42e5735e9776d Author: Jeffrey Altman Date: Thu Oct 28 01:19:17 2010 -0400 Windows: Finish converting vol apps to pthread only The src/vol directory on Windows is one of the rare examples where a single directory builds both lwp and pthreaded versions of libraries and executables. With this patchset the executables are fully converted from lwp to pthread. This requires that afsrpc.dll include the pthread implementations of the threadname, fasttime, and lock implementations from the LWP directory. The inclusion within afsrpc.dll permits the dviced and dvolser directories to avoid rebuilding those object modules. Change-Id: I70c6e9ec346b5d9ef05d2400ddaf21e33a0c67a4 Reviewed-on: http://gerrit.openafs.org/3181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 50b6a116a1c412d0e6d7442d13d6e92c9dbb35ee Author: Rod Widdowson Date: Thu Oct 28 00:20:30 2010 +0200 windows: native versions of ih_pread and ih_pwrite Separate the windows code out in ihandle.c to reduce dependency on ntops. As an aid to future threading issues, pass the offset in an OVERLAP rather than doing a separate SetFilePointerEx. Change-Id: I225387a574b1301516a9313838bbcb86e9e14b8d Reviewed-on: http://gerrit.openafs.org/3176 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Derrick Brashear commit e8991ff8286f151d109bb4f98d885a583e198f83 Author: Jeffrey Altman Date: Thu Oct 28 00:43:26 2010 -0400 vol: Use OSI_NULLSOCKET and not -1 to indicate invalid fssync fd The FSync file descriptor is an osi_socket which has an invalid value of OSI_NULLSOCKET which is not necessarily -1. Be sure to compare against OSI_NULLSOCKET and not -1 when checking an invalid value. Change-Id: I5b7531e690ea06046b337222b52a5013c7f8802e Reviewed-on: http://gerrit.openafs.org/3179 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Derrick Brashear commit d21dd16789458c07e63abe021f93f656dba4e52c Author: Jeffrey Altman Date: Thu Oct 28 00:40:32 2010 -0400 vol: Always use INVALID_FD to indicate an invalid fd file descriptors on Windows are not ints and therefore cannot be safely compared against -1. Always use INVALID_FD which is -1 on UNIX and INVALID_HANDLE_VALUE on Windows. Change-Id: I8788f95817ee45367f04f4b90b4e6625c5a39dca Reviewed-on: http://gerrit.openafs.org/3178 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Derrick Brashear commit 37a7b759348430782ffb397f6896063329a9e12e Author: Simon Wilkinson Date: Wed Oct 27 21:26:19 2010 +0100 Import: Add roken files from heimdal Add the necessary files to our import list such that roken can be built as a standalone library. Change-Id: Ia9b5b14c618f4ac47eb99bd500d6465b6b25e4dd Reviewed-on: http://gerrit.openafs.org/3189 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 96e95c4000ce649591275eb4aefceb5f28f92c6b Author: Simon Wilkinson Date: Fri Oct 29 12:40:31 2010 +0100 shlib-build: Add ignore option Add an option to shlib-build to ignore missing symbols in the map file. This is already the default on some platforms, but others (such as Darwin) require that all symbols in the mapfile be present in the objects. This is a pain for libraries such as libroken, which will have different symbols on different platforms. Specifying -i adds the necessary magic to Darwin's ld to relax this check. Changes may also be necessary for other platforms, but I don't currently have those available for testing. Change-Id: Ieaff8ed6dd4e16dfc420b90b85e4471952d83bd2 Reviewed-on: http://gerrit.openafs.org/3188 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e30e916e2059bac14f1d1dec3213d703374b1fe9 Author: Marc Dionne Date: Sat Sep 11 13:06:26 2010 -0400 ubik: Set but not used variables Fix warnings, remove unused variables and code. Spotted by gcc 4.6 Change-Id: I0a055c5f0fec34993c81f2dcf8f976cba5a31c8b Reviewed-on: http://gerrit.openafs.org/3185 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b88e6cadf1f56f41ffc7e37e9b62d9354481a98d Author: Marc Dionne Date: Sat Sep 11 13:39:00 2010 -0400 bucoord: Set but not used variables Remove unused variables Spotted by gcc 4.6 Change-Id: If86786ba41401553994fb531b83164b5dfdc079a Reviewed-on: http://gerrit.openafs.org/3184 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 783d560eef013a72377f59a516ee21d42c9e4854 Author: Marc Dionne Date: Sat Sep 11 13:49:49 2010 -0400 xstat: Set but not used variables Remove unused variables. Spotted by gcc 4.6 Change-Id: Ibe26d3c58027704d525424a15f71ae954a5c2be4 Reviewed-on: http://gerrit.openafs.org/3183 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 832607318b9ad4ab38bb62515cdb4959cc21a656 Author: Ben Kaduk Date: Thu Oct 28 22:45:33 2010 -0400 FBSD: fix dumb panic when we can't pfind rxk_Listener The process is only returned locked if the process is found. Don't try to unlock it if it's not found. Change-Id: I3911955561d0d97e8080bcd18b4e4393b19ad860 Reviewed-on: http://gerrit.openafs.org/3186 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7e37c1a2f75fb0a7e6ced9060c789802fc9ae1e0 Author: Derrick Brashear Date: Tue Oct 26 09:41:47 2010 -0400 explain yacc build product dependency so it is not removed in order that our .c.o rule applies, force yacc source to not be built directly into an object. Change-Id: I9d0722ae74726feef92b1bc7eb7647ce7f97633b Reviewed-on: http://gerrit.openafs.org/3149 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0cc3cc9412c232e2ec799ee1f1a9a90f3e56ab66 Author: Marc Dionne Date: Tue Oct 26 20:33:41 2010 -0400 bucoord: parallel make fix Fix an instance of a Makefile rule with multiple targets. This can cause a parallel make to fail when two instances of compile_et compete to write the same output files. Spotted by a build failure with a corrupt bc.h header. Change-Id: I4adee125a82d640bc78f15c77494a22157cf7f5d Reviewed-on: http://gerrit.openafs.org/3165 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 68aace4054430105ceaf52ce8e316f3ae01e7dc8 Author: Rod Widdowson Date: Thu Oct 28 18:34:41 2010 +0100 Windows: fix built in touch Recent versions of windows add a whole bunch of attributes above A_ARCH. (FILE_ATTRIBUTE_NOT_CONTENT_INDEXED was what bit be but encryption of compression would do it). This makes ~_A_ARCH not a good choice for testing nonwritability of a file - so files with these new attributes just get silently ignored. Using an explicit mask is much better. So do that. Change-Id: Ie176ffae1995dd50c70319e196c0d30420733ccf Reviewed-on: http://gerrit.openafs.org/3182 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e1ed8ab1d93906e1b556de332fa32601a9a489fc Author: Rod Widdowson Date: Wed Oct 27 21:08:28 2010 +0200 windows: preserve lasterror prior to calling free free() destroys GetLastError, so preserve it before giving back all the buffers. Then if the create process failed we have something sensible to log. Change-Id: Ibb8bb870230f9c4e96f5ec9d4948552616cd7456 Reviewed-on: http://gerrit.openafs.org/3175 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 46cf6c8f365d25122c550b76be61a880d16f531b Author: Jeffrey Altman Date: Wed Oct 27 14:25:10 2010 -0400 don't duplicate work of ctime_s on windows we use ctime_s for ctim'ing to a buffer. except we allocate an extra buffer. "uh" Change-Id: Ic40583814d0e1d05d7c98cde09855c036045208e Reviewed-on: http://gerrit.openafs.org/3174 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9749e5284cb8915d5e9b886bd74f1580d5bff28c Author: Derrick Brashear Date: Wed Oct 27 14:18:28 2010 -0400 viced don't double-print start time side effect: remove the version which breaks on 64 bit windows Change-Id: I8a1d2cde1f2eebe3242b26d0c8b62e39bfc7dfec Reviewed-on: http://gerrit.openafs.org/3173 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b3c21294f4b51f85cc6e24cc4d1b984f53c553e4 Author: Heimdal Developers Date: Sun Oct 24 11:56:07 2010 +0100 Import of code from heimdal This commit updates the code imported from heimdal to a3afa695ee3eb1ff5ad8de3e80c20d5049fce934 (switch-from-svn-to-git-1619-ga3afa69) Upstream changes are: Chas Williams (CONTRACTOR) (1): hcrypto: struct x64 doesn't need bitfields Love Hornquist Astrand (1): Switch to ULL Simon Wilkinson (1): hcrypto: Flag 64bit bit constants as long long Change-Id: Ifc11c14942a2b283d7f5879de5bf88f53b290512 Reviewed-on: http://gerrit.openafs.org/3100 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c5eb4247a5629b8baa18d4adbde1f0ab72d1a540 Author: Simon Wilkinson Date: Sun Oct 24 11:50:25 2010 +0100 Improve commit messages for git imports Improve the quality of the commit messages produced by git import by adding an explicit author (obtained from the $module-author file), and by including a list of all of the upstream changes that are being imported. Change-Id: I73516865144eb6ecd631822d1103a9b18d01b049 Reviewed-on: http://gerrit.openafs.org/3099 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 34767c6a0f914960c9a1efabe69dd9c312a2b400 Author: Derrick Brashear Date: Sun Oct 17 23:39:47 2010 -0400 down with assert, up with osi_Assert because NDEBUG breaks things which happen inside an assert, be done with that. instead, call osi_Assert wherever possible. doesn't work for code which builds before rx; those cases we handle by ensuring no operations happen inside the assert(). side effect: move all pthread operations wrapped in asserts to MUTEX_mumble and CV_mumble calls where those exist, so the assertions happen all in one set of macroes. Change-Id: I9fd8a0fdfdaed5ed55de3e5c0c4673d4714e7441 Reviewed-on: http://gerrit.openafs.org/3001 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear commit bd1657fb9d42e46fdc9560687aa0d360395740b2 Author: Jason Edgecombe Date: Tue Oct 26 20:32:04 2010 -0400 Quickstart Guide: misc. fixes * The update server is optional * Only worry about fsck when using inode-based storage * Add a space where needed Change-Id: Idacd220139f2b5c622831004cb38bf5f8a1dafc5 Reviewed-on: http://gerrit.openafs.org/3164 Reviewed-by: Derrick Brashear Tested-by: Jason Edgecombe commit 103de35cbcb9c855a5b3f3580b488c8dfe54e25c Author: Derrick Brashear Date: Tue Oct 26 19:10:57 2010 -0400 kill defunct tools directory the "old" rpm building tools are so sad as to be useless. put them out of their misery. Change-Id: I1f763a7907235fe2b178ee07b8ad4e5a6f165d24 Reviewed-on: http://gerrit.openafs.org/3162 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 96d120e008dfe7c076c7d85e2b373232ea103877 Author: Jeffrey Altman Date: Tue Oct 26 19:02:31 2010 -0400 Windows: 1.5.78 Change Log summary Change-Id: Ie4e6131dae25c5b17b9f4cd5c8667a03ef4ecded Reviewed-on: http://gerrit.openafs.org/3161 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c32ac52f161135e39ed60cf87bfad3d016f3c6f Author: Jason Edgecombe Date: Tue Oct 26 15:06:28 2010 -0400 Quickstart guide: use yum install from openafs repo Change-Id: Icd8b3c2a60e2cd751da00056cfc3e11e90472ec6 Reviewed-on: http://gerrit.openafs.org/3159 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e848f3c2160745228e0f770f8daf4fffcca7507a Author: Jeffrey Altman Date: Mon Oct 25 23:05:00 2010 -0400 Windows: Fix math error in rx_Writev processing LICENSE MIT Change-Id: I0c1c54d131530843b62d6494f313070243890605 Reviewed-on: http://gerrit.openafs.org/3148 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 36e2d13b55085c996d38b30d003296c602ef8ee3 Author: Simon Wilkinson Date: Mon Oct 25 10:14:12 2010 +0100 rx: Don't let timeouts force fast recovery The current RX implementation goes into fast recovery whenever a timeout occurs. This is incredibly wasteful, particularly on fast connections. So, remove this in favour of TCP style behaviour. Change-Id: I7afc08b69e7e1df80a38ac731af57ce91072a184 Reviewed-on: http://gerrit.openafs.org/3138 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e7066a9c30047e787d72f02dd1c28e5e473e494b Author: Simon Wilkinson Date: Mon Oct 25 20:50:29 2010 +0100 rx: Fix starting of transmit timers The code used to start the transmit timer once for every set of packets that it sends. However, these packets might be sent individually or in clumps, with blocking for sendmsg, and on peer->lock, between each set of packet sends. This has the effect of, even on a very stable network, producing a high degree of variation in RTTs and timeouts. This is a particular issue where the connection size is larger, as the number of packets being sent individually under the one timer grows too. Fix this by moving timer initialisation to SendList. This already takes the peer lock, so obtain the timeout value here too. This means that each jumbo gram, or individual packet (where jumbograms are disabled) is sent with its own start time, and stabilises RTTs. Change-Id: Ifc8242211cedad9b52a66a44bbdee400130ab40b Reviewed-on: http://gerrit.openafs.org/3137 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 802d50bc4e220b9bf404ac1ee36720023986d98e Author: Simon Wilkinson Date: Mon Oct 25 09:52:10 2010 +0100 rx: Refactor transmit queue wakeup Refactor all of the places where we wake up the transmit queue into a common helper function. Change-Id: I1a2ca2bf1e6268dcaf90961a8a88bd4165519503 Reviewed-on: http://gerrit.openafs.org/3136 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e84193ca2a9cef5a13403d291435eb5ad47f5b41 Author: Simon Wilkinson Date: Mon Oct 25 09:16:09 2010 +0100 rx: Fix resend accounting rxi_Start flagged itself as 'resending' whenever it flushed the transmit queue due to a resend event. However, it would flush the entire transmit queue at this point, rather than only transmitting packets that require a resend. When running with large window sizes this results an a large number of packets erroneously being marked as resent. Instead, let SendXmitList decide whether a packet is being retransmitted by using the presence of a serial number. This takes advantage of the fact that a retransmitted packet must be the only entry in a packet list - we just flag the packet list, instead of having to maintain counters for each individual packet. Change-Id: Id8e87b8efa87f5dfec2e51b7983a9fd6b1a5c4c5 Reviewed-on: http://gerrit.openafs.org/3135 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit ad3b5997c6da17927312f4618d8bb4f7fc542a64 Author: Simon Wilkinson Date: Mon Oct 25 09:06:53 2010 +0100 rx: Use a structure for the xmit list Switch to using a structure to hold the xmit list so that it's a little bit clearer what the rxi_SendXmitList function is actually doing Change-Id: I84fd92e216db479121447132402597056410596b Reviewed-on: http://gerrit.openafs.org/3134 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 1664a2642b56febc08af8f95250a6d64761a525f Author: Jeffrey Altman Date: Mon Oct 25 22:58:51 2010 -0400 Windows: move debug break in afsd_notifier move the debug break before the cache dump occurs so that a debugger will be signalled faster when a panic condition occurs. Change-Id: I25634616e85f036d019e4d932074e52157570087 Reviewed-on: http://gerrit.openafs.org/3147 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f6be821ffeba607d4305586ad2c7ec4ba2b180c Author: Ben Kaduk Date: Sun Oct 24 00:29:07 2010 -0400 FBSD: band-aid vnode locking in lookup The lock order requires that we acquire vnode locks from the root towards the leaf. When looking up "..", this requires that we unlock the directory before locking the child, otherwise we are susceptible to deadlock. This is only a band-aid, as afs_vop_lookup should be rewritten. Change-Id: Ie99a677978370488f8edc7128014b89abc00a56c Reviewed-on: http://gerrit.openafs.org/3035 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5bf95621ae2ffff6e847c12e16f31db534fd7d0b Author: Ben Kaduk Date: Mon Oct 25 22:15:49 2010 -0400 Fix build on systems with .y.o rules On systems with system .y.o rules (such as FreeBSD), the system rule for making error_table.o from error_table.y can bypass AFS_CCRULE and thus fail to pull in the necessary include paths for compilation. Present an explicit dependency on error_table.c to force that file to be generated, and then our .c.o rule gets used as desired. Change-Id: I88a6cf15441e0bacd73888b941d6c268786c5d2a Reviewed-on: http://gerrit.openafs.org/3145 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f70d9181d33960856fed4bae23008a450c932f3d Author: Ben Kaduk Date: Tue Oct 26 00:17:11 2010 -0400 Complete change from dcb40c9fb8 for FBSD Many conditionals involving osi_fsplock were changed to depend on AFS_PRIVATE_OSI_ALLOCSPACES instead of constants or other things (like AFS_FBSD_ENV). The condition on the initializaion in afs_init was changed but not the declaration in afs_prototypes.h, breaking the build on FBSD. Use the same conditional in afs_prototypes.h, fixing the FBSD build. Change-Id: I28d5d3be4f1b2fdb8aca0834df7d8fc65f0d0146 Reviewed-on: http://gerrit.openafs.org/3146 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b743b32b8b715edf673833a150f9f3d5a72b0b39 Author: Jeffrey Altman Date: Sun Oct 24 00:21:26 2010 -0400 Windows: Add version number to event log start pending message LICENSE MIT Change-Id: I6a2eca99cf1db9792eb76b04adbc87c4b64aa483 Reviewed-on: http://gerrit.openafs.org/3034 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f943a4eb524434d25ecf99cba0843ded13aef176 Author: Jeffrey Altman Date: Mon Jun 14 09:43:31 2010 -0400 Windows: register idle dead timeout error be like the unix cache manager and set an error code so idle dead time is enforced on sending. LICENSE MIT Change-Id: I2d78f3a0f6e30147c0816259b45b6b95a3d4f79c Reviewed-on: http://gerrit.openafs.org/3033 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1418b4fec23459aafec4b5a787e2c2b89f6af1f1 Author: Asanka C. Herath Date: Mon Oct 18 04:52:34 2010 -0400 Windows: Backup and restore configuration across installs The MSI installer for OpenAFS does not preserve configuration data across installs. This patch creates a backup of specific configuration registry values when uninstalling OpenAFS and uses this backup when subsequently installing OpenAFS. Change-Id: Ie30f8f7f0eada3f0aeef2341b04aca55657ec864 Reviewed-on: http://gerrit.openafs.org/2977 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c12b80a4fdb8323ff3fdd194ff1994ad0a0b8e1 Author: Jeffrey Altman Date: Sat Oct 23 15:45:36 2010 -0400 Windows: Make Rx PMTU discovery configurable; disable by default Disable PMTU discovery by default. Permit it to be enabled with the RxPMTUDiscovery TransarcAFSDaemon\Parameter value. LICENSE MIT Change-Id: I0529a77e288ba8cd6cf8d0c2e2e9c0c8e6e0f6ff Reviewed-on: http://gerrit.openafs.org/3032 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 58e7b85ab7c3c839c5dd126bd1c254f68a16b73a Author: Simon Wilkinson Date: Sat Oct 23 15:07:42 2010 +0100 rx: Tidy up variables in RTT calc We used to do rttp = &thisRtt, and then use rttp and thisRtt to interchangably refer to the same data. This is just confusing, and unnecessary. Replace all of the occurences of rttp with &thisRtt. Take the opportunity to use the Clock_IsZero macro rather than doing an explicit zero clock check. Change-Id: If2e0d7b6dcf96f4e46bde083063115d675a4153f Reviewed-on: http://gerrit.openafs.org/3031 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da18ca41751b43576f6652a16f69260e0c6ac0d6 Author: Simon Wilkinson Date: Sat Oct 23 15:16:17 2010 +0100 rx: Fix bracing on rx_clock macro arguments Add brackets around the arguments in the clock helper macros, so that these can be called with more complex parameters. Change-Id: I09b333dcde96ef56fab8d5ada89eb0744cdb1690 Reviewed-on: http://gerrit.openafs.org/3030 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 290495fab1b2a8f1dc842cb2dd6de2d9922169c6 Author: Simon Wilkinson Date: Sat Oct 23 14:51:56 2010 +0100 rx: More improvments to RTT calculation Move the decision about whether a packet contributes to the peer's rount trip time into the CalculateRoundTripTime function, and improve the criteria used. Previously, we only computed the RTT if we had not retransmitted. This is bad, because it means that places where we have backed off in order to retransmit never actually lengthen the RTT, and so the RTT is kept artificially low, and we see a large number of retransmits. Instead, use the serial of the ACK packet to determine which transmission is being acknowledged, and if it is the first, or the last, transmission use the appropriate sent time to calculate the RTT. If we have no serial in the ACK (for a delayed ack, for example), or if the serial doesn't match (where a single acknowledgement is soft acking a number of packets), fall back to only using the ack if the packet has not be retransmitted. Also, avoid multiple counting of packets which have arrived as part of a jumbogram by only permitting the last packet in a jumbogram to contribute to the RTT. This avoids giving the RTT of jumbograms more weight than those of normal packets - doing so would pull down the RTT, as it in effect favours packets which have not be retransmitted. Change-Id: I6d978a118e2bd0694484376b586dd4eaa64cdd8c Reviewed-on: http://gerrit.openafs.org/3029 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5c8981e0404287f2aa46390d3a9e8a52261906ab Author: Jeffrey Altman Date: Thu Oct 21 14:13:03 2010 -0400 Rx: Treat rx_minPeerTimeout not as a minimum but as padding An improved RTT and timeout calculation algorithm is being developed but until we have it, treat rx_minPeerTimeout not as a minimum value for the timeout but as padding to be added to the measured RTT when computing the peer timeout value. With this change rx does not begin to send large numbers of resends when the RTT begins to exceed the rx_minPeerTimeout value. Timeout triggered resends at the moment can force rx into fast recovery mode which in turn kills performance. It is better to avoid that problem for now. Change-Id: Iff5e81d7cf1366e1810f118bf4825274696769c9 Reviewed-on: http://gerrit.openafs.org/3026 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c8f47626e2428449bfb64844e46fe5ad6b8e0f1c Author: Jeffrey Altman Date: Thu Oct 21 14:23:18 2010 -0400 Rx: Fix socket() handling so errors are properly detected socket() returns an osi_socket which on Windows is an unsigned type (HANDLE). Therefore, tests of osi_socket < 0 will never identify when the INVALID_SOCKET value is returned. On Windows, the OSI_NULLSOCKET is assigned to INVALID_SOCKET. Replace all comparisons of (osi_socket < 0) with (osi_socket == OSI_NULLSOCKET) as a means of detecting errors. In addition, do not pass socket() the protocol value 0 when IPPROTO_UDP is what is desired. Finally, perror() on Windows never reports any error from Winsock. perror() is a CRT function. To get the real socket error WSAGetLastError() must be called and its value be written to stderr. Change-Id: Ibc392eeb733851f56dbc7398cb252a4753b95275 Reviewed-on: http://gerrit.openafs.org/3027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 046f230ed4dde4c31d849893eec750437135342e Author: Charles Hannum Date: Fri Oct 22 14:50:56 2010 -0400 linux fh_to_dentry can return err handle e.g. ESTALE from fh_to_dentry (in this case via d_obtain_alias and fat_fh_to_dentry) so we print a meaningful error when we lose. Change-Id: If9f53776e0df4bfecf704943110a62b8c98684ce Reviewed-on: http://gerrit.openafs.org/3028 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 350620e947d17dfb6a042c48cc6ab38b09668431 Author: Chas Williams (CONTRACTOR) Date: Thu Oct 21 10:07:11 2010 -0400 afs: fix SOLARIS builds conflicting 'u' define Including does the following (which is rather unfriendly): This causes problems for the tokenJar u member. I renamed u to content, but there might be better choices for the name. Change-Id: I3c8cd97e5868ee1ba78c2b2c4951d1af08664b77 Reviewed-on: http://gerrit.openafs.org/3023 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e356090ba21395e110b8a403a5efaf725ca3ffc8 Author: Jeffrey Altman Date: Sun Oct 17 00:35:36 2010 -0400 Windows: Use rx_Readv / rx_Writev When USE_RX_IOVEC is defined, cm_BufWrite() will utilize rx_Writev() instead of rx_Write() and cm_GetBuffer() will use rx_Readv() instead of rx_Read() to improve throughput. LICENSE MIT Change-Id: Ib70dfd4fd7a79c9ce36ef4fd8f4bb46a946621fd Reviewed-on: http://gerrit.openafs.org/2999 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 6f3938e80a79a4a3684565a6960bce18e167aea4 Author: Jeffrey Altman Date: Thu Oct 21 14:09:53 2010 -0400 Windows: Fix i386_w2k and i386_nt40 path construction Now that DEST and OBJ are defined in terms of AFSROOT do not DESTDIR and OJT in terms of AFSROOT. Change-Id: I196b4d0c93d2122c0b29f423213871db788c5ef5 Reviewed-on: http://gerrit.openafs.org/3025 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 64f732764cab7387943647285d5e5203f0c74218 Author: Jeffrey Altman Date: Wed Oct 20 19:35:10 2010 -0400 Windows: Improve cm_SyncOpDone logging Change-Id: I2b2b9fa5067ea0927bbbdf2dcad433ebb84d2a66 Reviewed-on: http://gerrit.openafs.org/3022 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5880a576273c3b5f7683937df42bacf506007ba2 Author: Jeffrey Altman Date: Wed Oct 20 19:31:19 2010 -0400 Windows: remove unnecessary prototype from smb.c Remove rx_StartClientThread() prototype. Change-Id: I89377528a7497b06302bf8fa9cb71a192afc1c0a Reviewed-on: http://gerrit.openafs.org/3021 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 49e57b8c3b5e13f7ce48c6be5677827d970df5fa Author: Jeffrey Altman Date: Wed Oct 20 19:29:32 2010 -0400 Windows: optimize cm_BkgDaemon() In cm_BkgDaemon test for CM_SCACHEFLAG_DATASTORING before cm_ServerAvailable() in order to avoid unnecessary work. LICENSE MIT Change-Id: I75f88212a18d765790c9435de17e3b0fa735a7ab Reviewed-on: http://gerrit.openafs.org/3020 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit dd01970f440cc68fbd71a1544ee655131f42be51 Author: Jeffrey Altman Date: Wed Oct 20 19:28:26 2010 -0400 Windows: remove warnings from cm_daemon.c Properly cast void * to long and int to LPVOID to avoid warnings. Change-Id: Iaa48bd9247df21efbbed4422a156c67208c128d6 Reviewed-on: http://gerrit.openafs.org/3019 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bc810f4ac04fb6385e57d235f976d3f42f83e28a Author: Jeffrey Altman Date: Wed Oct 20 19:26:06 2010 -0400 Windows: prototype cm_PerformanceTuningInit() Change-Id: Iffb1f05495a44ad0b95ed315cea5ae4771be1b8b Reviewed-on: http://gerrit.openafs.org/3018 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3f2f327df4d8cbac927e290d03d78611f7b12a69 Author: Jeffrey Altman Date: Wed Oct 20 19:25:00 2010 -0400 Rx: prototype rx_StateClienThread() Change-Id: I74c04229667d672005bd9a4abeab5309a1c97d7e Reviewed-on: http://gerrit.openafs.org/3017 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 929ca25d6d3fef07ea7c103dcd43a2658cdf71bd Author: Jeffrey Altman Date: Wed Oct 20 19:23:11 2010 -0400 Rx: rx_stats_active not RXDEBUG In rx_StatsOnOff() the assignment to rx_stats_active should not be protected by RXDEBUG. Change-Id: I5eb84f6d7049c4d923010e53a49ee7eb321495f4 Reviewed-on: http://gerrit.openafs.org/3016 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit da400a24a7c9d5ac1595f10e0c76df5a461aa5dc Author: Chas Williams (CONTRACTOR) Date: Wed Oct 20 09:06:35 2010 -0400 rx: remove spurious compare for maxDgramPackets maxDgramPackets is initially assigned this value after correcting for the wire endian. This compare is harmless on little endian since the network endian value will typically be huge and redundant on big endian machines. Change-Id: I4a070b2964805f45c0593c80a2604c4e4cd26ff7 Reviewed-on: http://gerrit.openafs.org/3015 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit dcb40c9fb8629e028e2dfa6333423b0ce0c00abc Author: Chas Williams (CONTRACTOR) Date: Mon Oct 4 15:08:10 2010 -0400 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a48bb7952bfc4df646bf9e2e6c55c884d54ccad Author: Derrick Brashear Date: Tue Oct 19 10:06:02 2010 -0400 atomic mutex don't recursive enter enter pairs with exit, and not, say, enter Change-Id: I7fe76c7ba125f9384205904318564173583e8b22 Reviewed-on: http://gerrit.openafs.org/3006 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 12570db7c9e40aaf5905167bb3ef5c7b5e5e7161 Author: Derrick Brashear Date: Fri Oct 15 16:27:55 2010 -0400 vutil use lockfile mutex macros for lockfile mutex we have macroes; let's use them. makes later changes easier. Change-Id: If128930f659c34592c27503a02d64b67d7f60a84 Reviewed-on: http://gerrit.openafs.org/2996 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 787137104bba3533f279f1fdf796a1c6c6898797 Author: Derrick Brashear Date: Sun Oct 17 18:11:52 2010 -0400 afs assert should use afs abort we already have a portability abort macro. use it. Change-Id: I6919cf1b2d399ad4d1ca8b7b845848a9a2208cf9 Reviewed-on: http://gerrit.openafs.org/3000 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit f7799a35c5942ba4feda3bc8c848cdaa8e0b7b76 Author: Simon Wilkinson Date: Mon Oct 11 13:25:38 2010 -0400 rx: Simplify round trip time calculation Move the logic for deciding whether to compute RTT out of PeerNetStats and into the callers. This means that we can share decisions about whether a packet is ACK'd or not, and avoid uneccessary multiple tests and function calls. This change also stops us from computing RTT times for packets outside of the set of explicit ACKs that we have received. This means that we no longer compute RTTs for packets that are on the transmit queue, but not yet on the wire. Change-Id: I9d3794426393f9e0da7932b05acd8f4028a12cb3 Reviewed-on: http://gerrit.openafs.org/2960 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9fa496d11ff2a361b4693034f6caad90da995312 Author: Andrew Deason Date: Fri Oct 8 15:39:21 2010 -0500 RX: Add rx_InterruptCall Add rx_InterruptCall, to cause a call to error out and wakeup anyone waiting to write or read to that call. Change-Id: I0747ac9107dac6b9a6d8b8c59120a756416aad58 Reviewed-on: http://gerrit.openafs.org/2982 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Tom Keiser Tested-by: Derrick Brashear commit 525ea8b60cc198f7e12da7a1aaffdcad2bb3ef21 Author: Jeffrey Altman Date: Sat Oct 16 13:14:03 2010 -0400 Rx: Do not compute RTT on non-last packets of a jumbogram A jumbogram is constructed as a series of rx packets that are all sent at once and acknowledged at the same time. Computing the RTT for all of the packets that makes up the jumbogram provides the jumbogram RTT more weight than for a non-jumbogram packet. To restore fairness, only compute the RTT for the last packet of a jumbogram. The non-last packets with have the RX_JUMBO_PACKET flag set in the packet header. Change-Id: Ia5237d9ca0707b39fe623639233b748b6798063e Reviewed-on: http://gerrit.openafs.org/2997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 4e71409fe1305cde4b9b341247ba658d8d24f4d0 Author: Simon Wilkinson Date: Mon Oct 11 13:14:02 2010 -0400 Rx: Reject out of order ACK packets Our RX implementation virtually guarantees that we will see out of order ACK packets, even on well behaved networks, as we send acks simultaneously from multiple threads. Currently we only reject out-of-order ACKS which change the window position (so a window that advances, can never go back). However, we fail to deal with the explicit acknowledgement portion of the ACK packet in the same way... For example, if we have a packet A that acknowledges packets 1 and 2, and then a packet B acknowledging 1,2,3 and 4. If B arrives before A, then we mark 1, 2, 3, 4 as acknowledged, and then treat the arrival of A as nAcking 3 and 4. This has the same effect as an explicitly stated nack, triggers an early and unnecessary resend and may, in some situations, cause the call to go into congestion avoidance. We can solve this using the previousPacket field of the ACK. This indicates the last packet seen by the peer. In the same way as firstPacket, this should never go backwards, and so can be used to detect out of order acknowledgements, and reject them. Change-Id: I9ad850872a1a62050e774c911302a65bb8a59525 Reviewed-on: http://gerrit.openafs.org/2958 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 98688ddf70cbfe21d22e5832b2f50d626b4183e9 Author: Derrick Brashear Date: Thu Oct 7 13:41:22 2010 -0400 shakeloosevcaches drop xvcache during dentry ops denote that we slept and drop xvcache while doing dentry flushing. Change-Id: If597e4153bddce4631383d4c2e1da1faacb720a5 Reviewed-on: http://gerrit.openafs.org/2944 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78502b61b3e8b288ce6fec1f66d14d7e2431642a Author: Derrick Brashear Date: Fri Oct 15 16:09:27 2010 -0400 rename afs/assert.h to afs/afs_assert.h provide a private assert header which does not pollute the normal namespace for the assert header. further changes will modify pthread operations to not use generic assert as a "did it work", which breaks if NDEBUG is set Change-Id: I43a95c0aa31ad2e772bce9142356fd5c5bedac6c Reviewed-on: http://gerrit.openafs.org/2995 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5e9676144bc3d9b186495a06d14581a4fc97beff Author: Andrew Deason Date: Fri Oct 15 16:35:32 2010 -0500 pts: Specifically check for group id 0 For consistency with the code checking user ids in createuser, check for a specified group id of 0 specifically and give a slightly different error message for it. Change-Id: I362302a1a59fbe324f7f3e926f02177c24a5577d Reviewed-on: http://gerrit.openafs.org/2994 Reviewed-by: Phillip Moore Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ebfc586fd2d00085a384763cc519c2af6ce5223e Author: Andrew Deason Date: Fri Oct 15 16:37:55 2010 -0500 pts: Prevent creating negative user ids User ids cannot be negative (those are groups). So, error out if a negative id is specified for createuser. FIXES 128343 Change-Id: I6e81a419c797944bfed569aac529b9694702823d Reviewed-on: http://gerrit.openafs.org/2993 Tested-by: Andrew Deason Reviewed-by: Phillip Moore Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ffe445483a07c751202a1ef06136f70402ec895d Author: Russ Allbery Date: Thu Oct 14 13:41:45 2010 -0700 Return SRV record ports in network byte order Convert the port extracted from the SRV record return to network byte order before assigning it to the port array. The port in a SRV record is extracted by pulling out the high byte and low byte and then mathematically combining them, which implicity converts from network byte order to host byte order. However, the callers of afsconf_LookupServer expect the port array to be returned in network byte order since ports are assigned without modification to the .sin_port field of a struct sockaddr_in. See also the byte order of the default afsdbPort value. Reported by Jan Christoph Nordholz (Debian Bug#600228). Change-Id: I378fe2f769703e43800c185f0934c77dd97b1c7b Reviewed-on: http://gerrit.openafs.org/2985 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9846ccc94964da4605fe9a96505382f09fc5695e Author: Derrick Brashear Date: Fri Oct 15 11:28:34 2010 -0400 add objc build rules to make-type makefiles sadly this needs to be here unless we want os-specific includes of e.g. shared, lwp, pthreads makefiles for extra rules. as long as no .m files are built in generic makefiles, this is a reasonable approach. Change-Id: Ibea9f47131189f4b13760d0c50a0bc6b43815ce3 Reviewed-on: http://gerrit.openafs.org/2991 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0adb2d758c23e1c02d5894d2c534b685999d821c Author: Derrick Brashear Date: Tue Oct 12 09:05:24 2010 -0400 OSX prefspane use Kerberos Preferences for defaults if we have forwardable tickets, e.g., as a pref, get those. and so on. this way tickets AFS got are not "Weird" Change-Id: I81d70dc72e777503c8d1e588ae6cba6f33c6dc44 Reviewed-on: http://gerrit.openafs.org/2965 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3616cdc306f58f90be1cb4f524aa5720d8d638fe Author: Jeffrey Altman Date: Thu Oct 14 17:24:33 2010 -0400 Rx: use osi_Assert/osi_Panic instead of assert Avoid using the openafs src/util/assert.h implementation for Rx and Rx security classes. Use the built-in osi_Assert() and osi_Panic() functionality instead. This avoids all references to assert.h except for rx_pthread.c (Unix only) which requires it for the assert() references in the src/util/pthread_nosigs.h macros. Change-Id: I5fbfcd57da381e02e716e7688a58918aed05c50f Reviewed-on: http://gerrit.openafs.org/2987 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c494161819c6c24e36ffaac4421735f0c7ecfbc5 Author: Jeffrey Altman Date: Thu Oct 14 18:18:40 2010 -0400 Util: include assert.h in pthreads_nosig.h when required If assert() will be used within pthreads_nosig.h, include assert.h. Also, permit assert() to be a macro that is a no-op by always evaluating the expression. Change-Id: I8c790dcb8cb98f75028343e5de94b91ab891daad Reviewed-on: http://gerrit.openafs.org/2988 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8652f146abc5406195b5170402fe4dfd939da9f0 Author: Chas Williams (CONTRACTOR) Date: Thu Oct 14 16:15:51 2010 -0400 Rx: fix dpf() usage with regard to trailing \n's instead of checking to see if we need to add a trailing newline for the messages, just make sure dpf() is always called with one. Change-Id: I4aec74fcb18c0696e403e69cf54a4be9dbfb98f7 Reviewed-on: http://gerrit.openafs.org/2981 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c2e063e2746112e5586cc3f8662567abff353b2d Author: Marc Dionne Date: Thu Oct 14 18:45:32 2010 -0400 LINUX/osi_vnodeops.c: minor coding style fixes Re-indent and correct a few coding style issues in this section of code. In particular, it clears up possible confusion on the scope of the preceding if statement. Purely cosmetic, no functional changes. Change-Id: Id6dea6326c9878b41f821de00267f75195fea394 Reviewed-on: http://gerrit.openafs.org/2989 Reviewed-by: Matt Benjamin Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6208ac3589be1bba6bec10656ae876bac776d6f5 Author: Jeffrey Altman Date: Thu Oct 14 00:56:39 2010 -0400 Rx: function return type on separate line Change-Id: I99546f2f7ebea0dd796d6c017acdeaf40c3fc711 Reviewed-on: http://gerrit.openafs.org/2978 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a4a03ae68bea51a74a4ef496d50a800bd3e0cbd Author: Andrew Deason Date: Thu Mar 11 12:19:47 2010 -0600 Parallel I/O extensions to namei backend This adds the ability for certain namei operations (currently only ListViceInodes) to occur across multiple different threads in parallel. Currently this is only enabled when built with the not-yet-existant AFS_SALSRV_ENV. Originally written by Tom Keiser. Change-Id: I392653670378dbca3007e98a0cb09fe4474dd262 Reviewed-on: http://gerrit.openafs.org/1864 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 59927e20052c3f075e0269e46691bc94c3974f86 Author: Marc Dionne Date: Wed Oct 13 19:11:25 2010 -0400 Linux: fix statfs configure test The change to the statfs configure test that was made for 2.6.36 broke the test for older kernels. The new test is based on a call, and that will generate a warning but not an error when the arguments don't match the prototype. Take another tack, and revert to the old style test, but with the simple_statfs function instead of vfs_statfs. Change-Id: Ic4baa24e2497f43791e069ce2c5c87fa21813f9f Reviewed-on: http://gerrit.openafs.org/2975 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ca58739ebc58428187366476b682bf20d9850645 Author: Tom Keiser Date: Thu Oct 14 01:34:40 2010 -0400 rx: fix typo in rx_atomic Solaris backend Fix typo so rx builds again on Solaris. Change-Id: I328e05937b376c659bb42ba8db51f512b14da6f3 Reviewed-on: http://gerrit.openafs.org/2980 Tested-by: Tom Keiser Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ba96ebba7197420b1511bd1aae9db495398e038a Author: Andrew Deason Date: Wed Oct 13 11:27:03 2010 -0500 LINUX: old kernel warning fixes - osi_vfsop.c: struct super_block, not superblock - osi_vnodeops.c: initialize bypasscache Change-Id: I8492faeda632a05c080013cef71a95c60ab7c931 Reviewed-on: http://gerrit.openafs.org/2973 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a91da7a7b91ce0c4584092cd666eca89d39b8abf Author: Tom Keiser Date: Wed Oct 13 01:10:09 2010 -0400 don't release Volume lightweight ref too early FSYNC_com_VolOff was releasing its lightweight ref before the error handling code for VGetVolumeByVp_r was executed; this code needs to dereference the Volume pointer for some of its logic. This was unsafe since VCancelReservation_r() could have resulted in the Volume object being freed. Move VCancelReservation_r() below the error handling block. NB: the error handling block now relies upon the goto done/deny to cancel its lightweight ref. Change-Id: Ic920e45d55f7d1773585a5c0b004c722355b5725 Reviewed-on: http://gerrit.openafs.org/2968 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0af2b14304d48609e0fcd03cb1dc9526bac2b9f6 Author: Hans-Werner Paulsen Date: Wed Oct 13 15:13:51 2010 +0200 wrong rule to make afsd_fuse in src/afsd/Makefile.in the rule to make afsd_fuse was not modified to recognise CFLAGS_afsd_fuse.o Change-Id: Iae7863362a3cc7920d68e0c96f57433143664c27 Reviewed-on: http://gerrit.openafs.org/2972 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a6d4c162a38e5ff95014c140fba379cce7d7e08 Author: Marc Dionne Date: Tue Oct 12 21:05:45 2010 -0400 Linux: fix aklog -setpag to work with ktc_SetTokenEx The bit of code that allows aklog -setpag to work with recent linux needed to be moved along with the change from ktc_SetToken to ktc_SetTokenEx. While we're in this bit of code, make it depend on the definition of the syscall in the user space headers instead of relying on a kernel configure test. Change-Id: I0e556b514986b5d06daabcff67ecd51b0e4becdd Reviewed-on: http://gerrit.openafs.org/2976 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bdc8aa160b8eff397c2dcd7fa6760d0cae59d0fc Author: Simon Wilkinson Date: Mon Oct 11 14:08:00 2010 -0400 rx: Don't count unknown packets as missing Just because a packet is in the transmit queue, don't assume that the other side has instantly seen it! Currently, if we receive an ACK packet which doesn't include the entire transmit queue, then we will end backing off, even if we haven't sent the packets. Restrict this behaviour to packets which are implicitly acked (or otherwise) by the sender. Change-Id: I2d63cd27d6d748007f87ff303f3fd64549a6208d Reviewed-on: http://gerrit.openafs.org/2959 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman commit e45abc6cc20236b9e91c23cb6f8e90f51b6a4a99 Author: Jeffrey Altman Date: Tue Oct 12 10:53:43 2010 -0400 Rx: Consolidate wait for tq busy and make its use uniform rxi_WaitforTQBusy() is now used wherever a wait for the transmit queue is required. It returns either when the transmit queue is no longer busy or when the call enters an error state. Having made this change it is clear that call->currentPacket is not always validated when the call->lock is reacquired which may be true when rxi_WaitforTQBusy() is called. Change-Id: Ibf297f1447755be2abd39a81063cc7efd7f7a08b Reviewed-on: http://gerrit.openafs.org/2966 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 09aec1539dbe4e4c72ec7acadf2d25e6f93c5982 Author: Simon Wilkinson Date: Sun Oct 10 08:04:41 2010 -0400 rx: Don't malloc the xmit list Building the transmit list happens in a time critical section of code. Using malloc to allocate the list which holds the packets to be transmitted slows down this critical section. Instead, just allocate the space as part of the call structure. Locking of xmitList is somewhat tricksy, as the call->lock is dropped over calls to sendmsg(). However, the xmitList is protected by the TQ_BUSY call flag, which prevents multiple threads from usign the transmit queue, and hence the xmitList, simultaneously. Change-Id: Iff64979fa1caeed2ba57d915fecb7ce823f345cf Reviewed-on: http://gerrit.openafs.org/2957 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7d6080a841ff8c91052fa708d5be3b582f8a971d Author: Andrew Deason Date: Fri Oct 8 11:51:30 2010 -0500 RX: Force sane timeout values Currently we do not check the specified timeout values when someone changes a connection's dead, idle, or hard dead time. However, if the conn's dead time is larger than the other two times, a loss of network activity will result in one of the other timeouts getting triggered first. To prevent this and possibly other problems from happening, force a connection's timeouts to always obey the relationship secondsUntilDead <= idleDeadTime <= hardDeadTime, by checking these values whenever they are changed. Change-Id: I681dce7f359bf71333e69ceab8186bdc1d54d8dc Reviewed-on: http://gerrit.openafs.org/2947 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 48aca4a605fa46b677a50687d6ea911fbe7d2032 Author: Andrew Deason Date: Wed Oct 6 17:24:02 2010 -0500 RX: Adjust all timeouts for RTT Previously only the deadTime RX network timeout was getting adjusted for the peer's rtt and rtt_dev values. Do this for the idle and hard timeouts as well, since a higher RTT is going to make everything potentially take longer. Change-Id: I1aabcfd19656d5130eaa0e41e0974b3b4427add1 Reviewed-on: http://gerrit.openafs.org/2967 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 198447ee71ca6510b760141395af5002daab2424 Author: Tom Keiser Date: Wed Oct 13 02:15:36 2010 -0400 update fssync-debug to handle the VOL_LOCKED flag Allow fssync-debug to dump the VOL_LOCKED flag, rather than the current behavior of printing absolutely nothing when this flag is asserted. In addition, increase the flag buffer size since it turns out we would truncate if all nine flags were asserted at once. Change-Id: I4d58f8c599dcc3b17f8cfd76e88dac12097207c1 Reviewed-on: http://gerrit.openafs.org/2971 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9577ec85c967ce4eb0c5a5ab45761a25da30038a Author: Tom Keiser Date: Wed Oct 13 01:27:56 2010 -0400 trailing commas make xlc a sad panda IBM VAC xlc_r throws parse errors when enumeration definitions have trailing commas; let's avoid that. Change-Id: I586fd6ed544bcbab444cc1d0964315a00b4d34b3 Reviewed-on: http://gerrit.openafs.org/2970 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6880d4a3a227f6c05332ef799123e0a05b190aa9 Author: Chas Williams (CONTRACTOR) Date: Thu Oct 7 11:05:50 2010 -0400 Use bigger I/O sizes for the memcache There doesn't seem to be a need to limit the rx message size when using rx_WritevAlloc. If there arent enough rx buffers to hold the entire message at once, it will simply return less space. Change-Id: Ic1e99432c8e4d21c71f831b8d6aeea9f12b1c99c Reviewed-on: http://gerrit.openafs.org/2943 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5142f16bd37345fa15ec1cb24b519d936baae99a Author: Simon Wilkinson Date: Mon Oct 11 15:18:06 2010 -0400 hcrypto: Tidy up some merge conflicts There were some (harmless) merge conflicts in the hcrypto Makefile. Get rid of them. Change-Id: Iaf67d234d0f9ff24432479b2ae065adb73d5665b Reviewed-on: http://gerrit.openafs.org/2963 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e279ae77a7e9babcace78b67c40ccc959161d77a Author: Andrew Deason Date: Thu Oct 7 11:04:04 2010 -0500 LINUX: Build fixes for older kernels Error and warning fixes for older kernels in osi_compat.h: - In afs_posix_test_lock, remove the assignment in the conditional to silence a warning - Call getsockopt for kernel_getsockopt, instead of setsockopt - Missing end brace in afs_try_to_freeze - Prototype find_exported_dentry, since Linux doesn't give us one Change-Id: Iae56bb0b0405bfd23dfd68a22c1d7922663b1442 Reviewed-on: http://gerrit.openafs.org/2946 Tested-by: Andrew Deason Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e16d7b7d6a6980fbda3186a578fb7e26fc334194 Author: Simon Wilkinson Date: Tue Oct 5 21:21:38 2010 +0100 rx: Don't call gettimeofday for every packet ack Every time we receive an ACK packet, we call gettimeofday() for every entry in the transmit queue that's permanently ack'd by that packet. Instead, just make a note of the time when we start processing the packet queue, and use it for every packet in the queue. This shaves around 5% off rxperf's runtime with a window size of 128. Change-Id: I65c705c575c4a470b49390e7efca33c279a3133c Reviewed-on: http://gerrit.openafs.org/2956 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7e0b9ba7fc0bc5161d351c7129a5a23650ea7904 Author: Jeffrey Altman Date: Mon Oct 11 15:11:52 2010 -0400 Windows: Build hcrypto shared library Build a single afshcrypto.dll shared library on Windows. There are no lwp vs pthread differences on Windows due to the use of the Windows random data sources. Change-Id: I02e4d7ee437440433a983f3eb361c78ac3cbbca6 Reviewed-on: http://gerrit.openafs.org/2964 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 091b6e19d14b8d7c7396496d050fff5d067791a9 Author: Jeffrey Altman Date: Mon Oct 11 15:00:08 2010 -0400 Windows: Cleanup build scripts; no include\afs or include\rx As part of the build system cleanup, minimize the number of directories in which include\afs and include\rx paths are included by default. To acheive this goal the windows openafs dirent.h is moved from include\afs to include, references whenever possible to openafs headers included in include\afs or include\rx are prefixed with afs\ or rx\ as appropriate. Some source files or directories have a broad range of interdependencies that make separation quite challenging. For those directories or files the inclusion of the path is added at the smallest possible level. At some point in the future the WINNT\afsd\ headers should be moved from include\afs to include\WINNT and should be installed there first and then referenced internally from that location instead of from the WINNT\afsd directory. That will permit further cleanup to be performed. Change-Id: I5e3a9623071c71db2f4445dc43266fdb3dad2c91 Reviewed-on: http://gerrit.openafs.org/2961 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e95c8eaaf53dee68fe4db14acc0385a6bb84b992 Author: Simon Wilkinson Date: Mon Oct 11 15:15:04 2010 -0400 Fix rxperf includes Don't use raw includes for "rx.h" and friends - instead include them from the appropriate place in our include tree. Change-Id: Ic136b20b571bef3f476de02302404d64cc741171 Reviewed-on: http://gerrit.openafs.org/2962 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d8434eefa78f3e3d4b3d0e265aa47d0617fcc4aa Author: Simon Wilkinson Date: Mon Oct 11 13:40:41 2010 -0400 rx: Indent dpf definition Indent the CPP macros that define dpf() so that it's a little bit clearer what's going on. Change-Id: If2ccd637ac063c8400a16725972418224e9c5140 Reviewed-on: http://gerrit.openafs.org/2955 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 63592f0bfd903f6c7019317bb61294688ceb2958 Author: Heimdal Developers Date: Mon Oct 11 14:43:48 2010 -0400 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision bf1f62b0a8cf72d32875656a7365f1e14d535dc5 which is described as switch-from-svn-to-git-1605-gbf1f62b This is locally modified to include the earlier local fix to sha512.c Change-Id: I757e636654b713625f7d468da6aa37f1006aaa2a Reviewed-on: http://gerrit.openafs.org/2954 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 16b9038bd41ff208ff4953b62f07313f2435a250 Author: Simon Wilkinson Date: Mon Oct 11 14:42:03 2010 -0400 Heimdal: Import rand-w32.c for hcrypto on Windows Windows has its own PRNG for hcrypto, so add the necessary file to our import list. Change-Id: Iea7a17fa9bfb90b9a9ebd5176936da21b3477bba Reviewed-on: http://gerrit.openafs.org/2953 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7f742f45a2aaa9dcb400aa1dc35ce617876fe7fd Author: Jeffrey Altman Date: Sat Oct 9 03:06:07 2010 -0400 Windows: Do not issue RXAFS change RPCs on known RO volumes If the cm_scache_t is known to be on a RO volume, do not permit RXAFS_xxx RPCs that would attempt to make a change to the volume to be issued to the file server. Instead, return CM_ERROR_READONLY immediately. This avoids triggering the abort threshold for the current connection on the file server. LICENSE MIT Change-Id: I9c917e60277d281e32e4609d89b541803824251f Reviewed-on: http://gerrit.openafs.org/2950 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f22ae5f7d8b3c143de21355f819ab872a0cf76fd Author: Simon Wilkinson Date: Mon Oct 4 13:49:16 2010 +0100 Unix: Rework build system Rework the unix build system so that we support taking CFLAGS and LDFLAGS from the command line, and don't replace them with our own settings. Also, take the opportunity to bring some sanity and consistency into our Makefiles. The standard Makefile.config now defines rules for LWP, pthreaded and shared library builds. The CFLAGS settings for these are called LWP_CFLAGS, PTH_CFLAGS and SHD_CFLAGS, respectively. Similarly named variables are provided for LDFLAGS. A module may select to use a particular build type for its suffix rule by including either Makefile.lwp, Makefile.pthread or Makefile.shared from src/config. This creates an appropriate .c.o suffix rule, defines AFS_CFLAGS and AFS_LDFLAGS as appropriate, and creates two rules AFS_CCRULE and AFS_LDRULE, which can be used to build, and link objects. For example: foo.o: foo.c $(AFS_CCRULE) foo.c foo: foo.o $(AFS_LDRULE) foo.o If a you wish to override the CFLAGS or LDFLAGS for an object build using these rules (or through the .c.o suffix rule) you can do so, by defining CFLAGS_ or LDFLAGS_. For example: CFLAGS_foo.o= -DDEBUG LDFLAGS_foo = -ldebugging A module may also alter the behaviour of the compile and link steps module wide by defining MODULE_CFLAGS or MODULE_LDFLAGS. This functionality is now used throughout the tree: *) Suffix rules are used wherever possible, removing a number of unecessary build rules. *) All link steps are replaced with AFS_LDRULE *) All standard compile steps are replaced with AFS_CCRULE *) Unusal compile steps are defined, as far as possible, int terms of the LWP_ PTH_ and SHD_ variables. *) The use of $? has been removed entirely, as it makes it impossible to provide build rules with dependency information Change-Id: If76207e45da402a0ed9d7c1bdbe83c58c911a4f2 Reviewed-on: http://gerrit.openafs.org/2896 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 1466cd755ce3b48d312fb4404f494934840e586b Author: Andrew Deason Date: Thu Jul 29 11:06:28 2010 -0500 fssync-debug: exec DAFS version if DAFS detected If the user requests something that differs depending on whether the server is DAFS or not, try to exec the DAFS-enabled fssync-debug (dafssync-debug) for them. Based on a conversation with Tom Keiser. Change-Id: If914d63d2eb4605e4d9a9d00af62264ac484c206 Reviewed-on: http://gerrit.openafs.org/2480 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a2888f6d405150933bc31d1470ca2426bdf77c50 Author: Phillip Moore Date: Thu Oct 7 19:25:09 2010 -0400 Extract the .version file when building the srpm file If you are building the source and binary rpms from a released tarball, instead of a real git repo, the .version file is required by build-tools/git-version. With out this, the version defaults to UNKNOWN, and although the source rpm will build, it won't compile. Change-Id: I787b051d5150c65a0d71ac38b30f32e1c560c4b3 Reviewed-on: http://gerrit.openafs.org/2948 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 50b99f85cae778ab270590d1282fd9d84a0e6ca3 Author: Ben Kaduk Date: Fri Oct 8 00:20:57 2010 -0400 Revert "FBSD: in lookup, when ISDOTDOT, unlock dvp" This reverts commit 96e433aebdd5699f02c205df2cce38927cd19a88. It was not properly tested, fails to compile on some systems, and destabilizes the client. Change-Id: I80b08013c9f2d060ab7ed5a18d57311701aa8b88 Reviewed-on: http://gerrit.openafs.org/2951 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f1a0239fba5855c5fed418f057bd5397d412e907 Author: Phillip Moore Date: Tue Oct 5 16:10:19 2010 -0400 Added missing CLI argument dropped during last commit. Oops -- when removing the -cell arguments to the bos commands, the "admin" username argument to "bos adduser" was mistakenly removed as well. Change-Id: If5136869c7d2bff3340018a3110fd5408750e5a6 Reviewed-on: http://gerrit.openafs.org/2940 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c2ed2577f9c16df3088158fb593d7aab6e8690d0 Author: Ben Kaduk Date: Tue Oct 5 23:30:35 2010 -0400 FBSD: in lookup, when ISDOTDOT, unlock dvp Keeping dvp locked when vp is its parent can lead to deadlock. Always unlock dvp, not just for 6 and earlier. Change-Id: I26a60188d39ccd24b4db7479c57a525bb37618e9 Reviewed-on: http://gerrit.openafs.org/2942 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 77456c07945659ff1254732aa8e428e6301e5ee6 Author: Jeffrey Altman Date: Tue Oct 5 11:32:05 2010 -0400 Windows: do not leak cm_volume_t objects from LRU queue The LRU queue is where volume objects are recycled from. Therefore if they are removed then they must be put back. Remove extraneous operations from cm_AdjustVolumeLRU(). LICENSE MIT Change-Id: I1f6aadd0ffb7aeafa013087e4825b3c8d8252a2d Reviewed-on: http://gerrit.openafs.org/2913 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 51c761706a9945ab40d34b4212bd463fa617636e Author: Phillip Moore Date: Tue Oct 5 12:46:35 2010 -0400 Quick Start Guide updated for RHEL rpms, and CLI syntax The names of the RHEL rpms have been updated to reflect what is actually published on openafs.org, and the CLI syntax of the commands run using -noauth have had the unnecessary -cell options removed. Change-Id: I5c03d371c822d1d064660a3b00fb3d1e64bff141 Reviewed-on: http://gerrit.openafs.org/2914 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 21e1bb9bb46b0e8e2523c3310ea8e602d2b07091 Author: Christof Hanke Date: Tue Oct 5 17:01:41 2010 +0200 volserver: Do not return ENOMEM on AIX from XVolListPartitions When calling "vos partinfo" or "vos listpart" towards a server running AIX with no partitions attached, it would return a ENOMEM, because unlike on linux, malloc(0) returns NULL on AIX. Thus, just don't do any malloc, when we have no partitions anyway. Change-Id: Id1900e2ab11850ada8b2e91667288576d408014b Reviewed-on: http://gerrit.openafs.org/2912 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 Author: Simon Wilkinson Date: Fri Oct 1 23:17:56 2010 -0400 rx: Reduce dependence on call->lock This patch reduces our dependence on call->lock, by allowing more of the reader thread to run lock free. Doing so requires that call->mode only be set by the reader thread. As a result, call->mode can only be set to RX_CALL_ERROR by rxi_CallError(). The mode is set to RX_CALL_ERROR by the reader thread immediately after regaining the call->lock when it has been dropped. Change-Id: Ie9541d8beac2d428526f8b2b4cc0004219e820be Reviewed-on: http://gerrit.openafs.org/2880 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e395c9f33617222391d4d8801e16de1a20b544e6 Author: Simon Wilkinson Date: Tue Oct 5 01:20:32 2010 +0100 hcrypto: Fix builds on Irix The recent hcrypto pullup added a depedence on the errx() function, which isn't present on Irix. Solve this by pulling in a load more of libroken, in order to provide this function. In the long term, libroken should get split out into its own directory, and the ability to use a previously installed libroken should be added. For now, this will hopefully get Irix on its feet again. Change-Id: I0642f80079e113403cbef6eca03ca652616ddc61 Reviewed-on: http://gerrit.openafs.org/2904 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e7a12d56bc3b27a3ada37e2799e1925204d23300 Author: Simon Wilkinson Date: Tue Oct 5 09:01:00 2010 +0100 Irix: Make compiler less chatty Supress a few of our errors from the Irix compiler and linker, so its output is a little less verbose. This change suppresses the function declared but not used and multiple declaration errors that we get due to our static_inline fudge and the paramater declared but not used errors. Other error suppression is possible - you just need the number immediately after the 'cc-' in the build logs to say which number to add to the -woff line. Change-Id: I55485ff422feeecbb922e8fd63321605d6a8575c Reviewed-on: http://gerrit.openafs.org/2908 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit de158f8fdf1d4198d6fcd16f5078b5eac861ba0a Author: Heimdal Developers Date: Tue Oct 5 08:20:03 2010 +0100 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision 48ad3e1e6597f03cce5439831ef94b5ec11894e9 which is described as switch-from-svn-to-git-1593-g48ad3e1 Change-Id: I0fda4dcf7c7e06de70636969c2f3242b9de714be Reviewed-on: http://gerrit.openafs.org/2907 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b360ef85df1b5819e7e9d9f43a44ec31565df337 Author: Simon Wilkinson Date: Tue Oct 5 08:19:11 2010 +0100 Yet more imports from libroken Even more symbols to keep Irix content Change-Id: I6af4f0b9af0874a334ec8e5a19ea0650de295d4f Reviewed-on: http://gerrit.openafs.org/2906 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d73bd5778a22f574a6f065a18f18d4379e9ffb4a Author: Jeffrey Altman Date: Tue Oct 5 08:31:22 2010 -0400 Windows: Kill AFS_LARGEFILES preprocessor symbol All builds define AFS_LARGEFILES so kill the symbol and discard the !AFS_LARGEFILES source code. Change-Id: I36a2131e30b24d3d1a8f37f5629795bdd92c6b27 Reviewed-on: http://gerrit.openafs.org/2910 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fc9aa428f4f9a5b5188ace7bfb0301a3a184e9c0 Author: Simon Wilkinson Date: Thu Sep 30 13:58:26 2010 +0100 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 Reviewed-by: Jeffrey Altman commit 27aed8fd27c2cf05c4172b33028a431e0e79daed Author: Simon Wilkinson Date: Tue Oct 5 13:15:49 2010 +0100 Revert "util: Add base64 from Heimdal's roken" This reverts commit d552426b14d5f5befe74958a21bc9375d5312287. util already has a base64.c, the Windows bits of this are half-baked, and we need to find a config.h from somewhere so that this builds cleanly. Just back it out, until I can do it properly. Change-Id: Iec3ef4579c8f83c7c00e03ad777489e287bbd2f3 Reviewed-on: http://gerrit.openafs.org/2909 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47da0d1e15ceef83ff99a25d48b92dc142b380f4 Author: Heimdal Developers Date: Tue Oct 5 01:01:34 2010 +0100 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision 48ad3e1e6597f03cce5439831ef94b5ec11894e9 which is described as switch-from-svn-to-git-1593-g48ad3e1 This import was manually modified to preserve our current local fix for sha512.c Change-Id: Ie020beb7324469d33b85ac4c559cc473f2728d19 Reviewed-on: http://gerrit.openafs.org/2903 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 66b523afb5d6aa80d5df34805437dad807a7012d Author: Simon Wilkinson Date: Tue Oct 5 00:59:43 2010 +0100 Import yet more files from Heimdal Import still more files from Heimdal, so that we can try to make Irix happy once more. Mutter, mutter, mutter. Change-Id: Ic8f20885fd324ab3698109f75ba41cdf6d0975dd Reviewed-on: http://gerrit.openafs.org/2902 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d382c520cc67ca67f1d02f7a326fe19fb884cabe Author: Simon Wilkinson Date: Mon Oct 4 20:22:50 2010 +0100 Heimdal: Fix 32bit build problems The earlier inclusion of sha512 from Heimdal broke the build on 32bit platforms, because this file doesn't flag 64bit constants as being such. The correct place for this fix is in Heimdal, and it will be replaced with a fix from Heimdal as soon as one is available. For now though, this gets our build going again. Change-Id: I0de822a933184078c491a16aafef45519fa2bbd2 Reviewed-on: http://gerrit.openafs.org/2901 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4803d50bdb8cdeae2c3f86b5c09e853573bc49eb Author: Andrew Deason Date: Sun Oct 3 18:27:19 2010 -0500 vol: Log ignored dirs that look like partitions If we see a /vicep*-like directory when we VAttachPartitions, and we ignore it because it lacks an AlwaysAttach, log that we ignored it. This may make things less confusing to admins that just try to create a /vicep* directory and don't know why it doesn't work. Feature suggested by Jason Edgecombe. FIXES 128221 Change-Id: I0802f914658c7df413b22b3726a5085f1b646266 Reviewed-on: http://gerrit.openafs.org/2893 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d552426b14d5f5befe74958a21bc9375d5312287 Author: Simon Wilkinson Date: Mon Oct 4 15:24:15 2010 +0100 util: Add base64 from Heimdal's roken Add the base64 code from libroken into libutil, using the src/external framework. Create a new, non-installed directory, to hold util headers, rather than continuing to stuff everything into afs/ Change-Id: I6b743a3702c3bb07ac798392475e7e067765f238 Reviewed-on: http://gerrit.openafs.org/2900 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 26b61c64b56742cf0c5d59ba3b62b9803bec70c5 Author: Simon Wilkinson Date: Mon Oct 4 16:01:55 2010 +0100 hcrypto: Build fixes Fix the hcrypto build to deal with the changes introduced by the latest import from Heimdal Change-Id: I2effebffb6df2fdb351d070f8ea06ecf01aab46e Reviewed-on: http://gerrit.openafs.org/2899 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ebed02734e23ed678d84d17bc7ffb0823935c7b Author: Heimdal Developers Date: Mon Oct 4 14:25:11 2010 +0100 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision 48ad3e1e6597f03cce5439831ef94b5ec11894e9 which is described as switch-from-svn-to-git-1593-g48ad3e1 Change-Id: I90eb6752000d6794e830a704adcf367928b05a98 Reviewed-on: http://gerrit.openafs.org/2898 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b0974636a3ea7de8aa3ce56e76816ae48b7d1180 Author: Simon Wilkinson Date: Mon Oct 4 15:18:02 2010 +0100 Add more files from Heimdal Add the base64 implementation from libroken, and the n-fold.c file from libkrb5 to the list of source files that we import from Heimdal. It also pulls in the new sha512.c and validate.c files which are now necessary to complete a userspace hcrypto build. This patch will fail to build until the build fixes from the subsequent change are applied. Change-Id: I60a691d0ccebd6d6bfb823856f79b59670eb86ec Reviewed-on: http://gerrit.openafs.org/2897 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 907521feb1b9c7a6c816866a672c7ab84dac6abd Author: Simon Wilkinson Date: Mon Oct 4 12:33:24 2010 +0100 configure: Restore saved CFLAGS When we test for whether the C compiler can take the -fno-strength-reduce flag, we add the flag to CFLAGS to do so. However, we were not restoring the old value of this flag when we completed the test, and so we were always setting -fno-strength-reduce in the userspace compile. Previously, this was harmless, as we always overwrote CFLAGS, but if we're moving to a world where we honour the user's setting of CFLAGS, we need to not leak changes in this way. Change-Id: I029c9fe91132ced34867445afe673761a597ccbe Reviewed-on: http://gerrit.openafs.org/2894 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b1f747c1f131fc1a9f8a5895fb06607a255a27d8 Author: Simon Wilkinson Date: Mon Oct 4 13:45:53 2010 +0100 configure: Don't let autoconf pick our CFLAGS If the user hasn't specified CFLAGS on the command line to ./configure, then autoconf will set them to -g -O2 if the compiler supports those options. For compatibility with what OpenAFS has always done, and to let us manually set optimisation and debugging flags later, disable this behaviour. Change-Id: Ic78d5f824433d94d76f16c107af3488132d57155 Reviewed-on: http://gerrit.openafs.org/2895 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9fed169b1c5c823fd96cea94daf712b2cf06c901 Author: Andrew Deason Date: Fri Sep 10 15:52:34 2010 -0500 vos release: Force full dump on RO_DONTUSE sites When releasing a volume, currently we perform an incremental dump on RO_DONTUSE sites if the volume exists on the remote site. Since RO_DONTUSE implies that we do not expect a site to exist there, delete the extant volume if we find one and force a full dump. If we perform an incremental dump, we run the risk of incrementally dumping to a temporary volume that the administrator is not aware of, and doesn't have any actual data but has a last update time late enough that it may be missing some data after the incremental dump. So to avoid that, force a full dump every time. Change-Id: If751a66d6e1499b5d6f67457ae28277a6200c53a Reviewed-on: http://gerrit.openafs.org/2731 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 60c4b248893f80431b2ea2a5d558c3536f86611a Author: Chas Williams (CONTRACTOR) Date: Sun Oct 3 14:35:46 2010 -0400 sin_family is not network order sin_family isnt sent over the network and therefore doesnt need htons(). sin_family is essential the same as domain, and no one does socket(htons(AF_INET), ...) Change-Id: Ie0e2396f78e0934d49aeeacfc9c5ffe98df211b6 Reviewed-on: http://gerrit.openafs.org/2891 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 196d032fb252fa5d0827436fcfa38d9a48a49ab9 Author: Marc Dionne Date: Sun Oct 3 14:35:20 2010 -0400 Remove duplicate rx_stats targets in libuafs Makefile The libuafs part of commit 4346144b was not needed, rx_stats was already in the Makefile. Harmless, but generates warnings. Revert the libuafs portion of that commit. Change-Id: I14d64445c9690bc6d69881c6bd6c00c4670895f3 Reviewed-on: http://gerrit.openafs.org/2892 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a30da5e74c7809c068b457fec68f965a88dfff5f Author: Derrick Brashear Date: Sun Oct 3 02:02:22 2010 -0400 rx stats atomic inclusion needs kmutexes for emulation for platforms with no native atomics we use a mutex. well, fine, but without defining kernel mutexes, that doesn't work so well. Change-Id: Ia85e24aad8684a3855511de9548acee4ab86e83e Reviewed-on: http://gerrit.openafs.org/2890 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 565ab7aa8e751c06d03c3ab0034915572c29ef7c Author: Jeffrey Altman Date: Thu Sep 16 01:06:22 2010 +0200 Windows: Ensure that cm_NameI errors are acted upon promptly There are many cases in the SMB server where an error from cm_NameI() was either ignored or not acted upon until several other operations are performed that could result in the same error being repeated. This is a mistake which did not have negative side effects until additional checks for callback status were added recently. At present, if a CM_ERROR_ACCESS error is returned and ignored, subsequent attempts to operate on the same cm_scache_t will result in additional queries to the file server that will also end in an abort response. This can trigger the file server to delay responses to the client. This patchset ensures that all cm_NameI() errors are acted upon promptly. LICENSE MIT Change-Id: Ie334b624cc2b28f2c2a37787b5edef9d37cdb041 Reviewed-on: http://gerrit.openafs.org/2887 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 6ad0e5b529dbfd7a2401a0622eb4ea5269124ceb Author: Jeffrey Altman Date: Thu Sep 16 01:01:06 2010 +0200 Windows: Fix Parent(path) computation to permit mp and symlink creation The parent path computation was leaving trailing slashes on the path names which prevented the creation of mount points and symlinks when UNC paths were used that contained mount points. LICENSE MIT Change-Id: I50cba9cb8a2b0ad45f84995d05f368052be683cc Reviewed-on: http://gerrit.openafs.org/2886 Tested-by: Jeffrey Altman Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman commit 61b73864d74ac4d381c9d5d2712837426c84061d Author: Marc Dionne Date: Sat Oct 2 20:32:05 2010 -0400 Conditionalize include of string.h in rx_stats.c Linux doesn't have , it's in the linux subdirectory. But it is already included by sysincludes.h, so it should not be needed here. Change-Id: I017c374e7b6d47e900ec73b40a36183a3f23f35c Reviewed-on: http://gerrit.openafs.org/2888 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3940e686a880410b9001786734d158411782a965 Author: Marc Dionne Date: Sat Oct 2 21:02:23 2010 -0400 Linux: correct use of atomic_add and atomic_sub functions The rx_atomic_add and rx_atomic_sub functions have arguments reversed compared to the linux atomic_add and atomic_sub. Adjust the macros to flip the arguments when calling them Change-Id: I6d58c8f0ac8ccf09e62c9d3921b9f3ae50ca94c9 Reviewed-on: http://gerrit.openafs.org/2889 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fab6c9db2fb6418c1c4ebf32e441e0d2bdb9d817 Author: Jeffrey Altman Date: Sat Oct 2 11:43:03 2010 -0400 Rx: Fix RXDEBUG_PACKET builds Commit 37946ee1739aa22cb2f7330a37504d33a7733c9a unintentionally broke RXDEBUG_PACKET builds. Fix it. Change-Id: I833109b8e35f2f3487fe2865856c7f37cd31e0c2 Reviewed-on: http://gerrit.openafs.org/2882 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b62cacf889a6a231a97951baad6594e4066880bd Author: Jeffrey Altman Date: Fri Oct 1 23:47:11 2010 -0400 Rx: raise rx_minPeerTimeout to 20ms At 2ms it is possible for the packet we are sending to be resent just about immediately as the retryTime computation occurs before the send takes place and not afterwards. If the network send blocks, the retryTime may have already expired. We do not want rx_minPeerTimeout to be too large though because the value will end up being used as the backoff time period when the actual RTT for the connection is less than the rx_minPeerTimeout value. Extensive testing shows 20ms to be an adequate compromise that avoids the vast majority of unnecessary resends without unnecessarily slowing down the connection if a packet is in fact lost. Change-Id: I87248ec1cff6a4d0862da0239d4c203024a783b6 Reviewed-on: http://gerrit.openafs.org/2881 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3cd3715e608b801b4848399e42cb47464e6e3cc3 Author: Jeffrey Altman Date: Thu Sep 30 10:48:58 2010 -0400 Rx: When call receive is done, send ack all packet When all of the packets for a call have been received, immediately send an ack all packet to the peer. This permits the peer to free the contents of the transmit queue and cancel all pending resend events. Change-Id: Ic06ccaca6f0c5e2f770c5c45c84f7fc155207bcf Reviewed-on: http://gerrit.openafs.org/2871 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5613ea60fc9431dbc87bc8ad6439f9b5af38af5c Author: Jeffrey Altman Date: Wed Sep 22 16:36:03 2010 -0700 Rx: protect rx_conn and rx_call refCount field with rx_refcnt_mutex Add a new global mutex rx_refcnt_mutex to protect the conn->refCount and call->refCount in place of relying upon the conn->conn_data_lock and the call->lock. This will relieve some lock contention with rx_ReceivePacket(). Change-Id: Iebc04a87149a9fe69a7e312e8968b08c2e94148d Reviewed-on: http://gerrit.openafs.org/2837 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b2a21422129ca1eeeb5ea1a1f7b08b537fd2a9f7 Author: Derrick Brashear Date: Sat Oct 2 12:43:36 2010 -0400 darwin kernel atomics actually enable atomics for the darwin kernel, whose API is just slightly different Change-Id: I566149428d253806c4546fa0c5a3f96e8098c4eb Reviewed-on: http://gerrit.openafs.org/2884 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4346144b8489671c648be5c0cdfd9c235a928f0d Author: Derrick Brashear Date: Sat Oct 2 12:59:46 2010 -0400 add rxstats to kernel add split out rxstats module to kernel Change-Id: Ibdc721f19a63c58604a56b0099d0c52161d3b00c Reviewed-on: http://gerrit.openafs.org/2885 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 12e6531f0079597280e1b3961738af55d682d3f5 Author: Chas Williams (CONTRACTOR) Date: Fri Oct 1 09:40:16 2010 -0400 add option to rxperf to use rx_Readv() instead of rx_Read() rx_Readv() is a bit "faster" than rx_Read() and typically used by most afs transaction. server% rxperf server client% rxperf client -c send -s server SEND: threads 1, times 100, bytes 1048576: 2073 msec server% rxperf server -v client% rxperf client -c send -s server SEND: threads 1, times 100, bytes 1048576: 983 msec Change-Id: I27b06dbbb61f2bc34fa91bcda3c6e046c787ff62 Reviewed-on: http://gerrit.openafs.org/2877 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 59e6ac8a5c354b746a4b984f4a10af91ebeef5f3 Author: Jeffrey Altman Date: Sat Oct 2 00:49:38 2010 -0400 Windows: Pass Volume Root Fid to cm_Analyze after RXAFS_GetVolumeStatus RXAFS_GetVolumeStatus can return VNOVOL, VMOVED, etc. In order to process them and update volume state a fid must be passed to cm_Analyze(). Use the volume root fid. LICENSE MIT Change-Id: Ia6115a17aae06144277271048e8287e5ad52ff2a Reviewed-on: http://gerrit.openafs.org/2883 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4ca57f3fd302e339aaf4d4625b904fcfd3d2f0e8 Author: Andrew Deason Date: Thu Mar 11 10:43:54 2010 -0600 Provide an abstract thread pool object Add some routines to maintain a pool of threads, for working through a Vwork_queue. This adds the afs_tp* series of functions. Originally written by Tom Keiser. Change-Id: I8735aa14ca6622ae0eca7a7589e69b0f3b3daf08 Reviewed-on: http://gerrit.openafs.org/1863 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bfbc65676d6ea2d4d000d2f8813bcc0958cf8ea2 Author: Andrew Deason Date: Thu Mar 11 10:39:56 2010 -0600 Provide an abstract work queue object Add some routines for specifying chunks of work to be done. The idea is to be able to pass these to different threads, and specify dependencies between them, wait on them completing, etc. This adds the afs_wq* family of functions. Originally written by Tom Keiser. Change-Id: If556cf4da12de8c4be1e53376d85d791584ae177 Reviewed-on: http://gerrit.openafs.org/1862 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ecc90f3cd3f5a7c96b3689ab0c5f6a42edc3ed0 Author: Derrick Brashear Date: Thu Sep 30 23:57:11 2010 -0400 exempt instant timeouts from mtu discovery if we set lastReceiveTime to 0 to hint that no net, honor that here as "just time out" Change-Id: Ifb06fad782669649027841e3930ff94600b6c900 Reviewed-on: http://gerrit.openafs.org/2875 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e04f17704a4ceb242ea0b01abd225f89fa0979e7 Author: Andrew Deason Date: Tue Sep 14 10:45:10 2010 -0400 DAFS: Raise LogLevel for per-chain vol stats Only report detailed per-chain volume statistics on shutdown/SIGXCPU if LogLevel is 125 (or 25 for smaller per-chain stats). If a fileserver is configured with a large -vhashsize, printing out stats for each chain can take awhile and use up a nontrivial amount of disk space for logging, so only print out these stats if we're asked for them. Change-Id: Iceb38e29ab40958e05f3cf146687f679bd0f061c Reviewed-on: http://gerrit.openafs.org/2759 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 9d912b6f1c4f3d242429c66291107b2badd166e4 Author: Chas Williams (CONTRACTOR) Date: Fri Oct 1 09:58:52 2010 -0400 rename some variables in rxperf sendtimes and recvtimes are actually the data byte counts to be exchanged during an rpc test not an iteration count as implied by their names Change-Id: I3d567aacf1ab1d25fda20e48a6bbb68a63330230 Reviewed-on: http://gerrit.openafs.org/2876 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 87e96c30e069a2379365c9947a311e700cf51c4d Author: Chas Williams (CONTRACTOR) Date: Wed Sep 29 18:21:25 2010 -0400 configure: --with-linux-kernel-packaging should default to disabled the test for this build feature is reversed. by default, the value for with_linux_kernel_packaging will not be defined which makes the existing test pick MPS='SP' instead of LINUX_WHICH_MODULES. based on the configure help messages, this would appear to be an opt-in not an opt-out. ... Optional Packages: ... --with-linux-kernel-packaging use standard naming conventions to aid Linux kernel build packaging (disables MPS, sets the kernel module name to openafs.ko, and installs kernel modules into the standard Linux location) ... Change-Id: Ie16fba165e6c85b7ecbce887badb9ffc06a3a7a8 Reviewed-on: http://gerrit.openafs.org/2869 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2bcd9044f747315cc1ea00b8c63982307edcc6c7 Author: Chas Williams (CONTRACTOR) Date: Thu Sep 30 14:27:35 2010 -0400 afsd's -mem_alloc_sleep is obselete -- update documentation to reflect this. Change-Id: Ife0f4a2582fe535d7c977d0ca24f92e314459386 Reviewed-on: http://gerrit.openafs.org/2874 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7e12632cd2c8e07baa5e6c8aecd5311870771133 Author: Andrew Deason Date: Thu Sep 2 13:11:32 2010 -0500 DAFS: document the limits of -vhashsize You can only specify a -vhashsize between 6 and 28 (inclusive). Document that in the dafileserver man page. Change-Id: I44d1c71f4ff303174e8aebf74b0b9075c07bc8b4 Reviewed-on: http://gerrit.openafs.org/2650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 364691145698c8f9b87466cd9d9e2c54f8c6aaa9 Author: Derrick Brashear Date: Wed Sep 29 14:15:24 2010 -0400 linux define ucontext properly ucontext requires glibc version info to engage. glibc info comes from features.h, which if we include afs_sysnames.h, we get... so, let's swap these. Change-Id: I26e5554f2c5c5f9f8a74fb591efdfdc1f6ae7257 Reviewed-on: http://gerrit.openafs.org/2868 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ff89a321108e1a0c08323547de706f953aef0430 Author: Simon Wilkinson Date: Wed Sep 29 00:21:43 2010 +0100 rx: Don't have different args for rxi_FreeCall rxi_FreeCall changes its number of arguments depending on whether locks are enabled or not. That's a little bit nasty to read, so just change it so that it always takes two arguments, and ignores the second when it doesn't need it. Change-Id: I5f869bea9bcf01bac16d8c5eec93373788d17978 Reviewed-on: http://gerrit.openafs.org/2863 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 37946ee1739aa22cb2f7330a37504d33a7733c9a Author: Simon Wilkinson Date: Wed Sep 29 00:11:53 2010 +0100 rx: Make statistics interface use Atomics Make the rx_statistics statistics gathering infrastructure use atomics for all of its counters. This significantly reduces lock contention. However, it also (potentially) changes the format of the rx_stats variable which has been used by callers in the past. To simplify this process, and to aid with future changes, we remove direct access to rx_stats. Instead, two additional API functions rx_GetStatistics and rx_FreeStatistics are provided. These give the caller access to an 'normal' rx_statistics structure. Tom Keiser has suggested that we should explore using thread-local statistics structures, and just aggregating them when we are asked to report. This is a fine idea, and is equally possible with the new interface that this patch introduces. Change-Id: I859cea8f7354a655be007b95fa8a61f995308b35 Reviewed-on: http://gerrit.openafs.org/2862 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1676c7e54f238e72910263f83987b271067efe21 Author: Simon Wilkinson Date: Wed Sep 29 00:15:37 2010 +0100 rx: Use atomics for rxi_AllocSize and rxi_AllocCnt More atomics for RX statistics counters. Less lock contention. Change-Id: I55202d2d54323448f7bc191aab03ace976fac962 Reviewed-on: http://gerrit.openafs.org/2861 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 41633936ce0ac35c9b654c8666241d930f140bbd Author: Simon Wilkinson Date: Wed Sep 29 00:06:45 2010 +0100 rx: Make nWaiting and nWaited atomic Make the nWaiting and nWaited counters atomic, and get rid of the mutex which used to protect them. Change-Id: I0c4d8f1df1860baa2bb189ea77bf20ee9f2066f7 Reviewed-on: http://gerrit.openafs.org/2860 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a3c7d9ee037c85297fd2b1932d47c40b64130676 Author: Simon Wilkinson Date: Tue Sep 28 23:48:50 2010 +0100 rx: Add rx_NewThreadId function The fileserver and the fsync server were locking an internal RX mutex, and incrementing an internal counter in order to obtain fake pthread thread IDs. Instead of letting them muck around in the internals of RX, provide an API that can be called to obtain a ThreadId counter, and use that API throughout the code. Change-Id: I68f41d1486cdafeb757da2c0df899ae1ca2b2bfc Reviewed-on: http://gerrit.openafs.org/2859 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 513d6a3e35f8c35178e0a22428d616751251b51e Author: Simon Wilkinson Date: Tue Sep 28 23:37:54 2010 +0100 rx: Add atomic operations code Add support for an atomic type, and atomic operators for RX. This builds on work which has already been done for Windows, where InterlockedOperations are used for statistics gathering. A new opaque type, rx_atomic_t is introduced so that normal arithmetic operations will fail on atomic data. An implementation using native atomic methods is provided for Darwin, Solaris and Windows. A native kernel implementation is used for Linux. Where OpenAFS is built with a sufficiently modern gcc, gcc's atomic primitives will be used. Sadly, gcc's builtin operations are not available for i386, they will only be used with builds the set -march=i486 (or later). Otherwise, we fall back to a single mutex which protects all atomic operations. Change-Id: I5f69677a80617e3936f82b177cd58250a6dbf31f Reviewed-on: http://gerrit.openafs.org/2858 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e9fafac6cba6e024f08e8743d60b7853a2940ba2 Author: Asanka Herath Date: Mon Aug 30 15:36:50 2010 -0400 Windows: Set NTDDI_VERSION when setting _WIN32_WINNT Change-Id: I65312c35b40dbbb4ea8f0170ea8e961bd93359aa Reviewed-on: http://gerrit.openafs.org/2866 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cbaef553978b7d81ba6d7b7721bcea97fe41870a Author: Simon Wilkinson Date: Sun Sep 26 15:48:54 2010 +0100 RX: Tidy reader data locking Data which is accessed only by the reader thread doesn't need to be protected by call->lock Remove the call->lock protection where it isn't required, which makes certain read/write calls lock free. Stop rx_ResetCall from manipulating reader thread data. This data will be zero'd and cleared when the reader thread calls rx_EndCall, and doesn't need to be reset by the Listener thread. The change which made rx_ResetCall reset reader thread information was originally part of 559ea99b. It caused race conditions that were fixed by adding additional lock protection in d0cc6e, 4dadd2 and 423ab97e. This commit reverts portions of all of those changes. It is safe to not clear the iovc in ResetCall because any NewCall must be balanced by a corresponding EndCall in the reader thread, and EndCall does the appropriate freeing of reader elements. Change-Id: I450469a4591fbe4af34482a2b219708795c57e8e Reviewed-on: http://gerrit.openafs.org/2856 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 791b7a4c660ef468286eb6f51e66b4faa4bb6c7b Author: Ben Kaduk Date: Tue Sep 28 20:03:25 2010 -0400 More FBSD syscall tweaking We're now properly registered in syscalls.master for HEAD (i.e. proto-9.0) and RELENG_8 (proto-8.2), which means that afs3_syscall is prototyped in sys/sysproto.h . Accordingly, don't declare it in afs_prototypes.h for those cases. Also add FBSD82_ENV checks for the new syscall-registration code, and cast afs3_syscall to sy_call_t* for the sysent structure. Change-Id: I0e7427274b018043c3a6a8ca6181a78a385d9aa2 Reviewed-on: http://gerrit.openafs.org/2864 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 50920c0384189a6c635ca58c38bf7c942c0446b2 Author: Simon Wilkinson Date: Mon Sep 27 23:50:23 2010 +0100 rx: Limit window size to max acks The RX ack packet can only acknowledge 255 packets at once. In the current implementation, this limits our maximum window size to 255, as we can't acknowledge any packets we receive outside of that window size. Change-Id: If12eeb4a71cdf0bcd2a82f86b416e387543b7ea8 Reviewed-on: http://gerrit.openafs.org/2857 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0cac17105b632f495a8000a06a721e0bb163e2f4 Author: Marc Dionne Date: Sat Sep 11 11:11:18 2010 -0400 volser: Set but not used variables Fix instances of variables defined and set but never used in the volser directory. Spotted by gcc 4.6 Change-Id: Ibb1896cdde51985d1c14b563f8a6de6cec90403f Reviewed-on: http://gerrit.openafs.org/2852 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9d790e18fadc318305b58809c0715c4e07c82b85 Author: Derrick Brashear Date: Sun Sep 26 07:28:46 2010 -0400 pam test should return an int in main change things so we conform with the usual prototype for main() Change-Id: Ia3bfe6bb1b135fdba53ccca1650b0b7223108a27 Reviewed-on: http://gerrit.openafs.org/2850 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a2de10a1705a88ef652f4489383801a15c938a12 Author: Marc Dionne Date: Fri Sep 10 20:40:56 2010 -0400 viced, tviced: Set but not used variables Remove or ifdef out some variables that are set but never used. Spotted by gcc 4.6 Change-Id: I895740680997cff29d96ee5257830531c71711af Reviewed-on: http://gerrit.openafs.org/2853 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit e6c9cf2466e849753db99b48b0da26665ef0a0e3 Author: Marc Dionne Date: Sat Sep 25 15:28:37 2010 -0400 tubik: minor Makefile cleanups Rework the install targets for udebug to avoid warnings in the case where afssrvbindir = bindir Remove commented out compile line for udebug Change-Id: I500ba2575e7d71114dbdec704d6b3d22585cfdd3 Reviewed-on: http://gerrit.openafs.org/2851 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit e23f3ae22f11433713860b37b89a94b12fd70e8d Author: Simon Wilkinson Date: Mon Sep 27 11:47:51 2010 +0100 rxperf: Really set UDP buffer size On Unix, the UDP buffer size has to be set before we open any sockets. Otherwise, the default (64k) buffer size is used and never changed. Move the calls to SetUdpBufSize in rxperf.c so that the -u command line option actually has an effect. Change-Id: Ic925faabca8264c0359693e97c2ab5b637902797 Reviewed-on: http://gerrit.openafs.org/2855 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c0498699366f7e40253d00604da3d9043b32851 Author: Simon Wilkinson Date: Sun Sep 26 15:20:22 2010 +0100 Fix rxperf so that it works with pthreads *) Don't allocate 512K on the stack *) Don't pass stack allocated data into pthread_create() Change-Id: I6a4f70121871bf3b7a62d9ed893a2d15bffc7a21 Reviewed-on: http://gerrit.openafs.org/2854 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7d272f05059a4b467ee41a2a0d8781e9f9c4c250 Author: Russ Allbery Date: Sat Sep 25 16:42:57 2010 -0700 Update Debian packaging to 1.5.77-2 release Contains DKMS robustness fixes, improvements to the defaults for the module build, and cleanup of the openafs-client init script. Updates the build system for the new demand-attach binary naming and for the changes to supported configure options. Fixes some issues with afs-newcell. Forces disabling of the Linux syscall probing in kernel module builds, since no supported Debian kernel allows this and it causes problems. Update debhelper to V8, which allows simplification of debian/rules and debian/module/rules. Change-Id: I4db4df873607129548557389f08c7ec1480e7204 Reviewed-on: http://gerrit.openafs.org/2849 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e28bb036b85ea90c0ecf8d52a17043374c1fef3a Author: Michael Meffie Date: Thu Sep 23 10:15:57 2010 -0400 scout: display fetch and store counts as unsigned Fetches and stores are already defined as unsigned, so format them as unsigned values when displaying in scout. This fixes the bug where scout shows those counts as negative values on busy servers which have been running for a while. Change-Id: I460172720d76e081ede4381b2718f75386af4285 Reviewed-on: http://gerrit.openafs.org/2843 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a99e616d445d8b713934194ded2e23fe20777f9a Author: Simon Wilkinson Date: Thu Sep 23 17:41:47 2010 +0100 rx: Big windows make us sad The commit which took our Window size to 128 caused rxperf to run 40 times slower than before. All of the recent rx improvements have reduced this to being around 2x slower than before, but we're still not ready for large window sizes. As 1.6 is nearing release, reset back to the old, fast, window size of 32. We can revist this as further performance improvements and restructuring happen on master. Change-Id: Ic1de2cf33f42edaf1455b72580110d56fe968a7b Reviewed-on: http://gerrit.openafs.org/2844 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4884de5bc8b5a984eeb5927685308874296e88b8 Author: Simon Wilkinson Date: Thu Sep 23 15:01:58 2010 +0100 libafsrpc depends on rxstat and fsint ... in the same way as shlibafsrpc Change-Id: I02d8c35efadd9c9b865bb91eabd0e5b3c10a115e Reviewed-on: http://gerrit.openafs.org/2842 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 18b932f29f7ac3d4da7736d58e6dc3833ca4c6f3 Author: Matt Smith Date: Thu Sep 16 15:44:04 2010 -0500 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 Tested-by: Derrick Brashear commit c21c90515ac37862a6002441790a721489fa89a8 Author: Simon Wilkinson Date: Thu Sep 23 10:42:25 2010 +0100 rxperf: Add build rules to build a pthreaded version The pthreaded version of rxperf is much more interesting than the LWP one now, so add some rules so that Unix can play with it too. Change-Id: Ia76dd89482c8d62805ed8dfd58a1963e4bf8cc65 Reviewed-on: http://gerrit.openafs.org/2841 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c87377834701195fe98d75ad34324bc1748e13a0 Author: Simon Wilkinson Date: Thu Sep 23 10:40:02 2010 +0100 rxperf: Fix the Unix build again Fix the Unix build of rxperf again Change-Id: I2c5d43f6f69ef36d703bd73154a1f5ec080a47cd Reviewed-on: http://gerrit.openafs.org/2840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8dd5e7a87ee5626e89c14d2a989b4795bebd5c05 Author: Simon Wilkinson Date: Wed Sep 22 09:03:27 2010 +0100 Add an LWP version of the hcrypto library hcrypto uses a single pthread mutex, which is only required when we're running in a pthreaded world (in a cooperative threading world such as LWP, there's no way that two processes can both access the Fortuna PRNG at the same time) So, build an LWP version of hcrypto which just disables the mutexes. Change-Id: I0b894cfa0d16ba6d16544a4d725191c965ac6e50 Reviewed-on: http://gerrit.openafs.org/2833 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 289461450c0e14cc35e0f8e80ff8047fdc13b6c5 Author: Simon Wilkinson Date: Thu Apr 15 17:35:37 2010 +0100 Move des/stats.h to rxkad directory The structures defined in des/stats.h are rxkad specific, and so should be handled by an rxkad header file, rather than by something in the eventually-to-be-removed DES directory. The structure shouldn't be initialised in libutil. Move initialisation to rxkad_common, where it is already initialised in the pthread case. Change-Id: I3de49cfe1752eaa5f273796516e2ff6c289d9533 Reviewed-on: http://gerrit.openafs.org/2576 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 259cca4050102e98ade929cc648a69d9f57c07fa Author: Simon Wilkinson Date: Fri Sep 17 22:03:20 2010 +0100 tests: Fix objdir builds Fix the tests so that they work when we have a separate build directory. Change-Id: I1329a4186b126c84f611c9751fd228b80c80c82c Reviewed-on: http://gerrit.openafs.org/2828 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f3f108f4c7fe5808d8debe3c9fbcfb3b1b79b73a Author: Simon Wilkinson Date: Wed Sep 15 11:16:15 2010 +0100 rx: Add struct rx_identity Add the rx_identity structure which can be used by rx security layers to store and return identity information to applications. A number of helper functions for manipulating rx_identity structures are also provided. Change-Id: I64ae2b62a4bc8a401c1ac877f4662c66a39247f8 Reviewed-on: http://gerrit.openafs.org/2827 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 571aac176e94dc669c677041c0bcac7dedcd8067 Author: Simon Wilkinson Date: Thu Sep 16 12:48:41 2010 +0100 rx: Add an opaque type Add a type to RX to hold counted data chunks, and some helper functions to assist callers with using that type. Change-Id: Ia81ceea50e43f6fba101122a085f84776dbf3807 Reviewed-on: http://gerrit.openafs.org/2826 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 68d074d8aa98e76fb85289c69300d17695b98d0b Author: Russ Allbery Date: Wed Sep 22 16:34:42 2010 -0700 Link dafssync-debug(8) to fssync-debug(8) The two commands are documented identically for right now, so just link the dafssync-debug man page to the fssync-debug man page. Remove the incorrect statement in the man page that fssync-debug only works with demand-attach. FIXES 128166 Change-Id: I812641ad7a345c7f5412c3c97ed1ba393e981639 Reviewed-on: http://gerrit.openafs.org/2836 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 10281b5be240707ed2eb75bdb68d9d23ff0011c8 Author: Russ Allbery Date: Tue Sep 21 16:45:53 2010 -0700 Fix POD errors in fileserver and dasalvager Fix missing newlines before =back commands. Change-Id: If8e65c94f48c271c37c1b4bbec1b17d383c8375d Reviewed-on: http://gerrit.openafs.org/2831 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 82b7327b5ba66c6ddbc898ad383b4e5f2b08ec38 Author: Russ Allbery Date: Tue Sep 21 14:11:53 2010 -0700 Update bos create man page for new naming of demand-attach binaries The demand-attach fileserver binaries now have a "da" prefix. Adjust the documentation in the man page for bos create accordingly, and add the new binaries to SEE ALSO. Change-Id: Ib70bad87aaf8bfc483ffbfe402db01c178e6c4e4 Reviewed-on: http://gerrit.openafs.org/2830 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dd8c28a58e58e84a22da44da03812eca879f70fa Author: Simon Wilkinson Date: Sat Sep 11 10:11:57 2010 +0100 auth: Add documentation for ktc_ListTokensEx Document ktc_ListTokensEx, and add a stub implementation of the function for Windows. Change-Id: Ie168081f1a991fcf13358a5a1eeb8d0b96f5800a Reviewed-on: http://gerrit.openafs.org/2825 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f73c085755869b071607db1059351c46ca83abac Author: Simon Wilkinson Date: Fri Aug 20 00:14:49 2010 +0100 hcrypto: Add dirfd definition for solaris Add an implementation of dirfd to our local roken implementation for platforms that don't have one. Code taken from Heimdal. Change-Id: I4284c18430b6f49200886f5340191a14dcf34b57 Reviewed-on: http://gerrit.openafs.org/2608 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9a6dca070733dd5065c37cd044a3d2ded2268b14 Author: Jeffrey Altman Date: Wed Sep 22 16:28:48 2010 -0700 Additional functionality for rxperf Add the ability to initiate multiple pthread threads issuing calls on the same connection to the server. Add ability to set max window size. Add ability to adjust min peer timeout. Change-Id: I896650b033ae0adfa42d3e5831ff799ca1331bd5 Reviewed-on: http://gerrit.openafs.org/2835 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 200a9947f548eb7158e92de62ddaa76fcfe4ba46 Author: Simon Wilkinson Date: Thu Sep 23 08:58:21 2010 +0100 libuafs: Don't #define user libuafs used to #define user to usr_user, so that any references to 'struct user' would become 'struct usr_user'. However, none of the kernel code uses struct user, and this #define conflicts with the definitions in sys/user.h on Linux. So, just remove it. Thanks to Russ Allbery for the original problem report. Change-Id: I7868c8ddade2df626f5ecae597144641dfc551b7 Reviewed-on: http://gerrit.openafs.org/2838 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d17adc30027d795068504dc736dac849ed42a884 Author: Simon Wilkinson Date: Wed Sep 22 17:33:26 2010 +0100 rxkad: Make the test suite build again Make the rxkad stress test suite build again. Change-Id: I8ff7aecb768f0f46129f612e8bcbef20d59c8886 Reviewed-on: http://gerrit.openafs.org/2832 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a10f644fd21482559039f79e4a14fd39a83f6f9b Author: Simon Wilkinson Date: Wed Sep 22 19:50:47 2010 +0100 rxperf: Fix so it builds on Unix Fix assorted errors in the rxperf utility so that it will build on Unix. Change-Id: I8ba4e5e6bc2bab38b38f27f5fae3138a0924caa6 Reviewed-on: http://gerrit.openafs.org/2834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5fd720ce7d1532b8f17b96b6b21a85ee0ee6827f Author: Simon Wilkinson Date: Wed Sep 1 14:38:58 2010 +0100 rxgen: Handle complex structures Servers built using rxgen will break if they take complex structures as RPC arguments. A complex structure, in this case, is one which contains an array. For example an RPC which takes as an argument: struct MyData { opaque somebytes<>; } ... will cause memory corruption on the server whenever it is called. This is becase the server stubs emitted by rxgen do not zero out the contents of the MyData structure, leaving it with whatever garbage may be on the stack. When XDR comes to populate the somebytes opaque array, it sees that MyData.somebytes.somebytes_val is non-zero, and assumes that this is a pre-allocated block into which it can record the data from the wire. However, it's really just stack garbage, and so we overwrite memory. As a fix, this patch creates a new list of 'complex' structures, which are identified as structures which contain arrays. When a server stub is created for a function that takes a complex structure, the structure is set to zero before use, and marked to be freed afterwards. I suspect that there may be a wider class of complex structures than are caught by this routine, but this is a start... Change-Id: Id671fe602c8cd44afaaccc821aaa097b142f1899 Reviewed-on: http://gerrit.openafs.org/2736 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c77f2f1369fead87acb440134213ebf6d23f8fd7 Author: Jeffrey Altman Date: Mon Sep 20 05:07:08 2010 -0700 Rx: Change minimum peer timeout to 2ms The previous value, 350ms, is historical. Now that networks are so much faster, an artificially high timeout value when backed off results in an extremely long delay before communication can resume. Change-Id: I6207fb3e5c26a36704abc1f9210af53e0ff1fae6 Reviewed-on: http://gerrit.openafs.org/2815 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ed25a920232cb659c2997c91c5bc92a659ff163a Author: Jeffrey Altman Date: Mon Sep 20 10:02:18 2010 -0700 Rx: Permit MakeDebugCall() be be compiled when RXDEBUG is undefined If MAKEDEBUGCALL is defined, build MakeDebugCall() even if RXDEBUG is not defined. Change-Id: I98d3216e8bf1e1f3b6b62c962d33db316d0f51ac Reviewed-on: http://gerrit.openafs.org/2818 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e197c19cedaafa0d2bb59212fb171083f2140041 Author: Jeffrey Altman Date: Mon Sep 20 05:11:20 2010 -0700 Rx: Do not hold call lock across memcpy in rx_ReadProc/rx_WriteProc 1.4.x does not hold the call lock across memcpy operations in rx_ReadProc, rx_ReadProc32, rx_WriteProc, rx_WriteProc32. The claim is that the call curpos, curlen, and nLeft fields which refer to the current packet being processed will not be touched by any other thread. Therefore it is safe to drop the call lock to permit another thread to add packets to the call while the memcpy is performed in parallel. This patchset continues to hold the call lock longer than the original implementation but does drop it for the length of time it takes to copy data from the packet buffer to the application buffer. Change-Id: I87dacdf541ba50db80ab55e500b38edab5126dc2 Reviewed-on: http://gerrit.openafs.org/2817 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7b9607639816b19fdf1b70b4c04ba984f9bf3613 Author: Jeffrey Altman Date: Mon Sep 20 05:10:22 2010 -0700 Rx: Permit udp buffer size to be set in rxperf Change-Id: I4680e038e2965ca8bc13f76955b85e924435c6af Reviewed-on: http://gerrit.openafs.org/2816 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0a9e57c45e4412d9dac7050d693a22044ddc1d0f Author: Russ Allbery Date: Mon Sep 20 14:19:11 2010 -0700 Add NEWS entries for OpenAFS 1.5.77 and 1.5.76 Based on the public announcement for 1.5.77. Change-Id: Ic368e16e16b03a79de6196a2e355eca0f420de77 Reviewed-on: http://gerrit.openafs.org/2819 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a00da7d2c9a66f1e5984ec2b3bd3efe10793e1c9 Author: Jeffrey Altman Date: Thu Sep 16 14:23:41 2010 +0200 Windows: Negative Caching for Volume Lookups If a volume lookup returns VL_NOENT or VL_BADNAME, cache the negative response for five minutes. This prevents volume lookup storms caused by the same volume lookup being performed repeated during a short time period. This can happen if mount points to volumes that do not exist are present in a directory that is being evaluated by Windows Explorer or Common Control File Dialogs. This functionality is implemented by storing the most recent update time for the volume group as part of the cm_volume_t. A non-existing volume group is identified with a new CM_VOLUMEFLAG_NOEXIST flag. The presence of the lastUpdateTime value also permits volume location information to expire at lastUpdateTime + lifetime instead of expiring all volume information simultaneously each lifetime period. LICENSE MIT Change-Id: I01c5122a153fadc3824ff916655b0199d5c1de3c Reviewed-on: http://gerrit.openafs.org/2771 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 089cd2c1039315fe400f85eec1c9f2152ea090c7 Author: Russ Allbery Date: Tue Sep 14 10:12:43 2010 -0700 Mention KRB5CCNAME in the aklog man page AFS users not otherwise familiar with Kerberos may not realize that one sets KRB5CCNAME to use an alternative ticket cache. Mention the variable in the aklog man page, although defer to the Kerberos documentation for most details. Change-Id: I13133285f153f86e0aa1e95b24715e01d576075d Reviewed-on: http://gerrit.openafs.org/2761 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Russ Allbery commit be91260047627fb4fffeeed73c7f24c80448c673 Author: Jeffrey Altman Date: Sun Sep 19 10:46:34 2010 -0700 Rx: Permit ADAPT_WINDOW code to build Add missing fields to rx data structures. Update variable references. Change-Id: I7f3cc5e89e71ee0a9dfc3ae8b021bec07a41ce95 Reviewed-on: http://gerrit.openafs.org/2783 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ee80a853cebc472d9d9664dbfcccadd1d49d5fc Author: Jeffrey Altman Date: Sun Sep 19 09:17:08 2010 -0700 Windows: Export additional RX debugging variables from afsrpc.dll Export rxi_nRecvFrags @2008 DATA rxi_nSendFrags @2009 DATA rx_initReceiveWindow @2010 DATA rx_initSendWindow @2011 DATA rx_intentionallyDroppedPacketsPer100 @2012 DATA rx_intentionallyDroppedOnReadPer100 @2013 DATA so they can be referenced from pthreaded builds of src/rx/test tools. Exported variables must be present in both FREE and CHECKED builds. Change-Id: Ia7f3ee0143679bab1ce74f71dc3a996cda1f18a8 Reviewed-on: http://gerrit.openafs.org/2779 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f1183f16285be040b7150414c9563a9bceb53210 Author: Jeffrey Altman Date: Sun Sep 19 09:14:06 2010 -0700 Rx: PrintTheseStats should not be dependent on RXDEBUG When RXDEBUG is not defined, PrintTheseStats generates an error even though the statistics are in fact available. The global variable rx_packetTypes was not being defined without RXDEBUG. Make rx_packetTypes defined always and permit statistics to always be printed. Change-Id: Ife708d34b5d56374c8aff9aa7c941d39b37ca4a1 Reviewed-on: http://gerrit.openafs.org/2778 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 00afdbed0ff474aaf45a49b157843af9cb8483ad Author: Jeffrey Altman Date: Sun Sep 19 09:08:42 2010 -0700 Rx: move TSFPQ prototypes from rx_globals.h to rx_protoypes.h Function prototypes belong in rx_prototypes.h not in rx_globals.h. Remove EXT macro from function prototypes as functions do not require special treatment in order to be exported by a DLL on Windows. Change-Id: Ieb617db634f2cfa57410e77e276c703311304547 Reviewed-on: http://gerrit.openafs.org/2777 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8549ebe0a81ac9a526d13f96ba63e048d8b77aa7 Author: Jeffrey Altman Date: Sun Sep 19 09:03:39 2010 -0700 Rx: properly compute dataPacketsReSent statistic The global dataPacketsReSent statistic should be the sum of all peer->reSends and dataPacketsSent should not include the count of resent packets. Prior to this patchset, dataPacketsSent included the resent packets and dataPacketsReSent was computed as the number of requests for Ack instead of the number of packets resent. Change-Id: I969003f7ec1805d09c14ac342453f86fdb5df99a Reviewed-on: http://gerrit.openafs.org/2776 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 72cadfd86a0efc0079639671d613005ff403ccc4 Author: Jeffrey Altman Date: Sun Sep 19 09:00:57 2010 -0700 Rx: always use tservice variable in rxi_ServerProc Since tservice has been assigned to call->conn->service, use it instead of call->conn->service when calling executeRequestProc(call) Change-Id: Id26c4c63f054bcd1e3ef5349900c910e3c9cf2be Reviewed-on: http://gerrit.openafs.org/2775 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e77c7be7537cbcbee77a297b5b52a6287462462f Author: Jeffrey Altman Date: Sun Sep 19 08:57:02 2010 -0700 Windows: Release builds of Rx should be lean and mean Only build checked builds of Rx with -DRXDEBUG -DRXDEBUG_PACKET -DRX_TRACK_PACKETS -DRX_REFCOUNT_CHECK Change-Id: Ib4666d30b1e48eca172331353d9e376b2516f183 Reviewed-on: http://gerrit.openafs.org/2774 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3b4cad3b78ec5df7253067c70e19c066552d7145 Author: Jeffrey Altman Date: Sun Sep 19 19:48:57 2010 -0700 Rx: Only backoff the peer timeout once If a packet is missing, the peer timeout is backed off to provide a new starting point for timeout computation. The backoff state must be stored in the peer object to ensure that multiple failures do not result in more than one backoff before a successfully received packet is available for recomputation. Change-Id: I6794b3a020801ff421e4ed776afb581962b111a9 Reviewed-on: http://gerrit.openafs.org/2787 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d16c8b84ac8cc0251231819bfb0eefc2040322a Author: Jeffrey Altman Date: Sun Sep 19 09:47:37 2010 -0700 Rx: only compute peer bytes sent and received if rx_stats_active Computing the bytes sent and received is an expensive operation. If rx statistics collection has been disabled we should not collect the peer data. The most expensive operation is the rx_FindPeer() call that is performed during rxi_ReadPacket(). rxi_ReadPacket() is processed by the rx listener thread which must be as fast as possible. Change-Id: I5403c88aa85f9049fe50a9c1f3dbaad7d8b802bd Reviewed-on: http://gerrit.openafs.org/2782 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c59ce29602086f795d5fbaef6a5f88fae9dd2dea Author: Jeffrey Altman Date: Sun Sep 19 09:35:03 2010 -0700 Rx: avoid lock churn in rxi_ReceiveAckPacket rxi_ReceiveAckPacket can acquire and drop the conn_data_lock several times and acquires and drops the peer_lock unnecessarily. This patchset adds a variable to track whether the conn_data_lock is held in order to avoid the need to drop it and reacquire it based upon conditional operations. It also relocates the peer->maxPacketSize computations in order to consolidate the work performed under the peer_lock. Change-Id: I0bc9e42e8ef198a04315f9f2df529073ce9dfd03 Reviewed-on: http://gerrit.openafs.org/2781 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 449976acd54ff46fd6cdb9a6e12acf3789665bcf Author: Jeffrey Altman Date: Sun Sep 19 08:28:21 2010 -0700 Rx: Build rxperf test application on Windows rxperf made assumptions that it was built against LWP, used buffer sizes for read/write that were too small, made use of non-portable types, and set signal handlers that are unsupported. Change-Id: I55515cac0f441116df7fd0aaf100fb3ae99b220f Reviewed-on: http://gerrit.openafs.org/2773 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6152b5322e2b1699252c04c757a2013c2e3c8939 Author: Simon Wilkinson Date: Sat Sep 11 23:17:24 2010 +0100 viced: Don't fall back to tokens I can't think of any circumstances in which it is appropriate for the fileserver to fallback to using tokens from the kernel, rather than those generated from keys on disk. So, remove that fallback. Change-Id: I92b8987ce63759234d238812a8fe998daed4c20f Reviewed-on: http://gerrit.openafs.org/2758 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ebbb9253438f6051cdb7ba2974554f4793b8bae2 Author: Simon Wilkinson Date: Sat Sep 11 08:21:10 2010 +0100 ubik: Remove unused error codes The error codes in ubik.p.h have been replaced by ones defined by com_err. Remove the redundant, #if 0, definitions of these, as they're just confusing when grepping the code. Change-Id: I18b827a6e0532a602f904bb6c1e34c3f63c2e08d Reviewed-on: http://gerrit.openafs.org/2757 Reviewed-by: Andrew Deason Reviewed-by: Rod Widdowson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c38fea29c5daefd35800eda63f0dcef56eb74357 Author: Marc Dionne Date: Sat Sep 11 13:19:47 2010 -0400 rxgen, kauth: Set but not used variables Remove a few variables that are not actually used, and the associated code. foundcurrentkey is only used in the AUTH_DBM_LOG case, so scope the declaration and assignment accordingly. Spotted by gcc 4.6 Change-Id: I281ca37488e69bfe46a8e63bdc5990f5f3cff940 Reviewed-on: http://gerrit.openafs.org/2734 Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f4814575629d4565f408507c07e3dd711b26661c Author: Simon Wilkinson Date: Sat Sep 11 20:49:55 2010 +0100 ptserver: Merge WhoIsThis and WhoIsThisWithName The functions WhoIsThis and WhoIsThisWithName are pretty much identical, with WhoIsThisWithName just having additional logic for foreign user registration. Merge them together, so that there's only one copy of the code for determining who a user is. Change-Id: Ia6e62ae932219f29e3141fe3c94b4be0110ca17a Reviewed-on: http://gerrit.openafs.org/2756 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a4ec68691869deaf12a6fe405394bba2c9003fb9 Author: Simon Wilkinson Date: Sun Sep 12 18:41:21 2010 +0100 Add additional dependencies for shlibafsrpc fsint and rxstat need to be build before shlibafsrpc, so add them to the dependencies list. Change-Id: I47b551de13f6f860cee9f6c09a769de472b3ec3f Reviewed-on: http://gerrit.openafs.org/2755 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 10bb4b31038c967ce5f9dd2f0e54ffd7bfe18daf Author: Simon Wilkinson Date: Mon Sep 13 08:54:55 2010 +0100 userok: Don't double check for expiry rxkad_GetServerInfo returns an error if you attempt to get server information using a connection whose tokens have already expired. The additional check for expiry in the userOK routines is therefore not required - they'll never be reached, because GetServerInfo will already have errored out. Change-Id: I7b1a97249d40b12a2aae4009971a9b676700870e Reviewed-on: http://gerrit.openafs.org/2753 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45b99383649047c24c0c8e789b1e450aadb55d47 Author: Simon Wilkinson Date: Sat Sep 11 16:39:23 2010 +0100 auth: Restructure userok Restructure the userok logic in auth to split it into smaller functions, and abstract out common code. This will make it easier to add support for other security layers in future commits. Change-Id: I64f6e053ad1a6a2054630a400f7499d805bb9838 Reviewed-on: http://gerrit.openafs.org/2752 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 34df5da39871ae5231048a416f191784c5c2d127 Author: Simon Wilkinson Date: Sat Sep 11 12:51:52 2010 +0100 rx: Call rxgen_consts.h by its proper name rxgen_consts.h is actually in the afs/ directory. Include it from their, rather than requiring that every user have $(TOP_INCDIR)/afs in their search path. Change-Id: Ia3faf4c08bd69cb64652b8c1ab722c49179667c8 Reviewed-on: http://gerrit.openafs.org/2750 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84d28ecf9d68852152cad1039042e10e38075a29 Author: Simon Wilkinson Date: Sat Sep 11 10:17:12 2010 +0100 tokens: Use the new tokens interface Change tokens so that it will use the new tokens interface. Note that this changes the output from the tokens command. Change-Id: If15d7d439b86a89afcafafe65d304324a186b8d3 Reviewed-on: http://gerrit.openafs.org/2749 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a86ad262d2a8be36f43ab0885a84dde37ddfc464 Author: Simon Wilkinson Date: Sat Sep 11 10:11:57 2010 +0100 auth: Add the ktc_ListTokensEx function Add a ktc_ListTokensEx function which uses the new GetToken pioctl to implement the same functionality as the old ktc_ListTokens call. As with ktc_ListTokens this is hugely inefficient, as it gets a compelete token structure from the kernel, then throws it away to return just the cell which the token is for. Change-Id: Idf3daa536c6a04d397691d0cc6fcb2c59f9f444c Reviewed-on: http://gerrit.openafs.org/2748 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5c3a1ed88de16db4c2081bbf1a4e397ce459bcf3 Author: Jeffrey Altman Date: Sun Sep 19 08:03:50 2010 -0700 Rx: Move rxperf test application to src/rx/tests rxperf is a test application. Move it to the tests directory Change-Id: I946a8026760d860667ea5707d8a3e0d3b895d908 Reviewed-on: http://gerrit.openafs.org/2772 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7ded3209a2fbd8d0108f9322d708551e93b6ef76 Author: Jeffrey Altman Date: Sun Sep 19 09:20:01 2010 -0700 Rx: cleanup testclient and testserver test applications Permit testclient and testserver to be built on Windows as pthreaded applications. Remove warnings. Fix prototypes. Remove variable declarations for rx library variables defined in rx_globals.h. Increase the buffer sizes. Disable use of packet dropping when the library is built without RXDEBUG. Change-Id: Ic8483eb64cbed4958baf8fd054e01c7c40832599 Reviewed-on: http://gerrit.openafs.org/2780 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 97c317c2ccb80b1d183275258999adecb66fe5d2 Author: Simon Wilkinson Date: Wed Sep 8 08:12:41 2010 +0100 authcon: Use ktc_GetTokenEx in ClientAuthToken Use ktc_GetTokenEx, and the related token utilities to check for a users tokens, rather than using the legacy ktc_GetToken Export the necessary symbols from libafsauthent on Windows to be able to do this. Change-Id: I475587d88d9a480c66b4e8484cc595ea984340a3 Reviewed-on: http://gerrit.openafs.org/2747 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 209d8c367756cf0e0bad5b3d35bdc6b25d7b485d Author: Jeffrey Altman Date: Thu Sep 16 02:48:30 2010 +0200 Windows: Add new token interface with stub for ktc_GetTokenEx The Windows build was broken by the addition of dependencies on token_FreeSet, ktc_GetTokenEx, etc. Permit the build to continue. The ktc_GetTokenEx implementation will depend on the creation of a new Windows pioctl for the call. Change-Id: I1c486af0beda10a2d846dc6bdff8c6195031dbe7 Reviewed-on: http://gerrit.openafs.org/2765 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 94aa0f0860653ca4431ed1a6adaee10ef731be21 Author: Simon Wilkinson Date: Thu Sep 16 07:09:20 2010 +0100 Rename kauth/token.c as kauth/katoken.c The kauth 'token.c' collides with the same file in auth when doing Windows builds. As kauth is the legacy package, rename its source file, and update the build system to take account of this. Change-Id: Ib99ef6674a4bfd6a2810b417b34bdc564b3533dc Reviewed-on: http://gerrit.openafs.org/2766 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 019ee226cbdf08f5d42298b8e8358660f839f77e Author: Simon Wilkinson Date: Sat Sep 4 15:29:03 2010 +0100 RX: Make rxi_Alloc return (void *) rxi_Alloc returns a pointer to an anonymous data block. Make its return value (void *) rather than (char *), so that it can be called in the same way as malloc(), and not require casting. Change-Id: Ib3094ad0273c62a4430eb56d35e3df68a550d338 Reviewed-on: http://gerrit.openafs.org/2738 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ff100901e0da8d236c7ae8b4d478600146d8f182 Author: Simon Wilkinson Date: Sun Sep 12 12:07:59 2010 +0100 Linux: print after BUG() is pretty useless Calling BUG() panics the machine, so having a print statement with further debugging information after it doesn't help much. Swap the ordering, so we at least see the message. Change-Id: I3aa3b8ba5faaa40cef7bb046093b322212eea2b8 Reviewed-on: http://gerrit.openafs.org/2754 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bc56f5cc97a982ee29219e6f258b372dbfe1a020 Author: Andrew Deason Date: Tue Sep 14 12:15:22 2010 -0400 volser: Delete timed-out temporary volumes When a transaction times out on a volume, delete the volume if it is a temporary volume (destroyMe is set). This prevents half-created volumes from accumulating, which can take up space and screw up certain vol ops in some versions. Change-Id: I94e9adc767b84a2a32d980f508af33b823560950 Reviewed-on: http://gerrit.openafs.org/2760 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8fd83543b60aefb4b7c5a0116d1538a89f58bbb3 Author: Andrew Deason Date: Wed Sep 15 12:19:33 2010 -0400 libafs: Fix pioctl get/putInt alignment issues We don't know if the buffer for pioctl data is aligned to anything, so we can't just dereference the given pointer as an int or anything else. So, just memcpy the data in for ints and such; conveniently, afs_pd_getBytes and afs_pd_putBytes can do this for us, so just use that. Change-Id: Id1abdae55308db6fe1e13f541a5d776daa6af934 Reviewed-on: http://gerrit.openafs.org/2763 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ee3538218d342bb74ab849763421b9ec075251b3 Author: Marc Dionne Date: Fri Sep 10 19:55:39 2010 -0400 vlserver: Set but not used variables Remove some variables that are set but never used in the vlserver directory: - n1,n2,n3 and n4 in vlclient.c appear to have never been used even in the original IBM code - some variables in vldb_check.c that are no longer used after some recent changes Spotted by gcc 4.6 Change-Id: Icd9e7da151b3a485c917ed5bd99eb26998dfa818 Reviewed-on: http://gerrit.openafs.org/2784 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f1796b0f4ad0202ad32e06bb849f443984cf22b5 Author: Marc Dionne Date: Sat Sep 11 13:23:11 2010 -0400 butc: Set but unused variables Remove unused variable taskId writeData() systematically returns 0, so make it void and adapt call sites that assigned the return value but never used it. Also move the function up in the file to avoid the need for a forward declaration, and make it static since it's only used here. Spotted by gcc 4.6 Change-Id: I2f61c0395796498175f2cb9131066b00657f99a7 Reviewed-on: http://gerrit.openafs.org/2785 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b6d478c2159bb1baed034fc031a43742d5db0298 Author: Andrew Deason Date: Wed Sep 15 14:40:19 2010 -0400 libafs: Fix compile errors in afs_nfsclnt.c - tokenUnion is a union, not a struct - 'struct rxkadToken' typo - 'tokenPtr' not 'tokenptr' Change-Id: I7e0fa4f2d34ba4bd68345e9625f40d1d7301411e Reviewed-on: http://gerrit.openafs.org/2764 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 6d118a03664880782730716b1daef1fc63d95540 Author: Marc Dionne Date: Sat Sep 11 12:14:09 2010 -0400 vol: Set but not used variables Fix some set but unused variable warnings in the vol directory. In VDetachVolume_r, much of the code and variables are only useful in the FSSYNC_BUILD_CLIENT case. Scope the code accordingly. forcefree is only used in the AFS_DEMAND_ATTACH_FS case, so scope code that sets it accordingly. Spotted by gcc 4.6 Change-Id: I345db6c9aba2d433ccbbc33fdc10d716c06b913c Reviewed-on: http://gerrit.openafs.org/2786 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0bc837f68a72ba1f75d940cc5dd057774d9f36bb Author: Marc Dionne Date: Thu Jul 1 11:38:20 2010 -0400 Linux: normalize error return for emulated syscalls pagsh and other code expect setpag() and pioctl() to behave like a regular syscall or pioctl, that is to return -1 on error, with errno set to the specific error code. On Linux, the underlying emulation does a straight return of any error code it gets from the ioctl, and errors are not properly caught by the callers. As an example, pagsh won't detect an error from setpag such as exceeding a keyring quota limit. With this patch, the user will see this: $ pagsh setpag: Disk quota exceeded sh-4.1$ The code in proc_afs_syscall is modified to set errno to the error code and to set errorcode to -1 in case of error. proc_afs_sycall is reindented while we're changing code there. FIXES 126230 Change-Id: I945f2d28eb0ae26c7f42502c90eb2e6e95c29a58 Reviewed-on: http://gerrit.openafs.org/2770 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4bbf0dae237e01127f4d1a4d913f00e8dad859a3 Author: Derrick Brashear Date: Wed Sep 15 04:26:13 2010 -0400 disable Rx packet tracking minimize the impact of Rx packet tracking. in particular, do no extra queue scans, which means the rest of the state which tracks where a packet is now isn't of use. make it possible to re-enable. Change-Id: I5b9ed039a0394edcea48bb46729cd2ce2f71d4b9 Reviewed-on: http://gerrit.openafs.org/2762 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e90b19e008ec8bc6e9eb308c671d45781b7b5a46 Author: Steve Simmons Date: Sat Sep 4 12:14:17 2010 -0400 Automatically find all pod.in files and generate .pods files Change-Id: I9334ed4fde8df63f278b6ef07bc0eddebfc71bf0 Reviewed-on: http://gerrit.openafs.org/2720 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b2d067a913d3c2e5dbfe756b7752ade308f967c1 Author: Andrew Deason Date: Wed Sep 8 14:32:35 2010 -0500 DAFS: raise vhashsize limit Raise the maximum specifiable vhashsize to 28 (from 14). Specifying a vhashsize over 14 can be reasonable if you expect to have a few million volumes on a fileserver. Change-Id: I90b17209fa25032f6e2bdec9abf80e578fc9b486 Reviewed-on: http://gerrit.openafs.org/2725 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 575bdaf56e8f5503513bec113653fbbe525ae228 Author: Andrew Deason Date: Thu Sep 2 12:56:28 2010 -0500 DAFS: Do not ignore out-of-range -vhashsize If the specified -vhashsize is out of the 6-14 range, do not just ignore it. Instead, note the error and quit. Change-Id: I2a26443bbd3a91183435a26562bea48b8b6a1eda Reviewed-on: http://gerrit.openafs.org/2649 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e0708617b8f5df625b6ad62920665e704f1374f7 Author: Marc Dionne Date: Sat Sep 11 10:46:50 2010 -0400 Always check return code from iod_Write The return code from iod_Write is checked at every call site in the file, except this one. Check it, and return VOLSERDUMPERROR if appropriate. Spotted by a set but unused warning from gcc 4.6 Change-Id: I84f38a4b3b1e37c25be9c76702b0d2818058454e Reviewed-on: http://gerrit.openafs.org/2733 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8cf472fd1723fa0e5f4edc34e470443c941f017 Author: Marc Dionne Date: Sat Sep 11 14:57:17 2010 -0400 rx: Set but not used variables Remove some unused variables in the rx code. These generate warnings with gcc 4.6. Change-Id: I1e19c82cd05bcd47a65d77079019f1f0b6704826 Reviewed-on: http://gerrit.openafs.org/2732 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 585a0758dfd1c45551cba4d9088d4938422dfcc7 Author: Simon Wilkinson Date: Sat Sep 11 23:14:42 2010 +0100 auth: Make token_FreeSet work on an empty set If the set passed to token_FreeSet is already freed, just make the funciton a no-op, rather than segfaulting. Change-Id: I41342d1c7bd94bcf20ad67407b28d9ffcccf3c07 Reviewed-on: http://gerrit.openafs.org/2751 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 33ce7a9308c8a71fbfcea82a935e32521031f48d Author: Simon Wilkinson Date: Sat Sep 11 12:43:35 2010 +0100 Linux: Move keyring includes where they're needed We don't need the keyring headers in every file, so reduce namespace pollution by just including them in osi_groups.c, which is the only place that uses them. Change-Id: I1f8af43439d63bec4df278209d2bb5c86b1c4d05 Reviewed-on: http://gerrit.openafs.org/2746 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 418581a6be6f5b6bf179e9e083b29782bcdd5add Author: Simon Wilkinson Date: Thu Sep 9 09:14:30 2010 +0100 shlibafsrpc: Export additional symbols Export additional symbols from shlibafsrpc. These symbols are required in order to be able to produce dynamically linked security modules that interface with libafsrpc. Change-Id: Ic221522a10be6714835dc37dbeee22dfd3b728cc Reviewed-on: http://gerrit.openafs.org/2745 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 290204c6e92d61c5b12b90d09e8202731caa0400 Author: Simon Wilkinson Date: Wed Sep 8 08:24:55 2010 +0100 Ignore *.dSYM files in working directory Failed Mac OS X debugging builds leave *.dSYM directories lying around the tree, which just litter the contents of "git status". So, ignore them. Change-Id: Ic2b79f299d724b770bf83cb24f2aac7c4063efdb Reviewed-on: http://gerrit.openafs.org/2744 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a353545c3f0e91cc85d7feb379997a1eda9f6e3 Author: Simon Wilkinson Date: Wed Sep 8 08:22:57 2010 +0100 Add config.log to gitignore globally When you end up explicitly regenerating chosen Makefiles by running ../../config.status Makefile, the working tree ends up littered with config.log files. Currently, we only ignore config.log in the top directory - extend this so that it's ignored across the tree. Change-Id: If3cfec82fbf78e97ee769b36315ba23dcfe8a950 Reviewed-on: http://gerrit.openafs.org/2743 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0aa435c5f9b91fca111a92c6559b861c5d451d04 Author: Simon Wilkinson Date: Wed Sep 8 08:31:02 2010 +0100 auth: Add a gitignore file for the test directory The auth/test directory is optionally built, and so had missed getting a .gitignore file. Add one now. Change-Id: I0cd49d05446871a250f93123435c4b2ac19e45e5 Reviewed-on: http://gerrit.openafs.org/2742 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95ac23fcddcd8ca7fbb224a75374250f88defefa Author: Simon Wilkinson Date: Thu Sep 9 09:04:21 2010 +0100 pam: Remove unused library definitions Change-Id: I7db8d50b27c0135e89ef15db9302f452e01c8b8a Reviewed-on: http://gerrit.openafs.org/2741 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5bc4b4956509256e8cf13bd04e4615ee2cb31c65 Author: Simon Wilkinson Date: Mon Sep 6 09:38:47 2010 +0100 aklog: Fix some format warnings Fix some format warnings (size_t vs int) which only appear when we're building with Heimdal. Change-Id: I7313ea1a7e01532b11fc6039a8a56e0fd874c347 Reviewed-on: http://gerrit.openafs.org/2740 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 696e1c015eeef259451c101813b9e930e402cb49 Author: Simon Wilkinson Date: Mon Sep 6 09:37:23 2010 +0100 aklog: Fix weak_crypto tests The tests for the various ways of enabling weak cryptography fail with current Heimdal master, because it defines krb5_allow_weak_crypto but does not prototype it. Fix this by testing for the Heimdal version (which MIT does not provide) first, and only if that's not available, try to use allow_weak_crypto. Change-Id: I559d5fd40c196fefc947dd0f7b10ed78fbd2c7e6 Reviewed-on: http://gerrit.openafs.org/2739 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 71171262602d7f261adbffd5047266e94c4a6f92 Author: Simon Wilkinson Date: Wed Sep 1 11:09:46 2010 +0100 RX: Make the sample client and server build Make the RX sample client and server build again Change-Id: I81ce12eadcb4150dd503e41f9a7fd1a850d31a11 Reviewed-on: http://gerrit.openafs.org/2737 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6380213d296c138349c77fa4a51655fac23cfeea Author: Simon Wilkinson Date: Sat Sep 11 08:25:15 2010 +0100 vlserver: Use com_err for Ubik error messages Use com_err to return a sensible string, rather than just an error code, for errors with Ubik initialisation. This has the specific benefit that the error when the database directory doesn't exist, or isn't readable, becomes Ubik init failed: file not found when processing dbase" rather than Ubik init failed with code 5382 Change-Id: I5f770377668a7f545cad7e422f28afd7c9f9888d Reviewed-on: http://gerrit.openafs.org/2735 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d69914a5f0580f8048072d3b734558ea5b7b2df5 Author: Marc Dionne Date: Thu Sep 9 21:02:05 2010 -0400 Warning fix for gcc 4.5 "operation may be undefined" warnings The inc_header_word and set_header_word macros make repeated use of their argument, which triggers many (~30) warnings with gcc 4.5, like this one: ./ptutils.c:473:6: warning: operation on ‘cheader.foreigncount’ may be undefined Removing the cast to afs_int32 in the macros gets rid of the warning, and should be safe since we're just getting a small positive integer value - the offset of the member in the structure - and passing it to the pr_Write function which expects an afs_int32. Change-Id: Ie493520f874cddbb4b7f9f7ebe4b3922a848d0d0 Reviewed-on: http://gerrit.openafs.org/2729 Tested-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 51806bd21af5bcc70c27cda5787ae853fa3f495e Author: Andrew Deason Date: Fri Sep 10 11:17:40 2010 -0500 udebug: Always show tidCounter If the queried site doesn't have an active write transaction, currently udebug doesn't show the tidCounter. The tidCounter can still be useful to know (especially since some sites will become buggy when tidCounter rolls over), so always show it. This adds the "The last trans I handled was" message to udebug. Change-Id: I10d9ab6ff07188d17df4d8022adf8bb125eb772a Reviewed-on: http://gerrit.openafs.org/2730 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f2df207274c65b4fa8c24419150e9084a4d17fca Author: Andrew Deason Date: Thu Sep 9 14:10:01 2010 -0500 namei: Do not remove n_voldir1 When removing data directories in namei_RemoveDataDirectories, do not remove the n_voldir1 directory (directory X in /vicepa/AFSIDat/X). Removing this directory can race against the creation of an entirely unrelated volume, causing the create op to fail (since it tries to create a directory in a directory that no longer exists). We don't currently have the necessary locking to make this safe, and since the overhead of n_voldir1 existing is pretty negligible, just leave it there. Also add some comments briefly justifying this. Note that other similar races probably exist for directories under n_voldir1, but they would only be between volumes in the same VG, and so are much less likely to occur. Change-Id: I5eac894cdbdb3fd1d74d8a0fc226df03686ceeef Reviewed-on: http://gerrit.openafs.org/2727 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 92ff0028f2e6a2f24dd5369f9b31e9852bf92abc Author: Michael Meffie Date: Thu Sep 9 15:22:29 2010 -0400 manpage correction for restorevol -file option The restorevol -file option specifies which file to read. Change-Id: I5c03eaaf8bf82fc6d3fb83ff08e8278257e7b65f Reviewed-on: http://gerrit.openafs.org/2728 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 31bb2e5eb5feb9c8e84d17b49fe70268127cdd43 Author: Andrew Deason Date: Thu Sep 2 11:25:27 2010 -0500 vol: Add VInit cond var and remove busywaits In DAFS, FSYNC_sync was waiting for VInit to reach at least 2 by looping around pthread_yield(). For a server with a large number of volumes, it can take a while for volumes to preattach, and so we are effectively busy-waiting for preattach to finish. This can slow fileserver startup and peg the cpu. So instead, add a condition variable for when VInit changes, and wait on that. Also modify other checkers of VInit to use the cond var. Change-Id: Icc251fdf7d525d40a9db1938a9cb4d47a74dccba Reviewed-on: http://gerrit.openafs.org/2648 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1ca0a24775794ba2e645854a3bbaa656f2fc8086 Author: Andrew Deason Date: Thu Sep 2 15:05:21 2010 -0500 namei: Limit traversal when removing data dirs namei_RemoveDataDirectories currently calls delTree with 'tree' pointing to the part of the path immediately following n_base (i.e. starting at the beginning of n_voldir1). This causes delTree to traverse all of n_voldir1, trying to delete every directory it finds. Since we are typically only trying to remove a single volume when calling namei_RemoveDataDirectories, instead call delTree with 'tree' pointing to immediately after n_voldir1, and beginning at n_voldir2 and try to just rmdir n_voldir1 afterwards. This way, we do not traverse a large fraction of the entire partition when just trying to delete a single volume, and so can significantly speed up volume removals. Change-Id: I79d69e7f3d1b691ec1d55e02ee5e93c0a927cffe Reviewed-on: http://gerrit.openafs.org/2651 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 41acfb91fa7fefae1f9a69aadc187a1403ec5827 Author: Steve Simmons Date: Tue Sep 7 17:38:27 2010 -0400 Add new file src/venus/cacheout to things that should be ignored. Change-Id: I57dec46b954ad4c4252997a0dec1db8e2090289b Reviewed-on: http://gerrit.openafs.org/2719 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f8ff458ef02d5ef49bc467304e40571d871385c8 Author: Derrick Brashear Date: Tue Sep 7 20:31:20 2010 -0400 ubik recovery and remote use correct file number the file propagation "out of band" changes should not hardcode recovery on file 0, but instead work on any file the interface is acting on. use the provided file number. Change-Id: I713671beaab01630bdd21d733f950f75c6456ac3 Reviewed-on: http://gerrit.openafs.org/2715 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 99811e3e5faf5917975d7ec3c3d16e2ed9a5bf50 Author: Jeffrey Altman Date: Tue Sep 7 14:35:22 2010 -0400 Windows: 1.5.77 Change Log summary Change-Id: Ic0362956470ddb76fac64d21927b3e51b7980ea6 Reviewed-on: http://gerrit.openafs.org/2710 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 19f50c13b4542cc84c33eaca4b2cc6ac0b75eb98 Author: Jeffrey Altman Date: Tue Sep 7 08:21:12 2010 -0400 Windows: Improve SMB detection of Local System account Depending on the authentication method, the smb session authenticated name for the "local system" account may be the nul string. In this case it is impossible to use the name to determine if the authenticated entity is the "local system" account as required by smb_SetToken. To work around this problem, smb_AuthenticateUserExt() will now obtain the Security Identifier (SID) for the authenticated account. The string representation of the SID will be used in place of the name by smb_ReceiveV3SessionSetupX() when constructing the smb_user_t object. A new flag, SMB_USERNAMEFLAG_SID, indicates when the name is in fact a SID. smb_userIsLocalSystem() checks for the SMB_USERNAMEFLAG_SID flag and performs a SID comparison when it is set. smb_SetToken() will accept either MACHINE\user or a SID string as the smbname. It will obtain the SID if possible and create a SID-based smb_user_t. It is possible that a SYSTEM service will use an anonymous (S-1-5-7) SMB connection. In that case, we also check the RPC Impersonation SID to see if it is SYSTEM. If so, the RPC identity supercedes the SMB identity for SetToken. smb_IoctlRead, smb_IoctlV3Read and smb_IoctlRawRead are now all consistent with regards to name processing. Fixed a couple of comments as well. FIXES 128022 LICENSE MIT Change-Id: I8f9ccd4a4dddea52d151288855c7e129e2f31b28 Reviewed-on: http://gerrit.openafs.org/2709 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit de441ba420b8fc38ce1b36bee06097f21cc6514b Author: Jeffrey Altman Date: Fri Sep 3 00:02:17 2010 -0400 Windows: revise NTSTATUS response for ALLBUSY, ALLOFFLINE, and ALLDOWN Replace STATUS_IO_TIMEOUT with RPC_NT_SERVER_TOO_BUSY for CM_ERROR_ALLBUSY. Replace STATUS_PATH_NOT_FOUND with RPC_NT_SERVER_UNAVAILABLE for CM_ERROR_ALLOFFLINE and CM_ERROR_ALLBUSY. These errors provide a more meaningful message to end users when a failure occurs. LICENSE MIT Change-Id: I34483f8f696285477fa0f8a8dac3b0ff33dee6b4 Reviewed-on: http://gerrit.openafs.org/2663 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ef135110b7d850e2c40bbbb6b7de69c76872fa9 Author: Jeffrey Altman Date: Thu Sep 2 21:17:24 2010 -0400 Windows: Modify signature of buf_CleanAsync and buf_CleanAsyncLocked The buf_CleanAsync() and buf_CleanAsyncLocked() signature does not include a cm_scache_t pointer even though buf_CleanAsyncLocked() needs a pointer to the matching cm_scache_t object. There are some calls when the cm_scache_t object is already known. For those cases it is more efficient to avoid the additional lookup especially when buf_CleanAsync*() is being called on every buffer associated with the cm_scache_t object. At the same time add a flags field and a constant CM_BUF_WRITE_SCP_LOCKED to permit the lock state of the cm_scache_t to be passed in. Finally, fix up the usage in buf_FlushCleanPages() which gains the most from these changes. LICENSE MIT Change-Id: I3726441ff83a89e24d790174ca71396d633f1be6 Reviewed-on: http://gerrit.openafs.org/2662 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fa961c02fbb7dc54fa4c02c38dfd07c44eb696d3 Author: Jeffrey Altman Date: Thu Sep 2 21:05:15 2010 -0400 Windows: Permit cm_scache rwlock to be dropped when "Stablized" The cm_buf_opts_t cm_BufStabilize() function was implemented such that holding the cm_scache_t.rw lock had to be exclusively held until cm_BufUnstablize() was called. Unfortunately, this prevents using Stabilize/Unstabilize to protect the cm_scache_t during Flush operations as the cm_scache_t.rw lock must be acquired after the cm_buf_t mutex and not before it. This patchset reimplements the synchronization logic using the new CM_SCACHEFLAG_SIZESETTING flag and cm_SyncOp(). LICENSE MIT Change-Id: Iaada83f7f3b75bb3b213b33b2399e900e48a2fbc Reviewed-on: http://gerrit.openafs.org/2661 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ee26ce51f67c7a91d843184374240bbc29e1660b Author: Jeffrey Altman Date: Sun Aug 29 23:41:02 2010 -0400 Windows: fail cm_CheckNTOpen if READ|DELETE for readonly file If the readonly file attribute is set (stored as a unix mode) then a CreateFile operation should fail if the file is opened for DELETE in combination with any other privilege. LICENSE MIT Change-Id: Ie8ebb6d230cf65d9ce2411bab2fcc4e561081505 Reviewed-on: http://gerrit.openafs.org/2660 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72584be7fb0b6eb01ca5cb9c0703e9bc1b92f547 Author: Jeffrey Altman Date: Thu Aug 26 11:33:43 2010 -0400 Windows: Add validation for directory buffer contents If the directory buffer contents are garbage we can crash the service. Add some simple validation checks to ensure that cm_dirEntry_t objects have the correct flag value and that the name strings are not too long. LICENSE BSD Change-Id: If4a276007ff7a21a641825037a1035ea20db79c5 Reviewed-on: http://gerrit.openafs.org/2658 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3f69933c4243d6861d5cce701c28f2dee088e6c2 Author: Jeffrey Altman Date: Tue Aug 24 16:46:45 2010 -0400 Windows: cm_TryBulkStatRPC must process VIO errors If the bulkStat errorCode indicates that a particular object is inaccessible due to a VIO error, we must update the server status appropriately in order to permit failover. LICENSE MIT Change-Id: I19ce3d2c5b138d519fb1c437f6d5109d7d8b1310 Reviewed-on: http://gerrit.openafs.org/2657 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b11ff643b5665ec252ca96dc19af1446fb72481f Author: Jeffrey Altman Date: Tue Aug 24 16:42:57 2010 -0400 Windows: better handle RX_MSGSIZE errors An RX_MSGSIZE error is returned by the new PMTU detection code. It is critical that such an error result in a retry of the operation that failed. Otherwise, the PMTU detection can't work and the server will be marked down. Secondly, it is important that such errors not leak to the application layer. Map them to CM_ERROR_RETRY in all cases. LICENSE MIT Change-Id: I966fe259080bd31ec60fdb6715f54e18e190c790 Reviewed-on: http://gerrit.openafs.org/2656 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 874c5ca8359d49703f1f37d7fb70204c182d0f86 Author: Jeffrey Altman Date: Tue Aug 24 16:40:38 2010 -0400 Windows: print the value of cm_OfflineROIsValid to afsd_init.log If we say we are printing the value of cm_OfflineROIsValid, do so and not cm_deleteReadOnly. LICENSE MIT Change-Id: I8b0bc73798feea413f8ce79f9965664fc050ef76 Reviewed-on: http://gerrit.openafs.org/2655 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 87c9e7e6e4f8be4778d183940f349557193146c7 Author: Jeffrey Altman Date: Sun Aug 22 10:05:59 2010 -0400 Windows: Handle RX_RESTARTING consistently for all RPCs Translate RX_RESTARTING to the same cache manager error code for all RPC classes. LICENSE MIT Change-Id: I4540e9886d1de68d9b3f8a2e72508f876225ff4a Reviewed-on: http://gerrit.openafs.org/2654 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2ef83d24846e6035b752fcbe98d980e046e074f9 Author: Jeffrey Altman Date: Sat Aug 21 00:23:45 2010 -0400 Windows: Log cell along with volume id for server errors When logging server volume instance errors to the windows application event log, be sure to log the cell as well. Translating from server ip address is non-trivial. Make it easier for administrators triaging issues to plug the volume and cell info into vos commands. LICENSE MIT Change-Id: I801fcd5c1afba4a8cdef4386fec72b9a529d4cfb Reviewed-on: http://gerrit.openafs.org/2653 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a97282bf76730fd05c2365aa1c58ce96174efd37 Author: Jeffrey Altman Date: Sat Aug 21 00:22:22 2010 -0400 Windows: unix modes represented in octal Since unix mode bits are represented in octal in most cases make sure we log them that way. LICENSE MIT Change-Id: Ia8106c7bbd3230380c7efa437b6eb0a90398bda3 Reviewed-on: http://gerrit.openafs.org/2652 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b91e7e86b429b6182d8ee23c471bef4f48af560f Author: Derrick Brashear Date: Fri Sep 3 08:18:41 2010 -0400 rx msgsize retry logic change only rewrite to RX_MSGSIZE if the MTU changed. otherwise, leave well enough alone Change-Id: If7311c623c61064c52b42fbb131aa8ff007c3741 Reviewed-on: http://gerrit.openafs.org/2664 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit defd84d0fb43a068d2b9ae88a103ffea266c8d95 Author: Andrew Deason Date: Fri Sep 3 10:59:45 2010 -0500 cacheout: Improve error handling Bail out when we encounter errors in initialization. Among other things, this prevents a segfault if we can't read the client configuration. Change-Id: I8b35163c5c4750eb05539a225069327051a3f148 Reviewed-on: http://gerrit.openafs.org/2665 Tested-by: BuildBot Reviewed-by: Jeffrey Hutzelman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e07f87070c901d71c2f4fa594738ce0a16c77ea1 Author: Andrew Deason Date: Fri Sep 3 16:32:11 2010 -0500 vos: Show effects in single-volume dryrun mode Fix -dryrun mode for 'vos syncvldb' to also show the effects when run against a specific volume id. Change-Id: I3a2db96fc8016939f2f2f9561aba29527701ad59 Reviewed-on: http://gerrit.openafs.org/2667 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5705a46a75917cb34b4ea9161dde4ee43d0d4eb0 Author: Andrew Deason Date: Fri Sep 3 15:20:10 2010 -0500 vos: Show after effects in dryrun mode The dryrun mode of operation for 'vos syncvldb' and 'vos syncserv' does not currently show the "status after" portion of its output, so they don't really show what the commands will do. Change them so "status after" is shown for -dryrun when sync'ing servers or partitions, and count changes towards the count at the end. Change-Id: I6cc20c28a989925a1262570b286fdd7d290c0a9a Reviewed-on: http://gerrit.openafs.org/2666 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 526b8a7ca53977d6cdb91427932ac6b18bb7064d Author: Marc Dionne Date: Sun Sep 5 10:48:52 2010 -0400 afs_DoBulkStat: don't call afs_Analyze without holding the GLOCK Limit the scope of the GUNLOCK-GLOCK blocks to cover only the RX calls. This prevents afs_Analyze from being called without the GLOCK, which causes an oops in afs_icl_Event4() where there's an ASSERT_GLOCK. Change-Id: Ifa6942d08f22479c0affba3ebd1fc9bf4063d8a5 Reviewed-on: http://gerrit.openafs.org/2668 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 114b817da5aea425c87c12e10cdefd033f7ba0ff Author: Andrew Deason Date: Wed Sep 1 12:04:56 2010 -0500 RedHat: Package libafshcrypto libraries Add libafshcrypto.so.* to authlibs, and libafshcrypto.{a,so} to authlibs-devel. Change-Id: I9b513bc32e532562be2d679b5185411f002f8208 Reviewed-on: http://gerrit.openafs.org/2643 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 469cc14bd16b9e1a7ed8404224de63862c1f52f5 Author: Andrew Deason Date: Wed Sep 1 11:14:37 2010 -0500 RedHat: Do not force krb5-config path If the %krb5config macro is not defined, do not force using /usr/kerbers/bin/krb5-config, since sometimes that is not where it is (RHEL6 puts it in /usr/bin). Instead only specify KRB5_CONFIG if krb5config is defined; otherwise let configure find krb5-config for us. Change-Id: I35cc03ddbba7edd2c03d8f72b9636d4a7f6e64c0 Reviewed-on: http://gerrit.openafs.org/2642 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 83f85c9ad6c439eb9676436a3e09c40c2813f1c1 Author: Andrew Deason Date: Wed Sep 1 10:32:53 2010 -0500 RedHat: Update openafs.spec for configure changes We no longer have the configure options --enable-disconnected and --with-krb5-conf. Remove them from the spec file and instead specify krb5-config via the KRB5_CONFIG variable. Change-Id: Ic9d9505f0526e38bf084683d9be3367851005a97 Reviewed-on: http://gerrit.openafs.org/2641 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 346ccf51ddedadd7f6709276237c26b7871ffbaf Author: Andrew Deason Date: Wed Sep 1 10:18:17 2010 -0500 RedHat: Use git-version in makesrpm.pl We no longer have the OpenAFS version in the AM_INIT_AUTOMAKE. Get the version from the equivalent AC_INIT version, which is determined by running build-tools/git-version. So, run git-version to get the version. Change-Id: I5feb72ba35566315654ab88f2047be8a7ac6b40a Reviewed-on: http://gerrit.openafs.org/2640 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 86ccd1c0f486d38b13a71a3c99879f546ad18b15 Author: Andrew Deason Date: Wed Sep 1 10:12:31 2010 -0500 RedHat: Use configure.ac in makesrpm.pl We don't have a configure.in anymore; instead we have a configure.ac. Change-Id: Ic79b5577cf2d5cd3021fe933ca5405fb2d514a4d Reviewed-on: http://gerrit.openafs.org/2639 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae868642e1936509184cbe9b539733445902bdf3 Author: Russ Allbery Date: Wed Sep 1 10:52:30 2010 -0700 Update Autoconf Kerberos probes to latest rra-c-util version We will now look for krb5-config in /usr/kerberos/bin (the path used on Red Hat Enterprise prior to RHEL6) if it isn't found in the user's PATH. This update also adds a new probe for krb5_get_init_creds_opt_free which is not yet used, but may eventually be useful for klog.krb5. Change-Id: Iefd67c02ac44fd5f1a30883d1cd6ea4e489b32b1 Reviewed-on: http://gerrit.openafs.org/2644 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 69c1d5e2debdafd971216ab4afc3e90702d5860b Author: Jonathan Billings Date: Tue Aug 31 15:15:26 2010 -0400 Linux: Updated RedHat spec file with new demand attach servers and docs Added the following to the openafs-server package: dafileserver dafssync-debug dasalvager davolserver salvageserver salvsync-debug Added the man pages for the above. Added a man page for krb.excl Change-Id: Ifac99e77de4f7b07dc6e76df0237b1960a73cb0d Reviewed-on: http://gerrit.openafs.org/2630 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 335ccb4082657b7d0e4e9af1076356cf115642d2 Author: Michael Meffie Date: Mon Mar 15 12:42:23 2010 -0500 ihandle positional read and write When available, use POSIX positional read and write calls in the ihandle package. Originally written by Derrick Brashear and Andrew Deason. Change-Id: I29a9d830872cb920e8ed5820e33d3cbcb7247460 Reviewed-on: http://gerrit.openafs.org/1562 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8006ff8bf4a6f1944243309e5130538e3cbe62d5 Author: Hartmut Reuter Date: Tue Aug 31 13:30:41 2010 +0200 Let SRXAFS_GetStatistics64 return correct values for the workstations h_GetWorkstats was called also for 64bit which let random contents in the other half of the 64bit field. Worse: little and big endian machines filled different parts of the field so that a later masking in fsprobe would net help for all kinds of servers. Now a small wrapper h_GetWorkstats64 is called which calls h_GetWorkstats correctly. Change-Id: Iaeafd77dfa03d88caa98e4e352f95bfb33d736df Reviewed-on: http://gerrit.openafs.org/2629 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 759487038bbaccf59e49f973b627ee20f555e7b3 Author: Derrick Brashear Date: Mon Aug 30 12:32:58 2010 -0400 ubik recovery kill duplicate code if recovery wants to invalidate transaction unconditionally and has code duplication from urecovery_checkTid, just make checkTid do what we want Change-Id: I345560c496d4cb4506de6db79357b99c616ffbbe Reviewed-on: http://gerrit.openafs.org/2628 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bafa4d17530338122581d5b11eba367ebd445c30 Author: Michael Meffie Date: Thu Aug 12 00:14:03 2010 -0400 clean up stale defines in volser header The volserver does not use port 5003 any more. Change-Id: Ied55709c3831595d63f052cc1c2397e26352e4f1 Reviewed-on: http://gerrit.openafs.org/2536 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Tested-by: Derrick Brashear commit 39c4b966dd504e873570d70b20ef8d38726c9e37 Author: Andrew Deason Date: Wed Jun 9 12:46:29 2010 -0500 ubik: Protect ubik_servers in urecovery_Interact urecovery_Interact can modify the global ubik_servers structures, including destroying and recreating the RX connection objects. In the pthreaded case, DBHOLD the database, so we do not modify the structures out from under another thread trying to use them. Change-Id: I62ab7b77e17c65ec8840659957ef6d00303ea5a4 Reviewed-on: http://gerrit.openafs.org/2108 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 615eb81a496d20a3532f0a68e56781b2171ad4ac Author: Andrew Deason Date: Wed Jun 9 12:45:57 2010 -0500 ubik: Drop dbase versionLock during I/O and sleeps Currently we hold versionLock during all ubik network I/O and while we are sleeping for whatever reason. For pthreaded ubik, to allow other things to happen during those times, drop the lock and reacquire when we hit the net or sleep. Change-Id: I414b3adfadc0bb506b98e8677ec5dfbb269e0129 Reviewed-on: http://gerrit.openafs.org/2107 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5ec5ad5dcca84e99e5f55987cc4f787cd482fdde Author: Simon Wilkinson Date: Wed Apr 7 23:03:21 2010 +0100 New GetToken pioctl Implement a new, XDR based, GetToken pioctl which mirrors the new SetToken pioctl. Change-Id: I213e74edb3496baa40b5c8048e97df6888f742b4 Reviewed-on: http://gerrit.openafs.org/2584 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53837416cbed3ba4d11f63015e1f13800519f2ed Author: Simon Wilkinson Date: Sun Feb 14 10:00:22 2010 +0000 aklog: Add support for the new SetToken pioctl Make aklog use the new extended ktc set token function when storing tokens. Change-Id: I2e84cda2bf8a4c6c9f6627569cae2d34fd7b5c0f Reviewed-on: http://gerrit.openafs.org/2583 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5aa8c5d9794b909ef9195992ee12f963e254574b Author: Derrick Brashear Date: Sat Aug 28 17:19:45 2010 -0400 macos afsdb reinit resolver on address change assume a new address means we probably have new resolver info; reinit when we get the callback. FIXES 126440 Change-Id: I0d5ac0576f2b2e90093b93974b0354cac35d84a3 Reviewed-on: http://gerrit.openafs.org/2622 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aaf9b4ddd5ce9ed83be038bba01199b1d400ddf3 Author: Matt Benjamin Date: Sun Aug 29 15:06:22 2010 -0400 cache bypass Also increment page refcount in readpage As noticed by a commenter, afs_linux_bypass_readpage needs the same get_page operation as in afs_linux_bypass_readpages, as background page accounting assumes we have done it. Change-Id: Ib2e1cb7ec971e68b022dd1740584369d04b8b833 Reviewed-on: http://gerrit.openafs.org/2626 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 239a62034b849565d680baa9e5b8e6921256ffd5 Author: Matt Benjamin Date: Fri Aug 27 19:11:32 2010 -0400 DFBSD update dfbsd userland Add new sysnames. Fix some userland header inclusions, defend against kernel-mode ioctl interpretation when building UKERNEL. Add fragments missing from DFBSD MakefileProto template. Change-Id: I56659bfe43dc24ef8a158aaf486c9a6f23643002 Reviewed-on: http://gerrit.openafs.org/2619 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ec85304dd738935d8be3f8934b166f78a10995bf Author: Matt Benjamin Date: Sun Aug 29 17:33:03 2010 -0400 FBSD try-relax child vnode locking (recurse only) In cases where afs_vop_lookup would return a child vnode locked, continue to take an exclusive lock, but allow recursion (LK_CANRECURSE). Allow recursion also at afs_vop_link, where we specifically encountered a conflict due to recursion. Change-Id: I5f5b0979ce3c86e517f96ea60b96ebdd26401acb Reviewed-on: http://gerrit.openafs.org/2625 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b727c1e748042e46f2a566725359fed0dd8a8f4f Author: Matt Benjamin Date: Sat Aug 28 21:57:38 2010 -0400 FBSD, DFBSD (future) call afs_FakeOpen in the write path Call afs_FakeOpen in the write path, even though nominally it is AFS_VM_RDWR_ENV. Change-Id: I6d24c9631f80058e3dd0d6f284ca7792253ceaaa Reviewed-on: http://gerrit.openafs.org/2623 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8334b40376f4b820e5f08e0a1f477be7c04c5cc8 Author: Matt Benjamin Date: Sat Aug 28 20:43:41 2010 -0400 FBSD, DFBSD (future) vnode_pager_setsize updates Based on review of bundled filesystems on FBSD and DFBSD, call vnode_pager_setsize in three unhandled cases (getattr, setattr, and io growing a file; truncation was handled correctly already). Following up on a suggestion by Ben Kaduk. Change-Id: I05b61c26402bb8ab49ad74b71af2d02b439f959f Reviewed-on: http://gerrit.openafs.org/2621 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 29740370599b4c7edba0c1442b3ca47533f09412 Author: Marc Dionne Date: Sat Aug 28 15:50:04 2010 -0400 Make hcrypto depend on config hcrypto needs the top-level include structure to be present so it can install its header files. Add a dependency to "config" in the Makefile to make this explicit and prevent occasional failures with parallel builds. Change-Id: If588d6a15fa1fdf371ec2841cc3a6e75077cccb0 Reviewed-on: http://gerrit.openafs.org/2620 Tested-by: Marc Dionne Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit df4cf75b970f72810078fc788e732480dbb7996a Author: Matt Benjamin Date: Thu Aug 26 22:54:20 2010 -0400 FBSD restore old syscall register logic for older kernels The syscall_register code appears to depend on coordination with FreeBSD upstream, which hopefully can be completed by RELENG_9. Use the original code for installation of the AFS syscall everything older than that. Change-Id: I2954cf1a2ae3587a311e8133ec5cdc500b4e2e24 Reviewed-on: http://gerrit.openafs.org/2618 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a9958b34a930223877e01de5109e934f1224d988 Author: Matt Benjamin Date: Thu Aug 26 20:37:52 2010 -0400 sed s/porc/proc/ There is no osi macro osi_curporc. Typo. Change-Id: I02f151be942471579ca60ed1e2190d0895288e4c Reviewed-on: http://gerrit.openafs.org/2617 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2221b61eff513c61cac765d8e72cd06e769610fc Author: Simon Wilkinson Date: Sun Feb 14 01:14:54 2010 +0000 Add new SetTokenEx pioctl This change implements the new, XDR based, SetTokenEx pioctl. This pioctl permits sending multiple tokens, of multiple types, into the kernel in a single pioctl call. This patch provides a kernel implementation of the pioctl, and a new library function ktc_SetTokenEx, which will use either the new pioctl, or fall back to the old one should SetTokenEx not be available. Change-Id: Id1e2903e078c549f5675e3d2ecdf53a9bb33f5e9 Reviewed-on: http://gerrit.openafs.org/2582 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ba1d050c6e8c9593dfa3d914f9d24e2bd985abe0 Author: Simon Wilkinson Date: Sun Feb 7 15:15:26 2010 +0100 Make unixuser's vid advisory The 'vid' element of the unixuser structure was performing two functions. It was used in debug messages to clarify which user's token had expired and, in a few locations, to signify whether the user had tokens or not. This patch removes this dual usage. 'vid' is renamed to viceId, so all uses are found and fixed. Where it is used for debugging, it remains, but we only set the viceId for a user when we first use an rxkad token on that context. Other uses of 'vid' have been replaced with tests against the UHasTokens flag in the user's states. Change-Id: Ifc0306a34fb7360810c792215e55e783f1dd062c Reviewed-on: http://gerrit.openafs.org/2581 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit adf2e6e827c6caf55247c5e63b88775393156ae5 Author: Simon Wilkinson Date: Fri Feb 5 11:12:45 2010 +0000 Unix CM: Generalise token storage This generalises token storage in the Unix CM, so that it isn't rxkad specific. We add a new, dynamically allocated, list of tokens hanging off each unixuser structure. Each token is expressed as a discrimated union keyed on the security class of that token, with the token's details contained within that Union. All token handling is performed through a set of functions in afs_token.c - token access is modified to use this interface throughout the rest of the code. Change-Id: I939f3a611bb6e991e1e0d075ced0a59fc6f57693 Reviewed-on: http://gerrit.openafs.org/2580 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5b71bab4ff0a0f6f1e0cec2c71adfd48b3f35cca Author: Ben Kaduk Date: Wed Aug 25 23:21:30 2010 -0400 FBSD: properly register our syscall Use the provided interface, syscall_register(), instead of manually tweaking the sysent table. Starting afsd will still fail at present on FreeBSD HEAD without an additional kernel patch to syscalls.master. Change-Id: I18db7c8b74dbd114165f7617df25e462cb372e88 Reviewed-on: http://gerrit.openafs.org/2616 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2ea508ea0f320ca17de6df3526aa7237b998c7be Author: Matt Benjamin Date: Wed Aug 25 16:19:18 2010 -0400 FBSD: give osi_NetReceive time to shutdown, reprise The delay logic needs to follow soshutdown, and precede soclose. The thread in osi_NetReceive is racing to do another soreceive. That thread needs to win the race and notice the socket is shut down before rx_socket is torn down. Change-Id: Id8424dcfa2498550a190d277017b7ea15fc11023 Reviewed-on: http://gerrit.openafs.org/2613 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5c0aebc421ddbed099a6fe1015cdda603e20529d Author: Matt Benjamin Date: Wed Aug 25 03:34:35 2010 -0400 FBSD CM: don't call afs_close when recycling Don't call afs_close when handling VOP_CLOSE on a recycled vnode, since there was no matching open. This corrects the opens count, which was seen to go have gone negative in the reclaim vop. For clarity, assert if afs_vop_close is entered with a VI_DOOMED vnode and avc->opens != 0. Change-Id: I511a4f2a924c2f8e20f3ecdaa445fbe803289a47 Change-Id: I1b2307fd3318fa54e8f7fb72a5d3f843e2a38404 Reviewed-on: http://gerrit.openafs.org/2612 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f7b70a28ba7dc03f0fc973343669f0a7967de4c Author: Matt Benjamin Date: Tue Aug 24 20:48:24 2010 -0400 BSD CMs: Don't call nonexistent afs_FlushVS in afs_vop_reclaim Revert BSDs to call FlushVCache in their respective reclaim vops, afs_FlushVS no longer exists. FIXES 127955 Change-Id: I842356c2d6ee4fa3a49eaa8594f1b52188c24985 Reviewed-on: http://gerrit.openafs.org/2611 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 04d0b3e2c6624ef19176aba2537cca88e058c6b2 Author: Heimdal Developers Date: Tue Aug 24 17:40:51 2010 +0100 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision 4f5390877a6cdb9615cf1f61f1884edc7b91522c which is described as switch-from-svn-to-git-1447-g4f53908 Change-Id: I8a679232dfb25ba636600264b235667f06a5f62c Reviewed-on: http://gerrit.openafs.org/2607 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a2821cdbd05b280e3dc886cfb094e4c040d45c6c Author: Andrew Deason Date: Mon Aug 23 14:03:03 2010 -0500 venus: build cacheout Build 'cacheout' in all builds, so it does not succumb to bitrot. Change-Id: If00ce1fd9dd49e92caa183dbb54f06b2edc4ece9 Reviewed-on: http://gerrit.openafs.org/2606 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4b7038820c503445917087ca4034ae48c7803518 Author: Andrew Deason Date: Mon Aug 23 12:55:21 2010 -0500 venus: make cacheout build again Make src/venus/cacheout buildable again, by fixing several compiler errors and warnings. Also clean up a few small things, like adding 'static' qualifiers. Change-Id: I1cd10221a5e13a59227e4915991db6042325b7de Reviewed-on: http://gerrit.openafs.org/2605 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a0f416e3504929b304fefb5ca65e2d6a254ade2e Author: Andrew Deason Date: Fri May 21 16:26:53 2010 -0500 vlserver: Allow reading during ubik writes Turn on the new ubik_BeginTransReadAnyWrite functionality for the vlserver, which allows us to read data from ubik during a conflicting ubik write lock. When writing, we now update a copy of the application-level cache, and write back the changes during a commit. Change-Id: Ica958af704f40e89c2062e43641d883865613802 Reviewed-on: http://gerrit.openafs.org/2106 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1f532d099b8b084d43dd0140890448464325b602 Author: Andrew Deason Date: Fri May 21 15:54:33 2010 -0500 vlserver: Access cache via vl_ctx The vlserver application-level ubik cache (which consists of HostAddress, ex_addr, and cheader) is currently being accessed via global variables everywhere. Instead, access these via the new vl_ctx struct that is passed to functions during a transaction, so we have the ability to modify the cache without making all changes visible as we change it. Change-Id: I24bd5495539057d169aef4b5b0b6850b77172cab Reviewed-on: http://gerrit.openafs.org/2105 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3bf0350218dcf4d6e086941fac394769b6b9cc4a Author: Andrew Deason Date: Fri May 21 11:12:50 2010 -0500 vlserver: Add a struct for trans-specific data Instead of passing a ubik_trans pointer to many functions inside the vlserver, pass a vlserver-defined vl_ctx struct, so we can add new things to keep track of in a transaction that are not part of ubik. Change-Id: Icf8df6bfdf8960134493ab7f379f0f65b92bdb5a Reviewed-on: http://gerrit.openafs.org/2104 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fd7f7469bdbde24320c3ac8b4f7015d495b47bff Author: Andrew Deason Date: Thu May 20 15:22:11 2010 -0500 ubik: add interface for reading during write locks Add ubik_BeginTransReadAnyWrite, which allows for reading from the database, even while there is a conflicting ubik write lock. Reads are still blocked while the local database is updating due to a write transaction commit. Change-Id: I025e595ad699d5a969a0676691530d90c65f1920 Reviewed-on: http://gerrit.openafs.org/2592 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 570236dd55e79e8886b45f19cef59ec3fa9d53f6 Author: Andrew Deason Date: Tue Jun 22 14:36:42 2010 -0500 ubik: Fix buffers for reading-during-writes If we are reading while a write transaction is in progress, we can encounter a buffer that is dirty if we're on the same site as the writer. Ignore these buffers for readers, since they contain uncommitted changes. Then, when the writer commits, invalidate the resultant duplicate buffer, if one exists. Change-Id: I67e0205362d4c08ea9a8c12104fea8bfe8cbf798 Reviewed-on: http://gerrit.openafs.org/2231 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5c7297a6c76777aec6209aa191b067ddc73b1a87 Author: Andrew Deason Date: Tue Jun 22 13:24:27 2010 -0500 ubik: Abstract buffer matching and pass trans ptrs Abstract the code for matching buffers in DRead, and pass around ubik_trans pointers instead of ubik_dbase pointers. This changes no behavior, but makes changing ubik buffer code a bit easier. Change-Id: Ie98005edb0f0dc008190e709dc08d2cc5ef5e16c Reviewed-on: http://gerrit.openafs.org/2230 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 975b662d8ecabeb82ffd2a3a2dce0c8d6e6cc473 Author: Simon Wilkinson Date: Sat Aug 21 12:05:37 2010 +0100 Don't include afsconfig.h in rxgen headers Some headers generated by rxgen are installed. We can't use afsconfig.h in installed headers, as it isn't installed (and it shouldn't be, as it contains autoconf defines which will almost certainly have namespace conflicts with other packages) Revert the portion of 972a407 that added afsconfig.h to the h_output function. This should now be safe as stds.h no longer relies on the result of autoconf tests. FIXES 127931 Change-Id: I75645620e46c4f354ca984a8daf99254650133f6 Reviewed-on: http://gerrit.openafs.org/2604 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4129b055a6236e892e1dc2c5d2023d1947495811 Author: Marc Dionne Date: Fri Aug 20 16:11:59 2010 -0400 s390x: only declare afs_sys_setgroups32_page where needed Variable afs_sys_setgroups32_page is only used when __NR_setgroups32 is not defined. Make the declaration depend on it as well to clear up an unused variable warning. Change-Id: I812b98d6ac4bf6ac923553ef3556c90d75d86fcb Reviewed-on: http://gerrit.openafs.org/2600 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c2be1ee1d726463590ae1272495d102111fdf75b Author: Marc Dionne Date: Fri Aug 20 16:37:56 2010 -0400 Fixes for signed char architectures "char" is unsigned on s390x, which causes a few warnings where we test for negative values. Add a signed modifier in a few cases, and in vos.c replace with an int to match a similar section of code in the same file. Mostly a warning fix, but in one case the variable could be used to return a -1 error value, so it may have caused an actual bug. Change-Id: I005fbcd7c573735df7403316ec0ced67ee81e559 Reviewed-on: http://gerrit.openafs.org/2602 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 850567f17285021d3133a75c1d0d3494e0faabfc Author: Marc Dionne Date: Fri Aug 20 17:42:47 2010 -0400 Ignore old style definition warnings in generated code Older flex can generate functions that trigger the "old-style-definition" warning. Since it's generated code, just ignore it. Change-Id: If475507561498b976a2942bd0084975814ab6a76 Reviewed-on: http://gerrit.openafs.org/2603 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit de341580a6003944f1ae4b01c56bf483ead857d1 Author: Marc Dionne Date: Fri Aug 20 16:27:44 2010 -0400 Prototype warning cleanup - big endian Move function definitions above their use in quad_cksum.c and remove the (incomplete) prototypes. Clears up a few warnings on big endian systems. Change-Id: Id860f904fff9fb033ee4b2032162304a4af7423a Reviewed-on: http://gerrit.openafs.org/2601 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3fc5863f062c14c346bcc50c82b8d15971750e55 Author: Simon Wilkinson Date: Fri Aug 20 13:17:53 2010 +0100 Configure: Tidy up AC_CHECK_FUNCS Move all of our AC_CHECK_FUNCS calls into a single, ordered, list so that it's easier to see what's being checked for and what's not. Change-Id: Ib8e356ada469d4b3be8cc6387df91de21a2d1e8a Reviewed-on: http://gerrit.openafs.org/2598 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 10ff668dcbff1a8121e79d43dfedb1c6c509af64 Author: Simon Wilkinson Date: Fri Aug 20 13:07:04 2010 +0100 hcrypto: Check for arc4random Add a configure test for the arc4random function which hcrypto can use as an entropy source Change-Id: If1ae243d2f2850be0efd0030a37ac026cdb0e7ba Reviewed-on: http://gerrit.openafs.org/2597 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9da71758f194b98e1be3dee8d588b703874ea9a6 Author: Simon Wilkinson Date: Fri Aug 20 13:19:30 2010 +0100 Add a few missing entries to our .gitignores Add a couple of build products to the relevant .gitignore files Change-Id: I236e001f77c229736cb58c5c0c76811166dc6690 Reviewed-on: http://gerrit.openafs.org/2599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit deaed0ad3613c04434594873e014f8fe65b9f06a Author: Simon Wilkinson Date: Fri Aug 20 00:18:17 2010 +0100 hcrypto: Fix for IRIX Fix the hcrypto build for IRIX, by including param.h in the configuration header so that the platform specific redefinitions of "inline" work correctly. Change-Id: Ib301fae008b596f9112eefe21eaccad0dfd74190 Reviewed-on: http://gerrit.openafs.org/2596 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 38cf31463e3f3c675de727c1e793e117a90e6d20 Author: Andrew Deason Date: Mon Jul 12 15:47:15 2010 -0500 Avoid thread-unsafe PrintInode in threaded code Some potentially-threaded callers were calling PrintInode with a NULL first argument, which is not threadsafe. Alter them to use local storage. Change-Id: Ib9ad9c070bd659be30616b2c77cd244458357197 Reviewed-on: http://gerrit.openafs.org/2593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 87dc2a312ac94bc0a8b809a8f879128be8d9c791 Author: Andrew Deason Date: Thu Aug 19 11:35:40 2010 -0500 Windows: vol-salvage SalvInfo fixes Commit 3d7388b790ef21de552ec60d379764df067ae421 broke the windows build. Fix it: - SVGParms_t has no salvinfo member, but an svgp_salvinfo member - Correct the SalvageVolumeGroup prototype to match the actual implementation Change-Id: I6515ff8a3850b09e959c95387c3e7c22b40794c1 Reviewed-on: http://gerrit.openafs.org/2595 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f6d1f17f48a06a2781bd3902addb594bf8a91a0c Author: Simon Wilkinson Date: Wed Apr 7 21:45:39 2010 +0100 Add OpenAFS build machinery for libhcrypto Add an OpenAFS build environment for the symmetric algorithms in libhcrypto. Change-Id: I0d971433fe0130854a7c50cd9107af02893b1d58 Reviewed-on: http://gerrit.openafs.org/2575 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d8f2debce49a8a0eb310bdaf8ad0ee7601a0542e Author: Andrew Deason Date: Thu Apr 22 17:09:18 2010 -0500 Remove the global tempHeader/stuff structures Currently, volinodes.h defines an array ('stuff') for easily accessing information about different inode types. Part of the array points to parts of a global 'tempHeader' structure, making this not threadsafe. Change this into an interface which utilizes local storage to make this threadsafe and remove those horridly-named global variables. This adds the init_inode_info static inline function, for initializing a local inode information table. Change-Id: If4562e724fd7a8e5f8166ea0fe409d6765d0de2b Reviewed-on: http://gerrit.openafs.org/1869 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d7388b790ef21de552ec60d379764df067ae421 Author: Andrew Deason Date: Thu Jun 24 15:45:05 2010 -0500 vol-salvage: Move global vars into SalvInfo struct Reduce the number of globals used in the salvager code, by making functions pass around a 'salvinfo' structure that contains the information regarding a particular salvage. Change-Id: Iba7a6add8c1b8145f531e10495c621a2ba15425d Reviewed-on: http://gerrit.openafs.org/2250 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e98379003f1c47ac7ca3a7121bb4450d36e8fd8d Author: Simon Wilkinson Date: Thu Jul 22 15:22:09 2010 +0100 libafsrpc: Add new XDR symbols to exports Add the new XDR symbols which we've recently introduced to the exports list so they can be used from the shared libraries Change-Id: Iadc038ad36a673fc71f31eed32ef8979343791e9 Reviewed-on: http://gerrit.openafs.org/2579 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a81c323fbd05cb5cb85c56dfcc0b540e0354f318 Author: Jeffrey Altman Date: Tue Aug 17 01:24:39 2010 -0400 Windows: fix Freelance trailing dot enforcement The cm_enforceTrailingDot() function failed if there was a trailing dot followed by white space. LICENSE MIT Change-Id: Ib6a90420459a44b87995c44a5f58fcdcd5041c9f Reviewed-on: http://gerrit.openafs.org/2588 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit fa1c0cfe5f2e396d8d9e1c4d0bfc43178db7aebe Author: Heimdal Developers Date: Sun May 9 19:33:54 2010 +0100 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision 40ef7759b917648938416e15521d383e2eade5cf which is described as switch-from-svn-to-git-1333-g40ef775 Change-Id: Ie03ff2d99293272f9ce4c900367eefa063ce8d98 Reviewed-on: http://gerrit.openafs.org/2574 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 776dbdebc1c46c7276b14cf55fe90452b73fc570 Author: Simon Wilkinson Date: Sat May 15 22:48:37 2010 +0100 Heimdal import: Add hcrypto files Add the files which we intend to use from Heimdal's hcrypto library to the list of files which we import from the Heimdal git repo. Change-Id: I734b77b8fa47617efc05b782eafc00753dce2279 Reviewed-on: http://gerrit.openafs.org/2573 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f9498799de1fe3e22c695c54284e6d072f8daecc Author: Simon Wilkinson Date: Sun May 16 13:04:47 2010 +0100 Handle whitespace better in import script Make the import script handle multiple, rather than just single, whitespace separators between source and destination files. Change-Id: I0cc0fdd6ba1ef4bd5407b2e0fd9285ffe902408b Reviewed-on: http://gerrit.openafs.org/2572 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eb49bd3df0f20cf99825002387c2dbceefe9b784 Author: Jeffrey Altman Date: Tue Aug 17 02:13:31 2010 -0400 Windows: Fix remove 'register' patch The register removal patch broke the Windows build. Fix it. Change-Id: I0121da17a98e1eb35932d18c851989737d9325b5 Reviewed-on: http://gerrit.openafs.org/2571 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 753a316821bf23a53a7ebef9b52122c39ee88b83 Author: Marcus Watts Date: Mon Aug 16 23:52:36 2010 -0400 death to trailing whitespace if we're gonna clean up... Change-Id: I5ab03f29468577b62dacab41a67eadfd8c43f812 Reviewed-on: http://gerrit.openafs.org/2463 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a531cb7069f3ced1aae5a1948d708a7f24539df Author: Marcus Watts Date: Wed Jul 14 23:13:20 2010 -0400 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 Tested-by: Derrick Brashear commit b44562f5dcda72a78fa12b47f8862f0a3c231aee Author: Derrick Brashear Date: Thu Aug 12 00:33:58 2010 -0400 openafs 1.5.76 make openafs 1.5.76 Change-Id: I56ef6618ae6ff8d0ee2e06a145aed7d61f98d682 Reviewed-on: http://gerrit.openafs.org/2537 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 523fde439847e2a32aa446ce94c65436dceeb8f8 Author: Jeffrey Altman Date: Thu Aug 12 01:47:41 2010 -0400 Windows Change Log for 1.5.76 Change-Id: Ia5004d37fceb506ed7ca894f31a903d2b8cb66cb Reviewed-on: http://gerrit.openafs.org/2540 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 67ca70bfd3dcb2b5fc9d318b0be6817188302dc3 Author: Jeffrey Altman Date: Mon Aug 16 14:27:44 2010 -0400 Windows: Return error for SetToken PIOCTL_LOGON if not LocalSystem If the PIOCTL_LOGON flag is set and the user is not LocalSystem, return Access Denied. LICENSE MIT Change-Id: I25f042353fb8b70aba4fb01ba1a5b204470416f5 Reviewed-on: http://gerrit.openafs.org/2568 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ce2422000446eed0e4a6edf926df4fe93206508d Author: Jeffrey Altman Date: Mon Aug 16 10:09:22 2010 -0400 Windows: prevent buffer overrun in cklog The Windows version of klog.exe will overwrite the realm and password buffers if the command line input is too long. Generate an error and terminate the program instead. Change-Id: I80671adcf92e9140f14a943b2677a352d2223eee Reviewed-on: http://gerrit.openafs.org/2558 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 22f6306cc8651f08841c66cd222c27c70ec5a00f Author: Jeffrey Altman Date: Thu Aug 12 01:48:16 2010 -0400 Windows: Only Local System Account may set tokens for alternate ids Only permit tokens to be set for alternate ids from the system account. LICENSE MIT Change-Id: Ibeaf16950b0317db99dfebccb9534697a258db78 Reviewed-on: http://gerrit.openafs.org/2541 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 5e8d0a7b5fc9711551d707ce3639e080450084a3 Author: Jeffrey Altman Date: Fri Aug 13 20:58:43 2010 -0400 Windows: Parse Freelance entries and enforce trailing dot but no trailing ws Make sure that there is a trailing dot and no trailing whitespace for both Mount Point and Symlink entries read from the Freelance registry key. LICENSE MIT Change-Id: I339d1bd2a8fc3e5f44362c65e872396adf64fdf6 Reviewed-on: http://gerrit.openafs.org/2555 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit e8bb948db17d7e4f734b9785f6f1b09c7efebde9 Author: Chaz Chandler Date: Wed Aug 4 11:17:03 2010 -0700 autoconf detection of label support acinclude.m4 now has struct label support detection and sets HAVE_STRUCT_LABEL_SUPPORT in afsconfig.h. Obviates complicated ifdefs in various src/afs/ and src/rx/ files. Must run regen.sh to generate new configure and afsconfig.h.in, then configure will detect label support and set afsconfig.h appropriately. Not sure what to do for Windows, but should be a step in the right direction. Fixes issue with compilation of libuafs on IRIX and sunpro by accurately detecting label support. Change-Id: I092eda47c4cfcc2517dc39f5e48b5038c413cb01 Change-Id: I2ff8449b28db645d9cfd27796b5f89e5c328a2b2 Reviewed-on: http://gerrit.openafs.org/2516 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 90b75531add729ecbcc46f2a6fb070993b96bcec Author: Marc Dionne Date: Thu Aug 12 16:33:04 2010 -0400 Linux: avoid oops in memcpy_toiovec With ADAPT_PMTU enabled, kernel_recvmsg can be called to receive errors. The call is made with no iovec supplied (we pass a NULL pointer), but with a size of 256. In the kernel, the memcpy_toiovec function tests for size > 0, and proceeds to check iovec->iov_len, which causes an oops. Fix by setting the size to 0. Change-Id: I3c672c2e67d0aa5af2bd54d0c14aaeae3bb3c530 Reviewed-on: http://gerrit.openafs.org/2546 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 08552ad8a94f7cc5908aabe8385711e09a6418e4 Author: Marc Dionne Date: Wed Aug 11 19:28:53 2010 -0400 Linux: Rework statfs super block operations configure test The configure test to detect if the statfs super block operation needs a dentry argument is based on vfs_statfs, and assumes that its signature matches the one of the operation. In 2.6.36 this is no longer true and the test fails. Rework the test to actually test the operation we're interested in. This change is required for 2.6.36. Change-Id: I5a712fb47e48c1bcc7ea2cfbf6c53c2b27627723 Reviewed-on: http://gerrit.openafs.org/2545 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fb01fbd7cd2d396df8a4605eaad9febc52ef3b61 Author: Marc Dionne Date: Wed Aug 11 18:55:29 2010 -0400 Linux: switch to evict_inode In 2.6.36, the delete_inode and clear_inode inode operations are replaced by evict_inode. Rename our current clear_inode to evict_inode, and add a few things that were previously handled by the generic delete_inode. This is required for 2.6.36. Change-Id: I68d75830b43df710ccce173ab36f3bb39074c59e Reviewed-on: http://gerrit.openafs.org/2544 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eaf3378f537935f6b9843886b43d8b6d38a91a92 Author: Marc Dionne Date: Wed Aug 11 18:20:59 2010 -0400 Linux: adapt to truncate sequence changes As part of changes to the truncate sequence, inode_setattr() no longer exists, and all filesystems have to define the setattr op so we can assume that it is not NULL. Introduce a compat inline function afs_inode_setattr that hides the tests and the different versions from the main code. Note that the existing test for the inode_setattr() return type will fail, but the value is no longer used in that case. This is required for 2.6.36 Change-Id: I2f5e8a0b660b48453d0152b6c4db64e57539f91a Reviewed-on: http://gerrit.openafs.org/2543 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d4018b2673e6532543984838290ffb891b970fea Author: Marc Dionne Date: Wed Aug 11 17:18:32 2010 -0400 Linux: use %pI4 if NIPQUAD is not available The definition of NIPQUAD has been removed from the kernel headers in the mainline kernel. Replace it by using the %pI4 format specifier which takes the IP address as a single argument. There should be no change in the output. This fix is required for 2.6.36. Change-Id: I269e5bd754b7aef49b005081eb6b3af1b2679293 Reviewed-on: http://gerrit.openafs.org/2542 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3121a07fbfd4bf3991a933b80a9ad8f4cda285ae Author: Derrick Brashear Date: Thu Aug 12 00:48:45 2010 -0400 disable pmtu error gathering don't enable kernel pmtu, don't collect errors. a report from Marc Dionne suggests there are still issues here Change-Id: Ib54fa522ba53efe50e8f08b27422ebfc8af7f9e5 Reviewed-on: http://gerrit.openafs.org/2538 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 03f76092bdb6c011e539a125729efe330227f8b2 Author: Jeffrey Altman Date: Thu Aug 12 00:48:44 2010 -0400 Windows: comparisons of nul strings should match When comparing nul strings in cm_strnicmp_utf8 and cm_strnicmp_utf16 the functions should return 0. LICENSE MIT Change-Id: I30c1321f42135a5e0160407467549b13cc92393f Reviewed-on: http://gerrit.openafs.org/2539 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3daf18a3cbadd1db07839708cf45426003a2bca5 Author: Andrew Deason Date: Tue Aug 10 14:16:39 2010 -0500 viced: VNOVOL on deleted volumes When the volserver deletes a volume, the fileserver should respond to future access to that volume with VNOVOL and not VOFFLINE, since the volume doesn't exist anymore. Do this in DAFS via a new state, VOL_STATE_DELETED, and in non-DAFS by just setting specialStatus to VNOVOL. In the future we should also make sure the vp's for deleted volumes get freed after a couple of hours, but not yet. Change-Id: I6dec3e0a5e9e54f6ad09fad9f2355b513cce3bf6 Reviewed-on: http://gerrit.openafs.org/2533 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 72da1d2eb2567f9e5e1b3d5aebc73654785f99a6 Author: Andrew Deason Date: Fri Aug 6 14:32:16 2010 -0500 volser: Ignore duplicate file tags when restoring Currently, if the volserver encounters multiple file tags for a vnode when restoring a volume dump, it will create extra vnodes which are not recorded anywhere, and are leaked when the volume is removed. Instead of doing that, ignore any duplicate file tags that are encountered (which is what happens with other tags), and log a warning. Change-Id: I1ac76b0217096d013db355b899f1a53174d20eb5 Reviewed-on: http://gerrit.openafs.org/2531 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f7d298d367cc5deea00a44601f845f543993ef09 Author: Simon Wilkinson Date: Wed Aug 11 23:14:31 2010 +0100 LINUX: More flock fixes Turns out the we have two almost identical lock routines on Linux, one for POSIX locks, and one for flocks. Fix them both. Also, while we're at it, make the same fixes in the LINUX24 tree. Thanks to Andrew Deason for pointing out the oversight in the original patch (5abe706a7e237d3872db3638d947a14c935370d5) Change-Id: I59f0f1e12af36a97e490df36537ac17e8ed87303 Reviewed-on: http://gerrit.openafs.org/2535 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5a2ae98327520a6936d8bbe6b2a9128dc45a2406 Author: Derrick Brashear Date: Wed Aug 4 09:38:10 2010 -0400 fs discon support alternate uid this is a short-term hack. macos lacks pags, and anywhere without pags won't have tokens when fs discon online is run as root unless the tokens are explicitly set for root... which can be bad mojo. instead, allow a uid to be passed in. Change-Id: I44ebf9468976fa43d449f72d392fbb9e830e44d6 Reviewed-on: http://gerrit.openafs.org/2515 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e6aa0b38e9970ca10e498e03b0149f895edf9e73 Author: Derrick Brashear Date: Mon Aug 2 14:02:37 2010 -0400 macos disconnected vnode holding fix tweak how we hold vcaches to avoid issues with the underlying vnode having an iocount underrun due to races. Change-Id: I96526ed52c11aac1124a8cf66458ba3e25e7efb2 Reviewed-on: http://gerrit.openafs.org/2501 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5abe706a7e237d3872db3638d947a14c935370d5 Author: Simon Wilkinson Date: Wed Aug 11 17:25:36 2010 +0100 LINUX: Use correct type of error in flock code The flock code gets a kernel error code from afs_posix_lock_file() but then passes this error code through afs_convert_code (which sees that it is already negative, and returns EIO). Instead, we should just return afs_posix_lock_file()'s code direct to our caller. Change-Id: I28bbc2dc8535d28a4e9e9f564392fd4cbfa76569 Reviewed-on: http://gerrit.openafs.org/2534 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bc6fe06ae5829676b84028adc2aa088c8e69574f Author: Jeffrey Altman Date: Wed Aug 11 01:10:38 2010 -0400 Windows: cm_Analyze should treat VOFFLINE like VMOVED or VNOVOL Volume package bugs in the file server can result in VOFFLINE being returned to the client instead of VNOVOL or VMOVED. As a result the Unix CM treats VOFFLINE the same as VMOVED and VNOVOL. The Windows client has not. As a result, bugs in the file server can cause the Windows client to lose if the volume has in fact been moved to another server. As part of this change, the volume location list is updated prior to the volume status being applied to the server from which the error was received. LICENSE MIT Change-Id: I01036aa9d1999d0ba6822beb1b73500d365bf0b3 Reviewed-on: http://gerrit.openafs.org/2532 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 219ab91243b8c9c5ffbfa459047968145debee9c Author: Andrew Deason Date: Tue Jul 27 16:22:47 2010 -0500 salvage: update inodes array after CopyAndSalvage CopyAndSalvage makes a copy of the directory to salvage it. So, the new directory will have a new inode. Update the array of directory inodes to reflect this. Without this, we can fail to alter the copied/salvaged directory later on, since we will try to read/write to the wrong inode. Change-Id: I2466981e8ee54c5aecf1a166a37d8146b126de24 Reviewed-on: http://gerrit.openafs.org/2530 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9903f4805e27583a3483db412479fdc604fdd0b6 Author: Andrew Deason Date: Tue Jul 27 17:22:49 2010 -0500 salvage: Remove redundant 'code' declaration 'code' is declared at the top of SalvageVolume; no need to declare it again in a lower block. Change-Id: I9b48830c17e5043e6abcda4dd4dd3cc040031d9a Reviewed-on: http://gerrit.openafs.org/2529 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 56218cab39d522cb6911620bbf34d0236bfd3052 Author: Andrew Deason Date: Wed Jul 28 12:01:01 2010 -0500 salvage: Do not look at not-found root dir If we have not found any root directory, don't even look at 'oldrootdir' or 'rootdir', since they will be uninitialized at this point. Change-Id: Ia1a7037e06a223a7e1fbc48c0bfadd3b7aaa0e4b Reviewed-on: http://gerrit.openafs.org/2528 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1c002a5b5d29532b8c12097ad717c676a3285f28 Author: Andrew Deason Date: Wed Jul 28 12:00:37 2010 -0500 salvage: Zero corrupted header In the salvager, if we read in a corrupt header (either we get a short read or the magic is mismatched), make sure we zero out the contents, so we don't read garbage further on. Change-Id: Ifb4b9fc1b25d5eab470f0950a1d3bb240f75b0d3 Reviewed-on: http://gerrit.openafs.org/2527 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9da5e4700b81be7d78e4fc54bc4dd31d582be349 Author: Andrew Deason Date: Wed Aug 4 21:33:05 2010 -0500 tviced: Fix serialize_state.o objdir At least some makes treat ./serialize_state.c as only in the current dir, ignoring VPATH. So just specify serialize_state.c. Change-Id: I250886cb4bbfb955984b39c5a7d1a1acd5d9e0c4 Reviewed-on: http://gerrit.openafs.org/2524 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cdbf7827ef984be8342b284c7830c40dcef1335f Author: Andrew Deason Date: Wed Aug 4 17:08:37 2010 -0500 Eliminate $< outside of pattern rules The $< variable in makefiles is not portable when used outside of pattern rules. Replace each usage with the actual name of the file we want. Change-Id: Idc9309e7d7bd3b1bd93e8225507b8b53c9433d69 Reviewed-on: http://gerrit.openafs.org/2523 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 16bad29f0301db64c38bc66cb760c04399c0c7bb Author: Andrew Deason Date: Wed Aug 4 14:49:28 2010 -0500 Fix objdir install/dest targets Many 'install' and 'dest' targets were referring to source files without a srcdir prefix. Fix them so we can 'make install' / 'make dest' with objdir. Change-Id: Id76c5e326309baf8ec3f1213ecb2e40b19aea7d4 Reviewed-on: http://gerrit.openafs.org/2522 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 17a57cdafeac2b362e4edc50370962883f7ec052 Author: Andrew Deason Date: Wed Aug 4 14:01:51 2010 -0500 tubik: Fix objdir builds - Make netutils.c include afs/dirpath.h, so we don't have to find the correct include dir for "dirpath.h" - Fix dependencies in tvlserver, tbudb, and tptserver, and refer to sources in srcdir where appropriate Change-Id: Id9c2b3eefaa9d02ccb197a61341776444b958cdc Reviewed-on: http://gerrit.openafs.org/2521 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a5ff380e891db1c9ed0ec3875ce9b34d03976a8e Author: Andrew Deason Date: Wed Aug 4 13:59:35 2010 -0500 Fix afsd.fuse for objdir builds afsd_fuse.o could not find afsd_fuse.c for objdir builds. While we're here, make the afsd_fuse.o rule more closely match the rules close by. Change-Id: I675359134e2672cb36c9eb780edefb498d498bb1 Reviewed-on: http://gerrit.openafs.org/2520 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b832cdc1c7e462ca7c87ea16abdf694bac1bc272 Author: Andrew Deason Date: Wed Aug 4 11:19:35 2010 -0500 rxgen: Error out if cpp exits with error If we call 'cpp' and it returns with an erroneous exit code, exit with an error ourselves. Otherwise we will return success and generate empty results even if the input file is unreadable, for instance, which causes confusing errors later in the build. Change-Id: Ia12dc58eee0937a6bd529dcd6b552e253dbc40c8 Reviewed-on: http://gerrit.openafs.org/2519 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a4267ef14008daad45c1a64edf5649fc6bb333f0 Author: Derrick Brashear Date: Fri Jul 23 11:27:46 2010 -0400 namei decodevolume allow low volume ids the smallest thing which can be encoded is a single character; also allow it to be decoded, such that low numbered volumes are treated as valid. Change-Id: Ia5e694f7f73e1035af741bd23c7f50805910d0c4 Reviewed-on: http://gerrit.openafs.org/2470 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aa24d1392c31dc725a85ffe179adf6eca2fa683f Author: Jeffrey Altman Date: Thu Aug 5 15:07:47 2010 -0400 Windows: add flags field to smb_ioctlProc_t function signature Add a general framework to permit flags to be passed into the smb ioctl interface functions. This patchset does not define any such flags. LICENSE MIT Change-Id: I9a894a186c4ca455116ea79bdd6c3cc0d02a2dc3 Reviewed-on: http://gerrit.openafs.org/2525 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ed428869276d07e8dc886a1ee02893bb9cc09e1f Author: Simon Wilkinson Date: Sat Jul 24 14:21:52 2010 +0100 Unix CM: Remove erroneous comment Despite what the comment says, shutdown_axscache does have a caller, so just remove the comment lest it confuse people. Change-Id: I0491bf4f945c372d7ddbafb7a43390821c95a0c1 Reviewed-on: http://gerrit.openafs.org/2471 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f6a91a28ccd38cdaa917cbd140c567dbd1651322 Author: Jeffrey Altman Date: Thu Aug 5 01:43:24 2010 -0400 Windows: optimize buf_FlushCleanPages If the pages to be flushed are from a readonly or backup volume they can't be dirty. In this case there is no need to stabilize the pages before they are locked and recycled. Stablilization is performed on the cm_scache_t object so do not stabilize and unstablize for each cm_buf_t object. LICENSE MIT Change-Id: I6fa86cf0a33dc9f45d77911909e799c0fc6510cf Reviewed-on: http://gerrit.openafs.org/2518 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f08e953e62148bd2f9200040a8e34ef07b51b35d Author: Andrew Deason Date: Wed Aug 4 22:49:29 2010 -0500 Unix: docbook revision tag requires a date The docbook DTD requires a element to contain a element. So make a blank one even though we don't keep track of a date, so we can pass xmllint. Change-Id: I06e68b756d215ec3ce279561a05b5bc5fc418028 Reviewed-on: http://gerrit.openafs.org/2517 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d0080e261cda46f53b952a0e5133fb94414f17a9 Author: Andrew Deason Date: Tue Aug 3 17:32:11 2010 -0500 Add DAFS docs to the Unix Quick Start guide Modify the sections dealing with creating the 'fs' bnode to also mention how to create the 'dafs' bnode, and add an appendix explaining DAFS and the differences between DAFS and non-DAFS. Change-Id: I026405dbc3838a9a0247b85cbdc508d6be93275d Reviewed-on: http://gerrit.openafs.org/2508 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae1ac72783dee7cfd23538e95a1ad358a17373cc Author: Andrew Deason Date: Tue Aug 3 12:01:07 2010 -0500 HPUX: Add limits.h to sysincludes xdr_mem uses INT_MAX, so we need limits.h in the kernel for HP-UX. Change-Id: I5c75f9d3cb9cfd5da78cf625f042c1dee862dcd7 Reviewed-on: http://gerrit.openafs.org/2506 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8e5d6ce1506cc9e65ad51b1c5f76e0a29616231c Author: Derrick Brashear Date: Wed Aug 4 09:22:20 2010 -0400 fix unlabelled xdr field order on sun457 kernel for now alternate to 2503 (which we will push after branching) Thanks to Andrew Deason for discovering this issue. Change-Id: I3a43bb1eab1a753f099c9d21e440f6660c706e37 Reviewed-on: http://gerrit.openafs.org/2514 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7556326e012c74a21c2459c19cdf8317b5156f2a Author: Derrick Brashear Date: Wed Aug 4 09:04:34 2010 -0400 discon remove dirty vcaches from queue when discarding the discardall loop was not dequeueing vcaches, meaning we would loop. caught by Simon Wilkinson Change-Id: I80256ef5f91d7030e0cb11e78a79f137a217a29a Reviewed-on: http://gerrit.openafs.org/2513 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6d0b97c7ac89219c0b708d1afbd4d7b8c8ec717d Author: Derrick Brashear Date: Wed Aug 4 09:02:54 2010 -0400 reorder vcache references in discondiscardallshadows reset the vcache before we (nominally, it's still under a lock) discard it. remove superfluous shadow clearing. Caught by Simon Wilkinson Change-Id: I55b91fa4f2f92a8b6fd1f8117c2448f7a7d1d98a Reviewed-on: http://gerrit.openafs.org/2512 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85e29294eef44fcc52b0583c70debcae452e829d Author: Derrick Brashear Date: Wed Aug 4 09:00:58 2010 -0400 discon getparentvcache leak fix don't leak an unref'd vcache pointer if we are returning an error (EAGAIN). thanks to Simon Wilkinson for catching this. Change-Id: I40c5aa0fd50e1f2c76b09ba073a7109bca706d8c Reviewed-on: http://gerrit.openafs.org/2511 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9bfae6b76c4e27c77299df149a42aebb406c653e Author: Derrick Brashear Date: Wed Aug 4 08:42:16 2010 -0400 discon needs static_inline macro don't use static inline keywords in common code. Change-Id: I29cbe312e27c8fb75d2d07f720789a4a5b900fa5 Reviewed-on: http://gerrit.openafs.org/2510 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b82ac032a6ac99db18019bfedf4100c9354a140c Author: Derrick Brashear Date: Wed Aug 4 08:41:00 2010 -0400 darwin unused prototype we don't gave our own vn_rele. don't prototype it. Change-Id: I3a2d193c95a2d63c8d80054dd4600f949d1a01d2 Reviewed-on: http://gerrit.openafs.org/2509 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a5bcd61a16a3d6b0b458f4710c0d537cfee7743d Author: Andrew Deason Date: Thu Jul 29 14:47:03 2010 -0500 util: add afs_exec_alt Add the function afs_exec_alt to help programs easily execute an "alternate" version of themselves. For example, for programs that are built with/without DAFS support, or are built for 32-bit/64-bit structures, etc. Change-Id: Ibb2b7105d58476f84bd9f15987f8b7df37314b6b Reviewed-on: http://gerrit.openafs.org/2483 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6b6535279a558d0d25b95e4ab4038e7ac9699797 Author: Andrew Deason Date: Tue Aug 3 15:44:52 2010 -0500 tbudb: Use INSTALL_PROGRAM, not INSTALL -f "$INSTALL -f" is not portable. Use $INSTALL_PROGRAM instead. Change-Id: I5013476cc036350b0b61b6e3c01a86d303aa70b6 Reviewed-on: http://gerrit.openafs.org/2507 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ba7d8d78104d870e9c1d984ac10843918513eef1 Author: Jeffrey Altman Date: Mon Aug 2 23:28:39 2010 -0400 Windows: Reduce complexity of Freelance Callback Logic Over the years the processing of the Freelance callbacks have added functionality that behaves much more like FetchStatus checks to a file server. If the data version of the object has changed, get the new data. Given that is the case, we can remove much of the original refresh logic that is rather race prone. Say goodbye to cm_fakeGettingCallback and cm_fakeDirCallback. LICENSE MIT Change-Id: I249c84201afc16611039b2ba0801a643fcf05f28 Reviewed-on: http://gerrit.openafs.org/2505 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit a03f1960da3a68cd8453960302be0319a7bb45ae Author: Jeffrey Altman Date: Mon Aug 2 16:06:39 2010 -0400 Windows: When processing pioctl paths ensure callbacks are obtained When processing a pioctl path with either smb_ParseIoctlPath or smb_ParseIoctlParent, cm_SyncOp(CM_SCACHESYNC_NEEDCALLBACK|GETSTATUS) must be called on the cm_scache_t object to ensure that it is up to date before we permit cm_Lookup or other operations to be performed on it. Add the cm_SyncOp() call to smb_ParseIoctlPath and smb_ParseIoctlParent to ensure it is done for all pioctl operations. LICENSE MIT Change-Id: I2fe5d5ec2567693155277b40929dedb8155d9ebf Reviewed-on: http://gerrit.openafs.org/2504 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit fccd35961f1f3324df7dbdea03790ee0b525d9f1 Author: Derrick Brashear Date: Mon Aug 2 14:51:39 2010 -0400 fs disconnected remove ifdefs disconnected is always on; remove the ifdefs around it Change-Id: Iaa982f83f7619fc0ad1162a64b68231e02eae916 Reviewed-on: http://gerrit.openafs.org/2502 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit deb96d3986bedc1defc921b88abb88e4aefb55e4 Author: Jeffrey Altman Date: Mon Aug 2 13:30:30 2010 -0400 Windows: docbook revision tag requires a date Even if we can't generate a date, we must include the date tag within the revision tag in order for the docbook dtd to be applied and pass xmllint. Change-Id: Ic58995ecd7b07a1163f0965e22bcd78769d4565e Reviewed-on: http://gerrit.openafs.org/2500 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c5ffaf7a3c179c77398e1d0a007b870a9c45e053 Author: Asanka Herath Date: Sat Jul 31 04:30:10 2010 -0400 Windows: Don't configure client when not installing client The 32-bit tools installer was displaying client configuration wizard pages. Since, the 32-bit tools share configuration with the AFS service, the 32-bit tools installer should not be attempting to change client configuration. Remove said wizard pages from the 32-bit tools installer. Change-Id: Ib52b5741d5d412b1aea1856e0304364ed928b2ba Reviewed-on: http://gerrit.openafs.org/2492 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 60878f4d2a6f5d02f067efead99d371eafe6668b Author: Asanka Herath Date: Sat Jul 31 13:07:44 2010 -0400 Windows: Fix MC options Newer versions of the Message Compiler included with Windows SDKs break when using the -s option. Remove it. Change-Id: I71bcd2d5aa000b11c44b77ce4687bc0f070699b0 Reviewed-on: http://gerrit.openafs.org/2495 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 5e946d5b6672d4dea7dd1c3ee669245b3d2ced92 Author: Andrew Deason Date: Fri Jul 30 15:32:53 2010 -0500 ptserver: Do not use cell for entry name len check Do not use the local cell name when determining if a new entry name is too long. This check assumes that foreign cells will use our local cell name (assumed to be our local Kerberos realm) in a certain way, and prevents creating users that will make those names too long. This is undesirable for several reasons. One is that the local realm name may not be the same as the local cell name (and we may have many local realms). Another is that we cannot reliably predict how foreign cells will construct foreign pt entry names, so preventing entry creation based on that may prevent names that will never cause any problems. This check also assumes that our names will be used as foreign entries in other cells, which may not be the case. So, remove the check based on the local cell name, and remove the pr_realmNameLen variable while we are at it, since this is all it is used for. Thanks to Jeffrey Altman for discussion, and for bringing this up in the first place. Change-Id: Ief4bc94d9ead61a1589797b5dc663a6473c9ed72 Reviewed-on: http://gerrit.openafs.org/2488 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 89afd3c21e816c29f497c10cf76673d009cdd919 Author: Jeffrey Altman Date: Sat Jul 31 00:21:06 2010 -0400 Windows: Do not reference cm_data.rootSCachep directly cm_data.rootSCachep is a global pointer to the cm_scache_t that represents the root.afs volume root directory. Throughout the code this cm_scache_t was being used without ensuring that a callback to the volume is in fact valid. Under most circumstances this would not be a problem. However, it is possible for a request to fail due to the lack of a callback at a critical moment. Add a new function cm_rootScachep() that attempts to ensure that a callback is present (if possible) prior to use the cm_scache_t object. LICENSE MIT Change-Id: I997dc05a2214788d32727c261947206a61cd8d32 Reviewed-on: http://gerrit.openafs.org/2491 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 78f99d4a025d3b369d3ad4939098ea868feb6cfc Author: Jeffrey Altman Date: Sat Jul 31 00:05:24 2010 -0400 Windows: Update root.afs scache dv when Freelance dir bufs are regenerated When the contents of the Freelance root directory changes the fake directory buffers are updated and a fakeDirVersion is incremented. The dataVersion of the cm_scache_t object is supposed to be updated on the next access by performing a fake get callback request. Unfortunately, this did not always occur because of a race. If another Freelance object is updated first, the root directory object would never successfully get a fake callback. This patchset ensures that the generation of the fake directory buffer content and the callback are obtained under the same set of locks thereby removing the race. LICENSE MIT Change-Id: Ic8c77fc3c652cd056f84db55ca6db32499bcb0c9 Reviewed-on: http://gerrit.openafs.org/2490 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 9ec343cf4292e178fa1e4a9757232dc983ea9ba3 Author: Jason Edgecombe Date: Sun Aug 1 21:39:56 2010 -0400 Factor out the common text in vos_addsite, vos_copy, and vos_zap Factor out some common options out of the man pages. LICENSE IPL Change-Id: Ic79e53a2d6464cc62d49987ab58d38c9898f372b Reviewed-on: http://gerrit.openafs.org/2496 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78dcbd11d49bf9ae078639d067832fdf331daaa1 Author: Asanka Herath Date: Sat Jul 31 12:43:47 2010 -0400 Windows: Build preprocessed POD documentation Change-Id: I0b849bf52094a1b6ca0e45db5e2f92ff58b8efba Reviewed-on: http://gerrit.openafs.org/2493 Reviewed-by: Jeffrey Altman Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 39643598a216c2e892cd94ccb441180a4c4f949e Author: Andrew Deason Date: Mon Aug 2 00:44:37 2010 -0500 SOLARIS: let xlator load if amd64/nfssrv is loaded The NFS translator-enabled kernel module refuses to load if misc/nfssrv is not also loaded. We were only checking misc/nfssrv and misc/sparcv9/nfssrv, though, not misc/amd64/nfssrv. Check that, too, as it may be loaded on amd64 machines. Reported by Robert Milkowski. Change-Id: Idbb9c4136b87ffa4c72ca376738001fb6a3ca7d8 Reviewed-on: http://gerrit.openafs.org/2497 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c53513e834ab965daebb5ce433cd6b7dc88dab8e Author: Jeffrey Altman Date: Mon Aug 2 09:49:26 2010 -0400 Windows aklog: remove lstat preprocessor definition lstat is now defined globally in the build system. remove redundant definition. LICENSE MIT Change-Id: I91f90f571ffd2dfe1544ce17b50e5577acc5adbc Reviewed-on: http://gerrit.openafs.org/2499 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 571204f343014d5f84ddbcf4ad63a8ebd469f006 Author: Jeffrey Altman Date: Mon Aug 2 09:48:07 2010 -0400 Windows aklog: include afs/pterror.h pterror.h is required for initialize_PT_error_message LICENSE MIT Change-Id: Ie487c6b03ff6ca4cac30ccac9f2a67fdd89e6aaa Reviewed-on: http://gerrit.openafs.org/2498 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cf0d7fea04923b39ccae0e9083c525b91642f49d Author: Asanka Herath Date: Sat Jul 31 04:00:41 2010 -0400 Skip over 'fragments' directory when scanning for PODs The generate-html script scans the directories to compile a list of POD files. The list of candidates include the 'fragments' directory, which causes an error when the script attempts to open it as a file. Change-Id: If1208561f58f869ccba60f4a263bee5200dad1ed Reviewed-on: http://gerrit.openafs.org/2494 Reviewed-by: Jeffrey Altman Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit ebf36d27c66f18d8fa88ec8f7cacec3ef0c311d7 Author: Andrew Deason Date: Fri Jul 30 12:03:06 2010 -0500 ptserver: Allow longer foreign user names The ptserver was restricting all names to be less than PR_MAXNAMELEN - pr_realmNameLen - 1, so that the local realm and a '@' can be safely appended for foreign user registration. This check is overly restrictive for foreign users, since the local realm will never be appended to the user name (it already has the foreign realm name appended). So, just check for PR_MAXNAMELEN for foreign users. Original issue reported by Gunnar Krull. Change-Id: I34c5d908cc2c1b3abe87966115e6ada74c9a93a9 Reviewed-on: http://gerrit.openafs.org/2485 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 429feee73d977b7329ec258d5c1aa369b8f349c6 Author: Andrew Deason Date: Fri Jul 30 14:45:29 2010 -0500 Document krb.excl Change-Id: I0ac49b6d705190f877f6b09b69a3efe24b5c3d8e Reviewed-on: http://gerrit.openafs.org/2487 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b0a003fd8d3d1d34dbd6248bf1acec141954f080 Author: Ben Kaduk Date: Fri Jul 30 21:20:06 2010 -0400 FBSD: update ifa_ifwithnet usage FreeBSD 8.1 (and 9.0) now require a second parameter to ifa_ifwithnet. Fix the build by using the same macro as OBSD46. Change-Id: I22eac8722bef79b6349b9d879eb42d63450b362e Reported-by: Jan Henrik Sylvester Reviewed-on: http://gerrit.openafs.org/2489 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ea8be82b95972d46882e8e7fce91a1973c966049 Author: Andrew Deason Date: Thu Jul 29 13:02:47 2010 -0500 Document the 'vos offline' -busy and -sleep opts Change-Id: I68d374a206a398467e5980a87b3ca2ad41bf9653 Reviewed-on: http://gerrit.openafs.org/2482 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 11854c734adb7e184484c262d244401be6656eee Author: Andrew Deason Date: Thu Jul 29 12:43:25 2010 -0500 Remove bless-related options from vos manpages 'vos online' and 'vos offline' were documented as taking -bless and -unbless options, respectively. They do not actually take these options, and since adding that functionality, while useful, will require protocol changes, they are likely to take some time to appear. Change-Id: I91800e9637162e24873beac5d41f3ad456f25af8 Reviewed-on: http://gerrit.openafs.org/2481 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 56cf5a9f5f61207b449e9b62e9f926a7dc488575 Author: Andrew Deason Date: Thu Jul 29 10:36:56 2010 -0500 Install DAFS and non-DAFS fssync-debug Install the non-DAFS fssync-debug along with the DAFS dafssync-debug, since fssync-debug uses some structures that are specific to DAFS or non-DAFS. Change-Id: Ib7420857cd32f33fc3cc04f67baa1fcc90abc936 Reviewed-on: http://gerrit.openafs.org/2479 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 134f58cd8ca3d941bcea6e9f56d8fc7d0c91d7e0 Author: Derrick Brashear Date: Thu Jul 29 10:59:35 2010 -0400 macos prefs pane improved error handling NSScanner: nil string argument is a lame thing to see. so let's not. Change-Id: I972ed9ebe5a9f7ef5ae9ecbd0423a61bd5bfb5b7 Reviewed-on: http://gerrit.openafs.org/2478 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3a0efeebf63a721068165b3f55600c8eef9faab2 Author: Andrew Deason Date: Wed Jul 28 17:10:10 2010 -0500 viced: Correct unblessed attach2 errors Don't set the vp to NULL; instead just go to the general error handling code. When a volume is not blessed, we just want it to go offline, not go into an error state. Furthermore, we must free the volume header when nUsers is set to 0, so manually do so when we do not call VRequestSalvage_r. Change-Id: I3ccd61ac219e092a5c9ee52cd563d007bc20a1a1 Reviewed-on: http://gerrit.openafs.org/2476 Reviewed-by: Jeffrey Altman Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ec5f7f0e0284b38b86c32c2dfc842b08aca720ff Author: Andrew Deason Date: Wed Jul 28 17:47:21 2010 -0500 vol-bless: Detach, not put, volumes on completion vol-bless was just calling VPutVolume when it was done blessing or unblessing a volume. Instead call VDetachVolume, so we actually give the volume back to the fileserver when we are done if !nofssync. Change-Id: Idc1e0c32cf5c1c9d2c130fee4b2f1a5f61ab1c3a Reviewed-on: http://gerrit.openafs.org/2477 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit e2bce5f6c6cd8d2da40bd830640d87ebb9c0b6e9 Author: Marc Dionne Date: Mon Jul 12 19:28:24 2010 -0400 gcc 4.5: Sequence point warning fixes With gcc 4.5 the -sequence_point warning triggers some new warnings. Fix some of them by simplifying the arguments to some problematic macros. Change-Id: I6c4e2b09f3f9d07d342b7be0d6d8317673dddf34 Reviewed-on: http://gerrit.openafs.org/2474 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 43f3a074f09d34ce2da9bae2237b3a44cb4cac8b Author: Derrick Brashear Date: Mon Jul 26 16:15:46 2010 -0400 unix blacklistonce should default to fail if no fid return fail, rather than success, if no fid and thus no list of servers to resort, in BlackListOnce. will need a later change for vlservers reported by jhutz@cmu.edu Change-Id: I782781ed87a6de718a4cc3dbe2f948ef325af27c Reviewed-on: http://gerrit.openafs.org/2473 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 91eec4d85016b009a9661e98651dfbaa32618d3d Author: Andrew Deason Date: Thu Jul 22 13:43:17 2010 -0500 salvage: Zero root/readme vnodes before writing Previously we were writing out the root and readme vnodes with uninitialized 'lock' structures, when we create a new root dir for attaching orphans. Just use calloc so we ensure that everything is zeroed before writing it out. Change-Id: I3c7712254aaef8731be95ea63530af05438d96a6 Reviewed-on: http://gerrit.openafs.org/2469 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1ad26bc193f6b7693888054e4ddb96cf5fd260ee Author: Andrew Deason Date: Thu Jul 22 12:21:14 2010 -0500 autoconf: Force absolute INSTALL Force using an absolute path for install-sh. Autoconf normally prefers using a relative path, which confuses (at least) part of the libafs build system. Change-Id: I6962e61bb866362f674708e611ff22eb190a771a Reviewed-on: http://gerrit.openafs.org/2461 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit be469a890416eb139424890567037a17954a654c Author: Andrew Deason Date: Thu Jul 22 11:24:10 2010 -0500 Remove tsalvaged warning inhibition tsalvaged has no documented necessary warning inhibitions, and it appears to cause no warnings. So, remove the warning inhibition. Change-Id: Iac2f8e8657034b01ce705dddb5dab3f33c913f31 Reviewed-on: http://gerrit.openafs.org/2467 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a68abf7a4eeb0667fa067a73e4560b8666e7172a Author: Andrew Deason Date: Thu Jul 22 11:34:24 2010 -0500 AFS_INT64_FMT takes a afs_int64, not int64_t Cast to afs_int64, as int64_t can reduce to a different type than AFS_INT64_FMT's. Change-Id: I77ffe8813fbef284e6e91db25804d95d73898b54 Reviewed-on: http://gerrit.openafs.org/2466 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d1fd051b6a5c6e3bf04663d88bc0366d7e7e854 Author: Andrew Deason Date: Wed Jul 21 17:30:39 2010 -0500 Log lex/flex detection errors in the config log When we detect if lex is flex, we run 'lex --version', which may complain to stderr if lex is not flex. Instead of printing such errors to the person running 'configure', redirect stderr to config.log along with stdout. Change-Id: I812805245a2638eda5885a41a6d70ffeff608c58 Reviewed-on: http://gerrit.openafs.org/2462 Tested-by: Andrew Deason Reviewed-by: Russ Allbery commit d64948ac30d3aefda098727a2158406144877654 Author: Derrick Brashear Date: Wed Jul 21 12:06:39 2010 -0400 vlserver - Don't overflow buffer with backup pattern based on a report from Hans-Werner Paulsen avoid adding regex anchors to a buffer which is already full when copying it to a like sized buffer. instead, leave extra space. Change-Id: I486c51779da285888fe38ed2aa5f30dd2d008a9a Reviewed-on: http://gerrit.openafs.org/2456 Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e80bc73142188af82611f2174413091191be7818 Author: Andrew Deason Date: Wed Jul 21 12:01:57 2010 -0500 Remove an outdated inode comment block This comment is no longer true, and its existence now is just confusing. Change-Id: I3954bd82f11c5f48e3e9491a885087067b3d9d34 Reviewed-on: http://gerrit.openafs.org/2458 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e75eb34b9a38127b2f166a702e5a641847448823 Author: Andrew Deason Date: Wed Jul 21 12:17:33 2010 -0500 SOLARIS: do not ignore libafs build failures Change-Id: Ic5bc6cefd616736d81807bf6ac6d0226fcdb3df2 Reviewed-on: http://gerrit.openafs.org/2459 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 41d321e900ccb99120a49980c24d44f206075f17 Author: Russ Allbery Date: Wed Jul 21 10:36:21 2010 -0700 Don't cd around invocations of install-man install-man is a config.status-generated script, so Autoconf will substitute in the path to our install-sh script, but Autoconf prefers relative paths that are only valid in the directory in which install-man is generated. We therefore must avoid changing directories before calling install-man. Instead of cd, use relative paths including the directory and adjust the installation path accordingly. Change-Id: I8666257b9d74fa80cf7f136bd0ee6ff895897066 Reviewed-on: http://gerrit.openafs.org/2460 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f0a52e168c0f3495c7b168a63c149116219e3c1b Author: Andrew Deason Date: Wed Jul 21 11:34:39 2010 -0500 libafs: fix IOPEN for amd64 solaris Solaris afs_syscall_iopen was returning the fd in r_val2 for 64-bit architectures (for 5.7 and beyond). If we are little-endian, though, we want the return value in r_val1; otherwise we just always return fd 0. So, put the fd in r_val1 if we are little-endian. Change-Id: I8553c338625e9c50f846f4676b53ea8f054b7a73 Reviewed-on: http://gerrit.openafs.org/2457 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b3c16324edf9e26ef4eea63d214d9d18ecaba30b Author: Andrew Deason Date: Tue Jul 20 12:46:00 2010 -0500 ubik: Make ugen_ClientInit honor noAuthFlag ugen_ClientInit was still trying to use tokens to make an authenticated connection, even if noAuthFlag was set. Make it so we do not attempt authenticated connections with noAuthFlag, and suppress the "Could not get afs tokens" message if noAuthFlag was set. Change-Id: I1a0afbb8507307f09a3555e6a7ce0c197ddcc6ef Reviewed-on: http://gerrit.openafs.org/2454 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e46f10a0a0a930f318833a8a86b10c19744160c1 Author: Andrew Deason Date: Tue Jul 20 12:32:10 2010 -0500 bos: Do not assume DAFS just if DAFS bnode exists For salvaging purposes, we were assuming that if a DAFS bnode existed, we should perform a DAFS salvage. Since it is possible to have a disabled DAFS bnode alongside an enabled non-DAFS fs bnode, we should perform a regular non-DAFS salvage if the DAFS bnode is disabled. Do that. Change-Id: If4e6fa3b733e2e9684cd9942be56368d60bf6dee Reviewed-on: http://gerrit.openafs.org/2453 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit b0f16e6a564f305bb7751e946d85a4e70fa50625 Author: Andrew Deason Date: Tue Jul 20 12:06:57 2010 -0500 bozo: Clean up bnode parms for each bnode bosserver was remembering the parms for past bnodes, and just overwriting parms for new bnodes. This is a problem if we have a 'dafs' bnode followed by an 'fs' bnode, since the 'fs' bnode will get the 'dasalvager' parm, and bosserver will think it is its scanner program. So instead keep track of a separate array of the parms that we actually pass to bnode_Create, so we only pass parms that we saw for this specific bnode. Change-Id: Ic609e2156cfd8ecf5b83b3815c5dff235010aa00 Reviewed-on: http://gerrit.openafs.org/2452 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 901423b1e566a91b0c10ecb1da1a9886e0877adf Author: Jeffrey Altman Date: Tue Jul 20 00:05:18 2010 -0400 Windows: Build Demand Attach File Service This patchset permits the building of demand attach file server and volume server. Change-Id: I7ee81c69924cde5e8aec2067d73b51cba7e4423e Reviewed-on: http://gerrit.openafs.org/2450 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 939382c5c1622750665a9f543168bd3b8044583f Author: Derrick Brashear Date: Mon Jul 19 14:17:21 2010 -0400 vol AttachByName should mimic other volpkg errors if later callers will deem a volume offline, note it at attach time. additionally, log the cause. Change-Id: I4870e8f3bfd8d7e69e448d3a445be81435407f0f Reviewed-on: http://gerrit.openafs.org/2448 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eb6914dbb30b211653d6e66f23c31e81d410c9ae Author: Derrick Brashear Date: Mon Jul 19 16:56:58 2010 -0400 ShakeLooseVCaches needs to avoid CVInit vcaches the code refactoring missed this case. sadly, it means we can panic under heavy vcache contention. FIXES 127645 Change-Id: I41929df066b8e3d447ba72e77be6777a306b8bf8 Reviewed-on: http://gerrit.openafs.org/2449 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c9b4bb8279f62bfd0888a8d7d081ba53ace3c4c Author: Derrick Brashear Date: Fri Jul 16 13:48:05 2010 -0400 document dasalvager split dasalvager and salvager documentation. refer both ways between docs. Change-Id: I33480cae671c3f50d47a5a4f8407a07f268164a1 Reviewed-on: http://gerrit.openafs.org/2442 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6f29ed951fca8f843e0a607fae97dd107f44d21c Author: Derrick Brashear Date: Fri Jul 16 13:39:22 2010 -0400 document davolserver split davolserver and volserver documentation. refer both ways between docs. Change-Id: Iac70ac8e1fb8bfcb7ebfdbed8e9d7870a2e69fee Reviewed-on: http://gerrit.openafs.org/2441 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 214f8ea022ad57d9f99346f4d24ed3c7409d8054 Author: Derrick Brashear Date: Sun Jul 18 11:45:06 2010 -0400 dafileserver synopsis missed this before, needed for dafs man page Change-Id: Ie9a309995638ea315198ea204cbc16e2cdc3fbe7 Reviewed-on: http://gerrit.openafs.org/2447 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c15a8c65ad232349b202fcf67a4f5037aaec02c8 Author: Derrick Brashear Date: Fri Jul 16 13:21:57 2010 -0400 document dafileserver split dafileserver and fileserver documentation. remove dafs-only switches from fileserver doc. refer both ways between docs. Change-Id: Ibcac8ed3f294c18436978f3cd4e52de305130198 Reviewed-on: http://gerrit.openafs.org/2425 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5142922d6ff019fc30d78c4a5eab29fa5fc1db30 Author: Andrew Deason Date: Tue Jul 6 12:42:40 2010 -0500 vos status: report human-readable last*Time Make 'vos status' print the lastReceiveTime and lastSendTime in a human-readable format, instead of just printing the number of seconds since the epoch as an integer. As suggested by Jeffrey Altman. Change-Id: I1348a45078e49ff631cb46323767f1c384a72084 Reviewed-on: http://gerrit.openafs.org/2338 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 48758397aecb98672783d8d5960e638d76e5e19c Author: Andrew Deason Date: Tue Jul 6 12:38:21 2010 -0500 vos status: add lastActiveTime field Add a field in the 'vos status' output to report the last time a transaction was touched by a volser RPC. Change-Id: Ibfe11e16fc3d7f00134d840ec3ab9fb9263fbea1 Reviewed-on: http://gerrit.openafs.org/2337 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 36af430c29bdbfc1b4b5c1ad7568cbffab04899f Author: Andrew Deason Date: Tue Jul 6 12:36:27 2010 -0500 vos status: actually show created time The 'created' field in 'vos status' output was being reported as something else. Make 'vos status' actually report the time the transaction was created in that field. Change-Id: Ib890256f4b9f67cf0a37910dc3b3585eafdba4fc Reviewed-on: http://gerrit.openafs.org/2336 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dd3e0d0371608b0348435e94cc3c6c8f20d92b83 Author: Simon Wilkinson Date: Sat Jul 17 18:23:30 2010 +0100 dir: Add printf format checks to log salvage.c uses the Log() function defined by vol/common.c. At the moment, this isn't defined in a way that we can easily grab its prototype, so the code has an extern definition at the beginning. For now, just add format checks to this definition. Fix all of the fallout from this - we were casting to intptr, and printing with %x - use AFS_PTR_FMT as nature intended. Change-Id: I2110ebddbe207c307fcad00ab89e5818824a644d Reviewed-on: http://gerrit.openafs.org/2446 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8b5bf6ed9eb8404f8b9576c440d82a7691bcb77a Author: Simon Wilkinson Date: Sat Jul 17 18:06:39 2010 +0100 budb: Add printf format checks to logging fns Add format checking to the Log, LogError and LogDebug functions. Fix the resulting type errors. One of these in particular is a signficant bug, where we would try to print a hash table pointer as a string. Change-Id: I02d7bcd7ce63583d24dda4da40288af51a516583 Reviewed-on: http://gerrit.openafs.org/2445 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 52c91be7ca3c834c470fc739696dffe5fd01c0fe Author: Simon Wilkinson Date: Fri Jul 16 23:20:27 2010 +0100 vol: Fix logging functions Fix the Log, Abort and Quit functions used by the vol package so that they are all defined in a common header file, rather than prototyped in each file which uses them. Use the appropriate macros to flag those functions which never return, and mark them all as taking printf style input. Fix all of the callers which had mismatched format strings and arguments. Change-Id: I78194f623360e13f055f8f37b3558c08a70acd1f Reviewed-on: http://gerrit.openafs.org/2444 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a495e0ff6b7f3ee07b77363fa513d24024199f38 Author: Simon Wilkinson Date: Fri Jul 16 21:58:33 2010 +0100 Linux: Load exportfs first The changes to use the exportfs interface to access cache files require that the exportfs module is loaded before our module. In 'normal' operation depmod, and modprobe, would take care of this for us, however our legacy installation format where we ship the kernel module outside of /lib/modules stops modprobe from working, and our init script uses insmod. So, explicitly load exportfs first. Note: I'm aware of just how much this sucks, and the fact that we really should just tidy up all of the packaging and init scripts around our kernel module - but this close to 1.6 branch is probably not the time for those kinds of changes. Change-Id: Icdc11482f4eb05419a806a2cd55852eaa5999638 Reviewed-on: http://gerrit.openafs.org/2443 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ce109a8538e16090ee7960991ed1260aac54137a Author: Russ Allbery Date: Thu Jul 15 10:18:03 2010 -0700 Rename configure.in to configure.ac Rename configure.in and configure-libafs.in to use the *.ac extension instead, which is preferred by current Autoconf versions for input files to Autoconf. *.in can then be more consistently used for files that are input into config.status. Change-Id: I4d352560200e4dbb1a2dda3d5ab7c7c9a38b565f Reviewed-on: http://gerrit.openafs.org/2437 Reviewed-by: Derrick Brashear Tested-by: Russ Allbery commit a792acdadc8fe6e7354be4c23e60c795b3b4f109 Author: Russ Allbery Date: Thu Jul 15 17:21:26 2010 -0700 Add include method for POD documentation Add a preprocessor for POD documentation that handles a custom =include directive. Demonstrate how to use the preprocessor by factoring out all the standard PTS options into a separate POD fragment and including that fragment in all the PTS commands that take the standard options instead of including that documentation in each separate file. Change-Id: If5255efc6d3fc670b38a9898b3d7d3c60af04fcf Reviewed-on: http://gerrit.openafs.org/2440 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3e2c3c9a56fbffd0dc63183dcb053f942b6a2bf6 Author: Russ Allbery Date: Thu Jul 15 17:18:12 2010 -0700 Fix unterminated B<> sequence in bos addhost man page Change-Id: Ied06fbf8c0a9cc064b257daf6272cd5a5bd2e816 Reviewed-on: http://gerrit.openafs.org/2439 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b4411d37b43b0a934028af39fe8594bbd82e1733 Author: Russ Allbery Date: Thu Jul 15 16:29:27 2010 -0700 Flesh out the configuration documentation Remove obsolete configure options and document all remaining options other than some provided by Autoconf and some that are currently not very interesting. Document that, on modern Linux systems, configure can find the kernel build system and headers by itself and doesn't need the flag. Include some more information in README about changing the default installation paths, and mention that the da* versions of the file server and volserver also aren't stripped. Remove the generic GNU installation instructions, which aren't useful for OpenAFS. Change-Id: I56d0003ff0173749e9a5e04f1d0ed4d004787dfd Reviewed-on: http://gerrit.openafs.org/2438 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ce0ba0e33581cb5f89902d342f56ceef09f1b78a Author: Russ Allbery Date: Wed Jul 14 17:32:35 2010 -0700 Add new demand-attach binaries to .gitignore Change-Id: I822153d890e736c2422f6bc0c0b29bb7c4240f9b Reviewed-on: http://gerrit.openafs.org/2434 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 674ec768828994b90dc14bf8487e04de5bdf7295 Author: Russ Allbery Date: Wed Jul 14 17:30:11 2010 -0700 Fix .version generation for make libafs_tree The first argument to the git-version script should be the root directory of the tree, not the .version file in that directory. Change-Id: I145d360dc79132fc1474e94893c999b35774d874 Reviewed-on: http://gerrit.openafs.org/2433 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 01afbb03cc1b853d0909101e5145d0333669c344 Author: Russ Allbery Date: Wed Jul 14 17:29:34 2010 -0700 Move build support files into build-tools Now that we have a build-tools directory, move the various support files used by Autoconf and Automake into it as well to reduce clutter at the top level. Change-Id: Ieae317524d5354e3a6168507c569378f7913b05f Reviewed-on: http://gerrit.openafs.org/2432 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aeba16157ef8127aa0f0866d699972ef7efe7a0c Author: Marc Dionne Date: Wed Jul 14 22:43:01 2010 -0400 afspag version of rx_knet.o in order to correctly generate KBUILD_MODNAME, each object file needs to be built only once. in this case it matters because the pr_debug macro, called as a result of including errqueue.h, needs it and things which depend on it, and when it's built into 2 .kos, the wrong thing happens. Change-Id: I85be7a3322fd179ef75fe14a90c9e7592e542ed1 Reviewed-on: http://gerrit.openafs.org/2435 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ed71f147c709c96c1edd77a06b019a40896967be Author: Russ Allbery Date: Wed Jul 14 12:46:04 2010 -0700 Debian: Install the demand-attach versions of the binaries This will need more comprehensive packaging work later, but in the meantime, install the binaries so that make dpkg will complete successfully. Change-Id: Ic82feb92c05a3638365593c4e321ef5e45916ee2 Reviewed-on: http://gerrit.openafs.org/2429 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 624e827f8fe31dfd22230a2689496328224d6bf1 Author: Russ Allbery Date: Wed Jul 14 12:33:40 2010 -0700 Use the full version number for Debian packages Debian packaging can deal with the full version number that we generate using git-version, so base the version we put into src/packaging/Debian/changelog on that version instead of the LINUX_PKGVER that we use for other packaging. Change-Id: Ibf50854748b2b588c2f971d6bdadd4f66f648c5b Reviewed-on: http://gerrit.openafs.org/2428 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 03080af8cee0e2d74c3dadf7a07e3b42f658e263 Author: Russ Allbery Date: Wed Jul 14 12:27:30 2010 -0700 make dpkg should only build binary packages The source package we would get by running dpkg-buildpackage in the source tree without further preparation is basically useless, since it's a native source package for a non-native package and will contain any random dirty cruft in the current source tree. Since the purpose of make dpkg is to provide quick Debian packages for testing purposes, only build the *.deb files and don't bother to build the source package. Change-Id: Ia2643c7e8936b15e3447df589ed0236438b8341e Reviewed-on: http://gerrit.openafs.org/2427 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4323e2ea3307baa6f4c21ae359713cabae0216b4 Author: Russ Allbery Date: Wed Jul 14 12:25:55 2010 -0700 Update Debian packaging to 1.5.75-2 Fixes the duplicate run of make install during the package build process and updates the changelog to the current Debian packages. Change-Id: I20fa4cc24e17c3944de2b08e265e277ff5d5564f Reviewed-on: http://gerrit.openafs.org/2426 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a658736af649bd52a7710cbb428a804588b2fda5 Author: Michael Meffie Date: Wed Jul 7 14:25:46 2010 -0400 man: document bos addhost -clone Add the missing -clone option to the bos addhost man page. Change-Id: I0ead9acfd25d573b907f2617845c25c8c11df53c Reviewed-on: http://gerrit.openafs.org/2349 Tested-by: Russ Allbery Reviewed-by: Russ Allbery commit a1351d48410383090befd63b34407caf55b8f654 Author: Russ Allbery Date: Wed Jul 14 10:02:08 2010 -0700 Fix ktime test on 64-bit systems 0xffffffff is a bad representation for -1 when the size of the data type may vary. Rather than forcing everything to 32 bits and losing later on platforms with 64-bit time_t, change the table to use time_t and try to add a cast that will do the right thing. Change-Id: Id532c9b7a1fc215dc9fd532592fecb2ea45597a0 Reviewed-on: http://gerrit.openafs.org/2420 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1d8bb99db9ae66554760a5927268631916be5adf Author: Andrew Deason Date: Thu Jul 8 15:59:58 2010 -0500 RX: ignore all local 127/8 IFF_LOOPBACK interfaces Currently RX lists all non-127.0.0.1 interfaces in the interface list, even those that are specified as IFF_LOOPBACK, to accomodate certain special cases where IFF_LOOPBACK interfaces should be advertised. However, this makes us advertise e.g. a 127.0.0.2 lo interface. So instead, skip all interfaces that are both in 127/8 and claim they are IFF_LOOPBACK, as this will skip a stray 127.0.0.2, but should not confuse the special cases. Change-Id: I60a4ed5330252078e2f58894195f9b68ec70dcfa Reviewed-on: http://gerrit.openafs.org/2376 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4b7d224d17e5d11b4ea50a8dece763aaedf21d17 Author: Andrew Deason Date: Thu Jul 8 10:56:28 2010 -0500 Treat all 127.0/16 addresses as loopback Many places treat loopback addresses specially; they are skipped over when traversing local interface lists, and they are sometimes replaced with the public IP of the local hostname when interpreting user arguments. However, we only treated 127.0.0.1 as 'loopback'. Many systems can have more than one loopback interface, such as having an interface with the address 127.0.0.2. So, to catch these, treat everything in 127.0/16 as a loopback address or otherwise 'invalid' address. We still do not treat the rest of 127/8 like this, to still allow some 127.* addresses to not be treated as loopback if someone really wants to. Change-Id: I64724cc1ee366e5ef80a8d6e3008e30a7077a4b2 Reviewed-on: http://gerrit.openafs.org/2367 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ca352e0f922e28f3d66a1d2e7d165e4dc846e5b8 Author: Russ Allbery Date: Wed Jul 14 09:28:47 2010 -0700 Rewrite FUSE macro to skip FUSE if not found unless --enabled If no configure flags are given, build the FUSE afsd iff FUSE is found. If --enable-fuse-client is explicitly given, always try to build the FUSE client and abort if FUSE libraries could not be found. Change-Id: Icc0d5bbb03239470ad856d87bca600304f030591 Reviewed-on: http://gerrit.openafs.org/2419 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 260ae1b845a82501f957f3fb40f63b0e0f6d5e93 Author: Marc Dionne Date: Wed Jul 14 09:52:03 2010 -0400 Linux: use an int pointer for the size argument to getsockopt getsockopt expects an int pointer as the size parameter, both in the kernel version and our replacement compat inline function, which causes warnings because we give it a size_t pointer. Use an int variable instead. Change-Id: Ide77ac01610c2f32f87d833c0d130c79007a1a33 Reviewed-on: http://gerrit.openafs.org/2417 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8b64dba013d5aa899d5ce29370bf1a52fb3fca9 Author: Jeffrey Hutzelman Date: Wed Jul 14 01:20:22 2010 -0400 Don't overflow a buffer on the server's stack at startup The servers like to log the command line it was invoked with. It does this by concatenating its arguments, separated by spaces, into a 150-character buffer on the stack of main(). That's just wrong. Use a dynamically-allocated buffer instead. Change-Id: Ibe398e5f449eec176f11f301090a1b68ef13e94b Reviewed-on: http://gerrit.openafs.org/2275 Tested-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 8802b78040b37bad652b448dbc40af7745c16400 Author: Marc Dionne Date: Wed Jul 14 09:29:49 2010 -0400 rx_user.c: Remove unused variable There's an unused variable in the pmtu code in rx_user.c. Remove the "offender". Change-Id: I869b317d7e31b0f70b71f3e9ea2a0e0209709fcb Reviewed-on: http://gerrit.openafs.org/2415 Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e503fc8b4ab1a37c447f78adcde92b6d84dd8658 Author: Derrick Brashear Date: Wed Jul 14 02:00:32 2010 -0400 linux rx pmtu fixes failed to get committed in earlier round of pmtu revamping. oops. Change-Id: Ie4b0e2e3c343b62abf9871fd41018d25b09d30d4 Reviewed-on: http://gerrit.openafs.org/2414 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 37994e573f14fb4cb1a1bbe74543fa297a4b2226 Author: Derrick Brashear Date: Wed Jul 14 00:44:11 2010 -0400 simple fuse enable change just turn on fuse by default. don't move anything Change-Id: I533aeda117159ed4bf37c550906b580125f7f729 Reviewed-on: http://gerrit.openafs.org/2413 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eae0fe48b9eb32412d5b5872a9a57aa0205057fb Author: Andrew Deason Date: Fri Jun 25 17:02:54 2010 -0500 Add -unsafe-nosalvage fileserver option Provide a runtime flag to the DAFS fileserver to allow for fast-restart-like behavior for DAFS. Call the flag -unsafe-nosalvage, and document it, warning against its use. Change-Id: I342c58745b7e2e1d1a2066b4fb08941b02c660f9 Reviewed-on: http://gerrit.openafs.org/2277 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c3fc948e34ad6c44df88e77e5a00e7d3119f627e Author: Simon Wilkinson Date: Tue Jul 13 21:53:22 2010 +0100 Check for crypt in external library Check to see if we need to explicitly include a library in order to get the crypt() function Change-Id: I9bd1d70e420d4d1656bd86cd3215525102fa6259 Reviewed-on: http://gerrit.openafs.org/2404 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit c6f7bb80ee01f477743a3496507e082fb5760884 Author: Russ Allbery Date: Tue Jul 13 15:39:29 2010 -0700 Update Debian packaging to 1.5.75-1 This update now builds shared library packages for the libafsauthent and libafsrpc shared libraries. It should also fix problems with make dpkg due to debian/changelog being deleted on make distclean. Change-Id: I14ce0633edc1f0cc9e081eb7383b2f1e7bfc729f Reviewed-on: http://gerrit.openafs.org/2405 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95f51b8670b08526c6a3395ffc0ec169932f2cc7 Author: Derrick Brashear Date: Tue Jul 13 15:14:00 2010 -0400 enable pmtu in configure by default if we can get a socket error to let us get pmtu discovery info, use it. Change-Id: I7756c1a00e6cb018146a5b0545bed828446e5483 Reviewed-on: http://gerrit.openafs.org/2400 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3610ba191fd058b485db62ed5a3eb64f882a850f Author: Derrick Brashear Date: Tue Jul 13 16:47:39 2010 -0400 demand attach build always always build demand attach. includes doubtless-broken windows support. installs dafileserver, dasalvager, davolserver. salvageserver keeps its (unique) name. Change-Id: Ia272dd2b0f72789b9e0f2a7712f9c206bb922095 Reviewed-on: http://gerrit.openafs.org/2403 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aa97bf5dd4c07be452e2473ffe0adbe680f73bd7 Author: Derrick Brashear Date: Tue Jul 13 23:51:52 2010 -0400 afs sunpro not always c99 old enough sunpro c won't be c99, and doesn't define a macro when it is c99. since there's no way to tell, be safe. Change-Id: Ib60ead7b702fe3ab203de83456d0f126afecc1ec Reviewed-on: http://gerrit.openafs.org/2411 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f5b6ce170757066ee5387d936efd51c11e18b2cf Author: Derrick Brashear Date: Tue Jul 13 23:36:30 2010 -0400 xdr sunpro not always c99 old enough sunpro c won't be c99, and doesn't define a macro when it is c99. since there's no way to tell, be safe. Change-Id: I1709827872b03c5365d9bb26b0ce9d86f038d882 Reviewed-on: http://gerrit.openafs.org/2410 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad1b79547be5a2ae37619e8b583838e6744ff664 Author: Russ Allbery Date: Tue Jul 13 15:57:25 2010 -0700 make dpkg should not depend on dest It's pointless to have make dpkg build the tree before running the Debian build rules, since the Debian build rules are just going to build the tree again. Change-Id: I2481b20a5ca23f8cb067ba609d4d3acd58738cc4 Reviewed-on: http://gerrit.openafs.org/2406 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b666166b6d81b5a8079030e66d527bd708afeede Author: Derrick Brashear Date: Tue Jul 13 14:31:41 2010 -0400 simple is-lex-flex autoconf test if we're flex, we may need to be lex-compatible. engage it if we're flex Change-Id: If9a39ca0bce3f4a68b742d1e8f0c679d3f79896e Change-Id: I7f245d579bcc46fdd0aa7202bbd45f3f9f647ebc Reviewed-on: http://gerrit.openafs.org/2399 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a0113e0f1272b8f2c57fa339dcaef0bd4770143f Author: Russ Allbery Date: Tue Jul 13 13:42:01 2010 -0700 Link libafsauthent with -lresolv if required libafsauthent includes auth/cellconfig.c, which uses res_search, so it requires -lresolv even if it isn't needed for gethostbyname. Add LIB_AFSDB to the link line for libafsauthent. Change-Id: Id83ceb8b261b8c7fb176e24cc138276282608513 Reviewed-on: http://gerrit.openafs.org/2408 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 57d727da233252477c16a34cf628f6764534b8bc Author: Russ Allbery Date: Tue Jul 13 13:42:01 2010 -0700 Link libafsauthent with -lresolv if required libafsauthent includes auth/cellconfig.c, which uses res_search, so it requires -lresolv even if it isn't needed for gethostbyname. Add LIB_AFSDB to the link line for libafsauthent. Change-Id: I4dafdf83db9a00e4e30bff7c59357c13bf7af961 Reviewed-on: http://gerrit.openafs.org/2402 Tested-by: Derrick Brashear Tested-by: Jason Edgecombe Reviewed-by: Derrick Brashear commit d815833f9db0f91511390251932cfe0a83189a23 Author: Derrick Brashear Date: Tue Jul 13 15:47:41 2010 -0400 disconnected fix prototype warning supporting disconnected in ukernel uncovered this warning from lack of a prototype Change-Id: I81d287a8e4466270906fe67f8a1f2f6406fec430 Reviewed-on: http://gerrit.openafs.org/2401 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 52fe3b27489f113c0f7488c5b78fd95a18d44831 Author: Derrick Brashear Date: Tue Jul 13 14:29:38 2010 -0400 64bit macos new config.guess support new config.sub/config.guess call 64 bit macos something new. update our handling so we deal. Change-Id: Ieadd71b66e879ff58bf2c7f77173284c570e4252 Reviewed-on: http://gerrit.openafs.org/2398 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d29643b0553011cbe60dd127fd31c1847fe02ddb Author: Derrick Brashear Date: Tue Jul 13 13:06:02 2010 -0400 unix disconnected mode always per 1.6 release plan, enable disconnected always. eject ifdefs (and a stray printf that was hidden in one) Change-Id: I6a68cb8506878c28502e1742a48858f2e84958f5 Reviewed-on: http://gerrit.openafs.org/2397 Tested-by: Jason Edgecombe Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 27d415d2b82c7ddceb3f9ec779a65b4e2c5a8141 Author: Derrick Brashear Date: Tue Jul 13 12:41:15 2010 -0400 linux cache bypass by default can't eject the ifdef yet as this is not fully portable now. however, just enable it always. Change-Id: Ia7a49a10377f308740ebd42027ac9748b073016e Reviewed-on: http://gerrit.openafs.org/2396 Tested-by: Jason Edgecombe Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 191dbb439d4b54d485a50c2670daaaacab5b2369 Author: Jeffrey Altman Date: Mon Jul 12 14:42:12 2010 -0400 DAFS: variable declarations in C must be a top of block Two instances of variable declarations not being present at the top of a code block in src/vol/volume.c when building with AFS_DEMAND_ATTACH_FS. Fix them. Change-Id: Ic6b9c5a6bbbd8355a144fea38a6ca1dd2a2c747d Reviewed-on: http://gerrit.openafs.org/2388 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2cab6a75207d67e2fbbbf4418f46bf46277e3825 Author: Jeffrey Altman Date: Mon Jul 12 23:35:05 2010 -0400 Windows: Generate a valid block using mkvers.c The tag requires not only a but a . Change-Id: I3c5b7691d18381b1bf71bbd3d726bd284bf90919 Reviewed-on: http://gerrit.openafs.org/2390 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2b85b8c31d96b0ac558acb1bf95fb7b21c66cb3c Author: Jeffrey Altman Date: Mon Jul 12 23:36:56 2010 -0400 Windows: Permit docbook validation using xmllint Add a "check" rule to each of the docbook directories that uses xmllint.exe (from Cygwin) to validate the docbook source against the DTD. Validation failures will halt the build. Change-Id: Ifcfcab11d5077381bfe7fa5e3767070a8d55cb21 Reviewed-on: http://gerrit.openafs.org/2391 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d4440319c3f954432056044fb55b2630594a46b7 Author: Jeffrey Altman Date: Mon Jul 12 23:40:01 2010 -0400 Commit DTD validation errors in the Windows Release Notes Correct errors detected using xmllint Change-Id: I75c936084f116addbb7918856fe958b596e91b03 Reviewed-on: http://gerrit.openafs.org/2393 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6c78ce796262d62ad1641f5b28ea1bdbe78222cf Author: Jeffrey Altman Date: Mon Jul 12 23:40:52 2010 -0400 Correct DTD validation errors in the UserGuide Correct errors detected using xmllint Change-Id: Idd9e91ef463679cb58bdb622fd600e4020224e81 Reviewed-on: http://gerrit.openafs.org/2394 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fb285880dad219a9992bd9bc29fd5bbb0ee34c8c Author: Jeffrey Altman Date: Mon Jul 12 23:38:56 2010 -0400 Correct DTD validation errors in the AdminGuide Correct DTD validation errors detected using xmllint. Change-Id: Ia255ac319a81966e63b702dd2b672ff3d6d8958a Reviewed-on: http://gerrit.openafs.org/2392 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 73716de680b336df1ca51fe60ce9526d9f43f2e7 Author: Simon Wilkinson Date: Mon Jul 12 12:04:20 2010 +0100 Linux: Use inode lock compat function We've now got a compatibilty function for locking and unlocking an inode. Use that in osi_file, rather than a local set of #ifdefs Change-Id: Ie64f0b758df0b90d0df2033d57729c8b09652c39 Reviewed-on: http://gerrit.openafs.org/2389 Tested-by: Jason Edgecombe Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cdef1c67aeaedffadf41069f46e0144f5f1b3a29 Author: Ken Hornstein Date: Tue May 4 14:04:59 2010 -0400 fix dumptool on macos make dumptool in test suite compile on macos again Change-Id: Id60f625ce53bc9695673b68c733fa653521a8122 Reviewed-on: http://gerrit.openafs.org/2387 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78e4c7561b8092103da8c991b7d1c996b7eee194 Author: Derrick Brashear Date: Mon Jul 12 15:04:44 2010 -0400 rx getaddr loopback change fallout failed to git add, and so failed to push this back. Change-Id: Ic538ac13f3099cfb3b8a5561e332750421ddd093 Reviewed-on: http://gerrit.openafs.org/2386 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c44f640df369c74aac3a26b7001c257f4ad4e536 Author: Michael Meffie Date: Tue May 11 17:26:36 2010 -0400 xstat: fix large integer output Do not print large positive integers as negative. Change-Id: Ia7f96e64ee6ad0c58de0d03779b230623d60b114 Reviewed-on: http://gerrit.openafs.org/1949 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5cc6293c2cfc7b0a8746942fd048127bb7cbf10f Author: Andrew Deason Date: Wed Jun 23 16:08:13 2010 -0500 Provide man pages for more fssync-debug commands Provide man pages for the fssync-debug commands vgcadd, vgcdel, vgcquery, vgcscan, vgcscanall, vnode, and volop. Change-Id: If456a4cdfedbf5f2776c276bc20178319638c26a Reviewed-on: http://gerrit.openafs.org/2239 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6f75caf8e58521dc15ca793ec4767e5529516b43 Author: Michael Meffie Date: Mon Apr 19 10:00:52 2010 -0400 viced: host hash address collisions Attempt to resolve collisions when adding a host to the address hash table and another host with the same address:port is already present in the hash table. Retrieve the uuid for the host at that address and if the uuid matches the new host and not the old, remove the address from the old host and install the new host into the address hash. Change-Id: Id182f907f63be556c61ffb91777edd35f0aa950d Reviewed-on: http://gerrit.openafs.org/1786 Reviewed-by: Andrew Deason Tested-by: Michael Meffie Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 421cdc04de9716f994f3bdba17ad4d69494868a5 Author: Andrew Deason Date: Thu Jul 8 15:37:48 2010 -0500 Consolidate loopback address tests Many different places were testing if an address is a loopback address. Consolidate these into one function to make it easier to alter. Change-Id: I9c4465f3bdc4e840c83d69456504caaac1c544e7 Reviewed-on: http://gerrit.openafs.org/2375 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2e66c828b1224fb651ba66e7d7ec59da469f7993 Author: Andrew Deason Date: Thu Jul 8 16:40:07 2010 -0500 GetInodeSummary: free inode info In the salvager, GetInodeSummary stores some information about the relevant inodes into a file. Free the memory for that information after it's been written out, since we don't reference that memory again. Change-Id: I9578f941d2ea13240dd22d9b6e7a1f32217263c9 Reviewed-on: http://gerrit.openafs.org/2370 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 262a678d9b7b79f5261af2a8b36588f684e547ef Author: Matt Benjamin Date: Thu Jun 24 09:07:36 2010 -0400 An RPC test dispatch library for vice A library framework for remote testing against file servers, with the ability to establish multiple call/callback channel pairs within a single test process and dispatch requests arbitrarily on each. Thanks to Derrick for design and debugging help. Additional callback processing intelligence will follow in a future changeset. This version builds on Windows NT (but might need further adjustment). Change-Id: Ibea39e912b2a23ebf58e9e0931114572eccf6e78 Reviewed-on: http://gerrit.openafs.org/2229 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1701535fae6a78b72a2b637365a0bf2d77803b5b Author: Simon Wilkinson Date: Sat Jul 10 20:30:31 2010 +0100 Linux: Actually use freezer compatibility func We were calling try_to_sleep, rather than afs_try_to_sleep. Whilst try_to_sleep is present in all modern Linux kernels, on some older systems we need to fall back to our own implementation, which is what the afs_try_to_sleep function should do, but it can only do so if we call it. Change-Id: I900e50cf2754535e676d582bd3da82f1833bde52 Reviewed-on: http://gerrit.openafs.org/2384 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2aa16fba58c6d14c1bb3dd5dc2187338d89a2149 Author: Simon Wilkinson Date: Sat Jul 10 20:17:56 2010 +0100 Linux: Use freezer compatibility macros in RX Commit eef18466d920985c37ed8d22a6557b609c6225a6 introduced some compatibility macros for the refridgerator functionality. Use these in the Linux kernel RX code, rather than rolling our own. Change-Id: I4279e0b3ee92337cb992ff46895712630f681b7b Reviewed-on: http://gerrit.openafs.org/2383 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit af3292a06dbe2b4ecafb2cac5e76f23da697d93c Author: Russ Allbery Date: Fri Jul 9 16:46:21 2010 -0700 Update config.guess and config.sub to 2009-12-30 and 2010-01-22 Update to the latest versions provided by the Debian autotools-dev package. Change-Id: I503ed6bd4316af40f9d36be6010708cb4fef42e1 Reviewed-on: http://gerrit.openafs.org/2378 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e02b143d2e632c8b515d83cc853d43e22a12617 Author: Russ Allbery Date: Fri Jul 9 16:42:26 2010 -0700 Make config.sub executable Autoconf apparently doesn't care because it runs it explicitly under a shell, but it's sometimes useful to run it manually to check something. Plus, executable shell scripts should be executable on general principles. Change-Id: I0663d91da643f7c0a77fe758ca63f1cc14e81180 Reviewed-on: http://gerrit.openafs.org/2377 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 839ea46465d9bf63fb69b561b1ffff940fd1044f Author: Russ Allbery Date: Fri Jul 9 18:09:32 2010 -0700 Terminate the DARWIN80 #if in afs_osidnlc.c The #if defined(AFS_DARWIN80_ENV) in src/afs/afs_osidnlc.c was never terminated, leading to build failures. Add an #endif. Change-Id: Ie2f324668becef8294b86cadec5cf5547731d2ad Reviewed-on: http://gerrit.openafs.org/2381 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9e2aba99124f777a209d30ea57cbe92e19130b1f Author: Russ Allbery Date: Fri Jul 9 18:06:47 2010 -0700 Fix ktime test for errors The variable passed into ktime_DateToLong must be initialized to 0 or, on error, we get the previous value and the tests fail. Change-Id: I5528a830981a85fb6737bb8cb5931ab95faffb13 Reviewed-on: http://gerrit.openafs.org/2379 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad470b2ed25cdf99f0388947913e392c2d8b67a9 Author: Russ Allbery Date: Fri Jul 9 18:08:12 2010 -0700 Include linux/freezer.h in rx_kmutex.c rx_kmutex.c calls refrigerator(), which is prototyped in linux/freezer.h, but was not including it, causing build failures on Linux 2.6.32-5 (Debian). Change-Id: I3867be6e7b8478d6fab8b97a4c923f979029517e Reviewed-on: http://gerrit.openafs.org/2380 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c62466ecabffbb8a8af7e18d1a0e8152685f859b Author: Andrew Deason Date: Wed Jul 7 15:43:26 2010 -0500 Use afs_sfsize_t for *_SIZE results Callers of FDH_SIZE and OS_SIZE should be storing the results in an afs_sfsize_t. Some were using regular 'int's and other things, which can screw up if the file is sufficiently large. Change-Id: Ibbc2067ed3b90edcbdd46cfa43da559fd6419f0b Reviewed-on: http://gerrit.openafs.org/2357 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c658bfaf884973aa47c8ce3072b96e6b7d8439c6 Author: Ben Kaduk Date: Fri Jul 9 00:38:16 2010 -0400 Remove incorrect critical section use in dnlc_lookup Critical sections may not be used with (non-spin) locks. As such, this code was wrong, and led to a panic. We don't see why there what synchronization they may have been providing, so just remove them and do not replace them. Change-Id: I5d81595a7059a91b9aad46ab0a634fa684f67325 Reviewed-on: http://gerrit.openafs.org/2373 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3ad8760f243998a78770e88f5c738c08df535201 Author: Michael Meffie Date: Sat Jul 3 18:54:15 2010 -0400 wiki url changed Update the various places we reference the project wiki. Change-Id: I56bcf038553eec02695667d737e0cd51e653b881 Reviewed-on: http://gerrit.openafs.org/2374 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dbcd822a484a0193539be2a96e4db39a003cc9e6 Author: Michael Meffie Date: Thu Jul 8 14:45:22 2010 -0400 build fix on older linux The commit d0abe56aa47d4561ba57527d53a2b0db2ea613c2 added a duplicate inclusion of freezer.h. Older versions of linux (circa 2.6.20) are missing include guards on freezer.h. Change-Id: I12c47cded7d06a3514a520b554bbcbd3328f0d2b Reviewed-on: http://gerrit.openafs.org/2369 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d0a9585f9305ae0ebdf958a30e4581e3c24e0de1 Author: Alexander Redinger Date: Fri Jul 2 15:43:42 2010 -0400 SOURCE-MAP updates SOURCE-MAP now reflects state of current code tree, reformatted for readability and easier updating. Change-Id: I858156692c1e4c60ba4d5a75b684db2a079e2dba Reviewed-on: http://gerrit.openafs.org/2348 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5852a3f06a759cbb9e9d2a455c277ec2a44ba498 Author: sanket Date: Thu Jul 1 23:05:24 2010 +0100 vos: Don't call SubEnumerate twice Set a flag to say when we've called SubEnumerate, so that we don't end up calling it twice when in -format mode (Simon Wilkinson extracted this from a larger patch by sanket) FIXES 41031 Change-Id: I2cadd536cb6c9f389330d64ffbf35a16d673d2de Reviewed-on: http://gerrit.openafs.org/2320 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 887de6605150ccd0f0cd56b80d826b04dc7d1339 Author: Jonathan Billings Date: Thu Jul 8 09:23:28 2010 -0400 Update the Red Hat spec file to include fssync-debug man pages Include the new man pages in the base 'openafs' package. The package build process fails with unpackaged files without this update. Change-Id: Ie7a80a283bb95b492b56be0133c1bd811953c57e Reviewed-on: http://gerrit.openafs.org/2364 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c72cd42364206f4fe237d26e582cef86351f75a8 Author: Andrew Deason Date: Fri Jul 2 14:28:29 2010 -0500 Fix VPrintDiskStats_r logging VPrintDiskStats_r tried to log some information using separate Log() statements on the same line. This looks very odd when logged, since we add a timestamp to every Log() call these days. Fix it to print the line as one call to Log(). Change-Id: I19a5365c24208229201ba54ff04e793b5e50eee5 Reviewed-on: http://gerrit.openafs.org/2359 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9408bcaa62ae77b2f5a20b962fec2dbec460c1fe Author: Andrew Deason Date: Mon Jun 28 14:55:18 2010 -0500 viced: Remove stray \r The "File Server has started at" log message contains a trailing '\r' for some reason. Remove it (ctime will give us a trailing '\n'). Change-Id: I8f280abff9a7548f376f007021d74d3a21ac45cf Reviewed-on: http://gerrit.openafs.org/2358 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c790e7d0ca9f76749f761792234da91078eb573d Author: Russ Allbery Date: Wed Jul 7 14:04:37 2010 -0700 Remove a few erroneous NEWS entries for 1.5.75 FUSE was already in 1.5.74, and DAFS fast-restart was not in 1.5.75. Change-Id: I2e1b765c61ce4670800787dbcfd13c2c2af63f79 Reviewed-on: http://gerrit.openafs.org/2356 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e87cb5c9260c7ddfa2ab22d9596c814817fc69c Author: Ben Kaduk Date: Wed Jul 7 22:10:44 2010 -0400 Fix build Previous commit to this file was not as tested as we thought. This one actually builds (well, except for the part where flex doesn't like et_lex.lex.l at the moment). Change-Id: I11d918adc50bb387c022d90cb0877a6a667e8252 Reviewed-on: http://gerrit.openafs.org/2362 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2c7a19b092c8b71fa142a6612a9a7a530c7c3d37 Author: Ben Kaduk Date: Wed Jul 7 20:47:55 2010 -0400 FBSD: sync with NFS for *pages vnops We've had per-cpu counter variables for a while, use the proper macros to adjust them. FBSD90 has had the page queue locks pushed down a level, so we don't need to lock them and should lock individual pages instead. This fixes mmap() on FreeBSD HEAD. Change-Id: I95d16097aaa65c1c99b4a686c05ac84fe9c11584 Reviewed-on: http://gerrit.openafs.org/2360 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bbce05150cae04b7cb2ab943308cdbf0d8dfdffa Author: Russ Allbery Date: Wed Jul 7 12:50:37 2010 -0700 Add NEWS entries for 1.5.75 Change-Id: I3510b03b6821ce266ebcf217b4bf7d6065a8aaa5 Reviewed-on: http://gerrit.openafs.org/2355 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a064446cf6987744ef614cbf37f43231bc207c7e Author: Andrew Deason Date: Wed Jul 7 12:52:10 2010 -0500 klog: refactor klog_prompter The ifdefs in klog_prompter were getting a bit confusing. Split out some logic into a separate "is this prompt a password prompt" function. As a result, we can build without KRB5_PROMPT_TYPE_PASSWORD defined, which happens to be the case on hp_ux11i. Change-Id: I1d5f794bfc33017f699478e367cde91a3e77d33c Reviewed-on: http://gerrit.openafs.org/2353 Tested-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad2bc4a35d003a0a9fd0d116199f9ad5998ad112 Author: Andrew Deason Date: Wed Jul 7 11:40:20 2010 -0500 Fix shlibafsrpc des.c hp-ux special case '$$@ -I../des', not '-I../des $$@'. Change-Id: I322963b8f6ab31cfa76a91095be665ca59a3c9c3 Reviewed-on: http://gerrit.openafs.org/2352 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8492619f23024eeb1ad42294f055218ddc57aa0d Author: Andrew Deason Date: Wed Jul 7 10:23:27 2010 -0500 HPUX: correct PostPopulateVCache vfsp set Setting AFSTOV(avc)->v_mount is the linux/BSD way. avc->v.v_vfsp is the HP-UX (et al) way. Change-Id: If2cd1c1e74fcd0ca5ad981497abe7968d97cf0ed Reviewed-on: http://gerrit.openafs.org/2351 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0a8b1864d604353a980d1370d97546e12973b462 Author: Andrew Deason Date: Wed Jul 7 09:51:45 2010 -0500 HPUX: include proc_iface.h for proc_t We use proc_t in a typedef, and we need proc_iface to get proc_t. So, include it. Change-Id: I515abe43ae1d3b4a2c54ebe1b7192a91ed441117 Reviewed-on: http://gerrit.openafs.org/2350 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d154ea157b9c32b5cb421f12796ede733e091f4d Author: Andrew Deason Date: Tue Jul 6 14:02:56 2010 -0500 UINT_MAX requires limits.h We need to include limits.h to use UINT_MAX on some platforms, so include it in src/rxkad/v5der.c. Change-Id: I79343011e72080e58f07d53195488808d9e29121 Reviewed-on: http://gerrit.openafs.org/2339 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 16efa8e8c368df67efd91314fc81e38682d367eb Author: Derrick Brashear Date: Wed Jul 7 10:43:48 2010 -0400 kernel InitPeerParams has bogus branching and dup code several of the mtu configuration cases for the kernel version of InitPeerParams were bogus. clean up the function. (a forthcoming change reworks this anyway, but..) Change-Id: Ia4449d5cecc80cddae7d0f611186f48614b908ee Reviewed-on: http://gerrit.openafs.org/2343 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84c52e1db63999988d8405d223cb28f2063004c3 Author: Andrew Deason Date: Tue Jul 6 14:41:13 2010 -0500 HPUX: make osi_procname a stub It is not immediately clear how to obtain the current process name on HPUX, and the current osi_procname definition breaks the build, so just make osi_procname a stub for HPUX. Change-Id: I8c825d53d7f25b1500b41629ba73f2fe1f48f00a Reviewed-on: http://gerrit.openafs.org/2341 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a022e9e5954f76900f1ca0fdb92c2f12b0036fb Author: Andrew Deason Date: Tue Jul 6 14:10:35 2010 -0500 Fix stray static inline 'static inline' should be 'static_inline'; keep the hp-ux compiler happy. Change-Id: Ibfb819571c608b9ca7c1437fde6898b405bccc4c Reviewed-on: http://gerrit.openafs.org/2340 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 262715d1d3fb672914fbe011663504a69fcf6046 Author: Derrick Brashear Date: Tue Jul 6 11:11:25 2010 -0400 fix newline conventions we had some CRLF files hanging out. fix them. Change-Id: Ie2aa707813967192f202aabc3b28808ae8f80da6 Reviewed-on: http://gerrit.openafs.org/2335 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af5c302f0da739a70777980fd4ab7f9490ae51c3 Author: Derrick Brashear Date: Tue Jul 6 09:36:27 2010 -0400 rxkad heimdal cleanup don't assume every system have uint16_t and uint32_t; instead massage for use of native afs types. Change-Id: I8943f37ecf6dd5d1565ed295b6e6a2ca9eea5b6d Reviewed-on: http://gerrit.openafs.org/2334 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4ca1b0102542aec73ed5d06583f302eead94ba22 Author: Jeffrey Altman Date: Tue Jul 6 00:30:06 2010 -0400 Windows: update release notes for 1.5.75 Add: * better description of Win7 netbios name lookup bug * "fs newcell" changes * IdleDeadTimeout registry value * NatPingInterval registry value * ReadOnlyVolumeVersioning registry value Change-Id: Ibf5ff8145be94ab8a7a48a1a9bd87c7d60e8549b Reviewed-on: http://gerrit.openafs.org/2333 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e6a8d4ab2c8bc37c958a12f74d8b2c6074aff025 Author: Jeffrey Altman Date: Fri Jul 2 13:55:05 2010 -0400 Windows: ChangeLog for 1.5.75 Change-Id: Iff322bf65d9d8b5af58d6f4b53630256504999cb Reviewed-on: http://gerrit.openafs.org/2332 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b2a404ffd94de936a073dc5836230bffc52b0729 Author: Derrick Brashear Date: Fri Jul 2 17:53:50 2010 -0400 make openafs 1.5.75 version number updates for 1.5.75 Change-Id: I05cf66281e497c3eff473a350abe480e6fcfd928 Reviewed-on: http://gerrit.openafs.org/2328 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4c0d47de22e1cb0258151e266f15d4a5bf239f33 Author: Ben Kaduk Date: Sun Jul 4 02:28:02 2010 -0400 FBSD: always close the rx socket when shutting down The soclose(rx_socket) call is needed in order to restart AFS. (Otherwise sobind() fails with EADDRINUSE.) While here, use the defined constant SHUT_RDWR instead of hardcoding '2' for soshutdown's second argument. Change-Id: Iba7cac3aec79764783628da28b12253d496a7680 Reviewed-on: http://gerrit.openafs.org/2331 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bf8746dc43567a0a8f1d4075402eb9d2f741ec04 Author: Ben Kaduk Date: Sat Jul 3 22:58:39 2010 -0400 Do not recurse on the glock in rxk_NewSocketHost If sobind() failed, we would lock the glock before going to bad, which proceeded to lock the glock, panic()ing on the recursion attempt. Remove the unneeded first call. Change-Id: Ifa793735ebe64bde98156caa610c06612bdb92bd Reviewed-on: http://gerrit.openafs.org/2330 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b54c7ceefe884b57db76c929940afdfee86472e8 Author: Jonathan Billings Date: Wed Jun 30 15:09:39 2010 -0400 Removed kpasswd from openafs-file-list The executable %{_bindir}/kpasswd was included in the the 'openafs' base package. This change removes the kpasswd executable from the base package. It is still built and is installed in the 'openafs-kpasswd' package. I believe this was the original intent of the 'openafs-kpasswd' package. Change-Id: Idf49747d8a703bb959cdf758d489d640045f285f Reviewed-on: http://gerrit.openafs.org/2305 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d8cde43ed0fcdb1168deae2179e638667bab37ad Author: Derrick Brashear Date: Fri Jul 2 17:42:13 2010 -0400 update VAllocVnode logging move the log message i added to the correct place and put one where it came from. oops Change-Id: Ieb78d8cc076dbc2279922b0909546878b9ee005e Reviewed-on: http://gerrit.openafs.org/2327 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c8ce42242873e3b21443ad7a5d1e1bb5e7b28e60 Author: Andrew Deason Date: Tue Jun 29 13:19:11 2010 -0500 DAFS: Salvage VG on volume creation error When trying to create a volume (either an entirely new volume or a clone), request a demand-salvage on that volume group if we hit an unexpected error. This can allow some situations to automatically rectify themselves if, for example, a volume is missing its .vol header, but still otherwise exists and causes an error during a clone. Change-Id: I22b3e9028685395a8e621962138dee9f5f2ec822 Reviewed-on: http://gerrit.openafs.org/2286 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6b041b7cb0d29815495b2559f24f4ff4979eb129 Author: Andrew Deason Date: Tue Jun 29 14:44:31 2010 -0500 DAFS: Allow FSSYNC salvages on unknown volumes Allow salvage requests over FSSYNC (FORCE_ERROR with the FSYNC_SALVAGE reason code) that are requested on volumes that we do not know to exist. This can be helpful if a salvage is requested on a volume that someone attempted to create but failed, indicating that a partially-created volume may be in the way. Log an additional message when we do this, as it should not be a normal occurrence. Change-Id: I6e1bbe35111a41c489fe85cad36e6a8a6f323a5a Reviewed-on: http://gerrit.openafs.org/2285 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ff072a08b5c5204a27d3807ad592db84e87c697d Author: Marc Dionne Date: Fri Jul 2 09:13:50 2010 -0400 Linux: cache bypass: fix FCSBypass tests Add some parentheses around the tests for FCSBypass. Without them, the test will not always give the intended result. Change-Id: I94cb2b2c95c702981fce9cff066b620bce652ee1 Reviewed-on: http://gerrit.openafs.org/2324 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b23d86e430d9a077d94c6bc768216eb75bfb1faf Author: Marc Dionne Date: Fri Jul 2 09:10:06 2010 -0400 Linux: cache bypass: warning fix in afs_bypasscache.c Cast the printf argument to int to match the format specifier. Change-Id: I4300c8a407c99c40e116a6e166a76112fb92d254 Reviewed-on: http://gerrit.openafs.org/2323 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c66ba55bd882de677e425a9b9f7f29215a05b647 Author: matt@linuxbox.com Date: Fri Jun 18 14:27:07 2010 -0400 cache-bypass explicitly reference pages involved in background i/o Formerly, we assumed that any page eligible for background i/o could be effectively pinned by lock_page. Persuant to concern expressed by Simon that such pages might be eligible to be released by the kernel after readpages returns, call get_page to increment the refcount on each page before dispatching a background read (and matching put_page when the i/o is completed). Change-Id: Ib3a63e56e6b902b4eb5deb769847e7f17ce2c9ff Reviewed-on: http://gerrit.openafs.org/2215 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 63304d6b2b895404e3a1a194232f3a48e448e75d Author: Andrew Deason Date: Tue Jun 29 12:30:10 2010 -0500 DAFS: Log attempted salvage requests Log in FileLog (or VolserLog, or the log of any program that requests salvages) when we request a demand-salvage to occur. Change-Id: I2444480287a1647c2d3e25039467167e28e17f38 Reviewed-on: http://gerrit.openafs.org/2284 Reviewed-by: Derrick Brashear Reviewed-by: Tom Keiser Tested-by: Derrick Brashear commit febd69f74b96638a696292624f797a0ef46622da Author: Simon Wilkinson Date: Thu Jul 1 20:18:33 2010 +0100 Build: Let configure pick our lex and yacc Let the autoconf magic pick our lex and yacc implementations, rather than hardcoding possibly wrong values in osconf.m4 FIXES 1394 Change-Id: I692eb8568780c78cfe6ba2e5b0fddca6fe6c142c Reviewed-on: http://gerrit.openafs.org/2316 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 417d2c8f9585c5e3ce17512a1ae8ca596a676c03 Author: Simon Wilkinson Date: Tue Jun 29 21:45:36 2010 +0100 Build: Rework git version detection Rework the git version detection script to handle some issues that have been pointed out. 1/ Make it work properly with objdir builds 2/ Don't try to work out if the tree is dirty if git describe failed 3/ Use the configured VERSION as a fallback if we can't obtain proper version information during a make Change-Id: I39494e1c18cf4eacbb55386334da7128fbe96310 Reviewed-on: http://gerrit.openafs.org/2283 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a155d71914791702762d8abd947cf609e1b4bea0 Author: Andrew Deason Date: Fri Jun 25 16:22:28 2010 -0500 vol: Move destroyMe check outside of inUse check The destroyMe conditional does not depend on the result of VShouldCheckInUse(), so move it outside of that block. Change-Id: Ieb4c97ae9f76b4369680629f18eecd1dfc06682f Reviewed-on: http://gerrit.openafs.org/2276 Reviewed-by: Derrick Brashear Reviewed-by: Tom Keiser Tested-by: Derrick Brashear commit d730f7ceb586ac12d5f04dc5ab294f5d4f449334 Author: Derrick Brashear Date: Tue Jun 29 20:49:41 2010 -0400 VAllocVnode error handling avoid growing a volume index too large. handle errors other than just by dropping a core Change-Id: Id1bf7a1a40672b6b960cc0d7a1cd54f48ab0b50a Reviewed-on: http://gerrit.openafs.org/2291 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a309e274632993c5aeec04c6e090f5ac95837a40 Author: Rainer Toebbicke Date: Wed Jun 23 13:08:47 2010 +0200 Do not call afs_FlushVCBs with afs_xvcache held In afs_AllocCBR, use dynamically created afs_cbr structures when running out of preformatted ones, rather than calling afs_FlushVCBs under, potentially, the afs_xvcache lock (which would be held across the RPC, difficult to drop and re-acquire under the current hierarchy). Modest modernization of the number preformatted afs_cbr structures, rule-of-thumb, not pretending any research. Change-Id: I9427427d5dab7d4639822c370bdded0418f67d9e Reviewed-on: http://gerrit.openafs.org/2243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bdf6192509ca79baacda8ddf79112647bd3c0791 Author: Derrick Brashear Date: Fri May 14 16:03:32 2010 -0400 bosserver force corefiles override system resource limits so we get corefiles Change-Id: I50f228d709090c8275bed2fc2958653c43a0a026 Change-Id: I5b5e8c6a5e02ed0b28610949eb81f6345357969e Reviewed-on: http://gerrit.openafs.org/1959 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 4516e3777413f795ab09440bf300681750ed92fa Author: Marc Dionne Date: Fri Jul 2 09:28:05 2010 -0400 Linux: cache bypass: remove warning print before panic This warning printf has some issues - it prints out pointers as ints with %d (which causes warnings), and if the intention was to print the referenced values, they wouldn't be set yet at that point in the function. Since the purpose is not clear and it has issues, just remove it. Change-Id: Ied69c390818f9dff235bdaa31af42996aaa39af3 Reviewed-on: http://gerrit.openafs.org/2325 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95a814a26fae63e75fac99e2c8d586bd4725f204 Author: Marc Dionne Date: Fri Jul 2 08:55:44 2010 -0400 Linux: cache bypass: warning fixes in afs_pioctl.c Fix two minor warnings in afs_pioctl.c: - gcc complains that threshold may get used uninitialized. the warning looks bogus, but initialize it to keep gcc happy. - PSetCachingBlkSize is declared but never defined. Change-Id: I3ac84d665f60ba51fef2d52f2bd8d90e0a7bc3b3 Reviewed-on: http://gerrit.openafs.org/2322 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bd6b25049331c07ccdeb806d82f73d71221b78f1 Author: Marc Dionne Date: Thu Jul 1 16:07:40 2010 -0400 Linux: cache bypass: deal with the afs_serverHasNo64Bit case Deal correctly with the case of a server with no 64-bit fetch support. In that case, the code needs to fallback to the standard FetchData call, similar to what happens in afs_fetchstore.c. Move existing check out of 64-bit-only branch so servers already known to be non-64-bit and not merely those newly discovered so execute the non-64-bit FetchData. Change-Id: I505ce6d88072bc3ee5208863717395a78f8562fa Reviewed-on: http://gerrit.openafs.org/2319 Reviewed-by: Matt Benjamin Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit b0ed5a7facb1951f2f4ef8ed3da29a6a80cb7d49 Author: Rainer Toebbicke Date: Wed Jun 23 15:10:46 2010 +0200 Protect truncate_inode_pages when called from osi_VM_FlushPages truncate_inode_pages requires the mapping to be protected using i_mutex / i_sem, which is not held whereever osi_FlushPages is called. Change-Id: I2ca59cf75633368efb7f6a17fd01c7c517a8f609 Reviewed-on: http://gerrit.openafs.org/2244 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 202ca802c30bfa6779fae0bd686da0ca96fc224d Author: Marc Dionne Date: Thu Jul 1 15:22:47 2010 -0400 Linux: cache bypass: avoid unused variable warnings Some variables are only used for AFS_64BIT_CLIENT code, so make their declaration conditional as well. Also, initialize 'code' while we're at it. The compiler has a legitimate complaint that it could be used before it's set, for instance if we have AFS_64BIT_CLIENT but afs_serverHasNo64Bit is true. Change-Id: Ic04b07fffa9668123a9029bb42415a7c701c2339 Reviewed-on: http://gerrit.openafs.org/2317 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f004a5c7ecd35e5b26cafd62c322e3184e811e64 Author: Marc Dionne Date: Thu Jul 1 15:38:32 2010 -0400 Linux: cache bypass: warning cleanup in afs_daemons.c Remove unnecessary warning for the UKERNEL case. This file will always get compiled with UKERNEL. Remove an "if 1" ifdef that was probably used while debugging to make the function non static. Change-Id: I5ba5bbb4bd2b782c605699028cf3ad2c7e8cd41f Reviewed-on: http://gerrit.openafs.org/2318 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 232024676d396ab771d6d228158d606240114bb0 Author: Simon Wilkinson Date: Wed Jun 30 08:29:28 2010 +0100 Linux: Fix pagevec use in cache-bypass Cache-bypass was still using the old style pagevec manipulation functions, and so won't build on newer kernels. Update it to use the same pagevec functions as the generic readpages code. FIXES 127505 Change-Id: I9d8acaf3165bbdf24068bd9145a2369cd0c87e4d Reviewed-on: http://gerrit.openafs.org/2298 Reviewed-by: Matt Benjamin Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit 368c44b537d6940482ceefe2ef8e1fd7fd099783 Author: Andrew Deason Date: Thu Jul 1 11:57:59 2010 -0500 Document fs -human Document the new -human switch for 'fs diskfree' and 'fs listquota'. Change-Id: Ic4b4f9d7492c887085ab6da4c802cfc75fd4d08e Reviewed-on: http://gerrit.openafs.org/2314 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5fe4161270f774c8f7938c432ac84a5edcaf4c33 Author: Ben Kaduk Date: Thu Jul 1 12:47:55 2010 -0400 FBSD: do not recurse on the afs_xvcache write lock afs_ShakeLooseVcaches grabs the write lock before calling osi_TryEvictVCache. The latter calls vgone(l), which sometimes calls into VOP_CLOSE, which again trys to acquire the write lock, leading to deadlock. Drop the write lock and reaquire it in TryEvictVCache as a fix. While here, set *slept to 1 since we drop the glock. This churn was enough that the gcc no longer cached the value of AFSTOV(avc), which gets set to 0 in VOP_RECLAIM, so the subsequent VOP_UNLOCK dereferenced a null pointer. Cache the vnode pointer in a local variable for the entire function instead of using AFSTOV() everywhere. Change-Id: Ic826e7888cb400c19857c58cb6ed88b9bdd0dddc Reviewed-on: http://gerrit.openafs.org/2315 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b126561c8decdd306b37063c16d06364fc9f928b Author: Andrew Deason Date: Thu Jul 1 11:52:21 2010 -0500 fs diskfree displays 'total' not 'kbytes' Correct the fs manpage to show that 'fs diskfree' shows a header called 'total' to represent the total disk space, not 'kbytes'. Change-Id: Id827ec81dcfd79ab28eed3bc392524a378f0069d Reviewed-on: http://gerrit.openafs.org/2313 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c29f03efab46fac2f89f69cad66b114f42398ba6 Author: Andrew Deason Date: Thu Jul 1 11:22:13 2010 -0500 fs: Correct human-readable output alignment 'fs lq' output separates its space values by whitespace, but 'fs df' does not, which was causing the human-readable output for 'fs' to not be properly aligned with the output headers. Modify HumanPrintSpace to take up exactly 10 characters (9 for the value, 1 for the exponent), and have the callers print out an extra space if appropriate. Change-Id: Ied81e73e1e84df34e63fdf0c80ad86341bea0cd4 Reviewed-on: http://gerrit.openafs.org/2311 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1c92f7cc8da20b3e7f0e7564e69b06a3f4930b7a Author: Tom Keiser Date: Thu Jul 1 02:07:54 2010 -0400 nuke configure options from AIX param files Remove antisocial behavior whereby the AIX param files silently turn on the FAST_RESTART and BITMAP_LATER config options. Change-Id: Ic7f77bd6c7aefe0f17b6d8796ce204cc8a5ad4c2 Reviewed-on: http://gerrit.openafs.org/2309 Reviewed-by: Simon Wilkinson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 582878a75858a341f674f833609f08b6d3bf839a Author: Derrick Brashear Date: Wed Jun 30 15:35:38 2010 -0400 update ticket5 from heimdal includes updated instructions for updating. note that gen_glue.c in lib/asn1 has a bug which omits a needed newline in the "const struct units * asn1_%s_units(void);", line. FIXES 127554 Change-Id: Ibc880bf51419d51de40b33d8c43122e592971b0b Reviewed-on: http://gerrit.openafs.org/2306 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e61800b992b5d54edb3656925a884753f02fc686 Author: Andrew Deason Date: Mon Jun 28 13:48:00 2010 -0500 Remove --enable-fast-restart configure option FIXES 127526 Change-Id: I80a18fe083a0d52dad9d4e2d5b14bf667c44630b Reviewed-on: http://gerrit.openafs.org/2278 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3330b9d17b2767318eef6222aceabdee47bbc703 Author: Tom Keiser Date: Wed Jun 30 18:40:20 2010 -0400 DAFS: fix VOL_HDR_IN_LRU state bit tracking For the case where the cached vp->header can be re-used by GetVolumeHeader(), we have not been re-setting the VOL_HDR_IN_LRU state bit. Although this has not affected correctness (this bit is merely used to aid in debugging), we should be resetting it in all relevant cases... Change-Id: I2ad2b8c5070470beb067efdcda6f76f6b72c006c Reviewed-on: http://gerrit.openafs.org/2308 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d8072a846cbce75fb17b0865523923722254ca56 Author: Andrew Deason Date: Wed Jun 30 12:59:24 2010 -0500 fs: HumanPrintSpace is void HumanPrintSpace never returns anything; declare it void. Change-Id: I336deb991e298b5132667a9bd7311b521fc082c3 Reviewed-on: http://gerrit.openafs.org/2304 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e10e29bc5bf53cb6fa30fa8580d8b25d00b5aed7 Author: Andrew Deason Date: Wed Jun 30 12:53:13 2010 -0500 vlclient: Remove incorrect whitespace fix Commit e59a0ff9934f8ea44ecb02e9fdaa81a29bd04b61 generated a warning since we try to assign NULL into a character. Just remove this code, since removing trailing whitespace was already handled by commit df18c9e895e75e77ed466dea3b06ef2a0a07260a. Change-Id: I915c0678a2f6893e09cf049bf71c519be554369f Reviewed-on: http://gerrit.openafs.org/2303 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f5144b3edfca5187ce417da8929eea86c930ef0 Author: Ben Kaduk Date: Wed Jun 30 00:40:09 2010 -0400 Disable red zones for amd64 FBSD kernel code The kernel has been compiled with -mno-red-zone since at least FreeBSD 5.0; when we compile libafs.ko with red zones enabled and interact with the red-zone-less kernel, we get occasional stack corruption, which manifests itself in a variety of unpleasant ways. The flags we pass to gcc for our module build currently differ substantially from those used during a kernel build (or modules built with the kernel); I hope to transition to a module build process involving bsd.kmod.mk in the relatively near future. Change-Id: I406e264c1f96e1d893b9d12b561f48a3cbfdf57c Reviewed-on: http://gerrit.openafs.org/2297 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cf34a3e896c940813a05fe663764389a88715a70 Author: Evan Broder Date: Wed Jun 30 09:52:15 2010 +0100 Add human-readable printout to fs df This patch adds a -human option to fs df, which causes it to printout all of its values in "human-readable" form (i.e. rounded to roughly the nearest power of 1024). FIXES 124529 Change-Id: I98e4c872abec5784c6ec600d5d977c36f4a8b0ac Reviewed-on: http://gerrit.openafs.org/2301 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e59a0ff9934f8ea44ecb02e9fdaa81a29bd04b61 Author: Max Cohan Date: Wed Jun 30 09:30:49 2010 +0100 fix & enhance vlclient command-line handling Corrects an EOL bug in vlclient and adds a more user-friendly handling of request for help (i.e., '-help' now works) FIXES 125036 Change-Id: I70f6523d538e34a02536e482f99916293a195df5 Reviewed-on: http://gerrit.openafs.org/2300 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1fdce07cd9b6763ebd3c3b4327fc2c3831802533 Author: Steven Jenkins Date: Wed Jun 30 09:06:29 2010 +0100 Fix VLog so that actual levels are used Fix VLog() so that it actually uses the loglevels and does not set all log messages to level 5. FIXES 125035 Change-Id: Ia9f42a814be182215cedadb6a4837347ace32f41 Reviewed-on: http://gerrit.openafs.org/2299 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1566e42a69935467a5869391ed20860d416fcdd Author: Ben Kaduk Date: Wed Jun 30 00:29:41 2010 -0400 FBSD: in reclaim, print the failed vnode If we fail to flush a vnode, in addition to printing a diagnostic message, also print information about the vnode; fs getfid can frequently confirm which vnode(s) are problematic, which may be useful in debugging the failure. Change-Id: Ia6e93f436f9dcd2d634c46856ede5effbf79e9cb Reviewed-on: http://gerrit.openafs.org/2296 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e8da9bf95460042ca6f91dc60008c5256e03de0f Author: Ben Kaduk Date: Wed Jun 30 00:27:11 2010 -0400 Actually invalidate the buffer in FBSD's FlushPages Chaskiel added a commented-out call to vinvalbuf() in revision bd707fb7e6 back in 2002; adding in what the current call should be does not seem to cause any problems for me. Change-Id: I2450fbaaa51b5baf2781e8a6572065e5f69b44ed Reviewed-on: http://gerrit.openafs.org/2295 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 46727481ec5c47c2d3402acb572bf0d6167690ec Author: Ben Kaduk Date: Wed Jun 30 00:21:10 2010 -0400 FBSD TryToSmush locking fixup We need to hold the interlock when we check v_flags, so do so. TryToSmush is sometimes called with the vnode already locked, as the current code appears to hold the vnode lock for the current working directory (which is probably a bug). Check if the lock is already held (panic if someone else has it!), and unlock as appropriate when we're done. Change-Id: Id09ef1e10632c7f63b590271a6339a069176deac Reviewed-on: http://gerrit.openafs.org/2294 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3688073993b57c4cd13f257294acd192e82012cf Author: Ben Kaduk Date: Wed Jun 30 00:12:59 2010 -0400 Correct whitespace in FBSD/osi_vm.c I'm about to touch this, and the whitespace was bothering me. Change the six-space indentations to match the rest of the code. Change-Id: I35a12c82f8b2b4644e58cf1f19f021282e43dc77 Reviewed-on: http://gerrit.openafs.org/2293 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 659959bea90181a08ed8e76a120b44cec3ff0b8d Author: Ben Kaduk Date: Sun Jun 20 18:49:58 2010 -0400 Correct FBSD-version conditionals for VFS locking The locking around some interfaces has changed with time. Make our preprocessor checks match the reality of when the changes were made. Change-Id: If933dd636bb908af27852897e9c77ed600759674 Reviewed-on: http://gerrit.openafs.org/2292 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c772142111d7c6554ff8de3ee00e7618b20e55fa Author: Derrick Brashear Date: Tue Jun 29 14:33:06 2010 -0400 stop abusing OPTMZ in aklog instead, abuse XCFLAGS less. sigh Change-Id: Ieda727bf62704f31ba4c1aebe3c5b8aa62c2dfed Reviewed-on: http://gerrit.openafs.org/2282 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 7b1bfb4caa800de398c7955cc75adda2a64fdd99 Author: Derrick Brashear Date: Tue Jun 29 14:32:38 2010 -0400 klog warning fix fix warning-found uninitialized variable in klog.krb5 Change-Id: Id4c78e2ceef82fcc7fbb6cdae7b6d07d74495547 Reviewed-on: http://gerrit.openafs.org/2281 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d6f5e5e64b3f1b00560bbfeb6fa8dd85814b5b03 Author: Rod Widdowson Date: Tue Jun 29 18:30:39 2010 +0100 Fix checked build of vldb_check Checkin http://gerrit.openafs.org/#change,2027 appears to have caused issues with the checked build for vldb_check. This fixed is by reflecting the structure change into vldb_check Change-Id: I12343be8a3a31cb2f6474115a8d9137dadd4ae2d Reviewed-on: http://gerrit.openafs.org/2280 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5158766dce97570e51fc3abb2c8b3405fe7c299e Author: Simon Wilkinson Date: Sat Jun 26 19:35:18 2010 +0100 Use git describe to determine build version This patch makes the configure and build system use the output from 'git describe' to determine the version of the software being built. This means that all that is necessary to create a new release is to tag the repository - removing the double sources of version information. There are a couple of fallbacks for systems which do not have git available for builds. Firstly, if a file called '.version' exists in the top level of the repository, then the version information is pulled from this file. The intention is that those packaging up git checkouts for onwards distribution will use 'git describe > .version' before producing their tarballs. Secondly, if we cannot find any version information then the version will default to 'UNKNOWN' This all mirrors the way that many others have integrated git with automake and friends - although the implementation is independent. Change-Id: I7fa4605e52181d60657ad794ca8efdb5a9fb1449 Reviewed-on: http://gerrit.openafs.org/1824 Tested-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery commit 020c2284250cd26eb3b45fdbd7b96a84c0c58f5f Author: Andrew Deason Date: Mon Jun 28 11:03:28 2010 -0500 LINUX24: crfree typo crfree, not crfee. Change-Id: I4a2d4bd4e37e409b62d587b22c36f4a6d02e9c32 Reviewed-on: http://gerrit.openafs.org/2272 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 15b8e32c177ce286237a3049a6f8f4f0dd7399dc Author: Andrew Deason Date: Mon Jun 28 10:43:55 2010 -0500 LINUX24: remove pagecopy and other 2.6-only code The client background readahead code and 'readpages' implementation were only written for 2.6 kernels and used 2.6-specific constructs. Remove them, along with references to the 'pagecopy' code, and some other 2.6-only cruft in osi_vnodeops.c. Change-Id: I2e939e98bd72cd7b275b0f7a389607ee5dc94efa Reviewed-on: http://gerrit.openafs.org/2271 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5539e2b55d7413ca86e7ea26f45c796506e6a553 Author: Andrew Deason Date: Mon Jun 28 11:24:04 2010 -0500 LINUX: Remove LINUX26 conditional in proc2cred afs_osi_proc2cred contained a 2.4 implementation; remove it, since we can assume at least 2.6. Change-Id: I605856e920508cf49a975e5375ade87e00598763 Reviewed-on: http://gerrit.openafs.org/2274 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8143e99a2c6ec137313cb9405670c7791b21962a Author: Andrew Deason Date: Mon Jun 28 11:17:50 2010 -0500 LINUX24: Remove BDI references afs_backing_dev_info was still referenced in a couple of places in the LINUX24 code. Although they are properly ifdef-guarded, these lines were never getting built, so remove them. Change-Id: I55ffca5dad99124b9d451925c9fcf15b7060bb9b Reviewed-on: http://gerrit.openafs.org/2273 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cdf8e7de1658aaafe2958c28b7e1fd9bf92f4499 Author: Andrew Deason Date: Mon Jun 28 10:46:22 2010 -0500 LINUX24: NEED_IOCTL32 fixup The NEED_IOCTL32 symbol needs to protect the entire if block, not just the conditionals. Change-Id: Ie33860b1d5677cec19ed19aa1ccc1ce0a26824ff Reviewed-on: http://gerrit.openafs.org/2270 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 26cd8a302c0f91ed9cafd377e1f8dcc473a48917 Author: Andrew Deason Date: Mon Jun 28 10:42:05 2010 -0500 LINUX24: cr_ref is a regular int cr_ref is a regular integer, not an atomic_t, so we need to just assign '1' to it directly. Change-Id: I3533c79a67f7be35724cc81553d24bfecb7b81d3 Reviewed-on: http://gerrit.openafs.org/2269 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 773b4968e450601910c838232e2b281b1db176a6 Author: Andrew Deason Date: Mon Jun 28 10:33:38 2010 -0500 LINUX24: Remove group_info macros/functions The LINUX24 code has a macro and a function abstracting 'struct group_info' access. But 'struct group_info' does not exist in 2.4, and nothing calls these, so get rid of them. Change-Id: Ic38f5be27d55da9fdf6ce7889d4df6afd1464c0f Reviewed-on: http://gerrit.openafs.org/2268 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 16f19e79d1a6a13a3e07ae9be3aab50f28c06045 Author: Rod Widdowson Date: Wed May 26 16:18:26 2010 +0100 Make file offsets in vldb layout unsigned ints vlserver.h has a few cases where links through the vldb are being stored as afs_int32s. These are file offsets and should be unsigned. This commit fixes just these declarations. The code still compiles (because they are silently cast all over the shop), but it starts the tidy effort. Change-Id: Iba14bd28cb43a6ca6401be4252bb45135d8b3a55 Reviewed-on: http://gerrit.openafs.org/2027 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 233253809e978b7487956e9bd56957a848459821 Author: Simon Wilkinson Date: Sun Jun 27 15:15:33 2010 +0100 Make make_libafs_tree.pl use strict and warnings Turn on the perl use strict and use warnings options in the make_libafs_tree script to better catch programming bugs. Change-Id: Ide358d40eda3cde9dd0261af11993560da71143a Reviewed-on: http://gerrit.openafs.org/2266 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b59af55f80b2339a93ba985d496b2e9052f29b60 Author: Marc Dionne Date: Fri Jun 25 20:06:08 2010 -0400 Linux: Use filehandles for all 2.6 kernels This generalizes the use of the exportfs API and file handles to open disk cache files for all 2.6 kernels. Code outside of src/afs/LINUX (ex: afsd) can assume that file handles are used for all 2.6 kernels and can use AFS_LINUX26_ENV to check. Within src/afs/LINUX/osi_file.c, NEW_EXPORT_OPS can be used to determine if the old exportfs API (pre 2.6.24) or the new one applies. All traces of the LINUX_USE_FH define are removed. FIXES 127530 Change-Id: I6803101c56981f9f674cef581f7299656723fdf3 Reviewed-on: http://gerrit.openafs.org/2260 Tested-by: Marc Dionne Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit e7b59fb0255f5823ddf4252008281d09d7418bdb Author: Matt Benjamin Date: Sun Jun 27 20:00:37 2010 -0400 linux trivially track host signedness in afs_prototypes.h track host signedness in definition of afs_nfsclient_reqhandler, which changed in 7d1bbee02a80f045a6ae4e30410798f4785906a8. Change-Id: If85cbbb36c138fbe6ded93ba7c1c2af31825f5bb Reviewed-on: http://gerrit.openafs.org/2267 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7005aec9a4a187065048985756f618043d7ec1ed Author: Andrew Deason Date: Fri Jun 25 15:03:23 2010 -0500 libafs: correct export_reqhandler prototype The export_reqhandler function pointer takes an afs_int32*, not an afs_int32 as the fourth argument. Change-Id: I89ef9cfd23a5b673cbbb29fc710236cfe1e3c7cf Reviewed-on: http://gerrit.openafs.org/2257 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d1bbee02a80f045a6ae4e30410798f4785906a8 Author: Andrew Deason Date: Fri Jun 25 14:17:49 2010 -0500 Use unsigned addresses in the NFS exporter Use unsigned IP addresses in the NFS exporter code in libafs. This modifies the distributed headers exporter.h and nfsclient.h. Change-Id: Ieaddf21e487ae416d7b003223566c999c64279aa Reviewed-on: http://gerrit.openafs.org/2256 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0265d5c1eb04eeb354d89d638758b84fd458b267 Author: Andrew Deason Date: Fri Jun 25 13:52:16 2010 -0500 Use unsigned IP addresses in bu* Use unsigned IP addresss in bubasics, bucoord, and butc code. This alters the public tcdata.p.h, but stays away from wire RPCs or variables used directly with those RPCs. Change-Id: Ica96172399cafbc2c347f725a966cf1db7ff1128 Reviewed-on: http://gerrit.openafs.org/2255 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 38db9afbe9b2201b97f08b3068577a1270071cb9 Author: Andrew Deason Date: Fri Jun 25 12:43:50 2010 -0500 vlserver: Use unsigned addresses Use unsigned IP addresses in vlserver code. This alters some structures in the public cnvldb.h header. Change-Id: I62725ad98d2c4e8bfe610ae9a6132fd0f54cc4aa Reviewed-on: http://gerrit.openafs.org/2254 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b65b462c58858f513f872a500d18ebe3706d5682 Author: Marc Dionne Date: Fri Jun 25 19:33:51 2010 -0400 Linux: remove some 2.6 specific code from 2.4 Remove some code that will never be compiled or used in the afs/LINUX24 directory. This includes code depending on AFS_LINUX26_ENV, and on LINUX_USE_FH which is never set in 2.4 and is going away soon anyway. Change-Id: I972262b45d3518d996756b5dc9f6e6c01450e5cc Reviewed-on: http://gerrit.openafs.org/2259 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ce2162ec99b5ac1a262b99bad3b71c51ee82faff Author: Simon Wilkinson Date: Sat Jun 26 17:39:20 2010 +0100 Autoconf: Update AC_INIT macro use Update the way that we use the AC_INIT macro to match current autoconf conventions Change-Id: Ib1ce2acd879683ff8ff178cfbd9776277ba7460f Reviewed-on: http://gerrit.openafs.org/2265 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ff959f4a2e28a4c44f4962f5077da1148748d28b Author: Simon Wilkinson Date: Sat Jun 26 15:59:21 2010 +0100 RPM Packaging: Make file types clear Make it clear that makesrpm.pl takes the bz2, rather than gzip'd, versions of the OpenAFS distribution. Change-Id: Ifb99448df5c7060186da1f13ee9c38ba95373376 Reviewed-on: http://gerrit.openafs.org/2264 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b64031310d740c9173bacd04f1a6202a2bd5cf65 Author: Simon Wilkinson Date: Sat Jun 26 15:55:29 2010 +0100 RPM Packaging: All debug kernels are bad We can't build against any of the recent Fedora debug kernels, because they have options enabled that make criticial symbols GPL-only. Just skip all debug kernel variants, rather than having to explicitly list each new Fedora release as it comes out. Change-Id: I8ed4c04b10facc79fd5a68888ddb10b368b49bef Reviewed-on: http://gerrit.openafs.org/2263 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 33872fbe570a4b86adb0ea2d5e407ca1ec9cf00e Author: Simon Wilkinson Date: Sat Jun 26 15:54:05 2010 +0100 RPM Packaging: Add support for Fedora 12 and Fedora 13 Add support for building for Fedora 12 and 13, both i386 and x86_64 Change-Id: I2bb6e86ac81eeae720b8dbf185927f6e55be826c Reviewed-on: http://gerrit.openafs.org/2262 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 370872207820e08eb58f497b4a0a49c28b18077d Author: Simon Wilkinson Date: Sat Jun 26 15:35:07 2010 +0100 RPM Packaging: Skip comments in configure.in Skip comments in the configure.in file, so we don't end up using the commented out version information. Change-Id: I14bef1d448b77c915aa04b3fe555b270ce20ac67 Reviewed-on: http://gerrit.openafs.org/2261 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fc76d416bb4f37bf55bd088f4b9893f52e097990 Author: Andrew Deason Date: Mon Jun 14 11:01:06 2010 -0500 Remove semicolon from AFS_NORETURN AFS_NORETURN had a trailing semicolon, which will confuse potential future additional attribute markers, if used after AFS_NORETURN. Remove it. Change-Id: I21fd6b874728b8ca74d0e8abd783cd5015f63e97 Reviewed-on: http://gerrit.openafs.org/2258 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 19531fb40013bce9584e1f4873724d4fa1aa6bf4 Author: Andrew Deason Date: Fri Jun 25 11:38:37 2010 -0500 ptserver: Remove IP_WILDCARDS symbol ptserver defined the symbol IP_WILDCARDS to enable the use of wildcarding in machine entries. It is always enabled, so just remove the symbol and always use the wildcard code. Change-Id: I7d45de5ef1bb0d2c95f1e1ea86fd4418cf3ddd62 Reviewed-on: http://gerrit.openafs.org/2253 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9796686c19152f8e3ccfd6b2d41a46976a3a271b Author: Andrew Deason Date: Fri Jun 25 11:30:15 2010 -0500 ptserver: Use unsigned addresses Use unsigned IP addresses in ptserver code. This alters some prototypes in the public ptuser.h header. Change-Id: Id121f32cb0b6acd575822d37bbd814636023e9ae Reviewed-on: http://gerrit.openafs.org/2252 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fbe5c7f7073324fc80ee0a80ca97e8c1980a3c95 Author: Andrew Deason Date: Fri Jun 25 09:48:38 2010 -0500 rx: Use unsigned addresses RX sometimes uses afs_int32 to represent IP addresses; make it use afs_uint32. This alters some structures in rx.h and some prototypes in rx_prototypes.h. Change-Id: I97df8a5de8f5e0355ab2056825de68bb7122e439 Reviewed-on: http://gerrit.openafs.org/2251 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3bff5ca0b69a23c709123338400e53bb3c00d9e8 Author: Andrew Deason Date: Thu Jun 24 10:19:21 2010 -0500 volser: Use unsigned addresses and volume IDs Fix code and header files in src/volser that use afs_int32 for server IP addresses instead of afs_uint32 (the worst offenders being UV_* functions). Also fix an instance of afs_int32 being used for a volume ID, and remove 'struct volser_dest' instead of fixing it, since it is completely unused. Change-Id: I1008ed158855c2a22b4605b5a037f5e68731529e Reviewed-on: http://gerrit.openafs.org/2249 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f91925aa06757c93f3b2061492f25740390296c4 Author: Matt Benjamin Date: Thu Jun 24 08:51:06 2010 -0400 windows add rx_Get/SetServiceSpecific to libafsrpc module exports Add rx_GetServiceSpecific and rx_SetServiceSpecific to afsrpc.def using the next available ordinals (267 and 268). Change-Id: I31af43e9706b922ef765a51f50f583f492ce375a Reviewed-on: http://gerrit.openafs.org/2245 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f9c9b78a2c3e7167f22af6af813a3902af4e5e3d Author: Simon Wilkinson Date: Thu Jun 24 16:00:22 2010 +0100 Linux: Check return code from VerifyVCache in mmap afs_linux_mmap wasn't doing anything with the return code from afs_linux_VerifyVCache. Change the code so that it matches the other callers of afs_linux_VerifyVCache Change-Id: I83b949bf3b9579e5dd2e20b487862566c1d7c730 Reviewed-on: http://gerrit.openafs.org/2247 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4c89b6417fc488552ca319a895046118cc1f679c Author: Andrew Deason Date: Wed Jun 23 17:42:30 2010 -0500 Remove stale warning suppressions butc/dump.c and ubik/beacon.c have had their warnings fixed and their suppressions removed. Remove the warning suppression for tbutc/dump.c and tubik/beacon.c, as well. Change-Id: Ie3cae93932797ef5a55403f3548518af6da267f0 Reviewed-on: http://gerrit.openafs.org/2242 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 24e1c7e30fe25d80ec362d887b52b0f3f50ac8b0 Author: Jeffrey Altman Date: Wed Jun 23 12:56:17 2010 -0400 Windows: Cleanup of src/config/NTMakefile src/config/NTMakefile had the following issues: * duplicate entries for headers in $(INCFILES) * no clean: rule for $(INCFILES) * no clean: rule for $(DESTDIR)\util_cr.exe * $(INCTOOLS) dependent upon $(INCFILES) but the order is reversed in the install: rule Change-Id: I2707009d60b303ab897ed25d9245d893fa342a8e Reviewed-on: http://gerrit.openafs.org/2238 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Matt Benjamin Tested-by: Matt Benjamin commit a4b6ac7a4a51c5655d91b971e4cb7d69f7ffc2b7 Author: Matt Benjamin Date: Wed Jun 23 10:26:12 2010 -0400 windows don't include assert.h (and afs support headers) in util_cr.c Don't include afsconfig.h and afs/param.h in util_cr.c, nor assert.h. The assert was included but was in fact not used in the file, and can be ommitted, per jaltman. The OpenAFS includes are then not needed. An incorrect cast is also changed, due to jaltman. Change-Id: I3e1ad7a1d24473d6ad3ce2e401133b25b0a4c795 Reviewed-on: http://gerrit.openafs.org/2234 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5e4c33f5634b85464945524f3b1c7022c3e921ed Author: Andrew Deason Date: Wed Jun 23 17:47:43 2010 -0500 Indicate that fssync unix sockets are the default Using unix domain sockets for FSSYNC has been the default for some time now; make it clear from the configure help output that this is the case. Change-Id: Ibe8b41361242d6cea035b7710910d7d693f60a85 Reviewed-on: http://gerrit.openafs.org/2241 Tested-by: Andrew Deason Reviewed-by: Russ Allbery commit 3a82ec0f8383446da2f15512895b280339602190 Author: Andrew Deason Date: Wed Jun 23 16:23:15 2010 -0500 ubik: Remove api for reading during write locks This reverts commit eaeff661c26b0f5a504a547952ea1d0f0241b539. The code using this API will not be in 1.6. Remove this interface for the 1.6 branch, as it is known to have issues. FIXES 127520 Change-Id: I3dfef084282b0ca8ec968872b433e60f615a9c44 Reviewed-on: http://gerrit.openafs.org/2240 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53febebc8a69c3231fb2c7094294f59b747a6ec9 Author: Ben Kaduk Date: Fri Jun 18 00:05:14 2010 -0400 Try to flush vnodes in FBSD's unmount, bailing if necessary vflush() actually returns something! Check if we get EBUSY, and don't continue if so. Also, actually call vflush on FBSD80_ENV. Note that we currently leak refs on our root vnode, so this means umount will fail unless it uses -f, for now. Change-Id: I8f02ebfa127409f0e8567f3efa7eccf491147cbd Change-Id: Iaa4666f1004b49b69a82c778a3de60633fac880f Reviewed-on: http://gerrit.openafs.org/2214 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 73a3990f44b9aefe9281fae6ab69523a069b4adb Author: Derrick Brashear Date: Tue Apr 27 13:22:37 2010 -0400 mariner log messages for creating and removing files give a hint to event listeners that files are being created and removed Change-Id: I6202184424607e97b7d103a6e7033f950c203cce Reviewed-on: http://gerrit.openafs.org/1852 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c39aee89c0649561041e7d955dd3db40629f2570 Author: Rainer Toebbicke Date: Mon Jun 21 12:02:46 2010 +0200 Don't hold on to the afs_xvcache lock while creating a symlink Holding the afs_xvcache lock over the RPC while creating a symlink is a severe blow to performance as look-ups from other tasks likely require the lock. Drop the lock and rely solely on the fileserver to detect a clash with a same entry created simultaneously. Change-Id: Ia6de353bd9dc003addf5f3be7a8f3e769247a513 Reviewed-on: http://gerrit.openafs.org/2233 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit bd3f8adfe02aa09eedeec3cff824745eb749e473 Author: Andrew Deason Date: Wed Jun 23 10:13:39 2010 -0500 vldb_check: Interpret VLOP_* vlentry flags The flags for each vldb entry can have various VLOP_* bits set to show that the entry is locked, and for what reason. In vldb_check, output these bits symbolically instead of mentioning them in "errorflags". Change-Id: Iee7797bc701742e778391c07936eb771139bc8e9 Reviewed-on: http://gerrit.openafs.org/2236 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ee3d62becab62e2ec083ebe4d1834f232270a525 Author: Andrew Deason Date: Wed Jun 23 09:58:38 2010 -0500 vos: Interpret VLOP_* lock flags When a volume is locked in the VLDB, we are given flags for the reason why the lock was set. Make vos interpret and output this reason. This adds output to any vos command that previously printed that a volume was LOCKED. It now outputs, for example, Volume is currently LOCKED Volume is locked for a delete/misc operation Change-Id: Ie3a6f804a3e3a551840975c3689b24d3916891df Reviewed-on: http://gerrit.openafs.org/2235 Tested-by: Andrew Deason Reviewed-by: Jason Edgecombe Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c0d9cf1e411265c56a74d76dd418bc533afdde8 Author: Rainer Toebbicke Date: Tue May 4 12:06:55 2010 +0200 patch cbd_printCBcrash - harden callback debugging Create callbackup dumps with updates locked out and add bounds checking and loop detection to the cbd program. Change-Id: I927937aef33dca261877b8f2605239f3d4763a8a Reviewed-on: http://gerrit.openafs.org/1902 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e489c44328b12637162f0a62f92f1f9b95279428 Author: Rainer Toebbicke Date: Tue May 4 14:11:30 2010 +0200 Do not corrupt volume linktable when special file already exists Upon volume creation, when a special file unexpectedly exists, e.g. due to a failed cleanup, do not blindly assume that it is the link table. Otherwise the latter's magic will get silently overwritten. Change-Id: Iba05ae771e04272a3dab5534fcfc24cda5ee7df5 Reviewed-on: http://gerrit.openafs.org/1903 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95636c6fac3c67d0c14dfb5f53c594f942aa9b78 Author: Andrew Deason Date: Fri Nov 27 17:56:19 2009 -0500 Make ubik use unsigned addresses The ubik code currently treats IPv4 addresses as both signed and unsigned 32-bit ints. Make some instances use unsigned ints to make ubik more consistent and squash a couple of warnings. Note that this slightly alters the signatures of the public ubik functions ubeacon_InitServerListByInfo, ubeacon_InitServerList, ubik_ServerInitByInfo, ubik_ServerInit, ubik_ParseClientList, and ubik_ParseServerList, to use unsigned addresses. Change-Id: I27b6170d4de0080bf66d51a6b5332e65685ddef8 Reviewed-on: http://gerrit.openafs.org/875 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8db0c3823590e0bb7b41a9d0f48ed333067bab7e Author: Andrew Deason Date: Mon May 17 15:44:50 2010 -0500 Mention that -fakestat fakes local cellular mounts The afsd man page says that -fakestat only fakes stat information for cross-cell mount points. Technically it fakes stat information for all cellular mount points, local or foreign. Most people shouldn't care, but note the difference, since some places do have local cellular mount points. Change-Id: I9bc61a0284b7d04439578a4fc5a6adf791217463 Reviewed-on: http://gerrit.openafs.org/1979 Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 8c633162b98f4aebd3449684574f8a35c9e0fa58 Author: Davor Ocelic Date: Sun Jun 20 15:38:14 2010 +0200 Provide manpage for fssync-debug and most subcmds This is another patch in the series to provide manpages for dafs-related commands. Most (if not all) documentation is coming from source documentation and DAFS articles/presentations. The primary motivation behind this is to comply with Debian guidelines requiring all binaries to have respective manpages. This patch has been sitting here for months, so it's good time to finally submit it. Note that fssync-debug also supports some vcg* commands, for which I was not able to find any documentation I could use. So, they are still left to be documented. Change-Id: I9d067766e2a90b26646edc87f15a4f533c5c8d44 Reviewed-on: http://gerrit.openafs.org/2220 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 20bf8feacddea0000578bacf5789e288d99596c5 Author: Derrick Brashear Date: Tue Apr 27 23:48:36 2010 -0400 no fs sa /afs in dynroot mode change the quick start guide so people stop asking why they can't set the ACL on /afs. Change-Id: Iffc6c95564e99c01cef1b2b54d6b35e9bd01f38c Reviewed-on: http://gerrit.openafs.org/1872 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 52ac633da7735c297fa8c43bf9098a6fe0f5beb2 Author: Andrew Deason Date: Fri Jun 11 17:40:18 2010 -0500 vol: break callbacks when needsCallback is set The needsCallback vol header field indicates that a volume has been altered by a non-fileserver program somehow, and that callbacks for the volume should be broken. So, when we attach a volume that has this flag set, break callbacks if we can. If we are not the fileserver, tell the fileserver over FSSYNC to break callbacks if we can. Change-Id: I1b1a4042f0381e8291a407b54ce9478877dacdca Reviewed-on: http://gerrit.openafs.org/2211 Tested-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 899e0385efb0d0ed9d126bdfc0db2602b225db8b Author: Derrick Brashear Date: Tue Jun 22 11:52:48 2010 -0400 rx mtu ping timing tweaks avoid potentially sending pings too often. if we aren't desperate, push out grow mtu pings to just inside call timeouts. Change-Id: Ieb28700fd02894f3308123c8f64a1ec5ae7989d9 Change-Id: I3a3557680f5486474165567786f9a2da58f34519 Reviewed-on: http://gerrit.openafs.org/2228 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6ed90d5c2d8ebce40aa9d623d9875b0aecf4d986 Author: Marc Dionne Date: Tue Jun 22 17:37:15 2010 -0400 Fix CHush test The compiler flagged this with a warning, and depending on the flags that are set, the test may not give the expected result. Use parentheses to get the intended precedence. Change-Id: If0311aae70d6e71b69e247e5b66e0dd558c2c958 Reviewed-on: http://gerrit.openafs.org/2232 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d8237165f73fec8eb51a96417c4cb5e9fbc09d65 Author: Derrick Brashear Date: Sat Jun 19 11:26:49 2010 -0400 afsd -dynroot-sparse mode for hushed cells if an admin specifies -dynroot-sparse (instead of dynroot) come up with just local cell and cell aliases showing. cell list is configured as normal. fs newcell works as normal. document it. Change-Id: Ie644ed0f9923a85da5451eafaa114ddf36daa671 Reviewed-on: http://gerrit.openafs.org/2217 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 19869b100cc144422f2e5e845773d92082a32e40 Author: Derrick Brashear Date: Mon Jun 21 01:06:38 2010 -0400 test suite warning safety make test suite compile without warning Change-Id: I4e4b63d6ce2ae73e5458913aa81308b2691044a9 Reviewed-on: http://gerrit.openafs.org/2223 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9bb0274398a0e9f6aff7714014e3eefbd77df827 Author: Andrew Deason Date: Fri Jun 11 17:39:32 2010 -0500 salvaged: Break volume callbacks on vol change The salvager code can change a volume in many ways as it fixes errors. We should break callbacks on the volume whenever we change it, as clients may have callbacks on whatever we changed. So, for the salvageserver, send an FSSYNC command to the fileserver to tell it to break callbacks for that volume. FIXES 127030 Change-Id: I1cd869371167df7d4e55ac14400865fb0a9c5154 Reviewed-on: http://gerrit.openafs.org/2210 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1f2b84f1b64625af449070eccb64639d6a8f0a12 Author: Ben Kaduk Date: Sun Jun 20 18:54:26 2010 -0400 Simplify preprocessor logic in afs_pioctl We had identical code in two branches of an if/elif/else path. Merge them together. This allows two DARWIN80_ENV blocks to be coalesced; reindent them correctly while we're here. Change-Id: Icaa047994ec970ee8187a7811ee69de2f36a0503 Reviewed-on: http://gerrit.openafs.org/2222 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit df38462c64c244d97a56e9bbd0902173adb091a1 Author: Andrew Deason Date: Fri Jun 11 17:18:07 2010 -0500 Set VolumeChanged when we create a new root dir Set the VolumeChanged flag when we create a new root directory in a volume when salvaging, since doing so changes the volume. Change-Id: Ic6cd0b0d6f9b52f2006a114269321a38d312ab9b Reviewed-on: http://gerrit.openafs.org/2212 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 591f9b6de9ab3dc5c17ad41af0241527f7f04b31 Author: Andrew Deason Date: Mon Jun 21 17:28:10 2010 -0500 vldb_check: ntohs ubik header size The 'size' field in the ubik header is only 16-bits wide. So, we must use ntohs to convert it, not ntohl. Without this, vldb_check would emit false-positive "Ubik header size is 0" warnings. Change-Id: Iaa06b6dc58b7812b359d6096c112e1f3897c60e2 Reviewed-on: http://gerrit.openafs.org/2226 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a1efd664b08c96952d987ab8d7b5fd42c0a5526 Author: Andrew Deason Date: Mon Jun 21 15:47:06 2010 -0500 ubik: Do not hide ReplayLog errors For some reason, the ReplayLog code was printing encountered errors in the replay log as debug messages. Print them out as regular log messages instead, since these are errors that at least warrant visibility, if not more action. Change-Id: Ifba22278e2f5f33010b87eebfc484ccd3745f916 Reviewed-on: http://gerrit.openafs.org/2225 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eec0d94f519b3e27f255b9b7a637df043951424e Author: Andrew Deason Date: Fri Jun 18 17:20:22 2010 -0500 ubik: ntohl on reading the replay log When attempting to read the replay log, ubik was not ntohl'ing all integers that were read in from the log, causing the log to appear invalid on little-endian systems. Fix it. This problem manifests as apparent corruption in the database on top of ubik when a commit is occurring when we are shut down, or a disk error is encountered during a commit. Change-Id: I82e04c59d0f55aa2105b02feb6ee332ea85eb4f3 Reviewed-on: http://gerrit.openafs.org/2224 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5f66bed5eb46b992600b7b8e3ae108d0570ac220 Author: Davor Ocelic Date: Sun Jun 20 15:27:06 2010 +0200 Update manpage links, fix doc typo in fssync-debug Change-Id: I93a4fc4c998e489c6bdc736f0f4172c752d9f030 Reviewed-on: http://gerrit.openafs.org/2219 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 307fb143617e0ad59220275c83dc4ea84e495852 Author: Derrick Brashear Date: Sat Jun 19 13:08:43 2010 -0400 update macos readmes no more APSL source is used. also, reboots are not required. Change-Id: I61217b557c6193c922bc1b72b41e076e81db49e5 Reviewed-on: http://gerrit.openafs.org/2218 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f8981f18dfdd5ae9efd03b9d247238dd83f46506 Author: Ben Kaduk Date: Thu Jun 17 00:27:51 2010 -0400 Fix aklog segfault In auth_to_cell(), we only strdup() into the linkedcell argument if there is a linkedCell in the current cellconf. However, in main(), we free linkedcell if it is non-NULL, but it is allocated on the stack and could contain garbage. free() chokes on such garbage, causing aklog to abort(). If we copy nothing into linkedcell, set it to NULL so that we do not attempt to free the bogus pointer. Change-Id: I92905a5f17021ce1bc41909f5ceb1b0344456d93 Reviewed-on: http://gerrit.openafs.org/2213 Reviewed-by: Jeffrey Altman Reviewed-by: Russ Allbery Tested-by: Benjamin Kaduk Reviewed-by: Derrick Brashear commit 196d2c7f9e3250008bf6aed2e172ec6d54e4ffb7 Author: Simon Wilkinson Date: Fri Apr 23 18:39:14 2010 +0100 Linux: Remove the BKL Recent investigations suggest that we no long require the BKL on Linux. As an experiment, remove it. Change-Id: I764fe1f6e9761ada5a0a86ba59450c0615bb1e78 Reviewed-on: http://gerrit.openafs.org/1823 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 77ebaaf639c325a8a51afdc70832ea7ed73d02a8 Author: Russ Allbery Date: Tue Jun 15 18:59:22 2010 -0700 Remove configure remnants of Digital UNIX / Tru64 client Remove the configure flag to specify the location of the Digital UNIX kernel headers and some setup for the kernel module build. Note in README that Digital UNIX / Tru64 is supported for servers only. Change-Id: I983f74068b1a1ae76d9a2b2549a8a141dba4e075 Reviewed-on: http://gerrit.openafs.org/2207 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1a50290e6e43f2eef323cfaffdfa3fc54bfdf5c Author: Chaz Chandler Date: Mon Jun 14 00:21:50 2010 -0400 IRIX: Implement makesname() makesname() make a semaphore name for use in -type routines on IRIX. It takes as input a pointer to an allocated string buffer (sname) of size METER_NAMSZ, a string prefix (prefix), and a vnode number (v_number). When complete, sname is returned, pointing to the beginning of a NULL-terminated string containing the new name, with a maximum of (METER_NAMSZ-1) characters plus the NULL. The name is a concatenation of the string at 'prefix' and the ASCII representation of the number in 'v_number'. Note: Due to IRIX's use of uint64 to represent vnumber_t and a maximum semaphore name length of 15 (METER_NAMSZ-1), this function cannot be guaranteed to produce a name which uniquely describes a vnode. makesname() is already called from afs_vcache.c but not (or no longer) available / implemented elsewhere. Change-Id: I4331c161b68b39a4c067691c97363b637d13ff15 Change-Id: Ia0a615426dc05e01a98e53e89ec3bae3726cac34 Reviewed-on: http://gerrit.openafs.org/2155 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 7759e837953fdaf4027474190b865cacb4d1b0fb Author: Chaz Chandler Date: Mon Jun 14 00:18:29 2010 -0400 IRIX code cleanup Fixes a few small errors in IRIX-specific code sections Change-Id: I83e0ca1510eb2d122b9b001f5793f63dabc6ddf1 Reviewed-on: http://gerrit.openafs.org/2154 Reviewed-by: Derrick Brashear Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler commit 10ada52c26ac3aa13112a91ad201dd3203bb70f8 Author: Andrew Deason Date: Tue Jun 15 12:19:25 2010 -0500 Do not assume non-valid addrs in addr hash table As part of host state verification, we were calling h_stateVerifyAddrHash to verify that all addresses for a host were in the address hash table. The problem with this is that interface addresses that are not marked as 'valid' are intentionally not in the addr hash table. So, any time there was a non-'valid' interface address in the host state, we stood a very good chance to fail to verify the state. Instead, if we have a non-'valid' address, try to verify that it is _not_ in the addr hash table (or at least, is not pointing at the host with the non-'valid' interface addr), since they're not supposed to be in there. Change-Id: I02fb0f516fa3ef384471d19bb1b970cfd8aff874 Reviewed-on: http://gerrit.openafs.org/2205 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4481a22dc7fa48c7a057f27828da44ab0b4dbf26 Author: Andrew Deason Date: Tue Jun 15 10:58:58 2010 -0500 Make h_stateVerifyAddrHash log port on errors When h_stateVerifyAddrHash logs that an error in state verification occurs, it was only logging the address of the host causing the problem. Log the port, too, since there could be multiple hosts with the same address. Change-Id: Ideee34f075948a0cb7cc1014920be5e120bdc6ef Reviewed-on: http://gerrit.openafs.org/2204 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6dc50767f88795858783fe9dbbdf90901f1fd684 Author: Russ Allbery Date: Thu Jun 3 19:50:14 2010 -0700 Fix aklog warnings when building with Heimdal Fix various warnings in the aklog and klog code when building with Heimdal. Use krb5_get_init_creds_opt_alloc if it's available rather than allocating the struct off the stack, since the _opt_init function is deprecated. Change-Id: Ieff986121de9078e9402b0a51a8855655330caba Reviewed-on: http://gerrit.openafs.org/2082 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9784847fedee9540a210f272e3c38862ba1903ea Author: Russ Allbery Date: Tue May 25 22:19:14 2010 -0500 Rework the Kerberos Autoconf probes Previously, building with Kerberos support required either passing a flag to configure giving the location of a krb5-config script, or manually setting variables specifying the Kerberos libraries and header path. Replace that code with code that checks for Kerberos libraries automatically and builds the Kerberos code if any were found, with support for doing direct library probing if there is no krb5-config script. Add several platform-specific overrides directly into the configure support, so we should be able to build out of the box on Mac OS X 10.3, HP-UX, and AIX Kerberos with the new probes. The Kerberos Autoconf macros are now the versions that come with rra-c-util and are tested with multiple other packages, so both OpenAFS and those packages will be able to benefit from further portability improvements. Update README for the new building instructions, documenting how to configure the Kerberos probes if they can't automatically figure out the location and flags for Kerberos on your system. Change-Id: Ia35bb0dbc6b94c6b4dfe8165388447dbfcb31a29 Reviewed-on: http://gerrit.openafs.org/2026 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 581aafaa698e395bfcfb7b82b595fbdef4b11279 Author: Andrew Deason Date: Tue Jun 8 17:28:39 2010 -0500 GetVolume: do not wait for offlining volumes In non-DAFS GetVolume, previously we waited for a volume with vp->goingOffline set to go offline before we return. However, the fileserver afsfileprocs.c case can treat the "going offline" case and the "is offline" case identically, so there is no reason to wait. So make the fileserver call a new GetVolume variant that does not wait. Without this, all of the threads in the fileserver can potentially be tied up by waiting for a volume to go offline, if the volume is taking a long time to go offline due to an offline request following a client slowly accessing the volume. Change-Id: I58ae11e585852130154389d8df0567432cd0c2df Reviewed-on: http://gerrit.openafs.org/2124 Reviewed-by: Derrick Brashear Reviewed-by: Tom Keiser Tested-by: Derrick Brashear commit d7c79cec8295dd34fb97e6f22bfcc69dccb9f4c4 Author: Andrew Deason Date: Tue Jun 15 12:33:48 2010 -0500 afscp: Correctly advertise local addresses afscp was reporting its local address list in net-byte order, and then giving that list as a response to RXAFSCB_WhoAreYou. Instead, convert the addresses to host-byte order, since XDR takes care of endianness foo. Change-Id: I5d7d57f811ccaeada235e694ec5f343c1ac535b7 Reviewed-on: http://gerrit.openafs.org/2206 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b958626014b9fabb7bd4c4b925838462dc09d82 Author: Jeffrey Altman Date: Tue Jun 15 07:32:11 2010 -0400 mkvers.c - remove afsconfig.h, afs/param.h and assert.h assert() is not used within mkvers.c. afsconfig.h and afs/param.h have dependency problems in src/config/ Change-Id: I2012a01c87cbd993a70df76ee3384b43ff037b29 Reviewed-on: http://gerrit.openafs.org/2203 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3d55face7e3a2e1d0f6253e686cc9b1e84d4dfc Author: Andrew Deason Date: Mon Jun 14 13:28:37 2010 -0500 Fix tptserver and tvlserver install rules Commit 00c37e8634b97dba3431804cea467a046be525d5 introduced a few usages of 'ifeq' in cross-platform Makefiles, breaking the build when not using GNU make. Fix this by making the tptserver and tvlserver 'install' and 'dest' targets behave more like the 'ptserver' and 'vlserver' ones, and correct the ptserver 'install' target while we are here. Change-Id: Ia3fd9149c0f18a96a9899a5dfde41e53a45102b7 Reviewed-on: http://gerrit.openafs.org/2160 Tested-by: Andrew Deason Tested-by: Benjamin Kaduk Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7620e48414e7826f50a5dba86c5544512ac8a879 Author: Andrew Deason Date: Tue Jun 8 17:19:46 2010 -0500 Cleanup and doxygen-ify the comments for GetVolume Change-Id: I54788acd83779b986e78575bde11347952293be6 Reviewed-on: http://gerrit.openafs.org/2123 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a62de618552bd3a3ccb5d1988fd3b5b82cb5124f Author: Russ Allbery Date: Mon Jun 14 15:28:20 2010 -0700 Build util tests properly with make check If one runs make check without previously running make at the top level first, it didn't build the util test programs properly. Recurse into subdirectories for make check as well, and add the check, test, and tests targets to tests/util/Makefile.in Change-Id: Idc2caf4cf83a48da350e724aba2ac1228795085d Reviewed-on: http://gerrit.openafs.org/2162 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9316f209eda47362d7b96464b1fff4bd5b086da7 Author: Jeffrey Altman Date: Mon Jun 14 14:13:11 2010 -0400 Windows: ensure that afsconfig.h and afs/param.h are included The recent addition of AFS_NORETURN broke the Windows build because afsconfig.h and afs/param.h were not included everywhere. Make sure that they are. Change-Id: I5962fe1178f73273f5b3c1d269b1a125fba2d2c6 Reviewed-on: http://gerrit.openafs.org/2159 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9579d09533d4f94c38bb4755c6df90552483b7b6 Author: Jeffrey Altman Date: Mon Jun 14 13:36:32 2010 -0400 Windows: fix definition of lstat() macro The lstat() macro definition has to take into account the version of the compiler and the size of time_t. Change-Id: Id7ad8c3956bba9832cc028db628cfabe58a1d8d9 Reviewed-on: http://gerrit.openafs.org/2158 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9b1f0e90bf0b7bb6c2d018bb9a65986f4039e4ef Author: Jeffrey Altman Date: Mon Jun 14 13:35:12 2010 -0400 Windows: define errno_t on compilers older than 1400 Visual Studio older than 1400 (VS8) does not define errno_t. LICENSE MIT Change-Id: I27c0892d8ba4a371417f635b0d6e5677fa655422 Reviewed-on: http://gerrit.openafs.org/2157 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit eaeff661c26b0f5a504a547952ea1d0f0241b539 Author: Andrew Deason Date: Thu May 20 15:22:11 2010 -0500 ubik: add interface for reading during write locks Add ubik_BeginTransReadAnyWrite, which allows for reading from the database, even while there is a conflicting ubik write lock. Reads are still blocked while the local database is updating due to a write transaction commit. Change-Id: I5604fa3cc8a334606f5e3535aed6f6cedcb5f167 Reviewed-on: http://gerrit.openafs.org/2103 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b8177960d4e376011adf379b87d8b8ba051c0fd0 Author: Derrick Brashear Date: Sun Jun 13 22:05:27 2010 -0400 arm darwin port make things buildable on arm darwin Change-Id: I88af2b82e9ed356fd57aa8f05dfee71d7fa6cd8a Reviewed-on: http://gerrit.openafs.org/2153 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f790747143372e307dd285b08c270650dd9c5c12 Author: Derrick Brashear Date: Sun Jun 13 11:03:25 2010 -0400 ktc newpag stub when environ is not supported on macos systems where we can't get the environment, just return from ktc_newpag Change-Id: I9a169d0bf035c40d727a386bb3d2070eea225ed4 Reviewed-on: http://gerrit.openafs.org/2150 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8af23688c0a2250f64e6a7b8794fde77ae9394b4 Author: Derrick Brashear Date: Sun Jun 13 10:57:38 2010 -0400 darwin afsd include cleanup remove mach port stuff from non-kernel version (it's for DiskArb) remove sysconf, iokit, corefoundation, dns_sd from kernel version. Change-Id: Ibdf9d8a71f5f0fee659d0c05eea4811617c2b34f Reviewed-on: http://gerrit.openafs.org/2149 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cc9d358cd83c0e542b57ac6c25cb27824b638c32 Author: Marc Dionne Date: Sat Jun 12 19:43:05 2010 -0400 Linux: Fix RCU_READ_LOCK test The names of some configure defines changed with the recent autoconf cleanups. This one was missed and was left with the old value. Change-Id: Ibce5e36b8ae6becdfa61bf6e9c440b3d9a6fa272 Reviewed-on: http://gerrit.openafs.org/2130 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear commit 1486563b2b6dc3b7d1f598aa963bd4e0f84bdb52 Author: Derrick Brashear Date: Sun Jun 13 10:54:50 2010 -0400 afsd mill dup sys/mount.h include we include sys/mount.h twice. don't. Change-Id: Ifc872488086a00d32b564d60a5f9a8b374e8f752 Reviewed-on: http://gerrit.openafs.org/2148 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3514c22d061171a1557509a728bc1fd523c9b956 Author: Derrick Brashear Date: Sun Jun 13 09:49:32 2010 -0400 generated file target in order to cross compile, allow a way to generate generated files on the host Change-Id: I9639f350b179dbeb3d45802e8685da88a3b06c83 Reviewed-on: http://gerrit.openafs.org/2147 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit de75d9d8aa490935ec65947fc6d82a19f936b119 Author: Derrick Brashear Date: Sun Jun 13 01:51:30 2010 -0400 buildtools target if you wish to cross compile, you want these things. arrange to be able to build just them Change-Id: I6bee40b61a16722c402832bba39d2e88dcabec25 Reviewed-on: http://gerrit.openafs.org/2145 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d26f5e158cffa313d0f504e7ba3afc1743b5d1ef Author: Derrick Brashear Date: Thu Jun 10 14:47:24 2010 -0400 unix cm activate mtu pings set an error code so idle dead time is enforced on sending. needed in order that MTU pings be activated. Change-Id: I8cf1ca81e6519b440fc679e85f327f338400c29a Reviewed-on: http://gerrit.openafs.org/2116 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c7f9307c35c0c89f7ec8ada315c81ebc47517f86 Author: Derrick Brashear Date: Thu Jun 10 14:37:39 2010 -0400 rx mtu ping handling engage mtu pings. only occur while a call is active but results are cached per-peer. requires idle dead time to be in use, or does not activate. (needed to time out the call, otherwise, keepalives will succeed and the call will thus not hit regular "down server" timeout) Change-Id: Ic29b1b5713fb6debde14f4adfd5019ee80cc9e3c Reviewed-on: http://gerrit.openafs.org/2115 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c62cb89abb494630c12994f702d6986de2a38fe5 Author: Derrick Brashear Date: Thu Jun 10 11:41:23 2010 -0400 path mtu don't track nonsequenced packets for the purpose of mtu discovery, we need a sequence number to correlate if a large packet is acked. don't track sequence number 0 packets. a later change adds the mechanics needed for MTU pings Change-Id: I83d4466115bbd45acdc2777bfbef0ff393dd5a3f Reviewed-on: http://gerrit.openafs.org/2114 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit be035b08248fa3e1f31f6911e9dc877eb5d53f82 Author: Derrick Brashear Date: Thu Jun 10 11:37:35 2010 -0400 rx checkcall kill extra indirection on call for conn we already set a local variable, conn, to call->conn. use it instead of dereferencing call->conn repeatedly Change-Id: I5d38edc1d3507a717598140393094b1ba22ced46 Reviewed-on: http://gerrit.openafs.org/2113 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear commit 658d2f47281306dfd46c5eddcecaeadc3e3e7fa9 Author: Derrick Brashear Date: Thu Jun 10 11:34:39 2010 -0400 idle dead time track less retransmits don't count as sends for idle "send time" purposes. neither do ping acks. disallow both in computations. Change-Id: I599bb1111189efd21580d357c31c043f2315f910 Reviewed-on: http://gerrit.openafs.org/2112 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear commit ab45d1adc11c756f426baa076ab423b4e969b5d5 Author: Derrick Brashear Date: Thu Jun 10 11:24:09 2010 -0400 unix cm log path mtu warning when retrying if RX_MSGSIZE is analyzed and we'd retry, so indicate to our users Change-Id: I77aba5dffd4280e0ee43383cadb34aca4042cbd6 Reviewed-on: http://gerrit.openafs.org/2117 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit f2f3c24b2c374e4c7e2b53cacc4959f592b8310b Author: Matt Benjamin Date: Sun Jun 13 18:16:37 2010 -0400 mcas fix gc_get_tag return type The return type from gc_get_tag is char * LICENSE BSD Change-Id: If15259858b84f71d969f1e7713371f3de4e0c3a5 Reviewed-on: http://gerrit.openafs.org/2151 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 77684b64dbf721a9a5d41aa1c70fd175fd27b329 Author: Matt Benjamin Date: Sun Jun 13 18:24:48 2010 -0400 mcas cleanup inc/dec macros fix type of intermediate value used in CAS operations, and reformat slightly. LICENSE BSD Change-Id: If49be8e020e0f735d67290440b1a74caccf90bf0 Reviewed-on: http://gerrit.openafs.org/2152 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9baec50e7bfa0d900bc33d91a277f24e72889e40 Author: Simon Wilkinson Date: Sat Jun 12 10:42:43 2010 +0100 libadmin: Don't dereference NULL pointer in cmd If DoBosHostList ends up being called without the -server argument in its command structure, then a printf will attempt to dereference a NULL pointer to the -server field. Caught by clang-analyzer Change-Id: I1114406d03b265f4d780efd8e84fea53013cb51c Reviewed-on: http://gerrit.openafs.org/2143 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 904c9fbebab97b760dd853fa393e1c576c7db00c Author: Simon Wilkinson Date: Sat Jun 12 10:35:34 2010 +0100 fs: Can't use store behind data if pioctl errored If the call to a pioctl returns an error, it's possible to reach the end of the storebehind function and try and print an old, or bogus, value from the pioctl data block. Caught by clang-analyzer Change-Id: I1209c0c24730273510fbad98a75a429917836605 Reviewed-on: http://gerrit.openafs.org/2142 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6dd07af215e2cc75cb7c902b5a06920a5ee5235c Author: Simon Wilkinson Date: Sat Jun 12 10:26:09 2010 +0100 viced: CopyOnWrite2 shouldn't return undefined val Unless CopyOnWrite2 encounters the condition where (rdlen != length) || (wrlen !=length) it will never set a value for the 'rc' return code, and so return with an undefined value. Looking at the code, it looks like rc should be 0 in all other situations, so this patch provides a default value. Caught by clang-analyzer Change-Id: If3e528f3d66abb3dde6da2304084f7698c05b863 Reviewed-on: http://gerrit.openafs.org/2141 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0deaa4d58cdd0af2b402e06df1edd0cf4d49074c Author: Simon Wilkinson Date: Sat Jun 12 10:25:07 2010 +0100 Formatting fixes Reformat the CopyOnWrite2 function to match our current coding style Change-Id: I9483c2d391932d675c6c76d6edbb2b8f519b2568 Reviewed-on: http://gerrit.openafs.org/2140 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e35e0b732db1132de4b5f9af050cf6939792ef8e Author: Simon Wilkinson Date: Sat Jun 12 00:23:22 2010 +0100 vol: open() needs mode if called with O_CREAT If open() is called with a the O_CREAT flag, then it requires a 3rd argument, containing the mode with which to create the file. On DARWIN (when we always use O_CREAT), and on other platforms where the first call to open returned E_NOENT, we weren't doing this, and so were presumably getting a random mode of whatever garbage was on the stack. Caught by clang-analyzer Change-Id: Ic173e582e0d46f6d4cf8801dc7a6b4b393db5063 Reviewed-on: http://gerrit.openafs.org/2139 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c880fe7740864daca59b93d35055c1973d9382a9 Author: Simon Wilkinson Date: Sat Jun 12 00:16:11 2010 +0100 audit: result is only used on AIX The 'result' variable is only used on AIX - only bother assigning it when we're building there. Caught by clang-analyzer Change-Id: I06848837282ff3f318474f55f2ee013255ad37c8 Reviewed-on: http://gerrit.openafs.org/2138 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 713b65adaa756b5a66ccb0620d5f2bc50642f2f1 Author: Russ Allbery Date: Sat Jun 12 16:07:52 2010 -0700 Avoid off-by-one error when saving the password in klog When klog saved the password entered by the user to allow attempts at multiple AFS principals without reprompting, it copied the whole buffer according to the declared reply length into local storage. This was done without regard to the local allocated storage size, and was then nul-terminated without regard to the allocated storage size. Both klog and Heimdal use a size of BUFSIZ for the reply buffer by default, which meant that klog on Heimdal was writing past the end of the allocated structure when nul-terminating the password. Store our allocated buffer size in the struct and only copy at most one fewer than that many characters, and then nul-terminate accordingly. (The assumption that BUFSIZ is always long enough is still bogus, but that's larger surgery.) Change-Id: Ic8d4357aad2f8dfa0fffe9849d2546a88ecd246a Reviewed-on: http://gerrit.openafs.org/2129 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bc8f2bfb1cc78458729ca29c6623adff80237018 Author: Marc Dionne Date: Sat Jun 12 20:43:25 2010 -0400 Linux s390x: replace AFS_64BIT_KERNEL with AFS_LINUX_64BIT_KERNEL The s390x param.h file defines AFS_64BIT_KERNEL, but this looks to be AIX specific, and some Linux headers expect AFS_LINUX_64BIT_KERNEL. This causes many errors because we end up trying to use struct flock64 instead of struct flock. Change-Id: I39a4a94fa895143172c1ee75ff71c2015232156f Reviewed-on: http://gerrit.openafs.org/2131 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0efea8e2b1162ef88ef27daeffa1acb69c850566 Author: Simon Wilkinson Date: Sun Jun 13 01:44:27 2010 +0100 bucoord: Use mkstemp properly Use mkstemp wherever we have it available, to silence warnings about mktemp's safety. When we do use mkstemp, use it properly. It doesn't return void, it returns an open filehandle. Convert this filehandle into a FILE *, rather than throwing it away, and leaking an open file descriptor. Caught by clang-analyzer Change-Id: Ib5864f684c6d5a8686e0a872364a645c90a29390 Reviewed-on: http://gerrit.openafs.org/2144 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad3aa5205b8c4f645881276e4a9b7ce9066c3e96 Author: Simon Wilkinson Date: Fri Jun 11 23:59:49 2010 +0100 comerr: Don't leak CFStringRef If str is NULL on entry to _intlize, than it will leak the CFStringRef that it constructed a few lines earlier. Fix this. Caught with clang-analyzer Change-Id: I6d62e7792918da95e4fed1c676d14ad9124d93fa Reviewed-on: http://gerrit.openafs.org/2137 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5388e1425d361a52728ce113fb31fb27f7e5539c Author: Simon Wilkinson Date: Fri Jun 11 23:50:29 2010 +0100 libadmin: Don't use undefined value If IsValidCellHandle returns false, then we can jump to fail_pts_GroupMemberRemove, and end up using a value for ids.idlist_val which hasn't been defined. Fix this. Caught by clang-analyzer. Change-Id: I030d155f9ad2481250e84c31d4d7d26cb39a9c61 Reviewed-on: http://gerrit.openafs.org/2136 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6c645092eeb9c44d45d5ceab264a360eef7f2536 Author: Simon Wilkinson Date: Fri Jun 11 23:49:34 2010 +0100 Add support for clang compiler attributes Rearrange the way that we define compiler attributes so that we can define them for clang, too. Don't assume that clang will support all of the attributes that gcc does, so split them up into separate sections. Change-Id: Ic6233f5c63a07b3ef99a85ae3be9e45e28387127 Reviewed-on: http://gerrit.openafs.org/2135 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8faceb4ba4c66069a03fc03a57d8b0af03dfbefc Author: Simon Wilkinson Date: Fri Jun 11 23:46:29 2010 +0100 Add AFS_NORETURN macro and use it Add the AFS_NORETURN macro which can be used with gcc compatible compilers to indicate that a particular funciton prototype will not return control to the caller. This both improves code quality, and helps with static analysis. Use this to flag afsmon_Exit, db_panic, osi_Panic, Abort, Exit and the error handlers for osi_Assert and our local assert fn all as being noreturn. Change-Id: Ic6c4ae319af3d6f7665c9ee5072b556c01850982 Reviewed-on: http://gerrit.openafs.org/2134 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 07bd99c9d52712b0282d709d294d33d382dcbe81 Author: Simon Wilkinson Date: Fri Jun 11 23:33:07 2010 +0100 rxgen: Remove inlist from autogenerated code The 'inlist' variable is only used by code that is #if 0, and never emitted by the rxgen source. Remove the definition, and assignment, to this variable. Caught by clang-analyzer Change-Id: Ife162d392a47c48e1eebd75fe2c0af9524cd758a Reviewed-on: http://gerrit.openafs.org/2133 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09e17c245220203b7fc14cb5908f8475d79a0707 Author: Simon Wilkinson Date: Fri Jun 11 22:25:35 2010 +0100 Changes to build with clang on Mac OS 10.5 clang defines __x86_64__ and doesn't define __i386__ when building on a 64bit Leopard machine. Change the defines in param.h so we can build on this platform. Change-Id: Icfc16ca83162e8148d4261207c05d90d12cbabc2 Reviewed-on: http://gerrit.openafs.org/2132 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 084a7f1beb9925372d3d4e0af1a2e3f388bc4a53 Author: Russ Allbery Date: Thu May 27 17:17:43 2010 -0500 Document vos listaddrs -host and -uuid Document the -host and -uuid flags to vos listaddrs. They were mentioned in the SYNOPSIS, but not in the OPTIONS section of the manual page. Change-Id: I96e6b67b7239d9455060fd0c76b8d44f41a010a2 Reviewed-on: http://gerrit.openafs.org/2083 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 2af0cca23b79da3961618640f9b0b2cccbd80bc9 Author: Simon Wilkinson Date: Sat Jun 12 22:59:23 2010 +0100 Linux: Fix set_cr_group_info and cr_group_info Commit dc85abca renamed set_cr_group_info to afs_set_cr_group_info and cr_group_info to afs_cr_group_info, but didn't catch all call sites. In particular, those in the NFS translator, in non-keyring code paths, and in the 2.4 code, were missed. Thanks to Adam Megacz for the bug report on openafs-info. Change-Id: I71f8cc27d499c98d164d05e02f7d5b2c5d4c1933 Reviewed-on: http://gerrit.openafs.org/2127 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dcd3e1fa111d3b6dfeb5965a487285119619f362 Author: Andrew Deason Date: Thu Jun 10 11:51:57 2010 -0500 Do not set inUse for non-fileserver non-DAFS Setting inUse in a volume header to anything besides 1 is a DAFS-specific change. For non-DAFS, non-fileserver programs do not touch inUse. Since inUse is not cleared for non-fileserver non-DAFS, make sure not to set it for non-fileserver non-DAFS. Change-Id: I4d50299d4dc4fd8757906ba493d182b386dd9b1b Reviewed-on: http://gerrit.openafs.org/2122 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit df18c9e895e75e77ed466dea3b06ef2a0a07260a Author: Andrew Deason Date: Fri Jun 11 16:51:02 2010 -0500 vlclient: work with non-space whitespace Make vlclient work with non-space whitespace separating arguments. This also makes it cope with a trailing newline that fgets() gives us, making this more intuitive to use. Change-Id: Ida4da9f997ac073a5afa6c95e1b3cec180c18e1a Reviewed-on: http://gerrit.openafs.org/2126 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 6bc2b1af64a12a0cd3b3792803b71e92099425af Author: Derrick Brashear Date: Fri Jun 11 15:06:24 2010 -0400 dafs state analyzer shouldn't require trailing spaces in commands the tokenizer didn't null out \n, but the strcmps for commands didn't deal, so this basically works badly interactively. all commands not recognized. Change-Id: Ifa7f8c0204a83d27f8876af8de94cb338499cdc0 Reviewed-on: http://gerrit.openafs.org/2125 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f4fb6cd4bf4bbfffef4cd3a9a36b3f5c23d447a9 Author: Andrew Deason Date: Thu Jun 10 10:29:39 2010 -0500 Remove afsio warnings and errors Fix a few warnings and errors in afsio, so it can compile: - inlcude rx/rx_prototypes.h, not rx_prototypes.h - only declare 'code' in SRXAFSCB_TellMeAboutYourself, and the global rx_mtu in AFS_NT40_ENV, since they're only used on NT40 - remove declarations of the unused variables 'host' in HandleLocalAuth, 'i' in readFile, and 'i' in writeFile Change-Id: If39420cca791669200ccb4d3f46aa5ac7eb89c7d Reviewed-on: http://gerrit.openafs.org/2121 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 48d3fd9eedc122dec2c7b76f97078c56a77af89b Author: Matt Benjamin Date: Thu May 27 19:14:20 2010 -0400 windows cm_BeginDirOp add flags (nobuildtree) Add a flags argument to cm_BeginDirOp, and define a flag CM_DIROP_FLAG_NOBUILDTREE which asserts that the operation being synchronized does not require scp->dirPlus to be constructed. Change-Id: Ibc4345574da3c1e7717c83b64a83260f70a3b06c Reviewed-on: http://gerrit.openafs.org/2053 Reviewed-by: Jeffrey Altman Reviewed-by: Asanka Herath Tested-by: Jeffrey Altman commit 60e5d85fd089af9b1efff6ac5b8577c14a04e021 Author: Simon Wilkinson Date: Fri Jun 11 10:48:37 2010 +0100 RX: Can't assert a void result We can't assert(MUTEX_DESTROY(blah) == 0) when the MUTEX_DESTROY macro already returns void (and asserts), as it does in the pthread case. This fixes the build failure introduced by 53c9258cd7300c03be3f3e50003cad3dfc59baf3 Change-Id: I0b7a30e785de3437f0c1e264b4a63c87f63b6783 Reviewed-on: http://gerrit.openafs.org/2120 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 53c9258cd7300c03be3f3e50003cad3dfc59baf3 Author: Matt Benjamin Date: Tue Jun 8 18:29:13 2010 -0400 rx service specific data Adds rx_GetServiceSpecific and rx_SetServiceSpecific to the rx_service interface, conforming to the equivalent calls in the rx_connection interface. For consistency, the implementation strategy is the same. The intended use is to more cleanly support server multiplexing within an RPC-based test dispatch library. Change-Id: I6a8968484efe2c858857008321996e67328bb75c Reviewed-on: http://gerrit.openafs.org/2097 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 157a274b8b1f6c39751d876354e1d8453d66b864 Author: Andrew Deason Date: Wed Oct 21 22:16:38 2009 -0500 Break origin's callback for RXAFS_Rename target When we RXAFS_Rename something, the status of the renamed FID can sometimes change, and thus we break callbacks on it. Currently, however, we do not break the callback for the originating client, even though the status of the target changes and we do not return an AFSFetchStatus to the caller. Since the callback is not always broken for the target, it may not be immediately obvious to client implementations to implicitly break the target's callback. Since we do not have an explicit protocol specification saying that the callback is implicitly broken, break the callback for the origin client as well, to be safe. Change-Id: I97d90518a240f852013d1d63fccef663c8b0e998 Reviewed-on: http://gerrit.openafs.org/709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 92d67bee7aae20498eefb77c06b0a085c5d069ce Author: Andrew Deason Date: Wed Sep 9 15:56:26 2009 -0500 Avoid unnecessarily updating .. in SAFSS_Rename Currently the .. entry for a directory is always recreated on a Rename operation, even if the parent directory does not change. Now, avoid altering the directory at all (including no COW nor DV bump nor vnode modify time update) when we don't need to. Change-Id: I53478ec05e2fc6362836043476ff67e2c41b7feb Reviewed-on: http://gerrit.openafs.org/436 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b9ef2051c5affe597995df530a386baaa9807a9e Author: Jeffrey Altman Date: Wed Jun 9 13:55:14 2010 -0400 Windows: Revise SMB QuerySecurityInfo for MS10-020 MS10-020 (http://support.microsoft.com/kb/980232) has caused many problems for implementors of SMB 1.0 servers and applications that call GetFileSecurity() without checking the return code to determine if the call succeeded. The gist of the vulnerability was that the SMB redirector would pass any buffer it received to the application regardless of whether or not it was valid. MS10-020 protects the applications by strictly validating the SMB response data structure and the data in the security descriptor that is returned. The problem for SMB 1.0 server implementors is that there have been at least three different protocol descriptions for NT_TRANSACT_QUERY_SECURITY_DESC published over the last decade and all of them are incomplete. Therefore, just about no one but Microsoft has an SMB 1.0 server implementation that produces the exact out that they are expecting to validate. The end result is that in an attempt to protect applications from crashing due to invalid input being passed in directly caused dozens of applications to crash by not returning any security descriptor data at all. Even when the applications didn't crash they might not have been able to save their data. Cisco WAAS and NetApp DataOnTap systems were most adversely affected and they have had CIFS protocol licenses for many many years. To fix OpenAFS here is what needed to be done: 1. Instead of returning a security descriptor that gives ownership to the NUL SID, give it to the Everyone SID and set the flag that states that everyone has full access. 2. Validate the input parameters. In particular, check to ensure that the SMB file descriptor is valid and the file has not been deleted. 3. Enforce the maximum output data and parameter counts. 4. Handle buffer overflow and buffertoosmall conditions in the manner that Microsoft expects them to be handled. In particular, note that the parameter data which is returned in the SMB Data Region is not counted in the Data Count. Even if MaxData is 0, we can still return parameters values as long as MaxParm is large enough. LICENSE MIT Change-Id: I95034bc6f24a282decc507edcffb93bc58b986be Reviewed-on: http://gerrit.openafs.org/2110 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Asanka Herath Reviewed-by: Jeffrey Altman commit 368ba0478c79d3ab00b0440ca763babd7583b30e Author: Derrick Brashear Date: Mon Jun 7 00:29:06 2010 -0400 further constrict nat pings one more constrainment of nat pings on unix Change-Id: I8b3db989b0e16a79cd63795147145c5e0ab55e6e Reviewed-on: http://gerrit.openafs.org/2091 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 52ffc6a152fea98c5a4232c9345e7bd89b1c00b7 Author: Russ Allbery Date: Wed Jun 9 14:12:49 2010 -0700 Add additional documentation for the new test suite Add a copy of docs/writing-tests from C TAP Harness as HOWTO and add a README with some additional explanations more specific to OpenAFS. Change-Id: Ic5b04805db6b00bcb82862ad8d2ebe466f2c266b Reviewed-on: http://gerrit.openafs.org/2109 Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 00c37e8634b97dba3431804cea467a046be525d5 Author: Andrew Deason Date: Fri May 21 11:47:42 2010 -0500 Install pthreaded ptserver and vlserver When --enable-pthreaded-ubik is specified, install the pthreaded versions of ptserver and vlserver instead of the non-pthreaded versions. Previously, the pthreaded versions were getting built but not installed with 'make dest' or 'make install'. Change-Id: If2f08342df4c94c1cce3001614d9e050222bf0f6 Reviewed-on: http://gerrit.openafs.org/2102 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d159cd955f4639334a963d92d82cd90318be5999 Author: Andrew Deason Date: Fri May 21 11:19:53 2010 -0500 Move FreeBlock prototype to vlserver_internal.h FreeBlock is only used in internal vlserver code and should not be called by anything else; it should not be prototyped in a public header. Move its prototype to go along with the other vlserver internal prototypes. Change-Id: Id66f046c76a9d4c454bbd6fd6e65c75dbeccf68e Reviewed-on: http://gerrit.openafs.org/2101 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7912910fd85ed28fdda8a034225ea041f554fea9 Author: Andrew Deason Date: Wed Jun 2 15:06:51 2010 -0500 Define updateUbikNetworkAddress static updateUbikNetworkAddress is static, and its prototype says so. The actual implementation of the function lacks 'static', though. Add it. Change-Id: Ida8e54cecabfffb2adbeb5f12d233668897893f8 Reviewed-on: http://gerrit.openafs.org/2100 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6ee6125f7178d9d2f93a8cb10532412bf0e295fc Author: Russ Allbery Date: Tue Jun 8 18:51:16 2010 -0700 Fix the trailing #endif comment in tests/tap/basic.h Change-Id: I3a7dbda8d2792229365df4266ca43cbb4bc815bf Reviewed-on: http://gerrit.openafs.org/2099 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 74a332e7ee69256c232e4f583f7c10e238cd3ac5 Author: Russ Allbery Date: Tue Jun 8 18:40:11 2010 -0700 Add okv function to the TAP test library Add an okv() varient of the ok() function that takes the arguments as a va_list instead of as a variable argument list. This makes it easier to reuse ok() when writing other tests. Change-Id: Icaeaaf9d6bd9d54bfd886a75961d98367ee0fb9a Reviewed-on: http://gerrit.openafs.org/2098 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53304359a77442cf3dd3f9f2dc8543a1d16af668 Author: Jeffrey Altman Date: Mon Jun 7 18:18:39 2010 -0400 Windows: Detect if AFSCache is memory mapped to a new address The Windows AFSCache paging file contains pointer addresses that are only valid if the file is memory mapped at a specific memory address. If the file is mapped at a new address, the pointer values will be invalid and the service will crash with an invalid memory access. Check for address consistency and force the cache to be rebuilt if the consistency is lost. LICENSE MIT Change-Id: Ie7fb64659f808f09279445f47c2f1385be0a53f0 Reviewed-on: http://gerrit.openafs.org/2095 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8d18d4773a256b5bb567752e7f923b7713107cb0 Author: Andrew Deason Date: Tue Jun 8 10:38:07 2010 -0500 Solaris: lookup "" like "." At least on some versions of solaris, we can get passed an empty string to afs_lookup, if the root directory is in AFS (e.g. after a chroot). Interpret this as the same as looking up the "." entry; otherwise we return ENOENT, implying that the "/" directory does not exist, even if its subdirectories do. FIXES 127356 Change-Id: I84283e78fbf33b946afaf3c80ef4a1a679e8fc93 Reviewed-on: http://gerrit.openafs.org/2096 Tested-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b89a9e4fa001b453a3ef5f041ac7978ba696b8e3 Author: Andrew Deason Date: Tue May 18 11:39:21 2010 -0500 libafs: consistently hold vnode refs Make all common libafs code call AFS_FAST_HOLD to hold an afs vnode reference, instead of sometimes calling VN_HOLD(AFSTOV(tvc)) directly. Make AFS_FAST_HOLD always call osi_vnhold, and have each platform define osi_vnhold for their platform-specific quirks (as it was doing before). This way, if a platform has an osi_vnhold that is special somehow (on solaris, we bump a VFS refcount if the vnode refcount goes from 0->1), it will always be called on vnode references. Change-Id: I7bb2b5ac116c8e86f6c6c0d40f414523870275a3 Reviewed-on: http://gerrit.openafs.org/1987 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eee8bc9cf9fa53488abd973249b8b61bc3f61956 Author: Andrew Deason Date: Mon Jun 7 11:42:02 2010 -0500 AIX: make osi_procname a stub 'curproc', 'curthread', or other such conveniences do not exist on AIX, so the current osi_procname implementation breaks the build. Determining the current process name on AIX is, while possible, difficult and error-prone. Since we only need the process name for informational messages to users, don't bother trying to determine it, and just return the empty string so we can build. Change-Id: I452a9786d809c3dee3da519cd3d6ca053f8d7ab8 Reviewed-on: http://gerrit.openafs.org/2094 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 54fbf60cdd62469cff724b445d01c15ba756e3df Author: Andrew Deason Date: Mon Jun 7 12:18:53 2010 -0500 Make lib/afs.exp in sys_depinstall The AIX libafs uses lib/afs.exp to build, and libafs depends on sys_depinstall. So, make lib/afs.exp in addition to include/afs/afs.exp in sys_depinstall. Change-Id: I8788a49cd4a5e7545f0f1f45572cdfb0f014c3db Reviewed-on: http://gerrit.openafs.org/2093 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a4bca7737682d23577c1f50c053438c657e85018 Author: Andrew Deason Date: Mon Jun 7 12:13:11 2010 -0500 AIX: declare code in osi_TryEvictVCache osi_TryEvictVCache was missing 'code's declaration. Declare 'code'. Change-Id: Ife5b9bfaea4d6a88bcbd82b862e26afcee1c149f Reviewed-on: http://gerrit.openafs.org/2092 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85997ac89fd44e6658291adcd1a064ff77235566 Author: Jeffrey Altman Date: Sat Jun 5 19:34:29 2010 -0400 Windows: remove src/NTMakefile NTMakefile was moved from src to the top level. A second copy in src just gets out of sync. Change-Id: I9474fab56cee46c3acb1758aee62729c1cfadd7b Reviewed-on: http://gerrit.openafs.org/2088 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 24ff8eb0dd64d2fe948899a7273293b0eb79600c Author: Jeffrey Altman Date: Sat Jun 5 19:29:59 2010 -0400 Windows: Cleanup .exp .res .manifest and others Fix the cleanup procedure to work when the tree has not previously been built. Delete .exp, .res, and .manifest files from the $(OBJ) tree. Perform cleanup on all language directories. Change-Id: I2a24c69293066f012cb869fe67dbacb5ffdc2d43 Reviewed-on: http://gerrit.openafs.org/2087 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 380f9a46a3feda44621cfe94d93a9c70d3e9ff7f Author: Jeffrey Altman Date: Thu Jun 3 12:04:15 2010 -0400 Windows: Update fs newcell and add VIOCNEWCELL2 The Windows version of "fs newcell" did not accept any parameters and behaved quite differently from the Unix version. Instead of permitting new cell information to be added, the Windows version simply forced the existing cell information to be reacquired. This update adds a new pioctl, VIOCNEWCELL2, to support the implementation of a Unix-style "fs newcell". The functionality added here differs from the Unix version in the following ways: 1. "fs newcell" with no arguments is still accepted in order to maintain compatibility with prior Windows behavior. 2. "fs newcell -cell -dns" instructs the cache manager to add the new cell but obtain the vldb server info from DNS. 3. "fs newcell -cell ... -registry" instructs the cache manager to add the new cell and also save the cell configuration data in the registry for use the next time the service restarts. 4. The -vlport and -fsport options are accepted although the -fsport value is currently unsupported by the cache manager. LICENSE MIT Change-Id: If62cc8e1c6cc8ba2defb4cd72dae8a87b4d915e0 Reviewed-on: http://gerrit.openafs.org/2080 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman commit 82e999bf847ef88d357d86015a90cedb47eeb8ac Author: Jeffrey Altman Date: Thu Jun 3 11:59:45 2010 -0400 Windows: Freelance Import CellServDB Add a new registry option that permits automatic generation of Freelance mountpoints for every cell listed in the CellServDB info (file and registry). "FreelanceImportCellServDB". This functionality is only triggered when the afsd_service is started. The operation is performed in the background by the daemon thread after the firewall configuration is set. LICENSE MIT Change-Id: Ic6cc0738f8c185d77f9cf69d4997b8044522e50e Reviewed-on: http://gerrit.openafs.org/2079 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman commit 1faf08ccc7704f43cbe57cd54b6458db347bcf91 Author: Jeffrey Altman Date: Fri Jun 4 00:46:39 2010 -0400 Windows: engage path mtu discovery for rx Change-Id: Ice32ca652dfcf1c14577c696eaca074f61a62675 Reviewed-on: http://gerrit.openafs.org/2085 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit ab5b2d2274bcb031ee2d0f8042ab45e15f3c428c Author: Jeffrey Altman Date: Fri Jun 4 00:45:21 2010 -0400 Windows: enable circular buffer management for rx socket input LICENSE BSD Change-Id: Ibbcb6171738b4f6adfb267b5782b53ae7170b0e9 Reviewed-on: http://gerrit.openafs.org/2084 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7c167febd559de70ec8abd74a34bbc15f44945fd Author: Russ Allbery Date: Sat May 29 16:45:04 2010 -0500 Comprehensive edit of Admin Guide chapter two (first 20%) Update and revise chapter two (Issues in Cell Configuration and Administration) of the Administration Guide for current AFS and current computing concepts. Remove references to an AFS-provided login utility and discuss local login configuration for Kerberos more generically. Further clarify the role of ssh in ensuring the user has access to files in AFS during remote login. Improve the inode and namei discussion slightly. Update the setuid discussion for the new default of disabling setuid for cells and for the known security flaws in enabling setuid. Modernize terminology for DNS around cell naming and remove the descriptions of TLDs. We can now assume our target audience knows this stuff. Move index terms into the appropriate section for what's being indexed in a few more cases. Lots of other, more minor wording changes and updates. Change-Id: Id8b1ace5afca6b8b7b2082a9a0779a4b91c89dcd Reviewed-on: http://gerrit.openafs.org/2065 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 67e837374649d4def8df6371f104c8b2af928e2a Author: Derrick Brashear Date: Tue Jun 1 13:10:32 2010 -0400 rx mtu discovery constrainment code this code makes us work in the face of a sub1500 mtu network. a subsequent commit is needed to make it more effective: attempts to grow the mtu must be scheduled so we aren't forced to heavily brute-force on failure to discover the exact mtu immediately; for performance, we do want to grow to the real mtu. Change-Id: If876c134efd4b0952035193ef00a6e780f7adc64 Reviewed-on: http://gerrit.openafs.org/2069 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8be3eee95ebd7c387c4745d2abc0f4907df6aaf7 Author: Simona Poilinca Date: Fri Jun 4 00:42:38 2010 -0400 Windows: convert cm_config.c to use strsafe library Replaced the unsafe string functions with the safe versions available in microsoft's strsafe library. Change-Id: Id9e9acf7eaa1b045d91b972b37a411c7a94ed3ac Change-Id: I377fe4e2e5bac904f5dd28916f1244262e1933c2 Reviewed-on: http://gerrit.openafs.org/1778 Reviewed-by: Jeffrey Altman Reviewed-by: Asanka Herath Tested-by: Jeffrey Altman commit dbef3c8b0bd5bab21943071c455b4bf2436507e5 Author: Asanka Herath Date: Thu Jun 3 23:58:42 2010 -0400 Windows: Support building a lite-client installer If LITECLIENT is defined when invoking the WiX based MSI installer build, we will build a light-weight client installer MSI. This minimizes the size of the installer for users who only need client functionality from OpenAFS. The light-weight client excludes: - Server components - Control center components - Administration utilities - Debug symbols Lite-client installer can also be built by invoking target wix-lite from the root NTMakefile. Change-Id: I544cdb7170d17358eb235f3c476c468dbae62776 Reviewed-on: http://gerrit.openafs.org/2034 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1e0c6d22d7c44aad6aa0a0051e094a3558045dd2 Author: Rainer Toebbicke Date: Wed Jun 2 18:12:36 2010 +0200 "fs checkservers" during cache creation can crash client Many pioctl calls pass as soon as the afs_resourceinit_flag is set, which happens relatively early, alas before the cell name is set. PCheckServers and others need the latter and dereference NULL. Easiest: set the cell name as soon as it is known and the dynroot initialisation piggy-backed to it can be done. Change-Id: I9985f2c4a0afddfed04b85338108b3d6e97b64e6 Reviewed-on: http://gerrit.openafs.org/2072 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a069b18dfbc2e1a4834df9cc7c477d65a05b342c Author: Russ Allbery Date: Wed May 26 13:15:30 2010 -0500 Document in SalvageLog(5) the per-partition salvager logs Document that salvager creates separate logs per partition when doing a full server salvage and then appends them all to SalvageLog when it completes. Change-Id: I2ffa8c79ef83b590f90bb014fc318559deae7113 Reviewed-on: http://gerrit.openafs.org/2035 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit a546f1cd58abcdc129035cf4614c4b55f1e1b1f8 Author: Jeffrey Altman Date: Thu Jun 3 11:54:04 2010 -0400 Windows: Fix usage of cm_FreeServerList cm_FreeServerList will set the input variable to NULL if the contents of the list could in fact be freed. If they could not be freed, the individual entries are marked for deletion and will not be subsequently used. Do not set the list variable to NULL after calling cm_FreeServerList otherwise memory can be leaked. LICENSE MIT Change-Id: Ia3cacd760d7395a2dd6b063643a8aa86f9e468b9 Reviewed-on: http://gerrit.openafs.org/2078 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 64e08dca0bdbb32ec98218a0b0fcd486108af6c1 Author: Jeffrey Altman Date: Thu Jun 3 11:51:17 2010 -0400 Windows: Reduce number of Nat Ping Connections Instruct rx library to only perform NAT pings on file server connections that are actively in use and which are anonymous. LICENSE MIT Change-Id: I6b74e8070f2c522ed13e0c06ea7a304cce525ab9 Reviewed-on: http://gerrit.openafs.org/2077 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 7e9c978b1c9d47a9da0e7f3b6cb7982596eb4cda Author: Jeffrey Altman Date: Thu Jun 3 11:49:14 2010 -0400 Windows: Fix cm_IoctlSkipQueryOptions buffer management When cm_IoctlSkipQueryOptions advances the input buffer pointer it must also reduce the available input length. LICENSE MIT Change-Id: I4e0d673e3ff5d8621e715d33d73616a22211a8a9 Reviewed-on: http://gerrit.openafs.org/2076 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 51d954a75c4343d1bc06fc784484894dd9bdb398 Author: Jeffrey Altman Date: Thu Jun 3 11:47:46 2010 -0400 Windows: do not request KEY_WRITE privilege if not required When querying the registry cellservdb info the KEY_WRITE privilege is not required, therefore do not request it. LICENSE MIT Change-Id: I050717be3afb5df979897ffbef65987160a65149 Reviewed-on: http://gerrit.openafs.org/2075 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 019174fdda5bb6eb376ea78e20db74c7e1f77fab Author: Jeffrey Altman Date: Thu Jun 3 11:44:33 2010 -0400 Windows: warning removal cast away size_t larger than afs_uint32 warnings use variables with the proper signed vs unsigned state in order to avoid signed vs unsigned comparison warnings disable deprecated string function warnings LICENSE MIT Change-Id: I78a3786a0766979c8d83cc5dbd06f91e70b0ee47 Reviewed-on: http://gerrit.openafs.org/2074 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 3ff85264903aef41e63c5a86674ec66857db69f4 Author: Derrick Brashear Date: Thu Jun 3 15:50:46 2010 -0400 darwin notify don't recurse on vcache lock afs_vop_access->afs_VerifyVCache2->afs_GetVCache->afs_FetchStatus-> afs_Analyze->afs_NotifyUser can recurse and try to notify us. Don't worry about it; we're best-effort. we lack a lock primitive to see if we own this lock. Change-Id: Ibc0c8a8164a95f0d268e5f1f42a62c3a28c4ab9d Reviewed-on: http://gerrit.openafs.org/2081 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a2f3be5265a9e8a7f2cf0dd751a9ab82d289cef8 Author: Andrew Deason Date: Thu Jun 3 09:54:28 2010 -0500 up: refuse multicharacter arguments The 'up' command currently silently accepts and discards extra characters when specifying arguments. This can produce rather confusing behavior such as mistyping '-v -1' as '-v-1' resulting in the '-v' switch being honored, but the '-1' being ignored. The same thing occurs for specifying '-v1', even though the usage message implies that you can combine arguments. So instead, report an error message for any arguments specified that are longer than 2 characters, since they are never valid. Change-Id: I64846b53248ea1d06d03b6ac1fdb4317ba04b03b Reviewed-on: http://gerrit.openafs.org/2073 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit d263fb1507a8c679fd92b5bd2b6af2f1fb8b3cbf Author: Asanka Herath Date: Wed May 26 12:34:08 2010 -0400 Windows: Fix midl options for generating stub code MIDL is used to generate server stub code for implementing SMB RPC. Fix the invocation of MIDL so that MIDL can locate include files and respect AFSDEV_AUXMIDLFLAGS. Change-Id: I31e90897c8f0d8db6746dbc94a3fe4de53aab060 Reviewed-on: http://gerrit.openafs.org/2033 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 57d7b5ccf0ddda5a7887d7e84211c3e767a407e6 Author: Derrick Brashear Date: Tue Jun 1 12:13:42 2010 -0400 rx allow setpeermtu to take a peer modify setpeermtu to work when a peer is passed in. modify existing callers. note solaris caches a whole host's pmtu, so use that on all peers at the host. Change-Id: Iba05fffd47a7c7b63742d6c539be4fe248336fb7 Reviewed-on: http://gerrit.openafs.org/2068 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ca2bce169e1742e25846ea516e6796de6ac6a282 Author: Derrick Brashear Date: Tue Jun 1 12:08:57 2010 -0400 rx setpeermtu should handle a host correctly right now, when no port is passed, we don't correctly tweak the mtu for all peers on a host. do that here. Change-Id: Ia07f592bf001415d8a76bd3326f2dc6aa0641809 Reviewed-on: http://gerrit.openafs.org/2067 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 24b7d39c5f18ca60067e5ab9c8d9c08e9c695789 Author: Derrick Brashear Date: Tue Jun 1 12:04:43 2010 -0400 aklog no krb524 kill warnings if you're disabling krb524, these variables are unused. make them not be part of such a compile Change-Id: Ib10e8fc82614b7a821daa7c77540ce246551cb0a Reviewed-on: http://gerrit.openafs.org/2066 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit af1dbcf0c9d29d2dfaf87c7f6fe64018927626ad Author: Russ Allbery Date: Thu May 27 16:40:21 2010 -0500 Add warnings for Authentication Server commands For each command only useful with the Authentication Server, add warnings that the Authentication Server is obsolete and will be removed in a future version of OpenAFS. Encourage people who care to update uss to work with a modern Kerberos KDC, recommend kinit and aklog or klog.krb5 over klog, and warn that klog will be of limited use without an Authentication Server. Change-Id: Idc78ba548134b83ac1eea0fb81a5bc38a431bb38 Reviewed-on: http://gerrit.openafs.org/2052 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f05d22c1b9bc21f0baa415444cf4f05aa1de5e0b Author: Derrick Brashear Date: Fri May 28 08:49:37 2010 -0400 prune further list of connections we natping on if it had tokens before, again, still not worth a nat ping. nor for the vlserver. Change-Id: I30281801b604b67b418b8a54a1889c54c8f6e4db Reviewed-on: http://gerrit.openafs.org/2058 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 67f1a94234e122a7dfef9808171285e456af5da8 Author: Rod Widdowson Date: Thu May 20 18:27:11 2010 +0100 Rewrite vldb_check -fix vldb_check -fix was very 'topical' in nature. It showed signs that each sucessive corruption had been treated as a one off needing a specific fix. This made the code difficult to understand and incomplete: for instance a single volume on the wrong hash only was not corrected. Further there was some rather unfortunately code which would under certain circumstances stamp the last volume at various places across the file. This checkin removes all the old code and replaces it with a 'systematic' fix. During the last scan across all the volumes, all four of the hash chains are rebuild from the ground up. We can then get rid of the outer 'Mung Until Now Good' iteration and further we benefit from a linear run time. Tested by building several different forms of broken-ness in all three chains and then fixing it. Now with improved logging and correct non insertion of nonexistant elements and clean compiled with extra warning. Change-Id: Id39d806c9c90f67c6967bd99460ba9842a043158 Reviewed-on: http://gerrit.openafs.org/1991 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 16c4b6e6c06ef2e7cfe77bca0811af9001665805 Author: Rod Widdowson Date: Wed May 19 10:45:57 2010 +0100 Add bounds checking prior to IOs in vldb_check vldb_check would just read where it was sent. This means that if a hash entry was beyond the end of file the read would fail and halt the program dead. This change adds checks for that so we can go limping on. There is no code to fix this sort of corruption. I have another (preexisting) checkin to do that which will happen once I can get a clean test run. This checkin also removes a some pointless debugging printfs. Change-Id: Ib285e113c8db024de41ffaf6c11ceb2979d07041 Reviewed-on: http://gerrit.openafs.org/1990 Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 20c2acfb2b2c5e6ab36c14726dce6197202f6d4a Author: Russ Allbery Date: Fri May 28 09:42:24 2010 -0500 Reformat chapter two of the OpenAFS Administration Guide Purely reformatting to make the document more maintainable. There are no content changes. Change-Id: I349c8e86de925cbed6e09be529a22e0a08b227f6 Reviewed-on: http://gerrit.openafs.org/2059 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 2e2494d6dbc3b4584c50b87073a2b7c7a0d13604 Author: Russ Allbery Date: Fri May 28 19:15:52 2010 +0000 Add a sample test program to the new test suite Add a modified version of src/util/test_ktime to the new test suite as an example of how to write a test program with the new harness. Change-Id: Ifbceff1905f9f0dd686c2a2d2edc2f8796e7918f Reviewed-on: http://gerrit.openafs.org/2063 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 194c3f10d4c4d571e5d734baf2dd27331624c084 Author: Russ Allbery Date: Fri May 28 11:35:28 2010 -0500 Import C TAP Harness 1.2 as a testing harness Creates a new top-level tests directory that will be used for all future automated test code eventually. Import runtests and the basic TAP library from C TAP Harness 1.2. Add top-level check and test targets that build the full source tree and then the new tests directory, and then runs runtests on the test list. Change-Id: I896f8ae488cd1dfa8529a10b4b479e45e7c67afe Reviewed-on: http://gerrit.openafs.org/2062 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit f7cb812d07ba854e69ca8d971cd88d93afe6e01e Author: Russ Allbery Date: Fri May 28 11:34:37 2010 -0500 Add src/tests/OpenAFS/Dirpath.sh to .gitignore Change-Id: I027d71ead7c75037bdc070932659c3f7da69dc0a Reviewed-on: http://gerrit.openafs.org/2061 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2db48258392cd24f17d0de2b46fceb9039f59953 Author: Russ Allbery Date: Fri May 28 11:03:50 2010 -0500 Clean up warnings in the tests directory Build repair.o with strict aliasing disabled because it addresses the same data structure via two different structs at the same time. Fix various other, more minor warnings. Several fixes here require more Autoconf glue to work properly, but that's deferred to future work (such as some HAVE_* defines that we don't probe for and the handling of non-native 64-bit integers in some of the code). Change-Id: I721a9fb952d2cf485d2df8e5672e5e5f5d9d6159 Reviewed-on: http://gerrit.openafs.org/2060 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4d89ce0a89e9b9e2709e6f6d730f245b5bce744b Author: Marc Dionne Date: Fri May 28 17:48:12 2010 -0400 Linux: 2.6.35 - fsync no longer takes a dentry In 2.6.35, the fsync file operations drops the dentry argument. Add a configure test and cope. Change-Id: Iaf660808d52688a4a8fd53a76d8d055602f746b9 Reviewed-on: http://gerrit.openafs.org/2064 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear commit e4596a9d07d99ce17fcf8ae7be6e5e1c2a134e8a Author: Rainer Toebbicke Date: Fri May 28 13:41:41 2010 +0200 Typo made sysctl table invisible AC_CHECK_LINUX_STRUCT for the check for ctl_name in ctl_table instead of AC_CHECK_LINUX_FUNC. Change-Id: Ia0e0de5d62ce7f702a3f1d7a5cd4d19ef726095c Reviewed-on: http://gerrit.openafs.org/2057 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0e9d4bc6f261fc8da2a20d1d236993082f70cecc Author: Derrick Brashear Date: Tue May 18 13:41:38 2010 -0400 viced: kill console use don't open /dev/console in the fileserver. if you want this, let syslog do it. Change-Id: I1d7c0fb4a8582b6c781acdb9ae0764b64dc1c301 Reviewed-on: http://gerrit.openafs.org/1986 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ac971a6c854e466ae412389da04f91298d01f707 Author: Russ Allbery Date: Thu May 27 11:45:06 2010 -0500 Comprehensive edit of chapter one of the Administration Guide Update and revise chapter one (An Overview of OpenAFS Administration) of the Administration Guide for current AFS and current computing concepts. Replace the Kerberos Server terminology with Kerberos KDC and add additional details about the relationship between AFS and a Kerberos KDC. Remove some remaining Authentication Server references. Add some details about the Protection Server management of the mapping from Kerberos principals to AFS IDs. Remove some now-obsolete distinctions and concepts between mainframes and workstations and recommendations for server systems. Reorganize the order in which the servers are discussed to follow a somewhat more natural order. Be clear that the Backup Server is optional and that there are other methods available to back up AFS. Mention backing up to disk as well as tape in a few places. Change-Id: I57ce083a84ca2a44f7a4383d80b05508e6448284 Reviewed-on: http://gerrit.openafs.org/2045 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 760b43baa807a9c84bf2796d9f6c969819098e2c Author: Russ Allbery Date: Thu May 27 09:57:42 2010 -0500 Reformat chapter one of the OpenAFS Administration Guide Purely reformatting to make the document more maintainable. There are no content changes. Change-Id: Ic3fb32ef68c14418b3ac6bab92fda759db89b394 Reviewed-on: http://gerrit.openafs.org/2044 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5f2c6bd341674618d14658d0f642465b0f0259b9 Author: Russ Allbery Date: Wed May 26 23:23:10 2010 -0500 Add k_haspag to libkopenafs Add the k_haspag function to libkopenafs, which returns true if the current process is in a PAG and false otherwise. The implementation currently duplicates code from the ktc_curpag function since the latter calls the regular pioctl() interface and hence introduces an Rx dependency that we're avoiding for libkopenafs. This should be refactored to avoid the code duplication at some point, but that will require building a utility library that can be reasonably linked into libkopenafs and is therefore deferred for future work. Change-Id: Ib97322ef24dc3a4e48cb45090c516c95b71e9fc7 Reviewed-on: http://gerrit.openafs.org/2041 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e29bd1f8d1734c45d244df45202a4b8eb47208c1 Author: Andrew Deason Date: Wed May 19 15:04:45 2010 -0500 libuafs: Add uafs_Init compat function Recent libuafs changes changed the libuafs initialization API. Add a uafs_Init wrapper for compatibility in case someone is using the old way. Change-Id: I30611479e0c281526dc52ac6a1969ae526886537 Reviewed-on: http://gerrit.openafs.org/2047 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3da8b3773f4caa85cf7ef58016a053560b87ca59 Author: Russ Allbery Date: Thu May 27 14:53:57 2010 -0500 Make all the default target in libadmin samples and test Change-Id: Idae0c8a6bf1b057d52c1d385daab5193083b63f6 Reviewed-on: http://gerrit.openafs.org/2051 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fe8db2a6979b96f5ff622c0fe9d42f6694555419 Author: Russ Allbery Date: Thu May 27 12:33:57 2010 -0500 Clean up warnings in libadmin/bos/afs_bosAdmin.c Use the correct data structures for BOS timestamps. Use afs_int32 for the expressed timestamps for executables since that's what the BOS RPC says it's using for right now; we should change this, but when we do, warnings will catch this use along with the others. Cast some const char *'s that are passed into BOS functions that take char *'s. Change-Id: Iff3a6c42241953ed086f8e739cdb344a41a44635 Reviewed-on: http://gerrit.openafs.org/2050 Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a65d755e5e862b9077439c151dc238fe4ef62725 Author: Russ Allbery Date: Thu May 27 09:41:38 2010 -0500 Clean up the introduction to the Administration Guide Provide a more useful abstract and remove the (outdated) specific list of supported platforms and the M.m version number placeholders. Update the list of associated documents to match their current titles, and provide a better description of the Reference Manual. Reformat the parent document and preface for easier maintenance in the future. Change-Id: I42ce78274ed7c4ca7a2f0b9c5ec2e6f7a786adb8 Reviewed-on: http://gerrit.openafs.org/2043 Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit cc071714fad5ab3a1c27782963fbd8d4d63437dc Author: Andrew Deason Date: Sun May 16 19:47:04 2010 -0500 libuafs: Remove afsd symlink in setup Remove the 'afsd' symlink in the build setup, along with the other symlinks. Otherwise, we try to recreate it every time and fail, since it already exists. Change-Id: I8fd70d6c29695f92a5a800bea34630221d142370 Reviewed-on: http://gerrit.openafs.org/2046 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 314ae59401820ab7a2dae10263959ea055bf6bd7 Author: Derrick Brashear Date: Thu May 27 10:58:03 2010 -0400 background daemon don't wipe code before it gets used the bop allocation will clear the bop structure on reuse. don't clear the error code early. Change-Id: Ie32bef854d28a575387e2488f10c302486dfd20b Reviewed-on: http://gerrit.openafs.org/2042 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c0408db079f58b11d9c53c9e67c556cac142bcbf Author: Russ Allbery Date: Wed May 26 16:07:43 2010 -0500 Flesh out NEWS for recent work Add entries to NEWS for all development releases back to 1.5.36, which is the point at which I got bored, taken from the release announcements to openafs-announce. Try to use a relatively readable and consistent formatting for all the entries and convert the old entries to the new format (mostly). Further history can be added from the release announcements when I or someone else gets bored. Change-Id: Iaf9171c82ca74cd98be3745d9c1965efc39d889a Reviewed-on: http://gerrit.openafs.org/2036 Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit c679486e554864df4c98feacc6f759cccb0b69fa Author: Russ Allbery Date: Wed May 26 14:45:22 2010 -0700 Update Debian packaging to 1.5.74.1-1 Change-Id: I828f21edffce67eaba6cfdd76e66e754a58e52a0 Reviewed-on: http://gerrit.openafs.org/2037 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0d66561a0b21572676ee1729a6e925d2f491ab6f Author: Russ Allbery Date: Wed May 26 22:04:48 2010 -0500 Fix compilation of the imported config_file.c parser Include additional missing header files for proper function prototypes, define TRUE and FALSE, and declare krb5_clear_error_message as unused so that the config_file.c will compile and pass --enable-checking. Make the build depend on krb5_locl.h. Change-Id: I25a35098aa81c9d2a0efea48257dcb958602c785 Reviewed-on: http://gerrit.openafs.org/2040 Tested-by: Russ Allbery Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 19dee933a0ca1d824edb697e43f29628cce06f55 Author: Marc Dionne Date: Wed May 26 17:50:43 2010 -0400 scout.c: only declare width once The width variable was declared twice, for the whole function and also within the for loop, leaving the first one unused and triggering a warning and a failed build with enable-checking. Change-Id: Idd061aa0e9eff1f158bfdbd67a20fe5876570089 Reviewed-on: http://gerrit.openafs.org/2039 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit dc8f18d6f5003712bc9ef989363137a84953df07 Author: Andrew Deason Date: Wed Mar 31 11:40:42 2010 -0500 Protect ubik cache accesses Currently, ubik application cached data could be updated and read by different threads simultaneously. Add a mechanism in ubik for protecting accessing and updating the cached data. This adds the function ubik_CheckCache to do this, and removes ubik_CacheUpdate as an exported function (since it's not safe). Update all callers to use the new mechanism. In ptserver, remove the 'initd' variable; just rely on cachedVersion and ubik_CheckCache to tell us when to re-read the database. Remove db.lock in buserver and cheader_lock in kaserver, which served similar (though not completely threadsafe) protection as ubik_CheckCache. Add the ubik database lock cache_lock to protect the application cache. Change-Id: I857a67d410e2c539197c5212c3b114c3fd0403c2 Reviewed-on: http://gerrit.openafs.org/1546 Reviewed-by: Derrick Brashear Tested-by: Russ Allbery commit 5698becffffb49ff49f69ce202032ae0bd9e9f7a Author: Russ Allbery Date: Wed May 26 16:47:49 2010 -0500 Fix syntax error when supergroups are not enabled 1f22cab broke non-supergroups builds due to incorrect brace placement. Move the correct closing brace outside of the #ifdef. Change-Id: I2ed3f8f57b35f0030e26306f7e791ea6b5158c9a Reviewed-on: http://gerrit.openafs.org/2038 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 916699ed412f865a80106ed4968fd2ede12d16f4 Author: Asanka Herath Date: Wed May 26 12:31:39 2010 -0400 Add /dest and /obj to .gitignore These are build directories used on Windows. Change-Id: I20c37ae4ada78949c3a09d618476286f64f9b682 Reviewed-on: http://gerrit.openafs.org/2032 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Russ Allbery commit 5f70221b2c9eb08afbbb6e0c43f6c0276cebbcf3 Author: Russ Allbery Date: Wed May 26 12:20:57 2010 -0500 Remove references to IBM AFS Change references to the documentation sets that we still ship to reference the OpenAFS manuals instead of the IBM AFS manuals. Remove references to the IBM AFS/DFS Migration documentation, since that doesn't appear to be available anywhere any more, replacing them where relevant to more generic references to the DFS documentation. Add links to docs.openafs.org for mentions of the manuals in SEE ALSO, and standardize on one link format. Replace a few references to the IBM AFS Release Notes with the actual information in those notes, or drop the reference if it doesn't seem particularly useful. Change-Id: Ie9666842f1315891c6a9c37c0424200f4b78bff7 Reviewed-on: http://gerrit.openafs.org/2031 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit deca334a5c9773f1b873b6260353c5c6cbab0af7 Author: Derrick Brashear Date: Thu May 20 11:27:10 2010 -0400 avoid nat ping for authenticated connections this is a cheap way to ensure one nat ping per server. basically, only do it for the one unauth connection we have. Change-Id: I4583112d7b4a10a0e8f524795527d99a5b2adf51 Reviewed-on: http://gerrit.openafs.org/2010 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9f9ffb7822bf85fc24d29b63c09c124b1e9875af Author: Russ Allbery Date: Wed May 26 11:33:29 2010 -0500 Remove references to AFS Product Support in -oktozap salvager and salvageserver's documentation of -oktozap says to not use without consultation with AFS Development or Product Support, left over from the IBM product. Remove those references and add a caution more in line with open source. Change-Id: I136dc145caf3e8e3a992c239e1a46d86f96580ed Reviewed-on: http://gerrit.openafs.org/2030 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 1f22cab96abd1ec83ea5c0d9c3fc1a405385b8ea Author: Russ Allbery Date: Wed May 26 11:28:57 2010 -0500 Remove -rebuildDB flag to ptserver The -rebuildDB flag was documented to rebuild the Protection Database at startup, but it was accepted and ignored in the ptserver source, doing nothing. Remove the documentation and the option recognition in ptserver. Change-Id: I36f30f38464b602cb4739a958663a6feb5fe27bf Reviewed-on: http://gerrit.openafs.org/2029 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 46192481ec162c68491c43635c16047d1b03ecf5 Author: Russ Allbery Date: Wed May 26 11:25:39 2010 -0500 Remove documentation of kaserver -fastKeys -fastKeys wasn't accepted by the kaserver binary, but was still mentioned in the usage message and the kaserver man page. Remove the remnants of the flag. Change-Id: Ifb3ae49ea0cab80c325a77b0eb1062944697b53d Reviewed-on: http://gerrit.openafs.org/2028 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c3f85a084b5b07d4c289cecda92d319e9d94cb7f Author: Simon Wilkinson Date: Tue Apr 27 22:53:47 2010 +0100 Add an OpenAFS config file parser This adds a Kerberos INI style config file parser to OpenAFS, using the parser contained in Heimdal as a base. Currently, it only exports a very small number of functions, but exporting further functions is simply a matter of adding additional shims to hide the Kerberos context and other specifics. Note that we don't want to just use the parser as a library because firstly, we don't want OpenAFS to have a Kerberos dependency (as other crypto mechanisms will, and do, exist). Secondly, MIT and Heimdal use a different API here, so we would have to shim anyway. Also, our own parser means that we don't need to worry about passing in the krb5 context, and all of the issues that that presents. Change-Id: Ic0a5ddf03266c454827c6505d5f6ffefcddd2614 Reviewed-on: http://gerrit.openafs.org/1935 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 55945926f99affdbe3461fa9a1aff751c5ad3c03 Author: Michael Meffie Date: Wed May 19 12:37:35 2010 -0400 scout: adjustable column widths Adds new command line option to scout so users can set the number of characters to display without truncating. Change-Id: I69f159549d7f5b4cfee26c276ad34705f504ee2b Reviewed-on: http://gerrit.openafs.org/1951 Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 54b3fbe775077c4c4f832a14fae2d046de97fd9a Author: Derrick Brashear Date: Tue May 25 18:21:32 2010 -0400 dumpstuff nbytes can't exceed 32 bits the read returns a 32 bit type; we can't possibly need to write 64 bits. (ssize_t is 32 bits on macos and so this ends up being a bad shift) Change-Id: I4d8f99b0c752a2c75ce65b9cfa1b3cb0d484cc7f Reviewed-on: http://gerrit.openafs.org/2024 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0875e29832d496532720812f6ece54813a7a893d Author: Russ Allbery Date: Tue May 25 14:37:05 2010 -0500 Synchronize LICENSE files We have two LICENSE files, which had been somewhat independently modified. Resynchronize them, remove trailing whitespace, and convert from ISO 8859-1 to UTF-8. Change-Id: Ia3dba0e328e7f026362e2e8efda206c34ce4e768 Reviewed-on: http://gerrit.openafs.org/2025 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c8261c63f9e804b62172b48d676d5be03620de2a Author: matt@linuxbox.com Date: Mon May 24 20:26:46 2010 -0400 windows handle NONODE case uniformly in cm_BPlusDirDeleteEntry Fix handling of a NONODE case in cm_BPlusDirDeleteEntry. Previously in this case, the routine referenced uninitialized memory. Change-Id: Ic3e3520b4c28ccc52e04486777bdcf0c5e54ef1f Change-Id: Id57a72112caf55b4b84ed64f709b8b73c72b7866 Reviewed-on: http://gerrit.openafs.org/2017 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7bca6eefdacf2adb6e60bc3eb04fb5b05dae277 Author: Heimdal Developers Date: Sun May 9 19:33:54 2010 +0100 Import of code from heimdal This commit updates the code imported from the external heimdal git repository to their revision 64651b4be5be1eaacd4388c428cb936cb8be34b5 which is described as switch-from-svn-to-git-1210-g64651b4 This commit imports the Heimdal configuration file parser. Change-Id: I9e061c439f9aabd4f09c876811bd1033d3f25f22 Reviewed-on: http://gerrit.openafs.org/1934 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b7eb19f81d83400ae05749c2fd244476e53d2bf3 Author: Derrick Brashear Date: Tue May 25 00:03:16 2010 -0400 fs getserverprefs needs a larger buffer it's very easy for the size of server preferences to be too large for the default buffer. cope. Change-Id: I0535edf784eb9e9a309dc17e571719e204b9d29b Reviewed-on: http://gerrit.openafs.org/2021 Reviewed-by: Russ Allbery Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e917fc5c474e11e47b656295d73514ca9ec45626 Author: Simon Wilkinson Date: Sun May 16 22:48:52 2010 +0100 Autoconf : Kill dead code Remove unused autoconf macros - they're not being called, and so have bitrotted, and are just cluttering up the tree. Change-Id: Ib2d1fc5121b6845cf0b500e5aef8ca822be58ad3 Reviewed-on: http://gerrit.openafs.org/1971 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 5219a6b33b8ea7a793d5b0797026abd7b187f85e Author: Simon Wilkinson Date: Thu May 20 11:57:20 2010 +0100 Linux: Disable syscall probes if we have keyrings If we are building for are kernel with keyrings, and we can guarantee that we can make use of those keyrings, then we no longer need to probe for the syscall table at all. Change our default behaviour so that when these two conditions are true, syscall probing is disabled. Both --enable-linux-syscall-probing and --disable-linux-syscall-probing can be used to override the autodetection and force things one way or the other. We have to check that we can use the keyrings because there was a window in the 2.6 kernel series where keryings were available, but the key_type_keyring definiton (which we use to create the session keyring) wasn't exported. In that situation, we attempt to traverse the process table and use the type of init's session keyring. This traversal is fragile, and if it fails, keyring PAGs will be disabled. So, we still want to be able to fall back to patching the syscall table, if we can, in this case. FIXES 125215 Change-Id: I11ba5c68fe37609bbd6b9c9f7e7c699334f42ebc Reviewed-on: http://gerrit.openafs.org/2002 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 13dba17d5a845475e8c68ae00c4b77fee12d48c6 Author: Andrew Deason Date: Thu May 6 15:40:36 2010 -0500 vol, volser, and viced type fixes Correct many uses of incorrect types for file offsets, sizes, etc. in the volume server, fileserver, and the volume package. Thanks to Tom Keiser who pointed out the incorrect types and suggested solutions. Change-Id: If4aedfe0cc06d05b3775069ae1285d4c330976cd Reviewed-on: http://gerrit.openafs.org/1920 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Russ Allbery commit 8a869e0ef99a10f5f26d4f65a96fba5a6440ce93 Author: Russ Allbery Date: Mon May 24 22:21:29 2010 -0500 Add libafs_tree to .gitignore Change-Id: Iff4a22319be1659f123a3a8b62c27a39d957bc29 Reviewed-on: http://gerrit.openafs.org/2020 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f924010fbcdcf7e8800165cdcdc4acfedc7225b6 Author: Russ Allbery Date: Mon May 24 22:03:49 2010 -0500 Fix libafs_tree's cross-architecture support The results of libafs_tree are supposed to build on any platform that shares the same basic kernel code, but this had broken in two ways: libafs_tree was including a pre-built afs/param.h, which needs to be regenerated on different architectures, and the Linux kernel build makefile was being pre-generated despite having some architecture-specific options. Copy over more of src/config and postpone generation of afs/param.h and generation of libafs/Makefile to the libafs build. Remove the substitution of AFS_SYSNAME from make_libafs_tree.pl; it was unused and now definitely shouldn't be used since it will break the architecture-independence of the resulting tree. Change-Id: I2730d3745cc67cf5f3ae61cf4643842f87865a80 Reviewed-on: http://gerrit.openafs.org/2019 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8aa5328bd539f88d4e090959e5bd95a19992bcff Author: Russ Allbery Date: Mon May 24 21:34:53 2010 -0500 Postmoderize use of AC_CHECK_TYPE Use AC_TYPE_SSIZE_T to handle the ssize_t check (introduced in Autconf 2.60). Use AC_CHECK_TYPE, not AC_CHECK_TYPES, to check for sig_atomic_t and socklen_t, and define them in afsconfig.h if they're not present on this platform. Do not define them in stds.h, since stds.h is an installed header file and cannot rely on Autoconf defines. Change-Id: I80e1a00efc84420002a95d6cafc25ea70befa49d Reviewed-on: http://gerrit.openafs.org/2018 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 48d3ec164bf76708c10d817e7601105cc2798153 Author: Russ Allbery Date: Mon May 24 14:28:01 2010 -0500 Update fs {get,set}serverprefs documentation for DNS Mention in the fs getserverprefs and fs setserverprefs documentation that VL servers may also come from DNS AFSDB and SRV records. Document that SRV record information is not (yet) properly used. Change-Id: I223efedf4d00ac1b57b3dce74a807790691abdbf Reviewed-on: http://gerrit.openafs.org/2015 Tested-by: Russ Allbery Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6916146b466676bc95df000ca4c367ea7c971133 Author: Derrick Brashear Date: Tue Apr 27 13:16:20 2010 -0400 report server address when known for afs warnings if we have the server info, give an address with the error. we could probably give the program name too, as for flock warning, but... Change-Id: I508572357c8c7027003900156dbb1a09ace04731 Reviewed-on: http://gerrit.openafs.org/1851 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2f0998ff13fe55e74011bd32317697274f807cc5 Author: Derrick Brashear Date: Mon May 24 16:12:24 2010 -0400 getcapabilities avoid panic when cell is not filled for a new server, getcapabilities is not safe, as cell may not be filled. Change-Id: I0926034c1d9e9c8c08e7ca993de1bcef9c0de8cf Reviewed-on: http://gerrit.openafs.org/2016 Reviewed-by: Russ Allbery Reviewed-by: Simon Wilkinson Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dd7b9235e677f92d928f0db40afaab9a1c3ee580 Author: Rod Widdowson Date: Tue May 18 14:48:38 2010 +0100 Read volume at correct address when looking for broken forward links. vldb_check was reading a volume at the index rather than the file offset to read the volume. This was giving rise to phantom warnings since the hash was usually 0. The possibility of a broken flink is determined in another manner which is why in normal case we are not flooded with warnings. At the same time make the error message slightly more coherent. Change-Id: I35f237772819f6418eb9f8d77e0902bca28c4134 Reviewed-on: http://gerrit.openafs.org/1983 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3313e7499642c39b0be1574102b8cdf6bfa565b5 Author: Simon Wilkinson Date: Sat May 22 09:40:05 2010 +0100 Autoconf: Tidy up resolver retrans retry test There's no need for the retrans retry test to be a TRY_RUN test, TRY_COMPILE will pick up the existence of the '_res' structure and its elements. Also, clean up the use of the cache variable to set the result. In the old implementation a true test result would print '1', not 'yes', a false result would result in bad output in the config.log, and a cross compiling output would give #define HAVE_RES_RETRANSRETRY no which will give unexpected results with #ifdef tests. Change-Id: If78c1b01ee89242c67f87238ca502ce43718c6a2 Reviewed-on: http://gerrit.openafs.org/2014 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ffb6cbfc1ee41ac83a27c094d82bd1c68ef4861c Author: matt@linuxbox.com Date: Sat May 22 19:40:03 2010 -0400 windows map lstat to _stat (mrafsStyleLogs) Provides function macros mapping lstat to _stat, in Windows param files (i386, amd64, i64). change per jaltman Change-Id: I414422f26114fc270dff0b5915765bf3906a400e Reviewed-on: http://gerrit.openafs.org/2013 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3015ef6c594fa999c29e390a76c384eed09619d4 Author: Russ Allbery Date: Sun May 9 17:58:33 2010 -0700 Update bos addkey/listkeys and KeyFile man pages for asetkey Clearly prefer asetkey to bos addkey in the KeyFile, bos addkey, and bos listkeys man pages. Reference asetkey list and asetkey delete as alternatives to bos listkeys and bos removekey. Distinguish between Authentication Server cells and Kerberos v5 cells and mention the preferred afs/ principal format. Add some cautions around matching enctypes and salts when synchronizing keys with a v5 KDC. Update man-pages/README for completion of this task, clean up some other wording, and remove some other now-irrelevant information. Change-Id: I29b83a61cbdb08de508bdb313524a307e385044b Reviewed-on: http://gerrit.openafs.org/1938 Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Tested-by: Russ Allbery Reviewed-by: Russ Allbery commit 5ae464b185115e3537bbef862d893190bb56ab05 Author: Ben Kaduk Date: Fri May 21 21:39:16 2010 -0400 Do not lie about needing Giant Catch up to 2005. Giant has not been needed for vnode page operations for quite some time now. Change-Id: I59c7b4fb1f7cd4133d459d801db9bb6d9cef866f Reviewed-on: http://gerrit.openafs.org/2012 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit adb901ac887043747360c4c9bb3fc51523f8c56e Author: Marc Dionne Date: Wed May 19 16:49:07 2010 -0400 Linux: remove unused label The out label is no longer used and triggers a warning. So just remove it. Change-Id: Ic701b82fcd4f93ddf3673dbc16618201314f6fb3 Reviewed-on: http://gerrit.openafs.org/2000 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a48a6c2a62e3511ec5652295ffee61122c1d6cbf Author: Simon Wilkinson Date: Wed Feb 24 21:39:10 2010 +0000 More warnings cleanup Remove uneccessary warning inhibition in vol/ Update README.WARNINGS to match the current state of the tree Change-Id: Ic1e5c74e0e7c2ccce0519b1572034f3666aa75e9 Reviewed-on: http://gerrit.openafs.org/1392 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bf2e4dd23e751540666c0c7961e47d4b5d06667b Author: Simon Wilkinson Date: Wed May 19 18:11:58 2010 +0100 Linux: Use positional r/w, not llseek The Linux read/write file operations take a position. Use this position to determine where we're reading or writing in a file, rather than using the vfs_llseek() operator to set the file position argument. This avoids a potential race condition, as well as simplifying this code. Change-Id: I82b4a109f9871fa2ce5b308bc32923b1bf910920 Reviewed-on: http://gerrit.openafs.org/1993 Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d686e41948cce63c95b1f2f69011019dad42607 Author: Derrick Brashear Date: Wed May 19 10:57:31 2010 -0400 dafs: don't restart for new binaries using mrafs scanner time if binary restart times are enabled, dafs restarts every time due to a flawed comparison. fix it. Change-Id: I7eff4eb6406dc7eef12c75491191566a906a4adf Reviewed-on: http://gerrit.openafs.org/1992 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e57c3b7bf6723016308497bd9377eb2de9ab6c14 Author: Simon Wilkinson Date: Thu Apr 29 19:06:37 2010 +0100 Unix CM: Use macros for process name and id access This patch uses the new osi_procname() macro to obtain the process name for setpag() warnings on BSD and Darwin, and osi_curproc() to obtain the process identity, simplifying the code. Change-Id: I1f8a4d4bbcdb09eaeea3712b1fffd1aaa3cd2fa7 Reviewed-on: http://gerrit.openafs.org/1878 Reviewed-by: Derrick Brashear Reviewed-by: Matt Benjamin Tested-by: Derrick Brashear commit 4dab5984b7a221ef4e0b871411f58f6f33116547 Author: Derrick Brashear Date: Tue May 18 10:42:28 2010 -0400 mrafs logs don't clobber existing logs if a restart happens too quickly, we can wipe existing log files in mrafs log mode. cheat. assume we won't have too many sub-second starts. Change-Id: I86d652410d0f18609d305decff54f122e2b87f10 Reviewed-on: http://gerrit.openafs.org/1984 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 42a280f50daf6e4dc65873150c4738aacf2c3a86 Author: Ben Kaduk Date: Wed May 19 01:44:44 2010 -0400 Do not sleep in FBSD's getevent() Calling osi_AllocSmallSpace drops the glock, which allows a race condition that caused a rather fast deadlock on multiprocessor systems. Use afs_osi_Alloc_NoSleep instead. Change-Id: I9a328567a31fe0e4f77e7548fed31b7e4ff36f50 Reviewed-on: http://gerrit.openafs.org/1989 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c433f3d8eeb81d5c5091d104e53bf48a6d25e747 Author: matt@linuxbox.com Date: Mon May 17 21:28:56 2010 -0400 linux PageCheck may be PageFsMisc Define the PageCheck family of functions using PageFsMisc equivalents if those are found. I encountered a need for this on Centos 5.5 (2.6.18-8.el5xen), but it may be more general. Change-Id: I365a769614fd7514e0c0223bf1854cce09f759f7 Reviewed-on: http://gerrit.openafs.org/1982 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 41dd0be8e30dc4edf7e3c087736dc41d625cecc5 Author: Derrick Brashear Date: Tue May 18 13:06:44 2010 -0400 darwin afs.conf: growlagent example provide an example usage of the growl agent Change-Id: Ic680008784a85d877049dee429d8f77f5ce8f5f7 Reviewed-on: http://gerrit.openafs.org/1985 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d0abe56aa47d4561ba57527d53a2b0db2ea613c2 Author: matt@linuxbox.com Date: Sun May 16 19:58:39 2010 -0400 linux include osi_compat.h in rx/LINUX/rx_knet.c Does include osi_compat.h in rx/LINUX/rx_knet.c Change-Id: I0d8c0a6931c7594c424edeb03000695a7cb50ba0 Reviewed-on: http://gerrit.openafs.org/1981 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5ea24a7c5534b4fda7904284d21d34b6e52a3f27 Author: Simon Wilkinson Date: Mon May 17 20:15:46 2010 +0100 Fileserver: Don't sync every 10 seconds The patch which moved our calls to fsync into the background, added a sync prior to each batch of fsync calls. This is an incredibly bad idea. POSIX says that sync "shall cause all information in memory that updates file systems to be scheduled for writing out to all file systems". On Linux this means that we in effect perform an fsync() on every open filehandle on the entire system, and in addition flush all superblocks and journals out to disk. This makes the following fsync() calls superfluous - sync() will have already written out all of the data. Add to this the fact that the fileserver is doing this every 10 seconds, and this becomes a major performance bottleneck, particularly if the machine uses a journalled fs - as any disk operations will end up blocking whilst the journal is written to disk. Change-Id: Id06cb99ae83af2e4a82e7b20fb14b8457dc16883 Reviewed-on: http://gerrit.openafs.org/1977 Reviewed-by: Andrew Deason Reviewed-by: Rainer Toebbicke Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 54bf41004b901ca090d63e239768588fa90bc806 Author: Jeffrey Altman Date: Mon May 17 16:01:03 2010 -0400 rx: work harder to notice and handle MorePackets request in particular, we did badly at handling kernel requests for more packets, but other cases did not properly keep packet stats either. attempt to globally better handle demand for more packets. Change-Id: I88837fed880f582444221ec53d280ca4070b607d Reviewed-on: http://gerrit.openafs.org/1978 Tested-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Hartmut Reuter Reviewed-by: Derrick Brashear commit af6b80f25726dbafc8bf3b2aaf15309e7f3d41fa Author: Simon Wilkinson Date: Mon May 17 08:40:49 2010 +0100 Autoconf: Use AC_CACHE_CHECK AC_CACHE_CHECK has been available since Autoconf 2.5 (released in 1995), and provides a simpler mecahnism for performing cached checks than AC_CACHE_VAL does. Modify all of our simple AC_CACHE_VAL calls to use AC_CACHE_CHECK. Change-Id: I490f5e6ae5a3fdc1ada88aba9cd22c89d415a376 Reviewed-on: http://gerrit.openafs.org/1974 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 249e3f9c21ffc280892fdd0e006e3e3a2a1e0300 Author: Derrick Brashear Date: Sat May 15 09:30:57 2010 -0400 afsprefs: clarify restart requirement don't make the red text make it seem like a restart is always needed Change-Id: I9c533ac4e25f623ad62183a42ff279c1d77fd5fe Reviewed-on: http://gerrit.openafs.org/1961 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 644162ae3de315adbf6d9e3cd4d647f87174cb42 Author: Rod Widdowson Date: Wed May 12 15:48:25 2010 +0100 Clean up logging from vldb_check. vldb_check used to say "%: Volume '' not found in hash " for two sorts of failures - If the volume really wasn't in a hash chain of that type at all - If volume's next pointer (for the hash type) pointed to a volume with a different hash. In both cases it would then print out some confusing (and spurious) information about the next element in the chain, prior to applying the same fix (of zeroing the next pointer). This change fixes the error message. Change-Id: I5eb6ae1a461628d401b997dde4bab53a0cc7571d Reviewed-on: http://gerrit.openafs.org/1955 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 01d08c0ce879487226d78f423588b27b18d888f7 Author: Rod Widdowson Date: Sat May 15 16:25:26 2010 +0100 Stop overanxious htonl in vldb_check -fix vldb_check -fix is corrupting the server entries (Number, Partition, Flags). This is because it is doing a htonl on what is a char field. The read code already has a comment "make sure not to ntohl these, as they're chars, not ints". This change strips the corresponding htonl from writeheader (and puts in a similar comment). Change-Id: I5902be0f1e928521bfcb5ec66edd227c08ea2bdc Reviewed-on: http://gerrit.openafs.org/1964 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2736eb7b090bcec9756c55f312cc97a4521f8b02 Author: Simon Wilkinson Date: Sun Apr 25 20:36:06 2010 +0100 Demand Attach: Volumes and vnodes are different fssync-debug attempts to copy sizeof(Volume) bytes into an object defined as a Vnode, a sure fire way to make things go boom. gcc on Snow Leopard picks this up as a buffer overflow, and warns about it. Fix the problem by only copying sizeof(Vnode) bytes. Change-Id: Iadcda0b465f9a9f310dcbe4d3862ea479e052674 Reviewed-on: http://gerrit.openafs.org/1834 Reviewed-by: Tom Keiser Reviewed-by: Alistair Ferguson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6fd1db1a86e830b3758772a79f25c30080c4dd06 Author: Simon Wilkinson Date: Sun Apr 25 20:23:27 2010 +0100 Demand Attach: Simplify __VVGC_entry_cl_add The __VVGC_entry_cl_add was giving an uninitialised variable warning for empty_idx, because it was using a separate variable, empty_found as a sentinel for when empty_idx was holding a real value. Simplify all of this by removing the sentinel, and making empty_idx being -1 mean 'not found', and a real value imply found. Change-Id: I6c485993df1ff8dfd27824234c811af998ff94fa Reviewed-on: http://gerrit.openafs.org/1833 Reviewed-by: Tom Keiser Reviewed-by: Alistair Ferguson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 44da0b32ee192017a080e26037e4f4b18e90717c Author: Simon Wilkinson Date: Sun Apr 25 20:14:02 2010 +0100 Demand-Attach: Remove dangerous trailing else Change 9aa09f5e634db8a8b2dedf3a749f2a90ef206e2f introduced a dangerous trailing else into the VScheduleSalvage_r function: #ifdef A if (foo) { ... } else #endif #ifdef B if (bar) { ... } #endif something_else() In a situation where we have A && !B, then something_else() ends up only being run when foo is false. Given that something_else() is VOL_LOCK, this will not end well. In the real world, we hit this problen when we build the volume package with SALVSYNC_BUILD_CLIENT and !FSYNC_BUILD_CLIENT - in other words, whilst building the fileserver. Change-Id: I97e07a6e730df8ac480d295b4cf30b0695ace511 Reviewed-on: http://gerrit.openafs.org/1832 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cea3bf909ab4b0807ef9f7d93235b4daeb1290dc Author: Ben Kaduk Date: Mon May 17 00:22:32 2010 -0400 Enable PutVCache for FBSD80 and higher Matt's patches in a123bd8ccd brought in support for FBSD 7.0, but also disabled several calls to afs_PutVCache() for FBSD80 and higher. Matt says that that patch was focused on 7.0, so the 8.0-related bits may not be relevant. I have run with the PutVCache calls enabled, and if anything, my system seems more stable with them. Change-Id: I8d906848e977d4974e4dcdc151964bb2ac3116b6 Reviewed-on: http://gerrit.openafs.org/1969 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit ed2f4f8d3d92761d38b1ebfba8187e5e02745be1 Author: Ben Kaduk Date: Sun May 16 00:43:35 2010 -0400 Kill FBSD4X with fire We haven't even pretended to work on the 4.X series for quite some time, and keeping this code around just makes things (slightly) harder to read. AFS_FBSD_ENV is now equivalent to AFS_FBSD50_ENV (though the latter should not be used). Leave the fbsd_4 sysnames in afs_sysnames.h for archival purposes. Change-Id: Ibebda92967ca26c3dd4bf0b2cc6a66ae3a94d0ff Reviewed-on: http://gerrit.openafs.org/1968 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0b3e411bfcd1ffc719c41a3f62137f75b17a09ab Author: Simon Wilkinson Date: Sun May 16 23:14:11 2010 +0100 Autoconf: Use AC_CHECK_MEMBERS AC_CHECK_MEMBERS has been available since autoconf 2.50, which was released in 2001. Use this, rather than rolling our own mechanism to check for structure membership. Change-Id: Ic63bfdd6c448ce3cf2ed13d8f1f36d02e18bd223 Reviewed-on: http://gerrit.openafs.org/1973 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aa7273233d39be552897d2180426820a3755deed Author: Simon Wilkinson Date: Sun May 16 22:56:13 2010 +0100 Autoconf: Use a standard test for socklen_t Use the standard AC_CHECK_TYPES mechanism to check for the existence of socklen_t, and to typedef it as an int if it's not found, rather than growing our own. Change-Id: Ib5aeb600750558167f63833dd4a7480dbe312b8a Reviewed-on: http://gerrit.openafs.org/1972 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0f36d82e896b7f3783ef11ec4196e5009aee162a Author: Ben Kaduk Date: Sat May 15 17:11:15 2010 -0400 Do not try to increase the refcount of a NULL vnode osi_lookup is not guaranteed to give us a valid vnode, so check before calling VN_HOLD(). Change-Id: I3d2a4d441f6991c08beccb6b10a428f5746db146 Reviewed-on: http://gerrit.openafs.org/1967 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c0afd1419de3fb8cab44ac212d0a85a9998c7cba Author: Andrew Deason Date: Sat May 15 23:12:33 2010 -0500 Solaris: do not call VFS_RELE with GLOCK VFS_RELE can call afs_freevfs, which grabs GLOCK. Thus, don't call VFS_RELE with GLOCK held or we can try to recursively acquire GLOCK and panic. This is currently unlikely to occur (sans vfs refcount unbalances) without support for forced unmounts, since the last vfs ref will usually come from the caller of afs_unmount(). But it still may be possible. Change-Id: I152bd13abc2e90f258f98194833c50c3a2846904 Reviewed-on: http://gerrit.openafs.org/1966 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 7e32fbea90821d5321352cb86b18533fb34f0409 Author: Hartmut Reuter Date: Fri May 14 13:25:44 2010 +0200 Don't use afs_linux_storeProc with memory cache, it only works with disk cache. Change-Id: I54585c61c66af7160d0ddbcbc1251fa42fbf44d8 Reviewed-on: http://gerrit.openafs.org/1958 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9562721b89a2a7a7f32a165762d7fba8540006a9 Author: Andrew Deason Date: Wed May 12 13:59:06 2010 -0500 Solaris: stop NetIfPoller on shutdown The NetIfPoller code that is enabled on AFS_SUN510_ENV never gets shutdown properly. The current code looks as if it was intended for NetIfPoller to recognize the appropriate termState and just return, but we never wait for it, and so we can complete the shutdown sequence without NetIfPoller ever knowing that we are shutting down. This can cause the machine to panic, as we keep attempting to run NetIfPoller even after libafs has been unloaded. Since NetIfPoller is fired by default every 30 seconds, we probably do not want to wait for it to fire during shutdown. Instead, just destroy the necessary timeout and task queue, which will wait for NetIfPoller to complete if running, and will just prevent it from running in the future otherwise. Change-Id: I25f9536d2713baf524a2450400c428ac506525f1 Reviewed-on: http://gerrit.openafs.org/1957 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 7730769ccfebd2a268503b6e618609722cc3b4a5 Author: Jeffrey Altman Date: Wed May 12 11:27:17 2010 -0400 Windows: move afsconfig.h / param.h to afscred.h move the inclusion of afsconfig.h and param.h to afscred.h so that they are included everywhere and so that the conditional use of _USE_32BIT_TIME_T is applied consistently by afscred.h. LICENSE MIT Change-Id: Id8c595509ec381ff6df6186e4d1c809413782a59 Reviewed-on: http://gerrit.openafs.org/1956 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 135042cd8c1beee7c045ce3b0b86272bf85a5464 Author: Jeffrey Altman Date: Wed May 12 10:25:01 2010 -0400 Windows: netidmgr_plugin must include afsconfig.h In order to properly use afs headers afsconfig.h must be included first in afsfuncs.c. Update the makefile to specify the correct include paths. Since this results in the afs assert.h being used, we must include the lib file that includes the AssertionFailed function. LICENSE MIT Change-Id: I46f76410ea16eeffeb8406ef4e89120a3255366a Reviewed-on: http://gerrit.openafs.org/1954 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 54f66f3722a6ddc0c35f5ab509c317f7278c0373 Author: Jeffrey Altman Date: Wed May 12 10:24:03 2010 -0400 Fix missing semicolon in non-AFS_NAMEI_ENV builds vol/nuke.c Change-Id: Ibfd37180199aecf6f79fbc84e2f035678e826d17 Reviewed-on: http://gerrit.openafs.org/1953 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96868e5cda94ba3a11a8cbf3df98e7032198b239 Author: Jeffrey Altman Date: Wed May 12 10:22:07 2010 -0400 Windows: fix consistency of afsconfig-windows.h Windows is a AFS_NAMEI_ENV platform Windows (as of WDK 6) defines socklen_t as signed int Change-Id: I0aa549309d19c745e4df50d510c19f3174b1f2eb Reviewed-on: http://gerrit.openafs.org/1952 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0dd5159163e464e35ccc73eb79225ea9fc0cd872 Author: Derrick Brashear Date: Fri May 7 10:32:09 2010 -0400 inlinebulk analyze errors afs_Analyze was not being called on inlinebulk errors if the error potentially required a retry. do so. Change-Id: I60fc0a7553f9ce592c40c7aecb60346e138468f0 Reviewed-on: http://gerrit.openafs.org/1926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 34b0fef60a555de11590631fce1e92454457fc72 Author: Jeffrey Altman Date: Sat May 8 21:38:05 2010 -0400 Rx: prevent rx_rpc_stats mutex from being a global bottleneck Prior to this patchset, the 'rx_rpc_stats' mutex was superior to both the 'peer->peer_lock' and the 'rx_peerHashTable_lock'. That meant that the 'rx_rpc_stats' was being held across many operations that walk the peer hash table. For example, rxi_ReapConnections, rx_disablePeerRPCStats, and rx_shutdown. Since every RPC issues a call to rx_IncrementTimeAndCount, the reap connections event would effectively bring all RPC processing to a halt. This patchset moves 'rx_rpc_stats' later in the hierarchy and restructures rxi_ReapConnections, rx_disablePeerRPCStats, and rx_shutdown so that not only doesn't the 'rx_rpc_stats' mutex need to be held across the entire function but the 'rx_peerHashTable_lock' does not need to be held while complex operations on the peer object are taking place. rxi_ReceiveDebugPacket is also fixed to hold the rx_peerHashTable_lock and peer_lock at appropriate times while completing its function. Change-Id: I1a11798f1bb2a8f03316c6c455954bd6b8d1459b Reviewed-on: http://gerrit.openafs.org/1928 Tested-by: Jeffrey Altman Reviewed-by: Dan Hyde Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit f793bc07e12b86561bc05eab9eb37dda55d792f5 Author: Jeffrey Altman Date: Wed May 12 00:58:30 2010 -0400 Windows: Add support for NetWkstaGetInfo levels 101 and 102 On Windows 7, NetWkstaGetInfo levels 101 and 102 are queried. Add support to the WKSSVC RPC Pipe service. LICENSE MIT Change-Id: Ia780ee69834c01c2d0c2965ae2c65f80d504a923 Reviewed-on: http://gerrit.openafs.org/1950 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 953a2049a9a451a1f4015a64f8c5153044beba13 Author: Jeffrey Altman Date: Mon May 10 09:07:50 2010 -0400 Windows: Prevent overflow during percent used calc in Explorer Shell Ext In the Volume Info and Partition Info dialog boxes, percent used was overflowing the variable due to using too small a variable and multiplying before dividing. FIXES 126846 Change-Id: I9a8a9275d22675cfb53c9e520758f2c4d6606954 Reviewed-on: http://gerrit.openafs.org/1939 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 63ed515374bb0f7fea9436a7346382d65c6efa6f Author: Jeffrey Altman Date: Sun May 9 10:50:07 2010 -0400 Windows: Freelance vs ACLs If the user attempts to list acls or set acls on the freelance root.afs volume, generate a meaningful error. Change-Id: I6e5b147bf0cdd98ec0224a723098f5bbcb37b1e1 Reviewed-on: http://gerrit.openafs.org/1931 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit ed0fa83863308653381896cccddb0fc931a02dde Author: Jeffrey Altman Date: Sun May 9 20:49:05 2010 -0400 Windows: use system CreateUuid instead of afs variant The afs_create_uuid function on Windows results in duplicate uuids being produced. Windows provides its own CreateUuid function. Use it when afs_create_uuid is called. Change-Id: Id7f14b13c003fb845d90b09c3ca40cf258a53dbc Reviewed-on: http://gerrit.openafs.org/1937 Tested-by: Jeffrey Altman Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman commit afaecee40f4ae07bdf6c1419e70bdecbd5aa9526 Author: Jeffrey Altman Date: Sun May 9 10:15:30 2010 -0400 Make afsio be useful on Windows and fix bugs On Windows, the stdin and stdout handles default to text mode which corrupts data piped through them. At the start of readFile and writeFile, the mode is now set to binary. The ProbeUuid callback is supposed to determine if this client is the same as the one being requested. Since we are advertising a new uuid in TellMeAboutYourself and WhoAmI, we should perform the uuid check and return a valid answer in order to avoid confusing the file server. Add support for TellMeAboutYourself. On Windows, return valid interface information. Always print verbose output to stderr. Display MB/sec to three decimal places. In readFile, always perform a AFSFetchStatus operation otherwise we have no idea what the file size is. On Windows, the path separator is backslash. Change-Id: I174eda991383301d01fe5d6431d459b6ea01a0be Reviewed-on: http://gerrit.openafs.org/1930 Tested-by: Jeffrey Altman Tested-by: Hartmut Reuter Reviewed-by: Jeffrey Altman commit 6d48026f86794ecf4dba70cc3f8f5ebd685c5255 Author: Jeffrey Altman Date: Thu May 6 17:12:48 2010 -0400 Windows: RXAFS_InlineBulkStat errors must be processed via cm_Analyze RXAFS_InlineBulkStatus does not return errors such as EACCES, VNOVOL, VNOVNODE, VOFFLINE, VBUSY, VIO, VMOVED, etc. as an RPC return code. Instead they are returned in the status info errorCode field for each file. Traditionally, the error associated with the first FID in the query list has been returned to the caller of cm_TryBulkStatRPC(). However, the error has never been processed through cm_Analyze() which means that the per-vnode processing for VNOVNODE and the volume global processing for VMOVED, VNOVOL, etc. has never been performed. As a result, failover to other .readonly volume instances cannot occur, volume moves will not be handled, and files that have been deleted are not detected. This patchset makes the following changes: 1. If an inline bulk operation has been performed and the inline errorCode is a volume global error, then that error replaces the RPC return code within the cm_Analyze() processing for the RPC. This will affect whether or not a retry operation is performed. 2. The variable 'inlinebulk' is reset to 0 at the top of the cm_Analyze() loop in case failover from an inlinebulk capable file to an inlinebulk incapable file server takes place. 3. The FID that is passed into cm_Analyze() is not a real fid. Instead it consists of the cell and volume but vnode = 0. This ensures that the error (if any) is not applied to the directory object. 4. If an inline bulk operation was performed, prior to performing the cm_MergeStatus() operation a vnode a check is made to determine if an error was returned for that vnode. If so, cm_Analyze() is called with no connection, a fake cm_req_t, the fid, and the error. This permits cm_Analyze() processing to be performed on the file. LICENSE MIT Change-Id: I91b10faae085b52ba753b3942215951e2122b937 Reviewed-on: http://gerrit.openafs.org/1918 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit dea064a5090dfdc0011dd4254f7d801b4b77cf9e Author: Michael Meffie Date: Tue May 11 15:54:53 2010 -0400 Linux: missing configure test Add the kmem_cache_create test for dtor to the configure to build again on older versions of linux. Fixes, osi_vfsops.c:264: error: too few arguments to function ‘kmem_cache_create’ Change-Id: I1c1aa63e8dbe2df6c9b889edaa66708d7db01847 Reviewed-on: http://gerrit.openafs.org/1948 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7237efdabc75049a70af4bb079dd7b2dd439dd17 Author: Simon Wilkinson Date: Thu May 6 22:22:50 2010 +0100 Remove intptr.m4 We now require an autoconf version of at least 2.60. This version supplies AC_TYPE_INTPTR_T and AC_TYPE_UINTPTR_T, so we no longer need to have our own. Change-Id: I362324d1cfb39efb01c3f6f2d95eb7f4ed041998 Reviewed-on: http://gerrit.openafs.org/1919 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 88d13f1f58546460201aded9335acb411bc49d1a Author: Derrick Brashear Date: Tue May 11 11:40:09 2010 -0400 vnode alloc bitnumber returns bitnumber fix function return types to match a bitnumber (int) and comment the function appropriately Change-Id: I9542c02b1aa7aacdd0596675992bb1e8a1708572 Reviewed-on: http://gerrit.openafs.org/1941 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 134b599c3ad475685dd0a7251d192e38966fef4c Author: Andrew Deason Date: Wed May 5 13:51:23 2010 -0500 vlserver: prevent duplicate IPs via ChangeAddr Add a safety check in VL_ChangeAddr/ChangeIPAddr to check if we are adding a duplicate server IP in the database. Return VL_MULTIPADDR when we try to do that. Change-Id: Iaff2792b90f4152dac5a1ab4c1072ef56fef518b Reviewed-on: http://gerrit.openafs.org/1927 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f2ac483c2bdb018c4f225d2781f15b7926d5063b Author: Jeffrey Altman Date: Sun May 9 20:46:11 2010 -0400 Windows: define HAVE_SSIZE_T The windows param.*.h files define the ssize_t type. Therefore, we must define HAVE_SSIZE_T in order to avoid a collision with the ssize_t typedef in afs/stds.h. Change-Id: Ie34cb565f09acfffe985476d24dbca917b05c5db Reviewed-on: http://gerrit.openafs.org/1936 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8aa46c5a66bfb18c4ef8452ad7d124af556a7813 Author: Simon Wilkinson Date: Sun May 9 19:40:58 2010 +0100 Add a list of files to import from Heimdal Add an initial list of files to import into OpenAFS from Heimdal. Currently this is just the list that are required to support our new configuration file parser. Change-Id: I785bacc603121f587378fcfbe93e585290c8ab7f Reviewed-on: http://gerrit.openafs.org/1933 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 43f4e3a51248683aeff77da94410a95baba3d83e Author: Simon Wilkinson Date: Sun May 9 19:37:52 2010 +0100 Add a tool to import external repositories This commit adds a tool to aid with the importing of external git repositories. import-external-git.pl allows a developer to easily update the src/external portion of the tree to the latest release of externally developed software. It's currently intended to support our use of Heimdal functions, but could be extended to support any project whose code we wish to use in the kernel, and which has a git repo. Change-Id: I6d91474c5de67e57fb73ff4d59c5afe9bb14c240 Reviewed-on: http://gerrit.openafs.org/1932 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 13ebb6412b4603be50de30789ba048bef485171b Author: Jeffrey Altman Date: Sat May 8 22:41:39 2010 -0400 Windows: fs.c requires size_t len not int len Missed one case of an 'int len' being passed into StringCbLength. Also, remove one instance of 'int len' that was not used at all. LICENSE MIT Change-Id: I457d4ae98adf9d4ca0c1b7dcb74470d9bbc85a54 Reviewed-on: http://gerrit.openafs.org/1929 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fd9ab5cb7c7346ad443072767a360d902578e87b Author: Russ Allbery Date: Thu May 6 12:30:23 2010 -0700 Include common param file for Linux alpha builds The sysname for Linux Alpha is alpha_linux_26 (or 24 or 22) with an extra underscore before the version, unlike all the other Linux sysnames. Allow for that case when deciding whether to include the common Linux param header. Change-Id: Icab3a9214d0bd020b846734cce27da6c1bdeab56 Reviewed-on: http://gerrit.openafs.org/1915 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b811e4f91e756643dc2c7da7179ba63e2e0f5803 Author: Ben Kaduk Date: Fri May 7 00:47:53 2010 -0400 Define osi_procname for FBSD The kernel linker doesn't like to load modules with unresolved (implicitly-defined) symbols (understandably). Make it happy. Change-Id: I23fdbb9c9e07a0c583580f5c5eee577a04fae278 Reviewed-on: http://gerrit.openafs.org/1925 Reviewed-by: Simon Wilkinson Reviewed-by: sanket Reviewed-by: Derrick Brashear Tested-by: Benjamin Kaduk commit 7ba5c7263d60230f54a3229d1ffd89a3c76b416d Author: Ben Kaduk Date: Thu May 6 23:31:26 2010 -0400 Actually fix build for FBSD80 after vcache refactoring One more s/tvc/avc/ Change-Id: Ie99310bb08da5bf7aaee022e9c0ca43d1a33c3db Reviewed-on: http://gerrit.openafs.org/1923 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit de68cdef9ef647bfa59aa6f330c5202afce1d100 Author: Ben Kaduk Date: Sun Apr 4 19:34:24 2010 -0400 Add entries for FBSD 8.1 and 9.0 Though neither have been released, yet, RELENG_8 and HEAD are starting to get changes that we need to conditionalize on. Change-Id: Ia3af3c38abe4d0d01e0cef974771b45a97d3d9aa Reviewed-on: http://gerrit.openafs.org/1691 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 07098dc6708472cf5624b368d63efbdef7d409b8 Author: Simon Wilkinson Date: Thu May 6 15:00:00 2010 +0100 Modernise use of AC_CHECK_TYPE Prior to autoconf 2.13, AC_CHECK_TYPE took two arguments, the type to check and the a default type to use if that type wasn't defined. This usage has been deprecated since 2.13, and the AC_CHECK_TYPE macro itself now behaves differently. Whilst there is a compatibility mode, the autoconf documentation discourages its use. We also have an occurence of a slightly more modern AC_CHECK_TYPE, where we explicitly #define a default value if one isn't provided. The autoconf manual also discourages this form, however, in favour of using AC_CHECK_TYPES, and placing suitable typedefs in an external header file. Modify our code so we do things in the recommended way. Change-Id: Ie28067f2c90e9a3aa25cfde45ef081da2d380ee1 Reviewed-on: http://gerrit.openafs.org/1914 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 972a4072827fb2ec680354d5adebc2c5cca06939 Author: Simon Wilkinson Date: Thu May 6 14:58:52 2010 +0100 Always include afsconfig.h in autogenerated files Modify rxgen and compile_et so that the files they output always contain afsconfig.h before afs/param.h. This avoids problems where afs/param.h, or headers included from it, rely on having the results of configure tests available. Change-Id: I0198500a17abd31ee1057d6780cbe5a5e1bc8c59 Reviewed-on: http://gerrit.openafs.org/1913 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dc9bef83b0fa416bd1bd5a1524aa4a697873b91a Author: Antoine Verheijen Date: Thu May 6 09:10:38 2010 -0600 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 Tested-by: Derrick Brashear commit 8fe309e6b67297e7d59bc001af62e0847cabce78 Author: Antoine Verheijen Date: Thu May 6 09:09:19 2010 -0600 OpenBSD: Use FREE instead of KFREE In OpenBSD releases prior to 4.2, use the system (kernel-specific) FREE macro to release space in the kernel module, not KFREE. The latter does not exist and results in unresolved symbols when trying to load the kernel module. (This was undoubtedly a typo.) Change-Id: Id66704ab4d0928e2ce1234de16bb74fe22f4f9c7 Reviewed-on: http://gerrit.openafs.org/1909 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8e27248698766e3d97e18363c5c4729a4e02add7 Author: Simon Wilkinson Date: Thu May 6 14:55:59 2010 +0100 Always include afsconfig.h Our coding standards say that OpenAFS source files should always have #include #include at the start of the file. Including just param.h, or having these includes in a different order can produce unexpected effects, because param.h includes sysnames.h, which in turn includes stds.h, which may rely upon having the results of configure tests available. Fix the obvious places in the Unix build which get this wrong. Change-Id: I081f04dab30a6bbb49fe71d3ac2d7c11e231e2f5 Reviewed-on: http://gerrit.openafs.org/1912 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3e449fcceed35200fa76ed586b6ab8cf60a8ec0f Author: Marc Dionne Date: Wed May 5 18:15:05 2010 -0400 Fix typo: LockType -> lockType Fix simple typo that causes a build error. Change-Id: I85f2899850383746094b7e9bab81dea13c2caeab Reviewed-on: http://gerrit.openafs.org/1908 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8b6550a09026e299dbaa48356aca02d1d5b1803c Author: Derrick Brashear Date: Sun May 2 19:06:43 2010 -0400 fcntl write lock on readonly file error fix apparently we return EROFS where we should return EBADF. Fix the error the client gets; the RPC is unchanged (and indeed shouldn't be changed) Change-Id: I738f1ee36f39d03bf018c0f91c7de9c8ed8cc9a9 Reviewed-on: http://gerrit.openafs.org/1895 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5c192d15ac611cd44b0f3f65796a5b10b7246c56 Author: Derrick Brashear Date: Wed May 5 15:50:07 2010 -0400 afsdump scan kill warnings make prototypes for all initialize error table functions appear Change-Id: Icc72f5218a2f6e0444a325c7fc9a0c1c34843344 Reviewed-on: http://gerrit.openafs.org/1907 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 98d20e250d9043c11e4644e574b5a60e9534a4f4 Author: Derrick Brashear Date: Tue May 4 11:39:19 2010 -0400 freebsd vcache splitting fallout fix the vcache splitting to work again Change-Id: I8833fc6655dcb79329835664d38f5330645b45f8 Reviewed-on: http://gerrit.openafs.org/1904 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1e69ec9cfef0bc571d1b91432354f486d49480b5 Author: tharidufernando Date: Sat Apr 10 09:01:16 2010 +0530 Windows: Secure C String usage in src\WINNT\afsd\fs.c The use of strlen, strcat, strcpy, strncpy and sprintf in src\WINNT\afsd\fs.c does not effectively protect against buffer overruns and string truncation errors. This patchset replaces their use with StringCbLen, StringCbCat, StringCbCopy, StringCbCopyN, StringCbCopyEx and StringCbPrintf respectively from strsafe.h. The functions sscanf, fscanf and scanf do not check for the size of the parameters so it is prone to buffer overruns. These functions can be replaced by sscanf_s, fscanf_s, scanf_s when the Visual Studio compiler version is 1400 or greater. Also memcpy will be replaced by memcpy_s which will check for the size of the destination buffer. In all cases, failure conditions are handled. Patchset development was mentored by Asanka Herath and Jeffrey Altman. Change-Id: I01e9dfc616641c220b57d2871e3e140406df3653 Reviewed-on: http://gerrit.openafs.org/1736 Tested-by: Jeffrey Altman Reviewed-by: Tharidu Fernando Tested-by: Tharidu Fernando Reviewed-by: Jeffrey Altman commit fb50f2478c0402eb3062208e173ebe33d00ac9c4 Author: Jonathan A. Kollasch Date: Sat Apr 10 10:55:17 2010 -0500 NetBSD 5.0 support. Change-Id: I5b9c5b8204ef729d9719f195ddbaf83c5f9cb4b5 Reviewed-on: http://gerrit.openafs.org/1738 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7084e5ff7df7ed5ad15f60bae262fc844248ae28 Author: Andrew Deason Date: Mon May 3 14:57:28 2010 -0500 Solaris: shutdown in freevfs, not unmount Call the afs shutdown sequence (afs_shutdown()) in the VFS_FREEVFS handler, instead of in the VFS_UNMOUNT handler. This way we shutdown when the last reference to our vfs goes away, instead of when we are unmounted. That doesn't make much of a difference right now, but doing so will be required for supporting forced unmounts. Change-Id: I4158865b139d05e2955e4809b93628df27b83922 Reviewed-on: http://gerrit.openafs.org/1899 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fc8ab5cfd6592f9a9df24706a8f5dcc1e41f2b33 Author: Andrew Deason Date: Thu Apr 29 17:47:15 2010 -0500 Solaris: prevent AFS umount while busy Return EBUSY from unmount if someone still references stuff in AFS. This prevents kernel panics that can occur on shutdown if we umount while there is a file in AFS open. Normally a process can hold a file in AFS open, AFS is unmounted, and the file is closed, triggering our code which explodes if called after we're unmounted. This adds VFS_HOLD/VFS_RELE calls whenever we 'create' a vcache, or retire an old one, to keep track if anyone has an open reference to us. Change-Id: I95d8cf7e7e4d32a05bee97e06832a530b40af217 Reviewed-on: http://gerrit.openafs.org/1880 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 34b7fd4a4989fe5d0484e00ae9582d2f29d98d9c Author: Andrew Deason Date: Thu Apr 29 16:00:26 2010 -0500 Solaris: return ENOTSUP for force-unmounts We don't support forced unmounts yet, so indicate as such. Change-Id: I3a130a4a8d31eeffd012352f656c2b4e42b46f27 Reviewed-on: http://gerrit.openafs.org/1879 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9be76c0d312e9d4ba879d2f82a7c556bf8025da7 Author: Simon Wilkinson Date: Sat Nov 7 00:16:28 2009 +0000 Refactor afs_NewVCache afs_NewVCache was a twisty turny maze of #ifdefs and duplicated code. This makes a number of sweeping changes to simplify this code, and to move platform specific elements out into their own directories. *) ShakeLooseVCaches is refactored so that the same code can be used both for platforms that support dynamic vcaches, and those which don't. *) afs_NewVCache, ShakeLooseVCaches, and afs_AllocVCache are all modified to remove platform specific code, and to call platform specific functions. *) A new platform file 'osi_vcache.c' is created to hold a number of platform specific vcache operations: *) osi_TryEvictVCache handles the decision of whether a vcache can be evicted or not, and does so if required *) osi_NewVnode allocates a new vnode *) osi_PrePopulateVCache does the necessary population of the vcache, before it's threaded onto the VLRUQ and associated hash tables. *) osi_AttachVnode handles attaching an OS vnode to our vcache, where that is necessary *) osi_PostPopulateVCache handles the vcache population that must occur after we're on the VLRUQ and have a vnode attached. Change-Id: I368e5fb500d012b44141aa8f8cf0516e63e58f57 Reviewed-on: http://gerrit.openafs.org/1881 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5e09bcd936f60a9b3f6547299ab2baf98111bba6 Author: Michael Meffie Date: Mon May 3 15:51:40 2010 -0400 pts mem -expandgroups and -supergroups examples Examples of the pts mem -expandgroups and -supergroups options for the man page. Change-Id: Idea0509797212397eff87aa5975eaf5364c8414c Reviewed-on: http://gerrit.openafs.org/1896 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5e24220c3d500c971e876e6805e3e46b91bad2e6 Author: Antoine Verheijen Date: Mon May 3 15:04:20 2010 -0600 OpenBSD: Fix bug in setpag() when group list is empty In OpenBSD, the PAG uses the 2nd and 3rd group slots in the task's group list. If an application sets en empty group list (such as Samba does), any existing PAG is lost and any new one is NOT set because the existing code will set the new group count to 2 instead of 3, and it leaves the first group entry as garbage (whatever random value the memory contained), thereby totally messing up the task's group list. This patch fixes it so that it behaves as expected. Change-Id: Ia718d55cbaad8ed372fba926dbfcb5db52ea684a Reviewed-on: http://gerrit.openafs.org/1898 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0ec2239b730bc9b1f8f819ef398d24bb7f1dff4e Author: Antoine Verheijen Date: Mon May 3 14:32:13 2010 -0600 Fix pattern to detect i386-based OpenBSD system type When the pattern to detect OpenBSD system types (via MKAFS_OSTYPE) was split into two separate ones for amd64 and i386 architectures, the pattern for i386-based systems was not set quite right. As a result, i386-based OpenBSD systems are no longer detected properly at this stage, resulting in an error of "cannot find input file: src/libafs/MakefileProto..in" during configure. This patch corrects the pattern. Change-Id: I67079af74117fa3cdc765f19944e23223709ae6b Reviewed-on: http://gerrit.openafs.org/1897 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 98d9d6cf83904d1422a96bb0646f560646d62114 Author: Asanka Herath Date: Tue Apr 20 15:06:41 2010 -0400 Windows: Show configuration pages for all types of MSI installations The OpenAFS MSI installer wizard used to not show any configuration pages for "Typical" and "Complete" installations. Setting the workstation cell and logon options during installation required selecting the "Custom" option. Many users choose the "Typical" option during installation, and thus would never see the configuration pages. Therefore, for these users, the workstation cell was being set to the default. This patch makes the workstation cell and logon option configuration pages visible to all types of installations (except silent installations which show no UI). Change-Id: Ie3bc040607a8d6b636c884bfcb919d0fc69b0e06 Reviewed-on: http://gerrit.openafs.org/1797 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 49c4200a9e313d775a90cc3b6c3b79b18e8e0367 Author: Tom Keiser Date: Thu Mar 11 10:38:31 2010 -0600 Provide a queue_NodeInit() interface Provide a queue_NodeInit() interface for the rx queue package. Change-Id: I85f6caf3605b9a88113ff4d904012ed2aa12a679 Reviewed-on: http://gerrit.openafs.org/1860 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cec1b09ff77f8009ceac73cf744584427df81397 Author: Jeffrey Altman Date: Sun May 2 15:30:27 2010 -0400 Windows: Restructure cm_LookupInternal addition of Freelance entries cm_LookupInternal creates Freelance mount points and symlinks when queries cannot be found in the Freelance root.afs directory. If the search name is a full cell name for which vldb information can be obtained, then a mount point is added. If the search name is a left-most substring or the full cell name with a dot appended to it, then a symlink was created. This approach created a very poluted Freelance name space. This patchset makes the following changes: 1. Do not create symlinks with a dot appended to the cellname 2. Do not create symlinks where the left-most substring is not a full dot separated component of the cellname. 3. Permit lookups to succeed when we would have created a symlink in the past without creating the symlink. LICENSE MIT Change-Id: I4573a2f13d4843878c3f5efc546df29a5023accc Reviewed-on: http://gerrit.openafs.org/1894 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 71f91cd93cb6e8c7430ddab7e5b9e0220070730e Author: Jeffrey Altman Date: Sun May 2 15:26:39 2010 -0400 Windows: Permit BPlus tree lookups within cm_ApplyDir BPlus tree lookups are much faster than searching through the native directory format on Windows because the case sensitive hash tables cannot be used successfully. Permit BPlus trees to be used except when called with cm_BPlusDirFoo as the action function because cm_BPlusDirFoo is used to build the BPlus trees from the native directory format. LICENSE MIT Change-Id: I3f6f5ba7113e206c76fafd1ec83822adc7f42f9e Reviewed-on: http://gerrit.openafs.org/1893 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ebbd415f28dded52d92ed13f66d058707ef3d36f Author: Jeffrey Altman Date: Sun May 2 15:05:40 2010 -0400 Windows: Prevent cm_FreelanceAddSymlink from creating a symlink ending in a dot Symlinks are ending up in the Freelance root.afs directory that end with a dot. Make sure it cannot happen. LICENSE MIT Change-Id: I8a19c0cf6c2a68c22839e15641206f7e9db8b15b Reviewed-on: http://gerrit.openafs.org/1892 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec35612ce9072119eab2bb3fc6f76420ed8e9077 Author: Jeffrey Altman Date: Sun May 2 15:03:52 2010 -0400 Windows: normalize error codes from cm_FreelanceAddSymlink Return all error codes from the end of the function. LICENSE MIT Change-Id: I7703c90884820ed7eb1f43183d80c7df038cfb8b Reviewed-on: http://gerrit.openafs.org/1891 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da2db6234221494956eca71ed3693c0a2bbf4a67 Author: Jeffrey Altman Date: Sun May 2 14:48:00 2010 -0400 Windows: Force rebuilding Freelance directory in AddMount and AddSymlink cm_FreelanceAddMount and cm_FreelanceAddSymlink is supposed to return the allocated FID of the entry that was added. However, cm_NameI is called to perform the lookup without forcing an update of the Freelance fake directory. As a result the entry may not be found. Force an update prior to calling cm_NameI() by using cm_clearLocalMountPointChange() and cm_reInitLocalMountPoints() if required. LICENSE MIT Change-Id: I08147b2ec61c810fdc718964362315af67d485b8 Reviewed-on: http://gerrit.openafs.org/1890 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f8efae8c7072593ae519539790838055783affff Author: Jeffrey Altman Date: Sun May 2 14:17:43 2010 -0400 Windows: normalize return codes from cm_FreelanceAddMount Instead of returning an undefined CM error code, -1, which might end up being confused with an Rx error, return legal CM_ERROR_xxx values. LICENSE MIT Change-Id: Ie78e4e9cf00fa938806c8b355f54169a5691ff04 Reviewed-on: http://gerrit.openafs.org/1889 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ff924e7229451e4f789bb83a301d23d75761eaf Author: Jeffrey Altman Date: Sun May 2 14:03:23 2010 -0400 Windows: use cm_noteLocalMountPointChange whenever fakeDirVersion is changed cm_noteLocalMountPointChange() is meant to be used when fakeDirVersion is changed. It previously wasn't used because cm_noteLocalMountPointChange() would obtain the cm_Freelance_Lock. Now that cm_noteLocalMountPointChange() can be called while holding the lock, use it everywhere. LICENSE MIT Change-Id: I737f4572773a93a656ca0f58e07a55d250c368a1 Reviewed-on: http://gerrit.openafs.org/1888 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3a48bf73d3087bf6d40f119b491d718e6b7e8284 Author: Jeffrey Altman Date: Sun May 2 13:56:24 2010 -0400 Windows: add locked parameter to cm_noteLocalMountPointChange If cm_Freelance_Lock is held set the 'locked' parameter to TRUE. This avoids a requirement to drop the lock only to have it be obtained when cm_noteLocalMountPointChange. LICENSE MIT Change-Id: Ic1e8a008639b33769a088c3b24ef7a7e7b09fb12 Reviewed-on: http://gerrit.openafs.org/1887 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f2b98e27f8dd03ba45a3d88053458aa7bcd932bd Author: Jeffrey Altman Date: Sun May 2 13:21:12 2010 -0400 Windows: remove unused code from cm_FollowMountPoint The variable 'tlen' is set to the length of the mount point target string but is never used. Remove it. LICENSE MIT Change-Id: I1e53831eff90962c93720831a210faa019e38d67 Reviewed-on: http://gerrit.openafs.org/1886 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4810026677d9527c8005184b2dd4bca610496657 Author: Jeffrey Altman Date: Sun May 2 13:11:14 2010 -0400 Windows: initialize to zero Freelance fake root directory The Freelance fake root directory buffers were not zero-filled. This results in random behavior that can cause the service to terminate unexpectedly. LICENSE MIT Change-Id: If4e42f74bf07a7296319f3a73f8c7628de4e1fd8 Reviewed-on: http://gerrit.openafs.org/1885 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 612bb07ae118f71f5ce6330c87425e175b2a8564 Author: Jeffrey Altman Date: Sun May 2 13:04:42 2010 -0400 Windows: make cm_BPlusDirFoo public Make cm_BPlusDirFoo so that the function pointer can be referenced from cm_ApplyDir. LICENSE MIT Change-Id: Ic58ce47dbcd9d6348666b1767941d861cd860df5 Reviewed-on: http://gerrit.openafs.org/1884 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1b4b0b7576475daf540be15ef759e9a999671a1b Author: Jeffrey Altman Date: Sun May 2 09:21:48 2010 -0400 Windows: correct "fs quota" pioctl validation check The validation check for the response from the GetVolumeStatus pioctl is incorrect. The response is not simply a VolumeStatus structure but also several C strings appended to it. LICENSE MIT Change-Id: Ieb0c0cd166f85e073431890f51f735958776eb74 Reviewed-on: http://gerrit.openafs.org/1883 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 715670cbe968ee499a29f9477626962dd74c01dd Author: Jeffrey Altman Date: Sun May 2 09:16:29 2010 -0400 Windows: getAFSServer wrong variable used in uncompiled code In the uncompiled implementation of getAFSServer, the unmodified 'cellname' is used in the send_DNS_AFSDB_Query call instead of the properly constructed 'query' variable. LICENSE MIT Change-Id: I9de506a2986872ab88aeea158aa43133efc75d50 Reviewed-on: http://gerrit.openafs.org/1882 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4f7bf8fb432ead9d0252e462cb627ab457c5b849 Author: Jeffrey Altman Date: Wed Apr 28 12:33:03 2010 -0400 Windows: FlushFile ioctl should call cm_FSync, not buf_CleanVnode When flushing a file, we need to commit the file length changes as well as the dirty buffers. Call cm_FSync instead of buf_CleanVnode which is called by cm_FSync. LICENSE MIT Change-Id: Id21e49e0559d20fce3e1d65cb73496a8b6cb1fa1 Reviewed-on: http://gerrit.openafs.org/1875 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1844719127f9e1202f6e1823a64f12286d9a2e1c Author: Jeffrey Altman Date: Wed Apr 28 12:21:00 2010 -0400 Windows: add 'locked' flag to cm_FSync and call when dropping write locks cm_FSync should be called when releasing file server write locks. This ensures that all dirty buffers are stored before the lock can be acquired by another client. Since cm_Unlock holds the cm_scache_t->rw exclusively when calling cm_FSync, add a 'locked' parameter to cm_FSync to avoid an unnecessary release and reacquire of the rwlock. LICENSE MIT Change-Id: I70bbeffc24ec4238461281bab4006b3a57b275e2 Reviewed-on: http://gerrit.openafs.org/1876 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Asanka Herath Reviewed-by: Asanka Herath Reviewed-by: Jeffrey Altman commit a1cbbccce3cb615b43535721f8990f6019aa27ec Author: Marc Dionne Date: Wed Apr 28 19:07:32 2010 -0400 Warning fix: cpp hates apostrophes The compiler complains when the text in a #warning contains a single apostrophe: error: missing terminating ' character Change the text to avoid it. Change-Id: Ibf1f4d2cb922b313545ed228a2a8d4eb6b134178 Reviewed-on: http://gerrit.openafs.org/1877 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 94c15f62d3e82c4a4cf2ac7c4e247b4c5658eb2b Author: Matt Benjmain Date: Wed Apr 28 06:19:16 2010 -0400 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 Reviewed-by: Derrick Brashear commit 7f399f2caca1b614687b55393c8b8d7330fb4220 Author: Derrick Brashear Date: Wed Apr 28 02:02:05 2010 -0400 upstream dumpscan changes pull in code changes from upstream for dumpscan Change-Id: Ib1bcba7a420d19c1bf27b2a5405aaee786e6cbd6 Reviewed-on: http://gerrit.openafs.org/1873 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d02f9a0b0b95ac6ada6be0b2b9a1e164f75a425d Author: Simon Wilkinson Date: Wed Apr 28 01:13:30 2010 +0100 Linux: Register number sysctls only when desperate The AFS sysctl interface was trying to register numeric system calls whenever the kernel would let it. This is anti-social, as we've never had sysctl numbers allocated to us. In kernels newer than 2.6.24, this misbehaviour is detected and punished. In recent kernels, the binary interface has gone away entirely. Since 2.6.19, the kernel has supported allocated unnumbered system calls. These are only available via /proc/sys (and not the using the legacy, binary, API), but they're really the only interface available to us. Change the sysctl registration code to use unnumbered calls whenever they are available. Unnumbered calls aren't available in 2.4.x, so completely remove that code there. Change-Id: I882117ca2250894f479292026fed84ff0b5e7972 Reviewed-on: http://gerrit.openafs.org/1871 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1c6d709cba64cda7bce0f5f91ab30a1e7bb8983 Author: Marc Dionne Date: Tue Apr 27 20:00:23 2010 -0400 Linux: specify void argument for afs_try_to_freeze inlines The new freeze inlines take no arguments, but need to be declared as taking (void) to prevent warnings that it is not a proper prototype. Change-Id: Ife675e69f566fabaee4bc41f2cc4fa9a20e816db Reviewed-on: http://gerrit.openafs.org/1870 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 009b547195eed40f7fa2fede24068c90e30c33e5 Author: Marc Dionne Date: Tue Apr 27 18:36:46 2010 -0400 Linux autoconf: fix name for struct cred test The new macro scheme changes the name of the tested define. Update the code to match. Change-Id: I0e9f04692d8fbb6e9452a9b169c191ce7148349b Reviewed-on: http://gerrit.openafs.org/1868 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d88b0b9a7b673cb828af6b68e5a9c48052b96a48 Author: Marc Dionne Date: Tue Apr 27 18:25:15 2010 -0400 Linux autoconf typo The test for the new export ops has a typo which makes the test fail where it should succeed: eops -> _eops Change-Id: I97dd0707b911c51f6394ada426a98e06a83ad35e Reviewed-on: http://gerrit.openafs.org/1867 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6c53cd7ad3980bd38b4d522a55d439e99608eb11 Author: Tom Keiser Date: Thu Mar 25 12:08:51 2010 -0500 Add some directory package doxygen comments Change-Id: I75c358f08c71b2de722de03bb65fb8696657d57f Reviewed-on: http://gerrit.openafs.org/1861 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b7a94ae11de37e22655073f55fe829427c38c832 Author: Simon Wilkinson Date: Tue Apr 27 22:16:24 2010 +0100 Linux: autoconf fallout grap != grab - fix spelling of grab_cache_page_write_begin Change-Id: I4032bff80b6d1d7568af8f9de59a56c0bd6a661a Reviewed-on: http://gerrit.openafs.org/1859 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c598e34fc36a5c5eb82b2b81f4caba66068d59b7 Author: Matt Benjmain Date: Tue Apr 27 12:06:48 2010 -0400 netbsd: remove old (non-original) NBSD port Prepare for rebase of NBSD port at the current OBSD port, which is descended directly from the original NBSD port and more closely resembles it. Change-Id: I9ff67ebea04534ac5ddc11c0aa1d65028067806a Reviewed-on: http://gerrit.openafs.org/1858 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 14195f0f48d52dd3a81c52c4a3bc2078857d0f86 Author: Marc Dionne Date: Sat Apr 24 22:12:27 2010 -0400 Linux: Remove unnecessary crhold on incomplete kernel credentials When credentials debugging is active in the kernel, sanity checks in various credentials functions such as get_cred or put_cred require that they are called with full fledged kernel credentials. This can be a problem with recent kernels in osi_Init where we build our own credentials and try to "crhold" them. Getting a reference doesn't make much sense anyway since we're using a statically allocated structure that we never try to free or modify. As a minimal fix, just don't call crhold when we're using the kernel credentials structure. Change-Id: If4f843ad33526c6a42f1cf67c57763593ffa50ac Reviewed-on: http://gerrit.openafs.org/1828 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear commit 014821d281cac7815ac7908a853191b17bf2a868 Author: Derrick Brashear Date: Mon Apr 26 17:43:16 2010 -0400 flush changes on LOCK_EX unlock right now, flock with LOCK_EX, on unlock, triggers an async store. make it sync, but also, make sure to ask to have any in-memory data sent to us (e.g. VM_StoreAllSegments); unlike Solaris VMSYNC_INVAL, we don't want to invalidate the pages, just get copies written back. LOCK_SH did not, does not and AFAICT should not trigger writes. Change-Id: Id4a72f73b685b5566bb31f6f610f22d806899280 Reviewed-on: http://gerrit.openafs.org/1846 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fa70575af3dd5b8e1467dd516413b6d153a9963a Author: Derrick Brashear Date: Mon Apr 26 16:41:29 2010 -0400 allow file length to be updated unless we're writing right now, merely having the file open O_RDWR, or mapped, precludes a length update from being reflected. Change-Id: I7f732b053c392aa6cc1c8ad6de8e0f4bd6468728 Reviewed-on: http://gerrit.openafs.org/1841 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0c7cb6051fdc930d03df53b294fcbe5eaa6bbaff Author: Simon Wilkinson Date: Tue Apr 27 19:31:55 2010 +0100 Linux: Reorder the tests As a final change to the Linux autoconf stuff, reorder the list of tests so that it's more easy to see what's being checked for, and to prevent multiple copies of the same thing being added. Change-Id: I84ca132e178b45ac25ebd48e71193bdd84965770 Reviewed-on: http://gerrit.openafs.org/1857 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2ce28370cf2d3a16d84664463731b1148447edb0 Author: Simon Wilkinson Date: Tue Apr 27 18:57:30 2010 +0100 Linux: Don't preprocess osi_vfs.h Before we did inodes properly, we needed to pre-process osi_vfs.h, in order to merge our inode structure with the Linux one. Ever since we moved to native inodes, that preprocessing has been disabled, and we've just copied osi_vfs.hin to osf_vfs.h Skip this pointless step, permanently rename osi_vfs.hin to osi_vfs.h, and remove the unused support scripts. Change-Id: I5e21eccf2242080cd8b994bd1654260bfb531420 Reviewed-on: http://gerrit.openafs.org/1856 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8cc8dbbe53a4764dcd355cf1080f497cb8f5d2e Author: Simon Wilkinson Date: Tue Apr 27 17:49:19 2010 +0100 Linux: Don't waste autoconf checks on cpp defines If something is a #define, then there's no point in doing a test compile to check for its presence. Instead, just do #if defined(X) Remove the tests for for_each_process and prev_task. Change-Id: Id8a9fddf2571cccd5d61982d4662bce2009c8f43 Reviewed-on: http://gerrit.openafs.org/1855 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a89d6b029d059d01b8bbfc18b9ee6e3f5a964b85 Author: Simon Wilkinson Date: Tue Apr 27 17:41:22 2010 +0100 Linux: Add general autoconf macro for Linux kernel Add AC_CHECK_LINUX_BUILD() to do a standardised Linux build, which takes a "checking" message, the autoconf variable to use to cache the results, headers and code to run, preprocessor variable to define, and a description of that variable. Reimplement all of our existing check macros in terms of this one, resolving many typos along the way. Change-Id: I41988c83fcdbfbf8152f6dd0e7c4bd16c7a04240 Reviewed-on: http://gerrit.openafs.org/1854 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 02f2c7cb3734d44dc90b77d631909373daefacd3 Author: Simon Wilkinson Date: Tue Apr 27 13:02:20 2010 +0100 Linux: Add autoconf macro for structure checks Add a new autoconf macro for doing structure element checks, and modify all simple structure checks to use it. This introduces a standard name form - STRUCT_structure_HAS_element, so there are some changes in the code to make use of this standard form. Change-Id: Ife967322503ae6f428e76845000de04f26929e65 Reviewed-on: http://gerrit.openafs.org/1853 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6fc3ac36701cd64736b784e99184c504fa4226f4 Author: Simon Wilkinson Date: Mon Apr 26 23:54:05 2010 +0100 Linux: Macroise kernel function autoconf tests We spend a lot of time in autoconf checking to see if kernel functions are available. Rather than copying and pasting the same code everytime we do so, create a macro to do function tests, and use that macro. This results in standardised naming, so change all of the places that use autoconf results to use the same standardised names. Change-Id: I36212e6c28c4b8455f859da1bbf3e456a2aabc07 Reviewed-on: http://gerrit.openafs.org/1849 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eef18466d920985c37ed8d22a6557b609c6225a6 Author: Simon Wilkinson Date: Mon Apr 26 22:13:39 2010 +0100 Linux: Tidy up freezer code Linux now provides try_to_freeze(), which can be used to replace all of our refrigerator code. This has been in the tree for a long time, and actually predates many of the changes we've been modifying our code to work with. So, use try_to_freeze wherever we can, and keep a simpler compatibility function for kernels which are too old to have it. Change-Id: Iec50f83382f46d2b17b43da815a75755ea916bc6 Reviewed-on: http://gerrit.openafs.org/1845 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef8bd5a29b937a1211540aa60398ee966470a712 Author: Simon Wilkinson Date: Mon Apr 26 21:34:17 2010 +0100 Linux: Simplify header file checks Provide an autoconf macro to perform tests for the existence of Linux kernel header files. Use this to standardise the naming of header file presence #defines, and to simplify the linux tests. Change-Id: I49629679db56c5f9a39487bd78fc2e59d5da0269 Reviewed-on: http://gerrit.openafs.org/1844 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a0259edcac06554688145302468e7696713744aa Author: Matt Benjamin Date: Tue Apr 27 13:03:36 2010 -0400 Rename afs_nbsd_* functions in OBSD The OBSD cm port prefixes function names with afs_nbsd_, an artifact of its origin in the original NBSD cm port. Make the prefix afs_obsd_. Change-Id: Id412fe0f752a147e2a9afda904db220ea6efd736 Reviewed-on: http://gerrit.openafs.org/1850 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f5036d6314d4161ab57f7f6bcc074e535289c1eb Author: Simon Wilkinson Date: Mon Apr 26 23:36:38 2010 +0100 Overzealous .gitignore under rxkad The .gitignore in rxkad ignores sboxes.h and fcrypt.h, since they used to get copied there from the domestic subdir. Now that they actually live under rxkad, they souldn't be ignored. (with thanks to Marc for the commit message) Change-Id: I1dd6766e75c15ca7f5604601bbe5b4e67f4fffa6 Reviewed-on: http://gerrit.openafs.org/1848 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c761f3ddde786e4ced1022ec5570d4cb2ce15169 Author: Marc Dionne Date: Mon Apr 26 18:15:16 2010 -0400 Overzealous clean target under rxkad The clean target under rxkad removes sboxes.h and fcrypt.h, since they used to get copied there from the domestic subdir. Now that they actually live under rxkad, they souldn't be removed. Change-Id: I867496dd0d3dd997d402ebfbfc6272447b1af98e Reviewed-on: http://gerrit.openafs.org/1847 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4768ed68d0831d208f4ebeead06e0b4e422f728e Author: Derrick Brashear Date: Mon Apr 26 15:55:57 2010 -0400 dcache dirty pages flag is solaris only note that IFDirtyPages is Solaris-only, so there's no confusion. may be worth visiting to see if and how the code should be minimized or adapted for elsewhere Change-Id: I7dfe4760eb4038d23a920c2e23f33d93e604bbca Reviewed-on: http://gerrit.openafs.org/1840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 90c970d3b60bb28a21b2861b75469281b5c464a5 Author: Simon Wilkinson Date: Fri Apr 23 17:07:40 2010 +0100 Linux: Don't hide memory management Given that we now only switch from user space into kernel space in one place, don't hide the mechanism we use to do so behind macros. This makes it much easier to visually confirm the correctness of the code. Change-Id: Ie52e071c81a9178c792be1eaa7e36d8453ebb319 Reviewed-on: http://gerrit.openafs.org/1820 Reviewed-by: Simon Wilkinson Reviewed-by: Dan Hyde Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad306046291c5c67178251d349f1250fef895ae2 Author: Simon Wilkinson Date: Fri Apr 23 17:10:15 2010 +0100 Linux: The kernel module always runs in the kernel There's no situation where we'd be including osi_machdep.h and not be building for the kernel, so just remove the case that disables all of the locks if __KERNEL__ isn't defined. Change-Id: I1141c37cf0cd517191dee7ca2404e109d4053c29 Reviewed-on: http://gerrit.openafs.org/1821 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 51c1eb362da866e28a9fb9a6f5d9d412aac7e8c2 Author: Derrick Brashear Date: Mon Apr 26 00:21:30 2010 -0400 fix other oldtvix typo i failed to push this to commit 0dac8f93af5262472bc5bdf94dbb605a24da59d0, and so, well, here's the real fix. sorry. Change-Id: I6799ecb207f246ac3e4c48b1de55268d2fba4d23 Reviewed-on: http://gerrit.openafs.org/1837 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0dac8f93af5262472bc5bdf94dbb605a24da59d0 Author: Marc Dionne Date: Thu Apr 22 17:22:37 2010 -0400 Initialize oldvtix Initialize the variable to avoid compiler complaints that it could be used uninitialized. Use a sentinel value and issue a warning if we try to use the variable and we haven't set it to a useful value. Change-Id: I037be2ad8e0b55d06b50aafdeca5012764640f16 Reviewed-on: http://gerrit.openafs.org/1810 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1798fe6da1d40c083bc10fe101a73b5f67b6fa0d Author: Simon Wilkinson Date: Fri Apr 23 18:03:49 2010 +0100 Linux: Use kernel network helper functions Linux has various network helper functions available, which are guaranteed to do the right thing in terms of setting address space limits, not dereferencing NULL pointers, and the like. Use these, where they're available, rather than rolling our own. kernel_sendmsg and kernel_recvmsg appeared in 2.6.8. Change-Id: I1cd91afd2182ad936756bbc4cf692262499c16e4 Reviewed-on: http://gerrit.openafs.org/1822 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 06f8a6232b7ad56a82dc94384dc950411107f48a Author: Simon Wilkinson Date: Fri Apr 23 18:38:02 2010 +0100 Linux: Remove old code from RX kernel implementation The RX implementation was split into LINUX and LINUX24 along with the kernel, but the old 2.4 and 2.2 only code was never removed from the LINUX/ directory. Do so now. Change-Id: I80300a1390e297298f4af3c06086e25d0acf8c1a Reviewed-on: http://gerrit.openafs.org/1819 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: Derrick Brashear commit d6d82659d0b68aad201916b6323591ff497486f8 Author: Simon Wilkinson Date: Fri Apr 23 16:54:39 2010 +0100 Linux: Don't pass f_pos down to the filesystem In 2.6.8, Linux shifted from passing f_pos directly to the read and write routines, and started passing a copy. This helps reduce, but does not remove, the race issues with f_pos itself. Make this change for us. Take the opportunity to remove the uneccessary macros, and tidy up some casting. Change-Id: I3b4cdf1e6e8127cbe0055829605268953c4397a6 Reviewed-on: http://gerrit.openafs.org/1818 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bd95ded9cfd95c4498896cbbadff6af3b752c43d Author: Simon Wilkinson Date: Fri Apr 23 15:59:46 2010 +0100 Linux: Removed unused define VFS_STATFS isn't used in the Linux 2.6 case, and is wrong anyway. Remove it in an attempt to clarify some particularly muddy water. Change-Id: I404429e3eeb87146bfdced5625b56857ba2ab9fd Reviewed-on: http://gerrit.openafs.org/1817 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 20d08fb0ec7190bac622e9ac8a17f97b7feef1cb Author: Simon Wilkinson Date: Fri Apr 23 15:07:58 2010 +0100 Linux: Don't roll our own llseek llseek is a little more complex than just setting the pos field of the file structure. Where vfs_llseek is available to us (it has been since 2.6.8) use that directly. If vfs_llseek isn't available, then use either the filesystem's llseek method, or default_llseek (available since 2.6.0), to ensure we get the proper locking. Change-Id: I26bcbff984c7164be1724eee7a46cbe6e02bc510 Reviewed-on: http://gerrit.openafs.org/1816 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5afa2965b2c4eab2a32dbd4ff036a835eb903e75 Author: Derrick Brashear Date: Sat Apr 24 17:05:47 2010 -0400 cachemgr store file too big error exit via usual path have just one path for exiting on errors so we do everything this means we will EndCall, instead of not, in the EFBIG case Change-Id: I2df025eee4bd5173ed4f80a73f9a9a347e7257d2 Reviewed-on: http://gerrit.openafs.org/1827 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fbbfb51e7d997a40bf7d57150f69bfb055831a07 Author: Simon Wilkinson Date: Sun Apr 25 22:07:04 2010 +0100 Move rxkad/domestic/* into rxkad/ directory proper Historically, the fcrypt code lived in its own directory, named 'domestic', so that ACLs could be used to prevent nasty foreigners from getting access to it. Now that those days are gone, having the domestic directory just complicates builds. Remove it, and reunite fcrypt with the rest of the tree. Change-Id: I2d1f66463121bbb391260b613913d76c27931429 Reviewed-on: http://gerrit.openafs.org/1836 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 37d2e8bfa8aa83ed592bd25cd3c7fd58f178de9a Author: Simon Wilkinson Date: Sun Apr 25 19:11:06 2010 +0100 Improve shared library building support This change removes the need to maintain two forms of symbol export lists, instead generating the simpler lists required by AIX and Mac OS X from the more complex Linux and Solaris mapfile. It can only handle simple mapfiles at present, any more complex files (for example, those which contain versioning information) will require changes to the translation script. The now unused .exp files are removed, and a dependency on the .map file added to the library build line. This change adds support for export lists to Darwin for the first time. Doing so identified a number of symbols in libafsrpc that are required by libafsauthent, which were not being exported. Export these symbols, and bump the minor revision of the shared library. Change-Id: Ibd1d02bb89b85500dc2a010e6cde1f4b81efe050 Reviewed-on: http://gerrit.openafs.org/1831 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0d7197f92517446be422150e32e0e07118a88271 Author: Simon Wilkinson Date: Sun Apr 25 11:31:36 2010 +0100 Linux: Remove prototype warning inhibition The Linux kernel builds used to add -Wno-strict-prototypes to the CFLAGS. Now that we've got prototypes for pretty much everything, remove this line so we can see any real warnings that might occur. Change-Id: I71b97bd3d19259f6ec6a55cfe095f5f4bf1ab78f Reviewed-on: http://gerrit.openafs.org/1830 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 36ea3e1ffe3fb7fc625cdb9cdca2d98ce8297a2b Author: Simon Wilkinson Date: Sun Apr 25 10:55:23 2010 +0100 Fix make clean and make distclean Fix these make targets so they actually clean the tree. Reorder the list of file deletions in distclean so that it exactly mirrors the creation order in configure.in, which should hopefully make it easier to keep this all in sync in future. Add all of the missing files in packaging, and the shared library build tools, to this list. Make kauth and vol clean remove ka-forwarder and fssync-debug, respectively. Change-Id: Iae13419f1cb21058882c0b0e0c283e3c947e33c9 Reviewed-on: http://gerrit.openafs.org/1829 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a0912ffc2e4ec76a599e8d817c8e084799e464d Author: Simon Wilkinson Date: Sun Apr 25 21:52:20 2010 +0100 Really kill des_stub Some bits of des_stub were lingering on. Get rid of it completely. Change-Id: I853135621a757c78cdb50117500f056ade0e6ab5 Reviewed-on: http://gerrit.openafs.org/1835 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d77c69504bed925ab420c5bac84d7ef23aff4417 Author: Simon Wilkinson Date: Sat Apr 24 17:34:02 2010 +0100 Fix objdir builds Change f2db78a346112f5320efc6f0b6b9fe4ae0d893d3 included hard references to compilation sources with no srcdir prefix, and so broke objdir builds. Fix this so that we can build outside the source tree again. Change-Id: Iaae2d4a1047cc2ac0f5f4aae92cadc1f2a0d09e2 Reviewed-on: http://gerrit.openafs.org/1826 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bf53b0882b7ef3d6e25500e968d007f464be5c04 Author: Derrick Brashear Date: Fri Apr 23 14:40:45 2010 -0400 macos growl agent warning parser fix warnings start at offset 5, not 6 (warn is shorter than fetch or store) Change-Id: Ibaa1239b0f9797da149cb05b3f871611b13833c8 Reviewed-on: http://gerrit.openafs.org/1825 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8b0164cd9ef7fd9db8acb0f53c1e4efb00d931af Author: Derrick Brashear Date: Fri Apr 23 11:56:08 2010 -0400 openafs 1.5.74.1 so it can be tagged and non-unversioned builds of the mac client changes can be seeded for testing Change-Id: Ibaa231d356bf667b13e271c9868c6ce0182bd2a6 Reviewed-on: http://gerrit.openafs.org/1814 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f5086e38922b88ec753d4ca632d89cc51913819e Author: Derrick Brashear Date: Fri Apr 23 11:02:32 2010 -0400 macos launchd be more patient right now we would wait 20 seconds for shutdown (the default), get impatient and be useless. be less useless. Change-Id: I8c6bc9b7546352cfa73d461b7cdddd2b5b5d7889 Reviewed-on: http://gerrit.openafs.org/1813 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d4e66ef219c88cdb17f2e860027cf6752ea21b17 Author: Simon Wilkinson Date: Thu Apr 22 22:24:11 2010 +0100 Unix: Modify disk cache versioning This change increments the disk cache version number, and adds a structure size record to the disk cache header. All old disk caches will be replaced when the client is started. With the various changes made to unify our file handles, and to support large file handles on Linux, the size of the 'fcache' structure was modified earlier in the 1.5 series. However, fcache is also the building block of the CacheItems file, so these changes inadvertently broke users upgrading from 1.4. In addition, as the disk cache inode is now a union of many different structures, the structure size is now potentially volatile across both kernel, and OpenAFS revisions. Up the version number so old disk caches are invalidated and won't crash users who are upgrading. Also take the opportunity to add an item to the header which stores the size of struct fcache used by the disk cache. If the size on disk doesn't match that expected by the kernel module, truncate the cache and start again. Change-Id: I2ee8863d0bfaaaba34272c9e139638e17669a53e Reviewed-on: http://gerrit.openafs.org/1811 Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cfc9b34856c6649a44e9fe762f9b0c0f09d7c653 Author: Marc Dionne Date: Thu Apr 22 19:39:21 2010 -0400 Warning fix: cast to expected type Cast argument to match the expected type from the format string. Change-Id: Iddec912ff8a27f46d872fc3101677913adfb537a Reviewed-on: http://gerrit.openafs.org/1812 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 30f2dded7340a776f2d41a17cee944ef83665648 Author: Andrew Deason Date: Thu Apr 22 11:54:06 2010 -0500 Update nextVnodeUnique before checking inUse When attaching a volume, update the nextVnodeUnique field for the volume, before we do any checks on the volume; for example, checking inUse, which may result in a demand-salvage if we are running DAFS. If we do not do this, we can schedule a demand-salvage without setting nextVnodeUnique, and VUpdateVolume_r will update the volume header uniquifier to nextVnodeUnique+200, when nextVnodeUnique is not set. So, we will always set the uniquifier to 200. Fortunately, the salvage should usually fix the uniquifer anyway. So, set nextVnodeUnique before doing any of those checks, to avoid screwing up the uniquifier when taking the volume offline. Change-Id: Ib211bbf5e93efbebcb679259944e7abf211aa6e1 Reviewed-on: http://gerrit.openafs.org/1809 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 3a0e2a725306504302d5efd254a027d865860093 Author: Andrew Deason Date: Thu Apr 22 13:21:52 2010 -0500 Prefer EndCall errors in StoreMini Partially revert b1eb6a7a3f80500f0187cc6a1dd2013e1a5e154a, so we do not mask the rx_EndCall error with a EndRXAFS_StoreData error (for example, if EndRXAFS_StoreData returns RXGEN_CC_UNMARSHAL, and rx_EndCall returns VBUSY). We need to agree on how to do this throughout the tree, but for now, just fix StoreMini. Change-Id: I4913946089fd0857506d9186f85c5c8115a5b95d Reviewed-on: http://gerrit.openafs.org/1808 Tested-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 77468e3a0820d32cc8a1b2b6c4601ba83803f727 Author: Simon Wilkinson Date: Thu Apr 22 18:02:08 2010 +0100 Linux: Tidy up packaging Remove the fuzz setting - we're no longer patching the build, so we don't need it. Change-Id: Ic56b4d9efed40aedb425d9852018907736ef957f Reviewed-on: http://gerrit.openafs.org/1807 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0d0e7699c9f789214205fe6837cded1a4c95f9c0 Author: Simon Wilkinson Date: Thu Apr 22 17:56:25 2010 +0100 Linux: RedHat packaging updates for RHEL6 Update our bundled spec file and related tools so they can be used to build OpenAFS on the RHEL6 beta. - Make kmodtool recognise el6 as having "modern" kernel naming conventions - Replace %{PACKAGE_VERSION} (which seems to have disappeared) with the standard %{version} macro Thanks to billings and phalenor on IRC for their testing efforts. Change-Id: I6538af56f365952b98c2dcbafb1c043435449e63 Reviewed-on: http://gerrit.openafs.org/1806 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 219276bab080640d0f024eba344073bdffaf6c1f Author: Andrew Deason Date: Thu Apr 22 09:59:30 2010 -0500 Resolve symlinks for 'fs rmmount' 'fs rmmount' is the only 'fs' command that does not resolve symlinks for its pioctls for some reason. Make it resolve symlinks. Thanks to Arne Wiebalck. Change-Id: Ifb6bdf0b381abd2e157d93d7eea4d853e1b3a689 Reviewed-on: http://gerrit.openafs.org/1805 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d9e6dbbf1c81d31645957906c9b3b0caa803ca7 Author: Derrick Brashear Date: Wed Feb 17 00:48:03 2010 -0500 byte-range lock warning should include pid is is the same pid cmdebug would print. just include it in the logged byte-range lock warning. FIXES 126438 Change-Id: Idd83a4c4a56edf43ab257b3a7f08e1bbb774f04a Reviewed-on: http://gerrit.openafs.org/1333 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2a8c554a4553c32359cecf268fd12029c9d6d85d Author: sanket Date: Sat Apr 17 19:44:25 2010 +0530 Adding osi_procname macro to different platforms osi_procname(procname, size) is added to different platforms to obtain the processname in the string procname( preallocated ) with size size Change-Id: Iab8fed3e99839cee7c07a2de6144af9b09af3a57 Change-Id: Ib4e45564ae942e74c331444969a462427f5e7cf3 Reviewed-on: http://gerrit.openafs.org/1771 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3239cb830082ed995391bdda86d61daba9bed1a1 Author: Derrick Brashear Date: Wed Apr 21 18:45:33 2010 -0400 macos bulkstat again revamp this to avoid various issues with vnode references, and to avoid potentially finding CVInit vcaches but not reclaiming Change-Id: I6cb8d73b66c449a104799082259c97ede7e32e9b Reviewed-on: http://gerrit.openafs.org/1802 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 54226e9ad45003f4f54b1a7ba2b13003dcf1edb7 Author: Russ Allbery Date: Mon Apr 19 22:01:27 2010 -0700 Fix UCONTEXT detection on ppc_linux26 via include order param.linux26.h defines USE_UCONTEXT for all Linux platforms for glibc 2.4 and higher, but it does this by testing __GLIBC__ and __GLIBC_MINOR__. These are defined by features.h, which is included by any system header. At least one system header must be included before those are defined. lwp/process.c was including and before any other headers, leading to those macros being undefined. Most of the Linux architectures either have their own implementation or were explicitly defining USE_UCONTEXT in the per-architecture param file, but ppc_linux26 was relying on the default. Fix this by reordering the includes to include the various system headers before and add a comment explaining why. This previously worked in earlier versions because the old param.ppc_linux26.h file included , which included "stds.h", which included a system header prior to the check for ucontext. The new generic param file reverses that order. Change-Id: I214e54f684afdef07e6e2dec5b6e6e4d255ab4ec Reviewed-on: http://gerrit.openafs.org/1791 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 80f05473428969ff71d1791cda8cb09d30223724 Author: Andrew Deason Date: Wed Apr 21 12:41:21 2010 -0500 Recover from afs_GetVolSlot errors afs_GetVolSlot can panic in a few different ways, such as failing to read from or write to VolumeInfo. Instead of panic'ing, return an error to the application. Adjust callers to deal with getting a NULL volume returned. Based on a patch by Mike Meffie. Change-Id: Ibb301fed795ee9ee5906b8e7973945a06218b8f1 Reviewed-on: http://gerrit.openafs.org/1801 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6bde63c46502ef8a70f4e9ceefbff7404c6d0ef8 Author: Russ Allbery Date: Tue Apr 20 20:46:32 2010 -0700 Add RFC 5864 to the protocol documentation directory Add a copy of RFC 5864 (DNS SRV Resource Records for AFS) to the protocol documentation directory for reference. As permitted by the IETF Trust License Policy section 3(e), I release this document under the MIT/X Consortium license included in this copy of the document. LICENSE MIT Change-Id: I8e22aac07b4cedbe18b8375213a7866cf98a1386 Reviewed-on: http://gerrit.openafs.org/1799 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e8d6d9dfd7c49fc1017d0b7f370e0ba3f3baedb8 Author: Russ Allbery Date: Mon Apr 19 21:18:57 2010 -0700 Install afsd.fuse and man page if built If --enable-fuse-client is passed to configure and afsd.fuse is built, install it into the same directory as afsd and install afsd.fuse.8 as a symlink to the afsd.8 man page. Add documentation of afsd.fuse to the afsd man page. Change-Id: I7d0cd3992a8466e626af2191c713e5623cc40d84 Reviewed-on: http://gerrit.openafs.org/1792 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f3fc021808f73ae770ac1ee25e90df632201b217 Author: Anders Kaseorg Date: Wed Apr 21 04:09:03 2010 -0400 Add src/afsd/afsd.fuse and src/libuafs/afsd to .gitignore Change-Id: I4b7e5261d92944ed871a1113b0f4a651357f9fcf Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/1800 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7321493788411419cd4c2817b97cfcd8227b849c Author: Andrew Deason Date: Sun Apr 18 18:49:18 2010 -0500 Add documentation for fs callback xstats Change I572ff682de4cc7ef27bb46dd028d3d797b873841 added the fileserver callback xstats collection to afsmonitor. Provide some documentation for these fields, along with the other fields displayed by afsmonitor. Change-Id: I21618047519fbb28f6707ff9ba95a17fe27e0f3c Reviewed-on: http://gerrit.openafs.org/1783 Tested-by: Andrew Deason Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear commit 0428e5fd9523148b4c9ab59701a19ad521549662 Author: Derrick Brashear Date: Tue Apr 20 19:59:53 2010 -0400 kauth admin tools ubik prototyping kill off ubik_Call (but not CallIter, yet) Change-Id: I7af515b4e1c55c493c304a8ffd5c74cb96cd3b97 Reviewed-on: http://gerrit.openafs.org/1793 Tested-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear commit 1662aa04d70631fd77eaeef8899f0056ce6773f8 Author: Jonathan Billings Date: Tue Apr 20 15:53:21 2010 -0400 Updated dkms.conf to remove MPS=$SMP from make * Removed the logic to set $SMP based on CONFIG_SMP from /boot/config-$kernelver * When using --with-linux-kernel-packaging in the configure line, dkms no longer needs MPS=$SMP in the make line. Change-Id: Ib65782050cae9f439ad5fed5c7bbbc403e556b4f Reviewed-on: http://gerrit.openafs.org/1798 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9ab56bb0c8c95de188b1120221ca2ad1b6fdddb9 Author: Jonathan Billings Date: Tue Apr 20 12:13:11 2010 -0400 Added explanatory comments for restorevol move Since restorevol is placed in %{_prefix}/afs/bin by make dest, we need to fix it so it ends up in %{_bindir} to be used in the base package. Change-Id: I31f2602868230416525a84a9d716230f08cb34ab Reviewed-on: http://gerrit.openafs.org/1796 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 8cca2e64ef6005d2ee050fee5641b16ae43117a9 Author: Jonathan Billings Date: Tue Apr 20 12:00:21 2010 -0400 Fixed more locations to reflect recent changes Moved restorevol man page to base package Moved state_analyzer man page to server package Change-Id: I714dd6eca86def48fefc0206c93038ae71415cc9 Reviewed-on: http://gerrit.openafs.org/1795 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 8f952a3ebda3567630c94d60877c5c926df98d08 Author: Jonathan Billings Date: Tue Apr 20 11:50:59 2010 -0400 Fixed RedHat SPEC file to reflect updates in code Moved the restorevol binary from /usr/afs/bin to /usr/bin Added the new state_analyzer.8.gz man page Change-Id: Ibf4133034b1945d58843162cb45bdd485e8c34a1 Reviewed-on: http://gerrit.openafs.org/1794 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit d80382efc5b0e3c8d32688a94c7ff7c68882cb59 Author: Russ Allbery Date: Mon Apr 19 21:36:09 2010 -0700 Remove special-case call sequence for KAM_SetPassword on s390 For Linux s390 (but not s390x), an additional argument was passed to KAM_SetPassword between the kvno and the encryption key. This doesn't seem to match the rest of the code and is now, with stricter prototyping, preventing the code from compiling. Remove it and use the same call sequence on s390 as everywhere else. Change-Id: I750f64212e80d4bed4500e316ad7d354608866d7 Reviewed-on: http://gerrit.openafs.org/1790 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 63b6bb1ee7d52ba11c817fbfbbda5704d21669dc Author: Andrew Deason Date: Mon Apr 19 14:48:14 2010 -0500 Use AC_PREREQ We use AC_USE_SYSTEM_EXTENSIONS, which was introduced in autoconf 2.60. To allow for less confusion and perhaps a more clear error message, specify that we require using at least that version. Change-Id: I42a3f4e889ad443d8d8cd3ba0c085c67606b8be3 Reviewed-on: http://gerrit.openafs.org/1784 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit e6f6c3493e4c6d0ea620f34bd764925f9d004a2c Author: Russ Allbery Date: Mon Apr 19 14:00:31 2010 -0700 Fixes and clarifications to vos setaddrs man page Add a caution explaining how the file server addresses are registered and pointing users at NetInfo and NetRestrict plus restarting the file server for the normal case. Mention what version of OpenAFS introduced this command. Drop the note about the version of OpenAFS that added the -encrypt flag, since the whole command is newer than that. Reference vos listaddrs -printuuid specifically to get the UUID. General formatting and wording cleanup: use terminology more consistently, continue a long example line, wrap long lines, fix a spelling error, and add cross-references to NetInfo and NetRestrict. Change-Id: Idd6175339dc0feb1b777963bbb09731e42b83522 Reviewed-on: http://gerrit.openafs.org/1787 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a29506a2c387b1046b2e9e8966af693567099a5 Author: Russ Allbery Date: Mon Apr 19 14:55:16 2010 -0700 Update Debian packaging for 1.5.74 Include the Debian changelog entry for 1.5.74-1 and install the new vos setaddrs man page. Change-Id: I4cc9e0590cb47d0ae885d7116f5bafd469f43cae Reviewed-on: http://gerrit.openafs.org/1788 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fe48d1777f88dc5ec8e56b2e68a2a491fe3edb45 Author: Derrick Brashear Date: Mon Apr 19 14:02:14 2010 -0400 macos disable bulkstat there's still a bug Change-Id: I23e02f9a05e001f0082b757c4a1dd78186fe6977 Reviewed-on: http://gerrit.openafs.org/1782 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5df92c083eb96b5b1496124715998ab9bfe9ef69 Author: Derrick Brashear Date: Sun Apr 18 13:45:51 2010 -0400 macos bulkstat don't double reget refs if another code path already got back the refs from finalizevnode, don't do it again Change-Id: I7e06ceeb2c7e71b1be94fd0fccb6e28c37457b24 Reviewed-on: http://gerrit.openafs.org/1776 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b64a0af473aea79dd7a198210e0283016433546e Author: Derrick Brashear Date: Sun Apr 18 13:35:09 2010 -0400 bulkstat restore bulkfetching state for reused vcaches when i introduced NewBulkVCache I elided this case. Set it here. Change-Id: Id88425b0ee662ecc23dd43cf7fa253ab61b02945 Reviewed-on: http://gerrit.openafs.org/1775 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6c49c21f9734d01ba6bf00f3a8e41460ff377868 Author: Jeffrey Altman Date: Sun Apr 18 18:34:18 2010 +0100 Windows: Preserve volume location info in case of comm fail The cache manager refreshes volume location information every two hours. If during a refresh the communication with the vldb server fails, the previously known volume location information should continue to be used. The previous behavior in which the volume location information is discarded first and then the update is performed can result in unnecessary client failures when a temporary disruption in communication with the vldb server occurs. Instead, wait until we have a successful response from the vldb server before the previous server list is discarded. LICENSE MIT Change-Id: I7c63c4f673a7a1360a74611c356329f31f9ceec3 Reviewed-on: http://gerrit.openafs.org/1769 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91bef849e58ff45fbcac3107fbc7c19d2bc88b7e Author: Jeffrey Altman Date: Sun Apr 18 18:20:52 2010 +0100 Windows: correct locking in cm_FreeServerList The cm_serverLock must be held when checking the state of the list head. LICENSE MIT Change-Id: I1134a6617d4c1e38b95512b1fdc41c5f5857ea7a Reviewed-on: http://gerrit.openafs.org/1774 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2beda68d4ad84e3e853a320bfb9d610b33f77902 Author: Jeffrey Altman Date: Sun Apr 18 12:38:27 2010 +0100 Windows: prevent infinite idle error response The idle error value (if any) is stored in the cm_req_t object. Since the value is never cleared, the same value can be returned for all requests that make use of the same cm_req_t object. Change the behavior to only return an idle error once and then clear it. LICENSE MIT Change-Id: Iac9ff8e56e856c2f0e440a34ac39ccd68de37c77 Reviewed-on: http://gerrit.openafs.org/1773 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1239acfb44d13d92b38b8b0c95ec5c480a4e2253 Author: Jeffrey Altman Date: Sat Apr 17 15:21:32 2010 -0400 Windows: Increase the memory map version Since the cm_buf_t data structure changed, update the memory map version number so that the cache will not be reused. LICENSE MIT Change-Id: If01997ebd90c8f004d7cf4ba92f46fe4b9f570bf Reviewed-on: http://gerrit.openafs.org/1772 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 690b5c814e13bfc4652043474d2dcf48e4c8468d Author: Derrick Brashear Date: Sat Apr 17 10:14:50 2010 -0400 openafs 1.5.74 make 1.5.74 versions Change-Id: I320cdbab2961dcf2a17bb71e8d4283aaf38941ce Reviewed-on: http://gerrit.openafs.org/1768 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9018b3132c92400bc87d7f3cf88b547d20f3ece Author: Jeffrey Altman Date: Sat Apr 17 11:13:21 2010 -0400 Windows: 1.5.74 change log Important changes affecting the Windows distribution for 1.5.74 Change-Id: I980a66a2ab4a90c580249641fc22e3c7a91097dc Reviewed-on: http://gerrit.openafs.org/1770 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3ad9c5583845986979a25d615a9640770a3bf9f6 Author: Jeffrey Altman Date: Fri Apr 16 22:42:34 2010 -0400 Rx: make conn_call_lock and conn_data_lock usage consistent The rx_connection.flags field is protected by the conn_data_lock but the conn_data_lock is not held everywhere the conn flags field is altered. This produces a race that can result in a deadlock when waiter flags are inadvertently prevented from being cleared. The conn_call_lock usage in rx_EndCall which was removed in Change e169708681eb1bbbb31951b95f68e861a4b01c7e must be restored. If rx_EndCall never obtains the conn_call_lock it can't ensure that the thread in rx_NewCall actively checking the calls will not end up blocking when there is now a call channel that can be reused. This usage of conn_call_lock can be removed only if a true producer/consumer model is implemented. Change-Id: Id093fd6c4a42afb833c775411be0cd406abf4ef7 Reviewed-on: http://gerrit.openafs.org/1766 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f6d2a279b9f4899f2ab072d949f0d4ff11a517f6 Author: Jeffrey Altman Date: Fri Apr 16 22:52:20 2010 -0400 Windows: cm_UpdateCell must hold cell lock across server random cm_UpdateCell fails to hold the cell lock across the server randomization. As a result the vlserver list can be destroyed while randomization is taking place. LICENSE MIT Change-Id: I7753e7e9f8a7d536ce0e2082aaca7b62ab745504 Reviewed-on: http://gerrit.openafs.org/1767 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 249f80fe747d03a84d42e78272dfe291084cacf8 Author: Jeffrey Altman Date: Thu Apr 15 21:43:44 2010 -0400 Windows: CM_SCACHESYNC_STOREDATA for non-files have no buffers Do not add QData objects with null cm_buf_t pointers to the cm_scache_t bufWritep queue when synchronizing directory changes. If a callback is required while the directory change is being pushed it can result in a deadlock. LICENSE MIT Change-Id: Id66c52ed794ceec44011167659e41a0b61898625 Reviewed-on: http://gerrit.openafs.org/1761 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 168f69db1995c0bce4daad2e4af1558282c2f80c Author: Jeffrey Altman Date: Fri Apr 16 00:31:58 2010 -0400 Windows: define new event log messages for cm_Analyze VBUSY, VRESTARTING, etc. Add MSG_SERVER_REPORTS_VBUSY, MSG_SERVER_REPORTS_VRESTARTING, MSG_ALL_SERVERS_BUSY, MSG_ALL_SERVERS_OFFLINE, and MSG_ALL_SERVERS_DOWN. Add event message throttling. Only permit one copy of a message to be generated every five seconds if the message will duplicate the prior message. This often occurs when a server or volume becomes inaccessible and there were a large number of requests queued on it. Integrate these new messages into cm_Analyze processing for VBUSY, VRESTARTING, ALLDOWN, ALLOFFLINE, and ALLBUSY errors. LICENSE MIT Change-Id: Ib30595ded23724810e294133fa75873e20ffbf0b Reviewed-on: http://gerrit.openafs.org/1762 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 5a253b19117e4f42c0db91ca3a45843462c0266c Author: Jeffrey Altman Date: Fri Apr 16 00:09:25 2010 -0400 Windows: wait for I/O on buffers to complete in cm_SetupStoreBIOD cm_SetupStoreBIOD constructs a list of dirty buffers for a file that are to be written to the file server. When constructing the list, if when determining the first dirty buffer we come across a buffer that is already actively involved in an I/O operation, call buf_WaitIO() to wait until the buffer is no longer busy before continuing. This reduces lock contention and synchronization conflicts. LICENSE MIT Change-Id: Icd79b9578b7411b138f14257bcb885249960eab0 Reviewed-on: http://gerrit.openafs.org/1760 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 349f533351a8a13a7fa2a14edd9139714064c82d Author: Jeffrey Altman Date: Thu Apr 15 23:58:21 2010 -0400 Windows: split cm_buf_t.flags field to ensure proper locking It turns out that for all these years the locks protecting the cm_buf_t flags field have been racy. Some of the flags were protected by the cm_buf_t mutex and others by the buf_globalLock. This patchset splits the flags field so that the appropriate lock will be used exclusively to protect a common set of flags. LICENSE MIT Change-Id: I85c98c85244c987df30a811d405f7d897e407ba2 Reviewed-on: http://gerrit.openafs.org/1759 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f02d34315ed260e716c49ca9adeaa2635e334e60 Author: Marc Dionne Date: Fri Apr 16 19:34:35 2010 -0400 Remove unused variable in vos.c Remove an unused variable introduced by a recent commit. Change-Id: I04432d87a27b656807430f041f84d6ada2632434 Reviewed-on: http://gerrit.openafs.org/1765 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a20326646dead6256637229b6456c380177a28ca Author: Derrick Brashear Date: Fri Apr 16 11:49:43 2010 -0400 work around finder setting modes on symlinks we could mask the mode setting on symlinks, however, it would be nice to change the fileserver to allow mode setting on symlinks in some (safe) cases. preserve our ability to do so. Change-Id: Iba69965c607530bcf2210b508c7aa37403c47477 Reviewed-on: http://gerrit.openafs.org/1764 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2a35e3a0286882eb91d4caddcb0054c413fb7db3 Author: Harald Barth Date: Fri Apr 16 01:45:35 2010 -0400 Add vos setaddrs command and man page The vos setaddrs command sets the IP addresses for a server entry in the Volume Location Database (VLDB). Specify one or serveral hosts. All existing hosts in the VLDB entry are replaced with the new entries on the command line. Change-Id: I3c26e49c4a6e2aebae363017d074329ac265132a Reviewed-on: http://gerrit.openafs.org/1744 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef960553d7102ddab1ba6c85d51cba79b8fef7b5 Author: Jeffrey Altman Date: Fri Apr 16 09:32:42 2010 -0400 Convert param.rs_aix61.h EOF from CR-LF to LF The src/config/param.rs_aix61.h source file was stored in the repo with CR-LF end of line. This is causing problems for Windows Git which converts CR-LF to LF for storage in the repo. Change-Id: I8937322ac368ac275d3dbc6bcccf2808d3db061f Reviewed-on: http://gerrit.openafs.org/1763 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4eef3b62657504c0c1cec718332dbdf4e200b20e Author: Simon Wilkinson Date: Thu Apr 15 20:52:11 2010 +0100 Tidy up UKERNEL includes UKERNEL is just another userspace build - there's no need to maintain completely separate header file lists in each object file for "userspace" and "ukernel". Tidy this up to improve the readability of these sections of code. Change-Id: I69f476a0b8aae1204cd4207c7c656ec7e07184df Reviewed-on: http://gerrit.openafs.org/1758 Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0607e8a4a19183798c656bf29aaa3f8aa75ac078 Author: Jeffrey Altman Date: Wed Apr 14 23:21:37 2010 -0400 Rx: restore thread safety to rx_NewCall Thread safety in rx_NewCall requires that only one thread be actively allocating or recycling a call at a time. Since we are no longer holding the conn_call_lock across the entire transaction we need to have another synchronization mechanism. Add a new rx_connection flag, RX_CONN_MAKECALL_ACTIVE, which when set indicates that a thread is actively obtaining a call. If any other threads see this flag set, they will wait until being signalled that the thread has completed its activity. In addition, because the call->lock may be dropped when processing rxi_ResetCall(), we must hold a reference to the call once we begin using it. Otherwise, the call may be garbage collected behind our back. Change-Id: Ie97757f812d7043203ffcaf399400789cda39da1 Reviewed-on: http://gerrit.openafs.org/1755 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b2773aa121d3c1c31ac39ac652566f54cfc4bd1b Author: Derrick Brashear Date: Wed Apr 14 12:10:31 2010 -0400 macos and bsd readdir type guessing fix right now we never return a link hint. we know here it's a link. say so. Change-Id: Iab81b83fc8de714ad52c99c86153159aa6f641f3 Reviewed-on: http://gerrit.openafs.org/1753 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 74698fbcdbf2a9adfcdd152952e18a10f2c6e80f Author: Derrick Brashear Date: Thu Apr 15 00:13:43 2010 -0400 darwin bulk race needs an iocount if another user raced with us, we need an iocount back since finalize will have dropped one. Change-Id: I93b2bb5b6004b39436684e78c4620f4d7d9d0c8e Reviewed-on: http://gerrit.openafs.org/1756 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 72aab36e10b2349cb22197fda09a330feed68ac7 Author: Derrick Brashear Date: Thu Apr 15 01:29:31 2010 -0400 snowleopard fuse fallout didn't notice in testing that 64 bit version of afsd got slaughtered. put it back. Change-Id: I3a6588df36a31ab014d79faf4ed5646339f6f84b Reviewed-on: http://gerrit.openafs.org/1757 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ab2005d719d2184a1645fdc33f49e73275d91353 Author: Marc Dionne Date: Tue Apr 13 19:35:39 2010 -0400 Replace unsafe use of gets() Build tools compain that this is dangerous - replace gets() with a bounded fgets(). Change-Id: I3bd1854a1dc4a11c801cabb987ab680fa978bd20 Reviewed-on: http://gerrit.openafs.org/1750 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f101a9ef49dbb31f516d08b82c716548b66882e Author: Derrick Brashear Date: Wed Apr 14 18:33:47 2010 -0400 drop afs_xserver lock during GetCapabilities new contact to a fileserver can trigger an InitCallBackStateN RPC to us, which our agent will need afs_xserver to handle. don't hold it; we only need it to fill in capabilities. racing here is ok. Change-Id: Ie0aaea3ab462e421bd31ba3b703d8cd0cb0d61df Reviewed-on: http://gerrit.openafs.org/1754 Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 55a24ddd4231782bf4a76c8fabade00c67845501 Author: Russ Allbery Date: Tue Apr 13 16:32:49 2010 -0700 Autogenerate a Debian changelog for correct package versioning The Debian packaging infrastructure takes the package version from the most recent entry in the changelog file. Change the changelog file to a template and add an entry to the top that will be set to the current version of OpenAFS, with a Debian revision that will sort before any official package. Change-Id: Ic7fb1d30be10210b7d032cdc49a963410997db82 Reviewed-on: http://gerrit.openafs.org/1749 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 38a80c33233852d47a124a26fe7428543df6a10f Author: Andrew Deason Date: Thu Apr 8 14:50:18 2010 -0500 Add a FUSE implementation for afsd This adds afsd.fuse, which allows for mounting AFS via FUSE (via libuafs), instead of via the OpenAFS kernel module. Change-Id: Iaafe4a5f3034fed943e2e73f79ac95580946f9a8 Reviewed-on: http://gerrit.openafs.org/1725 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0dbe0fba4f4249be11524f8e2d3a1e115591cd18 Author: Andrew Deason Date: Tue Apr 6 17:07:33 2010 -0500 Use afsd code in libuafs Share the same CM code for the kernel client as in libuafs, so we don't duplicate code for initializing the cache and other things. In order to do this: - Remove some libuafs global variables that share name and functionality with those in afsd, and declare some static - Remove uafs_Init(), and move the ukernel-specific code in it to osi_Init(); replace with uafs_Setup(), uafs_ParseArgs(), and uafs_Run(), which just call into afsd functions - Remove libuafs' cache initialization code (CreateCacheFile, SweepAFSCache, etc); instead just use afsd's - Add uafs_mount(), to perform the 'mount'ing step that takes place in the normal kernel CM - Add afsd_uafs.c for the glue between afsd and libuafs Note that this now requires libcmd for libuafs. Change-Id: I62306a18ad255680031494caf1720b29e22856d2 Reviewed-on: http://gerrit.openafs.org/1724 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 507b08a6964bd9bf98784959aaa43796283a2d09 Author: Jeffrey Altman Date: Mon Apr 12 14:45:14 2010 -0400 Rename uvldbentry spare1 to matchindex In the nvldbentry structure 'spare1' was renamed to 'matchindex'. Do the same for uvldbentry as that is what the field is used for. Change-Id: I2d1200b1044f6ae9b4523eb603a21b0484b046c7 Reviewed-on: http://gerrit.openafs.org/1741 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ea44842df8f5098798e3b8ffb1b6ff62cbfcc246 Author: Marc Dionne Date: Tue Apr 13 18:58:11 2010 -0400 Fix new UKERNEL warnings on 64-bit Commit 830cb48c enabled new warnings when building UKERNEL, which causes builds with --enable-checking to fail. These are 64-bit specific warnings from int to pointer conversions and one printf warning. Changes: - cast printf argument to (int) in afs_usrops.c - use (iparmtype)(uintptrsz) to convert 32-bit integers to pointers - move the definition of uintptrsz to src/afs/afs.h so its available to other source files, and remove the original definition in afs_syscall.c Change-Id: Id0a5fd762cf10a741f89e3a2ed0a85556137df49 Reviewed-on: http://gerrit.openafs.org/1748 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d773b01a61d2f7dbf8362ddbad8e31887841de20 Author: Andrew Deason Date: Tue Apr 13 13:53:13 2010 -0500 Add support for pkg-config m4 macros Include pkg.m4, so we can use pkg-config macros in autoconf even if pkg-config is not installed. Change-Id: Ie81307beb84499297e251f0f90781d544044a235 Reviewed-on: http://gerrit.openafs.org/1747 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6bccc0aee0b8a0b0a0b665064c746b8e3fb22843 Author: Andrew Deason Date: Tue Apr 13 12:59:30 2010 -0500 Squash afs_GenericStoreProc warning code is potentially unitialized. Initialize it. Change-Id: I9c8a787d9f7f05ea88752063f1b31e0be61e28ba Reviewed-on: http://gerrit.openafs.org/1746 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 830cb48cbdd6fb41f7db8b50429ca7441a963518 Author: Andrew Deason Date: Tue Apr 13 12:41:31 2010 -0500 libuafs: Add $(XCFLAGS) to CFLAGS on all platforms Only darwin had $(XCFLAGS) in the libuafs build for some reason. Add it to all platforms, so they get e.g. -Wall if so configured. Change-Id: Ifab39af3abf087932feb1b9085ccb26baaec3164 Reviewed-on: http://gerrit.openafs.org/1745 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6b549bdba641d883609d9d33ceba957395fff37a Author: Michael Meffie Date: Mon Jan 11 21:16:06 2010 -0500 DAFS: avoid volume lock contention during initialization Avoid the excessive volume lock contention during startup to improve the time to pre-attach a very large number of volumes. The parallel attach worker threads avoid the volume lock while scanning the partitions for volumes and send batches of volume ids to the main thread to be preattached under the volume lock. FIXES 124489 Change-Id: Ieb33a3bdd5b06349abd9c3dd994c620021cd6194 Reviewed-on: http://gerrit.openafs.org/1092 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 523d39f020f551e59b0f369c8480fa13b90db277 Author: Felix Frank Date: Wed Mar 3 22:41:15 2010 -0500 Fileserver capabilities support for the UNIX client The attached patch has the client perform a GetCapabilities RPC on fileservers it encounters. It uses an additional server flag bit to keep track of the servers that have been queried already. In the case of afs_CeckServers(), GetTime RPCs are largely replaced by GetCapabilities. GetTime is performed on a server if and only if afs_setTime is nonzero and either (a) no setTimeHost has yet been determined or (b) the server in question has been designated as setTimeHost The GetServers() function could thus be simplified even further wrt. the setTime mechanism, but doing so would imply more rewriting (violating the KISS principle; a followup patch should deal with that). When a client is asked to reset callback states, it also resets the "capabilites known" bit. Thanks go to Simon Wilkinson, Jeffrey Altman and Jeffrey Hutzelman for input regarding logic and implementation details. FIXES 124972 Change-Id: I4e22db3c5ca71f00e8c77f337e38daa0fa5b9124 Reviewed-on: http://gerrit.openafs.org/1640 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f09a3cbd30feea0add9e288380a32bba8230e0f Author: Jeffrey Altman Date: Mon Apr 12 08:58:20 2010 -0400 Rx: avoid out of order lock acquisition in rx_NewCall Sha-1 33010ef25e716f2ec2df17cc113f4ef8f67e3a74 broke the lock order conventions between the conn->conn_call_lock and the call-lock. This patchset corrects the ordering and handles the synchronization issues that might occur when the call->lock is dropped within rx_NewCall. Change-Id: Ic05837e2491a1e738e7585cf2ee6cda20775229b Reviewed-on: http://gerrit.openafs.org/1740 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit edbfcbdf0efa01fde56c9f8d857b495a86f24a14 Author: Andrew Deason Date: Mon Apr 12 12:39:00 2010 -0500 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 Tested-by: Derrick Brashear commit f77c078a291025d593f3170c57b6be5f257fc3e5 Author: Andrew Deason Date: Thu Apr 8 16:37:51 2010 -0500 Split afsd into afsd.c and afsd_kernel.c Move the parts of afsd.c that depend on using the kernel module into afsd_kernel.c. Keep in afsd.c code that can be used with libuafs drivers. Change-Id: I22c4dd698e8c12c42dabd85ea38226ffd8746d11 Reviewed-on: http://gerrit.openafs.org/1723 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b28cdd0a0e59290d8cdbf73de26ce8f34b068a61 Author: Matt Smith Date: Sat Apr 10 01:36:59 2010 -0500 Fix problems from afs_osi_gcpags reorganization Corrections to mistakes made during the reorganization of afs_osi_gcpags.c to per-OS directories. Includes fixes to LINUX24 and whitespace corrections. Change-Id: Ie9d1637b00dacc0f58e90df0e4fb2505a571bc1b Reviewed-on: http://gerrit.openafs.org/1737 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d9bb0defb3f63640d557b377fa937d0db0de013 Author: Michael Meffie Date: Fri Apr 9 22:31:24 2010 -0400 afsmonitor: fix segv on exit Fix crash during afsmonitor shutdown when monitoring multiple fileserver or clients. Change-Id: I5fa5cb7d89dbdfcc5f97541a0e0c6b0836d558b1 Reviewed-on: http://gerrit.openafs.org/1735 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 35b90a6f526f3724d88acd95c9d4594ec9b3c736 Author: Michael Meffie Date: Fri Apr 9 21:03:09 2010 -0400 afsmonitor: show busy counts Update afsmonitor to display rx_nBusies, fs_nBusies, sysname_ID, and fs_GetCapabilities, which where claimed from spare fields long ago. Add a new group name called Busies_group to show just the busy fields. Change-Id: Id096c8bd8ba148def425a75e06250f7d5319672b Reviewed-on: http://gerrit.openafs.org/1734 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dc915673f23bf18c0eda9bf947422f6b5360fdb7 Author: Marc Dionne Date: Fri Apr 9 20:19:19 2010 -0400 Fix UKERNEL build error - include afs/afs_osi.h Commit d0f2ffca breaks the build on my system because afs/afs_osi.h no longer gets included for the UKERNEL + !KERNEL case. This causes many errors as a result of missing definitions such as afs_kmutex_t. Pull out this include into a separate ifdef based only on "KERNEL". Change-Id: Idafa7702550eb8cb2c7693f4173e482b15702d7e Reviewed-on: http://gerrit.openafs.org/1733 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6de3486c2c78cfbb2e9a9038593b60cfccf671a6 Author: Matt Smith Date: Fri Apr 9 13:32:46 2010 -0500 Move contents of afs_osi_gcpags to per-OS files Moved the relevant chunks from src/afs/afs_osi_gcpags.c to osi_gcpags.c located in each of the OS subdirectories. Also updated libafs and libuafs to reflect these changes. Change-Id: I537d92952718ef3b3bb0583daf7993288716652c Reviewed-on: http://gerrit.openafs.org/1727 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 185a6a474ccaf15c1abb708bcdfe27857454cef4 Author: Andrew Deason Date: Thu Apr 1 13:55:51 2010 -0500 Correct incorrect type-punning fixes Commit 549002c906795f978eebf81c706995116a04a8ff attempted to resolve a few type-punning-related warnings, but did so using unions. Unions are not guaranteed to work correctly with type-punning on non-gcc, so partially revert and reimplement. Change-Id: I6a49184284809c929bc45b5de5b32b8323467505 Reviewed-on: http://gerrit.openafs.org/1679 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4c68f58827913129947bc44978e7469b3271c3c6 Author: Michael Meffie Date: Thu Apr 8 13:27:36 2010 -0400 afsmonitor: add fs callback xstats collection Adds the capability to afsmonitor to display and process thresholds for fileserver callback xstats collections. The callback counters are placed to the right of the full perf data. When afsmonitor is started without a configuration file, the callback xstats data is retrieved and displayed, since by default afsmonitor will show every field. When a configuration file is given, poll the fileserver only for the collections needed to display information requested by the 'show fs' commands. Change-Id: I572ff682de4cc7ef27bb46dd028d3d797b873841 Reviewed-on: http://gerrit.openafs.org/1731 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7214af16a9cc23632f2a00d035e6c0afec887e55 Author: Michael Meffie Date: Fri Apr 9 11:46:10 2010 -0400 afsmonitor: avoid showing full perf stats garbage Unfortunately, the full perf stats contain timeval structures which do not have the same size everywhere. Avoid displaying gargbage, but at least try to show the overall stats. Change-Id: I9245b333ac15212194490e1a3f11b7c98dfaadda Reviewed-on: http://gerrit.openafs.org/1730 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 76a1088782f363cc784f7a8fe2aa3906558ec559 Author: Derrick Brashear Date: Fri Apr 9 15:21:08 2010 -0400 ukernel osi prototypes header and add statvfs to it so we stop getting a warning Change-Id: I585f559f083203214d298062862434f9f381808b Reviewed-on: http://gerrit.openafs.org/1729 Tested-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit f54785bdedea5aad8d6d918b4ad4e99fca9836e1 Author: Andrew Deason Date: Thu Apr 8 15:35:12 2010 -0500 UKERNEL: allow creation of non-detached threads Make usr_thread_create create a non-detached thread by default, and just have callers call usr_thread_detach if they want it detached. The only current caller of usr_thread_create already calls usr_thread_detach. Also add usr_thread_join to make it possible to join a created thread. Change-Id: Iad581c45d36dc43e94c950a5ca6a41dea8dc4b2f Reviewed-on: http://gerrit.openafs.org/1722 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2f03d4e6e25d0db4986120e1d2ec6a200b0d0d39 Author: Andrew Deason Date: Tue Apr 6 16:57:27 2010 -0500 Use AFS_CACHE_VNODE_PATH for UKERNEL Use the AFS_CACHE_VNODE_PATH cache mechanism for UKERNEL, to be compatible with new kernel caching code, and simplify the cache code a little bit. Change-Id: Ifc44790db08a336cca0032a1d05eedf70d2b24b8 Reviewed-on: http://gerrit.openafs.org/1721 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d0f2ffcaa3728bbcccf63b37ab1a52e8b45ede96 Author: Andrew Deason Date: Fri Aug 14 16:17:11 2009 -0500 Make osi_GetTime work on 64-bit libuafs libuafs was previously using an implementation of osi_GetTime (and thus clock_GetTime) that required 32-bit time_t's to work properly. Instead, just use the non-kernel osi_GetTime for UKERNEL, since we're just in userspace either way. Change-Id: I4f2d060f7e2aaeaaa3fe164aca6bee5333de4583 Reviewed-on: http://gerrit.openafs.org/1714 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d29a2443f028c04d09817ca0f6b62b0ae23c6af7 Author: Andrew Deason Date: Thu Apr 8 17:22:35 2010 -0500 afsd: squash inode format warning Coerce the inode into an int, so we can predictably print it when we print debug info. Change-Id: I81533b66b632eb0fed3a9e37480feaf2fa92d510 Reviewed-on: http://gerrit.openafs.org/1720 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 269d7cc02ad65af5caf0369a07eab54052378ce8 Author: Andrew Deason Date: Thu Apr 8 17:26:09 2010 -0500 UKERNEL: prototype uafs_Shutdown Prototype uafs_Shutdown in afs_usrops.h, so users of libuafs can stop the CM. Change-Id: I63e0106f7bfb5fff9a3ff1936005f6e24855efec Reviewed-on: http://gerrit.openafs.org/1719 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 54b78ce087776342a4abb301fcb3fe8e58180621 Author: Andrew Deason Date: Thu Apr 8 12:15:34 2010 -0500 UKERNEL: Use real vnode type constants In UKERNEL, make VDIR be S_IFDIR, VREG be S_IFREG, etc. This makes fakestat work correctly, since the va_mode of faked mountpoints are OR'd with VDIR. Change-Id: I7ac1dc7ae1d7cefade9bf92d8169db80977a5c76 Reviewed-on: http://gerrit.openafs.org/1718 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d6345e824514d7f301b43b99e5f8067d66770ed7 Author: Andrew Deason Date: Tue Apr 6 17:00:58 2010 -0500 UKERNEL: check for null afs_CurrentDir on shutdown During shutdown, do not release afs_CurrentDir if we don't have one. Change-Id: I809a23f36929a02cb63753d66627357615cbaf9e Reviewed-on: http://gerrit.openafs.org/1717 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b822971a3ee6bd2dc0024b30b255f8f83e23637c Author: Andrew Deason Date: Thu Apr 8 14:49:53 2010 -0500 UKERNEL: add uafs_statvfs Change-Id: Iedd7882f4a57cd89d145f1c61c5f85181187db03 Reviewed-on: http://gerrit.openafs.org/1716 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f7b192364227be1d1db58097d72b049f8ebc0777 Author: Andrew Deason Date: Fri Aug 14 16:26:16 2009 -0500 Prevent uafs_readdir/closedir segfault Check for the NULL case in uafs_readdir/closedir, so we don't blindly dereference the given pointer. Change-Id: Iaefce9bf2e5135a60e9739f866a1f27333f06e28 Reviewed-on: http://gerrit.openafs.org/1715 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 50f248d160a34cd83363d97a1a5f0ff8beb83299 Author: Russ Allbery Date: Thu Apr 8 14:54:23 2010 -0700 Update Debian packaging files The Debian packaging files in the tree were ancient. Update to the packaging files from the just-uploaded 1.5.73.3-1 version, which should build and correctly install the current development source. The current packaging files no longer use a hard-coded version in debian/rules, so remove the configure machinery for creating it. The correct way of handling the version number is to generate a new changelog entry. That work will come in a subsequent patch. Change-Id: I187fe7cc3f4ca38de6165d58274841d300b6cdf1 Reviewed-on: http://gerrit.openafs.org/1713 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cf432e38459b963e74f46a4833626b2c03f2fad7 Author: Russ Allbery Date: Thu Apr 8 13:23:11 2010 -0700 Add OpenAFS-debug.*.plist to .gitignore Change-Id: I6f931cb19997c8743223ee42d4072ad632c3bad4 Reviewed-on: http://gerrit.openafs.org/1712 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f2af7a6ffcead3ffd1f2ae9fac5fc682c6c8c7ac Author: Michael Meffie Date: Wed Mar 10 08:48:38 2010 -0600 pts mem -expandgroups option Improve support for supergroups in the pts membership command with a new option called -expandgroups. This option will recursively show the complete membership of users and groups. The expanded members of a group are all the users which are members of all of the group's sub-groups. The expanded groups of a user are all the groups which are supergroups of the users's groups. Change-Id: I811a4e5e73632e5e205fe10f3f3a36a98464d49e Reviewed-on: http://gerrit.openafs.org/1601 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5b44b5dfe0d7aee14f87df9a6b8c5e582473d0fe Author: Michael Meffie Date: Wed Mar 17 19:16:50 2010 -0400 pts mem -supergroup option Improve pts support for supergroups with an option to list the supergroups of a group. Change-Id: I4fe1cd131cd334386bc16ce733e01e29e0511d4f Reviewed-on: http://gerrit.openafs.org/1600 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fdb9429eafda330bfdf1feefeb1a9ff61c7746b7 Author: Simon Wilkinson Date: Wed Apr 7 00:29:44 2010 +0100 Linux: kmap() not page_address() Using page_address() will return NULL if the page is in highmem. To avoid this, we must kmap() the page we're getting the address of, and kunmap() when we are done. If the page isn't in high memory, then kmap() is equivalent to page_address(). Change-Id: I42abfadaf3101bf5ad41bd7e5f720ba2583c4ee5 Reviewed-on: http://gerrit.openafs.org/1705 Reviewed-by: Russ Allbery Tested-by: Russ Allbery Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit 75cf37f9449e2c75236028b603918d22cd278ef9 Author: Russ Allbery Date: Wed Apr 7 11:53:23 2010 -0700 Explain in CellServDB man page that server lines can be omitted It's possible to use AFSDB records only to locate the VLDB servers but still list the cell in the client CellServDB so that the client is aware of it and populates it into dynroot. Describe doing this in the man page. Change-Id: I714cd515dc4b72a6e358bbd8f9332d4ddce5a5fc Reviewed-on: http://gerrit.openafs.org/1710 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit be44999904dccffc6de5626362a77babbda0688f Author: Andrew Deason Date: Wed Apr 7 10:35:53 2010 -0500 Fix typo in bos_create manpage Change-Id: I1ea456e47eccc0a74f042898ef8a3bcde3aacf15 Reviewed-on: http://gerrit.openafs.org/1709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4ebd6098dfbf76ebc5ede7a2e9d7222936265a03 Author: Rod Widdowson Date: Wed Apr 7 11:14:32 2010 +0100 Make tests/afcp compile cleanly It didn't compile because it includes changing that to afs_consts.h makes it happy. Change-Id: I3a21e6ab2b99d8f4ebbc55922163b0695a6187f3 Reviewed-on: http://gerrit.openafs.org/1708 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d41bc24c51018a25eac49b3403cbb276713e1ad Author: Russ Allbery Date: Tue Apr 6 16:31:37 2010 -0700 Reallocate memory in aklog for the AFS ID string aklog was previously writing the magic AFS ID string into previously alloated memory with sprintf, but the variable in question was only as long as the username, so this code could overwrite memory and lead to heap corruption. Free previously allocated memory and use afs_asprintf to format the AFS ID string instead. Change-Id: I7649864817340764c39c176606a9a543c10983c9 Reviewed-on: http://gerrit.openafs.org/1706 Tested-by: Russ Allbery Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a763edc3a490f6c837d4272468803c36f8febda2 Author: Russ Allbery Date: Tue Apr 6 15:27:51 2010 -0700 Make src/rx/rx.c not executable Change-Id: If471b579e6f1bf4f69a37f6edcc34e9546766df2 Reviewed-on: http://gerrit.openafs.org/1704 Tested-by: Russ Allbery Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d395f1754649b70311895c37962cd1770cb9f73 Author: Russ Allbery Date: Tue Apr 6 17:46:13 2010 -0700 Improve demand-attach fileserver bos documentation Add a caution to the fileserver man page explaining that traditional and demand-attach require different configurations, and also mention that there are two different server implementations. Add an example of a bos create command for creating a demand-attach File Server to the fileserver man page. Add a caution to the bos create man page that a traditional fs node won't work with demand-attach and vice versa. Document the necessary arguments for the dafs type. Clarify in EXAMPLES which bos create commands are traditional and which are demand-attach. Add an example of changing from a traditional to a demand-attach configuration. Change kaserver to ptserver in the example of a simple process. Change-Id: I4077246b69edf6e1ddc7c0761ac8e1006d471c24 Reviewed-on: http://gerrit.openafs.org/1707 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 10884e7354e6d5a3b7869e115cc90424410cfd12 Author: Jeffrey Altman Date: Mon Apr 5 11:24:16 2010 -0400 Windows: WinTorture Verbose mode display all logged messages In verbose mode, wintorture should send to stdout all logged messages. LICENSE MIT Change-Id: I4e173c35fcf6b1284d31149d773308b9f9c9a773 Reviewed-on: http://gerrit.openafs.org/1696 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit eb25c5b1c3b7d7e25ce00bafc08fa2d92acc4afa Author: Jeffrey Altman Date: Tue Apr 6 15:07:47 2010 -0400 Windows: Support new Cygwin docbook stylesheet location Make the computation of the docbook stylesheet location based upon testing for directory existence now that versions of cygwin 1.7.2 and place the stylesheets in a new location. Change-Id: I844ae35a34eab73ee033bba875e68f71dc54f26b Reviewed-on: http://gerrit.openafs.org/1702 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 10b4833d29025c01e8eeea1c5b3411bda9a4cbc5 Author: Jeffrey Altman Date: Tue Apr 6 15:06:55 2010 -0400 Windows: permit documentation to be built without binaries Add a dependency to the documentation rule on config so that the documentation can be built without the entire source tree Change-Id: I81d18fa9ec32c4d7d9799db2b1eac57c1d83df75 Reviewed-on: http://gerrit.openafs.org/1701 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0bc5b666b1c4a46d2dd797415dc7d25a460bbf59 Author: Jeffrey Altman Date: Tue Apr 6 14:29:26 2010 -0400 Windows: tag is listitem not llstitem Latest version of docbook picked this error up. Change-Id: I2e6248d27e56c0074b0f80124733b79d7d1b51f0 Reviewed-on: http://gerrit.openafs.org/1699 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b9f014bdbf1ff009dba56f138a6c618281539d9a Author: Derrick Brashear Date: Tue Apr 6 14:42:44 2010 -0400 make openafs 1.5.73.3 another point release Change-Id: I3430d62a4088e0b6f930b0b6cd2507f96226adea Reviewed-on: http://gerrit.openafs.org/1700 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit da4a70eabfab3ad0d1db0f7cc60b7a4f2a8c04f1 Author: Derrick Brashear Date: Tue Apr 6 09:57:24 2010 -0400 macos bulkstat avoid reclaiming vnodes when a vnode has gone CVInit, don't use it as a vlru pivot. Change-Id: I0b874c141069a23a9724d360a7864b0271c36e15 Reviewed-on: http://gerrit.openafs.org/1698 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 170a12c6eacab152bea9576bfcdb9cf9c0bea8ce Author: Derrick Brashear Date: Sun Apr 4 10:37:48 2010 -0400 avoid macos bulkstat vlru when no non-dead vnodes exist if we can't find a candidate to be the vlru item to manipulate past, simply don't do the vlru update FIXES 126868 Change-Id: I5c053d1934b0787ab7f2021c70a776e54208d345 Reviewed-on: http://gerrit.openafs.org/1690 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2b42e781681a3024f3e50685a51293bd87d08f59 Author: Derrick Brashear Date: Mon Apr 5 00:42:04 2010 -0400 panic generation update something weird, e.g. panic(cpu 0 caller 0x5c91c3d0): buf@/Users/shadow/Source/openafs/src/rx/rx_kcommon.c:1348 which came from an osi_Assert. not sure yet what the deal is, but attempt to make this less ambiguous and less likely to conflict with other macros. Change-Id: Iac27e89fc655d2b1ba6d04936e137060d8abd9c4 Reviewed-on: http://gerrit.openafs.org/1693 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 03bb2c9d40859ce5d1205e7c8503a80c8192f5e4 Author: Jeffrey Altman Date: Mon Apr 5 13:19:49 2010 -0400 Windows: cm_UpdateVolumeLocation !append exts to num vol names cm_UpdateVolumeLocation will append ".readonly" to a volume name if the base name cannot be located. However, this should not be done if the base name is numeric. LICENSE MIT Change-Id: Id61b8803eed51d124b612ffba8b185a4b4982c1d Reviewed-on: http://gerrit.openafs.org/1695 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 33010ef25e716f2ec2df17cc113f4ef8f67e3a74 Author: Jeffrey Altman Date: Mon Apr 5 13:35:42 2010 -0400 Rx: Remove conn_call_lock contention between rx_NewCall and rx_EndCall Add a new call state, RX_STATE_RESET, which permits us to remove the conn_call_lock contention between rx_NewCall and rx_EndCall. It is no longer necessary for rx_NewCall to hold conn_call_lock across rxi_ResetCall which can block. rx_EndCall is therefore always free to complete without unnecessary delays caused by rx_NewCall. Change-Id: Ie169708681eb1bbbb31951b95f68e861a4b01c7e Reviewed-on: http://gerrit.openafs.org/1697 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 568a4078563e2cb9bd89409486e361357cc18450 Author: Aditya Sarawgi Date: Mon Apr 5 22:55:48 2010 +0530 Replace kmodstat by kldstat FreeBSD uses kldstat instead of kmodstat to get the stats of the dynamically loaded kernel modules. Change-Id: I3f658469e60f48b50a81e6ab5bcc507186fd8c5a Reviewed-on: http://gerrit.openafs.org/1694 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f61d2ba1c9953136c8e27667407a800ff9b7a89b Author: Jeffrey Altman Date: Thu Apr 1 23:33:16 2010 -0400 Fix usage of RX_CALL_TQ_WAIT flag The usage of RX_CALL_TQ_WAIT flag was not consistent within both rx.c and rx_rdwr.c. When a thread is waiting on the transmit queue it must not only set the RX_CALL_TQ_WAIT flag but also increment the call->tqWaiters count. Upon waking up, it must decrement call->tqWaiters and only clear RX_CALL_TQ_WAIT if the tqWaiters count reaches zero. Change-Id: I7de01d27f073cddd9651fbcd9cd2038e56ac35cf Reviewed-on: http://gerrit.openafs.org/1685 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 00a0351ae0b0850f0191d5df2d9478fbc8e4f30a Author: Derrick Brashear Date: Thu Apr 1 21:33:49 2010 -0400 rx_ClearTransmitQueue should signal waiters when flushing if we flush, play it safe and signal tq waiters. Change-Id: I945649c2e440c78c5c5a62da70236a67dc190228 Reviewed-on: http://gerrit.openafs.org/1682 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit fc02ed1065ea4d3f2a55ace2b994a459ba4a5d8a Author: Derrick Brashear Date: Mon Apr 5 00:41:28 2010 -0400 macos panic decoder update make it able to decode prerelease and point release panics Change-Id: Ibf28a7df7f0a21ff8f297d548a6b853a5e296064 Reviewed-on: http://gerrit.openafs.org/1692 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ec74299c7c0f6e705e6ba2329001b92f9941868e Author: Derrick Brashear Date: Fri Apr 2 01:29:22 2010 -0400 macos 32 bit platform user address transform make the ioctl32 translator work as expected, e.g., create proper user addresses. Change-Id: Ia690dee5f9978d679e942a9954f2123df4a96bc2 Reviewed-on: http://gerrit.openafs.org/1687 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f9799b856183017274876ed09b1da2c069b5177d Author: Derrick Brashear Date: Fri Apr 2 01:32:06 2010 -0400 make 1.5.73.2 fix aklog for 32 bit macos, make freebsd vaguely more useful Change-Id: I53bb88f11eedb365e4430aed468cb9c84442d44b Reviewed-on: http://gerrit.openafs.org/1688 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 836c5bcfaf33ec118e209b066639c5196efedf47 Author: Derrick Brashear Date: Thu Apr 1 23:17:53 2010 -0400 freebsd switch back to condvar-based sleep add TimedSleep for condvar-based sleep. this should be revisited; mac and freebsd should be able to share this. possibly several other platforms. Change-Id: I918f45a689dd129119477cc63820f5c802e182d2 Reviewed-on: http://gerrit.openafs.org/1684 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 687652c74a050e28d1c0cffb24e58545257a13c8 Author: Derrick Brashear Date: Fri Apr 2 01:01:23 2010 -0400 macos installer pane warning fix didEnterInstallerPane is void, not BOOL. make it so. Change-Id: I934129684c839fa304bbfb7745833f5a7739e111 Reviewed-on: http://gerrit.openafs.org/1686 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit af5923c0507f45fc4124ed9ae5ac5ed014923034 Author: Andrew Deason Date: Thu Apr 1 16:42:25 2010 -0500 tubik: Correct use of flags_cond and version_cond Waiters of flags_cond and version_cond were not doing so correctly; the correct way is to acquire a lock prior to their respective checks, and atomically drop/acquire that lock with pthread_cond_wait. Otherwise, we could miss a wakeup if a flag changed between our check and when we wait. To make this possible, make versionLock a normal pthread mutex in AFS_PTHREAD_ENV, so it is a lock we can pass to pthread_cond_wait. Make the waiters pass versionLock to pthread_cond_wait, and eliminate flags_mutex and version_mutex. Change-Id: Id33a72182b907d069e342cb049e23868ab2f7eb9 Reviewed-on: http://gerrit.openafs.org/1681 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5a7d6da52573aeb5ca062e3458ea7c375ed28054 Author: Andrew Deason Date: Thu Apr 1 15:33:24 2010 -0500 Kill afs_inet_ntoa Replace all calls to afs_inet_ntoa with the threadsafe afs_inet_ntoa_r. afs_inet_ntoa was being used in a few places that may be threaded (ubik), and in general should be avoided in case the relevant code becomes threaded. Remove the definition of afs_inet_ntoa to prevent anyone from using it. Change-Id: I163d3f58fdd3d28077780963ced9995247682d78 Reviewed-on: http://gerrit.openafs.org/1680 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 73dd2783d7b73350ca047bf0bea2895e152eca71 Author: Derrick Brashear Date: Thu Apr 1 23:11:42 2010 -0400 freebsd glock assertions assert we don't try to recurse on the glock Change-Id: Iecf0f869e4a541a0b5322def47c944dec310ae3e Reviewed-on: http://gerrit.openafs.org/1683 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8844c339608d92c6a69364f84fcd14366cea9f13 Author: Andrew Deason Date: Thu Apr 1 13:18:41 2010 -0500 fssync-debug: fix strict-aliasing problems We cannot type-pun pointers like that. Instead, declare a new struct on the stack, and copy the memory into it. Remove the CFLAGS_NOSTRICT suppression on fssync-debug.o. Change-Id: I25b48399417e009dc94bfebd513c0ee6feea282a Reviewed-on: http://gerrit.openafs.org/1678 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a83e7ea4d86352d89f270be93db77a0774aaea3f Author: Simon Wilkinson Date: Wed Mar 24 12:40:35 2010 +0000 Fix formatting issues in src/afs This patch changes formatting in src/afs to be return_type fn_name(args) { } ... as in the rest of the code. Change-Id: Ib6e792d0795a83ea6fcf35df4413dec6492a4cc0 Reviewed-on: http://gerrit.openafs.org/1645 Reviewed-by: Rod Widdowson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 91450a968df15b6134ab2cef49e5f4a3679735c8 Author: Ben Kaduk Date: Wed Mar 31 22:28:10 2010 -0400 Set a storeOps storeproc for the memcache case Finish fixing the bug from 34ffc9cd that 57d8e454 only partially fixed -- set a storeOps.storeproc element in rxfs_storeMemOps as well as in rxfs_storeOps. This eliminates a NULL/uninitialized memory dereference. Change-Id: I9fe0fb147222b8f7a5a76c9ada9ca93f53ce1fa7 Reviewed-on: http://gerrit.openafs.org/1677 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 709315400c9735a2360e01c927e5a3816a5dc2d3 Author: Ben Kaduk Date: Wed Mar 31 11:27:38 2010 -0400 Fix build for FBSD80 The change to a dynamically-allocated group list came before the change to allow the maximum size of that group list to be set as a tuneable at boot. The 8.0 release happened to come between them, so we must treat both cases. (Note that AFS_FBSD81_ENV is not yet defined anywhere; that will come later.) Change-Id: I87a0e2cff3c42de60d512fe5653abe0161afc789 Reviewed-on: http://gerrit.openafs.org/1676 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b475c0c5f784c296ee7acba622353653d2b4504 Author: Ben Kaduk Date: Wed Mar 31 00:49:02 2010 -0400 Update to the new thread world order for FBSD Since FreeBSD 5.0, system calls have taken a thread argument instead of a proc argument. Finish catching up. Also remove the retval argument, which is not in the system sysent definition, and is unused. Since we took our sweet time getting around to it, we can also remove large swaths of FreeBSD 4.X-only code from the area. Fix the vop_*_args struct definition comments that had changes in addition to proc-->thread while we're here. Change-Id: Ib469e77655a6c04bfbfe1e5fab54f6f3a6119a85 Reviewed-on: http://gerrit.openafs.org/1675 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef2604e4532d6712b3d91a98a4d1f1f070de487d Author: Ben Kaduk Date: Tue Mar 30 23:35:13 2010 -0400 Include limits.h for FBSD Needed to pick up INT_MAX in the KERNEL case, for stopping the XDR madness, among other things. Change-Id: Ibcf2681b450f6a3603418991951f5144ab677d28 Reviewed-on: http://gerrit.openafs.org/1674 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6a261db9a6bb1ac4b0bb2b88efe2e3e718970ab3 Author: Derrick Brashear Date: Tue Mar 30 16:28:27 2010 -0400 openafs 1.5.73.1 with rpm and macos versions which hopefully work for packaging (well, the macos does) Change-Id: I42016db95ddaff6f76e1f0954eb06cfd743f18cf Reviewed-on: http://gerrit.openafs.org/1670 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 053522f534f73f9843a68334158ff98a48d9578e Author: Ben Kaduk Date: Tue Mar 30 20:34:02 2010 -0400 Make GCPAGs_perproc_func cleaner for FBSD case Partially rewrite 2cf1f10a to reduce code clutter. Instead of accessing pproc->p_ucred directly in afs_GCPAGs_perproc_func(), push this access into a FBSD-specific afs_proc2cred() function. This is not quite right, since we do not lock the proc mutex, but in the same way as the old version and with more reasonable preprocessor conditionals. This also eliminates a probably-needless call to osi_Panic. Change-Id: Ib403132f31cc13f8c4581cb89ecc8938d0a0dd88 Reviewed-on: http://gerrit.openafs.org/1672 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c0f1970909d691d551273deee9b63bda50896ae6 Author: Jonathan Billings Date: Tue Mar 30 16:35:50 2010 -0400 Updated RedHat RPM spec file to include unreferenced files Added the libkopenafs libraries and headers to the authlib package. Added the afs_compile_et binary to the devel package Removed the reference to .../man5/afszcm.cat.* because it is already caught by the earlier reference to .../man5/afs* glob. This caused a warning during the package build process. Change-Id: I64a037a8534ac3d2c6b0aa22249d6827e08af9b1 Reviewed-on: http://gerrit.openafs.org/1671 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae19c2d2464417a9454ef46ab3d63ae23024676d Author: Jonathan Billings Date: Tue Mar 30 16:06:07 2010 -0400 Move restorevol to bin from sbin in make dest Adds to the changes made in d6df1a8cec39edf7c0d2598921c735ac6aca70d7 so that 'make dest' installs restorevol into bin. Change-Id: I9c7f302ad9a2f25e9a362ea96dbbf0d91a7d9b04 Reviewed-on: http://gerrit.openafs.org/1669 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit da9b39c0a474c134f6e7c2bfd978bb7a70e770d0 Author: Derrick Brashear Date: Tue Mar 30 11:43:33 2010 -0400 darwin notify avoid reentrant vfs context panic if we own the context, don't get it again. Change-Id: I1f574bc3dda764c7a9552f1adf0f64e50afc1d7d Reviewed-on: http://gerrit.openafs.org/1668 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 283c0f5347a71ce2d4a1e22c8379f4f89b21489a Author: Russ Allbery Date: Mon Mar 29 22:17:31 2010 -0700 Update VCS instructions for Git Rename README.CVS to README.GIT and update the references from CVS to GIT. Refer readers to the wiki for the detailed instructions and information about Gerrit. Change-Id: Ia1826110c4b974ab36a64555ca44e6c5ce74f7ef Reviewed-on: http://gerrit.openafs.org/1667 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2f4a1897bfb2db8655a4eb2f87785753df1c5698 Author: Davor Ocelic Date: Mon Mar 29 16:54:43 2010 +0200 Minor state_analyzer manpage corrections Done according to adeason's comments on http://gerrit.openafs.org/#change,1655 Change-Id: Ia5b28473fa37ad2a877a5a56b1b7f1c4893e8db1 Reviewed-on: http://gerrit.openafs.org/1666 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 001a61a6180bb1c70401c40c8cd1d38d804eba8c Author: Rod Widdowson Date: Wed Mar 24 16:59:15 2010 +0000 Render the IP address for the "Ubik: Lost contact with sync-site" log message in the same way that all other IP addresses are (via afs_inet_ntoa, rather than stripping the buytes out in a manner which assumes a specific endianism). Done more as a way to test my understanding of the GIT/GERRIT technology with a small non-important checkin. Change-Id: I177e1288e8e23087aeebb7abe4ed63a7c2b88ccb Reviewed-on: http://gerrit.openafs.org/1649 Tested-by: Rod Widdowson Reviewed-by: Rod Widdowson Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7c6f94b365169cd643cbe03a23d14b2e35d429af Author: Ben Kaduk Date: Mon Mar 22 22:35:51 2010 -0400 Catch up to dynamically-sized cr_groups in FBSD80 In FreeBSD 8.0 and later, (struct ucred)->cr_groups is a pointer to a dynamically-allocated array, and NGROUPS is now 1024 by default (tuneable at boot). Don't put a gid_t[NGROUPS] on the stack for the FBSD80_ENV case. Also avoid keeping a function-local ucred structure (in afs_osi_proc2cred()), by bypassing that function entirely (though this accesses the process credentials directly, which may require locking; thread credentials accesses can be safely done lock-free). Add an osi_Panic() to ensure that it stays that way. Don't pretend that we have a useful afs_osi_cred to export. Don't blindly overwrite NGROUPS past cr_groups. Change-Id: I76295164a24bddf2782ab2fa662acd0e1b4855d6 Reviewed-on: http://gerrit.openafs.org/1665 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 326ff2aa68082a804ffef7fb1187a26962be924e Author: Davor Ocelic Date: Wed Mar 24 22:45:20 2010 +0100 Initial; add state_analyzer manpage Change-Id: I5dd43e6ea5764421a6e44f372f4e9c9576de627e Reviewed-on: http://gerrit.openafs.org/1655 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5d5da6eb4d5db9323ad0b89417d17ea577a0eb98 Author: Jeffrey Altman Date: Sat Mar 27 16:13:27 2010 -0400 Windows: buffers whose offsets are beyond EOF should be zero filled and locally allocated When a buffer is being allocated for an offset that exceeds the file length as known to the file server, that buffer should be zero filled and it does not require server validation. Previously all buffers were populated with a FetchData call. This is wasteful of time and server resources when there is a valid callback registration because the serverLength is known to be valid. LICENSE MIT Change-Id: I13f9a8dbd6387c3ba71638a682e995d7a7d0862f Reviewed-on: http://gerrit.openafs.org/1664 Tested-by: Jeffrey Altman Tested-by: Asanka Herath Reviewed-by: Asanka Herath Reviewed-by: Jeffrey Altman commit 1bb3522983ec7ee8e99ca28bb744601f1c15837c Author: Claudio Bisegni Date: Wed Mar 24 23:27:05 2010 +0100 GUI Update for Kerberos Ticket Renew Now the NSEditText for Renew Time is replaced by NSStepper for Days:Hours:Minutes:Seconds Change-Id: If696f456faada6762def192ab0887539d55bc5d4 Reviewed-on: http://gerrit.openafs.org/1656 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5436264d0c1347e0f8ed8f650d5fc4cc4dd0dd71 Author: Derrick Brashear Date: Sat Mar 27 12:45:40 2010 -0400 aklog pt error table warning fix include the header file that prototypes the pt error table Change-Id: Ibd1a7cb04d8084a50d3a429fa69cfb2967874c9b Reviewed-on: http://gerrit.openafs.org/1663 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c44a69b3379a736274be3045d77d5946efa64869 Author: Derrick Brashear Date: Thu Mar 25 09:01:23 2010 -0400 aklog more error tables initialize the rest that we might need Change-Id: If4e02add67994ae5397c60de3e64c072c3512a2e Reviewed-on: http://gerrit.openafs.org/1661 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d69cfbc20f1354b1dd9094b5ad496c8beaa5c58 Author: Chas Williams - CONTRACTOR Date: Thu Jan 7 18:35:37 2010 -0500 LINUX: you dont need to memset() after allocating credentials If you wanted to create a blank credential, you wouldn't want to make it uid = 0. Anyone allocating a credential SHOULD properly fill in all fields making this blanking operation moot. Regardless, this memset() is before the allocation failure test and would/could panic. Change-Id: Ia182a874a5e1bf28a2cd94898f67d81e5588d58c Reviewed-on: http://gerrit.openafs.org/1080 Tested-by: Simon Wilkinson Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4b3f3169cb89c80acc0cc70d51cf47ed32c22ab2 Author: Jeffrey Altman Date: Thu Mar 25 01:23:23 2010 -0400 Windows: afslogon.dll vs windows 7 In Windows 7 the GINA is no longer used. As a result, when a non-Heimdal realm is used for logon, the LogonDomain field is no longer populated during the NPLogonNotify call. Instead we must obtain the Kerberos realm from the UPN specified in the Username field. Change-Id: I838e0a5b19d560dd2fed6ccccf1e136fe1c4e0c2 Reviewed-on: http://gerrit.openafs.org/1660 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fda5f9a37364b09ef0965d5512989f44aed880d7 Author: Jeffrey Altman Date: Thu Mar 25 00:40:29 2010 -0400 Windows: aklog must reset viceId to 0 before pr_CreateUser call If the viceId is not reset to 0, the ptserver believes the client is attempting to request the anonymous id value and fails the registration request with permission denied. LICENSE MIT Change-Id: I82cc6105ad9d08b2f460b0c08cf7de500cea8537 Reviewed-on: http://gerrit.openafs.org/1659 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 114ed05d8d163eed1622750dc024c69a513bc9d8 Author: Jeffrey Altman Date: Wed Mar 24 22:07:29 2010 -0400 Windows: output pt error messages as strings Build and link in ptserver/pterror.c so that aklog can output pt error messages as strings. LICENSE MIT Change-Id: I93d966e0e62bb693612c6310781aadbfa6c09988 Reviewed-on: http://gerrit.openafs.org/1658 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af415156080a979b30375f11482465e6cf7a1d91 Author: Derrick Brashear Date: Wed Mar 24 14:49:11 2010 -0400 growl agent should handle port busy if the port can't be bound, die cleanly. FIXES 126812 Change-Id: I6523f18c2b5f5bacfbd11d08736b9af14fa666e2 Reviewed-on: http://gerrit.openafs.org/1651 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 37eeead346a6933e9d2af2d5da1cb8f9fcf311c1 Author: Derrick Brashear Date: Wed Mar 24 17:18:24 2010 -0400 avoid double-free cell name canonicalization if we free the cell name, so note it so we don't try again. FIXES 126813 Change-Id: I4149fac057c587123f6bf6da8a42a4cd5e590716 Reviewed-on: http://gerrit.openafs.org/1654 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 165bd14126ea4ec2cf6563f865ab9d6bd7477d77 Author: Simon Wilkinson Date: Wed Mar 24 16:48:35 2010 +0000 Linux : Apply more dget_parent() pixie dust Replace another dentry->d_parent->d_inode lookup with a dget_parent() - accessing d_parent directly is potentially racy. Change-Id: I2c21cd6ef5c1b4b601c830836590705b397915e4 Reviewed-on: http://gerrit.openafs.org/1647 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 81e03e005aa73ba6c58e3aadfea91e685df1ece3 Author: Derrick Brashear Date: Wed Mar 24 12:54:30 2010 -0400 afsdump warning killing a couple legit bugs here but mostly i used my parentheses shaker. Change-Id: I645a239ca584fbb5759d885d42c058c757a35731 Reviewed-on: http://gerrit.openafs.org/1648 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6fc97184468348187675f723f79ebb32433d25d2 Author: Derrick Brashear Date: Wed Mar 24 00:19:56 2010 -0400 make 1.5.73 relnotes release notes for 1.5.73 Change-Id: I4fd8d0b40f97311f42ee77f9245bd9e9cb87188f Reviewed-on: http://gerrit.openafs.org/1642 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e4dfa3a48228f7d465c406831ad0d7eaa31bd5e2 Author: Derrick Brashear Date: Mon Mar 22 23:44:52 2010 -0400 openafs 1.5.73 version strings make windows and unix 1.5.73 Change-Id: Ice7fb6bab06ab6b5a1e6d5309f13d242289d2b0a Reviewed-on: http://gerrit.openafs.org/1620 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fc145e7162ef5b2280f25840c8bcb5649bdafa72 Author: Booker Bense Date: Fri Mar 5 10:11:41 2010 -0500 Updating UserGuide with Kerberos v5 authentication This patchset contains updates to the OpenAFS UserGuide that explains how to authentication OpenAFS using kinit/aklog and uses language describing Kerberos outside the context of the kaserver. References to applications such as telnet have been replaced with more modern equivalents such as ssh. Change-Id: Ifae779b04a26beb9be9cf58b450958acdc477c06 Reviewed-on: http://gerrit.openafs.org/1521 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 37f3aabd9f6f41dd722014ace146014b1340c0a1 Author: Asanka Herath Date: Fri Mar 19 22:13:41 2010 -0400 Windows: Use a timestamp for the minidump filename Set the name of the minidump file to : %TMP%\afsd---
-__.dmp This prevents new minidump files from overwriting older ones. Change-Id: I057963bedf618eb23720f17d62c8473790569273 Reviewed-on: http://gerrit.openafs.org/1633 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1146d25df63cbf90b4a31e001227f5bd59acd6ea Author: Asanka Herath Date: Thu Mar 18 21:13:35 2010 -0400 Windows: Monitor requests and gather diagnostics before a timeout This patch monitors SMB requests that are being serviced and automatically enables logging if a request takes longer than one minute to complete. If the requst hasn't completed by the two minute mark, the code generates a minidump. Once a minimump is generated, no more minidumps will be produced for another 5 minutes. SMB monitoring can be enabled/disabled using the new registry parameter 'SMBRequestMonitor.' Change-Id: I5aae22f6bfa635cec4a803089b483698641080eb Reviewed-on: http://gerrit.openafs.org/1632 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ca634f7f8bf63ff62a5aed24c6251d4e7ee774b Author: Derrick Brashear Date: Tue Mar 23 21:49:26 2010 -0400 add missed release notes these are the release notes available via the web but not here. Change-Id: Ieb4af99a4d6a1dfdaabccdac79d03f7d328de675 Reviewed-on: http://gerrit.openafs.org/1641 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 766c7e4cdf10f040304a7141cc126cd4d4a321ed Author: Jeffrey Altman Date: Tue Mar 23 18:01:45 2010 -0400 Windows: changelog for 1.5.73 Change-Id: I83ab533c7ec52b82e76a857f3ac4a12e1d8b1939 Reviewed-on: http://gerrit.openafs.org/1636 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 58990545c12b0ebf746b8c8cd6a21993f5b1e9f0 Author: Jeffrey Altman Date: Tue Mar 23 19:00:27 2010 -0400 Windows: cm_attrs_t requires inclusion of cm_vnodeops.h Include cm_vnodeops.h before reference to cm_attrs_t. LICENSE MIT Change-Id: Ic6d2a505d4f30c75d16d5c99eef306af7563ba4c Reviewed-on: http://gerrit.openafs.org/1639 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 88305c306530bb17cd850f9a2582f83ba8ff7fb3 Author: Jeffrey Altman Date: Tue Mar 23 18:57:19 2010 -0400 Windows LWP and UNIX LWP do not have the same lwp_cpptr structure Windows LWP uses Windows Fibers. There is no 'stack' field. Change-Id: I8ebc7b355642f9e3ad6f2953345b9858ab9c151a Reviewed-on: http://gerrit.openafs.org/1638 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7f1441b9e64bac9931abeffca4b37a9d8d8565eb Author: Marc Dionne Date: Tue Mar 23 18:36:17 2010 -0400 Warning fix: print burstWait fields burstWait is a struct clock with two int fields, but we try to print it as a %u. Print the fields separately like we do for timeout. Change-Id: I42ab3e4557af96cacae00b89841b1fcdfa832d4b Reviewed-on: http://gerrit.openafs.org/1637 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 71b3dd155cc958ae818cc37b96c976a2965e2640 Author: Marc Dionne Date: Tue Mar 23 17:49:22 2010 -0400 Fix #ifdef typo Fix ifdef typo. The compiler complains that the variable is undefined. Not sure what effect this may have had on the intended preprocessor output. Change-Id: Idef3f4ac42a96a096be25d31ff416f7a23560d70 Reviewed-on: http://gerrit.openafs.org/1635 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b835b487377304338ce97e82b8541eb3ab7c511d Author: Marc Dionne Date: Tue Mar 23 17:32:11 2010 -0400 Define __USE_XOPEN conditionally Only define __USE_XOPEN if not already defined. In this part of the code it might now already be defined since we enabled AC_USE_SYSTEM_EXTENSIONS. Change-Id: I0651658d82550ee9be593d281bf50205815f9ef7 Reviewed-on: http://gerrit.openafs.org/1634 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b0a3d581a6cd20f3ac77212685b1645431bcb7ef Author: Asanka Herath Date: Sat Mar 20 16:46:05 2010 -0400 Windows: Make default mode bits configurable Mode bits aren't directly exposed by the Win32 API. We were leaving them to default to 0777 when creating new files and directories. This patch introduces two configuration parameters; 'UnixModeFileDefault' and 'UnixModeDirDefault' which are DWORD registry entries that are used to set the initial mode bits. If the values are set to 0, then the behavior is identical to what we had before. Change-Id: I7822141aab1e12cc8e151be771f779284fa68465 Reviewed-on: http://gerrit.openafs.org/1602 Reviewed-by: Derrick Brashear Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit afa12e265dbf4c7dd83b85b2b6f532992da46e5f Author: Derrick Brashear Date: Tue Mar 23 16:06:38 2010 -0400 remove vnop needs discon lock right now, the discon lock never happens over a remove. fix that. restructure the code to allow one unlock and exit. Change-Id: I88fefa30c9ba8ad4a4ccce1a5b02e9fb8403b99d Reviewed-on: http://gerrit.openafs.org/1629 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 464b99b8ffa4ee8c7a33cd34609ba2f6885f6b01 Author: Claudio Bisegni Date: Mon Mar 22 23:35:22 2010 +0100 Develop Kerberos renew system for ticket - In Preference pane has been added a tab called "Option" where are showned the option for kerberos renew - In AfsBackgrounder has been implemented the NSTimer that will call the krb5 renew action according to user preference value Change-Id: Ica4b705018722488613ac09586e60c69303d1076 Change-Id: I79ce1334d99f926544e865fbb563a1ffecaa969c Reviewed-on: http://gerrit.openafs.org/1606 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6f52f9493a99974b88b7526287c8e291786e52b8 Author: Derrick Brashear Date: Tue Mar 23 16:53:31 2010 -0400 kill MultiBreakVolumeCallBack too this is also now unused. kill it. Change-Id: Ie2f3edef4dc74ee874eb5aedaf2c0d2ee548ae6d Reviewed-on: http://gerrit.openafs.org/1631 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 368e07f7367252d8877e86b3a3df9c559622e90e Author: Andrew Deason Date: Tue Mar 23 14:27:28 2010 -0500 Remove BreakVolumeCallBacks prototype BreakVolumeCallBacks was a dead function that was removed from viced. Remove the prototype for it. Change-Id: I12a4d69719163d3e7be7dcae6f39df17b245c807 Reviewed-on: http://gerrit.openafs.org/1628 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6448d4edc8fc7e8ca581f608e2b98a257bd20251 Author: Andrew Deason Date: Tue Mar 9 14:48:36 2010 -0600 vos: correct syncvldb -verbose server byte order 'vos syncvldb -verbose' outputs the before/after VLDB entries for altered entries, but the 'after' output shows server addresses in NBO. EnumerateEntry expects server IPs to be in NBO, so correct one location where they were passed in HBO. Change-Id: I332fe83b45b2b595e091c8eb9bdc57d89d5e36a8 Reviewed-on: http://gerrit.openafs.org/1550 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 189a99e8944c338ec57168cb88f6c700abbc2370 Author: Russ Allbery Date: Thu Mar 18 13:18:27 2010 -0700 vldb_check man page should say -vheader, not -pheader The option was given correctly in SYNOPSIS but not in the OPTIONS section. Thanks, Rod Widdowson. FIXES 126771 Change-Id: Ibd9694c066b6750ad04273c22e66c84fb7b4a1c6 Reviewed-on: http://gerrit.openafs.org/1589 Reviewed-by: Rod Widdowson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 51362aba7b22a44cb601fb5c7d8800d55cd4f7b6 Author: Derrick Brashear Date: Tue Mar 9 14:13:50 2010 -0500 make tryevalfakestat really not block turns out this VerifyVCache can end up hitting other lockers. move it out of the try path. Change-Id: I073318a44b4da519413905b677fd439f1edd6c54 Reviewed-on: http://gerrit.openafs.org/1547 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4d1bc8e9980660e2952a231e97a0dedd8596e86c Author: Derrick Brashear Date: Mon Feb 15 16:34:43 2010 -0500 viced remove dead BreakVolumeCallBacks function this is no longer used. trash it. Change-Id: I0ad5aa203924c6a16afd68bc8ef55663951917c3 Reviewed-on: http://gerrit.openafs.org/1315 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9af8d46e7794c323a69bed4a84dd73d5a8d05a8c Author: Andrew Deason Date: Wed Mar 10 14:15:58 2010 -0600 vos: Avoid LWP stack overflow error on SIGINT vsproc's method of longjmp'ing out of a signal handler can thoroughly confuse LWP. At the very least, the information on our stack becomes incorrect, since we're no longer using the stack supplied by LWP. At the very least, we seem to (almost) always fail the sanity check checking for stack overflow. To prevent the test from happening, NULL the stack pointer before the longjmp so we can attempt recovery. FIXES 33360 Change-Id: Ie910cb1cc8564ac119c3b751fd8295bf312a3ce7 Reviewed-on: http://gerrit.openafs.org/1559 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bf2d0db680f16394df6f0b9c4ee0c0738862276c Author: Andrew Deason Date: Wed Mar 10 11:58:04 2010 -0600 vos: Use IOMGR_SoftSig for signals When vsprocs tries to longjmp from the signal handler, use IOMGR_SoftSig first, so sleeping processes are woken back up. Without this, IOMGR can bail out since it finds no processes READY when we attempt to do anything with RX. Change-Id: I9089bc4d003786d4a2205cd97f722fbf85fd1aa8 Reviewed-on: http://gerrit.openafs.org/1558 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fe3ff8e91237f35fed33d6d417830e0fe44c6479 Author: Andrew Deason Date: Tue Mar 9 18:07:18 2010 -0600 vos: Mark longjmp-used variables as 'volatile' vsprocs tries to do error recovery by calling longjmp from a signal handler. Although this is quite error-prone since we call a ton of non-async-signal-safe functions, make it a bit more likely to work by marking variables that are used after the longjmp as volatile. This reduces how often (depending on the platform) these values will be completely worthless after a longjmp since they were cached in a register or similar. FIXES 125535 Change-Id: I8566f8cffde6cfdffd99a11d637645494e0a0514 Reviewed-on: http://gerrit.openafs.org/1557 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f2db78a346112f5320efc6f0b6b9fe4ae0d893d3 Author: Russ Allbery Date: Mon Mar 22 15:00:39 2010 -0700 Fix strict aliasing problems or add -fno-strict-aliasing Create a new CFLAGS_NOSTRICT Autoconf substitution variable which is set to -fno-strict-aliasing if we're using gcc to compile. Add @CFLAGS_NOSTRICT@ to the C compiler flags for source files that have significant strict-aliasing issues. Fix minor strict-aliasing issues elsewhere in the tree by using memcpy to copy the data into a properly typed variable. Change-Id: I43afdb5e33e06cb249b7db385a65daf8d2133a19 Reviewed-on: http://gerrit.openafs.org/1617 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 129b6954a6f491c6f3c3e417055bdc68d4726408 Author: Andrew Deason Date: Mon Mar 15 12:41:11 2010 -0500 Use AC_USE_SYSTEM_EXTENSIONS Instead of defining various symbols like _XOPEN_SOURCE, _BSD_SOURCE, and the like, just use autoconf's AC_USE_SYSTEM_EXTENSIONS to define all of the appropriate symbols for us. Deal with some fallout by removing some of the existing defines. Change-Id: I1c1968c89cc2dfda1293fd2566dac8e266325a72 Reviewed-on: http://gerrit.openafs.org/1582 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ac85550c9008baeba5cfdb400afb660fa85b6917 Author: Derrick Brashear Date: Thu Mar 18 20:17:02 2010 -0400 aix mount failure unlock and seterror set an error usefully and drop the vfs lock Change-Id: I9d901b50722c09e1b131077f0b19e2831e6a44c8 Reviewed-on: http://gerrit.openafs.org/1590 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 42a3eaae931e209377f765d736e64a802b5e9731 Author: Derrick Brashear Date: Wed Feb 24 14:16:48 2010 -0500 update link order librx needs libsys on irix to get afs_syscall libsys needs librx for xdr_mumble for rmtsys Change-Id: I2e4d9771807546c14f8b16b8805c222d79aab8c1 Reviewed-on: http://gerrit.openafs.org/1386 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 7293ddf325b149cae60d3abe7199d08f196bd2b9 Author: Simon Wilkinson Date: Thu Feb 18 00:04:22 2010 +0000 XDR: Stop the madness We currently attempt to align our XDR implementation with what may be provided by the host system. This leads to a huge amount of parameter fudging, and general pain and misfortune. However, the only place that we still actually use the system XDR is for UKERNEL builds. Change this so that we use our XDR everywhere. Fix all of our type and function definitions so that they're standard. Remove the warning inhibitions. Change-Id: I53f4539e50eacb4e0691d8d3d6546bbfb7438358 Reviewed-on: http://gerrit.openafs.org/1340 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-by: Simon Wilkinson commit 162cf1c51d167c43da49539c3956f5b94ba3c5e3 Author: Russ Allbery Date: Mon Mar 22 12:56:09 2010 -0700 Use sigset_t and sigfillset instead of memset Rather than using an arbitrary array memset to ones as our signal mask, use the POSIX sigfillset function and eliminate the static variable. Fixes strict aliasing errors with --enable-checking and gcc 4.4.3 on Linux x86. Change-Id: Ic3e0499d03657d94f60808ed12e090dc62cce6fc Reviewed-on: http://gerrit.openafs.org/1616 Tested-by: Russ Allbery Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9dbe48ac2d14742d2acefb9cb4138b810a1a128e Author: Russ Allbery Date: Mon Mar 22 12:42:48 2010 -0700 Move non-executable stack assembly code to end of file The non-executable stack annotation used for Linux works by adding an additional section to the generated object. The annotation added in 9bfd03d723a9cf17673f40513a7adde1d503bcbc was added to the beginning of each assembly file. This caused build failures on Linux s390 because the remainder of the assembly code was then put in that section, which was discarded during linking. Add the annotation to the end of each assembly file instead, following the instructions at: http://www.gentoo.org/proj/en/hardened/gnu-stack.xml Change-Id: I5bd2d8d0ac31932b59757dcec0a942c459d61cac Reviewed-on: http://gerrit.openafs.org/1615 Tested-by: Russ Allbery Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 393820794c45b72a530b30bfd96aac982310eb7e Author: Derrick Brashear Date: Sat Mar 20 10:59:20 2010 -0400 multibreak callbacks add host marking to deal with refcounts, we have to mark hosts in a way other than holds. do so. all other h_Enum callers don't use this feature. FIXES 126497 Change-Id: I0fc008495b93d2c361d476c7fcb6b355c0dab825 Change-Id: I61128261b2e8c64fafbf7425d6a65dd48fd7e177 Reviewed-on: http://gerrit.openafs.org/1599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a724dc31d85b082d7337dd0fa399df72dc5d9afc Author: Derrick Brashear Date: Sun Mar 21 13:49:21 2010 -0400 salvage variable initialization root vnode creation change caused a new warning i missed. fix it now, set rootvnode to NULL Change-Id: I06fe7a60f2fcc48c498249142220f65291188baa Reviewed-on: http://gerrit.openafs.org/1610 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 38fd7259202d098fe7b142438fddc0b5270efa50 Author: Derrick Brashear Date: Sun Mar 21 13:48:48 2010 -0400 aix vfs table entry in rc script add an entry to the aix vfs table so umount works Change-Id: I29a27ca350b948da0283ae09df0acd30eb6384c4 Reviewed-on: http://gerrit.openafs.org/1611 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32ebc44f42aad7dd77d42d07bfd891e8be6f1fff Author: Andrew Deason Date: Wed Feb 3 13:02:23 2010 -0600 Create missing root directory when ORPH_ATTACH When we are salvaging with ORPH_ATTACH, orphans are normally attached to a volume's root directory. If the volume is missing a root directory, however, nothing is attached, and the volume can appear empty or unusable. So, to make it possible to get a useful volume out of a volume that lost (only) its root directory, create a new root dir, and attach orphans to that root. FIXES 94658 Change-Id: I946a60485b5793952707f44ac369ee243e8dc076 Reviewed-on: http://gerrit.openafs.org/1235 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 88a40ffd3b82f3ca1a1b2d57f32859a9d57b922e Author: Derrick Brashear Date: Sat Mar 20 10:40:32 2010 -0400 comment assumptions in lih0_r previously, we checked for (!held && !h_OtherHolds_r(host)) now, we want to confirm only we hold it, so comment that that's how this works Change-Id: I98a65fbb4f2d0532054c71699dc2168e4592668b Reviewed-on: http://gerrit.openafs.org/1598 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c9761464e7d8f1446862a3c94d900c74403b0f07 Author: Derrick Brashear Date: Sun Mar 21 12:49:34 2010 -0400 aix krb5 error message handling handle krb5 error messages for aix in aklog and lam plugin Change-Id: Iac96dc62e7889d375db111d5c96d86cf09715ab6 Reviewed-on: http://gerrit.openafs.org/1609 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a68104340b5d3768e533a7503deb068fdf06d72b Author: Derrick Brashear Date: Sun Mar 21 11:42:15 2010 -0400 panic prototype for aix 6 aix does need a prototype for the lame version of the function Change-Id: I636b734bb725c425b2b4c6e4ae3e9473e087c21d Reviewed-on: http://gerrit.openafs.org/1608 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c4537f0442ac7ecbf8c946de45004992e17d535f Author: Simon Wilkinson Date: Wed Mar 17 11:56:12 2010 +0000 Don't count root session keyrings against quota AFS PAM modules can call setpag() as root, regardless of the UID being authenticated. This leads to the session keyring being created using roots quota - on some systems (RHEL5) this quota is both small, and of a fixed size. Modify our keyring allocation code so that when a keyring is created by root, we don't do any quota checks. Change-Id: I2ee151ec1166a78475047bffd2c1d31f45e8dbdf Reported-by: Rainer Toebbicke Reviewed-on: http://gerrit.openafs.org/1577 Tested-by: Rainer Toebbicke Reviewed-by: Derrick Brashear commit e2134caed1812d523dc7c07a5307fd3ec53485f5 Author: Derrick Brashear Date: Thu Mar 18 15:27:35 2010 -0400 macos fsevents hinting add support for faking it. no exported interface exists, sadly. currently does only authentication events, and is best-effort only, however for people who get tokens after viewing directories in finder, this is a drastic improvement. also adds needed setting to afssettings plist FIXES 23781 Change-Id: I46d5a6cf103c30a2134decccc929e1ef85a26726 Reviewed-on: http://gerrit.openafs.org/451 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 65dcd0a7dabea704973d7f67c1733d2a47559f1b Author: Jeffrey Altman Date: Sat Mar 6 17:32:57 2010 -0500 afsadminutil: translate krb5 error messages on Windows util_AdminErrorCodeTranslate() is used to translate error code messages within the libadmin library set and is used by translate_et. This has in the past not translated krb5 error codes. This patchset conditionally adds support for using krb5_get_error_message() or error_message() on the Windows platform if KFW is installed. This is accomplished by adding new functions to afsutil.lib: initialize_krb5() fetch_krb5_error_message() which are used within util_AdminErrorCodeTranslate() only if AFS_KRB5_ERROR_ENV is defined. Support for Unix is not provided at the present time because doing this "right" will lead to a dependence on kerberos libraries from this library, which we might want to avoid. Change-Id: I7caf7b8e41cfd806f4defc175aa45afb165ec244 Reviewed-on: http://gerrit.openafs.org/1531 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7595adc20b9ae1807cf720c72917eb6d133c765f Author: Andrew Deason Date: Fri Mar 19 09:31:04 2010 -0500 volume_inline.h does not need sys/file.h src/vol/volume_inline.h does not need sys/file.h; at one point, it was using macros from sys/file.h for locking constants, but now we use the lwp/lock.h constants. So, include that instead. Also, only include it for DAFS, since we only use the constants in the DAFS case. Thanks, Jeffrey Altman. Change-Id: I114b438d7fb1fbb3a35bdfa0717ac334c7f80355 Reviewed-on: http://gerrit.openafs.org/1596 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman commit e55f39053a7a26648ad94fae7fa7eaf4e9fb0725 Author: Derrick Brashear Date: Fri Mar 19 01:13:26 2010 -0400 macos uninstall redux the rest of the uninstall changes. git add, sigh Change-Id: I69e4f4a870e08b1796b4546776e373f0a82e0e8e Reviewed-on: http://gerrit.openafs.org/1594 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c39116015ffd53e532656146ab984c4294bdf65 Author: Derrick Brashear Date: Fri Mar 19 00:57:13 2010 -0400 update macos uninstaller make the uninstaller cope with the new receipts format and location FIXES 125634 Change-Id: I6cf0cd3e979a34115f391477657ec37f0c3d8faa Reviewed-on: http://gerrit.openafs.org/1593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 105481d3348a93d33695fb705f9fa5c8af210e7e Author: Dan Hyde Date: Tue Feb 2 10:37:47 2010 -0500 VOL_LOCK needed when traversing DiskPartitionList VLockPartition sets VOL_LOCK, opens (perhaps creating) the lock file for a partition, and flock's it. VUnlockPartition, sets VOL_LOCK, and closes the lock file fd. VLockPartition is called from the salvager. Nothing ever calls VUnlockPartition. VPFullUnlock is called every 30 seconds, does NOT set VOL_LOCK, and happily closes any lock file fd it finds, breaking any lock set with flock. Other routines use the VOL_LOCK when traversing DiskPartitionList. Change-Id: I683547f574b1f760e72014f5d44ce3987f07b5df Reviewed-on: http://gerrit.openafs.org/1213 Reviewed-by: Dan Hyde Tested-by: Dan Hyde Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 028240329c09b6a311cb85736f41d75f7ee7a01f Author: Ben Kaduk Date: Wed Mar 17 01:55:41 2010 -0400 Catch up with FBSD80's removal of thread argument to VFS calls FreeBSD SVN rev 191990 removed the thread argument to filesystem-dependent VFS calls. Curthread is always assumed. There is a __FreeBSD_version bump that we could check if we felt like being precise, but FBSD80_ENV is probably good enough. Change-Id: I4534f01999b61eaeaa014c41473c693e6d432fef Reviewed-on: http://gerrit.openafs.org/1587 Reviewed-by: Derrick Brashear Tested-by: Benjamin Kaduk commit 4bcd24e190ae1a69e7acd60d2e74d5c5a9383e63 Author: Derrick Brashear Date: Mon Mar 15 13:15:34 2010 -0400 aix vnode hold simplification instead of special-casing aix's AFS_FAST_xxx *and* calling VREFCOUNT_INC for AIX, make it all consistent; side effect, remove now-superfluous AIX ifdef'd code Change-Id: Ic6a91429aad26e17fd9e12884ba0eba86564c377 Reviewed-on: http://gerrit.openafs.org/1572 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 46099b6d0b3f3ecec58b679518c9a267f71dfd49 Author: Derrick Brashear Date: Wed Mar 17 14:25:38 2010 -0400 regain glock on storedata error exit if we bomb out with EFBIG, we must regain the GLOCK before returing Change-Id: I3aec92f90abd665d86dcf413dad0e9cbb251a0af Reviewed-on: http://gerrit.openafs.org/1584 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit da68c39de16257b329f470c42c2d4cd8165340f6 Author: Derrick Brashear Date: Wed Mar 17 13:23:30 2010 -0400 kill apsl afssettings and fstab replace both afssettings with something patterned from webdav's (BSD-licensed) mount program with general plist reading code. the lists of valid oid objects of course have to be the same. eject old darwins. add the new one. fstab with something from freebsd umount Change-Id: I28f6765475314b9b78102c762daec19cda4988c3 Reviewed-on: http://gerrit.openafs.org/1583 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b772bd7e3c1305710eb3c18b2fe4108e467bd383 Author: Evan Broder Date: Tue Nov 3 23:50:39 2009 -0500 Increase the maximum number of sysnames Change-Id: I8438ca19649730260370d8b00fb0157e808abe31 Reviewed-on: http://gerrit.openafs.org/778 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3cffaee790feef2b80915e9a247e0d5c3c1948da Author: Andrew Deason Date: Fri Feb 19 17:13:01 2010 -0600 DAFS: Replace partition locks with volume locks In DAFS, replace uses of the VLockPartition_r partition-level locks with the approprivate VLockVolume*NB volume-level locks (and sometimes FSYNC_VerifyCheckout). This allows for greater parallelization of volserver attachment / volume creation, for volume operations to occur during salvages, and for multiple salvages on a single partition to occur simultaneously. More architectural details of volume-level locks can be found in the changes to doc/arch/dafs-overview.txt. Change-Id: I4e8ef4c864002d7e7c976691824c53dfa9cfaf91 Reviewed-on: http://gerrit.openafs.org/1406 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 57984286f3d96cb2dbf0038dbc67d2f3c069e22e Author: Andrew Deason Date: Fri Feb 19 17:02:08 2010 -0600 Add code for locking individual volumes on disk This adds the necessary APIs and associated changes to lock (on disk) an individual volume on a particular partition. Nothing yet calls these new functions. Change-Id: Ibfa00293e7411f3f48eabdecb13b7e80e126a1ff Reviewed-on: http://gerrit.openafs.org/1405 Tested-by: Andrew Deason Reviewed-by: Alistair Ferguson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e42e0912d774cbfc309250052631c6e60c83164d Author: Ben Kaduk Date: Tue Mar 16 17:07:04 2010 -0400 Avoid panic on shutdown with memcache and INVARIANTS When running with memcache, the filesystem cache is not initialized, so the file-local struct vnode *volumeVnode is never set to non-NULL. However, shutdown_cache() unconditionally calls vrele(volumeVnode), which triggers a KASSERT that the argument to vrele() is non-NULL. For certain kernel configurations, this results in a panic. Change this so that vrele() is only conditionally called if the volumeVnode is non-NULL. Change-Id: I80235f0d45ae11f26e9a09854bb34439f89bbb40 Reviewed-on: http://gerrit.openafs.org/1576 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c9a4e11bbac143f7e44af4eb1e6fae1653679e33 Author: Ben Kaduk Date: Thu Mar 11 00:13:12 2010 -0500 Allocate and free backing store for event mutices Actually get memory for the event mutex. With this and a locking tweak, afsd actually starts (with memcache; the UFS cache still has some locking issues). Note that struct mtx is small enough that we may want to just include it inline in afs_event_t and avoid having to do a separate allocation/free step. However, Derrick wants to merge the FBSD and DARWIN versions of this file, so stick with the more compatible version for now. I find that without the memset(), mtx_init() will (sometimes?) complain that the mutex is already initialized. The glock should ensure serialization here, though, so that we only allocate and initialize one mutex per event. Also remove an unnecessary cast while here. Change-Id: Ib304f4301a478a82f0fb8c9ae3bfee98a2a28acd Reviewed-on: http://gerrit.openafs.org/1560 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d9cf88428aa542d1cd304e82f02333eced0194ae Author: Derrick Brashear Date: Mon Mar 15 14:31:49 2010 -0400 rx nat event connection reference hold a conn ref for the nat ping event. don't renew if the connection is being garbage-collected. Change-Id: I45ebf7b8d0362e409094666f186e6b4d58cc906a Reviewed-on: http://gerrit.openafs.org/1573 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit be2c1ea5ef4a7afb315c2220c4de4b73cfb10894 Author: Marc Dionne Date: Mon Mar 15 21:34:28 2010 -0400 growlagent: remove generated Makefile with make distclean Add the growlagent Makefile to the list that gets cleaned with the distclean target. Change-Id: I6c3385f3b839c436efb50d0fc7239c181e027be6 Reviewed-on: http://gerrit.openafs.org/1575 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8ba939e12636d573404d2777505a61608a4f3bd8 Author: Antoine Verheijen Date: Mon Mar 15 13:49:31 2010 -0600 Remove return of value for afs_MarinerLogFetch() afs_MarinerLogFetch(), a void routine, attempts to return a value. While gcc (amongst others) merely issues a warning about this, the Sun Studio C compiler gets cranky (at least on x86) and treats it as a hard error, thereby aborting the build. Since there actually is no value to return, this update simply removes the attempt. Change-Id: Ic89fb05380a25a433f9c3b9fa57962f215348d95 Reviewed-on: http://gerrit.openafs.org/1574 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6bfca9c06c1ddcf2cb238a821463dce91e4f2146 Author: Derrick Brashear Date: Wed Mar 10 02:03:25 2010 -0500 freebsd per-event mutexes use the same system for event mutexes macos does. this time for sure. Change-Id: I18be653607490ba42f40a0b069460ece2f6ab416 Change-Id: I7e0a2f6042ef7f31612072c6625579de42b17f9b Reviewed-on: http://gerrit.openafs.org/1554 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk Reviewed-by: Derrick Brashear commit 19670781ba6d3d9258786319e98003e7afd887df Author: Andrew Deason Date: Tue Feb 9 13:03:06 2010 -0600 vlserver: make rxinfo threadsafe The vlserver has a function 'rxinfo' used for printing out information about an RX call for logging purposes, which used a static string. Change it to use a caller-passed buffer, so it is safe to use in multiple threads. Change-Id: I186010792e743bc9676ddd5b4c99f011b64988e6 Reviewed-on: http://gerrit.openafs.org/1545 Tested-by: Andrew Deason Reviewed-by: Alistair Ferguson Reviewed-by: Dan Hyde Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 81b7f1b010789cc6a345454c677e69bf2e5c8a3b Author: Derrick Brashear Date: Mon Mar 8 15:58:42 2010 -0500 afsdb lookup shouldn't leak memory on realname lookup when looking up the "real" cell name, avoid leaking memory. the strdup is inside a loop and would leak memory for each host returned above one. Change-Id: I36cc9bd27ddc831121f47046daaab11f752012fe Reviewed-on: http://gerrit.openafs.org/1538 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dfa356732fd10073c3b777ccf48f753fcd528c93 Author: Michael Meffie Date: Sun Feb 28 13:02:40 2010 -0500 squash warning in db_verify Fix warning from the prdb_verify -rebuild with supergroups fix, fa2536c02cf26f7db30bf623e95f42be88138d14 Change-Id: I584cba07287660c9e560a2ba931545cbc5b4843f Reviewed-on: http://gerrit.openafs.org/1570 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 808cebbf45101c512480350ce373ac95c08fa57b Author: Jeffrey Altman Date: Sat Mar 13 11:47:51 2010 -0500 Windows: warnings removal for afskfw.c Use StrSafe string manipulation functions in place of most instances of strcpy, strcat, sprintf, etc. With the use of StringCbCopy, StringCbCat, StringCbPrintf, etc. there is no longer a need to manually assign a NUL to the end of a C string buffer as was required with strncpy or strncat. There is one strcpy instance remaining due to the inability to know what the length of the destination buffer. The API needs to be altered to make the destlen available and that is not an appropriate change for this patchset. A deprecated warning is a reminder to revisit this in the future. Several int to unsigned int type changes to avoid signed vs unsigned warnings. Shuffle the order of header files to avoid macro redefinition warnings. LICENSE MIT Change-Id: I4b5d15b60918cc8dc6ab205f1a7d45e17d14de43 Reviewed-on: http://gerrit.openafs.org/1567 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 17f9444be39cb520efa09011f0f18db5b90e87f3 Author: Jeffrey Altman Date: Sat Mar 6 17:30:17 2010 -0500 Windows: afskfw - conditionalize use of krb5_get_error_message for KFW 3.1 and earlier KFW 3.1 is supported by OpenAFS but does not contain krb5_get_error_message or krb5_free_error_message. As a result it must be loaded at run-time and conditionally used. LICENSE MIT Change-Id: I803b4af726605dc49baf2c2d45fae3ecafe2ccf9 Reviewed-on: http://gerrit.openafs.org/1529 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d4340c0da4574d61f25d7ebfba6afb352d1113bf Author: Jeffrey Altman Date: Sat Mar 6 17:32:22 2010 -0500 Windows: netidmgr - conditionalize use of krb5_get_error_message for KFW 3.1 and earlier KFW 3.1 is supported by OpenAFS but does not contain krb5_get_error_message or krb5_free_error_message. As a result it must be loaded at run-time and conditionally used. LICENSE MIT Change-Id: Ic2ad16bb5c2d905e30ec814951b5253e2ef888da Reviewed-on: http://gerrit.openafs.org/1530 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 5026d73c8624e3eb36908ce16cc2bb6509eb4e37 Author: Derrick Brashear Date: Thu Mar 11 12:10:38 2010 -0500 macos dropbox fix for finder sadly this can mean we lie and say delete will work when it will fail, but finder looks for KAUTH_VNODE_DELETE_CHILD along with KAUTH_VNODE_ADD_SUBDIRECTORY and KAUTH_VNODE_ADD_FILE, not as one-offs. Change-Id: I4079b89e188992ee33594cad5bd15f7bf6106203 Reviewed-on: http://gerrit.openafs.org/1561 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f1bfc6674e143a29ca6cc68621c22a6b8dd2cd36 Author: Derrick Brashear Date: Tue Mar 9 16:51:56 2010 -0500 dkms configure correctly push the correct configure options for dkms Change-Id: I18e33c693fa4c32e39cee08844312e67cb280443 Reviewed-on: http://gerrit.openafs.org/1551 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2d7e83dccc4c7c90221ece5bc5f46e0620068b03 Author: Andrew Deason Date: Wed Mar 10 10:16:04 2010 -0600 Squash pthreaded vos warnings Trying to build vos in src/tvolser can produce a warning, at least on amd64_linux26, since we cast to an int of the wrong size in SendFile and ReceiveFile. Use intptr_t like we do everywhere else instead. Change-Id: Ic624bf90ab7338b63f8177b762e1deddbe7fb73d Reviewed-on: http://gerrit.openafs.org/1556 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit d32b40ee7db535d36f4c167c7c3a2ea5855f6bf3 Author: Simon Wilkinson Date: Wed Mar 10 15:40:50 2010 +0000 Don't always use the local cell for db clients Commit d008089a79ef268bbca91d660a840f32cb416865 broke things so that we were always trying to use the local cell, rather than the one specified by the user. Fix this so that the command line cell is used, unles -localauth is specified, which restores the existing behaviour. FIXES 126716 Change-Id: I2ce34e764780d5a22c67474d5ae1076d52b04113 Reviewed-on: http://gerrit.openafs.org/1555 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5383e6a330e45d3a2e6fb1ff0f80e4a50d2763ec Author: Simon Wilkinson Date: Tue Mar 9 22:17:05 2010 +0000 Update RPM CellServDB Update the CellServDB in the RPM packaging to 2010-02-28 Change-Id: I03d062a6c9b53edd6865932df5a93b42cd46e708 Reviewed-on: http://gerrit.openafs.org/1552 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 63fe055ecd13c93a3a6070a15a745ace2e420817 Author: Andrew Deason Date: Fri Mar 5 17:07:47 2010 -0600 udebug: Fix byte ordering of last yes host Udebug gets the last 'yes' host in HBO, but afs_inet_ntoa wants it in NBO. So convert it to NBO. Change-Id: I5524d8086d5ac08875306fee923cb297c971cda8 Reviewed-on: http://gerrit.openafs.org/1549 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 97b69af9255d2aca0f858588cc957c05690e387e Author: Andrew Deason Date: Tue Mar 9 11:43:42 2010 -0600 vldb_check: do not ntohl u_chars vldb_check was ntohl'ing fields like serverNumber when reading in a VL entry. Since this is a u_char, ntohl'ing will just always result in 0, not the actual value. Remove the ntohls so we read in VL data correctly. FIXES 126661 Change-Id: If5117e1750d6dacd9bbe18bc936e0a1ba3d44340 Reviewed-on: http://gerrit.openafs.org/1548 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 861cdf82de9f7fbaa28e87c5f26e97ddc30f3f9a Author: Andrew Deason Date: Fri Feb 19 17:04:29 2010 -0600 Add FSYNC_VerifyCheckout Add the function FSYNC_VerifyCheckout, which can be used to verify that a previous checkout of a volume is still known by the fileserver, and hasn't been forgotten about (by e.g. the fileserver restarting). Change-Id: Ie3ec63d155fe16ca4929b370bbe55850075cec83 Reviewed-on: http://gerrit.openafs.org/1404 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit aa8c114454f0825adcf03bd29377c052a3e4719a Author: Andrew Deason Date: Tue Feb 23 15:43:11 2010 -0600 Add DAFS documentation overview for developers Add some developer documentation for DAFS. This isn't comprehensive or extremely detailed, but is intended to provide a larger-picture overview of some of the pieces of DAFS. More detailed docs are intended to exist in source comments (doxygen and such), and should already be there for the most part. Change-Id: I167b52c3bfb9e6b4b7111b3548ca8b1dafe305ea Reviewed-on: http://gerrit.openafs.org/1376 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 797fe86a8e6f7b6306e9dc2c3de1432e5fcbc0c2 Author: Andrew Deason Date: Fri Feb 19 16:48:30 2010 -0600 Add VLockFileReinit Add a VLockFile function, VLockFileReinit, to close all locks on that particular lock file. Change-Id: Ie1e4af21a486fb0451b6d613117027a522c9bb5a Reviewed-on: http://gerrit.openafs.org/1358 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d7e2f2af801b734c1cb7fd3f84be419ad851348 Author: Andrew Deason Date: Fri Feb 19 16:48:06 2010 -0600 VLockFile: add a couple of asserts Add a couple of asserts to make some mistakes very obvious, such as passing in an invalid 'locktype' or unlocking more times than locking. Change-Id: Ie6e707ea515d5a6527dedc8875f0a4694b7b93c9 Reviewed-on: http://gerrit.openafs.org/1357 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 9aa09f5e634db8a8b2dedf3a749f2a90ef206e2f Author: Andrew Deason Date: Fri Feb 19 15:17:56 2010 -0600 Schedule all salvages via VScheduleSalvage_r Change I03ecf6302436c35fec705cd6c84a40b7cdbf6f97 allowed non-fileserver programs to schedule salvages via FSSYNC, making the FSSYNC call directly in VRequestSalvage_r. This isn't as safe as making the call in VScheduleSalvage_r (as is done when the fileserver schedules a salvage via SALVSYNC), since we may not have relinquished all of our handles and such for the volume by the time the salvager starts. So instead, make this path a bit more like the fileserver, and make non-fileserver programs actually make the FSSYNC call in VScheduleSalvage_r. Consequently, make VScheduleSalvage_r conditionally hit FSSYNC or SALVSYNC. Add a VCheckSalvage to attach2 failures, so non-fileserver salvage requests actually get scheduled. Also, reorganize the attach2 error handling a bit to make this a bit easier. Change-Id: I786a7953e860a132575caad8fe12168f6841442b Reviewed-on: http://gerrit.openafs.org/1356 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b550276579f929512a5fa3cf1d9482df914f67be Author: Andrew Deason Date: Thu Feb 18 14:22:39 2010 -0600 Add FSSYNC debug logging Add logging for what FSSYNC commands are being received by the fileserver, so it is possible to see what's going on with FSSYNC. Log at level 125, since this isn't interesting unless you knows some FSSYNC details, and it can get quite verbose. Change-Id: Ia067d3ba5084a919332989aac437ae4d4082e2e4 Reviewed-on: http://gerrit.openafs.org/1349 Tested-by: Andrew Deason Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit faefa0dc8e40e9e4c81a30a6fe687173b3327725 Author: Andrew Deason Date: Wed Feb 24 09:47:03 2010 -0600 Move *SYNC string translation out of fssync-debug Move the routines for translating ProgramType codes, and SYNC command codes, response codes, etc out of fssync-debug, and into header files anyone can use. These routines are useful especially for SYNC-related debug or error logs. Change-Id: Idc5ffe0dd798a9f18ca733e94d0bb4d740ad0836 Reviewed-on: http://gerrit.openafs.org/1390 Tested-by: Andrew Deason Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e67e4405b713840dc4b4fec2337462948c55aa4f Author: Andrew Deason Date: Thu Feb 18 12:21:45 2010 -0600 Do not rely on vol header for V*VolumeHandles_r VCloseVolumeHandles_r and VReleaseVolumeHandles_r were using V_id to get the id of the volume; just use vp->hashid so we can call these even if we lack a header. Change-Id: I0f0bc0ae82a7b86135aebe194c79a223a6f25094 Reviewed-on: http://gerrit.openafs.org/1348 Tested-by: Andrew Deason Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 804a29034ffcabaf0009b3f41d4acd4f9ba0b056 Author: Derrick Brashear Date: Tue Mar 9 11:02:13 2010 -0500 darwin report kext load address also report unload. in event of panic after module is unloaded (which *shouldn't* happen but i have evidence it might) you can retcon where the module was Change-Id: I07f89d2393605c4b7cac853cbe09b5a4a52ea4cd Reviewed-on: http://gerrit.openafs.org/1544 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2724e9ee8544ad5bf598e6552ab9a42ed615aa88 Author: Ben Kaduk Date: Mon Mar 8 23:38:15 2010 -0500 Export prototypes for osi_fbsd_{alloc,free} for use in rx Include prototypes for osi_fbsd_alloc() and osi_fbsd_free() in osi_machdep.h, since afs_prototypes.h is not included when compiling the rx code. afs_osi_Alloc_NoSleep is #defined to be osi_fbsd_free, and is used in the rx code; if the prototype for the latter is not included, then int is assumed for all parameters and return values, which breaks the calling convention for 64-bit pointers. Change-Id: I3d7575525f159097d1f8ca9ecb22af9f27b63111 Reviewed-on: http://gerrit.openafs.org/1541 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0eb19d67f6848cd0216d079d66487b5c1b2a95fb Author: Ben Kaduk Date: Sat Mar 6 15:37:50 2010 -0500 Use correct types for UFS devices For the FreeBSD 5.3 release, UFS (and everything else) took a "dreaded s/dev_t/struct cdev */" change; we need to keep up with this when comparing mountpoints' devices. Change-Id: I47d3f874be05b16fc2da89dac2bb1b64c573ab8e Reviewed-on: http://gerrit.openafs.org/1540 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b6a3d7c9da9a0bfcd3e24698e083919ef72de768 Author: Ben Kaduk Date: Sat Mar 6 15:20:18 2010 -0500 Use the correct API for msleep() in FBSD's afs_osi_TimedSleep() msleep() does not take a struct timespec*, it takes its timeout value as a multiple of the kernel's HZ parameter (tuneable at startup). Since the afs_osi_TimedSleep interface is documented to take a timeout in milliseconds, we must correct for the (sometimes) different units (currently HZ defaults to 1000). We prefer to multiply the timeout by HZ before dividing by 1000 so as to not lose precision; overflow is assumed to be unlikely. Change-Id: Ic101f3bf54213eebe249cb6c40a6d8cbd3d722f0 Reviewed-on: http://gerrit.openafs.org/1539 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 430c68eb2ada1559c0b775e2e82cbf9c98a25b99 Author: Ben Kaduk Date: Sun Feb 28 17:07:15 2010 -0500 FBSD build finishes for me Declare the fd variable. Also a preprocessor tweak, as e2b65732 seems to have gotten the sense of the AFS_FBSD50_ENV check wrong. Change-Id: I7e498a8276586af5afe0483380d00ef83266c316 Reviewed-on: http://gerrit.openafs.org/1526 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84eee2ed411cab64b136ccea3a6c29f1313e2ecc Author: Derrick Brashear Date: Mon Mar 8 14:06:50 2010 -0500 afsconf srv lookup fill cellname pull out the cellname from the reply Change-Id: I8e0dbb5b82e353ecd29a9cce25eaee1255062cd9 Reviewed-on: http://gerrit.openafs.org/1537 Tested-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 7aca59c2f6c8097fbc0cafab18fe4cdfe28e89c2 Author: Antoine Verheijen Date: Wed Mar 3 11:57:29 2010 -0700 Begin support for OpenBSD 4.7 Add config param header and sysname number for OpenBSD 4.7 (currently in beta). Change-Id: I6537bd352becd9a8c3937e95f79911c8bc08bcfb Reviewed-on: http://gerrit.openafs.org/1533 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a31bbd3123dd7bd5c0f73c1bcd89548d489930a8 Author: Antoine Verheijen Date: Sun Mar 7 14:50:06 2010 -0500 OpenBSD: eliminate use of VREF() macro OpenBSD 4.7 (currently in beta) removes the (dummy) VREF() macro from the system header files. For at least as far back as OpenBSD 3.6, all this macro does is expand to a call to a system routine by the same name in lower case. This patch therefore replaces the single OpenBSD use of VREF() with a direct call to the routine to which it expanded. Change-Id: I44888ed1ba7ba8e7150202798def10bed2ab3158 Reviewed-on: http://gerrit.openafs.org/1532 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2f9df771bbe418b9d1a3797a844c6965d0c1325f Author: Ben Kaduk Date: Sat Mar 6 14:51:17 2010 -0500 Be type correct in osi_ThreadUnique() for FBSD Formerly, in AFS_FBSD50_ENV, we used curproc for the ThreadUnique value; however, curproc (#defined as curthread->td_proc) is a struct proc *, not an actual pid. (As such, it suffers from a 32/64-bit mismatch on 64-bit systems.) Use the correct value, curproc->p_pid, instead. Change-Id: If07ef3b0814c0fee63b62d2f36fa94d6e45573b9 Reviewed-on: http://gerrit.openafs.org/1528 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cb37b133d4f186c6325ea16ad01210fe45145492 Author: Ben Kaduk Date: Sun Feb 28 20:08:52 2010 -0500 FBSD module loads now Actually declare the global afs_global_owner, in afs_osi.c. This allows all symbols to resolve, so that the loader will accept the module. There are still significant issues, though. Change-Id: I705178cfa152f4ceaf59f008f53c1f62fb92826f Reviewed-on: http://gerrit.openafs.org/1527 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit db13984fb2dd2f882be36b7055d89c5e1c992021 Author: Jeffrey Altman Date: Fri Mar 5 09:49:12 2010 -0500 Windows: use krb5_get_error_message instead of error_message krb5_get_error_message() can return more descriptive errors based upon the context in which the error occurred by extracting the cached error message from the krb5_context. Since aklog has a krb5_context, use that instead of error_message(). Use GetProcAddress to load krb5_get_error_message and krb5_free_error_message function pointers because versions of KFW prior to 3.2 do not export them. LICENSE MIT Change-Id: I12043ec1890bcf0f4d9566f35bb1228e579c49fe Reviewed-on: http://gerrit.openafs.org/1520 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d9410aba89c5a257635fa33dbd78db2c0cb32ac8 Author: Simon Wilkinson Date: Sat Mar 6 00:13:06 2010 +0000 Linux: Make keyring destructor remove all tokens The keyring destructor on Linux was only destroying the first unixuser structure found for the PAG being destroyed. In environments where each PAG contains tokens for multiple cells, this led to us leaking unixuser structures, and eventually grinding to a hault due to the length of the resulting hash chains (and some horrific O(n-squared) performance in the PAG statistics code). Add a utility function for the keyring destruction function to call which will mark as deleted all unixuser structures for a particular PAG, and use it. Change-Id: I355465c43cc2cf9d70f613d6f97cd65552260157 Cc: Eric.Hagberg@morganstanley.com Reviewed-on: http://gerrit.openafs.org/1524 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit b7b0b4dea74e829ce0e36edd87a881a6f11df472 Author: Simon Wilkinson Date: Sat Mar 6 11:21:06 2010 +0000 Linux: Fix builds on RHEL4 RHEL4 has a very old 2.6 kernel (2.6.9), which predates the start of the Linux git tree. When I started using page_offset, I mistakenly assumed that everything in the initial commit to that tree was available in all 2.6 versions we care about. That isn't the case, sadly. Secondly, the new readpage code uses zero_user_segments, which has only been available in the mainline kernel since 2.6.25 (RHEL5 appears to have a backport) Implement local wrappers for both of these functions when configure can't find them in the kernel we're building for. These functions have been created independently of the Linux tree. page_offset is a copy of the code we used before we replaced it. zero_user_segments() is a first-principles implementation of the function (which zeros a pair of memory ranges within a single page) FIXES 126678 Change-Id: I622aec4d653567d5234e7a127b981e97468bbe7c Reviewed-on: http://gerrit.openafs.org/1525 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 80481fb14ea9301b0f6b3503d07ecaef39aef0d8 Author: Marc Dionne Date: Fri Mar 5 17:54:42 2010 -0500 Linux: replace invalidate_inode_pages This helper has been deprecated for a while, and gets removed with 2.6.34. Replace it with invalidate_remote_inode, which has been around for all of 2.6's life, according to Chaskiel in RT #124377. Change-Id: I8658b454e1c997c041f654ba55d06f713ea25459 Reviewed-on: http://gerrit.openafs.org/1523 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e4ac68692d7c5db84d9edfaa45c36440e4f98e4d Author: Jeffrey Altman Date: Fri Mar 5 09:47:43 2010 -0500 Windows: use krb5_get_error_message to translate krb5 errors in afskfw library Use krb5_get_error_message to translate krb5 errors to strings in the afskfw library. This provides error translations to afscreds and afslogon.dll. LICENSE MIT Change-Id: Idd4c15b3719be517a79947f6af52a4bdf50b1155 Reviewed-on: http://gerrit.openafs.org/1519 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 99875245107ba25c9a43210d8c123be379d7ce8f Author: Jeffrey Altman Date: Fri Mar 5 09:46:08 2010 -0500 Windows: use krb5_get_error_message in netidmgr_plugin Use krb5_get_error_message to translate krb5 error messages to strings. LICENSE MIT Change-Id: Ia2fd5d655e4b0fa894ce724d4c123d2df433bb32 Reviewed-on: http://gerrit.openafs.org/1518 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 198096887ba88b4ab6acf3bc5ef79399a16f8152 Author: Jeffrey Altman Date: Fri Mar 5 09:43:13 2010 -0500 Windows: Add krb5 error message functions to loadfuncs header Add krb5_get_error_message and krb5_free_error_message to loadfuncs-krb5.h so that they can be used in conjunction with LoadFuncs to obtain function pointers when available. LICENSE MIT Change-Id: Ice7c2f6384c480570fcec4810bd86f4d0c525227 Reviewed-on: http://gerrit.openafs.org/1517 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 03d529681c1e3fb2211250f0a75c52832a0712b9 Author: Jeffrey Altman Date: Thu Mar 4 16:23:36 2010 -0500 Windows: reset local mount point count during freelance re-initialization When a re-initialization is taking place, be sure to reset cm_noLocalMountPoints to 0 in case someone deletes the "Freelance" registry key out from underneath the service. LICENSE MIT Change-Id: I2c3edd0d617d8fb7d670036510ca2a22eece0e6d Reviewed-on: http://gerrit.openafs.org/1514 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit eaccbc942e6f82f4549dc6c4e5d30d27fe4b0c39 Author: Simon Wilkinson Date: Fri Mar 5 15:40:55 2010 +0000 Linux : Don't leak GLOCK when writing CellServDB Don't leak the GLOCK when we're iterating over the CellServDB in response to a read of /proc/fs/openafs/CellServDB Change-Id: I2ed08b9d7f93c7513b49708d009e8acaa478b5f8 Reviewed-on: http://gerrit.openafs.org/1522 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e49f42f2830945be940d28f145eab1db1d92d713 Author: Derrick Brashear Date: Thu Mar 4 16:07:14 2010 -0500 add growl agent for macos a userspace monitoring helper for mac users Change-Id: If81c0b9d2c7606e81f271465491f0a0eb5db62b3 Reviewed-on: http://gerrit.openafs.org/1513 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 08aec0182a888f38fa50ca4e1dbd9ed83e022a2a Author: Derrick Brashear Date: Thu Mar 4 14:16:04 2010 -0500 darwin afshelper fix startup check make the launchd check run as root without whining about passwords repeatedly Change-Id: Ib4bac7c9ddf1837a8e86bf17a8a66b6ba1247272 Reviewed-on: http://gerrit.openafs.org/1511 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ee340811a6f225d1cc81f651530fb9bfc892e916 Author: Derrick Brashear Date: Thu Mar 4 12:23:14 2010 -0500 evalmount copy out volid for sure make sure we really have a volid and avoid dereferencing tvp if there's none Change-Id: Iec6e7cba4d43e2d9c9af296bd6a1574e290bd118 Reviewed-on: http://gerrit.openafs.org/1512 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 92428f6f59c872be1e8b57681a984362ef0d58ed Author: Derrick Brashear Date: Tue Mar 2 23:14:47 2010 -0500 macos shutdown consistent behavior on every other platform, we check for afs unmounted before allowing shutdown. do the same here. Change-Id: Ic8c287be3ae39ad2d2ecb633748813f7f07b16e3 Reviewed-on: http://gerrit.openafs.org/1507 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5faeff77b0c9f551cd6d36daa2cbc12a41d8508d Author: Derrick Brashear Date: Tue Mar 2 06:53:53 2010 -0500 add user warning facility via mariner for macos existing mariner clients treat fetch$ and store$ special and otherwise just blat out a string. use this to our advantage Change-Id: Ib218918abe6038a08af58ea58405b2856ba1da9f Reviewed-on: http://gerrit.openafs.org/1505 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 73ea71b2d37443edd0d86b819e0a43ab3cf26df9 Author: Derrick Brashear Date: Tue Mar 2 06:42:41 2010 -0500 support mariner messages sans vcache if a mariner message is passed in without a vcache, print it as-is Change-Id: I1791102826db3cde484e0809ba79d54f22220be1 Reviewed-on: http://gerrit.openafs.org/1504 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c0056a01d70e7fd14de97d9f37c847f2680a0f7a Author: Derrick Brashear Date: Tue Mar 2 06:36:02 2010 -0500 rewrite marinerlogfetching marinerlogfetching and marinerlog have a lot of code duplication. fix that. Change-Id: I52624ab8d1a6310c92a580990c45cc9313ea7a1c Reviewed-on: http://gerrit.openafs.org/1503 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 958f7a28303175c1b4fcf2605afd0d19918f53fe Author: Derrick Brashear Date: Tue Mar 2 06:28:52 2010 -0500 restore mariner storing message sometime after afs 3.3, the mariner log "storing" message was lost in code restructuring. restore it. Change-Id: I7832718973bf6378e643aea5391a0fd4940b5d3f Reviewed-on: http://gerrit.openafs.org/1502 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 73f0f34bd4b5c4335d721238d8072fb8c3eb8fa7 Author: Derrick Brashear Date: Tue Mar 2 06:14:19 2010 -0500 de-printf the cache manager put most printfs into either afs_warn or comment out entirely move a couple uprintfs to afs_warnuser (and allow them to trigger on macos) Change-Id: If67a09287fcfbe44cc76961dd59d2aad3299e887 Reviewed-on: http://gerrit.openafs.org/1501 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5fae0f0b9afd2396458d3dd9496a90eebd0cc626 Author: Jason Edgecombe Date: Sat Feb 13 11:31:09 2010 -0500 Add a section on how to tune the AFS cache using xstat_cm_test The cache tuning section covers how to use xstat_cm_test to measure the cache miss percentage. LICENSE BSD Change-Id: I895dbbecd7e16d44e18fa65e5e1aa1da5c567a06 Reviewed-on: http://gerrit.openafs.org/1308 Tested-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 62bb20951e125274b29183f95481e7a519efe791 Author: Marc Dionne Date: Fri Feb 26 17:00:58 2010 -0500 Remove duplicate make targets in tubik, cleanup dependencies Eliminate a few duplicate targets in the tubik Makefile, and clean up some dependencies that could cause the same source file to be compiled by different threads simultaneously when building in parallel. At least on my current gcc this would consistently result in a gcc internal error. The duplicate targets generate make warnings. Change-Id: I807debae67c04b00a88ec798b966628e10c5f316 Reviewed-on: http://gerrit.openafs.org/1506 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f73145a3e4478a32d9a12266888b241a6c5a9dee Author: Derrick Brashear Date: Tue Mar 2 05:59:30 2010 -0500 darwin vfsops ansification kill off the old k&r prototypes in osi_vfsops.c Change-Id: Ifd9bb9bd7f303f0f05f0776bb94222c3b138e808 Reviewed-on: http://gerrit.openafs.org/1500 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cfa2f3bac1a6c04c026110c2cf2150750eb49ddc Author: Derrick Brashear Date: Tue Mar 2 05:54:12 2010 -0500 afs_util don't use printf afs_warn and printf are ideally not interchangeable. fix it. Change-Id: Ib1b064549ef723fcac61e5ad89abe53a8ad76a51 Reviewed-on: http://gerrit.openafs.org/1499 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ede82a2eb1c8180a117dbe78b3c42959f0efe0ec Author: Derrick Brashear Date: Sat Feb 27 15:30:06 2010 -0500 BOP_MOVE and userspace move EXDEV helper turns background daemons into afsdb helper-like processes, which can exit and do work. for macos, add BOP_MOVE and implement mv in afsd: (macos EXDEV move is cp+rm, literally) run cp + rm and pass the return back in. if it fails, just give the client the error it had already Change-Id: Ia0d5d49725f6aa28b5c58d0b7c61cc22329a3bc1 Reviewed-on: http://gerrit.openafs.org/1371 Tested-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit b7b51cb22c56cb7304a9d6c9c9b12eaaa470db49 Author: Claudio Bisegni Date: Mon Mar 1 20:41:48 2010 +0100 OSXPreferencePane checkAfsStatusForStartup method modification for search /afs volume for determinate if afs is on has been transfered into checkAfsStatus. checkAfsStatusForStartup method is used to check when afs start axitn system startup. Anyway these are only workaround we must use osx api or afs api to make this job. Change-Id: If9be5a91418eccc0c58a69b566af140d619d3057 Reviewed-on: http://gerrit.openafs.org/1492 Reviewed-by: Claudio Bisegni Tested-by: Claudio Bisegni Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f0ce809181d19e865817200dab4fb8370bceeb59 Author: Derrick Brashear Date: Sat Feb 27 20:09:42 2010 -0500 macos prefs pane more reliable running indicator instead of grepping ps output, look for AFS in df output. not happy with this either but it's way more reliable. Change-Id: I73ff53bc1cc24c9484011a870546b6334ff66b49 Reviewed-on: http://gerrit.openafs.org/1410 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit d2645b0ba07148926aeba319f33db048dce66a07 Author: Ben Kaduk Date: Sun Feb 28 16:42:22 2010 -0500 More help for the FBSD build Remove extra #endif that was introduced in 6c628445. Change-Id: I8c42bfb15aadacc2b7d5a1d07e70b1181fc2f65c Reviewed-on: http://gerrit.openafs.org/1491 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 19eeb297c8eb1df6267cd392e92e4b9afb1827cb Author: Ben Kaduk Date: Sun Feb 28 16:15:05 2010 -0500 Make build progress farther Add a prototype for afs_global_owner in the AFS_FBSD50_ENV case. Change-Id: Ie9104af3e02e08cc46c479ff56f9e09aa3603e74 Reviewed-on: http://gerrit.openafs.org/1490 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 375fdd4f866398a9d931408d0c40e6e782e291e1 Author: Marc Dionne Date: Sun Feb 28 11:08:11 2010 -0500 Don't pass NULL to strcmp A recent gcc update gives me a series of warnings from the NULL argument to strcmp. We should be passing an empty string instead of a NULL pointer. I suspect this was unintentional from a search/replace operation in commit 8229e668. Change-Id: I9677d80d32e5bd54ca1b560788a430c8cf40dae9 Reviewed-on: http://gerrit.openafs.org/1489 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8ade30f3f14cb88151f2f5f47f044831c9ccc0ae Author: Jeffrey Altman Date: Sat Feb 27 21:54:47 2010 -0500 Windows: rx lowlevel nat ping sha1 d24078658d183ea2e72e61c1888e9900bac0ec32 added support for a low-level nat ping using rx version replies. Export rx_SetConnSecondsUntilNatPing from afsrpc.dll. Add NatPingInterval registry value to HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters to permit Nat Ping to be enabled. The default value is 0 seconds. Change-Id: I5122ea81e1a61934eba3c836632039c76f6c45e3 Reviewed-on: http://gerrit.openafs.org/1487 Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 8b898af1b34054d18f8a33b4a9c608614fec15b5 Author: Derrick Brashear Date: Sat Feb 27 23:00:31 2010 -0500 magic mount parser fix parse vnodes from magic mount objects correctly Change-Id: Id46afa7e6b1fa260d56ce54c8bffe2662b7c447d Reviewed-on: http://gerrit.openafs.org/1488 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 42d3d08b2285812ded74856c8e7d8f8253c3cab6 Author: Derrick Brashear Date: Sat Feb 27 17:48:19 2010 -0500 macos prefs pane krb5 auth setup when we configure krb5-at-login, don't inadvertantly reorder the list. replace inline. FIXES 126628 Change-Id: I23de38dadeae6a01d6f97d84e7bb6d9e75e99510 Reviewed-on: http://gerrit.openafs.org/1408 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d459825b233a55d51e2218f2546e28eb12468316 Author: Derrick Brashear Date: Tue Feb 23 19:45:21 2010 -0500 irix syscall arg fix for rx rx uses the afs syscall to get network info in userspace. fix things to pass a useful set of args in Change-Id: I541f90d43ff79ba7a026832403d485b7738a53b8 Reviewed-on: http://gerrit.openafs.org/1379 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Derrick Brashear commit fb79f1265826ae7eee6c70b62e9ef0caf3105958 Author: Derrick Brashear Date: Sat Feb 27 11:52:03 2010 -0500 institute afsdb dns lookup timeout if we can don't be willing to wait more than about an rx timeout period for afsdb retries. Change-Id: Idca642ff7abe6b9233c7501b0f06fd353567bb04 Reviewed-on: http://gerrit.openafs.org/1407 Tested-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit d24078658d183ea2e72e61c1888e9900bac0ec32 Author: Derrick Brashear Date: Wed Feb 24 22:34:28 2010 -0500 rx lowlevel nat ping for rfc 4787, do a minimal impact nat ping. this uses an rx "version request" reply debug packet, which will simply be discarded by the receiver, to keep the port mapping open. Change-Id: Ic2180bfa5c467e33c72e3f19d62488bd6a2dc61a Reviewed-on: http://gerrit.openafs.org/1393 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 23e600ae10db87da1c112b313631fcdbbc89d697 Author: Andrew Deason Date: Thu Feb 18 11:36:10 2010 -0600 Convert ObtainSalvageLock to the VLockFile API Make ObtainSalvageLock use the VLockFile API, to consolidate platform-specific locking code, and to make it possible to acquire a shared lock on the salvage lock file. Create the ObtainSharedSalvageLock function to acquire such a lock. Change-Id: Ieadd77ac8d4030b31c48fff1c98712a6c95f93ad Reviewed-on: http://gerrit.openafs.org/1347 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b6408585b51322600460f0cbdf251a12a2391680 Author: Marc Dionne Date: Fri Feb 26 16:15:37 2010 -0500 Enable parallel build for tubik Allow tubik to benefit from parallel make. Change-Id: If4e7e1a603ef88f03bcc271ec6d742ba3387c61a Reviewed-on: http://gerrit.openafs.org/1402 Reviewed-by: Simon Wilkinson Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 00d56c519be35f690e4cf26eddc8143304d38bdd Author: Derrick Brashear Date: Wed Feb 24 00:57:23 2010 -0500 background daemon genericization previously only "just enough" of the background daemon request object was exposed. expose the rest of the generic pointers Change-Id: Ifcadf53675598bc102208700ff34a768474174ec Reviewed-on: http://gerrit.openafs.org/1384 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5b12214cef06758fee19a6e7afc4e461e7303574 Author: Derrick Brashear Date: Wed Feb 24 00:59:16 2010 -0500 hush another afsd warning we can't prototype call_syscall fully yet, but at least hush some warnings Change-Id: I4e5f77037700f82ebfa87bd4fee4f52a59e3479a Reviewed-on: http://gerrit.openafs.org/1385 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d81e4c1f00735e5a8b0f4217f80e84a96ba91bf Author: Derrick Brashear Date: Thu Feb 25 16:58:31 2010 -0500 darwin vnops code cleanup simplify ifdef structure by moving code around. remove dead code and nonsensical code (darwin80 inside !darwin80) no actual code changes here Change-Id: Ifa7a5afa3bff731d73e7b4a5ee861c2cb48b71a3 Reviewed-on: http://gerrit.openafs.org/1382 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 518b3abb737fd02245c4400491388d15f5cb9e1f Author: Derrick Brashear Date: Wed Feb 24 00:30:28 2010 -0500 darwin afscall syscall should set retval because of how the ioctl based syscall works, passing back a real return value should be done this way, as it is for the other other afs syscall subcalls. matters for userspace handlers. Change-Id: I894b4bd633ce4823b1ce906861251fcbb3949af2 Reviewed-on: http://gerrit.openafs.org/1381 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 93e9964039a1b627f991e796495be49ea0b6fdb1 Author: Derrick Brashear Date: Thu Feb 25 16:52:02 2010 -0500 macos bulkstat cleanup after racing stats if someone else stats it before we finish, make sure we clean up after ourselves properly Change-Id: I4a7257a403cccb02a114c60f5bb340dba6bb16cb Reviewed-on: http://gerrit.openafs.org/1399 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 726e1e13ff93e2cc1ac21964dc8d906869e64406 Author: Rainer Toebbicke Date: Wed Feb 24 12:02:08 2010 +0100 Do not leak information on partial success in RXAFS_InlineBulkStatus Initialize all RXAFS_InlineBulkStatus return parameters in case portions remain unset on FetchStatus failures. Also ensure VolSync info is set even if the first FetchStatus fails. Change-Id: I8c502d25ef1362675fed2871dbd8c3c4e76af55b Reviewed-on: http://gerrit.openafs.org/1396 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 70c975728382557669d6f76b1b465efc54c3e216 Author: Derrick Brashear Date: Wed Feb 24 00:41:48 2010 -0500 correct magic vnode volumename parsing if /afs/.:mount/cell:volume:vnode is passed in, don't pass the :vnode into the volume id lookup Change-Id: If877b467cd37f06dcb090c34560bf76f8e4b0d10 Reviewed-on: http://gerrit.openafs.org/1383 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d1923139e6d0fbe00dcde483810e56abef8bf66b Author: Derrick Brashear Date: Wed Feb 24 00:19:20 2010 -0500 irix kill efs and start pruning pre-65 we haven't built on irix 6.4 in a while. likewise, no efs anymore. just remove the extra code Change-Id: I559f4bca5bf52f9a0344472ccf60b93751282a2b Reviewed-on: http://gerrit.openafs.org/1380 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 14ff060627f5c4b64121f9f7978966bc53486e18 Author: Derrick Brashear Date: Tue Feb 23 23:57:14 2010 -0500 irix cachemgr inode abstraction correction if the XFS function takes a dcache_id_t, pass that and not its child Change-Id: Ic68ae440be0df05320fe0a0b24e2ffa8e4de45b9 Reviewed-on: http://gerrit.openafs.org/1378 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8940eb9dcf79e803449eb437d1f7076ceddba021 Author: Derrick Brashear Date: Wed Feb 24 16:02:26 2010 -0500 freebsd initglock endif fix when initglock hit freebsd it was broken. fix it. make it obvious that such is being done Change-Id: Iac716302061be91a43f168c9a1fe56cdbbb4227d Reviewed-on: http://gerrit.openafs.org/1391 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 142883cae8de203822c8be4f975e691b57be2834 Author: Derrick Brashear Date: Wed Feb 24 11:13:23 2010 -0500 remove dropbox attribute leak fix change 6ec18461649d3e4f44b2476f886bcc480c456500, avoid leaking stat info, appears to have side effects on at least macos, crashing the system coreservicesd. revoke the change until the exact behavior we want is better understood. Change-Id: I2a270750f9cef5ac6ecf1144d86988f030f78efe Reviewed-on: http://gerrit.openafs.org/1388 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7f4a67b8f0e91f013c840fe15b9cd0e0fb672d36 Author: Andrew Deason Date: Thu Feb 18 11:52:33 2010 -0600 Make VLockFile not DAFS-specific The VLockFile API does not require DAFS functionality, so make it available to non-DAFS code, as well. Change-Id: I3d9bebb5d4034f0af739ccee37f64e2254be38cb Reviewed-on: http://gerrit.openafs.org/1346 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c43625d91bc104759666629e5a78dff7f74a14fd Author: Andrew Deason Date: Thu Feb 18 14:41:24 2010 -0600 VLockFile: init fd to INVALID_FD, not zero Zero is a valid file descriptor; initialize lockfile fd to INVALID_FD instead, so we know it's invalid. Change-Id: Iacb549ec4ed821763d20cb0e4f25882b4151bf3a Reviewed-on: http://gerrit.openafs.org/1345 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cbf5f6341c389b0ae85f797ee7c73ba430a8b8f1 Author: Andrew Deason Date: Thu Feb 18 11:42:27 2010 -0600 VLockFile: Do not close fd on lock failure When we fail to acquire a lock in _VLockFd, do not close the fd if we fail to acquire the lock for any reason, since VLockFile does that for us already. There also may be other locks on that file, and we clearly do not want to release them when just one lock fails. VLockFile takes care of the necessary refcounting and fd closing, so don't do it in _VLockFd too. Change-Id: I65f27837dad033e0e84faf4aa0fb71ff26feda83 Reviewed-on: http://gerrit.openafs.org/1344 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c5e5790661cebdf2b45c7218d238bf18af01f99c Author: Derrick Brashear Date: Mon Feb 15 16:12:44 2010 -0500 viced avoid global pruclient during acl ops acl_Internalize and acl_Externalize used the global pruclient use the ones we use elsewhere in viced FetchAcl/StoreAcl also Change-Id: Ia2b8d29035ed48a6aab8c9df243c9082bfacd201 Reviewed-on: http://gerrit.openafs.org/1314 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c7c742afa07d3056b153fbe2529d709804532f03 Author: Chaz Chandler Date: Tue Feb 23 17:20:39 2010 -0500 add limits.h to sysincludes.h on IRIX xdr_mem.c wasn't including limits.h on IRIX when KERNEL was declared, so i INT_MAX was undefined. this adds limits.h to sysincludes.h so it's included for all other places where it might be needed. Change-Id: I718f5bf4dc5d82e2ce74ecc30ab3bf5492b82e29 Reviewed-on: http://gerrit.openafs.org/1377 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 91e50aa81bdeecbdf351088b3b5510fe3c8e848e Author: Anders Kaseorg Date: Sat Feb 20 13:36:22 2010 -0500 Linux: autoconf.h is moving in 2.6.33 In 2.6.33, is moving to . Signed-off-by: Anders Kaseorg Change-Id: Ib97031728b89cf8e17581f3c425216ae4b5538ec Reviewed-on: http://gerrit.openafs.org/1351 Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear commit 660c7a3952f36fc892e12aa6b11eda3295b1416d Author: Anders Kaseorg Date: Sat Feb 20 13:28:59 2010 -0500 Linux: Use kbuild to check for UML is automatically included by kbuild; you aren’t supposed to include it directly. That breaks in 2.6.33 because is moving to . Signed-off-by: Anders Kaseorg Change-Id: I56c90dfe90ef72408620793fcd4e927ea3d8f468 Reviewed-on: http://gerrit.openafs.org/1350 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 99e704c791bbedd9aa3fc1a0feb9493b0eaefd7d Author: Anders Kaseorg Date: Sat Feb 20 20:52:06 2010 -0500 Adjust afs_lockctl to compensate for byte-range lock fixes As of commit 49b7bbdd3b45df694fadbef48f9ed99d9bfe07b9, l_len is no longer 1 less than it should be. Update afs_lockctl to expect this. Signed-off-by: Anders Kaseorg Change-Id: I3fb7665457d489e56564b14933795084a0958d6f Reviewed-on: http://gerrit.openafs.org/1353 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d3abbebcb0651c5d2c7a3094270fd4f86bea3c1e Author: Anders Kaseorg Date: Sat Feb 20 20:28:42 2010 -0500 Linux: Fix conversion of whole-file locks An overflow bug in commit 49b7bbdd3b45df694fadbef48f9ed99d9bfe07b9 caused whole-file locks to be treated as byte-range locks, which fail to be propagated to other machines. Fix this by setting l_len = 0 for locks that range to the end of the file. FIXES 126561 Change-Id: Ie2dc9d04f33559c73b3b86b64152c549b785f8ad Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/1352 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2cd1335257f069d534603c755fa18c4ee2cb4b5e Author: Andrew Deason Date: Wed Jan 27 15:08:34 2010 -0600 Abstract /vicepX header traversal The code for examining all of the headers on a vice partition now exists in two places: the VGC scanner, and the salvager. Create the VWalkVolumeHeaders function that contains the common logic so it's in one place, and take a couple of function callbacks for the differences. Change-Id: I12c71b3344ffbd0b22ddf5418f9ff0509734f42b Reviewed-on: http://gerrit.openafs.org/1264 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit eb7d90fd0db68ea49ec1820adda599b5922c7de2 Author: Andrew Deason Date: Mon Feb 15 16:22:56 2010 -0600 Allow GetSomeSpace_r to select an optimal host Previously GetSomeSpace_r would never find an 'ideal' host for which to clear callbacks, since lih0_r and lih1_r required a non-NULL rock to do anything. Remove the requirement for the passed-in host rock to be non-NULL, and make lih*_r more threadsafe, by passing in a parameter struct for the rock. Also attempt to make the GSS_r code a bit more clear with some descriptive variable names and such. FIXES 126451 Change-Id: Id754f4fa4b830896c5b03fc7ba0906950991a3b7 Reviewed-on: http://gerrit.openafs.org/1317 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 380bd77c328d8d83a007cd97f6564fcb5b990a73 Author: Andrew Deason Date: Tue Feb 16 11:08:38 2010 -0600 h_TossStuff_r: make sure host does not go away When h_TossStuff_r h_NBLock_r's a host, it is not only possible for someone else to grab a hold on the host, but in theory it's also possible for someone to hold a host, release it, and for the host to be deleted again (assuming some callers hold HOSTDELETED hosts, which they should not be doing). To make this safety check a bit more robust, hold the host in h_TossStuff_r before h_NBLock_r'ing, to ensure that it does not go away while we're waiting for H_LOCK. Change-Id: I018a611143d6dccba79cc627803cce74aa830c77 Reviewed-on: http://gerrit.openafs.org/1330 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 1e731a22ae954900af036d1ade014a07418ae4ea Author: Derrick Brashear Date: Mon Feb 22 13:58:58 2010 -0500 analyze warning fix initialize variable. warnings caught this in the other compiler Change-Id: Iae2ae5c1aefe29603bbf5d9952f65b0119f4db9b Reviewed-on: http://gerrit.openafs.org/1363 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1e744d5e56106093924869924fffde3a9093d140 Author: Andrew Deason Date: Mon Feb 22 11:56:07 2010 -0600 Prevent deadlock if fs_stateSave panics fs_stateSave can call ShutDownAndCore(PANIC) if it detects host list corruption. Right now this will deadlock the shutdown thread, since we're still holding a read lock on the FS state when we do so, and ShutDownAndCore will attempt to acquire a write lock. Do two things to make this a bit better: -- Unlock the FS state before calling fs_stateSave, sine we're no longer looking at the FS state (the 'state' in fs_stateSave refers to the host list and callback lists, not the state locked by FS_STATE_*LOCK) -- If ShutDownAndCore detects that it was called inside of ShutDownAndCore, skip shutting down the volume and host packages, since they have already been shut down Change-Id: I24a994ff85a6d866a5800b777c0cf5ab2ba466e4 Reviewed-on: http://gerrit.openafs.org/1362 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b8c3c6add90ea3face9a16ff04a1024be3d8f32d Author: Andrew Deason Date: Fri Feb 12 17:44:31 2010 -0600 Check for HOSTDELETED before h_Hold_r A few places h_Hold_r a host and later drop and reacquire H_LOCK without checking if the hostFlags contains HOSTDELETED. This can cause a race with h_TossStuff_r where we later reference a host that is about to be freed or already has been freed. Add checks for HOSTDELETED in these places, and skip over the deleted hosts. FIXES 126454 Change-Id: I5a61831f5afdbc908b82e4cf63cf14a34a36e275 Reviewed-on: http://gerrit.openafs.org/1305 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4dfbbd34ce66c09593a0b1a88831ec0f36848fe8 Author: Andrew Deason Date: Fri Feb 12 16:30:44 2010 -0600 Correct the h_Enumerate_r hostList safety check Ide1e5aca7c2c4a4af3f62bc07821db694f2f9999 added safety checks for a few traversals through hostList, including the traversal in h_Enumerate_r. Unfortunately, h_Enumerate_r may not hold H_LOCK over its entire traversal (h_Release_r can drop and reacquire it), so the value of hostCount is not guaranteed to stay the same. A host may be deleted during the loop, or right near the end, decreasing hostCount to below our current running 'count' of hosts, triggering the panic unnecessarily. Also, we break out of the loop if the H_ENUMERATE_ISSET_BAIL test succeeds, making the panic also incorrectly trigger then. So instead, remember the value of hostCount, and ensure that we've actually exceeded that count in the post-loop check. Change-Id: I7c13bbf111b592df6860e5852807fa463c3ebd7e Reviewed-on: http://gerrit.openafs.org/1304 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45aceee9842265fb0ccdb5e8f3f6d32c8d2b99ea Author: Andrew Deason Date: Mon Feb 15 10:55:33 2010 -0600 h_TossStuff_r: check held-ness after lock h_TossStuff_r checks if a host is held or locked by another thread before trying to delete the host. Unfortunately, it checks if it is locked before checking if it is held, and the lock check drops H_LOCK. Thus, another thread could hold the host while we don't have H_LOCK, and we could delete a host that is being held. Although it is a bug if any thread holds a host that is being deleted, some instances of this still exist, so make the check more robust. Reverse the order of the tests, so we detect if someone held the host while the lock check dropped H_LOCK. Also log when this happens, as it indicates a bug occurring. FIXES 126454 Change-Id: I8fa972c430e63fc46ca4fadcc3429173ac91a947 Reviewed-on: http://gerrit.openafs.org/1312 Tested-by: Andrew Deason Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 48908e2a932420fe67fe1065d55f7e458b5cd1c2 Author: Derrick Brashear Date: Mon Feb 22 12:15:15 2010 -0500 analyze paranoia don't pass a null pointer to FindVolume in case one shows up Change-Id: I76258d8f8ca18c536e3faa776df3e06005fe2bc2 Reviewed-on: http://gerrit.openafs.org/1360 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 01f42cad663cc860e451f694f973ca46f03289ff Author: Derrick Brashear Date: Sun Feb 21 17:15:26 2010 -0500 idledead client dont interrupt writes allowing failover is nonsensical, there's nothing to fail to. keep trying to write. if we want to change this, we need to handle it better than just this. Change-Id: Ibed4c63182f44ed9e659895e4868b4192d004688 Reviewed-on: http://gerrit.openafs.org/1355 Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fa8601f9c579746d7247bdbe159fbd3affe8e3de Author: Rainer Toebbicke Date: Fri Feb 19 10:26:57 2010 +0100 Init ih_synced for new ihandle One small step towards a valgrind-tolerant universe: ih_synced indicates that an inode should be synced which better be deterministic. Change-Id: Id6a09a07c6f90c59445b82fdceeba3c905cbae7e Reviewed-on: http://gerrit.openafs.org/1343 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae0e8fc066c6046052d82bf4df2800faccdd3fb2 Author: Marc Dionne Date: Thu Feb 18 21:20:20 2010 -0500 Avoid dprintf conflict Rename dprintf to afs_dprintf to avoid potential conflict with system headers on some platforms. Change-Id: I2aef6a55c00ddf8a312531cc1203b3baaca4cd73 Reviewed-on: http://gerrit.openafs.org/1342 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a9951410e1cb1a713f9d26a24d6b3cf485f94ac6 Author: Simon Wilkinson Date: Thu Feb 18 23:09:40 2010 +0000 Linux: bdi doesn't always have a name The 'name' element of the backing_dev_info structure is new in 2.6.32 - add yet another configure test, and #ifdef to protect our setting of it. Change-Id: I0a3e411e571e05771619381bf621d299482c695b Reviewed-on: http://gerrit.openafs.org/1341 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1b4f1648e925dab43cbad53c31d56be355de233a Author: Simon Wilkinson Date: Wed Feb 17 13:46:23 2010 +0000 Unix: Fix objdir builds Make some changes to the Unix build system so that object directory builds work again. In particular, change the way that we call xcodebuild on Darwin, so that source and binary can live in different places. Change-Id: Ib2ab6182deaf7f344603cb5618707d3f212a5b86 Reviewed-on: http://gerrit.openafs.org/1339 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84167a86d407165a7b7007431f6cd0f95e7420d5 Author: Simon Wilkinson Date: Sun Feb 14 00:45:19 2010 +0000 Add xdrmem and xdrlen to shlib builds Another day, another set of forgotten build objects ... Change-Id: I1e449e0c71bd60ca4605cd5d0770f596fc2ac64f Reviewed-on: http://gerrit.openafs.org/1338 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d750c28ac23535524c9406ead4fa479451ff0e12 Author: Andrew Deason Date: Wed Feb 17 12:05:53 2010 -0600 Add support for amd64_obsd46 Change-Id: I41a9ad46cac3af1e02c64683e893c9547598e867 Reviewed-on: http://gerrit.openafs.org/1337 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1e53da39f57777792eb9431a6c553db3e1f6b96c Author: Andrew Deason Date: Wed Feb 17 12:56:51 2010 -0600 Include stdint.h when using intptr_t Some platforms such as OpenBSD require including stdint.h before you can use intptr_t. So, include stdint.h (if it is available) whenever we use intptr_t. Change-Id: I6da005755752e8d52f62e78d15103b19a951e50a Reviewed-on: http://gerrit.openafs.org/1336 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 62016280224d6532f0807e9637b3c38cf025c7fe Author: Derrick Brashear Date: Wed Feb 17 13:26:43 2010 -0500 kill macos prior to panther we haven't had a 10.2 machine to build on in quite a while... might as well pull it, it probably doesn't work anymore Change-Id: Iad809e83dadb0e7fa8c61b3f37f574a571042fc8 Reviewed-on: http://gerrit.openafs.org/1335 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f96ca93b733ef27cd8a58fcc7462ce4a2f4b2f4a Author: Andrew Deason Date: Wed Dec 2 13:37:27 2009 -0600 salvager: avoid needing temp files to stay around The salvager makes use of a couple of temporary files to store some information while doing a salvage. Instead of referring to these files by path name everywhere, pass around file handles instead. That way we can unlink the files immediately, and they will be deleted on close. This removes one of the roadblocks to allowing multiple salvages on the same partition to occur at once (since otherwise other salvagers would remove the temporary files on startup), and also makes it much less likely that old temporary files will be left lying around in the first place. Change-Id: Idfc696c2c75e21db717c720bd950af6e2766b9aa Reviewed-on: http://gerrit.openafs.org/1263 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 60e8dcb4e66c6edc90a0448221b7d1818bd5cafb Author: Andrew Deason Date: Thu Feb 4 16:47:19 2010 -0600 DAFS: Maintain viced volume group hierarchy cache When salvaging a volume (with DAFS or not), it is required to read the volume headers of all volumes on the partition, so we know what volumes are in the same volume group as the salvaged volume. Currently with DAFS, this requirement can make demand-salvages very slow, since each demand-salvage must read each volume header on the partition. So, instead of having each demand-salvage read the volume headers itself, have a demand-salvage request the required volume group hierarchy information from the fileserver. The fileserver will scan the partition's volume headers, and will keep the hierarchy cached in memory. Any modifications to this hierarchy from volume creation/deletion will update this volume group cache (VGC) via FSSYNC commands. This results in a dramatic salvaging speedup when many demand-salvages are requested, and eliminates the cases where DAFS salvaging can be significantly slower than non-DAFS salvaging. FIXES 124488 Change-Id: Ie9ae655593ad8a90ca6ad8f63e6b6e799f283988 Reviewed-on: http://gerrit.openafs.org/880 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ab32b23806b840a67e9423865d594992b41a0602 Author: Andrew Deason Date: Thu Feb 4 16:08:48 2010 -0600 Add a general file-level locking API Add an API for acquiring and releasing file-level locks. This abstracts away the platform-specific aspects of file locking, and also makes the locking work when several threads attempt to acquire a lock within the same process. This commit just adds the functions and datatypes; nothing actually uses them. The users will be added in (hopefully nearby) future commits. Change-Id: I6bffb6a7dd47ffb5c8a9942b16cd5ef6bc7eb62e Reviewed-on: http://gerrit.openafs.org/1237 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8f1e1199a2ef65ac0c5f00dcb30aeb8114c95551 Author: Derrick Brashear Date: Tue Feb 16 13:10:09 2010 -0500 linux bdi allocate memory allocate bdi with osi_Alloc (and free with osi_Free) seems to fix an oops FIXES 126514 Change-Id: I667391710c5fd2b6712117471247f1cd7c20aa9b Reviewed-on: http://gerrit.openafs.org/1332 Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 86acebb1233b82e82fbb5b0d7106ff13864a9111 Author: Simon Wilkinson Date: Sat Feb 13 01:14:07 2010 +0000 aklog: Refactor token management operations Pull the token management operations (get, set and compare tokens) out into their own functions. Again, this is purely a refactoring exercise - no behaviour changes are anticipated as a result of this change. Change-Id: I9c64a319fcaa2edeb492c7822f9bae64c91cc20c Reviewed-on: http://gerrit.openafs.org/1326 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 725f0a63a36545fa9a6dae50362a936fd4b77ab2 Author: Simon Wilkinson Date: Fri Feb 12 23:38:09 2010 +0000 aklog: Refactor token acquisition code This change refactors all of the rxkad specific token acquisition code out of the common auth_cell loop, and into a number of functions of its own. There should be no functional changes. Change-Id: I61314588ba4db6b85db03314d4524322f74c9230 Reviewed-on: http://gerrit.openafs.org/1325 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 267ccb986c850b2a8f4431fa210b6c7f1c09021b Author: Simon Wilkinson Date: Fri Feb 12 11:54:17 2010 +0000 aklog: Use a function to print debug statements aklog was scattered with things like if (dflag) { printf("Oh no, the world is ending\n"); } Simplify these by adding a dprintf() function, which only prints its arguments if dflag is defined. Use this throughout the code. Change-Id: I673942e9ea6a8b96ea9d11a608cfaeaf00098b88 Reviewed-on: http://gerrit.openafs.org/1324 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7cdc89edca112870f5e9dcb27cbb4cd5551ae7a4 Author: Simon Wilkinson Date: Wed Feb 17 14:01:14 2010 +0000 aklog: Actually use new get_realm_from_cred fn An earlier patch added the new get_realm_from_cred function, but failed to update the callsite to use it. Fix that. Change-Id: I9e9d7545b20df041400d140e80c7f018b033043e Reviewed-on: http://gerrit.openafs.org/1334 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f7b5d7153cbac34b9411728c1c53d9c0064f5857 Author: Simon Wilkinson Date: Fri Feb 12 11:13:16 2010 +0000 aklog: Tidy realm handling Assorted small changes to the way realms are handled by aklog: * Remove static buffers when realms are passed between functions * Add cleanup for all dynamically allocated strings to auth_to_cell * Create an extract_realm helper function to handle extracting realm information from principals. * Add a function to handle extracting realm information from decoded tickets Change-Id: I320389033f4862d30774b40103e536fd5bac841b Reviewed-on: http://gerrit.openafs.org/1323 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f8c6bfffd3a32f41d24a171026b985974a5cc7b3 Author: Simon Wilkinson Date: Fri Feb 12 10:29:00 2010 +0000 aklog: Dispose of the pointless confname string confname makes a static copy of the AFSDIR_CLIENT_ETC_DIRPATH string. As pr_Initialize takes it as const, there's no need to maintain our own copy, and so this is superfluous. Remove it. Change-Id: I64b13aae80b15f6b7511a040f39467bca76186b8 Reviewed-on: http://gerrit.openafs.org/1322 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 60ea6a23ab98698351de4b0592dd5df2ac8eebc0 Author: Simon Wilkinson Date: Fri Feb 12 10:19:26 2010 +0000 aklog: Clean up cell handling Clean up the aklog get_cellconfig routine, so that it is no longer reliant upon global variables. * Tidy the handling of local_cell, and use dynamically allocated, rather than fixed length buffers. * Use the cell name contained within the afsconf_cell structure, rather than a local copy * Access linked cell information from afsconf_cell, rather than explicitly returning it * Don't use globals for linkedcell Change-Id: I6ad42c70dcac7f285997be7c95a77dc67bf63679 Reviewed-on: http://gerrit.openafs.org/1321 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 05d667e59bbf5e32efa08d5dd7156db20a56f9d9 Author: Simon Wilkinson Date: Fri Feb 12 09:48:44 2010 +0000 aklog: Cosmetic cleanup Fix indentation so that code lines up correctly, Fix function declarations so they match the house style. Remove some dead code and comments Move comment blocks so they're above the code that they're describing. Remove unused 'lastcell' string Change-Id: Ief924675384e28885e4b7b88c4d5932279c9b26e Reviewed-on: http://gerrit.openafs.org/1320 Reviewed-by: Marc Dionne Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 481098e04c686c351fee02221fbe6d890dc1a767 Author: Simon Wilkinson Date: Sun Feb 7 21:51:55 2010 +0100 Unix CM: Tidy up the statistics interface Sort out the function call statistics interface. Whilst it's still wretched, this makes it a little less so. *) Add some warnings at the start of the afs_CMStats structure about what needs to be done when adding things there *) Remove the conditionals around the CacheBypass counters, so that stats clients don't need to be built with the same options as servers *) Add all of the stats entries added after IBM to the xstat_cm_test routine *) Add a warning to xstat_cm_test if the data returned from the server differs in size to the local stats structure. Change-Id: If1ffb68c84bca972f685ae619febba8c6f8b5e17 Reviewed-on: http://gerrit.openafs.org/1319 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fa2536c02cf26f7db30bf623e95f42be88138d14 Author: Jason Rogers Date: Mon Feb 15 17:19:12 2010 -0600 prdb_verify -rebuild with supergroups fix This change eliminates the redundant iteration over the supergroup[] array in DumpRecreate. By iterating over both this array and entries[], duplicate au lines are created and the count variable becomes incorrect. Furthermore, the au lines created in the supergroups[] section were incorrectly in the form of au instead of au . FIXES 126500 Change-Id: I087772b63934406273f153f4b8a581d965f1e4d5 Reviewed-on: http://gerrit.openafs.org/1316 Reviewed-by: Michael Meffie Tested-by: Michael Meffie Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 4bc04a79e75ffa5ad852dfb475bfcb3b263b4e57 Author: Derrick Brashear Date: Fri Feb 12 16:46:33 2010 -0500 macos bulkstat support add KPI-based bulkstat support for macos Change-Id: I6d9afa968db5930d392a6298dc5094f3cb500a1b Reviewed-on: http://gerrit.openafs.org/1303 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a0c8c3da0d059df7bc0c6fad98ad55e7cc2f9aed Author: Derrick Brashear Date: Mon Feb 15 23:51:52 2010 -0500 xdrmem for ukernel fix up the build for ukernel when warnings are enabled Change-Id: I2520f77e043f2e75297ef66a4c44b6e456d30892 Reviewed-on: http://gerrit.openafs.org/1329 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 000c665881f8941d62d236550727f886298e54e2 Author: Simon Wilkinson Date: Sun Feb 14 00:45:19 2010 +0000 Unix CM: Add xdrmem and xdrlen to kernel builds Add the new xdrmem and xdrlen XDR sources to kernel space. Make some changes to the xdrmem header file to permit it to build in kernel space. Change-Id: I2ab32f67287df28d4ffded651d3d49d1211dd40e Reviewed-on: http://gerrit.openafs.org/1328 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8cf4b945b93bfb7ba09a73fcec32a898efbc3ee2 Author: Simon Wilkinson Date: Sun Feb 14 00:38:47 2010 +0000 Add xdrlen and xdrmem to pthread build Add xdrlen and xdrmem to libafsrpc, so they're available to pthreaded binaries. Change-Id: I55ed54a3fb87865d286bf2019858afb037c967ea Reviewed-on: http://gerrit.openafs.org/1327 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 06f6dc8dc70c0c9cdd875896eadf158b88a429ac Author: Simon Wilkinson Date: Sat Feb 6 14:20:34 2010 +0100 Remove the old new token interface ktc.c has had for a long, long time a 'new' token interface, which was only enabled if KERNEL_KTC_COMPAT is set. However, this is never defined in our tree, relies on a syscall that just won't work on platforms such as Linux, and won't support any of the new token formats we're planning. So, just remove this interface from our code - it's in version control should we want to revisit it in the future. Change-Id: Iab3dd04498799f061449a50bdac39c6407a9fdd7 Reviewed-on: http://gerrit.openafs.org/1318 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 79ad82ccde98391ba59dc1234c10def78520b680 Author: Adam Megacz Date: Sun Feb 14 17:30:42 2010 -0800 Have bosserver catch SIGTERM and shut down gracefully. Many modern process supervision systems (runsv, daemontools, sysvinit) expect to be able to terminate a process gracefully by sending it a SIGTERM; although SIGQUIT is nominally used for this purpose it seems to have fallen into disuse as a matter of practice. Therefore, to integrate as smoothly as possible with the outside world, bosserver should catch SIGTERM and interpret it as a request to shut down gracefully. When used with process supervision (runsv or daemontools), the previous behavior would cause bosserver to die but leave its children running, and then bosserver would get restarted by the supervisor. The result is a situation where there would be two copies of every bnode process. Mayhem ensues. Change-Id: I8690fba0af6c2b9f9613527254af915be9e76dfc Reviewed-on: http://gerrit.openafs.org/1310 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8ea6c727aa60dc60d5bc18a476f673554aaffff5 Author: Jason Edgecombe Date: Sat Feb 13 09:16:22 2010 -0500 Some minor rewording and grammatical tweaks of the CellAlias man page Added some text that the CellAlias file is only used on Unix. LICENSE BSD Change-Id: I913d6a0774240ffc16cf92cfa92c4b2d06f41fd6 Reviewed-on: http://gerrit.openafs.org/1307 Tested-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c892043b9545ce6c87a062546b9cdab48f32186e Author: Derrick Brashear Date: Fri Feb 12 16:37:19 2010 -0500 add bulk newvcache method let NewVCache return a vcache which is already configured for bulkfetching takes the bulkstatus "sequence number" and sets the flags and length Change-Id: Ife67c3deccda2ceefb4a0f1c98a837a3b6401cd2 Reviewed-on: http://gerrit.openafs.org/1302 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9a2741d001d89e7e828b547a05e9d89cd59733b0 Author: Marc Dionne Date: Fri Feb 12 19:23:52 2010 -0500 Initialize variable that can potentially be used uninitialized Some compiler versions complain that "code" might be used uninitialized here. If opening the configuration files fails, conf would be null and the condition would indeed test an uninitialized variable. Change-Id: I1d4da49a5afc94ac6617201110be84a0e5548f38 Reviewed-on: http://gerrit.openafs.org/1306 Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 029b470e673ecc2d4448aa6a46fd10b6d8de4e7e Author: Derrick Brashear Date: Fri Feb 12 16:16:56 2010 -0500 darwin vn hold dead code removal pull out the unused code which tries to cope with a failed vnode hold. if we become able to do so, we can do so later Change-Id: Ib53f469feaba4c6ec6b15730315e87e75f8f9eb8 Reviewed-on: http://gerrit.openafs.org/1301 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e78f6f33b53798e4c742641746d3df9e7435eeff Author: Derrick Brashear Date: Wed Feb 10 15:57:48 2010 -0500 irix stdarg printing use icmn_err facility to print error (and panic for osi_Panic) note that solaris vcmn_err is basically the same, but there may be issues per some commenters. Change-Id: I56e825e16d69a232a2cdc5108071a00858ecf45c Reviewed-on: http://gerrit.openafs.org/1287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 769be238b07897e94e77fa9b7743a53d8f887535 Author: Andrew Deason Date: Thu Feb 4 13:00:47 2010 -0600 Document FSSYNC commands Provide some explanation for the various FSSYNC commands, and what they are there for. Change-Id: I572300b66cc8b6a1b0f2aa185edd198c237f7225 Reviewed-on: http://gerrit.openafs.org/1236 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 344ba58a0785dff50dba8d232895ff7399abb92e Author: Derrick Brashear Date: Fri Feb 12 00:07:02 2010 -0500 irix test kernel cleanup add missing paren for irix test kernel case Change-Id: I1374cac568f5632c3bc29f492a47ea665abb9ef7 Reviewed-on: http://gerrit.openafs.org/1300 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 135c5668f9197aae6d29b1575e76323dd147f521 Author: Jeffrey Altman Date: Thu Feb 11 21:45:40 2010 -0500 Windows: Prevent explorer shell extension from crashing if symbolic link add fails The explorer shell extension was passing the wrong parameters to the MessageBox API when a symbolic link add failed. The end result was stack corruption. FIXES 126406 Change-Id: I59b8b71d947525adccbd817cd5b6d4de5bf082b7 Reviewed-on: http://gerrit.openafs.org/1298 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3b15ac44990095a694e5f9707c5de5619fdf22d1 Author: Derrick Brashear Date: Thu Feb 11 00:30:54 2010 -0500 remove erroneous disabling of darwin rx event scheduling hook the hook added to force reschedule to be noticed was disabled in the course of testing. re-enable it. Change-Id: Id9018b66c9adfc39709b3739510987402dc1fb18 Reviewed-on: http://gerrit.openafs.org/1294 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 23848b4b742e13b8630f8ff25f5ed63094e6d01d Author: Jeffrey Altman Date: Wed Feb 10 23:57:57 2010 -0500 Windows: 1.5.72 Change-Id: Ifef2538d2020e9ecb17bc1ac7176c99f2651a96a Reviewed-on: http://gerrit.openafs.org/1292 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 70052370b7d7d87da9474bc02bfb8f6d330a3824 Author: Derrick Brashear Date: Wed Feb 10 23:41:58 2010 -0500 make unix 1.5.72 update version for next release Change-Id: Idb0eeac9e5883f99ba787a41ab38081fcdabd855 Reviewed-on: http://gerrit.openafs.org/1291 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b5cf121d6bfa5d8539354ca455c2de68534c598f Author: Derrick Brashear Date: Wed Feb 10 22:12:04 2010 -0500 set minimum darwin kernel rx sleep never be willing to sleep less than 500ms. additional tweaks to the rx scheduler may be needed however before we always slept for 500; now we'll sleep longer if no events are pending (but not forever) Change-Id: I7fdb02dd7a383131fffcfae532d71c8fbeb97545 Reviewed-on: http://gerrit.openafs.org/1290 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bcdb5220e2db2bf0cd22c6316682046425048d87 Author: Simon Wilkinson Date: Tue Feb 9 19:53:40 2010 +0000 Linux: Use current_creds() if stashed creds fail If we can't use our stashed credentials (because SELinux hates us, most likely), then fall back to trying the processes current credentials instead of just oopsing. Change-Id: Ib3676ff66f8400e86cccb97fb207a5f094ceb4ad Reviewed-on: http://gerrit.openafs.org/1283 Tested-by: Derrick Brashear Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit 762c8b41edf3bec9dc4dfc7ec972af3a432b2b1a Author: Jeffrey Altman Date: Wed Feb 10 16:45:33 2010 -0500 Remove warnings in src/ptserver/ptclient.c 1. Signed vs unsigned warnings. 2. Casting of struct prentry * to struct prdebugentry * for ubik_PR_DumpEntry call. 3. Casting of char * to struct in_addr *. 4. ANSIfication of PrintHelp() and skip(). 5. Inclusion of ptuser.h to avoid missing prototypes. Change-Id: I7d4c10c5df784c1b9fecc83e21d92bdc0b7ca0ae Reviewed-on: http://gerrit.openafs.org/1288 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 734bb14468cb071e22b45895e7bad21dda70fb2a Author: Derrick Brashear Date: Wed Feb 10 13:52:43 2010 -0500 tweak osi_Panic until all platforms can grok stdarg for now, just move it to the end of the file Change-Id: I7bab901be76fabb75f688096e9637caada883816 Reviewed-on: http://gerrit.openafs.org/1286 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 64c24e84f9a0a96deac62cb3377577eadd582811 Author: Derrick Brashear Date: Tue Feb 9 23:45:23 2010 -0500 remove osi_Panic prototype on irix just don't prototype this on irix Change-Id: If9f6e6ef1eb4fcfcfbc81f7d69af00f72acfd517 Reviewed-on: http://gerrit.openafs.org/1285 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fe246be823772262eb7f89415d5b8fb11798dc42 Author: Derrick Brashear Date: Tue Jan 5 01:50:49 2010 -0500 darwin rxevent sleep instead of polling use an interruptible sleep (and wakeups on shutdown or schedule) instead of polling, on macos Change-Id: I25934efac63ccaf9015f79c6711d09c693f0ad51 Reviewed-on: http://gerrit.openafs.org/1066 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d0f083feb0415f7ab68ecdcd58fde2c9856043e6 Author: Derrick Brashear Date: Tue Feb 9 15:07:09 2010 -0500 reclaim CCore1 vcache state and the one place it was used it seems to have been used wrong anyway it's a relic from osf1 Change-Id: Iae72030dcbb812422431d3d23737f6c8fb5f0ca3 Reviewed-on: http://gerrit.openafs.org/1284 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7b6ccc1b9199d3787ea5457860fcb1c873a19a5c Author: Jeffrey Altman Date: Tue Feb 9 00:42:41 2010 -0500 Windows: Permit Windows to build Recent changes added a new dependency of afspioctl.lib to all server binaries. Export new afsconf_ functions from libafsauthent.dll Fix afsconf_* usage in afsio.c Change-Id: I03e377a3d28b4efbea4a799e6ca63606eab699c9 Reviewed-on: http://gerrit.openafs.org/1273 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a1616e2c93b0922a47958d2c4dc8db41202adca0 Author: Andrew Deason Date: Thu Feb 4 16:26:21 2010 -0600 Consolidate code for reading/writing vol headers The code for reading in and overwriting/replacing volume headers is duplicated many times throughout the volume package. Consolidate the code into the functions VReadVolumeHeader, VWriteVolumeHeader, VCreateVolumeHeader, and VDestroyVolumeHeader. This makes it easy to change the semantics of how headers are read/written, though this commit should not change them. Change-Id: Id395ee25fc2db92de9301b9cdbe18f30830e18d3 Reviewed-on: http://gerrit.openafs.org/1238 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3913aa55eed10f9d6316910ef950f5c3242e20d7 Author: Rainer Toebbicke Date: Mon Feb 8 15:18:04 2010 +0100 afs_TruncateAllSegments() make sure correct afs_size_t comparison is used when selecting dcache entries for truncation Insure that afs_TruncateAllSegments() uses the correct [64-bit] comparison when deciding whether to truncate chunks: alen - AFS_CHUNKTOBASE(tdc->f.chunk) for a file > 2GB would fail to be recognised negative with an "afs_int32 newSize", even with alen = 0 and big tdc->f.chunk. Change-Id: Id77109fb8238234dae725bd876f70ea0fbd403fc Change-Id: If0120e21a52316e536d03241c83e8f0d36614c13 Reviewed-on: http://gerrit.openafs.org/1252 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 880d35f8370ffc978bbcff3b3218f31a945d8555 Author: Derrick Brashear Date: Tue Feb 9 13:54:30 2010 -0500 ensure secObj is initialized in afs_ConnBySA NULL it so we don't compare against garbage Change-Id: Id80ab21a9a227ec8fd09dbc9a822fd1ce873b333 Reviewed-on: http://gerrit.openafs.org/1281 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6c628445ebc3203ddcb8167914d61ef3711380c7 Author: Derrick Brashear Date: Thu Feb 4 03:22:15 2010 -0500 provide afs_osi_TimedSleep this interface works how osi_Wait *should*, except on some platforms Wait appears to wake up all waiters(!) by using a single wait channel in the backend. rather than change that and risk problems, introduce an interface using the same system of events we use for osi_Sleep Change-Id: Ic91726b138bd2512282896ec48c542063ef000cf Reviewed-on: http://gerrit.openafs.org/1233 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 01d8b61c7f7a9b5bb7c38f62ae432986d2ef3bee Author: Derrick Brashear Date: Wed Feb 3 10:16:53 2010 -0500 internationalize comerr reuse the Heimdal method for internationalizing comerr. as a side effect provide heimdal-compatible com_right. LICENSE BSD Change-Id: I6e699125ad3af1d402f14f9462e434c30ad4d1fd Reviewed-on: http://gerrit.openafs.org/1225 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d9af80b0bbc1a43a8da02cadb2d8841fe54bf0de Author: Simon Wilkinson Date: Sat Feb 6 14:04:50 2010 +0100 Unix CM: Make cache bypass build again My recent afs_pioctl changes broke the build when cache bypass is enabled. Fix this. Change-Id: I515ff3c743d8f63c086ead86991ad6cd9faaab93 Reviewed-on: http://gerrit.openafs.org/1280 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6011b3a325b64b2f9527b3e492b77b879ce2ec0b Author: Simon Wilkinson Date: Fri Feb 5 13:49:27 2010 +0100 Unix CM: Just use Bogus for VenusLogging The VenusLogging function no longer exists - instead of having a stub the returns EINVAL, just use the existing Bogus stub (which returns EINVAL) instead. Change-Id: I9cc1746577c19ff2e4087e16e8e2b56c0070c75d Reviewed-on: http://gerrit.openafs.org/1279 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6361d650490ead617e7acd9e798ba65dd872195f Author: Simon Wilkinson Date: Fri Feb 5 12:18:42 2010 +0000 Unix CM: Wrap afs_pioctl.c at 80 columes Much of the documentation in afs_pioctl.c spanned many many lines. Wrap it all at 80 columns for a more pleasant reading experience. Change-Id: Iae15a792a4cd6fa54eda65d43157ca3f7910ca2b Reviewed-on: http://gerrit.openafs.org/1278 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e2b65732c09c4d1097fd54addf6596aaba9043c4 Author: Simon Wilkinson Date: Thu Feb 4 17:27:32 2010 +0000 Refactor afs_ioctl code The ioctl code was a nightmare of #ifdefs. This patch reworks it so that there is a single function for each operating system, which makes it much easier to see what's going on. Eventually it should be possible to move these reworked functions out into the osi directories Change-Id: I61f70b23ad0c7ea137e6aa843be6f75c83c02843 Reviewed-on: http://gerrit.openafs.org/1244 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 92946910e205252c23e435ff8fef2a3f29ea9592 Author: Simon Wilkinson Date: Thu Feb 4 16:08:26 2010 +0000 UKERNEL: End the #define u insanity UKERNEL redefines the character 'u' to do a function call. This hurts other kernel developers in all sorts of interesting ways. Remove the definition, and instead explicitly reference the get_user_struct() function in those places that we need to. Change-Id: I64be2eb527c779df0a3d4508444ed68f3634667d Reviewed-on: http://gerrit.openafs.org/1243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d5622d03196762bd8a60404fea98b4bb044e076d Author: Simon Wilkinson Date: Thu Feb 4 15:09:34 2010 +0000 Add rx security index enum Add a enumerated type for rx security indexes, initially containing the values reserved for null, kad, gk, and k5. Start to use this type, and related names, rather than hard values throughout the code. Change-Id: Ic71e5da28b4270abf7b6688b2c6438f17268f1da Reviewed-on: http://gerrit.openafs.org/1242 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d914ad4c75716b4870e22e8b43629057e35e2eee Author: Andrew Deason Date: Mon Feb 8 15:03:08 2010 -0600 salvager: alias -f to -force DAFS added the -forceDAFS flag, which made the '-f' flag ambiguous, when it used to be short for '-force'. Restore the previous meaning of '-f' to reduce backwards incompatibility. FIXES 124916 Change-Id: Ieb864b35a91000960f9d9c503c28db56602df13e Reviewed-on: http://gerrit.openafs.org/1254 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8459dc317bc6393d23f1afee0b211bcbdb9a5601 Author: Simon Wilkinson Date: Thu Feb 4 12:23:58 2010 +0000 Unix CM: Simplify #ifdef ladder in lock.h Hugely simplify the ifdef ladder in lock.h, by using #elif, rather than multiple levels of nested ifdefs Change-Id: I8fc730242decab0a0f864a9814c6c47c9974b496 Reviewed-on: http://gerrit.openafs.org/1241 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8e1d140d107b46ac0a88c544289b8d29f1542ede Author: Simon Wilkinson Date: Thu Feb 4 12:18:30 2010 +0000 Unix CM: Indent #ifdef ladder in lock.h The ifdef ladder in lock.h was a pain to read. Indent it to make it clearer. Change-Id: I673a85785e1e6207dae55616845d5cb982694189 Reviewed-on: http://gerrit.openafs.org/1240 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 04adcfc78b038303d273f64ba756e9ecda478436 Author: Simon Wilkinson Date: Wed Feb 3 16:00:47 2010 +0000 Unix CM: Reorganise security object code Reorganise the code which creates a client security object for the Unix CM into its own function. Change-Id: Ic92ca4022b000c5cd48bbe6318bf83379626e890 Reviewed-on: http://gerrit.openafs.org/1239 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ad4adb4aa2e458b744474931b0458d2146fb6f3a Author: Simon Wilkinson Date: Tue Feb 9 16:26:57 2010 +0000 Initialise ptuser to NULL Fix fallout from d008089a79ef268bbca91d660a840f32cb416865 - sc wasn't being initialised when it was declared, and some code paths would fail to set it. This led to the == NULL check failing, and a new rx connection being created with an invalid pointer as a security context. Disaster ensued ... Change-Id: Ibae3c72408d1145bc771bd07e573427d9f427679 Reviewed-on: http://gerrit.openafs.org/1277 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6219c84243706ed46b922c2e037cceab2684d645 Author: Antoine Verheijen Date: Mon Feb 8 14:57:51 2010 -0700 OpenBSD: don't use AFS_GLOBAL_SUNLOCK on single processor system Put back the header directives that only turns on AFS_GLOBAL_SUNLOCK when compiling for multiprocessors system. When enabled on a single processor OpenBSD system, it is possible to put the entire system into a lengthy (minutes) lock state when performing multiple AFS activities. The system behaves MUCH better when AFS_GLOBAL_SUNLOCK is not set (no problems encopuntered). This whole locking mechanism needs a bit more examination on OpenBSD before this is useful in single processor mode. Change-Id: I19813b78ad8d705b4f043ccb3a38c83e278972e9 Reviewed-on: http://gerrit.openafs.org/1276 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5f39ae64bafe1e2073ff419fe62c2d5a86fc98f5 Author: Antoine Verheijen Date: Mon Feb 8 15:33:38 2010 -0700 OpenBSD: allow for more graceful shutdown A shutdown or unmount of AFS on OpenBSD will invariably result in a kernel panic. This is because the afs_unmount() routine does not (can not?) force vnode releases if the vnode is still busy. However, it continues on nonetheless and dies a horrible death a little later. This update causes a return from afs_unmount() with EBUSY if all the vnodes weren't released. This results in error messages on shutdown but the overall process continues more reliably and reboots, for example, work. There is likely a better solution to this but at least this is no worse than a system crash and it doesn't require console (or power button) intervention so it should do until I have the chance to explore further. Change-Id: Ia70f83bda748ea3d0b81b341a292e83121446567 Reviewed-on: http://gerrit.openafs.org/1275 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d06bc699f2e3848da8ce9a7fa20ac99db630bd1b Author: Antoine Verheijen Date: Mon Feb 8 15:23:03 2010 -0700 OpenBSD: fix lookup of network interfaces Starting with OpenBSD 4.2, the interface list returned by sysctl using NET_RT_IFLIST contains multiple versions of the data. This really messes up the rx_getAllAddr_internal() routine that returns a list of valid interfaces for the system (to the point where none are returned). This change adds a routine that cleans up the data returned by sysctl so it returns only a single (the most current) version of the data. That stops afsd (among others) from being cranky when it starts up. Change-Id: Ief1df0d2c3eb241c45b439a785ddb67d3afe992c Reviewed-on: http://gerrit.openafs.org/1274 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1d2735c0a85ab0544cf60be9f832cab2d0e434cf Author: Jeffrey Altman Date: Tue Feb 9 00:40:20 2010 -0500 Windows: add xdrlen Adds xdrlen.c to librx.a and libafsrpc.dll Exports xdrlen_create from libafsrp.dll Change-Id: I Change-Id: Ia3754f73f44f2c842b7aefa3104c8143f8a2b78d Reviewed-on: http://gerrit.openafs.org/1272 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 03ac7bd100d93f2f47b5e3724c61e3d93a9eca56 Author: Antoine Verheijen Date: Mon Feb 8 15:07:09 2010 -0700 OpenBSD: move AFS memory type offet The internal malloc memory types for IPv6 (M_IP6OPT, ...) conflict with the type numbers used to designate AFS memory (M_AFSFID, etc.). This change moves the AFS memory type to a new number that does not conflict. This is not a serious issue but can create real confusion when trying to debug or track memory issues, among other things. Change-Id: Icccaa7c06443cab008013414cb3c2ab4ea08889e Reviewed-on: http://gerrit.openafs.org/1271 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4221d7acc8595a052dbc5fbb4366050c00d6ef37 Author: Antoine Verheijen Date: Mon Feb 8 16:01:46 2010 -0700 Fix segmentation fault in vsu_GetVolumeID When determining the volume type of a volume, vsu_GetVolumeID() checks to see if the volume name ends in '.backup' or '.readonly' by backing up the appropriate number of characters from the end of the name. It does not, however, check to see if it skips past the beginning of the volume name. This can result in a segmentation fault (which it has for me on many occasions during a vos release) depending on where memory is allocated or how/if memory is protected. This patch corrects this behaviour by checking the volume name string length prior to doing the string comparison. Change-Id: Ia27fcac76b86ae2707663caa6bff365a4e8dd0da Reviewed-on: http://gerrit.openafs.org/1269 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 267c22e77197ebeed1a4d61041a60cd99dac7dcd Author: Chaz Chandler Date: Mon Feb 8 20:59:10 2010 -0500 irix label changes rx subdir no label support in non-c99 irix cc, xdr_len.c and xdr_mem.c changed accordingly Change-Id: I9f9780254cd7e80649d40b3df6bcdd84a2f90404 modified: src/rx/xdr_len.c modified: src/rx/xdr_mem.c Reviewed-on: http://gerrit.openafs.org/1266 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 87af0e4cb603218417a04e203b5182929f7c5a0e Author: Chaz Chandler Date: Mon Feb 8 21:42:35 2010 -0500 fix AFS_ASSERT_GLOCK on irix and aix irix and aix do not have a vararg version of osi_Panic, fixed AFS_ASSERT_GLOCK macro definition in afs/afs_osi.h for those two platforms Change-Id: I0b541d2c1edad1364ef1c91dec84b9d4319c4e62 modified: src/afs/afs_osi.h Reviewed-on: http://gerrit.openafs.org/1267 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ab17ebef16a04180b2ede8c8ed07cd9c1871ae42 Author: Antoine Verheijen Date: Mon Feb 8 15:45:25 2010 -0700 Add support for OpenBSD 4.6 Add config param header and sysname number for OpenBSD 4.6. As well, add an additional parameter to a call to ifa_ifwithnet() when looking up the MTU for an interface to indicate that the call should use the default routing table. With the advent of OpenBSD 4.6, the system has started to make provisions for multiple routing tables which included a change to the calling sequence for this routine. Change-Id: Idb53efef0e229ca26bd587f2f8cd9df8a0248227 Reviewed-on: http://gerrit.openafs.org/1265 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 80151fdfcacf8c2d673bf79ac9276b30979de976 Author: Steven Jenkins Date: Mon Feb 8 14:38:49 2010 -0600 tubik: Initialize mutexes and cvs Initialize some mutexes and condition variables for pthreaded ubik. FIXES 124977 Change-Id: I95833c5e277183e3c912e1b2fde2b02f88cff0c9 Reviewed-on: http://gerrit.openafs.org/1253 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a5c733d0cfd61cb34ca99446c546629d059fc968 Author: Derrick Brashear Date: Sat Feb 6 22:36:18 2010 -0500 darwin vnodeops cleanup remove dead code, and retabify Change-Id: Ia11ec13773688a0fd7987dc777905364e1354e15 Reviewed-on: http://gerrit.openafs.org/1251 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 80a1130612a68d14e1beda90013bd90d5523aa25 Author: Derrick Brashear Date: Sat Feb 6 19:48:44 2010 -0500 macos package allow backrev in order to go back versions, tell the install not to enforce "no backrev" Change-Id: Ifb4bee86344560d63c9b8ab3cd789f25ed8629b8 Reviewed-on: http://gerrit.openafs.org/1249 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7e14ccf1cd1598a8ae851fcb942578141675e49c Author: Derrick Brashear Date: Fri Feb 5 20:40:22 2010 -0500 fetchstore reorg shift the functions around to avoid forward decl Change-Id: I50a8280674745a5ccf0f01863ce5d0351f62366b Reviewed-on: http://gerrit.openafs.org/1248 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 57d8e4544713170dc31afede27a1d6e2f94f5b95 Author: Derrick Brashear Date: Fri Feb 5 19:54:22 2010 -0500 set storeproc for non-linux forgot to push this with 0683c04a Change-Id: Ifce009ed8b2877befc364b831a185126bf692ede Reviewed-on: http://gerrit.openafs.org/1247 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b80efa48f48ddfafe0ad2bdb9d00b6774de17357 Author: Derrick Brashear Date: Fri Feb 5 15:01:31 2010 -0500 decode-panic deal with kextload kextload won't handle -arch. deal appropriately. Change-Id: Iac7dac9b484e44b9610da028027aadbd94cfe151 Reviewed-on: http://gerrit.openafs.org/1246 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 521b3363aa1aa5530a83be3a7c55302c557e7818 Author: Jeffrey Altman Date: Fri Feb 5 13:45:48 2010 -0500 Windows: Remove use of AFS_AFSDB_ENV from kauth/user_nt.c AFS_AFSDB_ENV was removed from the rest of the source tree. Now remove it from kauth/user_nt.c so that DNS lookups can be performed from the ka_ authentication routines. FIXES 126366 Change-Id: I99cf6ada8b672398c0cfc6c8251cfc8dfdae9a31 Reviewed-on: http://gerrit.openafs.org/1245 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0e8beecff3bffc0aa6f10d342cd4d100412ca29f Author: Derrick Brashear Date: Wed Feb 3 21:46:06 2010 -0500 macos prefs pane spelling fix spelling of link to the usual unix spelling Change-Id: Id8464a22c049200526c6ffe471ea6dc6d4b0ed9a Reviewed-on: http://gerrit.openafs.org/1230 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 604471a3f881a7895cda218a823692a63044dd2e Author: Marc Dionne Date: Wed Feb 3 21:34:24 2010 -0500 Don't clear afs_stats_cmperf too early during shutdown Commit 21cbf7fee0a089d94f62baa7df2422e7bc8293f7 activated some previously unused cleanup code. Part of this clears afs_stats_cmperf, but these stats are used later to check for leaks of chunks allocated with afs_AllocSmallSpace and afs_AllocLargeSpace. The result is a message about unfreed blocks in the syslog with negative counts. Since the structure is already cleared later in the shutdown process, just remove this instance. Change-Id: I6bf2ab37752d2623d072469fb87fa6d06e85b9ec Reviewed-on: http://gerrit.openafs.org/1229 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 682db4d64d550af86dc5a09786e050c6a98ffb0c Author: Derrick Brashear Date: Wed Feb 3 19:01:28 2010 -0500 fakestat should preclude afsdb lookups too macos tries to look up ._foo stuff. correctly identify those (mvstat 2, not 1) and also use tryEvalOnly to preclude AFSDB lookups Change-Id: I490fe98d695c4d230210bc4e4645ea20cd4d8fa2 Reviewed-on: http://gerrit.openafs.org/1228 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8419da9ffec8297759e2e4198eb3963d1d1ed843 Author: Derrick Brashear Date: Wed Feb 3 16:49:23 2010 -0500 macos installer scripts shouldn't echo remove the other echoes from these scripts Change-Id: I46b43aabc0f6080f776e2ec610d748920bc18d3b Reviewed-on: http://gerrit.openafs.org/1227 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9bea0fbf816744330863974d7ccb2d89cc2ccae0 Author: Derrick Brashear Date: Wed Feb 3 16:40:29 2010 -0500 format fallout this was missed somehow in my verification. fix it now. Change-Id: I35b16ed8dcb35b153d7bfb2360673a0f1323f03e Reviewed-on: http://gerrit.openafs.org/1226 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d72846bb0a0650f96362ba190fa8f1fed90ba7d5 Author: Simon Wilkinson Date: Wed Feb 3 00:37:20 2010 +0000 Fix fs storebehind on files with 2 or more servers fs storebehind didn't allocate a large enough buffer for its call to VIOCWHERIS. This meant that when it was called on a file with more than one server (one in a readonly volume), it would error out with E2BIG, rather than a more appropriate message. Fix this, by using the generic 'space' buffer for the VIOCWHERIS call. Change-Id: Ida0d40175f07ad528720ca700db5b5027b975095 Reviewed-on: http://gerrit.openafs.org/1224 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 718f85a8b69a78ac77beb5c8471af20657be2a53 Author: Simon Wilkinson Date: Wed Feb 3 00:31:32 2010 +0000 Fix pioctl input and output handling Pioctl input and output handling was being handled in an adhoc manner, with little or no detection of input and output buffer overflow. Whilst overflow is difficult to provoke on a real system, due to the size of the buffers being allocated for output, the code was difficult to read, and fragile to maintain. This patch adds an XDR like abstraction for marshalling and unmarshalling pioctl data. Whilst the real XDR can't be used and maintain backwards compatibility, this gives a similar elegance. Input and output pointers are replaced with instances of struct afs_pdata, which store both a pointer to the current position in the data stream, and a note of where the stream ends. All access to a data stream is now performed through a set of helper functions, which handle the reading and writing of integers, strings, and arbitrary blocks of bytes. An 'inline' function is provided for those cases where direct access to the stream is required. Change-Id: I6ed2e8e80cebde2abc6a517f4dbef09042b47037 Reviewed-on: http://gerrit.openafs.org/1223 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a1fd212bc6b05d4b6fe74b9c0e5258165cea41d4 Author: Simon Wilkinson Date: Wed Feb 3 00:25:17 2010 +0000 Make twiddle build Update the twiddle utility (for manipulating rx settings in the Unix CM) so that it builds with error checking enabled. Also, add the binary to the gitignore file in that directory. Change-Id: I5c19832579db139e5c558b3488d7c49fdb7c08c4 Reviewed-on: http://gerrit.openafs.org/1222 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e501c45c4ab30bb8409d0dd1e4c7ebabed1e9669 Author: Simon Wilkinson Date: Sat Jan 30 22:28:47 2010 +0000 Add xdr_len, to work out required buffer size Currently, code which uses xdr_mem needs to take a guess at the buffer size required, allocate that guess, and error out if the data being encoded actually exceeds the guess. This adds a new XDR mechanism - xdr_len, which can return (using xdr_getpos) the length of the buffer required to XDR encode a given structure. Change-Id: I6e04c051118a26441caebdbcb2b5768d3c4389b6 Reviewed-on: http://gerrit.openafs.org/1221 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fa033c6beae5a8c912ea440385e1b7d16c1443d3 Author: Simon Wilkinson Date: Sat Jan 30 21:56:57 2010 +0000 Add xdr_mem to the Unix build A number of forthcoming attractions require xdrmem, which is currently not part of the Unix build. Fix it so that it builds without warnings, and add it to the standard RX build. Change-Id: I5a21b2c7cd837c317f16dc35bf12cdac69d10167 Reviewed-on: http://gerrit.openafs.org/1220 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b234aa57f6b3de37bd167d1efad1c8987db7bc2 Author: Simon Wilkinson Date: Sat Nov 7 23:48:14 2009 +0000 Add printf format checks to the rest of tree Add printf format checks to the remaining va-arg printf-style functions in the tree. There are no error fixes required from this change. Change-Id: If774532a3ac5d8b611ec9f47576e933a57907185 Reviewed-on: http://gerrit.openafs.org/796 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a150df6107c07955a3a2fd97ddb94d401649e4e1 Author: Simon Wilkinson Date: Sat Nov 7 23:43:25 2009 +0000 Add printf format checks to rx Add gcc printf format checks to rxi_DebugPrint() and osi_Panic() Deal with the small amount of fallout. Change-Id: Ic356028613087bda02beb9907886421d80a227c3 Reviewed-on: http://gerrit.openafs.org/795 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d008089a79ef268bbca91d660a840f32cb416865 Author: Simon Wilkinson Date: Fri Jan 29 17:52:17 2010 +0000 Add interface to select client security objects Add a pair of interfaces to support the selection of a security object by the client. The idea of these interfaces is to abstract out the job of selecting an interface from the client code itself, and into a common library. This reduces duplicated code, and makes it easier to add new security objects in the future. Change-Id: I2bf411e6b56534070c827d009d36fa8a618c4511 Reviewed-on: http://gerrit.openafs.org/1219 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d302f1e193f631abb1c17253e8e3558f9c4a528c Author: Simon Wilkinson Date: Sat Nov 7 21:19:42 2009 +0000 Add printf format checks to the cache manager Add printf format checking to the afs_warn and afs_warnuser functions and fix the fallout. Change-Id: I81ed776308a31706bf307246c470ee409797f044 Reviewed-on: http://gerrit.openafs.org/792 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8229e668deee3eb00a295a8c9ea96a66b7049687 Author: Simon Wilkinson Date: Sat Nov 7 22:31:08 2009 +0000 Add printf format checks to afs_com_err() Add gcc printf format checks to the afs_com_err() functions Deal with the fallout, in particular change callers which pass an empty format string to pass NULL instead - the com_err functions already permit this alternate use. There's a couple of real bugs here - in one case, we attempt to print a NULL pointer, rather than a security index, and in the other we supply a NULL format string, rather than the string we meant to print. Change-Id: Icd48f92a4447d4af3dba9a4caa2ff73c1657ad47 Reviewed-on: http://gerrit.openafs.org/794 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 68463b6ab9c664303692ac264871723c27bfc524 Author: Simon Wilkinson Date: Sat Nov 7 21:21:00 2009 +0000 Add printf format checks to util's log functions Add gcc printf format checks to all of the logging functions defined in src/util/afsutil.h Deal with the fallout, in particular create cast functions to go from VolumeId and VnodeId to (unsigned int) Change-Id: I28181b73cfeac22cf869d34e75a8335e65125e36 Reviewed-on: http://gerrit.openafs.org/793 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dac001a0a04f54a76f254200ee24ab09f5ad22f7 Author: Simon Wilkinson Date: Fri Jan 29 15:12:42 2010 +0000 Don't pass tokens around the backup system The backup system has a global ktc_token, which is used to work out when its credentials are about to expire. This leads to an unfortunate dependency throughout the code on the format of this token. Replace this with a global time_t which stores the expiry time, and copy the required field from the token into this when we get the token. This limits the exposure of the token, and simplifies the code. Change-Id: Ia2929c2c0a4c1ba9ca5db881865f33af5a732d2f Reviewed-on: http://gerrit.openafs.org/1218 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a82f8591a174f22529f1fa9a1a68c4030abd56c9 Author: Simon Wilkinson Date: Thu Jan 28 23:50:54 2010 +0000 Common interface for server security objects Add an interface for creating arrays of server security objects. This collects all of the various daemon code for initialising security objects into one place, reducing duplication and making it easier to add new objects in the future. Change-Id: I9df20afccdbac4a610cb5bde32f01069272f27a2 Reviewed-on: http://gerrit.openafs.org/1177 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 61af204cf386deaeebf295dda5f9b58ea25fa225 Author: Simon Wilkinson Date: Tue Feb 2 22:13:45 2010 +0000 Document the extra options to fs getcacheparms Write some documentation for the -files and -excessive options to fs getcacheparms Change-Id: I769f8c0cf6d9d100a1687ae73a337132befb2449 Reviewed-on: http://gerrit.openafs.org/1217 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7533adaf34ef76324b971a211bcbf3fba5b40627 Author: Simon Wilkinson Date: Tue Feb 2 15:59:12 2010 +0000 Add a set of strings for the InstallationCheck InstallationCheck needs a strings dictionary to turn its errors into human readable content. Add such a dictionary, and use the correct product name and version for each Mac OS X release. FIXES 126322 Change-Id: I8401a1163ea078e690152215c20db6970969ee04 Reviewed-on: http://gerrit.openafs.org/1208 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 289d06650d0e3c7c0a308a275cf229d671135bf5 Author: Andrew Deason Date: Mon Jan 25 16:56:13 2010 -0600 Squash pthreaded ubik warnings Fix/ignore some warnings with --enable-pthreaded-ubik: - ubik/ubik.c: move rx_stackSize decl to non-pthread code, since it's only used there - budb/db_dump.c: move 'code' decl to non-pthread code, since it's only used there - ubik/recovery.c: move return to outside the ifdef, so we still have a return statement in the pthreaded case - Add -Wno-error to beacon.c in tubik, to match the ubik case Change-Id: I614f2425c36e77bb1a08838b45166d8edb080c73 Reviewed-on: http://gerrit.openafs.org/1211 Tested-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6beb32f0e059d1dbfbf82260a9103665aba88565 Author: Andrew Deason Date: Mon Jan 25 17:05:09 2010 -0600 Use -A and -u in pthreaded ubik rxgen Use -A for rxgen in tvlserver and tptserver to generate ANSI code, so we don't generate warnings. Also use -u in tubik rxgen, so we generate the ubik_* functions that new code uses. Change-Id: Id13168e65e36aeebf48610c28e7b3df2164fc073 Reviewed-on: http://gerrit.openafs.org/1210 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 61afb03fddcb21bfc83b277074784b31bc6739bb Author: Andrew Deason Date: Mon Jan 25 17:08:36 2010 -0600 Build utst_client for pthreaded ubik Build utst_client in src/tubik, as it is in src/ubik. Change-Id: I655445905efbaaa9e578a9e2061091679813a768 Reviewed-on: http://gerrit.openafs.org/1209 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c0724584680562330347026ee9ec72f74066bc51 Author: Simon Wilkinson Date: Tue Feb 2 15:47:02 2010 +0000 Don't echo from the InstallationCheck script Return codes from InstallationCheck are turned into errors by the GUI - don't echo them out to stdout as well. Change-Id: Iee9c1ff4687ea42ab8c18566493a8a92b6d51fed Reviewed-on: http://gerrit.openafs.org/1206 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 642e380ac10f1f249dc75b3656a6b82c3df9ace4 Author: Simon Wilkinson Date: Fri Jan 29 14:17:46 2010 +0000 Remove internal vldbClientInit prototype vldbClientInit is used by other modules in the backup suite, and is already prototyped in bucoord_prototypes.h. So, remove it from the internal header. Change-Id: I2688426189c3aeaacc8db4f815ede466caa5dde0 Reviewed-on: http://gerrit.openafs.org/1205 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 248da50aa56f19bdc8b2b322f5e17b3d2a363dce Author: Derrick Brashear Date: Tue Feb 2 00:36:58 2010 -0500 icl 64 bit platform rationalization be consistent about how we apply 64 bit longness. right now we were doing 3 different things. oops. Change-Id: Ie48816852d5db916e3023ae6e3cd2f6298802668 Reviewed-on: http://gerrit.openafs.org/1200 Tested-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 44147f3c0265ed257fcc8dc459a7fbad224ebc14 Author: Derrick Brashear Date: Tue Feb 2 00:16:54 2010 -0500 icl trace code deduplication right now we have 2 copies of the same code for dealing with traced objects. it's the same code! make a function, and call it 4 times. Change-Id: I1c8b6d7b2cff59108eada1522ba1ec76efeba421 Reviewed-on: http://gerrit.openafs.org/1199 Tested-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 837fb322e57c80aac5e5dee43fc7220727c1049f Author: Simon Wilkinson Date: Fri Jan 29 14:13:47 2010 +0000 Fix USS to use volser prototypes Fix the uss_vol.c file to use the volser prototypes. This clears up the list of the warnings in this file, so drop the warning supression from the Makefile, and remove the entry from README.WARNINGS Change-Id: I9e4ec8bdfa39e3a7adafea454a4c6d96c5fc9d0f Reviewed-on: http://gerrit.openafs.org/1204 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0d17a5a209ae80d880720fcd85b7555853605178 Author: Simon Wilkinson Date: Tue Feb 2 13:14:28 2010 +0000 xdr_proc_t really is different on linux26_i386 i386 Linux uses a register based calling convention within the kernel, but uses the stack for va_args based functions. This means that the hack of prototyping xdrproc_t as a va_args function doesn't work, as you end up with arguments being in the wrong place. Restore the Linux only xdrproc_t prototype that 167e1aa21f5bbea1272b239dc6518a7bdbfc3ee6 removed, add a warning to explain why its there, and modify xdr_free() so that it works without error. Change-Id: I789d387b01fcb892b187fe05f961f01c2c1f55e4 Reviewed-on: http://gerrit.openafs.org/1202 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cad1df43d89d829f36c9aa72e648bab827a2ea53 Author: Simon Wilkinson Date: Mon Feb 1 14:12:05 2010 +0000 Darwin: Stop CM builds when errors occur Make the kernel module build on Mac OS stop when errors are encountered, instead of just ploughing on regardless Change-Id: I489357c04cb7c78663f593af2c2adbc50ebfffff Reviewed-on: http://gerrit.openafs.org/1203 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d3398f48d15fc4e334e4f1acbf6b7156f0ab522 Author: Marc Dionne Date: Mon Feb 1 19:31:05 2010 -0500 Linux: warning fix in osi_file.c Cast printed variable to avoid a warning about a mismatch between %d and long int. Change-Id: I3245cbb5e4780a258e8756b4210c1078f4fbc51c Reviewed-on: http://gerrit.openafs.org/1195 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c75396e23a50a144de6d08d57304c1803722ead2 Author: Simon Wilkinson Date: Tue Feb 2 00:03:04 2010 +0000 Linux: Fix breakage in llseek error handling Commit 7a5cee30cc5f0e6d5780387633ce2b46608fd5fb changed the way that errors from llseek are dealt with. Unfortunately, it is missing some all important bracing, and so we end up going down the error path, even when the llseek succeeds. My fault. Sorry. Change-Id: I03061ba0663b610a8fb73a08d257f6d786795076 Reviewed-on: http://gerrit.openafs.org/1194 Reviewed-by: Marc Dionne Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a97fffc08a02ad8583c7f7b50d41fe07c93520b8 Author: Jeffrey Hutzelman Date: Mon Feb 1 16:59:14 2010 -0500 call afs_osi_suser correctly in PNewUuid we were using the wrong level of indirection on acred. fixed. Change-Id: I00ab1a97b42717adc2d9d26e885b91c44103ab1d Reviewed-on: http://gerrit.openafs.org/1190 Reviewed-by: Jeffrey Hutzelman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 43bcd4db710cec13e14e3e53a3e5ce1f995153d7 Author: Derrick Brashear Date: Mon Feb 1 00:00:39 2010 -0500 make 1.5.71 for unix version updates for unix Change-Id: Ia7901e3969b3afb72b870e7bfaf1be931c2fb0c5 Reviewed-on: http://gerrit.openafs.org/1185 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e1fd1f60d37bdb37e79883045caf17b7ecbd07ba Author: Jeffrey Altman Date: Sun Jan 31 23:27:32 2010 -0500 Windows: ChangeLog and Version Number for 1.5.71 Change-Id: I0969e2b3fcff98489aef1b0e660ef12149a4b96c Reviewed-on: http://gerrit.openafs.org/1184 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0683c04a61ab8946fe715500888a983172298972 Author: Chas Williams Date: Wed Jan 6 16:48:41 2010 +0000 Unix CM: Always use ->storeproc() Always use ->storeproc() and avoid branching "do or do not -- there is no try" Change-Id: Idbcf0c80930d6a433b4c921b44db28cb6fbbf9bb Reviewed-on: http://gerrit.openafs.org/1073 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d52213fcc5dae5095d660e1861f77e90c07bb2ab Author: Derrick Brashear Date: Sat Jan 30 13:54:20 2010 -0500 rx idledeadtime don't track window wait if we're in writer mode and waiting for more window, don't consider it idle. Change-Id: Id1e80f297929eef363ffe88bfe181b74bb331515 Reviewed-on: http://gerrit.openafs.org/1182 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b85929698b496baee34c7d9e0a7ad654a7f5ae33 Author: Simon Wilkinson Date: Fri Jan 29 17:47:12 2010 +0000 Darwin: Don't use ARCHFLAGS to determine arch The Darwin build uses ARCHFLAGS to control the architectures it builds binaries for. However, this causes problems for standalone builds which just do ./configure && make. So, if ARCHFLAGS is undefined, ask gcc which architecture it thinks that it is building for, and use that. Change-Id: If9e7dc3c41ded5ac0593ae20ddd741690914a699 Reviewed-on: http://gerrit.openafs.org/1181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8b395497d5a464c57c65ba73ca757d47e4ff109a Author: Derrick Brashear Date: Fri Jan 29 12:59:59 2010 -0500 macos prefpane fat binary arch selection correction don't choose 64 bit arches for the prefpane if we're not on macos 10.6 sadly, this is the best i can do to conditionalize Change-Id: I31fb2e10fbef5c66a27e0170e8925513a1b63050 Reviewed-on: http://gerrit.openafs.org/1180 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1d57791d4eadd3e0bc5de5b8654e7964b662b3e Author: Derrick Brashear Date: Thu Jan 28 11:35:56 2010 -0500 linux cache file open fail print error if we're going to oops, print a little more info about why. in this case, knowing why dentry_open failed would help Change-Id: I78a3c97d67c7c29110de975465cce0edd6367496 Reviewed-on: http://gerrit.openafs.org/1173 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 167e1aa21f5bbea1272b239dc6518a7bdbfc3ee6 Author: Derrick Brashear Date: Fri Jan 29 00:03:07 2010 -0500 xdrproc_t probably not really different on linux26 for some reason we prototype it differently. makes xdr_free sad. Change-Id: Icd6060acd922314fc400aa2fe360c662ec705fa6 Reviewed-on: http://gerrit.openafs.org/1179 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 008eb3c011d58375180f150b1591a0c0c4d07a24 Author: Chaz Chandler Date: Thu Jan 28 23:59:12 2010 -0500 further irix updates updating for non-c99 and for no vprintf in the irix kernel Change-Id: Id7239dae35ff195007c615319522827d06395f8f Reviewed-on: http://gerrit.openafs.org/1178 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 054e853922b98984ed25b5482fb4f5cd4e5efdf5 Author: Derrick Brashear Date: Thu Jan 28 18:12:44 2010 -0500 afsd missing close brace fallout from the open-by-path-only unification Change-Id: I06f6a7bbb45368b5ab8c336e93ffae11af6b3fac Reviewed-on: http://gerrit.openafs.org/1176 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2ca0c2828d48cd377e9cfc2e325a1ff6011ce18b Author: Derrick Brashear Date: Thu Jan 28 00:35:36 2010 -0500 ignore generated macos packaging description file added ignore for OpenAFS.Description.plist as it is now generated Change-Id: Icbad9f8bbbdd5be6604838366d14f648eec05ee4 Reviewed-on: http://gerrit.openafs.org/1171 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a340dc7981cb75cee66defd4cec5becdb4b7dfea Author: Derrick Brashear Date: Thu Jan 28 14:22:53 2010 -0500 irix cc defaults to pre-c99 no xdr labels for irix Change-Id: I4e1ca001d62a0a3d1f2f6ddef4b6419d1b2b2c13 Reviewed-on: http://gerrit.openafs.org/1174 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fca5ace4da5e685fdf665ff8f6e70bcab76eeaae Author: Derrick Brashear Date: Thu Jan 28 14:25:32 2010 -0500 irix can't have vprintf in the kernel vprintf doesn't exist for irix either. deal Change-Id: I60f78feaf36dbbb086e2ea9e6f7a839c76074647 Reviewed-on: http://gerrit.openafs.org/1175 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9e4477fbfb212bcaaa6c9324ed992dd769502737 Author: Jeffrey Altman Date: Tue Jan 26 10:23:03 2010 -0500 Windows: drop cm_Freelance_Lock before call to cm_FreelanceAddMount The cm_Freelance_Lock must not be held before calling cm_FreelanceAddMount(). cm_InitLocalMountPoints() was violating this requirement. It is safe to drop the lock because the only time the lock would be dropped is if the "Freelance" registry key does not exist. This should only be true during the initial startup of the application the first time afsd_service.exe executes on the machine. At this point in time there is only one thread that is executing that could be initializing the Freelance mount point list. LICENSE MIT Change-Id: Ib49cf8bc830836c8e08446073e64ccf30086d354 Reviewed-on: http://gerrit.openafs.org/1164 Reviewed-by: Asanka Herath Tested-by: Asanka Herath Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3a986e9b8aeacf1a23f6f06e301999d4a2dd2cb5 Author: Jeffrey Altman Date: Wed Jan 27 14:09:19 2010 -0500 Windows: export xdr_serverList and xdr_Capabilities from afsrpc.dll Required by new xdr_free() usage. Change-Id: I585947f110204c9043f92fc573d5d7263a46fd64 Reviewed-on: http://gerrit.openafs.org/1170 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a3812f211a56c0d6e0a7ff8a97f157707d3d8c28 Author: Marc Dionne Date: Tue Jan 26 19:48:24 2010 -0500 Linux: don't count pag keys against root's keyring quotas Keys associated with PAGs are created with root ownership for security reasons, which means that they count agains root's keyring quotas. The default configuration used by most distros restricts root to the same quotas as a regular user, so a single user can potentially fill up the quota and prevent new pags from getting created system-wide. This can also be an issue for busy multi-user systems where the default maximum number of keys (200 currently) can easily be reached. Change-Id: I37e3f3d881facff9b14f2057b404d4b441e72305 Change-Id: Id1ef2d5a7109d8ee7c08aa81dfd98ecf951c8ba8 Reviewed-on: http://gerrit.openafs.org/1167 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c51e2661835b4499f1125eb2d677a06260159dbc Author: Derrick Brashear Date: Wed Jan 27 12:58:49 2010 -0500 init pthread mutexes only if an initializer exists and windows has none Change-Id: Iaff3047abde197791e3fbb42c12066f896e540d1 Reviewed-on: http://gerrit.openafs.org/1169 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 900dc5b31baea50370fba93b1f96002ad6652c8d Author: Derrick Brashear Date: Wed Jan 20 11:38:43 2010 -0500 switch to always attempting cache-config-by-path solve the "are we built for linux fh or inode" problem: just always use path. Change-Id: I076ee495b29e4a2dc964ce04001f86e100528fb6 Reviewed-on: http://gerrit.openafs.org/1133 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f02f2e80267fb45c22ab199dee0e0c15425674b6 Author: Simon Wilkinson Date: Wed Jan 27 02:30:09 2010 +0000 XDR memory management fixes Change the xdr_free function so that it matches in signature and behaviour the xdr_free that is available in other xdr packages, and update all callers. Don't use xdr_alloc where the data we're allocating isn't freed by xdr. The only place where xdr_alloc is required is in server stubs when filling OUT parameters. Change-Id: Ice231f163726afc374cb25a89302e3d82fa1e093 Reviewed-on: http://gerrit.openafs.org/1168 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0559a23d38f98280e2eb1c1e2fc91ae7a1798537 Author: Derrick Brashear Date: Tue Jan 26 13:32:03 2010 -0500 initialize pthread mutexes to avoid compiler common variable stupidity instead of worrying about ranlib versus ranlib -c, -fno-common, etc, just initialize the variables if an initializer exists Change-Id: I6ed28df4d2134f84359a1bc55706e75d54e6e083 Reviewed-on: http://gerrit.openafs.org/1166 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f3da1f9e1af4daa5b6f3ec46bad3db5226377fc4 Author: Derrick Brashear Date: Mon Jan 25 16:49:53 2010 -0500 rx ResetCall should wait if it says it will We set TQ_WAIT... and then don't bother to wait. uh. Change-Id: Ia7d3e52c8880db53fcf26b7d79ad349720018701 Reviewed-on: http://gerrit.openafs.org/1160 Tested-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit f0b1d7ccbbc4056338dde92c8b131ad2070351ad Author: Derrick Brashear Date: Mon Jan 25 16:02:23 2010 -0500 rx avoid discarding packets while tq is busy we don't check here that no one else is working the tq *after* getting the lock. do so. Change-Id: I91d1ac020334b038a6a045734911335299613875 Reviewed-on: http://gerrit.openafs.org/1159 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 14e050033f40272a919bb54e981d8165d927240a Author: Derrick Brashear Date: Tue Jan 26 12:27:11 2010 -0500 viced detailed stats should record stored bytes correctly if we get an error reading data, don't subtract it from the length stored statistic Change-Id: I2fec260a9f677c0747ff2c6f975745ccb1e58447 Reviewed-on: http://gerrit.openafs.org/1165 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 73392259ec523fd9648e2c589d491050066d84d7 Author: Derrick Brashear Date: Mon Jan 25 12:36:25 2010 -0500 darwin80 if changes cleanup fix the indirection here to be correct. ifnet_list_get needs a pointer to a pointer for the ifnet structure Change-Id: I81bd7c383c63cc1e312fcfd482d7162d50f6f1d3 Reviewed-on: http://gerrit.openafs.org/1158 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b7669d937ca7a34b69163963be8cbfa6db31094 Author: Derrick Brashear Date: Mon Jan 25 10:44:54 2010 -0500 darwin rx if structure fix link kernel to correct ifaddr symbol for withnet Change-Id: I384974bef73b9cc44eba7ddba43f28f65c03f39b Reviewed-on: http://gerrit.openafs.org/1157 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e58f77fe56b69e82ab82698b93ee011d272676cf Author: Derrick Brashear Date: Sun Jan 24 11:25:00 2010 -0500 pagsh dependencies don't get to include system libs we'll never be able to "build" -lresolv revert this part Change-Id: I2b1caa5bffc3d826412967fb70d9eadf8223f1f8 Reviewed-on: http://gerrit.openafs.org/1154 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7a5cee30cc5f0e6d5780387633ce2b46608fd5fb Author: Simon Wilkinson Date: Mon Jan 25 00:02:11 2010 +0000 Linux: Handle llseek failure If llseek fails, then we return immediately, potentially leaving the wrong address space configured for this process, and without resetting the processes saved limits. Fix this by creating a common exit point for osi_rdwr, and using it. Change-Id: Ifff8cb0155f92a4130d21828d5ee2d2a55c09195 Reviewed-on: http://gerrit.openafs.org/1155 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a16e6f396464bd860d08b9fec1f37f96ea8ac30a Author: Derrick Brashear Date: Sun Jan 24 10:09:41 2010 -0500 unix 1.5.70 make 1.5.70 for unix Change-Id: I84ed384e9cd38e49a2c002a4ffe19a6ff5ba633d Reviewed-on: http://gerrit.openafs.org/1153 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aacc766252aacadf8f6e3ab234ba77bfeb61714e Author: Jeffrey Altman Date: Fri Jan 22 14:24:17 2010 -0500 Windows: 1.5.70 ChangeLog updates Version number updates Change-Id: I16fd2d2ef507cc862417eef8d221ea5ba58567a1 Reviewed-on: http://gerrit.openafs.org/1146 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0caf14224a9153bb488be9e52d67892a2c441a5a Author: Marc Dionne Date: Fri Jan 22 20:03:58 2010 -0500 Linux Keyrings: don't ignore error code from session keyring creation Creating a session keyring can fail, for instance if the user's keyring quotas are reached (number of keys/keyrings or data size). Instead of ignoring errors, return them so they can be passed back to the caller. FIXES 126230 Change-Id: I745abeef4b3b8e4c3ab1b90667c6a5478c1e0ad2 Change-Id: I4b0ce6423ee493fbbcbdac1c580e3a157d3c11f4 Reviewed-on: http://gerrit.openafs.org/1151 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8462b1a1b2272eab004ed266a1bd9ffaf51266f3 Author: Marc Dionne Date: Fri Jan 22 20:05:34 2010 -0500 Add missing dependencies for pagsh in Makefile Make pagsh and pagsh.krb depend on the libraries that are used to link them, and on the source file pagsh.c Without this dependency, modifying pagsh.c would not trigger a rebuild of the executable. Change-Id: I9ed20ce69f10916f97d6c335be9bb8374fb9ecd1 Reviewed-on: http://gerrit.openafs.org/1150 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1eb6a7a3f80500f0187cc6a1dd2013e1a5e154a Author: Simon Wilkinson Date: Fri Jan 22 20:11:21 2010 +0000 Don't throw data away in afs_StoreMini afs_StoreMini had some interesting error handling. Instead of returning the error code from StoreData, it would return the error from EndCall, potentially masking the StoreData error. When it encountered an error it would discard all of the cached data. StoreMini's only caller is afs_StoreAllSegments. If StoreAllSegments is called from DoPartialWrite, then it squashes the error code. This combination could lead to the user's data being disposed of, without an error being reported. Fix all of this by not invalidating segments in StoreMini. Make StoreMini static to make it clear its only used by StoreAllSegments, and fix the error handling in StoreMini so that StoreData errors always take priority. Change-Id: I41f0c753655fac343485d2a473ad70b6ae96bb78 Reviewed-on: http://gerrit.openafs.org/1147 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 637e1eac97c2e9c0f0354cfff1a83deddb4ae24f Author: Simon Wilkinson Date: Fri Jan 22 21:50:44 2010 +0000 Revert "Fix afs_AccessOK for dropbox case" This reverts commit 3f89c0feae89e9a255afb8a7f08995412a3f1b79. That change broke the expected semantics of a drop box, by opening up read() access to users to whom it would usually be denied. The expected dropbox behaviour is that whilst anyone can write a file there, only those who are specifically given r permissions may read it. Change-Id: I025cef7cad1031fbed1e914d58a0a515561f3f78 Reviewed-on: http://gerrit.openafs.org/1149 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d9cef89c93d33985c43c0bf5d28d96955bb0e457 Author: Derrick Brashear Date: Thu Jan 14 15:41:23 2010 -0500 abstract rx if structure access change things to use accessor macros styled after the mac KPI where feasible, and make access consistent. Change-Id: I284101b370666e1aeb8e42bc1a651a2781a9af78 Reviewed-on: http://gerrit.openafs.org/1101 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f02ab3339d01bca414fe705f3a990a1db146f29b Author: Russ Allbery Date: Fri Jan 22 10:59:14 2010 -0800 Enable weak enctypes for klog.krb5 if supported by Kerberos The same as cb4b62a40352ccebae3a299f4327fa70fc7a0c5c, but for klog.krb5. Current versions of both MIT Kerberos and Heimdal disable DES enctypes by default, but DES enctypes are still required for AFS service tickets. Probe for either krb5_allow_weak_crypto() (MIT Kerberos 1.8) or krb5_enctype_enable() (Heimdal) and, if found, call them to enable DES enctypes. If neither is found, assume that the Kerberos libraries are old enough that DES is enabled by default. Change-Id: I99c93621c847f6edcc485207f5b6b99b2370b347 Reviewed-on: http://gerrit.openafs.org/1144 Tested-by: Russ Allbery Reviewed-by: Derrick Brashear commit 3f89c0feae89e9a255afb8a7f08995412a3f1b79 Author: Andrew Deason Date: Thu Jan 21 20:42:33 2010 -0500 Fix afs_AccessOK for dropbox case afs_AccessOK did not check for if we have 'i' rights on a directory, nor if we were the owner of a file, if we were only checking PRSFS_READ or PRSFS_WRITE. Thus, it does not correctly address the 'dropbox' permissions case (if you are the owner of a file and have insert permissions, you get implicit 'r' and 'w'). Fix this to check for 'i' and ownership when we need to, so the dropbox special-case check works as intended. FIXES 126216 Change-Id: Ib629bc30b73bc3965e777747067259451f0adff6 Reviewed-on: http://gerrit.openafs.org/1143 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cb4b62a40352ccebae3a299f4327fa70fc7a0c5c Author: Russ Allbery Date: Thu Jan 21 15:41:49 2010 -0800 Enable weak enctypes for aklog if supported by Kerberos Current versions of both MIT Kerberos and Heimdal disable DES enctypes by default, but DES enctypes are still required for AFS service tickets. Probe for either krb5_allow_weak_crypto() (MIT Kerberos 1.8) or krb5_enctype_enable() (Heimdal) and, if found, call them to enable DES enctypes. If neither is found, assume that the Kerberos libraries are old enough that DES is enabled by default. Change-Id: Ib5231bb7c2fe88f4c424628394ed08122d5710a1 Reviewed-on: http://gerrit.openafs.org/1141 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ddc64898e7b3a26e6514be63ef01672fe67cb851 Author: Marc Dionne Date: Thu Jan 21 17:53:42 2010 -0500 afs_vnop_attrs: syntax error in conditional expression Add a missing && in a 2-line condition. Not sure how this could have compiled successfully on the affected platforms. Change-Id: I2e8b791c6d8cd09795be1ef52c078ebfa5a3e53b Reviewed-on: http://gerrit.openafs.org/1140 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 14ffee4bbc1c8df93110ae1b86edb2a172aae091 Author: Jeffrey Altman Date: Thu Jan 21 20:05:25 2010 -0500 Windows: AFS_AFSDB_ENV preprocessor symbol no longer exists The decision to add AFS_AFSDB_ENV to make code consistent was a mistake. The preprocessor symbol no longer exists. AFSDB is broken in 1.5.69. Change-Id: I7ea147b824f3a67e2039abee8b2513af175fcc5d Reviewed-on: http://gerrit.openafs.org/1142 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0342cdb2d3710f7d56a5b93ca8aedf7b2df835fc Author: Jeffrey Altman Date: Thu Jan 21 17:38:43 2010 -0500 Windows: add build and clean rule for bc.h Add a dependency rule to build bc.h before it is installed Add cleanup rules to delete bc.h and other installed files. Change-Id: I9a40fd64aff048bfc87b9fd823ae7499816cb3e5 Reviewed-on: http://gerrit.openafs.org/1139 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d8bda273b09ed7d7b7395390f58891913e5fafdc Author: Jeffrey Altman Date: Thu Jan 21 16:43:18 2010 -0500 Windows: Windows v6.0 SDK does not define __RPC__out The Windows v6.0 SDK does not define __RPC__out in the rpcsal.h header file. The preprocessor symbol was added in the v6.0A SDK update. In case the v6.0 SDK is used with the 6000 WDK, add a symbol declaration. Change-Id: Iecce566e906977f41be00efb458753acd09f7949 Reviewed-on: http://gerrit.openafs.org/1138 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7a5d90b7735e4047eb926dc03dbaafce556bccfe Author: Jeffrey Altman Date: Thu Jan 21 15:34:49 2010 -0500 Undo labeling of elements of rx structures for Windows Change I006bbbdb8923dbb72a97fde931a1b23e303375c2 broke the Windows build. Restore the unlabled assignments for Windows since Windows always uses the AFS xdr implementation. Change-Id: I2eadc624d84f4100281424993b7287a330d6c753 Reviewed-on: http://gerrit.openafs.org/1136 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 18ace069417cde36b2af8439c375fd247ed4d8aa Author: Jeffrey Altman Date: Thu Jan 21 15:30:23 2010 -0500 Install bucoord/bc.h to permit Windows to build Change I0a0ae92d3c7ba75e4a331bf59ea9c031763cc704 broke the Windows build. Fix it. Change-Id: I08db225790a37eee3e4fd778eacabc7168abee77 Reviewed-on: http://gerrit.openafs.org/1135 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7f1046896ee14d3e7ee6975e70cd1a9bb9f24736 Author: Marc Dionne Date: Wed Jan 20 21:03:08 2010 -0500 Warning cleanup: implicit function declarations in butc and bucoord Cleanup some prototype related warnings under bucoord and butc: - Copy a few prototypes from bucoord_internal.h to bucoord_prototypes.h, since they are used in other source directories - Install bc.h under include/afs, and include it in tcmain.c - Include bucoord_prototypes.h in tcmain.c - Add a prototype for GetResponseKey - Remove warning inhibition for tcmain.c, and entry in README.WARNINGS - Remove warning inhibition for bucoord/dump.c (no entry in README) Change-Id: I0a0ae92d3c7ba75e4a331bf59ea9c031763cc704 Reviewed-on: http://gerrit.openafs.org/1134 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 21cbf7fee0a089d94f62baa7df2422e7bc8293f7 Author: Derrick Brashear Date: Wed Jan 20 11:15:29 2010 -0500 simplify ufs cache mechanisms available instead of having use_fh for linux, vnode_path for solaris and darwin, use the same mechanism for both. for darwin/solaris we cache the path (tested via gop_lookupname) instead of an fh, freeing the path at shutdown. Change-Id: Id22052db0803264bdaba6b870d9e511953e348bc Reviewed-on: http://gerrit.openafs.org/1132 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 1b7836e44f33c8dccc486aa49a25e9fe5a2d5aed Author: Derrick Brashear Date: Tue Jan 19 01:29:11 2010 -0500 batch panic decoding for MacOS add support for decoding (nominally) any panic for MacOS. Limited testing. Requires hdutil from http://www.dementia.org/~shadow/dmgutil-0.1.tar.gz to extract files from DMGs. now with support for cross-version debugging, when run on 10.6 (e.g. with kextutil) Change-Id: I5d9db005e3014e22f916070f8af25271a28615ea Reviewed-on: http://gerrit.openafs.org/1125 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit be916b0f009e3c643da5cd928907a28629cc9726 Author: Derrick Brashear Date: Mon Jan 18 19:25:02 2010 -0500 macos set don't backup attribute on cache files hint to time machine that cache files should not be backed up Change-Id: I098c9231139b91ff093be74d8a39f94c185d478c Reviewed-on: http://gerrit.openafs.org/1122 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 04e6ddb60bf3ce4ddfe7a5d6e4950fb25d2a3f86 Author: Simon Wilkinson Date: Wed Jan 20 13:13:58 2010 +0000 Fix so that UKERNEL can keep using system xdr This fix modifies the way that the RX XDR operations are declared so that UKERNEL can continue using the system provided XDR glue, rather than using our own (as is the case in userspace, and in normal kernel modules) Change-Id: Ib6abad376c7f7a7f0f5c2314efe80f5b7b44f842 Reviewed-on: http://gerrit.openafs.org/1131 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f18a6c36b38ed8422eb6ed5e43cebaa3d212917c Author: Simon Wilkinson Date: Sun Jan 17 18:34:03 2010 +0000 Label elements of rx structures Label all of the assignments to the xdr_ops structure. This allows the rec, stdio and mem variants to continue to function, even when the ordering of the elements has changed in the header. Change-Id: I006bbbdb8923dbb72a97fde931a1b23e303375c2 Reviewed-on: http://gerrit.openafs.org/1126 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5dddb87eb362c824dee4b0340a95ca929c71d26f Author: Russ Allbery Date: Tue Jan 19 17:43:35 2010 -0800 Avoid executable headers in local include tree sys_prototypes.h, afs_AdminErrors.h, and afs_Admin.h were being installed into include/ in the build tree via ${INSTALL} instead of ${INSTALL_DATA}. rx_prototypes.h was executable in the repository. Install header files non-executable and make rx_prototypes.h non-executable for cleanliness. Discovered by Lintian because the executable permissions were duplicated by make libafs_tree. Change-Id: I609b62f69d1fecc2cdbba7e7442d93e9675c2fa0 Reviewed-on: http://gerrit.openafs.org/1129 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 340d3be82aa6d1fbaa0c775fe743f86e5a7335ed Author: Jeffrey Altman Date: Mon Jan 18 22:23:54 2010 -0500 Windows: Help text update for Network Identity Manager Provider Update the NetIdMgr provider help text to better describe its functionality. (Or at least not be incorrect.) Change-Id: I5d6b18f15cab7c48751666e754223ee68fb18d11 Reviewed-on: http://gerrit.openafs.org/1124 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e010c8e9379bd2fa9b08a142e57cee56c123791c Author: Asanka Herath Date: Mon Jan 18 16:47:31 2010 -0500 Windows: Add a context menu for the AFS icon The OpenAFS plug-in for Network Identity Manager displays an icon in the notification area that displays status information about the AFS service and tokens. Add a context menu to the icon so that users can open the NIM application and get help for the plug-in from the notification icon. Change-Id: I704934b4f4eab72a18c54ef2a7a7dc3ca248ba78 Reviewed-on: http://gerrit.openafs.org/1121 Reviewe