commit c37046097bbe3bd57edc519fdf45b8cb8ed56e8a 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 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