commit 74edc033f1357fb09898b304b784b0c42a5a41cd Author: Derrick Brashear Date: Thu Mar 15 11:51:39 2012 -0400 osx: deal with more kerberos damage the number of things which can return success without succeeding is truly sad. Reviewed-on: http://gerrit.openafs.org/6911 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 59b57ff85acbef10bcec9724c42e3bad78538687) Change-Id: Ie41cb88f9b58945b8ae486eab671b00fe0cf10a6 Reviewed-on: http://gerrit.openafs.org/6964 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 722ef1bf9443cd22459f1d64c9f823a8b1da6c32 Author: Derrick Brashear Date: Mon Mar 26 09:05:11 2012 -0400 openafs 1.6.1 update version strings for openafs 1.6.1 Change-Id: I9bf202cb7ca4002382204f0aeb6d54ae4a9eb6f8 Reviewed-on: http://gerrit.openafs.org/6961 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 842a5a118af95476a95965e8f6be6bb05e26e446 Author: Derrick Brashear Date: Mon Mar 26 09:01:19 2012 -0400 Revert "Windows: Workaround Win7 SMB Reconnect Bug" This reverts commit 2c4618adc47fa1336a4636bd328c0dad0194c9d2. This change causes issues as-is for users who are not experiencing the reconnect bug, and when investigation is complete a corrected version will be included in a future release. Change-Id: I3833a2485c37f547d23612414f262c2af2208fb2 Reviewed-on: http://gerrit.openafs.org/6960 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9304166380e0d997671c528ac3ed456704512a83 Author: Andrew Deason Date: Fri Mar 2 14:55:04 2012 -0600 viced: Do not ignore all InlineBulkStatus errors InlineBulkStatus currently returns 0 unconditionally, no matter what errors are encountered. If we encounter an error early enough, from CallPreamble for example, we do not fill in the OutStats nor CallBacks structures at all. Since we return success anyway, this results in the client getting AFSFetchStatus structures full of zeroes (or garbage, before commit 726e1e13ff93e2cc1ac21964dc8d906869e64406). Since current OpenAFS clients do not perform any sanity checks on the information received, this can result in cache corruption of files being seen incorrectly as empty, and, before commit 726e1e, more arbitrary corruption. So instead, return an error if we encounter an error before we iterate over the given FIDs. We still of course do not return an error for any errors encountered during the actual metadata retrieval, as those are reflected in the individual per-fid status structures. Reviewed-on: http://gerrit.openafs.org/6871 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 690a4c144b53fd1f3538d83017ecf581a2bcded5) Change-Id: Ide6bf179d3296d5105373f87052c0fb9df4fcacf Reviewed-on: http://gerrit.openafs.org/6958 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2060ab9835d7707f52a64066946a5217b6c35c81 Author: Marc Dionne Date: Wed Jan 18 11:22:35 2012 -0500 Linux 3.3: use umode_t for mkdir and create inode ops The mkdir and create inode operations have switched to using umode_t instead of int for the file mode. Reviewed-on: http://gerrit.openafs.org/6567 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit beafc7f742ebad021bfcbed73884aecedee4e04b) Change-Id: Ib12c319b55810192c3181f4f2ec340b94a32cb6f Reviewed-on: http://gerrit.openafs.org/6944 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f565ed2e3262e4ee72689a51d181629ec011d2b7 Author: Jeffrey Altman Date: Sun Mar 25 09:56:48 2012 -0400 doc: correct implicit ACL permissions volume owner OpenAFS changed the behavior of implicit administrator permission for directory ownership. In OpenAFS only the volume root directory owner has implicit administrator permissions and they apply to all directories in the volume not just those with matching ownership. Reviewed-on: http://gerrit.openafs.org/6951 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 95ec152a850c0cde33829481b8e71e7e7e686a58) Change-Id: I390e11fcf64b7cdb192e49e0967b7890e831ea45 Reviewed-on: http://gerrit.openafs.org/6954 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c17758412a16c6ba7607ee587de3de28c3becd0 Author: Andrew Deason Date: Wed Feb 22 15:40:20 2012 -0600 LINUX: Use afs_convert_code in afs_notify_change afs_notify_change currently just returns "-code". This can cause a panic if the error code is negative, since we will return a positive error code, which may get interpreted as a valid pointer value in higher levels. Specifically, if we hit afs_notify_change via something like this code path: do_sys_open -> do_filp_open -> open_namei -> may_open -> do_truncate -> notify_change -> afs_notify_change (via inode->i_op->setattr) the positive error value will be interpreted by do_sys_open as a valid 'struct file' pointer, and will be dereferenced. So pass the return value through afs_convert_code, like all of the other vnode ops, so we ensure we return an error properly. Reviewed-on: http://gerrit.openafs.org/6776 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 634c6f184b17e30ade86c0a838ab55ddddc730d6) Reviewed-on: http://gerrit.openafs.org/6918 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 55eceee5dbee51eb82b8988ea187fde16b910e82) Change-Id: I4e675f5dffa984f105a08cdb4ca3fde582e4b1c4 Reviewed-on: http://gerrit.openafs.org/6935 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 81f8951118f135857eaf4429fec10ce0fcdb5d24 Author: Andrew Deason Date: Wed Feb 22 15:36:37 2012 -0600 LINUX: move afs_notify_change to osi_vnodeops.c afs_notify_change is almost always used solely in inode_operations structs, and is more similar to the other per-vnode functions. Put it with the other per-vnode functions for better organization, and so they can use the same static functions. Move the helper functions iattr2vattr and vattr2inode along with it. Reviewed-on: http://gerrit.openafs.org/6775 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 620d4169b73088579e691aec2cfdafc7f44e2fee) Reviewed-on: http://gerrit.openafs.org/6917 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b44bb369dedd979b22d3cdbcc49208620c17daaf) Change-Id: I64c6e9a8bc15e05de9152d2ff7cca1240074d7a7 Reviewed-on: http://gerrit.openafs.org/6934 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1bf821f39fe068d973b6e4cf7ffa21bfd49b847d Author: Jeffrey Altman Date: Thu Mar 22 15:55:47 2012 -0400 Windows: Client handling of VNOSERVICE VNOSERVICE should not be grouped together with the volume status error codes. It is used to indicate that the RPC was not serviced. The file server issues it when its idle dead timeout period is reached while receiving rx call data. The client's existing status information is still valid and the client can retry the call. Reviewed-on: http://gerrit.openafs.org/6938 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 39964d08792f3a09694f97d7c7fa76a86ca213a7) Change-Id: I96b831e3a2eae04e96062f9c269eb7325e76c439 Reviewed-on: http://gerrit.openafs.org/6941 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d04a9016bcd69f6dc2f67fea2d66fe2619e5760 Author: Marc Dionne Date: Wed Mar 21 22:19:04 2012 -0400 Linux 3.4: Switch to d_make_root If d_make_root is available, use it instead of d_alloc_root. The helper was introduced in 3.3, and d_alloc_root gets removed in 3.4. Reviewed-on: http://gerrit.openafs.org/6931 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f246aa5f84a5233b6525ae43456a8da5b7e92984) Change-Id: Ic0fccd9f09f811bab6e49639149e41fb71841547 Reviewed-on: http://gerrit.openafs.org/6933 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0f1891ae9cbd72c961d551ef6a8a15368f4e56ee Author: Andrew Deason Date: Wed Mar 7 16:36:57 2012 -0600 afs: Never #define away afsd_dynamic_vcaches Some versions of the Solaris Studio compiler on SPARC (at least 12.2 and possibly others, but not 12.3) get a little confused by code like this: extern int foo; int somefunc(void) { if (0) return foo; return 0; } When optimization is turned off, this results in an undefined symbol reference to 'foo' (which is normal), but the resulting object file lacks a relocation entry for the symbol 'foo', so the symbol remains undefined after linking. In the OpenAFS tree, this occurs in afs_daemons.c which references afs_vcount and afs_cacheStats in this manner due to afsd_dynamic_vcaches being defined as '0' on Solaris. The end result is that the libafs kernel module is not loadable, since it complains about afs_vcount and afs_cacheStats being undefined, even though the symbol definitions are also in the module. While this is a bug in Solaris Studio and has since been fixed, it is simple to work around this so we are usable with more compilers. If we just always declare afsd_dynamic_vcaches as a regular variable, it works around this issue and keeps the code a tiny bit simpler. So, do that. Reviewed-on: http://gerrit.openafs.org/6888 Tested-by: Michael Meffie Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit e5821239cde138f74f73bec1bd9a3880d08ac3df) Change-Id: Id0f4b36d2b8d6a18f663ca6c95b78f773255fa78 Reviewed-on: http://gerrit.openafs.org/6908 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e4b2709a076d2d40b3db6d052c3ee3fbd5226fdf Author: Simon Wilkinson Date: Wed Mar 14 10:56:06 2012 -0400 rx: hold call->lock across RXS_PreparePacket RX Security Classes have a right to assume that when RXS_PreparePacket is called that they have exclusive access to the rx_call structure. Commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 unintentionally failed to acquire the call->lock prior to RXS_PreparePacket being called. Reviewed-on: http://gerrit.openafs.org/6904 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fdcf171a8d2b2153648b6b799096e09eb469beb) Change-Id: I19fbc3c9da5bbf607b41491404b70a87d68e033e Reviewed-on: http://gerrit.openafs.org/6907 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fe4ed0d12306087cd12f802d3ad71d42cedfeaa7 Author: Jonathan Billings Date: Thu Mar 8 09:23:40 2012 -0500 redhat: Don't replace modified configuration files during rpm update The previous setting for three %config files mentioned in the spec file: %config /etc/sysconfig/openafs %config %{_prefix}/vice/etc/ThisCell %config %{_prefix}/vice/etc/cacheinfo When using an unadorned %config, it's possible that these files will be replaced by the packaged version during a package update. Changing %config to %config(noreplace) means that the packaged file will be installed with the extension .rpmnew if there is already a modified (from the existing package's version) file with the same name on the installed machine. The concern here is that updating an existing system could potentially change the configuration if the person installing doesn't pay close attention. The Rule of Least Surprise indicates that we should try to preserve existing configuration changes whenever possible. Change-Id: I50278e6c9d8ebcf4a80386f16b50e9695bdaca0a Reviewed-on: http://gerrit.openafs.org/6887 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6889 Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/6912 commit 6d7032d7d11a1115f0c1d5220fc412da1e9791ec Author: Jens Wegener Date: Tue Mar 6 07:28:32 2012 -0600 viced: fix inverted lockCount assignment FIXES 130605 Reviewed-on: http://gerrit.openafs.org/6884 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7dce85e4e5db7420c5c359fdd02a8005a12fb29c) Change-Id: Icadaba4bd9e6cdefe267004377faff9126f70f96 Reviewed-on: http://gerrit.openafs.org/6892 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2eb6571343d1e8a4230aa8563e19bedf3ccbea5e Author: Jeffrey Altman Date: Sun Mar 4 16:18:22 2012 -0500 Windows: 1.6.1pre4 change log Reviewed-on: http://gerrit.openafs.org/6872 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 90c36a504d292e1c3835362ee90285f60e16894d) Change-Id: Ia0c292720689e8dc76434393333c1c79e9e967a9 Reviewed-on: http://gerrit.openafs.org/6873 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2b59a782b6b24c4d34f581954390e28003a47f26 Author: Derrick Brashear Date: Sat Mar 3 18:22:17 2012 -0500 openafs 1.6.1pre4 make pre4 Change-Id: I30a7dd99750157fffa9f85547b050dcbe6c4e2bb Reviewed-on: http://gerrit.openafs.org/6864 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 363f98dbbda37ee70ccbc8897824ec79032c313d Author: Derrick Brashear Date: Sun Mar 4 09:48:07 2012 -0500 macos: don't crash on krb5 damage if we get success but still no client, don't crash Reviewed-on: http://gerrit.openafs.org/6868 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0a3f0608fcf6c14b44484cfa6fe106c568aa1035) Change-Id: Iaaec8f11d3b8a5ecda039358569cfd6ce4d56e62 Reviewed-on: http://gerrit.openafs.org/6869 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 33c4d3ffe1b80e6a14813f38d43b9d81d7d274ab Author: Dave Botsch Date: Thu Mar 1 12:43:36 2012 -0500 Fixes dkms.conf for Redhat Enterprise commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e , while fixing dkms.conf for Fedora, broke dkms.conf for RHEL. In RHEL, you get a dkms.conf with too many backslashes in the "mv" line. The dkms.conf should have the mv line reading: mv src/libafs/MODLOAD-*/\$KMODNAME \$DSTKMOD" for Fedora. This change checks if we are building on Fedora, and if so, maintains the extra backslashes. Otherwise, not. modified: src/packaging/RedHat/openafs.spec.in Uses the dist tags as specified at http://fedoraproject.org/wiki/Packaging:DistTag Reviewed-on: http://gerrit.openafs.org/6851 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81a9a33e0bc5455841ba105dab52735c64c7096b) Change-Id: I7cdc0a93e0f4c292a07184ea1d4f15ece529276b Reviewed-on: http://gerrit.openafs.org/6863 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2607d686b3d25cd058bbb62b7971ebbfec6bd4b6 Author: Jeffrey Altman Date: Thu Mar 1 15:49:12 2012 -0500 unix: always retry RX_CALL_BUSY RX_CALL_BUSY is an indication that the call channel is busy not that the server is down or otherwise cannot respond. Unconditionally retry the RPC and do not alter state. We just want to force the use of a different call channel. Reviewed-on: http://gerrit.openafs.org/6852 Tested-by: BuildBot Reviewed-by: Hartmut Reuter Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 579976cf246bd55dea2dfd3bf8470fd8bb8bde0a) Change-Id: I4492577e107cb62903e03a17c9241cc039e08ea4 Reviewed-on: http://gerrit.openafs.org/6854 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c4618adc47fa1336a4636bd328c0dad0194c9d2 Author: Jeffrey Altman Date: Wed Feb 29 13:07:47 2012 -0500 Windows: Workaround Win7 SMB Reconnect Bug The SMB specification permits the server to save a round trip in the GSS negotiation by sending an initial security blob. Unfortunately, doing so trips a bug in Windows 7 and Server 2008 R2 whereby the SMB 1.x redirector drops the blob on the floor after the first connection to the server and simply attempts to reuse the previous authentication context. This bug can be avoided by the server sending no security blob in the SMB_COM_NEGOTIATE response. This forces the client to send an initial GSS init_sec_context blob under all circumstances which works around the bug in Microsoft's code. Do not call smb_NegotiateExtendedSecurity(&secBlob, &secBlobLength); As a result of the SMB 1.x bug, all attempts to reconnect fail due to SMB connection resets. The SMB 1.x redirector will retry indefinitely but all processes with outstanding requests to \\AFS will block until the machine is rebooted. Reviewed-on: http://gerrit.openafs.org/6846 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 28a33f8492098c23f7c3c58763ace93b82ea80a7) Change-Id: I424b8a8f76c3ee5a70e0886a169c4a7175ff5e47 Reviewed-on: http://gerrit.openafs.org/6849 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 13546c8d03b9dfaa753523e320f7ef901bc24c8b Author: Jeffrey Altman Date: Sun Feb 26 14:45:43 2012 -0500 Windows: disable Adv ICF support if not supported OpenAFS 1.6.x does not require the use of SDK 6.0 or above. Therefore the Advanced Internet Connection Firewall support may not be available. In particular, the 32-bit distribution for 1.6.x does not rely on SDK 6.0 or higher. This is a 1.6.x only change. Reviewed-on: http://gerrit.openafs.org/6841 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c533e10d2bb5d6f22ee54e2c43af06f13db037d1) Change-Id: Id4269d2af010ac832ef17db8fb82e82409aab81b Reviewed-on: http://gerrit.openafs.org/6842 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 908aadaf1666271de487882f9d9f38df7b83d6f8 Author: Derrick Brashear Date: Thu Feb 23 16:39:34 2012 -0500 make openafs 1.6.1pre3 prerelease for 1.6.1 Change-Id: I322062806b28cc464bb1cdb876088f1ad3d5f1ba Reviewed-on: http://gerrit.openafs.org/6840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 94c4502fd3f589c85860d40b811aca4a54193bcd Author: Andrew Deason Date: Thu Feb 23 15:53:32 2012 -0600 Revert offline-less vos release This reverts commits: 3cc6da964e3705b070f8886686484d6a1eb700c8 8b25f9cc99308ffcd2ee3f4d2bc7d58a85f2b96b f4e73067cdef990262c69c38ac98761620a63f25 7a42c8f7ec6e6865a770c9bd7dbafa48947018a8 27661857721e92f2ff99ebe7f3a72bac6f01fa50 6b66b3b705b78c959b3ae321a8cb06e2fe166086 Wait until we have an actual stable release to merge these. Change-Id: I842fbbc7523230465aa8a9a38ee8ce65387fb1cc Reviewed-on: http://gerrit.openafs.org/6839 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 72df2820f0957dfae55685802c5ffcf08d0f3ca3 Author: Jeffrey Altman Date: Sun Feb 26 10:52:53 2012 -0500 Windows: ChangeLog for 1.6.1pre3 Change-Id: Ie2264743a69f330718c3ddedfd5dd93b43294a8c Reviewed-on: http://gerrit.openafs.org/6838 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7bcd00051aead840f4d85a21f0ef36b6b9819d0 Author: Jeffrey Altman Date: Tue Jan 17 19:46:30 2012 -0500 Windows: failover and retry for VBUSY When a file server returns the VBUSY error for an RPC the cache manager records the 'srv_busy' state in the cm_serverRef_t structure binding that file server to the active cm_volume_t object. The 'srv_busy' was never cleared which prevents the volume from being accessed. Clear the 'srv_busy' flag whenever cm_Analyze() receives a CM_ERROR_ALLBUSY error which means that all replicas have been tried or whenever the error is not VBUSY or VRESTARTING. FIXES 130537 Reviewed-on: http://gerrit.openafs.org/6563 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9056d09887c84a480e0a9ee3457a9469fbb97064) Change-Id: Ifd8204a3bba83a893188e96f85b1ad3ba078fe49 Reviewed-on: http://gerrit.openafs.org/6831 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 68dc637db6d99a48d7be0556916a8cc084843286 Author: Jeffrey Altman Date: Fri Nov 25 09:28:18 2011 -0500 Windows: improved idle dead time handling RX_CALL_IDLE has been treated the same as RX_CALL_DEAD which is a fatal error that results in the server being marked down. This is not the appropriate behavior for an idle dead timeout error which should not result in servers being marked down. Idle dead timeouts are locally generated and are an indication that the server: a. is severely overloaded and cannot process all incoming requests in a timely fashion. b. has a partition whose underlying disk (or iSCSI, etc) is failing and all I/O requests on that device are blocking. c. has a large number of threads blocking on a single vnode and cannot process requests for other vnodes as a result. d. is malicious. RX_CALL_IDLE is distinct from RX_DEAD_CALL in that idle dead timeout handling should permit failover to replicas when they exist in a timely fashion but in the non-replica case should not be triggered until the hard dead timeout. If the request cannot be retried, it should fail with an I/O error. The client should not retry a request to the same server as a result of an idle dead timeout. In addition, RX_CALL_IDLE indicates that the client has abandoned the call but the server has not. Therefore, the client cannot determine whether or not the RPC will eventually succeed and it must discard any status information it has about the object of the RPC if the RPC could have altered the object state upon success. This patchset splits the RX_CALL_DEAD processing in cm_Analyze() to clarify that only RX_CALL_DEAD errors result in the server being marked down. Since Rx idle dead timeout processing is per connection and idle dead timeouts must differ depending upon whether or not replica sites exist, cm_ConnBy*() are extended to select a connection based upon whether or not replica sites exist. A separate connection object is used for RPCs to replicated objects as compared to RPCs to non-replicated objects (volumes or vldb). For non-replica connections the idle dead timeout is set to the hard dead timeout. For replica connections the idle dead timeout is set to the configured idle dead timeout. Idle dead timeout events and whether or not a retry was triggered are logged to the Windows Event Log. cm_Analyze() is given a new 'storeOp' parameter which is non-zero when the execute RPC could modify the data on the file server. Reviewed-on: http://gerrit.openafs.org/6118 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit f768fb95f3eb3815d6225e074c43341ed2ad5347) Change-Id: If7194292be0fc2350af9f26c397bd3a1e840abdc Reviewed-on: http://gerrit.openafs.org/6830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 778d922cee9a73c7d829b87aacec2513433c6a23 Author: Jeffrey Altman Date: Fri Feb 24 12:21:46 2012 -0500 Windows: cm_UpdateCell never applies to Freelance mode The Freelance.Local.Cell is updated by the registry monitor thread and cm_UpdateCell should be a no-op. Make it so. Reviewed-on: http://gerrit.openafs.org/6791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cfb7f205d8153899c0165594a29d91926a40425d) Change-Id: I2607ea87ebcc849474f4e0a183d7ad4eba121de9 Reviewed-on: http://gerrit.openafs.org/6829 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6084f4ac95613cd02c3cec71b26be4bd19af85d Author: Jeffrey Altman Date: Fri Feb 3 11:21:45 2012 -0500 Windows: fix cm_DirOpDelBuffer assert In cm_DirOpDelBuffer() the data version field for a buffer in cm_dirOp_t.buffers[] can be CM_BUF_VERSION_BAD if the buffer was added to the buffer list but was never fetched from the file server. If the buffer was recycled by buf_Get() an attempt to remove an entry from the directory will be failed as opposed to fetching the buffer from the file server and performing the local removal. Reviewed-on: http://gerrit.openafs.org/6650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 865f2442e682ff71b28a6b21363de8262f9e2bd1) Change-Id: I4d822d9286ca891fc50cf04fdd68272c0af2e38e Reviewed-on: http://gerrit.openafs.org/6828 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0f1de7e8e21c675e5c9f4f58c524b91930dc319 Author: Jeffrey Altman Date: Fri Feb 3 11:17:40 2012 -0500 Windows: buffer DV ranges do not work for directories In cm_MergeStatus, always set cm_scache_t.bufDataVersionLow to the new data version because the cm_dir package does not support version ranges. All modified dir buffers have their dataVersion field set to the current data version value. Failure to update the bufDataVersionLow field can result in B+ Trees being constructed from out of date directory information. Reviewed-on: http://gerrit.openafs.org/6649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25142a9c2db933607507ee20e20216c635465d6d) Change-Id: I9bdad7bed4ce76e0425adff433982b9bf35ac15f Reviewed-on: http://gerrit.openafs.org/6827 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96c2ebd1e84c396348cc7a6ff2a8cd471d182d14 Author: Jeffrey Altman Date: Sun Jan 22 18:38:49 2012 -0500 Windows: VIOC_GETUNIXMODE = smb_IoctlGetUnixMode VIOC_GETUNIXMODE pioctl should execute smb_IoctlGetUnixMode not smb_IoctlSetUnixMode. Reviewed-on: http://gerrit.openafs.org/6600 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1474b4a739c60f96a8d2e38546778ab9572c138d) Change-Id: I248effacd831849f33fe0fd9785d3c00117a2607 Reviewed-on: http://gerrit.openafs.org/6826 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 01c9004cecce0b45b01aaa1dd1c36ff76eb8368b Author: Jeffrey Altman Date: Sun Jan 22 18:37:14 2012 -0500 Windows: fix fs setcrypt help message Options are on, auth, and off. Reviewed-on: http://gerrit.openafs.org/6599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 898930fc3ca81a5e5dde31967c00cdf5f4734ffa) Change-Id: I6ef9294554eeedc9f6963a92b815e118fff87139 Reviewed-on: http://gerrit.openafs.org/6825 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a42fc8d9a57601cd1a7d1e5ac2abc7d544c0dda Author: Jeffrey Altman Date: Sun Jan 22 18:33:43 2012 -0500 Windows; release BIOD after status merge Releasing the BIOD permits the accumulated buffers to be accessed. Releasing the BIOD before the cm_MergeStatus() call creates a window where the buffer data version is larger than the cm_scache data version. Release the BIOD after the status merge. Reviewed-on: http://gerrit.openafs.org/6598 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 111de76ea8dac713247c99ebe2182ae16cc0a3c0) Change-Id: I7c8dd9f3e22e83b82679b9d3a4ee3aa5f45a49aa Reviewed-on: http://gerrit.openafs.org/6824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25b96acb42b197de32f8d02aeb3526fe0517ebad Author: Jeffrey Altman Date: Thu Jan 19 15:25:44 2012 -0500 Windows: cm_buf refcnt must hold buf_globalLock An assertion in buf_Recycle() was being triggered when a cm_buf_t object was supposed to be in the free buffer list but wasn't. buf_Recycle() was racing with another thread. The test for refCount == 0 was performed while holding the buf_globalLock exclusively but the InterlockedDecrement(refCount) in buf_Release() was performed without holding buf_globalLock at all. buf_globalLOck must be held at least as a read lock. Otherwise, the refCount can reach 0 prior to the thread blocking for exclusive access to the buf_globalLock. This provides buf_Recycle() which is holding buf_globalLock the opportunity to race. The solution is to make sure that buf_Release() always holds buf_globalLock as a read lock and then use buf_ReleaseLocked() to perform the actual decrement and test. Reviewed-on: http://gerrit.openafs.org/6576 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 22cba8e9702f3673c335bf834a9ee2c5e5fd9b6e) Change-Id: I82c6480859a85e00e8602421204dac9a9ce588ed Reviewed-on: http://gerrit.openafs.org/6823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e42640ec102838c8de2185e9247ac504b04aea09 Author: Jeffrey Altman Date: Sat Jan 14 10:31:01 2012 -0500 Windows: restrict service to 2 cpus by default Performance drops off considerably when the number of processors increases due to lock contention and the cm_SyncOp wait processing. If the MaxCPUs registry value is not set, limit ourselves to two. Setting MaxCPUs to zero permits use of all CPUs. Reviewed-on: http://gerrit.openafs.org/6555 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69196e41ec9c5a6ce8efd370fb8582f66667bcf7) Change-Id: I0cf2d2eeb3d8f7c708e7c365520f10fcd5f22d83 Reviewed-on: http://gerrit.openafs.org/6822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 361148b688197f636d034a4e512a2af7796e9e2c Author: Jeffrey Altman Date: Tue Jan 3 21:10:32 2012 -0500 Windows: dir buffers out of date - mark them as such if cm_CheckForSingleDirChange() fails, mark the cm_scache_t bufDataVersionLow as the current data version so that old directory buffers are discarded. Reviewed-on: http://gerrit.openafs.org/6498 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e77b6858ee889ec9e4e3fe3bb62c23b1c1f5727f) Change-Id: I8b149d3655c249fc3ea034d179b919f4370f19a2 Reviewed-on: http://gerrit.openafs.org/6821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e942f4cfa0d5d0e17121dd14e30034d6826425f3 Author: Jeffrey Altman Date: Wed Dec 28 17:07:01 2011 -0500 Windows: replace strdup with xdr_alloc in callback processing The CRT allocator cannot be used for memory that will be freed by afsrpc.dll. Use xdr_alloc() instead. Reviewed-on: http://gerrit.openafs.org/6439 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb) Change-Id: Ie2359b4df312d090f0579ecd6d50ee197b51d68a Reviewed-on: http://gerrit.openafs.org/6820 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 97e5b174b30d0987730bf983c5ba3504aea69aa2 Author: Jeffrey Altman Date: Sat Dec 24 15:16:12 2011 -0500 Windows: kauth search for kerberos iv port first Modify src/kauth/user_nt.c to match the service name search order of the Unix code: kerberos4 kerberos-iv kerberos The standard Windows SERVICES file includes "kerberos-iv" as port 750. FIXES 127907 Reviewed-on: http://gerrit.openafs.org/6430 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2cdd59d8f318193d0ef7937910466531caf1c963) Change-Id: I936c35bbd45395f26ad6c523b72398584d1384f9 Reviewed-on: http://gerrit.openafs.org/6819 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b80435a4619c599856b059df0bda63cf8daf232 Author: Jeffrey Altman Date: Sat Dec 24 03:11:04 2011 -0500 Windows: cm_BufWrite() must wait in cm_SyncOp() Now that it is permissible for more than one store data operation to construct BIOD lists in parallel, cm_BufWrite() must be willing to wait in cm_SyncOp(). Otherwise, the daemon threads will spin. Reviewed-on: http://gerrit.openafs.org/6423 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17ce77f843e01ff96f66e05b4b932b0c6187493e) Change-Id: I8ae9d057413252e73774c5209465223fa5a36947 Reviewed-on: http://gerrit.openafs.org/6818 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 611d5564bd1c378a560c09451aa223af2d3cbf57 Author: Jeffrey Altman Date: Sun Dec 18 12:08:24 2011 -0500 Windows: terminate HOSTS/LMHOSTS with newline If the original file did not terminate with a newline, add one before appending the "AFS" entry. FIXES 130210 Reviewed-on: http://gerrit.openafs.org/6375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d8f9141fa98df50ce682364ef5a7958ce422613) Change-Id: I1a95a42b420b4695b52ae0c2e2de46cd97a5294a Reviewed-on: http://gerrit.openafs.org/6817 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c5e47c0809a1c782b08d89028ea372c932e198b Author: Jeffrey Altman Date: Wed Dec 14 12:58:36 2011 -0500 Windows: Update Adv Firewall Rules Do not specify the Service Name property. According to feedback on openafs-info the Service Name blocks the rule from working properly. If the rule already exists, attempt to remove the Service Name filter and update NAT Edge Traversal and Permitted interface rules. Reviewed-on: http://gerrit.openafs.org/6332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d472f94ab1017724e56bcdd29b9ef451a13f182) Change-Id: I8184074adbd4c19426d87d48673402b3c8cd97a3 Reviewed-on: http://gerrit.openafs.org/6816 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 881ba096d2849707c26a7e0bd14d536a79fd5cc1 Author: Jeffrey Altman Date: Sat Dec 10 13:28:17 2011 -0500 Windows: memory leak when setting tokens via smb The SID string of the RPC used to set the token sessionKey was being leaked. Be sure to free it when it is no longer required. Reviewed-on: http://gerrit.openafs.org/6244 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f30d70ba5575753302be0a2b08c27a639898d4aa) Change-Id: I1133b50841919ca5957081c82625c2b1607c34ae Reviewed-on: http://gerrit.openafs.org/6815 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aacc6f18ba5648e2f86276bc8bb88655a37caf4d Author: Jeffrey Altman Date: Sat Dec 3 17:49:47 2011 -0500 Windows: apply Nat Pings only to cm_rootUser connections Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser connections and only apply Nat pings to those connections instead of examining the security state of the connection. Reviewed-on: http://gerrit.openafs.org/6208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01f55bbf14210ef3e4f4c0246409af370de3a383) Change-Id: Id26a955190aace50ca4740b910325474077941e1 Reviewed-on: http://gerrit.openafs.org/6814 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c162907bd09828fe26d84dd9202b81e87d235610 Author: Jeffrey Altman Date: Sat Dec 3 17:46:41 2011 -0500 Windows: track cm_rootUser connections Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose of tracking which connections belong to the cm_rootUser. Reviewed-on: http://gerrit.openafs.org/6207 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75) Change-Id: Ie0014200d9e3ed3832bf875a9788aad1f55f29ec Reviewed-on: http://gerrit.openafs.org/6813 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7193b01dfa750b371de63a4003666773e15a84ae Author: Jeffrey Altman Date: Fri Dec 2 11:19:13 2011 -0500 Windows: fix buf_Recycle() comment buf_Recycle() does not return with a reference count to the cm_buf_t object held. Correct the comment. Reviewed-on: http://gerrit.openafs.org/6173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dccf17840a53e96b21f8c092910f3e4d7628b71) Change-Id: I0890439df967f8b2a87d5079adcd71a646500876 Reviewed-on: http://gerrit.openafs.org/6812 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 13c676b0ab44f4b369d43652c2e509201e5a4a8f Author: Jeffrey Altman Date: Fri Dec 2 11:14:11 2011 -0500 Windows: buf_CleanAsync is not async; rename it buf_CleanAsync() calls cm_BufWrite() which stores the dirty buffers synchronously. There is nothing asynchronous about buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked() to buf_CleanLocked(). Update the comments to remove the references to the asynchronous processing which doesn't exist. That is not to say that the call to buf_Clean() in buf_GetNewLocked() should not be asynchronous; it should. There is no such functionality at the moment. One approach would be to modify buf_IncrSyncer to trigger on an event set by buf_GetNewLocked() instead of the call to buf_Clean(). Another approach would be registering a background store event. In any case, that is for another patchset. Reviewed-on: http://gerrit.openafs.org/6172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c712403f192bd9932f3ec1dce5fb23461d3d0349) Change-Id: Ib8d5bb06b0c4ffa3e53d53e24ca9f970b7cb63b0 Reviewed-on: http://gerrit.openafs.org/6811 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af58b42210a6976c512b746dd59dd63ceb0000e8 Author: Jeffrey Altman Date: Mon Nov 28 18:45:55 2011 -0500 Windows: Wix cell names can be greater than 120 chars Increase the permitted length in the UI to 255 characters. Reviewed-on: http://gerrit.openafs.org/6133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4f9f33dc55150d991d9eec4ea95d78208f6949) Change-Id: Ibf24b85990a054e84724c52e481c19098fe5cbe0 Reviewed-on: http://gerrit.openafs.org/6810 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 256a9f51c024680bc2898d73d72574c63c5cd220 Author: Jeffrey Altman Date: Mon Nov 21 13:14:40 2011 -0500 Windows: cm_GetSCache do not release unheld lock if cm_GetNewSCache() fails, an attempt would be made to release cm_scacheLock which is not held. However, it should be noted that cm_GetNewSCache() cannot fail without itself triggering a panic. Reviewed-on: http://gerrit.openafs.org/6103 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d42db13152fb8fa374db6531020da6effca51ab4) Change-Id: Ibb3aff0a256c6846ac8b9336a50ea021f8a1e2f6 Reviewed-on: http://gerrit.openafs.org/6809 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2866c3f1b941840c54f5d5f05bd85cba9b997f94 Author: Jeffrey Altman Date: Tue Nov 15 18:35:26 2011 -0500 Windows: buf_CleanAsyncLocked dirty range only buf_CleanAsyncLocked() should not instruct cm_BufWrite() to write a full chunk if the current buffer is the only one that is dirty. cm_BufWrite() will determine if it is appropriate to fill a full chunk when storing. Instructing it to check a full chunk forces it to do more work than necessary. Reviewed-on: http://gerrit.openafs.org/6054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd42e08bf1882a02c3200e1c33a101e644aa046a) Change-Id: Ibbd823feb5fe18f0ab0ee54af8c9b8ccb531c8bc Reviewed-on: http://gerrit.openafs.org/6808 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 072397a05ed2115334f57c55460ad0cc68029700 Author: Jeffrey Altman Date: Tue Nov 15 19:00:05 2011 -0500 Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b) Change-Id: I26f7fc9e0c7281ca2118205d7916102c2471bb43 Reviewed-on: http://gerrit.openafs.org/6807 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2c9be3970bbb8ce83904c9db29045ff01942eae2 Author: Jeffrey Altman Date: Sat Nov 12 18:33:18 2011 -0500 Windows: smb_ReceiveNTCreateX create smb_fid earlier smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now requires the smb_fid_t allocated fid value for use in share mode locking. Move the allocation of the smb_fid earlier in the function and apply necessary cleanup in error paths. Reviewed-on: http://gerrit.openafs.org/6004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839) Change-Id: I9399d8f16ee236b4724a0ec825fca1ce72f363ce Reviewed-on: http://gerrit.openafs.org/6806 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78e38ffb2ab56e0f7db732c92087b23842c6e46d Author: Jeffrey Altman Date: Sat Nov 12 13:41:30 2011 -0500 Windows: fix locking hierarchy in service The smb username lock and the daemon global lock can be requested while the scache dirlock is held if there are no free buffers and the service is forced to claw back extents from the redirector. Adjust the locking hierarchy accordingly. Reviewed-on: http://gerrit.openafs.org/6000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f) Change-Id: I74e87494c1360c61812908e3b4fb012829f71cf3 Reviewed-on: http://gerrit.openafs.org/6805 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cdec970530b720feafe3f79c255466bd13d13807 Author: Jeffrey Altman Date: Sat Sep 3 18:17:21 2011 -0400 Windows: log SMB or RDR in use at startup SMB only in 1.6 Reviewed-on: http://gerrit.openafs.org/5338 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b861e17c0bc34ea2042879bc705f5d26a7e0a77f) Change-Id: I67569c2d261a8afbbffbe7777e360139d25c73ca Reviewed-on: http://gerrit.openafs.org/6804 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9f90d49c5790dbb86a0ebc348288b4f66c8253f Author: Jeffrey Altman Date: Sun Oct 24 00:21:26 2010 -0400 Windows: Add version number to event log start pending message LICENSE MIT Reviewed-on: http://gerrit.openafs.org/3034 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b743b32b8b715edf673833a150f9f3d5a72b0b39) Change-Id: Id7fb16cc9b7d00cb0a880bbdad9dff7bfffff78b Reviewed-on: http://gerrit.openafs.org/6803 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 15f3a7ed4ef9cd47a291cca2ad877d1214c02eaf 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. Reviewed-on: http://gerrit.openafs.org/5316 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3d4e111dd6c4201476e7447fdfaa27ed630032c5) Change-Id: Ibc8b56d64aa843076b191afa42c4a3e93cf7a26f Reviewed-on: http://gerrit.openafs.org/6802 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91f98123ae7eb1a12b17a0b07d7a2f11066cfbff 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. Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9052974812e33d186613c31e318673f9268467c6) Change-Id: I60bc66440b548c3901914df8193c3999c3388abc Reviewed-on: http://gerrit.openafs.org/6801 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1f5f00810ab9cc48e3bc1a290253373b167f61bf 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. Reviewed-on: http://gerrit.openafs.org/5312 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 209d59a61ba9614a8b9d231d828f74a3e9bdaa27) Change-Id: I8f1b5b6431bad4413e7d81c95835ed852fbba16f Reviewed-on: http://gerrit.openafs.org/6800 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1630cabac0631bc47b21f11eecb376261a02756 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. Reviewed-on: http://gerrit.openafs.org/5304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c23b27a69322f4c9963a532d5cbcb136b23bb20c) Change-Id: Ie4546de582e0ffe9103f1bb01e05cf387265da49 Reviewed-on: http://gerrit.openafs.org/6799 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d3360cbbe6f5538abcac87ad279081aac8046d8a 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. Reviewed-on: http://gerrit.openafs.org/5302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b804e027f1a9d8dfaad3d348390a83493b53a6c7) Change-Id: Ic9c4f1550636555568e3c67b2bb5f9e772116e9f Reviewed-on: http://gerrit.openafs.org/6798 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 73ce89e84fe31635c02bb20b1abd3e77b4425e97 Author: Jeffrey Altman Date: Sun Aug 21 00:36:44 2011 -0400 Windows: cm_serverLock read required not write Reviewed-on: http://gerrit.openafs.org/5301 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bca64c70467afd00ca02290a4236bc295ec4633c) Change-Id: I9c0c04ce619f2f85ae821621f9468715ba7deefe Reviewed-on: http://gerrit.openafs.org/6797 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3abed6bdbbc08c8362a327fd6ede493a08798cc5 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. Reviewed-on: http://gerrit.openafs.org/5299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a576ff1e53a539e88b9f3fa6b8132d4f161b0bd4) Change-Id: I558c6989a2a8f4042129e2a60bcd340a7863222c Reviewed-on: http://gerrit.openafs.org/6796 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4078a389959d3aacb805e62edef0891db7e44306 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. Reviewed-on: http://gerrit.openafs.org/5296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 21acdd92c8510a9f99243588388a2a1078547533) Change-Id: I7f0bc97ca7c194624ac854558bbed6b93a13ce63 Reviewed-on: http://gerrit.openafs.org/6795 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36120d812be2a86a094135a9c37a460ec67d7035 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. Reviewed-on: http://gerrit.openafs.org/5160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e42d6fd18097d0c8d2e4b455d3c540743d7dbda) Change-Id: Ic8063144a5069736c95a57965a28d6a101749b3e Reviewed-on: http://gerrit.openafs.org/6794 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 344f7fc6087d1ecf0a76be300700b72122d14467 Author: Andrew Deason Date: Thu Feb 23 18:28:21 2012 -0600 Rewrite make_h_tree.pl in shell script The current usage of make_h_tree.pl adds a build requirement of /usr/bin/perl that we did not have prior to commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1. Do the same thing in a bourne shell script instead, so we don't need perl. Note that this is not as generalized as make_h_tree.pl, but it doesn't need to be. Specifically, this does not strip a leading ../ from found include directives (nothing in the tree that includes h/* files uses this), and header filenames containing whitespace almost certainly do not work correctly. The h => sys mapping is also much more hardcoded, but that's all we were using this for anyway. Reviewed-on: http://gerrit.openafs.org/6790 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb03b1380f82a6bdc8a78ad92069da38b4e98c26) Change-Id: If6bfedea0b563dce6135fbf2f4554ee602ee822c Reviewed-on: http://gerrit.openafs.org/6793 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bea2a94610335939d6ef869489ce5bd19d1a11da Author: Andrew Deason Date: Tue Feb 21 15:28:08 2012 -0600 salvager: Do not abort on large volume IDs We have already checked that 'vid' is valid; no need to check if it is negative. Also change vid to be a VolumeId. This is partially cherry-picked from 0884e9d0fddf2be81abf6468209048331efa8a1e. The commit 4d691ae10903e01db4d6b24a4eb02da536cadf7c is comprised of changes from both ce5e263b488f8cb85662031ee08eea448dab2d27 and 0884e9d0fddf2be81abf6468209048331efa8a1e, but it missed a few things from 0884e9d0fddf2be81abf6468209048331efa8a1e. This commit brings in the rest of the changes from 0884e9d0fddf2be81abf6468209048331efa8a1e. Change-Id: I8e001bfe81128b2e2214b3b2fa83e4797374022b Reviewed-on: http://gerrit.openafs.org/6778 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8a0bc72693cf7e735539f10e55b292f59ca0ad6f Author: Derrick Brashear Date: Wed Feb 22 15:57:46 2012 -0500 libafs: retry retriable RPCs instead of abandoning if we get e.g. an idle dead error we should retry retriable actions, namely data stores. in order for writing files to work correctly given how the writeback code is structured it's important that this not interfere with analyze's shouldRetry decision on those RPCs Reviewed-on: http://gerrit.openafs.org/6749 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 75a3dabe66a9fbc232b05e2f744ad5b867e18262) Change-Id: I9c611eeb9a71298e9725268392cdf94074324bf1 Reviewed-on: http://gerrit.openafs.org/6777 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fcdd20e389282607616b23f912a22ff5c352ce70 Author: Derrick Brashear Date: Sun Feb 12 22:45:59 2012 -0500 libafs: ensure one nat ping connection per srvAddr track the natping conn with the srvAddr, ensuring exactly one. Reviewed-on: http://gerrit.openafs.org/6706 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2378895fc66a19a050f302711f2e18dbbf2e3d6f) Change-Id: I5e74ec3f46f9af335653b6910d2c31c788181c5c Reviewed-on: http://gerrit.openafs.org/6772 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 3cc6da964e3705b070f8886686484d6a1eb700c8 Author: Marc Dionne Date: Mon Feb 20 17:56:29 2012 -0500 volser: Remove unused variable tid is now unused - remove it to avoid a warning. Reviewed-on: http://gerrit.openafs.org/6743 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fd19b39b151e3dddd18b4280252ac3e0fdf3964d) Change-Id: Ib402c84689d61baefed3b76138f7fac7c2b36de0 Reviewed-on: http://gerrit.openafs.org/6771 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit a498e1ff26fe01cc0a60474f76ff8fa32e0086ba Author: Andrew Deason Date: Fri Feb 17 17:12:46 2012 -0600 viced: Relax "h_TossStuff_r failed" warnings Currently, h_TossStuff_r bails out and logs a message if we detect that somebody grabbed a reference or locked the host while we tried to h_NBLock_r. The reasoning for this is that it is not legal for anyone to h_Hold_r a host that has HOSTDELETED set (but the error is detectable and recoverable); callers are supposed to check for HOSTDELETED and not hold a host in that case. However, HOSTDELETED may not be set when h_TossStuff_r is called, since we call it if either HOSTDELETED _or_ CLIENTDELETED are set. If CLIENTDELETED is set and HOSTDELETED is not, it's perfectly fine (and necessary) for callers to grab a reference to the host. So, if that's what is going on, don't log a message, since that's normal behavior. Check for HOSTDELETED before we h_NBLock_r, since it is technically possible (and legal) for someone to grab a reference to the host and somehow set HOSTDELETED while we wait for h_NBLock_r to return. Also log the flags when we see this message. Reviewed-on: http://gerrit.openafs.org/6733 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit fe4e52655ce7e5a8e5f6c23cde678fc66c3db490) Change-Id: Ic1b72c808aec158d99f088a3144e86adf969efcc Reviewed-on: http://gerrit.openafs.org/6770 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit d68f9d83429d2195d6b037c03411c855cbbc4695 Author: Andrew Deason Date: Fri Feb 17 16:24:16 2012 -0600 viced: Remove extraneous h_AHTAHT_r in h_GetHost_r We added this address to the host with an addInterfaceAddr_r call just a few lines before, which adds the host to the address hash table. Another call to h_AddHostToAddrHashTable_r is pure overhead and confusing. Reviewed-on: http://gerrit.openafs.org/6729 Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit f52c33ea10de8d1d07a9c4805366283e6ca635dc) Change-Id: Ib97718a42f9997a1fa257533296c62f3d618e1a7 Reviewed-on: http://gerrit.openafs.org/6769 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit dbaaa4c8f9cc1f2d8400b41a43009a0433544e0f Author: Andrew Deason Date: Fri Feb 17 15:46:50 2012 -0600 viced: Set h_GetHost_r probefail if MPAA_r fails Currently, in h_GetHost_r, if we get a connection whose address does not match an extant host, but the reported uuid does, we ProbeUuid the old host. If it fails, we call MultiProbeAlternateAddress_r and set 'probefail'. Later on, if 'probefail' is set, we always add the connection address to the host, and remove the host->host,host->port address from the host. However, this is not always correct. Consider the following situation. We have an existing host that has primary address 1.1.1.1, and also has addresses 1.1.1.2 and 1.1.1.3 on the interface list but not on the hash table. Say that host A stops responding on 1.1.1.1, and a connection comes in from 1.1.1.2. We ProbeUuid 1.1.1.1 and get a failure, so we call MultiProbeAlternateAddress_r. MultiProbeAlternateAddress_r probes via rx_Multi the addresses 1.1.1.2 and 1.1.1.3. Say that 1.1.1.3 responds first, and responds successfully, so MultiProbeAlternateAddress_r sets 1.1.1.3 to be the primary address for the host. After MultiProbeAlternateAddress_r returns, 'probefail' is set. A few lines down, we see that oldHost->host does not match haddr, and 'probefail' is set, so we add 1.1.1.2 to the interface list, and remove 1.1.1.3, and set 1.1.1.2 to be the primary address, even though 1.1.1.3 is the address we most recently 'know' is correct. To fix this, only set 'probefail' if MultiProbeAlternateAddress_r also fails after the failed ProbeUuid call. Conceptually this makes sense, since if MultiProbeAlternateAddress_r succeeds, it found an address that responds successfully to ProbeUuid, and it sets that address to be the primary address. Therefore, after MultiProbeAlternateAddress_r returns success, the situation is the same as if the 'good' address was already the primary address, and the ProbeUuid call succeeded, so 'probefail' should be cleared. Reviewed-on: http://gerrit.openafs.org/6728 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: BuildBot (cherry picked from commit 3c803580bb503c7650f7b138c1b3f2eafd92b985) Change-Id: I6554688447e7e62874e45a00a4c1faf957e29cb6 Reviewed-on: http://gerrit.openafs.org/6768 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit f44fb4f5f87968dac47d9a6c42eea3e41ee8405c Author: Andrew Deason Date: Fri Feb 17 13:14:31 2012 -0600 viced: Correctly update addrs on alt addr probe The functions MultiBreakCallBackAlternateAddress_r and MultiProbeAlternateAddress_r try to find a valid address in a host's interface list of addrs. If they find one, they update host->host and host->port. However, they do so just by changing those fields directly and by calling h_DeleteHostFromAddrHashTable_r and h_AddHostToAddrHashTable_r. This leaves the old host->host, host->port on the interface list, and leaves it marked as 'valid'. Similarly, the new host and port may still be marked as not 'valid'. This can result in the host being on the addr hash table via an address that is not on the host's interface list. After the above situation occurs, we may call removeInterfaceAddr_r(host, host->host, host->port); and then update host->host and host->port, which happens in a variety of places. Since host->host, host->port is not marked as valid in the interface list, it is not removed from the addr hash table, but it is removed from the interface list. Eventually, this can cause the host to be referenced from the addr hash table even after it has been freed. Since this can result in hash table entries pointing to the 'wrong' host, this can result in FileLog messages such as: Sun Feb 5 03:16:35 2012 Removing address that does not belong to host 0xdeadbeefdead (1.2.3.4:7001). And bogus instances of the message: Sun Feb 5 03:16:36 2012 CB: new identity for host 0xdeadbeefdead (1.2.3.4:7001), deleting(1 baadcafe 12345678-9abc-def0-12-34-456789abcdef fedcba98-76543210f-ed-cb-a9876543210f) To fix this, make MultiBreakCallBackAlternateAddress_r and MultiProbeAlternateAddress_r update the address list the same way as all of the code in host.c does; by adding the new address with addInterfaceAddr_r, removing it with removeInterfaceAddr_r, and updating host->host and host->port. Reviewed-on: http://gerrit.openafs.org/6727 Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7a6efc9bfcd955901d19274cc96f9a1b67f54f95) Change-Id: I3bf82f116bc2dd979e1e93cea58a4c74b0a2023d Reviewed-on: http://gerrit.openafs.org/6767 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit b6ec630bdab17f5505288565c52d07bdbe2e91e9 Author: Andrew Deason Date: Thu Feb 16 16:20:16 2012 -0600 viced: Delete dup host before probing old host Currently, when the fileserver gets a new connection from an address not on the addr hash table, we allocate a new host structure and add that host to the addr hash table. If we then find that that host's uuid matches the uuid of an extant host, we do the following: - probe the old host with the uuid, and MultiProbeAlternateAddress_r if the probe fails - mark the duplicate host as HOSTDELETED - manipulate the interface lists Consider, for example, that we have an extant host ('oldHost') with address 1.2.3.4:7001, but with 5.6.7.8:7001 on its alternate interface list. At some point, the 1.2.3.4:7001 interface goes away or becomes unreachable. A new connection comes in from that same host on 5.6.7.8:7001. What will happen is we create a new host for address 5.6.7.8:7001, and then detect the uuid collision. When we try to probe the old address of 1.2.3.4:7001, it will fail, and we will try to MultiProbeAlternateAddress_r. MultiProbeAlternateAddress_r will determine that the alternate address 5.6.7.8:7001 responds successfully to the probe, and it tries to set 5.6.7.8:7001 to be the primary address of 'oldHost', and add 'oldHost' to the addr hash table under 5.6.7.8:7001. But the "new" host from the incoming connection is already hashed on the address hash table under 5.6.7.8:7001, so the h_AddHostToAddrHashTable_r call in MultiProbeAlternateAddress_r fails. Since we later delete the new duplicate host, this results in 5.6.7.8:7001 being the primary address for the host, but that address is not anywhere in the address hash table. This behavior can be seen by the following pair of FileLog messages: Wed Feb 1 11:02:38 2012 CB: ProbeUuid for 0xdeadbeefdead (1.2.3.4:7001) failed -01 Wed Feb 1 11:02:38 2012 h_AddHostToAddrHashTable_r: refusing to hash host beefdead, baadcafe (5.6.7.8:7001) already hashed While those message do not necessarily indicate this problem, this problem will result in those messages. To fix this, mark the duplicate host as HOSTDELETED before we do any probing on 'oldHost'. This way, if MultiProbeAlternateAddress_r tries to add 'oldHost' to the addr hash table under 5.6.7.8:7001, it will be able to do so successfully, since the old duplicate host is deleted. Reviewed-on: http://gerrit.openafs.org/6726 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: BuildBot (cherry picked from commit 9754c4e15fb9073ed9f95d5d4242d311eb65d717) Change-Id: I35d41c91e496086377065f862021a5bb3fd221ef Reviewed-on: http://gerrit.openafs.org/6766 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 8b25f9cc99308ffcd2ee3f4d2bc7d58a85f2b96b Author: Derrick Brashear Date: Tue Dec 13 12:46:36 2011 -0500 vos: allow releases without offline time allow releases using dumps to clones to avoid offline time Reviewed-on: http://gerrit.openafs.org/6254 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 13a4f2b18bb84d05773529a794371d29f64570ab) Change-Id: Iec0f2d882dc2ac9a11ed4ca282cb2424db052803 Reviewed-on: http://gerrit.openafs.org/6765 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit f4e73067cdef990262c69c38ac98761620a63f25 Author: Derrick Brashear Date: Tue Dec 13 12:29:30 2011 -0500 vos: refactor code change vos to remove lots of duplicated code for volume deletes and clones Reviewed-on: http://gerrit.openafs.org/6253 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 8d618dceeefacbeb37c4ef3b1f9a8e80552311aa) Change-Id: I2c26dce796f93c8c993148a94d21dce8608e8c43 Reviewed-on: http://gerrit.openafs.org/6764 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 390d0108b37278772835205e1a9f632d9de8dfb5 Author: Andrew Deason Date: Mon Feb 13 14:11:36 2012 -0600 Rx: Avoid lastBusy/PEER_BUSY discrepancy If an rx call has the RX_CALL_PEER_BUSY flag set, but the call's conn->lastBusy is not set, we can easily cause an rx caller to loop infinitely. rx_NewCall will see that lastBusy for a call channel is not set, and will use that call channel, but rxi_CheckBusy will note that the call appears busy and that there are non-busy call channels on the same conn, and so will return RX_CALL_BUSY. This can currently happen in rxi_ResetCall, since we set RX_CALL_PEER_BUSY on the call again if the call had that flag set when rxi_ResetCall was called. If we are calling rxi_ResetCall with 'newcall' set, the passed in call is unrelated to the new call, since it was obtained from the free list. Thus, the busy-ness of the call should be ignored. Fix this by only paying attention to the incoming RX_CALL_PEER_BUSY flag if 'newcall' is not set. Also prevent this from happening by clearing RX_CALL_PEER_BUSY in rx_NewCall when we select a call and clear lastBusy for that call. Reviewed-on: http://gerrit.openafs.org/6707 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 2a4c6c3b9e1dc30d5599e67e02237a1aeef8a0f0) Change-Id: I60d76469bc3dcf764e67524f39b3c55894e7ce99 Reviewed-on: http://gerrit.openafs.org/6763 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 7a42c8f7ec6e6865a770c9bd7dbafa48947018a8 Author: Derrick Brashear Date: Tue Dec 13 12:00:52 2011 -0500 vol: allow clones of readonly volumes allow writing of data where it's not user data we're changing (e.g. allow a vnode to be marked cloned in the vnode index) Reviewed-on: http://gerrit.openafs.org/6251 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 4b93c42513785d1094c5336b5c9cc4add1b89c5e) Change-Id: I9849897ae69a426026f6d030ca4e50e8cd7066b2 Reviewed-on: http://gerrit.openafs.org/6762 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 27661857721e92f2ff99ebe7f3a72bac6f01fa50 Author: Derrick Brashear Date: Tue Dec 13 11:24:16 2011 -0500 volser: allow clonevol purge id to be new id effectively the same functionality that reclone already uses, but for some reason we artificially limit it out of clone despite the interface being there for it. it used to be there. put it back. Reviewed-on: http://gerrit.openafs.org/6250 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 641c67473615e80cfb8cf1e67636a82e42e5c899) Change-Id: I31df948a21639bd93c573c77207f0f6c9e43deed Reviewed-on: http://gerrit.openafs.org/6761 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 6b66b3b705b78c959b3ae321a8cb06e2fe166086 Author: Derrick Brashear Date: Tue Dec 13 11:22:38 2011 -0500 volser: allow cloning non-rw volumes remove EROFS error which is the only thing preventing a working clone on a non-RW. Reviewed-on: http://gerrit.openafs.org/6249 Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit f1de04f3b35e91923efddca57e744b2138619223) Change-Id: Ieb02a2d2c4d59681f5d6f372c7cd77a181d214dd Reviewed-on: http://gerrit.openafs.org/6760 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 94e836ede7aba4e6ae6ad7466d2d3c0a2fc69508 Author: Derrick Brashear Date: Mon Feb 13 16:11:19 2012 -0500 libafs: kill rxevent daemon even in upcall mode the switch from rxk listener env to upcall env could leave the event daemon running. fix that. Reviewed-on: http://gerrit.openafs.org/6713 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4d9fbaa8036cc78ae0119330314f6deab159c90) Change-Id: I2e87c692ee2003a24590f700accc30704899db8b Reviewed-on: http://gerrit.openafs.org/6759 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit d12024581eb26451df5cdc4d3a53c5d3decc1c8e Author: Ken Dreyer Date: Wed Feb 15 20:12:56 2012 -0700 doc: refer to aklog instead of klog klog (and kaserver) is deprecated. In generic examples, refer to the Kerberos 5 equivalents. Reviewed-on: http://gerrit.openafs.org/6721 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 07d9b18e36fff6fc96c629ac2bebe8bb43f6b9dd) Change-Id: I3e00b5d6acbdae35ac9ea645f094ebe46d391776 Reviewed-on: http://gerrit.openafs.org/6758 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 887cffa07e6097365d6ce425bbf4297b8f2d782d Author: Andrew Deason Date: Wed Feb 8 16:03:29 2012 -0600 RedHat: Fail openafs-client 'stop' on rmmod error Currently, the openafs-client RPM init script ignores any error reported by rmmod. If 'umount /afs' succeeds but rmmod does not, the client may panic the machine if the client is started again (from e.g. running the 'restart' init script method), since afsd will try to initialize AFS with a libafs that has been shut down. So, do not ignore errors from 'rmmod', and instead fail the 'stop' method from the init script if we get an error. Reviewed-on: http://gerrit.openafs.org/6709 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 12e2a3abe7ca640a7cef2630039c06964f779f17) Change-Id: I31256abac839c9011754445efa09960f061fdbb0 Reviewed-on: http://gerrit.openafs.org/6757 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 145ca8e5a724bfc2f30751f866c9dfe60e7fff7f Author: Jeffrey Altman Date: Sat Feb 11 22:14:23 2012 -0500 doc: fix AdminGuide The AdminGuide was broken by e99224f2fe049bc339e87c8b6c195de67dca2f08. Reviewed-on: http://gerrit.openafs.org/6703 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aaab21e7a123ce701a8d5b2144032739fe177d6f) Change-Id: I350186c617b3b39829c9af1ff6a4aa2835abbdc2 Reviewed-on: http://gerrit.openafs.org/6756 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba04fc58586a6ea43213f9808d5c58cc182ddd8b Author: Ken Dreyer Date: Thu Feb 9 17:37:01 2012 -0700 doc: add section on direct volume access Provide examples of the direct volume access syntax, using the fictitious example.com cell. Reviewed-on: http://gerrit.openafs.org/6691 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e99224f2fe049bc339e87c8b6c195de67dca2f08) Change-Id: I5b2ac3b6f255d5918eeea4a63d4c7bb6164961d5 Reviewed-on: http://gerrit.openafs.org/6755 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 26a22e65eabbb077f0d2d0c98017bbec5ce4c533 Author: Andrew Deason Date: Tue Dec 20 17:44:42 2011 -0500 viced: Keep H_LOCK while locking host in h_Alloc_r Currently in h_Alloc_r, we h_Lock_r the host, so we have it locked on return. However, h_Lock_r drops the host glock, which is bad in this situation since we have already added the host to the global hash table, so other threads may see it. This can mean that by the time h_Alloc_r returns, the returned host may have HOSTDELETED set, and/or the addresses associated with the host may be completely different. h_Alloc_r's caller, h_GetHost_r, seems to assume that the host is still associated with the address of the passed-in connection. When this is not true, this can result in the host structure getting into a strange state, such as the primary addr/port may not be hashed. The host may also have HOSTDELETED set, in which case we're not supposed to be dealing with it at all. To avoid these problems, lock host->lock directly in h_Alloc_r, without going through h_Lock_r and dropping H_LOCK. Also do it as one of the first things we do to initialize the host, just to make sure that if anybody else happens to see the host, it is locked by us when they do. Reviewed-on: http://gerrit.openafs.org/6389 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d6f977830c164ee079c68101595c28ff1847f88f) Change-Id: Ib0916f3a92c4a34555ee3fa2880dec10041bf047 Reviewed-on: http://gerrit.openafs.org/6754 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3edb993a8dd92ea7edb0fb13c7d5391604e9cdc1 Author: Marc Dionne Date: Sun Jan 22 09:45:22 2012 -0500 viced: Allow null host for BreakCallBack For replication writes at the remote site, we will want to call this without a host structure. Reviewed-on: http://gerrit.openafs.org/6674 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 01301d0a5323a836efaae30cac325c25f6a7577a) Change-Id: I1fb0dff655515fedd7dfb41139f1fb6c85599377 Reviewed-on: http://gerrit.openafs.org/6753 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c0184656b65ee53f29fa0d4b62ec789de4d96e79 Author: Tom Keiser Date: Wed Feb 1 03:31:23 2012 -0500 com_err: correctly deal with lack of libintl On machines lacking a libintl, _intlize() currently fails to initialize the output error string--leading to tools (e.g., translate_et) returning a null string; make afs_com_err fall back to returning the en/US canonical error text when we don't have any i18n support... Reviewed-on: http://gerrit.openafs.org/6638 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ef63547e955edc60e2d074ef825b091e1c43882e) Change-Id: Id138e48826aa855bd87e47f201ed6840399aa640 Reviewed-on: http://gerrit.openafs.org/6752 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e0e23418bb5569683a3afbba68ae718f060ad00b Author: Christof Hanke Date: Sun Jan 29 18:08:57 2012 +0100 linux: fix probing for noop_fsync Commit 267934d0e6910c8d8166a6e78f93c1bab40857b8 introduced probing code to deal with the renameing of simple_fsync inside the linux-kernel. This test does not take different parameter-lists for noop_fsync or simple_fsync resp. into account. Fix this. Reviewed-on: http://gerrit.openafs.org/6628 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 20e82cecd9008f9b3467c9a323c5c3abf27f3021) Change-Id: I478a1ea15150ca120c8f85e9696d8bdedfc974d1 Reviewed-on: http://gerrit.openafs.org/6751 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4e1813248e233b7cbae6fb8eecd03efe3d86e191 Author: Jeffrey Altman Date: Mon Feb 20 01:40:03 2012 -0500 viced: lockcount only valid if not expired locks are issued on a lease. If the lock is expired, the lock count is zero. Reviewed-on: http://gerrit.openafs.org/6740 Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4603057d99a1501275f14f6d5aba089364785e09) Change-Id: I784bdccae6d5fb01c76590ccd34fb9efa417747e Reviewed-on: http://gerrit.openafs.org/6750 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0329984e299a239186c6e2252f3a1171fc64db72 Author: Andrew Deason Date: Mon Feb 6 13:23:41 2012 -0600 Disable kernel opt by default on Solaris 10 and 11 With newer Solaris Studio (sometime in the 12.* series), cc started adding SSE instructions to optimized x86 code, which is invalid for kernel code and can generate panics. There appears to be no way to turn this off currently (-xvector=%none is non-functional), so default to not optimizing kernel code. Reviewed-on: http://gerrit.openafs.org/6671 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 80592c53cbb0bce782eb39a5e64860786654be9f) Change-Id: If1539dd88d4d28771a7eafcdaff30a75cb230917 Reviewed-on: http://gerrit.openafs.org/6683 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 72d2ef7fa25a09c8f71b57c4969549eff20ce69e Author: Andrew Deason Date: Thu Feb 2 17:35:52 2012 -0600 SOLARIS: Use kcred instead of afs_osi_cred For many vfs ops to the cache, we currently pass &afs_osi_cred for our credentials, which is a mostly zeroed-out credential structure. In some modern versions of Solaris (Solaris 11), at least some parts of this structure need to not be NULL (cr_zone), or we will panic. The Solaris kernel provides a 'kcred' credentials structure for the purpose of using "kernel" credentials for i/o. So just use that instead for Solaris 8 and beyond, since kcred has existed at least since Solaris 8. Reviewed-on: http://gerrit.openafs.org/6669 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dc6beb3ea29a64bcf59807fd451a573aa54e1122) Change-Id: I6fd0ce4a890c2e6d9377cad39f47303aa1687a6b Reviewed-on: http://gerrit.openafs.org/6682 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f0e648bfa30958f47f1e7bbe656ebe0f4556a52a Author: Andrew Deason Date: Thu Dec 22 15:48:49 2011 -0500 afs: Panic on afs_conn refcount imbalance An undercounted afs_conn can easily cause a panic and/or memory corruption later on, since we put an rx_connection reference with each afs_conn reference. Panic as soon as we detect this, as this indicates a serious bug. Reviewed-on: http://gerrit.openafs.org/6413 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8a574ba16a80fc2b8b703ddcfc99486b977e6071) Change-Id: Ibd60dafdf1a800349b73754dae18666fa0edd300 Reviewed-on: http://gerrit.openafs.org/6642 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bd5acb7f79f9b3b1ab03521e0a90a13137863ca3 Author: Michael Meffie Date: Wed Dec 14 12:52:51 2011 -0500 Unix CM: reset blacklist on hard-mount retry Reset black-listed servers on a request when retrying due to a hard-mount retry. When hard-mounts are in effect, a request may retry indefinitely. If all the servers have been black-listed due to a transient error, the request may never complete. Reviewed-on: http://gerrit.openafs.org/6330 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit faa58c9f60a158481bdfee27e175a37c5fcd64aa) Change-Id: I1ecc3fa78c064c46849dec47c77f2fc405f2ee7f Reviewed-on: http://gerrit.openafs.org/6641 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Derrick Brashear commit b49edd57c1040ddfa479d94b202979ae81e0c86f Author: Jonathan Billings Date: Wed Feb 1 16:26:13 2012 +0000 Linux: rpm: Update openafs.spec.in to include changes to installed files Pull up some more of 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149 to handle changes that have made it into 1.6 since the last pullup: * 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. Reviewed-on: http://gerrit.openafs.org/4814 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149) Change-Id: Ib702f39d930057d92eca4d157fddb633cccf9fae Reviewed-on: http://gerrit.openafs.org/6640 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1bbb4cdb55d3f62e3db281b7424ba22a887aac3f Author: Andrew Deason Date: Thu Nov 10 15:18:41 2011 -0600 SOLARIS: Do not build x86 kernel module on 5.11 Oracle Solaris 11 no longer supports x86 (amd64 is required). If we try to build the x86 module, /usr/include/sys/kobj.h complains that the ISA is unsupported, and refuses to go on. So, just remove MODLOAD32 from the libafs directories to build on sunx86_511. Reviewed-on: http://gerrit.openafs.org/5835 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c6a22d67ff9787ace2249d528eb9db99c5b19427) Change-Id: I00f9f19653a2f98276c236d7e2331bc81f7c4f13 Reviewed-on: http://gerrit.openafs.org/6643 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b9faf2ecb1fa7fc6045c46d472569674fa53e5cb Author: Derrick Brashear Date: Mon Jan 23 14:39:05 2012 -0500 make openafs 1.6.1pre2 prerelease for 1.6.1 Change-Id: I3dbef9e4d360314cd4c789268d7b0d5c5011f6fc Reviewed-on: http://gerrit.openafs.org/6614 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 88afb6b0b1bb6c9bf817af462742bd7e14cacf86 Author: Derrick Brashear Date: Thu Jan 5 17:19:45 2012 -0500 viced: disable rx keepalives during disk io when we are going to hit the backend storage, disable keepalives. the net effect of this is that no idle dead time is needed; instead, the normal dead time will result in a connection with no activity simply dying naturally if i/o blocks forever. it's important that keepalives be enabled during callback breaks, so that is done. (cherry picked from commit 05f3a0d1e0359f604cc6162708f3f381eabcd1d7) Reviewed-on: http://gerrit.openafs.org/6515 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Change-Id: If2ee7f3ad7f2dc835dd350bb9558fde0aa179240 Reviewed-on: http://gerrit.openafs.org/6613 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b872544d0fa3a812d5f95b8cc720b6f1e5677c8 Author: Jeffrey Altman Date: Mon Nov 28 12:58:02 2011 -0500 rx: RX_CALL_IDLE and RX_CALL_BUSY Allocate new Rx error codes for Idle and Busy calls but do not send these errors on the wire. They are only intended for local use. RX_CALL_IDLE is an indication to an application that requests it that the rx peer is maintaining an open call channel but has not sent any actual data for the length of the registered idle dead timeout. RX_CALL_BUSY is an indication to an application that requests it that the rx peer believes the selected call channel is in use by a pre-existing call. When either RX_CALL_IDLE or RX_CALL_BUSY are assigned as the call error and an abort must be sent to the rx peer, the errors are translated to RX_CALL_TIMEOUT. This is necessary because it is not possible to add new Rx error values in a method that is safe for peers that are not expecting them. This patchset also documents which Rx errors defined in rx.h are used on the wire and which are not. The Unix and Windows cache managers are updated to build with these new error codes. eviewed-on: http://gerrit.openafs.org/6128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c7673f4fad8e8b9390564e3cbfa11d5f1b52ba2f) Change-Id: I4c7d6733ddae03bda5a31fe4486ada090dcfd0b3 Reviewed-on: http://gerrit.openafs.org/6612 Reviewed-by: Derrick Brashear commit afce83a96799220f661e090fb5fcc7fe42f75797 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. (cherry picked from commit eddcee3ad518dff9fbfda790640c5bfd2e97ef5a) Reviewed-on: http://gerrit.openafs.org/4159 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I3938e79ab009f14f5421a4a45e2a099276c49f24 Reviewed-on: http://gerrit.openafs.org/6611 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 05fb2529771d8f2230d384de1974b41c5ac57175 Author: Derrick Brashear Date: Thu Jan 12 16:48:54 2012 -0500 libafs: add replicated connection pool keep pool of connections to use for replicated volumes, so we can have a separate idle time setting (cherry picked from commit cd1f72649650404581cfcdcf3beeeaf2bb960bd6) Reviewed-on: http://gerrit.openafs.org/6546 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I056ba28d11313c9925df63869e0c55a1a4f132da Reviewed-on: http://gerrit.openafs.org/6610 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 428400fb831f7b4673973a0d2842ff536b7952c0 Author: Andrew Deason Date: Fri Jan 13 13:43:16 2012 -0500 vol: remove SYNC fatal_error processing Currently SYNC clients will "disable" themselves on certain error patterns. For example, if the server end closes its file descriptor too many times, or takes too long and then closes the fd, the SYNC client will return an error and set fatal_error. On any subsequent SYNC requests, the request will immediately fail without contacting the server, often making SYNC client programs effectively useless until they are restarted. There isn't really any reason to cause future requests to fail. Transient problems in the fileserver can easily make this situation possible (e.g. a fileserver can crash but still take several minutes to close the SYNC fd while the core is written to disk), and so while we may return an error for a specific problematic request, future requests may be fine. So, just remove everything related to fatal_error, so future SYNC requests can continue to be attempted. Adjust some log messages to reflect the new behavior. Reviewed-on: http://gerrit.openafs.org/6548 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 40bf6dee2409197f7494c3d09bf2dea7c248d185) Change-Id: I0f7a1792afd1ace3beabe238107d0a5069ccbb44 Reviewed-on: http://gerrit.openafs.org/6609 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 339438c8473110bebdd31b23706e2e387560723f Author: Marc Dionne Date: Tue Jan 17 20:19:54 2012 -0500 rx: Correctly test for end of call queue The intention of this condition is to check if the current call being considered is the last one on the queue, but the test is incorrect. A null next pointer indicates a removed item, not the end of the queue. Use the queue_IsLast macro instead to correctly determine that this is the last item in the queue and that a call has to be selected, either the current one or a previously seen good choice. This can cause calls to get permanently stuck in the call queue and never get assigned to a thread, even when all threads are idle. Reviewed-on: http://gerrit.openafs.org/6564 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 6ad3d646e62801cb81a3c9efeac320daa44936e1) Change-Id: Ic9d0ff51c79115960ebb4634fc35a5e9da21c380 Reviewed-on: http://gerrit.openafs.org/6570 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 39f051191189857c79b1f4c23eb509ce94d6271e Author: Marc Dionne Date: Wed Jan 18 10:25:03 2012 -0500 Linux: use standard macro for set_nlink configure test A generic macro exists to test for functions in the kernel, use it for set_nlink. Reviewed-on: http://gerrit.openafs.org/6566 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 64bd0b728ca95ba7bb4f1fdd909386fde3ce81e1) Change-Id: I93d169bec8f476d5e692f7f5a7fe31002af7ce1e Reviewed-on: http://gerrit.openafs.org/6569 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e6ddb2a18857e1e1509d910e46c4b6959e2df789 Author: Andrew Deason Date: Wed Jan 11 10:00:35 2012 -0500 vol: Fix VCreateVolume special inode cleanup In order to dec the relevant special inodes, we need to know the parent vol id in addition to the vol id itself. Use the appropriate volume IDs when IH_DEC'ing special inodes after we fail to create the volume, so we don't leave behind special inodes. (cherry picked from commit 627cfb1d4e7b32b4342c59b162a36ba9beb8a066) Reviewed-on: http://gerrit.openafs.org/6529 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I9f40f170cd6a0fffe2e17fc199af99e087066902 Reviewed-on: http://gerrit.openafs.org/6550 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60efe6b9330d98000bd9105d63815703db0d95a7 Author: Andrew Deason Date: Wed Jan 11 10:28:56 2012 -0500 DAFS: Fix SYNC_FAILED VScheduleSalvage_r log SYNC_FAILED is not an unknown protocol code, so stop saying it is. Reviewed-on: http://gerrit.openafs.org/6530 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fda2fe8538e00baddcd7fcf2c669162634b9d14e) Change-Id: Ibd70b9f95031baf4955d503d7eb8b5f3a50febf7 Reviewed-on: http://gerrit.openafs.org/6549 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5a9fa5d08753056dc24241e3e768852ed6f71f35 Author: Derrick Brashear Date: Fri Jan 6 06:53:46 2012 -0500 rx: add and export a public keepalive toggle make enabling and disabling keepalives a public function. export the function (cherry picked from commit 2a31f35936698c504c863702ebb675ac9dfe47e1) Reviewed-on: http://gerrit.openafs.org/6517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Change-Id: If7bd2b72980dd92771614a6d73a04441222a8314 Reviewed-on: http://gerrit.openafs.org/6522 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 946fee039b82a0f9bbae0c13206dcd43285456c0 Author: Derrick Brashear Date: Fri Jan 6 06:33:22 2012 -0500 afs: put back conn if not using in checkserver loop we get a conn, check it for eligibility, and if not, just abandon it. "oops" (cherry picked from commit 26fc0cda94c24a1c5f0bef109bca920456c25265) Change-Id: I8e4f762b5170f07d6abc3508e88f001ca147c3a7 Reviewed-on: http://gerrit.openafs.org/6521 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 873ac9cc9412d4e2a8631ea27c80c67ba6de9f51 Author: Andrew Deason Date: Sun Jan 8 11:31:39 2012 -0500 Make libjafs buildable again libjafs is surprisingly close to being buildable. Fix a few misc things which have bitrotted over the years so it is possible to actually build: - Add -I$SRC/config to the cflags, so we can include afsconfig.h - Remove references to the nonexistant rxkstats.o - Do not link with UAFS' AFS_component_version_number.o, since this gives us duplicate version number symbols - Include afs_vosAdmin.h in Group.c, to satisfy some missing symbols Reviewed-on: http://gerrit.openafs.org/6524 Reviewed-by: Steven Jenkins Tested-by: Steven Jenkins Reviewed-by: Derrick Brashear (cherry picked from commit 967d7201ee5c27db6d75d5efafcad9458e2b5167) Change-Id: I0cb510e3f115c2c35f06cf9cbddaf31835704eea Reviewed-on: http://gerrit.openafs.org/6527 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 57a45a64bb5b97c68de2d786b5803def24315f51 Author: Marc Dionne Date: Fri Jan 6 17:22:35 2012 -0500 libuafs: only rebuild h directory when needed A few changes to allow a "make all ; sudo make install ; make all..." workflow to work without manually removing files in between. Make the rebuilding of the h directory dependent on the source files scanned to build it. This prevents it from being rebuilt for every "make install". While we're here, use -f when removing linktest for the clean target. This allows "make clean" to remove it without prompting when the user doesn't have write access to the file, as is the case when make install rebuilds it as root. Reviewed-on: http://gerrit.openafs.org/6519 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 2caf0778ddeb6eeb854360cac20c6b3f0894f3eb) Change-Id: Id4ccad953669538072b834a6aa49b8beaeeeed35 Reviewed-on: http://gerrit.openafs.org/6526 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3d4c44b61d035f9249a341d29cd93948f3ea3ec3 Author: Derrick Brashear Date: Wed Jan 4 15:04:41 2012 -0500 afs: discard cached state when we are unsure of validity in the event we got a network error, we don't know if the server completed (or will complete) our operation. we can assume nothing. a more complicated version of this could attempt to verify that the state is what we expect it to be, but in extended callbacks universe this is potentially easier to solve anyway. for now, return the error to the caller, and mark the vcache unstat'd. (cherry picked from commit c2fc7e0f66621fc97f5b4dc389d379260638315c) Change-Id: Ic38cf16e47664e6f36ad614735b42d3f4e5a6ce2 Reviewed-on: http://gerrit.openafs.org/6520 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6479bb29d494077f31d0ddc3d165164b302b2e3f Author: Andrew Deason Date: Fri Nov 18 10:25:08 2011 -0600 DAFS: Atomically re-hash vnode in VGetFreeVnode_r VGetFreeVnode_r pulls a vnode off of the vnode LRU, and removes the vnode from the vnode hash table. In DAFS, we may drop the volume glock immediately afterwards in order to close the ihandle for the old vnode structure. While we have the glock dropped, another thread may try to VLookupVnode for the new vnode we are creating, find that it is not hashed, and call VGetFreeVnode_r itself. This can result in two threads having two separate copies of the same vnode, which bypasses any mutual exclusion ensured by per-vnode locks, since they will lock their own version of the vnode. This can result in a variety of different problems where two threads try to write to the same vnode at the same time. One example is calling CopyOnWrite on the same file in parallel, which can cause link undercounts, writes to the wrong vnode tag, and other CoW-related errors. To prevent all this, make VGetFreeVnode_r atomically remove the old vnode structure from the relevant hashes, and add it to the new hashes before dropping the glock. This ensures that any other thread trying to load the same vnode will see the new vnode in the hash table, though it will not yet be valid until the vnode is loaded. Note that this only solves this race for DAFS. For non-DAFS, the vol glock is held over the ihandle close, so this race does not exist. The comments around the callers of VGetFreeVnode_r indicate that similar extant races exist here for non-DAFS, but they are unsolvable without significant DAFS-like changes to the vnode package. Reviewed-on: http://gerrit.openafs.org/6385 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8e15e16c9e6a5768f31976cc21b48d5bb10617b7) Change-Id: I915d18c4252b698f39fdf65793311a39381096b4 Reviewed-on: http://gerrit.openafs.org/6495 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 70fe8ec10943e0ef56b60880064b30ed7804071d Author: Andrew Deason Date: Mon Dec 26 21:22:08 2011 -0500 afs: Grab a reference to setp in afs_icl_Event4 We can drop GLOCK in several places in afs_icl_Event4 and the afs_icl_AppendRecord callee. To ensure that the given afs_icl_set does not get freed while we have GLOCK dropped, grab a reference to the set. Thanks to Ryan C. Underwood for reporting an issue triggered by this. Reviewed-on: http://gerrit.openafs.org/6431 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7461fa11939556d3b6f3ea38da7ff65607805579) Change-Id: I7a33cf96d2031dd1798f7598918396eb8fbde611 Reviewed-on: http://gerrit.openafs.org/6494 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa6aeb61066b9b67fd9418f49cdacba9d074538e 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. Reviewed-on: http://gerrit.openafs.org/5237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 130144850c6d05bc69e06257a5d7219eb98697d8) Change-Id: I8726efdd7123e9a1e0e4536bf2766c441964475d Reviewed-on: http://gerrit.openafs.org/6386 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c137d248809e7f48471d0315e25a43545f5c08d2 Author: Derrick Brashear Date: Tue Jan 3 15:57:14 2012 -0500 afs: increase idledead time it's actually important this be more than the rx call dead time so timing out server callbacks to clients don't result in us idle deading a call to the server when callbacks need to be broken FIXES 130327 Reviewed-on: http://gerrit.openafs.org/6497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0f4da13137612a9b0c0c3b57aa939d6661fb67f8) Change-Id: I181d89c36175be93ed59226b401d48903fb5f584 Reviewed-on: http://gerrit.openafs.org/6518 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit babc991c0196a1c04e94fca934d2de63f37c6144 Author: Geoffrey Thomas Date: Sat Dec 31 19:51:29 2011 -0500 linux: fsync on a directory should return 0, not EINVAL Directory writes are synchronous, so this is fine. There's a mostly-convenient function in fs/libfs.c that returns 0 that we can use to do what we want ("mostly" because it was renamed in 2.6.35). FIXES 130425 Reviewed-on: http://gerrit.openafs.org/6491 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 267934d0e6910c8d8166a6e78f93c1bab40857b8) Change-Id: Iaeb8a699673b6144c186b470f6d877fb54f1e319 Reviewed-on: http://gerrit.openafs.org/6493 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 31b0156bbf2369e4388243d2c2a09cd00e6041a6 Author: Geoffrey Thomas Date: Sun Dec 11 05:06:24 2011 -0500 rpm: Don't attempt to restart on upgrade when using systemd systemd is actually rather capable of leaving the OpenAFS client in an incredibly broken state, thanks to its willingness to track services and kill their processes. We should not attempt to restart the client on upgrade, whether a normal upgrade or a migration from SysV initscripts. In the former case, it's fine (and correct) for the old AFS to keep running; in the latter case, the unit file is capable of correctly shutting down an initscript-launched client. The same is true for the OpenAFS server. This brings the packaging in line with the SysV initscript code in the specfile, which does not attempt to restart the service, as well as with e.g. Debian's packaging, which uses --no-restart-on-upgrade. While we're here, clean up a redundant BuildRequires on systemd-units. Reviewed-on: http://gerrit.openafs.org/6247 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dee93ff1d114da711df345e06b5e1a682c877315) Change-Id: I4ecf3b2f307a81549e0bd568ab5e4585a2ef1f2d Reviewed-on: http://gerrit.openafs.org/6492 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3e6c1df2f60e1349f34c81ea54e1622fb6f5dd9d 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. Reviewed-on: http://gerrit.openafs.org/4829 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f091ace32e3045da396d577055dafd67888ff7ea) Change-Id: Ia098730c3e83429ce4f886b1427159d13eff4c4e Reviewed-on: http://gerrit.openafs.org/6414 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit eb4bee410a7d9c098dac8cdfa9695ff77983fa87 Author: Andrew Deason Date: Mon Dec 19 17:11:31 2011 -0500 Include afsconfig.h before anything else afsconfig.h can define various preprocessor symbols that can affect how system headers behave. For example, the presence of the _POSIX_PTHREAD_SEMANTICS symbol changes the number of arguments to getpwnam_r on at least Solaris 8. So, we must include afsconfig.h before including anything else, to ensure consistency. FIXES 130413 Reviewed-on: http://gerrit.openafs.org/6387 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 37f537a21db6d560dd16a53ff5e0d2f0456d4c48) Change-Id: I64970fd06af9a13d91acaf03b80a2baf224754ff Reviewed-on: http://gerrit.openafs.org/6388 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6908f7d93a6d8d24ad574054eb8f2aa722894e3c Author: Andrew Deason Date: Sun Dec 18 15:20:42 2011 -0600 aklog: Add replacement setenv/unsetenv aklog makes use of the setenv and unsetenv functions, which do not exist (at least) on HP-UX earlier than around 11i v3, and do not exist on Solaris earlier than Solaris 10. Add replacement functions for setenv and unsetenv when they are not present. Note that these implementations are copied from libroken, and setenv was modified to not use asprintf. This is 1.6-specific. On the master branch, libroken takes care of these for us. On the master branch, setenv and unsetenv from libroken were added in 70e8451acd0426024c152073e53bc6606e0189e1. Change-Id: I35546f1add7f4f87c6ffc484059057825887499f Reviewed-on: http://gerrit.openafs.org/6376 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 965b0139e6e8e3180a90fc7509f9f16da5f79d93 Author: Derrick Brashear Date: Fri Nov 4 16:29:17 2011 -0400 make openafs 1.6.1pre1 prerelease for 1.6.1 Change-Id: Ia54b5c304791ebfc33b7043af9ea3688442e4b81 Reviewed-on: http://gerrit.openafs.org/5809 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f8818eb569d1da05a157f31bbcc927e028372a33 Author: Andrew Deason Date: Wed Dec 14 14:42:08 2011 -0600 afs: Clear VHardMount on ResetVolumeInfo afs_Analyze sets VHardMount on a volume struct when a hard-mount scenario is encountered, and clears it after sleeping. However, if the volume struct has VRecheck set, or if it's not in memory, afs_Analyze cannot retrieve the volume struct in order to clear VHardMount again. For the VRecheck case, this can results in VHardMount never getting cleared, and so hard-mount messages for the volume seem to disappear. So, clear VHardMount when we set VRecheck so this does not occur. For the case where the volume struct is not in memory, this is not a problem, since when we allocate a volume struct again, the VHardMount state will not be retained. Reviewed-on: http://gerrit.openafs.org/6335 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit f469be407789e696c0b9e9a431b4879798a00e2a) Change-Id: If13769445f20336dfba9755f3af0a1499ce16a6d Reviewed-on: http://gerrit.openafs.org/6348 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09fe35b1f3adfd08aa74377d291a4acd638d247b 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. Reviewed-on: http://gerrit.openafs.org/5060 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 530b5ecac51cc7ce61ccddd50868c632c4a47298) Change-Id: I566aa3d411ff100ccc6afa9a5273fb84e6172dd0 Reviewed-on: http://gerrit.openafs.org/6347 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7ebaf1aa6ad316417e1980465f90a91629c1eae6 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. Reviewed-on: http://gerrit.openafs.org/5059 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 6cae7c554e917a26b197167e177bd3eb22bce71a) Change-Id: I0a282dac3a9e31bff4ff37c61275cc7c08456cad Reviewed-on: http://gerrit.openafs.org/6346 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8ca56700a8c3835bc735f34e8e82476e7a4c0792 Author: Andrew Deason Date: Wed May 4 12:34:20 2011 -0500 libafs: Avoid using changing unixuser ticket data PSetTokens was afs_osi_Alloc'ing after afs_osi_Free'ing the previous token data. This can sleep, causing tu->stp to be pointing to garbage while we wait to alloc. Additionally, rxkad_NewClientSecurityObject can sleep while waiting to alloc memory, and so the given tu->stp pointer given to it by afs_ConnBySA may be invalid by the time it actually uses the data. To fix this, we could implement unixuser locking to ensure mutual exclusion of these events. However, this implements a more conservative change for the 1.4 and 1.6 branches. In PSetTokens we alloc the new memory before we change anything, and in afs_ConnBySA we make copies of the ticket data before giving it to rxkad. With these changes, the glock gives us enough serialization to avoid issues with tu->stp changing underneath us. This change is specific to 1.4 and 1.6. On the master branch, this issue is fixed by implementing unixuser locks in change Idd66d72f716b7e7dc08faa31ae43e9a23639bae3. Reviewed-on: http://gerrit.openafs.org/4649 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1465946bb6863430bf0efebd024d394549a8775f) Change-Id: Icab5176bf685c408447f0f32ad65c5b003299d3d Reviewed-on: http://gerrit.openafs.org/6345 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ef65c2e0822c99591afa2ec08d4c38673bf8c6cc 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. Reviewed-on: http://gerrit.openafs.org/4554 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5cd4282758317b24d2f63408ab4c62551bbebc03) Change-Id: I94b22a31884dc9b184ec094e5cca4b6b0098cb15 Reviewed-on: http://gerrit.openafs.org/6295 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit fe2d1b6615a43ad6ba3e0df50e3643b7a9476131 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 Reviewed-on: http://gerrit.openafs.org/4487 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3ea39166d64d2e66cddef015734c2f91548423af) Change-Id: I16179a1c8b9d0e53c90b54733d1c5130f1d23153 Reviewed-on: http://gerrit.openafs.org/6293 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 71d5f66e8679e4c9c67cfe41411b696f5f72733b 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). Reviewed-on: http://gerrit.openafs.org/4494 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1105d63ddf5a32b9381ff47e8101c3f141366fa6) Change-Id: Iec0fa5bc9673bdce616611f422d74e55b0aa90f1 Reviewed-on: http://gerrit.openafs.org/6292 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4bdded24ec69ed08336fbba041b9a449ce5b01be Author: Andrew Deason Date: Mon Sep 19 11:05:59 2011 -0400 ntohs ubik header size The 'size' field in the ubik header is only 16-bits wide, so we should be using ntohs to read it, not ntohl. The database checking utilities for the prdb and kadb were still using ntohl (vldb was fixed by 591f9b6de9ab3dc5c17ad41af0241527f7f04b31). Reviewed-on: http://gerrit.openafs.org/5466 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e69714739f64475d71633fd4cb3523bc1ae143bb) Change-Id: Id4f677cddcedba3008d349bcf9740168129f8496 Reviewed-on: http://gerrit.openafs.org/6314 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1aaf64bac4e37811b40f7f75d524e4e7de8f82e5 Author: Michael Meffie Date: Fri Sep 16 11:23:18 2011 -0400 solaris: libafs depends on fs/ufs The solaris afs module depends on symbols exported by fs/ufs. Set this dependency in the afs module so the kernel loader will automatically load the fs/ufs driver if is not already loaded, such on zfs only systems. Reviewed-on: http://gerrit.openafs.org/5456 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0cb10104f5af73614e6b7673d3711ddbc3f3a866) Change-Id: Ifcb5e2725bbd2de44218109aac9c20439dadf41e Reviewed-on: http://gerrit.openafs.org/6315 Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 49da70a86e836d4307aae7b5682d8bf6f49ed63e Author: Derrick Brashear Date: Tue Dec 13 12:19:48 2011 -0500 vos: fix code to not triple-negate !!! is !. just write it that way. Reviewed-on: http://gerrit.openafs.org/6252 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 44045af35a6ae44880655115685e0755d6a0c828) Change-Id: I646387f30c178ad512decd507925408183f83894 Reviewed-on: http://gerrit.openafs.org/6329 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e9def7311e36284b83e1a9a015cfb841fa0b2511 Author: Michael Meffie Date: Mon Nov 21 19:12:56 2011 -0500 vol: log error reason on header read failure Log the error reason instead of just VSALVAGE when ReadHeader() fails. Reviewed-on: http://gerrit.openafs.org/6108 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 0d0a8288c1cdd05bbf5717ac45638cf6760ee7a8) Change-Id: Ie49c9ee3ea23873f8d71c80fda45b763bcd8e466 Reviewed-on: http://gerrit.openafs.org/6328 Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 759a0e07cbf16a6789db5479217d8c981dde0b3f Author: Derrick Brashear Date: Tue Dec 13 23:49:38 2011 -0500 libafs: disable mtu discovery we need to rework this to use lack of soft acks instead of this method, which is too fragile Reviewed-on: http://gerrit.openafs.org/6256 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4d76b19b600aad461ee1231eeadb9b7a27b7f117) Change-Id: Iba3f3d9d475959f99759db9e81c05c300aa6cd02 Reviewed-on: http://gerrit.openafs.org/6327 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3eb9ce53de4536144484900cfa811ded5080ec0b Author: Derrick Brashear Date: Tue Dec 13 23:20:01 2011 -0500 libafs: only do pings for default conn with root uid instead of doing it for potentially every unauth user, just do it for root. Reviewed-on: http://gerrit.openafs.org/6255 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 78885611ac8aa6602a4a1f42379c9d78ef226100) Change-Id: Id54f6608b8807289242d094f48e394f0341782da Reviewed-on: http://gerrit.openafs.org/6326 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4b251f18a7af2868e2353131a3dbc6d73065e9f4 Author: Andrew Deason Date: Fri Dec 2 14:36:59 2011 -0600 salvager: Create link table with volume group id The link table needs to be created with the VG id or RW vol id, not the non-RW vol id. Unlike other special inodes, this goes for both the 'parent' and 'volume' volume ids, not just the 'parent' id, since there is only one link table per VG. Without this, the salvager can generate invalid linktable special inodes if it encounters a VG with no inodes for the RW vol. Reviewed-on: http://gerrit.openafs.org/6179 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ae227049fca2519e1f5ae1e8b68efbff10ebb665) Change-Id: Ia8089cae6cb5ab97ef9d4ea306f3c48bead59914 Reviewed-on: http://gerrit.openafs.org/6325 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 903e78e1a27ecc309246f7130112d4e145bb047f Author: Andrew Deason Date: Wed Nov 30 17:41:53 2011 -0600 DAFS: Ensure logging on attach2 errors The attach2 error path transitions a volume to VOL_STATE_ERROR, in case whatever got us to that error path did not already put the volume in an appropriate state. Log when we do this, to make sure we do not end up with a volume in VOL_STATE_ERROR state silently. Reviewed-on: http://gerrit.openafs.org/6168 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 53230846a202a50f6c3a61b38d62ccba8876f89d) Change-Id: I4dbe5c6f8be8820620e7a68c7f42b426211dbb82 Reviewed-on: http://gerrit.openafs.org/6324 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4868585c2e7bf2aeddef025aa3378ed4cf8efcfd Author: Andrew Deason Date: Wed Nov 30 17:35:56 2011 -0600 DAFS: Avoid unnecessary preattach on FSYNC_VOL_ON FSYNC_VOL_ON/FSYNC_VOL_ATTACH can be called to "online" a volume that was actually kept online for the duration of the volume operation. Avoid calling VPreAttachVolumeByVp_r for such a volume if it's already attached, in order to avoid an unnecessary log message and to save a tiny bit of processing. Reviewed-on: http://gerrit.openafs.org/6167 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5d2d00a47cf53054bd18d7404be26bea34cba6f) Change-Id: I2a7f4b214176570e787978dbe0aa2eb8dc57730f Reviewed-on: http://gerrit.openafs.org/6323 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c5f26e035b09c3bd8352f7b435b6ab3470e047c8 Author: Andrew Deason Date: Wed Nov 30 17:21:32 2011 -0600 DAFS: Log more for VPreAttachVolumeByVp odd states When we encounter "odd" states in VPreAttachVolumeByVp_r, say what the actual state we encountered was, along with the attach flags, so we have a better idea of what's going on. Reviewed-on: http://gerrit.openafs.org/6166 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4fd8347e842af61681c1718e456500b92c5b6ea9) Change-Id: If1c6fdba7b097a4bfb9e8e3e972ee56dee43bf2d Reviewed-on: http://gerrit.openafs.org/6322 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3669fd56d39075104fc683cd0627e044ac3d32d5 Author: Andrew Deason Date: Wed Nov 30 17:08:57 2011 -0600 DAFS: Ensure GetVolume errors on ERROR volumes In GetVolume, after we call VAttachVolumeByVp_r, there is no explicit check to see if vp is in VOL_STATE_ERROR state. Make sure we don't try to use such a volume, or blindly transition the volume away from that state. Reviewed-on: http://gerrit.openafs.org/6165 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f59312c0aee1a5376b29262efc6e6ea71264305a) Change-Id: Ibdd5cb5c475409918cdad1e73e2d7ed4ef57bd13 Reviewed-on: http://gerrit.openafs.org/6321 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 012e9e26b8877b00c32c401d1ee7b980dc494849 Author: Andrew Deason Date: Wed Nov 30 14:36:06 2011 -0600 DAFS: Do not transition to ERROR on trivial errors attach2 can result in many different errors; some indicate that the volume is in an inconsistent state, but many others just indicate that the volume cannot be attached for benign reasons (such as VNOVOL if the volume doesn't exist, or VOFFLINE if the volume is being used by a volume utility). Currently, for DAFS, attach2 transitions the relevant volume to the VOL_STATE_ERROR state for almost all errors encountered, even the benign ones. Instead, skip the error state transition for error handling paths that do not reflect a "broken" volume. Reviewed-on: http://gerrit.openafs.org/6164 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5fc2365f5dff7f193781093ecb886b4c7391d5a3) Change-Id: Ia3d732781c98fcda4db7b41cd744db860781594f Reviewed-on: http://gerrit.openafs.org/6320 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8b75b8c44cd46bf88ff66620bb92113a7dd9620f Author: Andrew Deason Date: Thu Dec 1 11:20:41 2011 -0600 SOLARIS: Define BSD_COMP for non-UKERNEL on 5.11 We were defining BSD_COMP twice for UKERNEL. Move one of the #define's up to the !UKERNEL section. Reviewed-on: http://gerrit.openafs.org/6162 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0ee7fcc0a49494ad66778012b7808f80ee3af8d3) Change-Id: I683e1be2141c0cecac3f60ac4928d3e84a96bef8 Reviewed-on: http://gerrit.openafs.org/6319 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 240149f529b54c8586d9e20f145f7c4e9b99603c Author: Andrew Deason Date: Tue Nov 15 11:53:12 2011 -0600 vlserver: Avoid atoi for vol ids Reviewed-on: http://gerrit.openafs.org/6050 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d113c0eb8ac4717cafd7747a78c5aa3b649b8e68) Change-Id: If965a7442262048048be9eca3e643c01d7b5c277 Reviewed-on: http://gerrit.openafs.org/6318 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8cc7308aaa9467d8847fb53f2c0e42a29828fd14 Author: Marc Dionne Date: Sat Oct 22 09:32:33 2011 -0400 cache bypass: don't define iovecp for UKERNEL iovecp is defined but not used for UKERNEL. Define it conditionally to avoid gcc warnings and --enable-checking failure. Reviewed-on: http://gerrit.openafs.org/5650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 547d94edd3affb5f377cd1b3db39c46ca0cf5aec) Change-Id: I700b82173b5c2435a716aaf10541e1583f2655f5 Reviewed-on: http://gerrit.openafs.org/6316 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e07057bbde8e8c84cb78bc4f3bb22025b06735cd Author: Derrick Brashear Date: Thu Sep 15 13:48:31 2011 -0400 rx: arrange for Finalize to really stop running calls previously rxi_ServerProc would happily error a call once rx_tranquil was set, but keep calling ExecuteRequest. Reorder code so kernel shutdown attempts are processed first; then arrange if we are tranquil to not process the call further. Issue discovered by Chaskiel Grundman. Reviewed-on: http://gerrit.openafs.org/5447 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6196abf3c864f8cc6ab1efc6e5625a5cc68158bd) Change-Id: I00fad117ee8386fc29cd2423aa9fb7d89af55160 Reviewed-on: http://gerrit.openafs.org/6313 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f10ee6b52252c8e2663da0ec8786b88e570d3f32 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 Reviewed-on: http://gerrit.openafs.org/5393 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e) Change-Id: I47b0e24a0cbbd8402d5dd902e7e2af59ca1c30b7 Reviewed-on: http://gerrit.openafs.org/6312 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 44597ff4ce39001c7d19f8497f4fc0786d19d660 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. Reviewed-on: http://gerrit.openafs.org/5328 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit c3e82ee98bf66058636f11d7a98d3bebe3bac955) Change-Id: I89911d2da314059db633c00c69c9c9ec2050bb86 Reviewed-on: http://gerrit.openafs.org/6311 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 05f3dcdbbfc8abf3eda113b940072d6667d223d3 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. Reviewed-on: http://gerrit.openafs.org/5317 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0f4dfaed6b25ae4282298cc2ba4908ce9f36f043) Change-Id: Icd0d5b368ccc679967e14b2460f47c814598c797 Reviewed-on: http://gerrit.openafs.org/6310 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b18653de7ae90491c2e75f4a98410581655d776c 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. Reviewed-on: http://gerrit.openafs.org/5303 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 16dff61e148ce6893a68dda6e05e84f96fa753ac) Change-Id: I7ca73fe9cf76e9a47cdccfc6cf0e9188fce9f5a6 Reviewed-on: http://gerrit.openafs.org/6309 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f2bf60ed4f1323cd6f74f2f01114f7e4f714db53 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)) Reviewed-on: http://gerrit.openafs.org/5294 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 12fa5b859b857aaf0ab6975ebac0d4867d0ae0ff) Change-Id: Ifee367fef4da44bcfd92cea6d26612977d6653a1 Reviewed-on: http://gerrit.openafs.org/6308 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7c442bdb290abb30f7a39183cca9b20b088bb73e 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. Reviewed-on: http://gerrit.openafs.org/5310 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 33bb5218ba8d6c5b5c5c4839fd31824ca90c062b) Change-Id: I91a8a02638cadf6f55814763b16cc50d3c7334c5 Reviewed-on: http://gerrit.openafs.org/6307 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a951c459f7f5a3838be2d07ea08999f0e555f6c5 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. Reviewed-on: http://gerrit.openafs.org/5307 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 6d79cfb36165c33dd1fd9c4d7ca8436d9a78f7ff) Change-Id: If9e74f6120b007368128aead8787d715a1b1f093 Reviewed-on: http://gerrit.openafs.org/6306 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2e0c077c8faebc261e73cb03a1e37007c161bf0e 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. Reviewed-on: http://gerrit.openafs.org/5309 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit fa97579a08cdf23fcff3c50a5845d72a785feeaf) Change-Id: I282913fead10791751ebaf3c7c6b33e3fbd9a1f7 Reviewed-on: http://gerrit.openafs.org/6305 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7e1d685f579ec5d83ac713835d173b99b9b072f 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.) Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5165 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 34cc26a1b11bc8cf8f91996a019ac4b7d21dccd8) Change-Id: I70e08b61fbc33857da88224a0577330a0d68d9a7 Reviewed-on: http://gerrit.openafs.org/6304 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0ea8851076d9255c537b42bc2ecc5a1f241d260d 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. Reviewed-on: http://gerrit.openafs.org/4825 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b1f0bb472e237f5a6f88449db44f030c08a5a324) Change-Id: Id12f6190eac15593dd32fd46db354e169d19dc2f Reviewed-on: http://gerrit.openafs.org/6303 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5fb00398ef02bf453195a0bc50f5df95788557c7 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. Reviewed-on: http://gerrit.openafs.org/4756 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b6add117ad210665a811213fe17a30fabbda3a3c) Change-Id: Ic3ae8f506e87d18fdc121ff21221f61c359e38aa Reviewed-on: http://gerrit.openafs.org/6302 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 81d44944794748ff3211158d3a1c0c9746100b8e 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. Reviewed-on: http://gerrit.openafs.org/4691 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ababc1ba4412ae94b29f8ba0832eac087a024af2) Change-Id: I371a983078c12e09474051ba71f63cdeb57c3631 Reviewed-on: http://gerrit.openafs.org/6301 Reviewed-by: Michael Meffie Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b9c7f07cb2b8c34e0af97a2b6969848a1cbf75a4 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. Reviewed-on: http://gerrit.openafs.org/4666 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4a82c0cc4167b729108813965bd39bf86ea15e6b) Change-Id: Ic10e85b925176719c6c5dc708a1d1a315409d295 Reviewed-on: http://gerrit.openafs.org/6300 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9d4f34bd084eaae203e061e6896c423e1c4c9f38 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. Reviewed-on: http://gerrit.openafs.org/4669 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ef0ac2fbb026385f2306189230c2cff8706dff06) Change-Id: I3d7c2ca8a514d50c01d4830640e806cefac32af1 Reviewed-on: http://gerrit.openafs.org/6299 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a5521b6b70ab197259bd048c1d39eaef962f383c 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. Reviewed-on: http://gerrit.openafs.org/4668 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6df5547a7b93af74bc49ec8d4678aafd646dda1b) Change-Id: I795407a143a56f26c0679b929763ebdc9c633e7a Reviewed-on: http://gerrit.openafs.org/6298 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 580a9a5b84fc4f69087201e3fe7f94a5f97bf75c 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. Reviewed-on: http://gerrit.openafs.org/4582 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b2c6a850738437256626e0dfe743a09224879ad4) Change-Id: I5e3a12ee79847a915edeec732946b43270a35697 Reviewed-on: http://gerrit.openafs.org/6296 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1a3668c1bdc2e5944b88b314956430994f1668e5 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. Reviewed-on: http://gerrit.openafs.org/4553 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 94a9b2afd82b6729ddceb7ef736ddeb039e0ae1b) Change-Id: I3171babfbdf29e7aa543a17f7dd543deedc9b30c Reviewed-on: http://gerrit.openafs.org/6294 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e068045157d83312587d16c1600d8c7a0a93e2f9 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. Reviewed-on: http://gerrit.openafs.org/4470 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 78d1f8d88334f711eaaf6555d3a962a504d3e80e) Change-Id: I831fa52c238a6cf7ef211e8198815c4420ae7dce Reviewed-on: http://gerrit.openafs.org/6291 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5bef5346c23583ece8308163d85522d15f714475 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. Reviewed-on: http://gerrit.openafs.org/4469 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fbb4c6115b9af9c52ee06fa9c979a3f4195ad342) Change-Id: I9a8bccba7b6ecbce393ea149270e5c61ebadd05c Reviewed-on: http://gerrit.openafs.org/6290 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 307a791f9595ede26f815e6a01925d25c958dab8 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. Reviewed-on: http://gerrit.openafs.org/4468 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7d4fbd36a120b16caaddcd9d1c7f550cb14aae5) Change-Id: I2ce885da5018b250052852cb70c70eaecd521cc5 Reviewed-on: http://gerrit.openafs.org/6289 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit c785ce1f8f001ec1a6794cdf25c8d490d8f2faa4 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 Reviewed-on: http://gerrit.openafs.org/4473 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f4776f0a4d51472ee6f2406174b074c03213f7da) Change-Id: I7b362e0e0d1ac5f028718b522e56101f2bed297e Reviewed-on: http://gerrit.openafs.org/6288 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit eb70cf7096b724a9249ca6412657d3152ac2d87b 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. Reviewed-on: http://gerrit.openafs.org/4452 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit de0c72bf7c7d284f4d15d99c79b39e0c97f1a122) Change-Id: Id6f86368386a5e113a00aa0a496649d69875d283 Reviewed-on: http://gerrit.openafs.org/6286 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 29d4935b074a7f8d46dbe23835321365af2229de 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. Reviewed-on: http://gerrit.openafs.org/4444 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 399655e3df3bf30d7878dec70402fc0021cae752) Change-Id: Icbc934bfe59f6468771f37e5721341dae49ba460 Reviewed-on: http://gerrit.openafs.org/6285 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8e0c333c59533b5fd5484d11d6203087b6865eb3 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). Reviewed-on: http://gerrit.openafs.org/4445 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 316b0421a27a4a76298f60ecd62b1236c971e512) Change-Id: I432abb4d65a738e0e1936a7ff2fff2eccf45834a Reviewed-on: http://gerrit.openafs.org/6284 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 96ee498f82153285eb463623bb37ec7d625c10af 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. Reviewed-on: http://gerrit.openafs.org/4442 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 325443e6178f9dcdba7326bdb675447ac72bd540) Change-Id: I9832fad8a43278c5eb618e4148c71f8a9ef81e87 Reviewed-on: http://gerrit.openafs.org/6283 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a9ee7f8f821f73ba0a1dd6a8fd8ed4abc8ef9040 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. Reviewed-on: http://gerrit.openafs.org/4441 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 0b510fe30afb34202342364e96bd9030052e1567) Change-Id: I24eb4d4b1f758f33e3517671cb576ff23e641fb3 Reviewed-on: http://gerrit.openafs.org/6282 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 346c3571be944ad9a1823d9582a98d97385f633c 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) Reviewed-on: http://gerrit.openafs.org/4419 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 353857e7685c9acfcf7474fabe57c928c70c778f) Change-Id: I4a5b85ffc56a801e19a181f8d2661eba9c975dcc Reviewed-on: http://gerrit.openafs.org/6281 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 855615dc32d42d1577b3b27f00be43995610db07 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. Reviewed-on: http://gerrit.openafs.org/4398 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a0389f5592c25afb19befb5bf62833a0b0bc59cc) Change-Id: I6105eff9f4cfae56d85df40589bd4b175aa760d0 Reviewed-on: http://gerrit.openafs.org/6280 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 538e6bdab3e1f70f612a96beaf89db0b3cc86938 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. Reviewed-on: http://gerrit.openafs.org/4397 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ef105dcc4932da804750dea0c922d5814fc5bf15) Change-Id: If4e430a55d36725f2cf8e5bf04a036062480cfac Reviewed-on: http://gerrit.openafs.org/6279 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3262f111028093ed31da3fe9e3ed7efcc0e8b769 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. Reviewed-on: http://gerrit.openafs.org/4389 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f5f0ce525a63264098cd0625769d642fe6f106ba) Change-Id: Ia94487f35ad0fc3143faafd2fa12a6c71d40f116 Reviewed-on: http://gerrit.openafs.org/6278 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8c74ddc6c7658acdc827069a64e9b7a05cfe1bf5 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. Reviewed-on: http://gerrit.openafs.org/4148 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d69da816c6e961ef5e22df289ad5667cd8568b4c) Change-Id: I1f128f676a6d099b2d9534e28c6302de78b0ff2d Reviewed-on: http://gerrit.openafs.org/6273 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a86d857adbf9b517c58a2770f93f7f1767f5e01 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. Reviewed-on: http://gerrit.openafs.org/3363 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e4059c1b812410bd96481cc60c86c67f8733b66f) Change-Id: Ic1d6286bb148f202b8da010edf48fff93a5a48fb Reviewed-on: http://gerrit.openafs.org/6268 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit cd69fb1401bc7d9803fb26c7b5e9256efa0167d4 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. Reviewed-on: http://gerrit.openafs.org/4377 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 920a00e075b679f59e31b9fcbe7f5db15e345a95) Change-Id: Iae4035bc952b66f88843d51ff341b0576f15163d Reviewed-on: http://gerrit.openafs.org/6276 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d69d96588ba1068b9ace1156f00e6c26a145e089 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. Reviewed-on: http://gerrit.openafs.org/4294 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 22149d82d465f5defbe329b3f9b3c5040a6293e9) Change-Id: I7fb56f0af99bb040e64cf54bf05e01306a609326 Reviewed-on: http://gerrit.openafs.org/6275 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36b6dca36572953f2718c163e1ebbbf52a6e0dbe 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. Reviewed-on: http://gerrit.openafs.org/4229 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 4a72ebfe324874dd405d18561baf5eaacb007950) Change-Id: I9e625f79c047b61fc3675e6732eaa7d2dd34214f Reviewed-on: http://gerrit.openafs.org/6274 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4190a3aad98457e317c14dcf455ed1b62e129042 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. Reviewed-on: http://gerrit.openafs.org/3636 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 336256c7a0e7d54495a070895c9d8c2057168839) Change-Id: I5985316ea37f572039267ea117dfeae55ea96bc0 Reviewed-on: http://gerrit.openafs.org/6271 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1c329c8f1ea9fc8ef4b360b019c601c1136e41b 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. Reviewed-on: http://gerrit.openafs.org/3588 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit affc978be7ba3c36c9b7a6a94fb5e907beebed99) Change-Id: If871ce0cdd3593250f22d74de184f92b046b5f6e Reviewed-on: http://gerrit.openafs.org/6270 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 64e79bd6b88147f95d99ee8240d50995658b8340 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. Reviewed-on: http://gerrit.openafs.org/3433 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 2ce159fbf474b96ecd2a4224751d4655230bba51) Change-Id: Idb91c2bb1a10b60d125dccbc98731ace63d4add8 Reviewed-on: http://gerrit.openafs.org/6269 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 303b6fd682abaa0affd15a4ddd7d5b6b11f620bc 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. Reviewed-on: http://gerrit.openafs.org/3305 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 5c77a6ca2460c3e79125a614037824db35480905) Change-Id: I23d7af2dd07e02255783de0523fce58dbe46d31e Reviewed-on: http://gerrit.openafs.org/6267 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d23bbae9df78ecd98d0af2580cefe8c5bdd12c4 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. Reviewed-on: http://gerrit.openafs.org/3215 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 33409b2c849d7fae3b10b3202bb15e338ae5b982) Change-Id: Ib50a17b3479453bbbaef571711ede7115b17318e Reviewed-on: http://gerrit.openafs.org/6265 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c57b5a419292d16e662f5ab6c5422b8475e8d139 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. Reviewed-on: http://gerrit.openafs.org/3214 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit db6ee95864a8fc5f33b7e95c19c8ff5058d37e92) Change-Id: I6c7b3a0b9fe174ebffeb03153dda1c4705d7dac5 Reviewed-on: http://gerrit.openafs.org/6264 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 59797ad4fedbf5499141bc01a3f1829730bffea2 Author: Simon Wilkinson Date: Sat Sep 11 12:51:52 2010 +0100 rx: Call rxgen_consts.h by its proper name rxgen_consts.h is actually in the afs/ directory. Include it from their, rather than requiring that every user have $(TOP_INCDIR)/afs in their search path. Reviewed-on: http://gerrit.openafs.org/2750 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 34df5da39871ae5231048a416f191784c5c2d127) Change-Id: I915cf9d975efbb7c73c1e57750227421362648c8 Reviewed-on: http://gerrit.openafs.org/6263 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d4fbfcd4380d3b9997d941efc568074a841a907 Author: Andrew Deason Date: Fri Sep 10 11:17:40 2010 -0500 udebug: Always show tidCounter If the queried site doesn't have an active write transaction, currently udebug doesn't show the tidCounter. The tidCounter can still be useful to know (especially since some sites will become buggy when tidCounter rolls over), so always show it. This adds the "The last trans I handled was" message to udebug. Reviewed-on: http://gerrit.openafs.org/2730 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 51806bd21af5bcc70c27cda5787ae853fa3f495e) Change-Id: I861804c4381a75626c5259a4896642f0e4064b7d Reviewed-on: http://gerrit.openafs.org/6262 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a8674bee13aafb508c1c03fa17db13526ecd075f Author: Ken Dreyer Date: Mon Oct 31 08:27:16 2011 -0600 doc: limitations of addsite on different partitions A user on the openafs-info mailing list noted that the Admin Guide is unclear about creating read-only replicas on different partitions on the same fileserver. Clarify the rules here. Reviewed-on: http://gerrit.openafs.org/5745 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit c59c07132ef17589ad3466ded418c1370539b7af) Change-Id: I68898c21e2c1aa7d6828b475dff4c1cb6d14327c Reviewed-on: http://gerrit.openafs.org/6317 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6dc27f1e25879262bbef6eb25dc81f22e5069865 Author: Andrew Deason Date: Thu May 20 15:22:11 2010 -0500 ubik: add interface for reading during write locks Add ubik_BeginTransReadAnyWrite, which allows for reading from the database, even while there is a conflicting ubik write lock. Reads are still blocked while the local database is updating due to a write transaction commit. Reviewed-on: http://gerrit.openafs.org/2592 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fd7f7469bdbde24320c3ac8b4f7015d495b47bff) Change-Id: I46cf35beeea6dc997976ea2c33e45c1a5f4904df Reviewed-on: http://gerrit.openafs.org/6261 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 355a5dd65b2f3954833e060d83ceeb6db661c576 Author: Andrew Deason Date: Tue Jun 22 14:36:42 2010 -0500 ubik: Fix buffers for reading-during-writes If we are reading while a write transaction is in progress, we can encounter a buffer that is dirty if we're on the same site as the writer. Ignore these buffers for readers, since they contain uncommitted changes. Then, when the writer commits, invalidate the resultant duplicate buffer, if one exists. Reviewed-on: http://gerrit.openafs.org/2231 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 570236dd55e79e8886b45f19cef59ec3fa9d53f6) Change-Id: If83e077b99a77339377a36f1d1bac9182ef26e4f Reviewed-on: http://gerrit.openafs.org/6260 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a4a5e8baf50f9e550bfa7ba0b8f7229a7f7fa7a2 Author: Andrew Deason Date: Tue Jun 22 13:24:27 2010 -0500 ubik: Abstract buffer matching and pass trans ptrs Abstract the code for matching buffers in DRead, and pass around ubik_trans pointers instead of ubik_dbase pointers. This changes no behavior, but makes changing ubik buffer code a bit easier. Reviewed-on: http://gerrit.openafs.org/2230 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5c7297a6c76777aec6209aa191b067ddc73b1a87) Change-Id: I6cc673d965b5e06361fff8ea259ba552446e3213 Reviewed-on: http://gerrit.openafs.org/6259 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7c37f71c287e99aa256dd1a40833f1bb1d10b629 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 Reviewed-on: http://gerrit.openafs.org/4387 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 841c8022e3978fffe1357f339d948e93c9db9d52) Change-Id: Ibe2dde067df1fe22da1bb09039d07ebbc178af08 Reviewed-on: http://gerrit.openafs.org/6277 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f66b4e59b89e1bcd42634f214c30f06c0caf6b7b 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. Reviewed-on: http://gerrit.openafs.org/4457 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5ded9afa1764016977a17ef9346dc979bf70ca0) Change-Id: I66bea4923717a6b7df5fbefa1dd93d469d96be3c Reviewed-on: http://gerrit.openafs.org/6287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9433b1b651ded596a897d81a4276e925dea3bb5e 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. Reviewed-on: http://gerrit.openafs.org/4485 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 24ddd06a0dc19ad7c0b2a2847d41a5ea69665b15) Change-Id: Ib5f7463b75ee8d58ecc6b725f629fd7600c64792 Reviewed-on: http://gerrit.openafs.org/6297 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 62815307269a63dfc13fbdc5faa1933620d6ab6e Author: Jeffrey Altman Date: Sun Dec 4 23:15:13 2011 -0500 afs: prevent nat pings on destroyed connections If the connection is no longer in use, reset the nat keep alive timer to 0 seconds. Reviewed-on: http://gerrit.openafs.org/6230 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7a93c827f353e2ad695d8019ab789b02a3596f2e) Change-Id: I019bdce7a8f9f0123786b46d0563f42f7b26c14b Reviewed-on: http://gerrit.openafs.org/6232 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 196895f58b086110db3f020e36fb029e14fc619b Author: Ben Kaduk Date: Sat Dec 3 14:37:09 2011 -0500 FBSD: switch afsi_SetServerIPRank implementation Upstream has removed the ia_net{,mask} elements from struct in_ifaddr, so we can no longer use them directly. Switch to passing an rx_ifaddr_t (i.e. struct ifaddr*) in instead, as that uses a slightly different codepath which still works for our purposes. We compile the kernel module with -Werror, so storing a pointer (memcpy return value) in an int is forbidden, hence the conditional declaration of 't'. Reviewed-on: http://gerrit.openafs.org/6203 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1ef8dc3dfbddcbe5610c276afc627c9fcfe30a65) Change-Id: Icb338331c879dc4cbd69ae565b115de000e8d3d0 Reviewed-on: http://gerrit.openafs.org/6235 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2ad4d31d40683e6e603b117043e154f0db97c3c8 Author: Ben Kaduk Date: Sun Nov 13 13:12:50 2011 -0500 FBSD: cleanup dvp locking for ISDOTDOT This is a more correct version of c2ed2577f9c16df3088158fb593d7aab6e8690d0, which was reverted since it caused build issues on some versions and kernel panics on others. We do want to always unlock dvp before calling over the network in the ISDOTDOT case, but be sure to use the proper spelling for this operation (as the syntax has changed between FreeBSD versions). This requires not unlocking dvp right after the afs_lookup() call if it succeeds, letting us just lock the "child" vp (which is actually the parent starting from '/') first, and then re-lock dvp. The error case of afs_lookup() was already handled correctly in this logic, which is to say that it was incorrect before this change, attempting to recursively lock dvp which causes a panic. Reviewed-on: http://gerrit.openafs.org/6127 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8e14168c9c77850ce0603d56f8aa280f73cb3114) Change-Id: I2d929875a9b008f0aa0b64bce7971932691d9956 Reviewed-on: http://gerrit.openafs.org/6234 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c515e30b2b9b74feb15c58c298c41c435493626a Author: Ben Kaduk Date: Sun Oct 23 11:22:07 2011 -0400 FBSD: typo fix Gerrit/5572 added conditionals on __FreeBSD_version >= 900044, which is (approximately) when a bunch of kernel API renames happened. (There has since been a dedicated version bump to 900045 a month or two post-facto, but 900044 should be fine for now.) However, 900044 is not 90004. Reviewed-on: http://gerrit.openafs.org/5657 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ca8ba7e7a41e61cc943b34196872b72a190432e3) Change-Id: Ibacd6d037590df0696b8dab8107d36bca470785a Reviewed-on: http://gerrit.openafs.org/6233 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e05bc3b5cd50354bcade3c38c0ec97713b148c8 Author: Derrick Brashear Date: Wed Nov 30 16:20:23 2011 -0500 remove CopyOnWrite2 and unused vars unused static functions make grumpy compilers grumpy. (cherry picked from commit 7a6cf450babea4e706392cb8ad83586fa7f8e558) Change-Id: Ib40be2b9458ca799ba2b808ed86a627c40cf6ec4 Reviewed-on: http://gerrit.openafs.org/6161 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c73b66447cb84cf1f07775b9f93b745050e4972c Author: Derrick Brashear Date: Sun Nov 27 11:23:29 2011 -0500 viced: disable accelerated copyonwrite don't do multistage CoW FIXES 130295 (cherry picked from commit 97540f78aa333feefe9f567ee71695c1d6451f5c) Change-Id: I1cd9d54ec9202aa4a11828cd443622413f195687 Reviewed-on: http://gerrit.openafs.org/6160 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8160e462821d718df0bd00f1642dbc1bc9bc7a8 Author: Simon Wilkinson Date: Wed Nov 23 16:30:55 2011 +0000 Unix CM: Fix PutVolume in afs_BlackListOnce It isn't safe to keep accessing a structure once we have Put our reference to it. Reviewed-on: http://gerrit.openafs.org/6117 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2373547a86c12f72261072971b8d47e6b7cdd4e6) Change-Id: I013b5d6ecf7705745ab16c8736f32ca7750b933b Reviewed-on: http://gerrit.openafs.org/6124 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d52f1a5038b66ca5dc82d71541701ebb794cbc0b Author: Andrew Deason Date: Tue Nov 15 13:18:48 2011 -0600 afs: Leave cellnum alone for explicit mtpt cell When a mountpoint is given an explicit cell, don't alter cellnum. Cellnum represents the cell for the parent, and is used for determining whether or not we're crossing a cell boundary. Previously, this code forced the mount point to always be treated as foreign (for a mountpoint prefixed with a cell name), or to always be treated as local (for a mountpoint prefixed with a cell number). Reviewed-on: http://gerrit.openafs.org/6051 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e14dec55e6600edb60ce5184b4ab1f646c68947b) Change-Id: I8d2b378a95533aabd65e7121000ce34238d728b7 Reviewed-on: http://gerrit.openafs.org/6123 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9865698ee0d81d371b8846a1145a46f691de8388 Author: Derrick Brashear Date: Sun Nov 6 16:28:27 2011 -0500 dafs: avoid null deref getting volume header we don't assign hd before dereferencing. stop dereferencing and just use the queue cursor. Reviewed-on: http://gerrit.openafs.org/5814 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 00beae8c4e3b390637f20584e676cf86c817dadd) Change-Id: Iec2dbbf84e4f08f02998c9e998d2ea899ce48a5d Reviewed-on: http://gerrit.openafs.org/6122 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fbf2f3cbabe04f5420dd0ec5ed87b7139e2d7673 Author: Edward Z. Yang Date: Sat Nov 26 19:32:51 2011 -0500 Linux: 3: Update specfile to know about 3.* kernels. Update spec file to be consistent with acinclude.m4 with regards to sysnames. We don't bother updating the code inside the legacy kernel build section, as it doesn't get triggered for 3.* kernels (it should probably get cleaned up at some point.) Also, fix a bug in error message printing of unrecognized kernel. Signed-off-by: Edward Z. Yang Reviewed-on: http://gerrit.openafs.org/6120 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0f9214164ad56bfe74d0f2cec8775a312f5128dd) Change-Id: Ie414751cf01c44a73bf9eaef67c593cced2680d9 Reviewed-on: http://gerrit.openafs.org/6121 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 032736bc052d3fb1a1d4f033a47e844d7f4ea05a Author: Marc Dionne Date: Mon Nov 21 21:27:06 2011 -0500 Linux: make sure backing_dev_info is zeroed The afs backing_dev_info structure is allocated dynamically without zeroing out the contents. In particular there's no guarantee that congested_fn is NULL, causing spurious oopses when bdi_congested in the kernel tries to call it. (adapted from commit 8e97cf6f215d5575c63d86eaec59031399f4beda) Change-Id: I83755b6bb5ec2fada7e077c00d3d8edf8af1cae4 Reviewed-on: http://gerrit.openafs.org/6104 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 364fad6fa5bcaaac938f31eb67b1e1d0190cba7e 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. Reviewed-on: http://gerrit.openafs.org/5332 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit cbaefa266d433af3b9a082a360e23a42f161d80f) Change-Id: Idb6770204b014c62a8611548509240f8b5f950bc Reviewed-on: http://gerrit.openafs.org/6098 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 737a2802e9207fb53f598ef88c0ce1f9ad27a348 Author: Anders Kaseorg Date: Sun Nov 20 19:00:00 2011 -0500 Linux: 3.2: Use set_nlink to update i_nlink As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent direct modification. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/6096 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f1dd2d696fb9ab71b4192b156042e0c63019c58a) Change-Id: I685aa6e8638e8fe864f1a6a7e428dfb6839ebcea Reviewed-on: http://gerrit.openafs.org/6099 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7f55b45ed708204c09b144fd8d1e3b71d08fcb66 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. Reviewed-on: http://gerrit.openafs.org/5335 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit def00ae8ba774f4d7290c29208484dda756dc0e0) Change-Id: I128a721587f4963849652cb389472a550d81d267 Reviewed-on: http://gerrit.openafs.org/6097 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef492dc1e1a1809a910fbf07140b26c4924957c5 Author: Derrick Brashear Date: Sat Nov 5 11:24:43 2011 -0400 redhat: make rpms build on pre-f15 again we don't have systemd everywhere. don't assume it Reviewed-on: http://gerrit.openafs.org/5813 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 47b010d1e1d0e8bdbbcad73d5aedc19719d5d96a) Change-Id: I200ca2306b0e6a22cdcb0515641977b2ea6d21a0 Reviewed-on: http://gerrit.openafs.org/6090 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 76de794826980a33ae44a27bda47a2e4c3962204 Author: Edward Z. Yang Date: Mon Oct 17 23:16:15 2011 -0400 linux: Update Packaging to build OpenAFS services for Fedora's systemd Fedora 15 now uses systemd (see http://fedoraproject.org/wiki/Systemd) for the OS init system. While it currently has backwards compatibility with older SysV-style init scripts, future versions of Fedora may no longer support it, and OS startup tends to be faster with the systemd service units. Also, systemd runs all the service's processes within a linux kernel cgroup. (see http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt) This change includes an openafs-client.service and openafs-server.service unit files for the client and server packages respectively. Client - Loading the openafs module was moved into /etc/sysconfig/modules/openafs-client.modules. This causes the OS to load the module on boot. This is the preferred way for modules to be loaded with Fedora. (See http://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/sec-Persistent_Module_Loading.html for more details) - The CellServDB file is generated with sed rather than cat. This change was made because Systemd doesn't execute as a shell script, but rather executes processes directly. Rather than invoking a shell to concatenate the CellServDB.* files, they're written to the CellServDB file using a sed oneliner. - Do all of the proper kernel module loading and unloading. Server - Since systemd uses cgroups, when the service is shut down, all processes in the openafs-server.service cgroup will be terminated. The other changes are standard as per: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd Original version by Jonathan Billings . Signed-off-by: Edward Z. Yang Reviewed-on: http://gerrit.openafs.org/5637 Reviewed-by: Derrick Brashear Reviewed-by: Alex Chernyakhovsky Tested-by: BuildBot (cherry picked from commit 286ffa0d7c4d594ff107b70f9e930271c027a79e) Change-Id: I653b211ef24fb9010f0a8ff0ad70c11703a64e82 Reviewed-on: http://gerrit.openafs.org/6089 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f129142dde2a2637b2e638ca0cca372a45188923 Author: Marc Dionne Date: Sat Oct 29 19:23:07 2011 -0400 Linux: 3.1: update RCU path walking detection in permission i_op The permission() inode operation changed again with kernel 3.1, back to the form it had before 2.6.38. This compiles fine, but is missing the new way of detecting when we get called in RCU path walking mode, resulting in system hangs. Reviewed-on: http://gerrit.openafs.org/5740 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4952df3f0359531e4a660c99c94c51eb0b169f59) Change-Id: Ibd497309e6699fb585cf70e618373e800b73cbb8 Reviewed-on: http://gerrit.openafs.org/6088 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8150bbbf0dbc6732860214180735ba509902f417 Author: Jeffrey Altman Date: Fri Oct 14 08:10:19 2011 -0500 klog.krb5: enforce DES for rxkad 0. Always request a TGT regardless of the state of writeTicketFile. 1. request des-cbc-crc when requesting a ticket for an rxkad service principal 2. check the returned key length to ensure that it matches the permitted length of an rxkad key. If not, generate an error instead of overwriting memory and continuing. FIXES 130278 Reviewed-on: http://gerrit.openafs.org/5619 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3a9a5783cd1fd73902655f0876e2069b42688c94) Change-Id: Ia162cb9fc1d67a38cde26e52b9077f5634a62c84 Reviewed-on: http://gerrit.openafs.org/6087 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1132b23e2fe62ffca875bd9bcacee621d292cea4 Author: Andrew Deason Date: Wed Nov 2 11:35:42 2011 -0500 Solaris: Specify ARCHFLAGS in CFLAGS Various autoconf tests which use the C compiler may yield different results depending on whether or not we are compiling for x86 or amd64 on Solaris (different libraries are available, structures may be different, et al). So, set CFLAGS depending on which arch we are targeting, so the autoconf results are more consistent with the actual compilation during the build. Reviewed-on: http://gerrit.openafs.org/5786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5eba97a8960c49aeea957dc94408368e1324eff0) Change-Id: Idd0f7d2220ae9762af60e96d087e7eb7ee8c0e63 Reviewed-on: http://gerrit.openafs.org/6086 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 191bdc72581926bd0212b658e356196d69b97d9a Author: Andrew Deason Date: Fri Nov 4 12:42:33 2011 -0500 DAFS: Deal with exclusive-state volume headers GetVolumeHeader assumes that headers on the LRU are not associated with a volume in an exclusive state. This is known to not be true for some cases when salvage requests are received over FSSYNC, and may be true in other scenarios. It's easy to just skip such headers, so skip them. Reviewed-on: http://gerrit.openafs.org/5808 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e) Change-Id: I0eda511071114b01cd8984d30858b0aa9157727a Reviewed-on: http://gerrit.openafs.org/6085 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 455e900d6c8aa4a6ebca2f94f6c4954cde65dbab Author: Derrick Brashear Date: Fri Nov 4 11:43:01 2011 -0400 ukernel: handle pioctl errors properly in ktc the straight return from call_syscall isn't what we want. munge so e.g. EDOM handling for ktc_GetToken does the right thing. Reviewed-on: http://gerrit.openafs.org/5807 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b06c700ee40ca70ef08259af819e2a6084137457) Change-Id: I8929615940cb4f025bdd04139399f0ceb82955c9 Reviewed-on: http://gerrit.openafs.org/6084 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a81666efdb1b7727bcd24b21a3e9d5926e6be839 Author: Andrew Deason Date: Thu Nov 3 13:17:33 2011 -0500 salvager: Implement AskDAFS via SYNC flags Instead of probing the DAFS-ness of the fileserver by probing which FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC response header flags, which explicitly state whether or not the endpoint is DAFS. This avoids unnecessary "protocol mismatch" log messages when the endpoint is not DAFS. Reviewed-on: http://gerrit.openafs.org/5800 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7fee28bae30c5a65898a2e3fd7149f07e8ca0df6) Change-Id: I0643b0e61795f39b63783c937e88c4a74c3c8312 Reviewed-on: http://gerrit.openafs.org/6083 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d173bead9866b07d4f8b25f57abdae7fd09bc99f Author: Andrew Deason Date: Tue Nov 8 12:52:50 2011 -0600 regen: Fail on failures If something fails, don't ignore the error. Reviewed-on: http://gerrit.openafs.org/5817 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6d519cf1234d54630dcfe48f6ecd393e2dfe71dd) Change-Id: I5e5ac4d843b9dafce7b7f3acadfcdb0901aed214 Reviewed-on: http://gerrit.openafs.org/6082 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f718feb826926a67f428b482a580d03c788dfabf Author: Derrick Brashear Date: Wed Nov 9 10:34:10 2011 -0500 viced: avoid bogus handle in rename because fileptr's handle can be reset during CopyOnWrite we need to SetDirHandle after that call FIXES 130215 Reviewed-on: http://gerrit.openafs.org/5818 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a1669f3e37299c11bf29a458212e03d1bdb22334) Change-Id: I57e084102048916b04e45aa32792dc91193e43d8 Reviewed-on: http://gerrit.openafs.org/6081 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d741616a8e8d1daf60b117f2be8f7768b3fd882 Author: Andrew Deason Date: Wed Nov 9 17:04:09 2011 -0600 volser: Preserve needsSalvaged during restore Some of the routines during a volume restore may set needsSalvaged, if an inconsistency is detected while writing the given volume data. However, after the data is read, we set the volume header information to what was found in the dump stream, ignoring any needsSalvaged that may have been set. To ensure that inconsistent volumes in this situation actually get demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of needsSalvaged in the header, if it was set. Reviewed-on: http://gerrit.openafs.org/5822 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9ba891676a15512fa58915662cf599ea73eac430) Change-Id: Iece9f5b03f0454b7f833e4f3e86da4478b4441fe Reviewed-on: http://gerrit.openafs.org/6080 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 34637cbc700df627550840aed81b7a42fe241bc8 Author: Andrew Deason Date: Thu Nov 10 11:58:12 2011 -0600 namei: Remove extraneous rmdir We just unlinked the file, so we know we won't be able to rmdir() the same thing. Give a path one level higher to namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir. Reviewed-on: http://gerrit.openafs.org/5833 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b41e30a55c8aeb6d7f42d74f9eb090232032057f) Change-Id: Ibd14490e2d85bd78522472203ad57120237bff22 Reviewed-on: http://gerrit.openafs.org/6079 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0e753b2949cc5127b75713b2e0d7dd3acd96a047 Author: Jeffrey Altman Date: Fri Nov 11 11:00:47 2011 -0500 namei: tweak getlinkbyte error handling in the event of a pread error, add the same error exit path trigger that we have elsewhere Reviewed-on: http://gerrit.openafs.org/5843 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 51f71e533b20cd875eec8adda71edea044a606da) Change-Id: I05623d392e7e3446b7b41dcc1778c6aca986bca1 Reviewed-on: http://gerrit.openafs.org/6078 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c25f3fd56c927cfa2b81ed2b54a7cf6f1fc3999b Author: Jeffrey Altman Date: Sat Nov 12 13:45:08 2011 -0500 Windows: Track active RPCs per scache_t It has been noticed that multiple RPCs can be active on a cm_scache_t object at the same time. This is especially true of directory objects with the redirector. Track the number of active RPCs and use that number in cm_MergeStatus when deciding whether or not to discard the cached data for the object. Reviewed-on: http://gerrit.openafs.org/6001 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 090f6279c5496f648893606d298c698f376c7ae0) Change-Id: Ic40b73ae44c47ad6077fcbbe41bf0d783ab776fc Reviewed-on: http://gerrit.openafs.org/6045 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8844858564a3e5dbe2436908f4feb6d4f930dac4 Author: Jeffrey Altman Date: Sat Nov 5 04:10:42 2011 -0400 Windows: Add Vista/Win7 Firewall Configuration Make use of the INetFwPolicy2 COM interface to configure the Vista/Win7 firewall for all network profile types. Reviewed-on: http://gerrit.openafs.org/5812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b15b4b15822bee87720bb0d78c2ce54051180339) Change-Id: I3022b2480c7c7273e819d0a10c092f22f4af3800 Reviewed-on: http://gerrit.openafs.org/6044 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 10410504e7e5a1b3b850131372a7d5e5e572e4d3 Author: Jeffrey Altman Date: Fri Oct 28 17:43:24 2011 -0400 Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of a file to a name that does not exist. Put back the code that makes that possible with a comment. Reviewed-on: http://gerrit.openafs.org/5735 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7a426424b7fb45659f6000a564e8c71a9108a33c) Change-Id: Ia82ddc46b303cb80380c342d44db437c490b8508 Reviewed-on: http://gerrit.openafs.org/6043 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 92f5218bce982e26d26e72ccc4598f2af0da7899 Author: Jeffrey Altman Date: Fri Oct 28 11:36:10 2011 -0400 Windows: out of date version not in current chunk In buf_GetNewLocked(), the comparision to decide whether a cm_buf_t is a member of the current chunk must take the data version into account. If the data version is out of date, it is not part of the current chunk and is an object that can be safely recycled. Reviewed-on: http://gerrit.openafs.org/5734 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb) Change-Id: I626562d2189182b434f8da0f4f0a6213c5b695fe Reviewed-on: http://gerrit.openafs.org/6042 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d27d549d02f628a1c4b88bcf8d1f8d5878174b58 Author: Jeffrey Altman Date: Thu Oct 27 17:57:25 2011 -0400 Windows: only flush buffers on shutdown if running If a service shutdown message is received prior to the service entering the running state, do not attempt to buf_CleanAndReset() because the required data structures and locks are not initialized. Reviewed-on: http://gerrit.openafs.org/5733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9743f5729d1a55513e861bb1334599a8e597de6b) Change-Id: I2bda1c4a538c83595f2d60ad4661c7e6865c5fc3 Reviewed-on: http://gerrit.openafs.org/6041 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 879d84fe79244612ab4587f69e3162e08f346179 Author: Jeffrey Altman Date: Tue Oct 25 15:32:11 2011 -0400 Windows: Do not EEXIST exact match during rename AFS Rename operations on the file server will delete a target file if it exists. Do not prevent renames because an exact match of the target name exists in the target directory. Reviewed-on: http://gerrit.openafs.org/5731 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9cf7a628c2ff178b2fa236d2c0a41ca9be315036) Change-Id: I02c32fab18053e1a37811089812f402d351a6666 Reviewed-on: http://gerrit.openafs.org/6040 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8f532e80419eae34ea72ee05ba6ef39fdd43b605 Author: Jeffrey Altman Date: Wed Sep 14 17:46:32 2011 -0400 Windows: validate buffer hash tables in cm_MergeStatus Reviewed-on: http://gerrit.openafs.org/5425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cf57eb294f28084cbb138b1a06bc813e14e6d0ec) Change-Id: Ia685aebdc443113b4ddb968155f306cc53680af9 Reviewed-on: http://gerrit.openafs.org/6039 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1222d29ef7cccd657cf5eda1e56efd7c951a378f 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. Reviewed-on: http://gerrit.openafs.org/5411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c9d655b9a6edf02fd92455961445f239f4667821) Change-Id: Icab5ffc36e4c6245b7d0699596eca66a66bc9538 Reviewed-on: http://gerrit.openafs.org/6038 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d698501d3446230e46fcfb646a3430424044daa 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. Reviewed-on: http://gerrit.openafs.org/5410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 793fdd3360982c48bf60eefbd9c56b4a3c1e09f0) Change-Id: Ice8758dcbd0b355c9fdfb5af293b6d670ec8c1e4 Reviewed-on: http://gerrit.openafs.org/6037 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 828fc8fff7dbc032a3de2ca6b1f2608a87dc1130 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. Reviewed-on: http://gerrit.openafs.org/5370 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 19a5b5e67c65f0a9109b0fb5410b5ba74ad85b41) Change-Id: I50dfa3c5387ba8a1cbdd3ca80f9e8dc03e92c404 Reviewed-on: http://gerrit.openafs.org/6036 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 060cc61ffb6e5999dba7523bf96b9fe7b9983ea1 Author: Jeffrey Altman Date: Tue Sep 6 11:57:18 2011 -0400 Windows: add clean rule to src/afs/NTMakefile Reviewed-on: http://gerrit.openafs.org/5368 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4ec6fd003084b02c299466bcaeac3850be10f79c) Change-Id: I0cadd04598e78f9b8a5c0774e0636af153a5030c Reviewed-on: http://gerrit.openafs.org/6035 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 81d0b5ca5cb291ab00810ce8898733c1b424446f Author: Jeffrey Altman Date: Wed Sep 7 13:33:36 2011 -0400 Windows: correct comments in cm_BkgStore Reviewed-on: http://gerrit.openafs.org/5369 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b6e5493437b942d5550247761dac3311c6d73a86) Change-Id: I73c2fcab9ccff73e4419d3edf3ffc7395230e6e5 Reviewed-on: http://gerrit.openafs.org/6034 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit aab0703b292374dc21d2de6f13c54a3f67ad3308 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 Reviewed-on: http://gerrit.openafs.org/5359 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b6f23864ffa380923f50d424063ad0804e407f4a) Change-Id: I423aa105bad99c70942d6b967a1dde70216fb096 Reviewed-on: http://gerrit.openafs.org/6033 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit be4987fac067fd72166e46cfc883a89af06a2b27 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 Reviewed-on: http://gerrit.openafs.org/5360 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 33af0f92e9b8a50c5a6dd17a9065c0ef58597c28) Change-Id: Id92298fa848becb4131139579fd31b0c5f98a4ad Reviewed-on: http://gerrit.openafs.org/6032 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 395a06460f962eb5efbb3f75821956180366ee57 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. Reviewed-on: http://gerrit.openafs.org/5355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9b0cb614387403ff433cf39f84c13b626b1b9bdc) Change-Id: I170059255e3bbc7e3ccbd59b66d7d8b11005a94f Reviewed-on: http://gerrit.openafs.org/6031 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d64f269c9e00b96581855329f61a7967d62785c 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. Reviewed-on: http://gerrit.openafs.org/5354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 537592f6bbda0c659c25ae7068f50504e2a5e116) Change-Id: I0d5afaf59895f34ced739f4626a351fe41186008 Reviewed-on: http://gerrit.openafs.org/6030 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ad9d96fe752741ad0ce59efab523f0de356ce4e Author: Jeffrey Altman Date: Sat Sep 3 20:22:19 2011 -0400 Windows: remove dead code from cm_scache.c Reviewed-on: http://gerrit.openafs.org/5353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1e23761b7fadc260b32bebb0343a9b5b1de37cf4) Change-Id: Ifd8cf9ec7b517da80b22853e0f90034586560e0d Reviewed-on: http://gerrit.openafs.org/6029 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 32539f57236880bcba726888cf781086fbc2c56e Author: Jeffrey Altman Date: Sat Sep 3 20:06:21 2011 -0400 Windows: add logging to smb_IoctlRead Reviewed-on: http://gerrit.openafs.org/5350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69463ac0cb367202485aac9977f8b4c47fb067f2) Change-Id: I1f72db5148d2f596f4b0b58cb6788a244fd4fa44 Reviewed-on: http://gerrit.openafs.org/6028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c6c113b1a1c8bb8ff52c79092a88eb4d3820ba69 Author: Jeffrey Altman Date: Sat Sep 3 20:03:28 2011 -0400 Windows: remove potential data loss warning with cast Reviewed-on: http://gerrit.openafs.org/5349 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2588dd12478afb96a72f0cd788233ecf2145830f) Change-Id: I02a87c4980c6ebe6ef671f90e2c6000ab2eeb60e Reviewed-on: http://gerrit.openafs.org/6027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1c8b16087e770d97ef46e1dff89eee6f2db5385f 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(). Reviewed-on: http://gerrit.openafs.org/5348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 722843e2df533e8fcf245f2a3b10ef686992deb2) Change-Id: I2fbc78cf765c534fc6fc673695634fcf946dca0b Reviewed-on: http://gerrit.openafs.org/6026 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25f27ed384e529ea546905a82b2f413615244425 Author: Jeffrey Altman Date: Sat Sep 3 19:03:05 2011 -0400 Windows: correct log message in buf_Sync() Reviewed-on: http://gerrit.openafs.org/5347 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20772897654b58da6f7d4cd0bd2caf169abddd50) Change-Id: I676a919701c4edfbc130a04c94f4092676a1d53c Reviewed-on: http://gerrit.openafs.org/6025 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 02d3c98d74e49385c7ef26245e05739fe6c47df7 Author: Jeffrey Altman Date: Thu Sep 1 09:51:06 2011 -0400 Windows: buf_SetDirty do nothing if length is zero Reviewed-on: http://gerrit.openafs.org/5358 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dcc4766377b99c60db60328c21a3990db132268) Change-Id: I30dc0f218df56e6e38fe6ce3736a5450b7036e51 Reviewed-on: http://gerrit.openafs.org/6024 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d979ea950c4c042772e90166bca6233179d647e9 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. Reviewed-on: http://gerrit.openafs.org/5333 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2271d481d33b2b2ad56dcd4fc9fbdd726fc1967b) Change-Id: Ia11e4bfdc83737720e5274bad3d01232f0f2dbbe Reviewed-on: http://gerrit.openafs.org/6023 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6d96df8d5fae0d4eb816415334ab2e2b4512a8cb 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. Reviewed-on: http://gerrit.openafs.org/5331 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8127e9332be8cadda001f05c6036d4c87e04cb4a) Change-Id: I9760845b597c1653a78ab3e496166e5df03b7575 Reviewed-on: http://gerrit.openafs.org/6022 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1649a820a068ce7d74479a9bea98edfe6f0d2bfd 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. Reviewed-on: http://gerrit.openafs.org/5330 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit f37b6dfaf050ec0270979c8310fb471c16b66cd3) Change-Id: I33771780a4ace4aa5b4613bef4590d5efaf15922 Reviewed-on: http://gerrit.openafs.org/6021 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9d27d4707c51602d9a9a204f677f039513056967 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. Reviewed-on: http://gerrit.openafs.org/5329 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9563dd68fc1fb4b86016106aaacd33732d4cf6ed) Change-Id: I7fc8b9ac2902c0909b39c446468307fba30b2a51 Reviewed-on: http://gerrit.openafs.org/6020 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5345695a87d0d48c58a2b65d1391be0256a19baf Author: Jeffrey Altman Date: Mon Nov 14 10:23:53 2011 -0500 Windows: netidmgr krb5_cc_get_principal can fail Do not dereference a NULL pointer if krb5_cc_get_principal fails. On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c but that change is after the conversion to the Kerberos Compatibility SDK and cannot be applied to openafs-stable-1_6_x. Change-Id: I646011dd3171fd1aa6f40f349329f8261546b809 Reviewed-on: http://gerrit.openafs.org/6019 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0de4f7ca6a1dd4232bfdac21985db995289d26ee Author: Andrew Deason Date: Fri Nov 4 17:19:28 2011 -0500 volser: Remove debugging log messages While the -log option to volserver is supposed to print additional log information, it shouldn't spam the log with useless data. Remove some of the log lines that are really more "debug" information, so we log the same amount of information as in the 1.4 series. Reviewed-on: http://gerrit.openafs.org/5810 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2a1251c5d0c1b0fd4024d7b3282187a838b551fd) Change-Id: I1af47fa1910a98a6175f1f000d0432af1e1126e8 Reviewed-on: http://gerrit.openafs.org/5831 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4ff4ec8ac94a75385d919f9031abaec31aca9b26 Author: Simon Wilkinson Date: Wed Oct 12 09:47:14 2011 -0400 rx: Don't clear the receive queue when out of packets We can end up discarding a receive queue that's been soft acked, effectively taking back soft acks we sent. Whilst the RX documentation says that a client can drop soft acked packets at will, our RX implementation assumes that if the final packet in a call has been soft acked, we won't clear the queue. If a client clears the queue in this situation, the call will hang. What *should* happen is that we should take necessary locks, confirm that we have not soft-acked all of the packets in a flow, and then discard, or, if we're just going to discard, error the call. Reviewed-on: http://gerrit.openafs.org/5603 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from f722a75fe21963d64217375f1f7bbb0eb14befb4) Change-Id: Ie2f14a0ed7b6d258a7f456387df44ac95fd1748c Reviewed-on: http://gerrit.openafs.org/5820 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7b1f8cf3780b6a90dedd82c41e27be016486ac74 Author: Andrew Deason Date: Wed Nov 2 10:28:35 2011 -0500 afs: Only use actual connections for GetTime calls The for() loop that makes an RXAFS_GetTime call in afs_CheckServers was iterating over conns and rxconns from 0 to j. However, 'j' here is just the size of the allocated array, whereas 'nconns' is the number of structures in the array actually initialized. So, just go up to nconns to avoid using unitialized connections and Rx connections. This is a 1.6-only change. On master, the -settime code has been completely removed in change Id291f5f88b1ad84594706f2a1a02a933dddd0cb9. Issue reported by Sebastian Hanigk. Change-Id: Iec782a4464899b5a7e49e193b04f79e31c6b37f2 Reviewed-on: http://gerrit.openafs.org/5788 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1faea6e59980cdcc3656283f20bfc90e1d62cf50 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 Reviewed-on: http://gerrit.openafs.org/4729 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 6260c4ae51e7a2807596ddf1bd49620f98eed94c) Change-Id: If873686f7a7742f82fd5fadf43c6f44379448c29 Reviewed-on: http://gerrit.openafs.org/5771 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3519bdd1cb5f6c4ffc3e0a81c3cd973be8946339 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. Reviewed-on: http://gerrit.openafs.org/4471 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 21578144e08d46eeec9a2944e92e8d0d7a6dba57) Change-Id: Ie06f293e3750abb7514ee3795c1af41a26f46642 Reviewed-on: http://gerrit.openafs.org/5770 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f1421187ef4f50e0aecf91ab174685d0cc96f96 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). Reviewed-on: http://gerrit.openafs.org/4233 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2578555d7e08131bf2fe4cdd0aa4b32567a76eb2) Change-Id: I105f0dc7b480f7328205ae02929f6ca187aa962a Reviewed-on: http://gerrit.openafs.org/5769 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f01f6a9caeaf014262bb00bbe9bb51bad7179b6e 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). Reviewed-on: http://gerrit.openafs.org/4121 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit aadf69eabb1962496fa93745ab560a5b48cacd61) Change-Id: I324dc79a24fc8c199825ffefcc1dd2b0097942a1 Reviewed-on: http://gerrit.openafs.org/5768 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 650223868cae563749fc7bfe4edb8746790fc435 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. Reviewed-on: http://gerrit.openafs.org/4242 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a18175f479437f3a4fe68460538927630070cd13) Change-Id: I355c53c6f224c5471da70827f30511986abeac27 Reviewed-on: http://gerrit.openafs.org/5767 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c096127f73348a470e0e478b31c3fe132304b009 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 Reviewed-on: http://gerrit.openafs.org/4393 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 601fcf1d7f7c88cfc0ffd877c5458340b3e59098) Change-Id: Ibd215d586485d8f18f77665f5f85e6bee579e35e Reviewed-on: http://gerrit.openafs.org/5766 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 741bea05a3a5d170d47ca9df590f84ab02a7baad 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. Reviewed-on: http://gerrit.openafs.org/4395 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ba9ae1ed7c269d7c080b5ce99b3b4bb2fe0a2a6f) Change-Id: I9e45a51e02774c555c6d5cb5ba9d0407b8442215 Reviewed-on: http://gerrit.openafs.org/5765 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09159b5cc353fa901d130ed5353043579cb4cb1b Author: Jeffrey Altman Date: Tue Mar 8 11:04:07 2011 -0500 vol: avoid MAXINT redefinition warning in vnode.c Reviewed-on: http://gerrit.openafs.org/4179 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b1d51d2a6030fb8aabdae1fedb6846dc7ef9fbca) Change-Id: I8ea833cca442c67468982da31ed1b6fe04508a34 Reviewed-on: http://gerrit.openafs.org/5764 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5c2e87190c9d36898831a400d9146ac533a8d844 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. Reviewed-on: http://gerrit.openafs.org/4308 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8234cc254406173a7ada9fb1b4a63ca8aa626bca) Change-Id: I912c1d0b34fbbaae9ce4bd8edf6e3dd7f718be00 Reviewed-on: http://gerrit.openafs.org/5763 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 66a63e16473f178c69ba4ae6e495fbca5cd2a424 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. Reviewed-on: http://gerrit.openafs.org/4297 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 637f5b642aaee3a6f4642fd0ba15e2a9eec6c496) Change-Id: Ib40ffb84fa6c40cfd692c561b913decb97268403 Reviewed-on: http://gerrit.openafs.org/5762 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 65050695a903dc12cc392d7b326cdbedfa1bf681 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. Reviewed-on: http://gerrit.openafs.org/4296 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dba991728ba5a90af316928348053189dac80398) Change-Id: Ica0c53e62ed885710210c7e1344e12b382302572 Reviewed-on: http://gerrit.openafs.org/5761 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1da664f520afbc81505f692e470e8efed46dab36 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. Reviewed-on: http://gerrit.openafs.org/4295 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f2c1f2ee48663d00701e7cee52b99151e36b9534) Change-Id: I708c173ae6cbd3f40cc09f6fc3229a6f038baf3f Reviewed-on: http://gerrit.openafs.org/5760 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d35b9f645396577f22b033730420149453394fdc 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. Reviewed-on: http://gerrit.openafs.org/4273 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 9ac85bb2fd91baa4c3077d091f395f57e933018a) Change-Id: I83604d19759a183fa10989596734a405515ac19c Reviewed-on: http://gerrit.openafs.org/5759 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5823fda443115d3aae966d09141f5de4199f5741 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. Reviewed-on: http://gerrit.openafs.org/4198 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 85edec7105dd653ed1d8046b69b8262281e97bba) Change-Id: Iee09a8bc4a0aabbd12fe156940fa61d6947642e8 Reviewed-on: http://gerrit.openafs.org/5758 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0a61a148e6243339b6b6afeea986f109d9037b31 Author: Andrew Deason Date: Wed Mar 2 14:13:25 2011 -0600 vol-salvage: Fix AskOnline error message Reviewed-on: http://gerrit.openafs.org/4116 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 22365ab37ac823b6734f4fc0ad79f10b6ee14390) Change-Id: I7cf852d563b72c40b183b728143b59e8e4b8da7b Reviewed-on: http://gerrit.openafs.org/5757 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 83e29ccc89a0c9a234e913b8216709bf5b541c7d 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. Reviewed-on: http://gerrit.openafs.org/4115 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7f31a11d110085ae528d4555d34744c0832008b0) Change-Id: I27aefea0e891444e006e5d4b5ed43ed9cd492242 Reviewed-on: http://gerrit.openafs.org/5756 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ffd4a867a3f339853631fc6dd708222961493e6 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. Reviewed-on: http://gerrit.openafs.org/3891 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f47487db051ba6b51ae12daf7edc09ecfd3c38cd) Change-Id: I54516a20ebb87d9c482cbc4840e0d236e7c54f8a Reviewed-on: http://gerrit.openafs.org/5755 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f6168a849cbb5bde34cec11e02df54481fc5d3ca 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. Reviewed-on: http://gerrit.openafs.org/2548 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 37817796c4890683a7e41ed0f3a2fa6a53e1edc7) Change-Id: I85c89eff061af799a7d8f612bee9b2f182312e6f Reviewed-on: http://gerrit.openafs.org/5754 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 651dd6d25e307f08ab63080b0afdba4762ad2bb5 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. Reviewed-on: http://gerrit.openafs.org/3385 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d29550a438a60dd918938f484c7b75e25478abd9) Change-Id: Ic3c8ec68febae8b61b6d04ef4d063178dffe8d0e Reviewed-on: http://gerrit.openafs.org/5753 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 237e8e199006c9627db8bb686f453e91882e2bd0 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. Reviewed-on: http://gerrit.openafs.org/3384 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1e8598b334b4354a3998b1e5fe189f3f33957048) Change-Id: I832eff8641c339a103170f50238bbb669412bda0 Reviewed-on: http://gerrit.openafs.org/5752 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4c80871a16d6022c3d3e5edc0504208ddad49cc8 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. Reviewed-on: http://gerrit.openafs.org/2647 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a0cc81c0894193db11860d8fe40380c7198741a9) Change-Id: Iabff9bd68db088c30c7e44ad71b7d34bcfaaf207 Reviewed-on: http://gerrit.openafs.org/5751 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b9830adf8b2b98dabed8a23e400529f36e91c222 Author: Andrew Deason Date: Wed Sep 8 14:32:35 2010 -0500 DAFS: raise vhashsize limit Raise the maximum specifiable vhashsize to 28 (from 14). Specifying a vhashsize over 14 can be reasonable if you expect to have a few million volumes on a fileserver. Reviewed-on: http://gerrit.openafs.org/2725 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b2d067a913d3c2e5dbfe756b7752ade308f967c1) Change-Id: I2e2d7ca4986af417c3298c3cfff8f087d795bc53 Reviewed-on: http://gerrit.openafs.org/5750 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0548587958317c6ebd73081e36e511102442ea0f Author: Andrew Deason Date: Thu Sep 2 12:56:28 2010 -0500 DAFS: Do not ignore out-of-range -vhashsize If the specified -vhashsize is out of the 6-14 range, do not just ignore it. Instead, note the error and quit. Reviewed-on: http://gerrit.openafs.org/2649 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 575bdaf56e8f5503513bec113653fbbe525ae228) Change-Id: Ie0ebfcf1b5c88816ef58eab109fb05de4c7fad1e Reviewed-on: http://gerrit.openafs.org/5749 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ffa86554af738fb49a17889870616ad113b70374 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. Reviewed-on: http://gerrit.openafs.org/4748 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ca465e432d67b067fc3854781b8702aaff577cc7) Change-Id: Id37d11e72d196f5008e9843d4f04c492a4017e72 Reviewed-on: http://gerrit.openafs.org/5779 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 66d1ace117bc0e1ae40c746e5b80d2894bd9e4a9 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. Reviewed-on: http://gerrit.openafs.org/4189 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e261238470ed28ee7c1068d914de171b34033e09) Change-Id: I6b3eb829dec3ec4338dbe8f2363ced2bdcd7dc9a Reviewed-on: http://gerrit.openafs.org/5778 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 942ec73fa66171cdeb8966ded83e140238c4f8cd 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. Reviewed-on: http://gerrit.openafs.org/4188 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6143bb27d20380e689346b4e66c077e5d4cd6061) Change-Id: I8878b5b55871c1974b19c2af64636ea536841bff Reviewed-on: http://gerrit.openafs.org/5777 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f618b050d4507753df38a573e9f7ef5823f2d8aa Author: Andrew Deason Date: Tue Mar 8 14:59:44 2011 -0600 libafs: Indent afs_call.c ifdef maze Reviewed-on: http://gerrit.openafs.org/4187 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 05241a59a1ce88d2f25d75127124971c55e1f677) Change-Id: I3ef7aeb5e111f9365a10d86a440ad31c4fe76902 Reviewed-on: http://gerrit.openafs.org/5776 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ab9bdaf1108277d2ea6ae268b316699b4f292c30 Author: Ben Kaduk Date: Sat Oct 8 17:16:26 2011 -0400 FBSD: deal with kernel API rename Upstream decided to rename the kernel functions that implement syscalls to have a sys_prefix (including afs3_syscall!). We use a couple of them, so we need to conditionalize accordingly. Unfortunately, __FreeBSD_version was not bumped with the change, so we use something close to it and hope it's close enough. Reviewed-on: http://gerrit.openafs.org/5572 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4a1d319177ea0e58c9046c3c173bb7d2877d1bc3) Change-Id: I01d943398a3c15009f72f668720bfe6bc8eac63d Reviewed-on: http://gerrit.openafs.org/5639 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 793f219e7b4d2fc401b0427723167e50fd6a9fb8 Author: Derrick Brashear Date: Tue Oct 11 15:37:57 2011 -0400 ukernel: get an ip address even when dns and hosts suck gethostname plus gethostbyname being useless make things fun make things less fun (cherry picked from commit 6f59c71988d75f76750c46adb11cda7e9189d5f3) Change-Id: Id7d9181b2d87f7a87a08991b96da664f4297604b Reviewed-on: http://gerrit.openafs.org/5726 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2d817e49d6aeb10acd93a9f73badcbed54fd3878 Author: Jacob Thebault-Spieker Date: Tue Jul 19 15:01:26 2011 -0700 allow cloning of any volume to any volume with same parent ID remove checks to disallow cloning of ro volumes to rw volumes, which allows cloning of any volume within the same parent ID grouping, including allowing destruction of newer version of the volumes. Reviewed-on: http://gerrit.openafs.org/5049 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 83c41c69411ece7ac1dd0a7b15d4ee9746edcf23) Change-Id: Idc2575538811d278fb65be46cfc0cd4d24d90f5d Reviewed-on: http://gerrit.openafs.org/5725 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit da78610b266a04bee6674339300495a7ad21f015 Author: Jacob Thebault-Spieker Date: Tue Jul 19 09:02:49 2011 -0700 remove check for disallowing clones of backup or ro volumes removes the if-statement ensuring that the volume being cloned is not a backup volume, nor a read-only volume. This allows clones from any type of volume to a given volume. Parent volume meta-data is maintained, only the cloneId value changes. Reviewed-on: http://gerrit.openafs.org/5046 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e1a65ba7edec519acc67f0dcf2237a0f26e92aa) Change-Id: Ibda6a8a12804fc35890c99ada6d711e25a50a6c8 Reviewed-on: http://gerrit.openafs.org/5724 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 068f201c3fa1a4e1d807b063a338b94e0514fe44 Author: Michael Meffie Date: Thu Oct 6 07:55:21 2011 -0400 bozo: test program update Add -file option to test program to simulate program crashes. Reviewed-on: http://gerrit.openafs.org/5533 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e7302bcc9c4aa6f1e6a1ae8e5b498bcb0540aac9) Change-Id: I0cf394c881da7c01f75a7926700f896a905e8172 Reviewed-on: http://gerrit.openafs.org/5723 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 465e613b5d73380374eb69a226f4227e976e1f5c Author: Andrew Deason Date: Mon Aug 29 17:41:31 2011 -0500 DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER Currently VRequestSalvage_r takes a flag, VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the specified volume to be freed (via FreeVolumeHeader). This is almost never safe to do, since there may be other users of the specified volume that can be accessing the volume header at the same time. There is also no reason to invalidate the header at the time of the VRequestSalvage_r call, since the header must be invalidated when we detach the volume (other utilities may change header information). So, if there are any problems in the future because we do not invalidate the header at the time of VRequestSalvage_r, it is the fault of the detachment/offlining logic. So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take this opportunity to correctly document the VRequestSalvage_r headers in the VRequestSalvage_r comment, as it was previously missing the VOL_SALVAGE_NO_OFFLINE flag. Reviewed-on: http://gerrit.openafs.org/5319 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5) Change-Id: Ib991ecefea2115a3c4308ed3c261af7433c9b858 Reviewed-on: http://gerrit.openafs.org/5722 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 850ca0e1441d12f9dbc0545d97ab3d74318cff88 Author: Michael Meffie Date: Thu Oct 13 12:23:35 2011 -0400 DAFS: fssync online requires a partition name argument fssync-debug online silently fails when run without a partition name. Check for the required partition name on the server side and the client side. Report errors back to the client when the server side fails to pre-attach the volume. Reviewed-on: http://gerrit.openafs.org/5615 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d171a5e059566cc99c5dd980039dd56233f91a67) Change-Id: Id8776c71cd1712ecb779c76565cfb9e685e54a19 Reviewed-on: http://gerrit.openafs.org/5721 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 080e4a736ba95d4dcb4167a1a8f8accab8a928b0 Author: Andrew Deason Date: Tue Oct 11 10:51:14 2011 -0500 volser: Remove ExtractVolId volser was using its own function to extract a volume ID from a filename string, and was using atol to do so. The ato* family of functions can have problems with larger volume IDs, not to mention a lack of error checking, so don't use it. Since we already have the function VolumeNumber in the vol package to do the very same thing, just use that instead. Reviewed-on: http://gerrit.openafs.org/5594 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 87f969f82d12c8200ede3fd30a151e09ab0bf6ad) Change-Id: I4f047c4141493e151db0a6b5ec21bee3af35e040 Reviewed-on: http://gerrit.openafs.org/5720 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bcccac5ccb89a9b4368bcef293913bcf98b8446c Author: Andrew Deason Date: Mon Oct 3 13:10:44 2011 -0500 viced: Check for HOSTDELETED in stillborn check h_FindClient_r checks the connection rock for a client object twice. First it sees if we already have a client object, and if we don't, we effectively create one (or find a suitable one). Then we check again, to see if someone else set the rock while we were creating a client structure. Currently, the first check checks if client->host->hostFlags has HOSTDELETED set, but the second check does not. So, if the host associated with the client has been deleted by someone else, currently we will unnecessarily log a "stillborn client" message, and we will continue to use the deleted host. If the host continues to be held by someone, we will run into the same situation repeatedly on future requests until all of the host references go away. To fix this, also ignore HOSTDELETED clients when performing the stillborn race check. Reviewed-on: http://gerrit.openafs.org/5614 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b5a153fb75bb6642490e9856dc6212244a590301) Change-Id: I3fb0b01c2ef14cd077cd4db9476ed6e90c7d3c2a Reviewed-on: http://gerrit.openafs.org/5719 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b33db8c7dee9ecf397d943fbc56cdf70dda5198e Author: Andrew Deason Date: Fri Oct 14 11:32:34 2011 -0500 vos offline: Bring volume back online for -busy vos offline is supposed to bring a volume back online from "busy" status before exiting, as volumes should not be in "busy" status for extended periods of time. This was being enforced by required that -sleep be specified; however, -sleep only results in the volume being brought back online if a non-zero sleep time was specified. So, make sure the volume is brought back online if -busy was specified. Reviewed-on: http://gerrit.openafs.org/5620 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d) Change-Id: I64aa6f297b787ca666959ff4f35d17aced6e41a7 Reviewed-on: http://gerrit.openafs.org/5718 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1bee1365cdcc45bfb5a562acf86fb1169f14d0d0 Author: Derrick Brashear Date: Sun Oct 23 19:15:16 2011 -0400 bypasscache: allow arbitrary sized iovecs instead of binding outselves to PAGE_SIZE, just fill any size Reviewed-on: http://gerrit.openafs.org/5658 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 4b817cbb520872e69b01e5675f9037d8948d0ade) Change-Id: I350f4e7e0936be50960c80d115a44afe750a48fa Reviewed-on: http://gerrit.openafs.org/5717 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d7ed88fce430fc004daefe46eda0817a353e8580 Author: Derrick Brashear Date: Thu Oct 6 04:04:36 2011 -0400 bypasscache: do errors correctly do set errors when we bomb out early do not unlock and return early when we happen to do a correct zero length read do set errors the kernel can deal with if we're feeding a page routine Reviewed-on: http://gerrit.openafs.org/5554 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 28a159b2bfff7ad450dce612601a0286d4f91df5) Change-Id: I4f2e1b50a3c0856a08281e0ffbfaa7cbb71db2c4 Reviewed-on: http://gerrit.openafs.org/5716 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5391ef073266a3110692792933e206574136d583 Author: Simon Wilkinson Date: Sun Oct 23 19:07:33 2011 -0400 rpm: Turn on debugging Now that we build with a blank CFLAGS line, we need to make sure and actually turn on debugging in the build system, so that our debuginfo files are vaguely useful Reviewed-on: http://gerrit.openafs.org/5662 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1de23d1fe5d64c8f5e8f24579c0926fabdaace92) Change-Id: I9384b9632efb5e7a9054b49c6b6f2f4cfc9c9376 Reviewed-on: http://gerrit.openafs.org/5715 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 660b35f5117993c1ab0d3d0afa3fb4a26fb54346 Author: Simon Wilkinson Date: Wed Oct 12 09:50:18 2011 -0400 rx: ackall handling If we ACKALL a stream, then we're sending a hard ACK for all of the packets in the stream. We shouldn't send that hard ACK, and then a load of soft ACKs for packets that don't actually exist. Reviewed-on: http://gerrit.openafs.org/5604 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a9924ba433f81bfbfc2c0e726f2be06d460e4d56) Change-Id: Ibba1d5448f2ba9315b6b9bc3e893d16d8bcdbc3c Reviewed-on: http://gerrit.openafs.org/5714 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f26f90640ea7362d74d3cdfb4f470c4d86f505ef Author: Andrew Deason Date: Fri Oct 21 15:05:06 2011 -0500 LINUX: Fix afs_linux_pag_to_groups signature "new" is a struct group_info**, not a struct group_info* Reviewed-on: http://gerrit.openafs.org/5648 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e) Change-Id: I6a3f31284f74af8cdeeeecd920bec26f955dc0da Reviewed-on: http://gerrit.openafs.org/5713 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d6c5cde26e35498e7eb7cde02b30ed94d26b37e6 Author: Andrew Deason Date: Fri Aug 12 14:50:26 2011 -0500 LINUX: Revert group changes on keyring failure On Linux kernels that support keyrings, when we setpag we try to add the PAG to the session keyring and to the supplemental group list. Currently, if we fail to add the PAG to the keyring (which may happen due to key quotas, or possibly other reasons), we return failure but the group list is still modified with the new PAG in it. Therefore, if the keyring-based approach fails, the new PAG may still be in use, but there are no keyring keys associated with that PAG, so the PAG may never get destroyed. This can cause a large number of PAGs to accumulate over time, causing performance problems. So, change this so that, in the event that keyring installation fails, we revert the group list back to what it was before we touched it. Also mark all unixusers with the new PAG as expired, in case one got created during processing. Thus, the new PAG never gets used. Reviewed-on: http://gerrit.openafs.org/5238 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit ee2fbffb04bb8b5098354646e262afa90c1b6f59) Change-Id: Ie954ce2b1bc502cc1abe2fa1eecc18b31d066038 Reviewed-on: http://gerrit.openafs.org/5712 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d1711efd73b8dea177672eeb477a23d4a83b95b7 Author: Andrew Deason Date: Thu Oct 20 16:57:14 2011 -0500 viced: Do not swallow errors on StoreData recovery When we encounter any error in the StoreData fetch/store loop, we reset the disk usage to ensure it remains correct, even in the face of unexpected errors. However, when we do so, we use the errorCode from VAdjustDiskUsage as our return value; if it is 0, we return success, ignoring the error that got us in this code path in the first place. Instead, keep track of a temporary errorCode for the disk usage adjustment, and do not override our return value if there was no error in the disk usage numbers. Reviewed-on: http://gerrit.openafs.org/5645 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit dd831c09602f1ef16cc7dece84aeff638cce7272) Change-Id: I154e6cbc96ee4e32bee2da77441547c1dce8b42c Reviewed-on: http://gerrit.openafs.org/5711 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a4333a6bc1971a8f31a117998cdbf48c2ef99b7e Author: Simon Wilkinson Date: Wed Oct 12 09:44:37 2011 -0400 linux: makesrpm should cope with releases with letters don't just deal with numbered releases. Reviewed-on: http://gerrit.openafs.org/5602 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 69f54d474827548375c0bd39a87ac7ec376b6d9b) Change-Id: I3e433fe4b7f1b2dbedcfc70215ba114de16900c4 Reviewed-on: http://gerrit.openafs.org/5710 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85fb3f2d3fb16319668d634b6a15f3b07ba73aa5 Author: Derrick Brashear Date: Wed Oct 12 14:34:55 2011 -0400 afs: don't try GetDownD if nothing to get if we "need" negative slots or caches, don't run. also, don't stay "too full" Reviewed-on: http://gerrit.openafs.org/5612 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 488c7c97854a4bd0ec67bcfe17df93b3fd025f88) Change-Id: I1bdd37ce5659ce770f0fbb23bcb9174858b5eeed Reviewed-on: http://gerrit.openafs.org/5709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cee07e0612febb9b7e7f199720ca9a2e575874bf Author: Simon Wilkinson Date: Wed Oct 12 15:26:23 2011 -0400 ukernel: don't define rdwr env on linux We're not vm rdwr env in ukernel. Don't claim we are, otherwise we will never push chunks out to the fileserver when our cache is full Reviewed-on: http://gerrit.openafs.org/5613 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 796de9fb43857acccbd51e2af7c8d67eea90fdc5) Change-Id: I0256c7bdd8a19a191a5d9981525ee288e614fef0 Reviewed-on: http://gerrit.openafs.org/5708 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f84b2b5692f94473ad5acb03e9ea36fbba153dea Author: Derrick Brashear Date: Wed Oct 12 13:09:42 2011 -0400 ukernel: set pthread stacksize to an integer multiple of 8k because some pthread stacks require this to be in units of page size, guess that page sizes will be 4k or 8k, and use the larger as a divisor Reviewed-on: http://gerrit.openafs.org/5606 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear (cherry picked from commit 7ae1921b76750ef28258777cf1b233c4917663d7) Change-Id: I273ee935db4cf6c17ca50eedab8cfd577d21a599 Reviewed-on: http://gerrit.openafs.org/5707 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 399a0fc8510bbbe65a4df98ff7620766955dd3af Author: Simon Wilkinson Date: Wed Oct 12 13:04:28 2011 -0400 ukernel: add morepackets check in listener Make the listener loop actually check for more packets needed, like kernel, pthreads and lwp. Only checking for new packets every 20 seconds isn't sufficient on today's networks! Reviewed-on: http://gerrit.openafs.org/5605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit eead07418f13cd87a90770f03ea5118c546d8f1a) Change-Id: I84156d5f1c228e4b3987c17a72ef7c71f0339d4a Reviewed-on: http://gerrit.openafs.org/5706 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 112fc56ed5b15c386727bea4d8e345f23984558b Author: Derrick Brashear Date: Tue Oct 11 15:21:12 2011 -0400 afs: on uuid init fail, don't leave garbage behind make sure we zero the uuid if we failed Reviewed-on: http://gerrit.openafs.org/5599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb) Change-Id: I20313628c4ac26fc67a2adc909e39bf53742314b Reviewed-on: http://gerrit.openafs.org/5705 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9549e1bafd62419f2b92f36a7f9719e2152fb42e Author: Derrick Brashear Date: Tue Oct 11 14:32:04 2011 -0400 ukernel: set close-on-exec on our socket if the process we are in execs a child, it doesn't get our socket Reviewed-on: http://gerrit.openafs.org/5598 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 87dcfc872c11fdb13ebf0448abe91150aaa86859) Change-Id: I7e94e5192783c57aa77afc1b583cccda77ec7653 Reviewed-on: http://gerrit.openafs.org/5704 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95e07206a55d5a44a894b8be6586ad745697d8d8 Author: Simon Wilkinson Date: Mon Oct 10 17:19:13 2011 -0500 docs: Refer to dafs binaries by their real names (Most of) the dafs binaries are called da(something). Update the example in the dafileserver documentation so that we call the binaries by the names that they are actually installed with on the system. Reviewed-on: http://gerrit.openafs.org/5654 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit c37a14697df291f641b4fa5a32826054d92210b0) Change-Id: I001a0e2c94a7c52d91b2ebf257d097ce7400eb3a Reviewed-on: http://gerrit.openafs.org/5703 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9472bcb33ddbab25d7925c74a164376dc34a9661 Author: Simon Wilkinson Date: Mon Oct 10 22:09:40 2011 +0100 ptserver: Don't check for noauth before rebuilding The ptserver database building scripts would check to see if the server was running from a bosserver with the noauth flag set before performing a database rebuild. This means that you can't start ptserver normally, and then configure the database using pts -localauth, which is the preferred method for configuring new cells. Remove the check for noauth. This is slightly risky, as it means that a corrupt database could be completely erased upon restart. However, we already check that the dbheader (65k) is entirely blank - which will protect us against any single page corruption errors. Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 7a4498850814ea524f55de0b84d6b0ae0b4834bb) Change-Id: I95acbc980537d08a5a06541a75ec5af1ca5bbdd1 Reviewed-on: http://gerrit.openafs.org/5702 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 121e5ca39367b44cab6a80aaece4559625aa428c Author: Derrick Brashear Date: Tue Oct 11 14:03:29 2011 -0400 ukernel: don't enforce thread lockers in remove vop we enforce locking by pid. when we are ukernel, MyPidXX is stupid. don't bother. Reviewed-on: http://gerrit.openafs.org/5597 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit da9044cff966736bc064166a7136c94c0bfc1e5f) Change-Id: I84ec39a8fd6367a0a832eb5c9d8a9727454b8948 Reviewed-on: http://gerrit.openafs.org/5701 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b4fabcd4de64d9b271b5cb01fc59fcab8bd0791e Author: Derrick Brashear Date: Mon Oct 10 17:56:20 2011 -0400 ukernel: install our sysincludes to root.perf otherwise, we can't actually include sysincludes from something linking libuafs Reviewed-on: http://gerrit.openafs.org/5593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 75179d50eae3258e8baa0a4c9f069fcd11d08260) Change-Id: I9d0712766539af2f9a4ec2b291960a373e13b7e7 Reviewed-on: http://gerrit.openafs.org/5700 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c829702f7843b3f85b092313229287ef08c5085d Author: Derrick Brashear Date: Mon Oct 10 16:35:45 2011 -0400 ukernel: add uafs_access we don't have an access vop. add one. Reviewed-on: http://gerrit.openafs.org/5589 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3eb60908a1f9b3f2783ec3f7755b242bff3d573d) Change-Id: If45a7286b31e20e4e37119e5555f49ef69c8bb97 Reviewed-on: http://gerrit.openafs.org/5699 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3a66ddc59c349bd044f436a3d7a8979c6f322611 Author: Derrick Brashear Date: Wed Sep 21 15:02:40 2011 -0400 bypasscache for ukernel simple (read) bypasscache for ukernel. does not bother trying any buffercache stuff. Reviewed-on: http://gerrit.openafs.org/5484 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d1cf14d54e380014851fb850b65263a66a8a4443) Change-Id: Ia66dcdfad42fe95b3456430eeb8b12c161c185a5 Reviewed-on: http://gerrit.openafs.org/5561 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fc14f8545a8a6fc5bc3233f51705890b782f3d40 Author: Hartmut Reuter Date: Wed Oct 5 10:06:05 2011 -0400 vol_split: avoid using stale open directory vnodes we could in case of multiple splits end up using a stale open vnode for a directory; attempt to close and thus force-reopen any fdhandles backing ihandles. Reviewed-on: http://gerrit.openafs.org/5553 Reviewed-by: Hartmut Reuter Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c) Change-Id: I4894b21ac3ee114f57192261220c002a2e213ae9 Reviewed-on: http://gerrit.openafs.org/5698 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 84befb7f70bd7d9dc7b27930e35a87601d626133 Author: Michael Meffie Date: Thu Oct 6 06:03:07 2011 -0400 bozo: bosserver man page updates Add the new -pidfiles option to the man page. Add a few other missing options as well. Reviewed-on: http://gerrit.openafs.org/5587 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 26253df896a7709847cda041db1dc187f1dbf83e) Change-Id: Iac3a96bfc825143a7b8c7b4e359f35d72bbb2d4c Reviewed-on: http://gerrit.openafs.org/5611 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a826900040039c03c56c0ac797ee4bc23c1742a5 Author: Derrick Brashear Date: Mon Oct 10 16:44:05 2011 -0400 bypasscache: don't define uio_t for ukernel we shouldn't need this Change-Id: I2141622a70dd9f78676633dce2e0ea11cba6a508 Reviewed-on: http://gerrit.openafs.org/5590 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91354efe2618b5831a5ff8c1da6be23fc44c52b3 Author: Andrew Deason Date: Fri Oct 7 04:04:03 2011 -0400 RedHat: Add xstat_*_test commands to RPMs Install the xstat_*_test commands in the 'openafs' RPM. Reviewed-on: http://gerrit.openafs.org/5557 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d84c91788e0f61a9b2837f9b6ba2492072df33da) Change-Id: I85e94b7616a64e03482b8dc8cb55c589541a6581 Reviewed-on: http://gerrit.openafs.org/5560 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f94a7ac9774506ae284d90266627d8ad2cbbd2cc Author: Michael Meffie Date: Fri Oct 7 05:50:37 2011 -0400 doc: fileserver synopsis typo Fix a fileserver synopsis typo noticed during Derrick's EACK2011 debugging session. Reviewed-on: http://gerrit.openafs.org/5558 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f2cba414c1390d5ed46b6c57f5682bfbcf53774e) Change-Id: I8765cb2e5b3e0c64611a02dd59b4a8f9a2dac5eb Reviewed-on: http://gerrit.openafs.org/5559 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 366c4ad3da28f17c6f680945a88ea5ca866732aa Author: Andrew Deason Date: Wed Sep 28 15:02:48 2011 -0500 vol: Only check "logging" on vice partitions We don't care about non-vicepX partitions, so move part of the UFS "logging" check into VCheckPartition. This API should probably redone so the "am I a vicepX partition" check is done completely separately, but for now, this will do. Reviewed-on: http://gerrit.openafs.org/5514 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Tested-by: BuildBot (cherry picked from commit 82481c6f4464ad978ea56c687205bdfcd3eebffd) Change-Id: I5cbd7d6eb2db5bbbb8f47e5fed262466ae2ddd1e Reviewed-on: http://gerrit.openafs.org/5548 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 45fb811afc05f6d9ab780b984b647db6c1341241 Author: Rod Widdowson Date: Thu Sep 29 15:34:48 2011 +0100 FSSYNC-Client: Consistent use of partition name Over time the FSSYNC code has collected examples where the partition path is passed rather than the partition name. In Unix this is the same (/vicepX), but on windows the path is the DOS device (C:). This checkin changes FSSYNC client code to always use the partition name. This checkin does not address FSSYNC server or SALVSYNC. Reviewed-on: http://gerrit.openafs.org/5521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b4f96eb78d9403799b97a39b9659070cf1114cd1) Change-Id: I84d3dd586c735e9a6e2f598317873ba554a10ece Reviewed-on: http://gerrit.openafs.org/5547 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 69a28651099e3c3ff9582c3dee04db1db47ac3f7 Author: Andrew Deason Date: Thu Sep 29 14:49:53 2011 -0500 DAFS: Do not serialize state for invalid hosts When we serialize host information for DAFS during shutdown, we have no guarantee that the host is in a valid state when we look at it. This can result in a host being saved to disk when we are waiting for the host to respond to an RPC, and so the information about the host is invalid. For example, we can save a host that has the HWHO_INPROGRESS flag set, and when it is restored later, this can cause odd behavior since the flag is set but no thread is actually waiting for the host to respond. So instead, during state serialization, try to determine if a host may be in an invalid state, and simply skip the host if it may. Reviewed-on: http://gerrit.openafs.org/5528 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5c6bd04211d587efde4b0915a62273aafb2d306b) Change-Id: I9bf8cfec80ff9e626777375e94743ac621b52cb3 Reviewed-on: http://gerrit.openafs.org/5546 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9378144f94425df4abbe818ae93b3eb06c49b43c Author: Andrew Deason Date: Thu Sep 29 16:04:54 2011 -0500 DAFS: Skip hosts with invalid flags on restore Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have valid state, since those flags indicate that the fileserver was in the middle of identifying the host when the host struct was serialized. Skip entries from the on-disk host data that have such invalid flags set when restoring state, so we do not load invalid data. Reviewed-on: http://gerrit.openafs.org/5527 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6e7b31ef0a69b8ea39e8acc474a7aab48f828d3d) Change-Id: Ifa69ec30bda8f9ba162954d39f9b60d9fc630289 Reviewed-on: http://gerrit.openafs.org/5545 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 855d3fbcde486640ba60fcce283cebb4bbdafe98 Author: Jeffrey Altman Date: Fri Oct 7 18:45:08 2011 -0400 Do not call krb5_get_error_message with NULL context MIT's krb5_get_error_message() ignores the context and can be called with a NULL context. Heimdal's version does not. Derived from http://gerrit.openafs.org/5508 aka commit 9dd9cfa0e1536e0e75628c84605b3d5b8486d69c The 1.6 branch is sufficiently different from master. Change-Id: Ie325705a78b155a04a6a9d44800037b72f5b045c Reviewed-on: http://gerrit.openafs.org/5569 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74a08db14306bf5a7666951c09a6b8866e94e087 Author: Jeffrey Altman Date: Tue Oct 4 17:29:26 2011 -0400 Windows: char* is not a Unicode string Do not treat the output of NetbiosName() as a wide_t when it is a char*. Reviewed-on: http://gerrit.openafs.org/5549 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e02cb72be034ddad019d2ee70e8009ee762d9ed) Change-Id: I03523441c3520f316232956d22d0f0a7203e4f36 Reviewed-on: http://gerrit.openafs.org/5568 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b84e83a47f57186ab31886c74760f2c9019868d4 Author: Jeffrey Altman Date: Thu Sep 29 09:35:51 2011 -0400 Fix typo in windows release notes Reported by Jeff Blaine. FIXES 132233 Reviewed-on: http://gerrit.openafs.org/5519 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fd66404d9deeb292e1eadb23f5e0f287f9bf8f9) Change-Id: I8dc67108d02a21ce87bfdcbf03bb827644794366 Reviewed-on: http://gerrit.openafs.org/5567 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c9187a12787da491dc4b0ee8132eba5545db58c Author: Jeffrey Altman Date: Mon Sep 19 10:35:11 2011 -0400 Fix input size computation in SetSPrefs pioctl Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained a small typo that prevents the SetSPrefs pioctl processing from functioning in all cases. fs setserverprefs continues to work for non-DB preference lists because fs.c pokeServers() attempts to try the old SetSPrefs33 pioctl in the non-DB server case. Reviewed-on: http://gerrit.openafs.org/5465 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 552d59186b135af55eeaa6136a9cbb8965dd2f04) Change-Id: I2226334c558bdc4d24e17d32751154f99f2a53a6 Reviewed-on: http://gerrit.openafs.org/5566 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit be937e205a40f1eea6691f77b9da750729e177f3 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. 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 (cherry picked from commit b418d381be8c778ebeb93dd75bdc068dc4ed4871) Change-Id: Ia12842875de3b333bdcb28c426056ad5856b423e Reviewed-on: http://gerrit.openafs.org/5565 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c63f22c4c78679188ac1f5b8b4ad1fb5c9fb373b Author: Jeffrey Altman Date: Thu Sep 15 01:26:00 2011 -0400 Windows: no SOCKLEN_T before WDK 6.0 Reviewed-on: http://gerrit.openafs.org/5433 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3f3fedecd08834439c462725e04eb04c690c07ee) Change-Id: I6e867c9d36d7c7f5248e6af7fe6004f1c7905e63 Reviewed-on: http://gerrit.openafs.org/5564 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d1249ff41af03acc58d12709d6910313979cd43 Author: Andrew Deason Date: Thu Sep 29 15:22:35 2011 -0500 DAFS: Add explicit 'valid' field for index maps The CB, FE, and host serialization structures were just using the relevant indices to determine whether or not an entry mapping and old index to a new index was populated with actual data. For host structures, this really isn't sufficient, since our index can be 0, and the structure is calloc'd, so the index in the structure could also be 0. Add a flag explicitly stating whether or not the structure has been filled in, to make this unambiguous. Reviewed-on: http://gerrit.openafs.org/5526 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d54a9994d362ce3f287fe786839ec72f6d94806c) Change-Id: I0bd3e50dec4e686acc3e9cda3eef7b7909266f27 Reviewed-on: http://gerrit.openafs.org/5544 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit accf7824d2528894e791088326128dee85bc6a31 Author: Derrick Brashear Date: Wed Sep 28 10:23:19 2011 -0400 ukernel: output dataversion in stat struct if possible we already have this data; if we can output it, do so. Reviewed-on: http://gerrit.openafs.org/5510 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 955bab670d0aed714fc940b5be7e2b75896a63d0) Change-Id: I9ce28fcb20cee8f15f71cd734b9da0ad85c12c3f Reviewed-on: http://gerrit.openafs.org/5541 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f1ee0582b63918560de368697e03b564c862a565 Author: Derrick Brashear Date: Wed Sep 28 10:11:16 2011 -0400 ukernel: make web enhancements the default none of the web enhancements break base functionality, and they are strictly more functionality; just turn them on everywhere Reviewed-on: http://gerrit.openafs.org/5509 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 80943970b8cfcdf3fc630b25804aebaea228bd73) Change-Id: I3d8dedcb84bda70bc3183afcb09ca619c5390476 Reviewed-on: http://gerrit.openafs.org/5540 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3c37cbdff1f290839d79315e596586fa128401c3 Author: Michael Meffie Date: Thu Sep 22 09:13:18 2011 -0400 bozo: report bosserver -rxbind address Create a file on bosserver startup called bosserver.rxbind in the server local directory which contains an address local scripts may use to contact the bosserver. When bosserver is started with the -rxbind option, write the address selected from the intersection of the interfaces, NetInfo, and NetRestrict configuration to the bosserver.rxbind file, otherwise write the loopback address 127.0.0.1. Update the RedHat init script to use the new bosserver.rxbind file. Reviewed-on: http://gerrit.openafs.org/5488 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726) Change-Id: I44f6f28d750aa0e463093655a64df8099b8d2cd4 Reviewed-on: http://gerrit.openafs.org/5539 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 786c0088b7fe6a78a198de927a2e653fd2e66175 Author: Michael Meffie Date: Mon Sep 26 11:59:55 2011 -0400 bozo: fix overrun from -rxbind on restart Fix buffer overrun in bosctlsrv introduced by commit 544ff1b295a57b50afefa6146094434db7608355 Reviewed-on: http://gerrit.openafs.org/5504 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 48e326372d89b0d778420f268dbe59236758eba8) Change-Id: Ic1226d7d093e3d0ab364aa72d676110a6c382dc2 Reviewed-on: http://gerrit.openafs.org/5538 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f008d3d5f64eea9a9459641fd91bfff79236d0b4 Author: Michael Meffie Date: Tue Nov 23 20:21:50 2010 -0500 bozo: bosserver -pidfiles option Add an option to bosserver to create pidfiles for long running processes for simple, fs, and dafs bnode types, as well as the bosserver process. The pidfiles are located in the server local directory by default, or in the path specifed by the -pidfiles command-line option. Reviewed-on: http://gerrit.openafs.org/5497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bdf86d245fd55c5c7ac7ea81e3d6b6bafdbe1783) Change-Id: Id76530b81e2e92c76a015510d04dc8d5e5fd75ce Reviewed-on: http://gerrit.openafs.org/5537 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1aa1446b7a1b75b503fab968cee92ca73319f82b Author: Michael Meffie Date: Thu Sep 22 11:28:17 2011 -0400 bozo: pass -rxbind on restart Pass the -rxbind on restarts when bosserver is initially started with the -rxbind option. Reviewed-on: http://gerrit.openafs.org/5487 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 544ff1b295a57b50afefa6146094434db7608355) Change-Id: I042cce8043bb0797b5c654118c2254f93903a4fa Reviewed-on: http://gerrit.openafs.org/5536 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dda39417e94e4463dd0fa49dddd918bc3a8765a6 Author: Marc Dionne Date: Wed Sep 21 20:31:33 2011 -0400 fs: fix setserverprefs where long is larger than afs_int32 Make the fscanf and scanf format specifiers match the type of the target variable. This prevents trying to store a long int into an afs_int32 variable which may be smaller, and overwriting neighbouring data on the stack. The effect on a 64-bit Linux system was that the high bits of "rank" would overwrite the first 4 bytes of the scanned host name, causing setserverprefs to fail with: : couldn't resolve name. Reviewed-on: http://gerrit.openafs.org/5486 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 649d3a0957eef0c607a63b47f11bd4a0ca8655ca) Change-Id: I5869423a8512e6e5d64162b17a69106355ca3639 Reviewed-on: http://gerrit.openafs.org/5535 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a16c594a127e9789215c1404c6cfa161dc090b07 Author: Marc Dionne Date: Wed Sep 28 21:15:32 2011 -0400 rx: add post RPC procedure capability Add the ability to specify a procedure that will be called after the end of each RPC for a service. This is similar to the existing afterProc, except that it gets called after the RPC has ended (after EndCall). rx_SetPostProc and rx_GetPostProc are provided to set and retrieve a postProc for a specified service. Reviewed-on: http://gerrit.openafs.org/5529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5587bbfc0bc70de234e5655faf7676cf2b9b9715) Change-Id: I1f0a5007b0cf0723ef3ade6a14e72aece2d3cb0f Reviewed-on: http://gerrit.openafs.org/5543 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6c31367a0d04f89b0056614ec5e9e1baf742bdce Author: Marc Dionne Date: Wed Sep 28 18:39:55 2011 -0400 viced: remove duplicate declaration viced_uclient_key is declared twice, remove one of the declarations. Reviewed-on: http://gerrit.openafs.org/5515 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 11a6fc948983c0a9f1fb41c58b9559750763440b) Change-Id: Ie05ca3af9d1e6c08272335b09cb3c7a80879fc66 Reviewed-on: http://gerrit.openafs.org/5542 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1cf667e0df61651538bef9b7b89f1ec98acfe6c3 Author: Andrew Deason Date: Thu Sep 29 12:04:07 2011 -0500 afs: Remove afs1_readdir The function afs1_readdir is not referenced anywhere. Remove it, as it currently causes compilation errors (a typo with the origOffset/orginOffset variable name). This is a 1.6-only change. afs1_readdir was removed on master as a part of commit 0284e65f97861e888d95576f22a93cd681813c39. Change-Id: I7bd3f73867abb53df0cd2a96180b7cd5f19de3e6 Reviewed-on: http://gerrit.openafs.org/5522 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4af0a7aa716f5750e9894a71553575f06b15eae0 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. Reviewed-on: http://gerrit.openafs.org/5398 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6c18c8844f3be6e006c7f59b3cc36f5b1688e04f) Change-Id: I743432161a80799e11875cdbcb09b1b15d681d77 Reviewed-on: http://gerrit.openafs.org/5413 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b26ed0b20c0c5ff2b06314d28f0df3f1357dd8f9 Author: Michael Meffie Date: Tue Sep 20 16:21:50 2011 -0400 salvager: fix filesystem path truncation Fix filesystem path truncation for vice partitions beyond /vicepz. Commit 3d7388b7 moved the filesystem path to a fixed size buffer, however the path of the filesystem to be salvaged is truncated for partitions with two character ids (e.g. /vicepaa), in which case the salvager will salvager the wrong partition, or abort if the truncated path is not present. (cherry picked from commit 1e487f6026fb559638fab256362dbda9d4b4a8b1) Change-Id: I1f69b580e4db59f9e8dc245348ede176fc1d23c1 Reviewed-on: http://gerrit.openafs.org/5474 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 313bd38a3a8b64e631fd72944b763c25cdb3275b Author: Jonathan A. Kollasch Date: Fri Sep 23 00:06:35 2011 +0000 afsio: fix build outside of srcdir Change-Id: I4bab36fe3e3958b3b676bab852192eb1c4cd14fc Reviewed-on: http://gerrit.openafs.org/5492 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1fd3ddfedbef0bad28a569e048ea830d788d5184 Author: Derrick Brashear Date: Wed Sep 21 12:55:39 2011 -0400 afscp: enable debugging support in the volume portion readd the missing code when we are compiled for debug Reviewed-on: http://gerrit.openafs.org/5483 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c208b13fa024295c9064364520ef790b093e292c) Change-Id: I2b9466872b82e5ff8262b44a4bc767f11dc79216 Reviewed-on: http://gerrit.openafs.org/5485 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 38b0b3d9c9bed880c450235989d7bb55884925b1 Author: Derrick Brashear Date: Wed Sep 21 02:03:30 2011 -0400 afscp: allow listing of bare root.cell dirs in dynroot mode don't assume that /afs/cell.name (as opposed to /afs/cell.name/) is bogus. if there's text, at least try Reviewed-on: http://gerrit.openafs.org/5480 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb1d7491fbe2e90300b23284f213cac2bdcd56ac) Change-Id: I249b9a92b8931f0ac6feafdb9a0576bc83064c6f Reviewed-on: http://gerrit.openafs.org/5482 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 83cd580daa099146edb8a0703a1b9075c7798633 Author: Derrick Brashear Date: Tue Sep 20 23:26:25 2011 -0400 afscp: add confdir override allow an alternate config dir Reviewed-on: http://gerrit.openafs.org/5476 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 97004b7b0970bfc2744df49d540521a41177cac8) Change-Id: I6e0ac4b3a457dafe27ea380bf25ca2d7c8f7361b Reviewed-on: http://gerrit.openafs.org/5481 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 00f2b2b35978b6d689b025d78c995a4888d9e246 Author: Terry Long Date: Tue Sep 20 19:27:35 2011 -0400 Fix AFSPreference compile error on Mac OS 10.7 Lion llvm/clang complains about main returning void instead of int. Fixed main to return int in DARWIN/AFSPreference/afshlp.m. Change-Id: Ic251cc3d21357ad5493b53ac7b802c648a728f76 (cherry picked from commit 76e0b97eaa64088b8d8381a80b6ada0a080f0cbd) Reviewed-on: http://gerrit.openafs.org/5472 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 02bb6cd628eca68aa081b389666d4ff004fabd08 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 Reviewed-on: http://gerrit.openafs.org/4834 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a00b11221b559aee9a3412b78757173abeabaf77) Change-Id: I127b34f8575bf3ff156d6a724cb2fa2312cc2154 Reviewed-on: http://gerrit.openafs.org/5478 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a2725f197f3094441666df13746632dc4436b8fa Author: Derrick Brashear Date: Tue Sep 20 23:52:57 2011 -0400 darwin armv6 and armv7 support simply compile lwp process assembler for both arm arches. Reviewed-on: http://gerrit.openafs.org/4832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a3f27333c5521fdc52314bf510943c602b3cd1a0) Change-Id: Iabb3490d20a441b0bb535e444b0930f5533723b1 Reviewed-on: http://gerrit.openafs.org/5477 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2c01980d4eadf848e82f738a59c375be4f57abe3 Author: Jonathan A. Kollasch Date: Thu Apr 21 10:20:55 2011 -0500 Fix build of user-space on nbsd50 and greater Reviewed-on: http://gerrit.openafs.org/4509 Tested-by: BuildBot Tested-by: Jonathan A. Kollasch Reviewed-by: Derrick Brashear (cherry picked from commit da3ee813960d90ea83851c47fbd59eb3012c7904) Change-Id: If5d8b7e2edd3a8b6ff3cec97800900011fb6ea90 Reviewed-on: http://gerrit.openafs.org/5423 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7c1bba0052576bd3be51961856144644f88e8be6 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. Reviewed-on: http://gerrit.openafs.org/5427 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17be9b775c0be234879eeda66707581e23a18d08) Change-Id: I2e3fbfb922614d9888e9e6957bff66bbb407abfa Reviewed-on: http://gerrit.openafs.org/5429 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e9bdb26f5a430ebe2042a13afba36d75d66dffbd 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 Reviewed-on: http://gerrit.openafs.org/5426 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d355b4d6fce477e275ac34eb04b3d0f5504dd6fb) Change-Id: I0fe583c65e6352b9f33786df5a836c4df52301cf Reviewed-on: http://gerrit.openafs.org/5428 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e909c5158b5b8ad9c77dee9ebd915fba436460f8 Author: Jonathan A. Kollasch Date: Thu Apr 21 08:24:15 2011 +0000 Add nbsd60 param files and autoconf logic Reviewed-on: http://gerrit.openafs.org/4512 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9fd238ea056b6883dd1caf6e8e724ad3ddabeb3a) Conflicts: src/cf/osconf.m4 Change-Id: Ibac29f9b80624800db7c2829153fb9b2aeb44d6c Reviewed-on: http://gerrit.openafs.org/5422 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 557c553a6d228010c3a684fe68328aa2fc4aaf1b Author: Jonathan A. Kollasch Date: Wed Apr 20 10:00:34 2011 +0000 Allocate system type ID numbers for i386_nbsd60 and amd64_nbsd60 Reviewed-on: http://gerrit.openafs.org/4506 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8588f4a9ccca164b566a4f855345f3d529f4125f) Change-Id: I3f3245c33e7c1ed2c263fce6b799860f58a0e9bb Reviewed-on: http://gerrit.openafs.org/5421 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 680c960f48c8f71901d100acd7fd607fee1aa63b Author: Jonathan A. Kollasch Date: Wed Apr 20 09:53:52 2011 +0000 Make whitespace consistent in NetBSD system type ID number section Reviewed-on: http://gerrit.openafs.org/4505 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 507c481a0a3bcb3ab1341f0c2b1ef00797160708) Change-Id: I21d9b385400d1a72ba627e0b67f418056aeba070 Reviewed-on: http://gerrit.openafs.org/5420 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 294c433061c021cf55e72b0c6b18f5f2b359a7f5 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. Reviewed-on: http://gerrit.openafs.org/5408 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 11b6f9f0034a3934ffcf1dea8b1bfd915e7522ed) Change-Id: I80a50febaa8b367c40abfed18a08dae4b1d846c4 Reviewed-on: http://gerrit.openafs.org/5409 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d7c25b2995875df8c6abd3c1992ceb4aac3575f6 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. Reviewed-on: http://gerrit.openafs.org/5377 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8d939c08f60b44c83ed8db8892b93563ddea0e15) Change-Id: Ic22dc3b6e6c6d330eeabddead7ed8f0a0da73b57 Reviewed-on: http://gerrit.openafs.org/5407 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 675e32abe0a91f937ca0fb86591ccb6668057b60 Author: Derrick Brashear Date: Tue Sep 13 14:44:32 2011 -0400 afscp: add decl for roken function strnlen needs to be declared if we provide it Change-Id: I31183b1c98e6e30ba166ea05c49132872f66029a Reviewed-on: http://gerrit.openafs.org/5406 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f4dd94edf7384dee912a09354f500d08421f94d4 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. Reviewed-on: http://gerrit.openafs.org/5308 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 597de25969ebdeaafb7390984b5ce2c8782fd557) Change-Id: I4ac2e4d10ce20f8575b35385e324b637dffd0671 Reviewed-on: http://gerrit.openafs.org/5404 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 026d9fb3b74ce49d3cfef47659bb05fc2ec77e51 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. Reviewed-on: http://gerrit.openafs.org/5305 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1) Change-Id: I4360eede894846a52c54c29486fa774bde3def5e Reviewed-on: http://gerrit.openafs.org/5397 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 27b01dd436f9d6862eeb6633817ea8b9f4ec4a02 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 Reviewed-on: http://gerrit.openafs.org/4476 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f4ae9ef6531cb629e0bac2233d97cf8a0f3a698b) Change-Id: I2011486d6d604dbebf9f91afd7eebd50b5438e16 Reviewed-on: http://gerrit.openafs.org/5384 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9f00179e207b5eb298d529a488786ef13947ae08 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. Reviewed-on: http://gerrit.openafs.org/4997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 8df379696ca6303cd2e4cd3eed34e4552725853b) Change-Id: I6b01cf20bb2e08b73985ce069e24c196060cd711 Reviewed-on: http://gerrit.openafs.org/5390 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1b77512fc919baa281c19fb0bd59cceadacd102d 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 Reviewed-on: http://gerrit.openafs.org/4578 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 675bd1007de6594321c03d6f92261f909120643f) Change-Id: I9706a4d05044740fc6bb700fc5f1ef92923ce4bf Reviewed-on: http://gerrit.openafs.org/5389 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 48f9ce6e3a7406eec1a9a6dc481743ad41284103 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). Reviewed-on: http://gerrit.openafs.org/4577 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 64c92b24447aa1a86a4557d6bab3a72b38640fce) Change-Id: I32ad1e26ab4f45647a69c0641e3027006e28bc2e Reviewed-on: http://gerrit.openafs.org/5385 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e475ca5410dcb79b26c9c5e79ccdb9d9f2357a86 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. Reviewed-on: http://gerrit.openafs.org/4381 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 94d44d59e3d18f1d450e495a55fdd927e7584948) Change-Id: Ibe140c58970f1b4f2f9e7f016e55d770f8cdcc09 Reviewed-on: http://gerrit.openafs.org/5383 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ac301978a0eede1bfad56d164c1aa514db0e3098 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. Reviewed-on: http://gerrit.openafs.org/4761 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6af6a6a7cb497d4e255bed7ccf07a5db06d16b91) Change-Id: I6aab1c62cc5f341628d4fdfe9aeac1293e37cf10 Reviewed-on: http://gerrit.openafs.org/5388 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8e3cb5ddcab7d3c6cfc274851da3e9835e1e9d0b 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. Reviewed-on: http://gerrit.openafs.org/4644 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e4dc78845cec721013be4170231936ef371afe2f) Change-Id: I9c80d61fc73af936cc87c87033a121cf4593a4c9 Reviewed-on: http://gerrit.openafs.org/5387 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a5b466e93108d5434459c24df756cfc04bbcd8d 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. Reviewed-on: http://gerrit.openafs.org/4620 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit cb6cd6484edc0e026fe15e11fe86b9dcf106568d) Change-Id: I8131c788fdcceee330f66bb8b47f76324b1735b1 Reviewed-on: http://gerrit.openafs.org/5386 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 512211265fe24a291fe50a696f52c0370612759e 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. Reviewed-on: http://gerrit.openafs.org/4475 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 03edae9cc562524c04e06734d12d87b9a7a4622c) Change-Id: I8fd6e99faff18f310954cbb2bac3dc36d9362a36 Reviewed-on: http://gerrit.openafs.org/5382 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 59dceb56aa299bc41e8af88c397eb3fbc4a2a78f 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) Reviewed-on: http://gerrit.openafs.org/4474 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 25a46780fc0e9f64010cc06826e5753567c16647) Change-Id: I71fed5388074b3ca33c374e57a921ff3f4f2e410 Reviewed-on: http://gerrit.openafs.org/5381 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 25e726c03df3ac50d41a075154eb2550868b6cd0 Author: Derrick Brashear Date: Mon Apr 4 13:43:44 2011 -0400 afscp: build for windows attempt windows support for afscp Reviewed-on: http://gerrit.openafs.org/4424 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5349810730ff16c68280745398c136ddbdb2b8d) Change-Id: I568ddc0d257a8ac106426f9ecd4ab44c42ce160c Reviewed-on: http://gerrit.openafs.org/5380 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b55f479608d01e7733e0c78003323674fd66df12 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. Reviewed-on: http://gerrit.openafs.org/4380 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 53377153eca062ae6252dc8c71e7f6cb16214076) Change-Id: Ia1fbe4489b89d6b8c13f296243784233dcc6d158 Reviewed-on: http://gerrit.openafs.org/5379 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d7b2a676d7c863546ccab2b1c4e92ddea276b4ef 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. 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 (cherry picked from commit 08b7ca67a781ec93ae71677dd165133d9679a9bc) Change-Id: I007528fa01c9f20f29a5e7e5665e0865c71fe431 Reviewed-on: http://gerrit.openafs.org/5378 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 698f6e0301112184f9ac5872b1bf9e2e138eec47 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. (cherry picked from commit 85f917d0762dfb0c22cddf4b0cab3bf76efa0f62) Change-Id: I18c0dbbd53231c24e5b88e69231174c6ae74d234 Reviewed-on: http://gerrit.openafs.org/5327 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit beb17de11f7735719ce4e2326a53580519239df6 Author: Jeffrey Altman Date: Mon Aug 29 23:10:16 2011 -0400 Windows: version 1.6.0002 (aka 1.6.0b) Change-Id: I826c76f075f07d57defbcceb71366a65920ea4cd Reviewed-on: http://gerrit.openafs.org/5321 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7b8b968c7ddc7214aaaaa426c7b6fab8e617729b 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. Reviewed-on: http://gerrit.openafs.org/5323 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8d4f65c3021b3416d290a1d5f1e8e61d14a936c7) Change-Id: I96cd543480dd87f0998e36fd43deebd2142db1a0 Reviewed-on: http://gerrit.openafs.org/5324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 118242f874e28201f6e081fb5cb27816c6e4c2b6 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. Reviewed-on: http://gerrit.openafs.org/5315 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 971a103cd088ddbaf227d562fc64f8c728bbc235) Change-Id: I9cba8296271609220de2d0a7ecbb7721e4672077 Reviewed-on: http://gerrit.openafs.org/5320 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 706ee28ddd6fbc7e44d34beeab2cf9195d540716 Author: Jeffrey Altman Date: Wed Aug 24 00:11:44 2011 -0400 Windows: version 1.6.0001 (aka 1.6.0a) Change-Id: I819742abf74cfc90b55c99b7b99f554ef8cc2b7b Reviewed-on: http://gerrit.openafs.org/5306 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1d4bc784854e5980711e6cc72b06c7ab5f203e17 Author: Jeffrey Altman Date: Mon Aug 22 09:00:47 2011 -0400 Windows: avoid cm_serverLock refcount leak Reviewed-on: http://gerrit.openafs.org/5293 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit add66023a05bf9a380eef34bd4fcc80d343fffad) Change-Id: I021a7c77c5351914c9450bd7b28c2b6142f18567 Reviewed-on: http://gerrit.openafs.org/5295 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0cd0b9d87ff2afede9c25e87b9376c07516fbaff 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. Reviewed-on: http://gerrit.openafs.org/5287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 361cf11db36db2fc94c7e4961061423fb13e4cf8) Change-Id: I9e12ab8f0a749de3de1e9843705a294f913a5165 Reviewed-on: http://gerrit.openafs.org/5289 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a72ffe01a51fabfa3d3e241181973d1c9cbe6f9 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 Reviewed-on: http://gerrit.openafs.org/5285 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b88c0482f445e11d82804fba08e42944b7253200) Change-Id: I910a3e065576216ffb9d55847f5c2d9bfb174c4c Reviewed-on: http://gerrit.openafs.org/5288 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c7a37b4cf6a0237b940c05edca310a1591f9bab4 Author: Derrick Brashear Date: Sat Aug 13 22:21:02 2011 -0400 make openafs 1.6.0 update version strings for 1.6.0 Change-Id: Icbab545cc4f99356135a829cc995c5eaaa83dd61 Reviewed-on: http://gerrit.openafs.org/5265 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5bf54a3976c155e6f506359b9d00f67603e72289 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. Reviewed-on: http://gerrit.openafs.org/5278 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit ad6e19331e4f3ec6566dc224f1e1c943a69c62bb) Change-Id: I74d957ac47e10e7a3ddbcd0cadcd6a69deb7df99 Reviewed-on: http://gerrit.openafs.org/5286 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32239db8ec887a57d76f97096c04289e6c36e731 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. Reviewed-on: http://gerrit.openafs.org/5281 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 020b415be8fa357cded6eb4c50454aaa5b0722bf) Change-Id: I49abfa6d6e7b929e3880686f7dc7bad4175adcba Reviewed-on: http://gerrit.openafs.org/5284 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f763920f3647fb5cac6d5028bf97bb7fcc511f04 Author: Jeffrey Altman Date: Mon Aug 15 00:37:31 2011 -0400 Windows: add assertions to cm_scache.c Reviewed-on: http://gerrit.openafs.org/5280 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1a0b99e654831fe28794f8e0cec2ab94f07ec965) Change-Id: I5bcce8d961157ebb85049871bd15404d7a5ed94e Reviewed-on: http://gerrit.openafs.org/5283 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 392ed2ae9883dd1f32284b7a244e8b8eec8debfc 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. Reviewed-on: http://gerrit.openafs.org/5279 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c58ae34f72d25434cd59228806ca59a6ff39a903) Change-Id: I65f3c4be5436031cdd99d912b0277b54d4033bf6 Reviewed-on: http://gerrit.openafs.org/5282 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e970f3a577325422460af6e79f57e34b17fe22df Author: Jeffrey Altman Date: Sun Aug 14 21:41:47 2011 -0400 Windows: More interlocked ops for cm_cell flags Reviewed-on: http://gerrit.openafs.org/5274 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 73b91bf0c0a86e55d6879573aeadd99a137ebf3b) Change-Id: I0d79599b22c50523f975d51de4fe2a9eb07c1fdb Reviewed-on: http://gerrit.openafs.org/5276 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 41ae78c2a9b4d04748d80698b0ee9778194e0f2f Author: Jeffrey Altman Date: Sun Aug 14 21:41:19 2011 -0400 Windows: Interlocked ops for cm_user flags Reviewed-on: http://gerrit.openafs.org/5273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f75214282795b23c433b2512b00d24b3e6166b76) Change-Id: I092a0d74919b1d8ecf62fbb57c5b957f16184a05 Reviewed-on: http://gerrit.openafs.org/5275 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e1be9ceaff313b4b70e431bb6d88b57a45447def Author: GCO Public CellServDB Date: Sun Aug 14 18:43:08 2011 -0400 CellServDB update 14 Aug 2011 Reviewed-on: http://gerrit.openafs.org/5270 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a5d66d05fa0308d505de8bde59442e29be9d04f8) Change-Id: I511bd54512c30dced28d8a0bc79424a5b82d91cb Reviewed-on: http://gerrit.openafs.org/5271 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ee422deb20a54eeedbb0be954a846e6bdc5954bc 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. Reviewed-on: http://gerrit.openafs.org/5268 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b97383c1e68a0b94baa8d05b2ab2531f96e7b63c) Change-Id: I1fb188fa493554dce366cbc4b84a32528486829d Reviewed-on: http://gerrit.openafs.org/5269 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c4e3b49fd7581d3229974e8c5f7cb13203a99cd9 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. Reviewed-on: http://gerrit.openafs.org/5266 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c20010850e2b43a0b9a6d74357ea6111dbf3409e) Change-Id: If13f23a921f598db097b391348513a3300d3b10c Reviewed-on: http://gerrit.openafs.org/5267 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c31e02622bf0d85d1d46cc8c3e2a3dccce4aa3ae 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. Reviewed-on: http://gerrit.openafs.org/5258 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 5b40c5f5294964fc09df2c8332ab63cd2d729264) Change-Id: I94398476267dda82e82306a87aa0bba6aa41da00 Reviewed-on: http://gerrit.openafs.org/5264 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9a9bc597c0994063dd2cf75ea653c41bee7290ff 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. Reviewed-on: http://gerrit.openafs.org/5248 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8f446c7463c9183d59a30343682e31ad9f85b307) Change-Id: I0ed8ea1551527e0d62e57967da6816415a3b36b5 Reviewed-on: http://gerrit.openafs.org/5254 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8729eb3984a99d1c2994dbbde3df97cb5f51ae3e 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. Found-by: clang static analyzer with help from AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5260 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 10d27341808be41b29fbcc09b8bd7523c3b7a541) Change-Id: I4ff3ab9a57c1c48be0f7533ab3adb1e4b6ababf9 Reviewed-on: http://gerrit.openafs.org/5263 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6fb10a85b1e7d0d80984c33d9e93e42115704f36 Author: Jeffrey Altman Date: Fri Aug 12 19:01:56 2011 -0400 Windows: remove unused variables in fs.c Reviewed-on: http://gerrit.openafs.org/5247 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 578db3bbecf218e3ab80f4896b7cde4d3975daaa) Change-Id: I8c334239a888d88422ca65d3372228417d60657a Reviewed-on: http://gerrit.openafs.org/5253 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e32e873b89e2d7f73e17fbc7d1f89501ad5afc2c Author: Simon Wilkinson Date: Fri Apr 15 19:40:45 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. (cherry picked from commit bb25bdfcb059fc54a57fd4733ce3184e231ca88d) Change-Id: I7290dbaad66bccfe3b03a843184464f0681f9429 Reviewed-on: http://gerrit.openafs.org/5250 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a1e2aeb3f060c15313b271bfc66b7797c8cadf1f Author: Simon Wilkinson Date: Sat Jul 16 23:30:59 2011 +0100 libafs/dir: Verify directory pathnames Provide a new routine, 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. (cherry picked from commit d1946ffe9be0031a2daf907f5e96cf0ee7f5e15e) Change-Id: I69b9465f02417babf9b1d5179197278fac64f192 Reviewed-on: http://gerrit.openafs.org/5249 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8c2711baff2403ed13131e13c244879fd39a9a0c 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. Reviewed-on: http://gerrit.openafs.org/5240 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 145a8490c761a0ebf7b3a1cc3017bbe8635f8014) Change-Id: I0efe2ee18e36f0531de8261e5f032df7de3d7333 Reviewed-on: http://gerrit.openafs.org/5252 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1754f341b0f2e0233ba8940ccfb4e666f0084a6 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 Reviewed-on: http://gerrit.openafs.org/5246 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ef3ef1992115e6b61a7859fa2295726af0fb9318) Change-Id: If0bfb3fdf4d8499dfe14435739317f335a4c164e Reviewed-on: http://gerrit.openafs.org/5251 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5abed0aa67092cc488a8f8a343282188f00297e0 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. (cherry picked from commit 03f0c656c1734b9be4debdf19b8f10771ff4420a) Reviewed-on: http://gerrit.openafs.org/4625 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: If19a267e23941e3305f4f13cd91a0935d214f1b1 Reviewed-on: http://gerrit.openafs.org/5232 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d215fa3b57acaeac54d88f078bf210e3fd7b0866 Author: Derrick Brashear Date: Fri Aug 12 18:12:33 2011 -0400 1.6.0 release notes add release notes for 1.6.0 Change-Id: Ie1f7c025b45d333c5bd7d17981a7d36e2992107e Reviewed-on: http://gerrit.openafs.org/5245 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d4952d2f41c04509817a5f39ceff4a152d65c52 Author: Jeffrey Altman Date: Fri Aug 12 16:30:26 2011 -0400 Windows: ChangeLog for 1.6.0 (final) Reviewed-on: http://gerrit.openafs.org/5239 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6f725c441529ccd1616adeda19c7c0b43dcfd9cb) Change-Id: I40e3c8ccb6b490fe02b22995f1e2341c0e3048ba Reviewed-on: http://gerrit.openafs.org/5244 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bf236c0f8a2bb7aa10c776fc90b4fd00e6ada823 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. (cherry picked from commit ef28bc08c18e750f6100535665d5258a317a0a2b) Reviewed-on: http://gerrit.openafs.org/5086 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I8bb484aade39830a56cb967a3e3167e63777e333 Reviewed-on: http://gerrit.openafs.org/5127 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9b090b9f776835a4d23202e5dbcbca70ff9087df Author: Derrick Brashear Date: Fri Aug 12 17:24:55 2011 -0400 doc: add old release notes pull in old release notes Change-Id: I2865c1e7a6490bf11e77d63d2acd7f2bdf99b150 Reviewed-on: http://gerrit.openafs.org/5243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f0b590bcc084e7e3873a2236ffba13b8c62151cb 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. Reviewed-on: http://gerrit.openafs.org/5197 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ab34058120ebcc218e4061ea3ac3c8eeca6d83e) Change-Id: I8cbc806833af630fb56c8ef388fe3a21df1f5478 Reviewed-on: http://gerrit.openafs.org/5218 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b4466997b44c21e2b139c560815b1f9289863f11 Author: Jeffrey Altman Date: Tue Aug 9 17:25:50 2011 -0400 Windows: implement InterlockedAnd/Or for X86 Debug Reviewed-on: http://gerrit.openafs.org/5191 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ec1295d11b5e75fa942fe8c3a0f16309c5486ed4) Change-Id: Icd6b76abec2c9a677b5e344ef36587bfbe696a43 Reviewed-on: http://gerrit.openafs.org/5212 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 730021e079dc3654bdb6996e43f19c55132254f4 Author: Jeffrey Altman Date: Wed Aug 10 11:42:59 2011 -0400 Windows: Interlocked for cm_buf cmFlags Reviewed-on: http://gerrit.openafs.org/5196 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4876a416d2e59e87f9da8834db1ea4770f2c618c) Change-Id: I7416e0be7f0de82eddc366dbdb77e94ceabab797 Reviewed-on: http://gerrit.openafs.org/5217 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3fde0ae7608959a4fc9de6294cacef30f1d32012 Author: Jeffrey Altman Date: Wed Aug 10 12:02:20 2011 -0400 Windows: fix tptserver director creation Reviewed-on: http://gerrit.openafs.org/5195 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8661c9b6710322195b00de6ae03b3172712104aa) Change-Id: Ie762b896e68028053a8746181f2086af57e02d0d Reviewed-on: http://gerrit.openafs.org/5216 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cd465d19ac1f9583cd3519c916502e2e960355e6 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. Reviewed-on: http://gerrit.openafs.org/5194 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cbd075a36000d0b54b64eb7d9736587b27a08e9e) Change-Id: Ib2b11cbadcbdbc244866d6bf90ab4d55ef589819 Reviewed-on: http://gerrit.openafs.org/5215 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d6092bab7a9e4a07d1a96040b7ec70da47fd5b79 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. Reviewed-on: http://gerrit.openafs.org/5193 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 75297d4439bb30ddd9968805aecf2cc2812bfdf0) Change-Id: Ic10b726eb5791c7c8d3eb7c3ad529522f627f73c Reviewed-on: http://gerrit.openafs.org/5214 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c99d8b7aa34dff9e44647969b3c352aa61350324 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. Reviewed-on: http://gerrit.openafs.org/5192 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit deb8c893c2bd78b2871ccf1ff733539534a2890e) Change-Id: I3d0a31e9f809aa91009a8cb1256937ab9646818a Reviewed-on: http://gerrit.openafs.org/5213 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74f9ffb8bcee66b3d9075ae7d9f1466878f70468 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. Reviewed-on: http://gerrit.openafs.org/5189 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6691ff6daceb7960dc925983a2b9129877e67c9a) Change-Id: I954ea5a567bbfd77b02d3e8634a64f877668280e Reviewed-on: http://gerrit.openafs.org/5211 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2d2ad3cf0f0f095e014a4a25053ffe27918aeb15 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. Reviewed-on: http://gerrit.openafs.org/5161 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c5126838590eaf15e0df569c31b2a1bc12b3e0af) Change-Id: Icf60ad3127c295e4fca0e99e338ba4c62cd9e392 Reviewed-on: http://gerrit.openafs.org/5210 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f56ed3253554b55987d5c59d370e4ed3377bc10 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. Reviewed-on: http://gerrit.openafs.org/5159 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17e50a4b98de057a699681261ba126a5ac12a0cc) Change-Id: Ifc8d7b6a92e32557575e24cec7513f890439ce67 Reviewed-on: http://gerrit.openafs.org/5209 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b631ff9b93737d0452b024421c236379fc92b8c8 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. Reviewed-on: http://gerrit.openafs.org/5158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2bce3b50ef4fd9b9bdd03daf6e8332710f541922) Change-Id: Ie4400d769a7ac2d0bfed3ccebe02760619bb76b2 Reviewed-on: http://gerrit.openafs.org/5208 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 758c5867bafcce658c79cf193b061ce7b77f5523 Author: Jeffrey Altman Date: Tue Aug 2 18:24:56 2011 -0400 Windows: use %p to print cm_scache_t pointers Reviewed-on: http://gerrit.openafs.org/5152 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4111ee2374d030e1f3bb1fa3530f2877f2576d07) Change-Id: If4ff7b219cce5c631666e0843123f6c7d8dbcec6 Reviewed-on: http://gerrit.openafs.org/5207 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99b4d146fb0cf4f3d2449531d7484361028ec5bb 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 Reviewed-on: http://gerrit.openafs.org/5123 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6b83ba621b520174dc4679c220888619dc0b44a0) Change-Id: I4103875caba88d61c3edf480f3a7e0b24227a319 Reviewed-on: http://gerrit.openafs.org/5231 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b51cadd464887b8607b61d9ee6493bb344474840 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. Reviewed-on: http://gerrit.openafs.org/5117 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b621a2986099488426a026818532a9600db9aeba) Change-Id: Iaa5db97e9fc87d1eb083d20a9fc6a49cbb5a066b Reviewed-on: http://gerrit.openafs.org/5230 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0e38a8fd8043f34da12741f6272a380d9a7b9dcf Author: Derrick Brashear Date: Mon Aug 1 10:58:28 2011 -0400 vos: spell "vldb" correctly i'm not even going to ask. Reviewed-on: http://gerrit.openafs.org/5125 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d54c9b05d003bf861fd51e904b631e5425a079d6) Change-Id: I0188a58363657a0ccf48afef79bf63ff4c4b4f9d Reviewed-on: http://gerrit.openafs.org/5229 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 55af68293e3d49be631723460539c4a5447e6477 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 Reviewed-on: http://gerrit.openafs.org/5156 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 400c72561e7622716a46a38affd2f5a7842519eb) Change-Id: I0ff6463cc63093f1c82ed74523256cbdb7fc75c8 Reviewed-on: http://gerrit.openafs.org/5228 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3fd135d48b76b2e54329b75e53a67cac1abb29d4 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. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5164 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 619b420903c99e48618db0d2f12085111573f279) Change-Id: Icd76d3ac160ccb04b05445552a9e6d04f053efbb Reviewed-on: http://gerrit.openafs.org/5227 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09565faea51e624306a2ddcbbb898888db987a12 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. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5166 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c92f04af6094ce04b1541a1b23b254d3c1421290) Change-Id: If99aaf327749550623ef5abc3dd077f5291bc899 Reviewed-on: http://gerrit.openafs.org/5226 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4aacd49270900f9a882a6265beec4b126df61d8b 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 Reviewed-on: http://gerrit.openafs.org/5130 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 496fb87372555f6acddd4fd88b03c94c85f48511) Change-Id: Id64a771f9cb50191a665f5ccb98ec66d991f47bb Reviewed-on: http://gerrit.openafs.org/5225 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f648519f2e7008d81a29113d6ce23158dcd37bcf 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. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5167 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 43834bff1a2b1af348ff69d538a884bf1070b90c) Change-Id: I05d1602b3f59b521d7daa3fd23f6609bf14c460e Reviewed-on: http://gerrit.openafs.org/5224 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b8f95c1535538ddd4631a9b8d7286df030accc5a 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]. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5169 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 90ea68979c6740583747d0af500ed4a034eba651) Change-Id: Iff8072cf8c7b5d9a5d7486fc9778f079fab1426c Reviewed-on: http://gerrit.openafs.org/5223 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32dcb109e35b96b2de81812d2ca613a47827811f 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. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5178 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit bf4b2fd3e26dcf2a0db704815e05d77a558d38c6) Change-Id: I92db9e5ec10054cef4421ab1b2fd0f60baaf07ca Reviewed-on: http://gerrit.openafs.org/5222 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 30ed969917a034f5ada832ad72deb812f3228ac5 Author: Simon Wilkinson Date: Wed Aug 3 19:07:14 2011 +0100 tbudb depends on tubik ... ... so say so in the Makefile (cherry picked from commit 88725587e97d717086801b2522e4625e5fdeb3a8) Reviewed-on: http://gerrit.openafs.org/5155 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ibe759403533cd4b2d538cf1cd905c6268a341f0f Reviewed-on: http://gerrit.openafs.org/5235 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f0367e2168b3ba1012f723ab13fa231fa4f61ff0 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. Reviewed-on: http://gerrit.openafs.org/5206 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d18ff03b59cf26423795f735decdcaf13097c446) Change-Id: I3949fcb69e14c00e0ade2826345be489426d7a04 Reviewed-on: http://gerrit.openafs.org/5220 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a2dacced44c8fdae74dd2c7faec94156ec8f8c4a 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. Reviewed-on: http://gerrit.openafs.org/5181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a3b4cd3c7325c7878ec7b47008f0eec8bfcb1175) Change-Id: Ic761e487ef0cfe402103bf06bd051958b07641b9 Reviewed-on: http://gerrit.openafs.org/5219 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a607422134c790ca7f35c688d2e8f1878a2c0015 Author: Jonathan Billings Date: Thu Aug 11 13:48:48 2011 +0100 rpm: Set executable bits on installed libraries 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. This change is part of 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149 on master (the rest of that change isn't applicable to the 1.6 branch) Change-Id: Ie95d0d5e16745cfbf0d2a733a9421f94a89216ff Reviewed-on: http://gerrit.openafs.org/5204 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 592b0419bdf3c1af5ecc8f10685e4a2e5df3976d 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. Reviewed-on: http://gerrit.openafs.org/5026 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot (cherry picked from commit 30cd8dafa73d90a943f00af05e4841699bc18534) Change-Id: Ib6b7448b5e123a593d595b73f8102d82d1ae2535 Reviewed-on: http://gerrit.openafs.org/5203 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7f3f28adb7ff1ba6de9aa7195a094ff5d0666ca5 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. Reviewed-on: http://gerrit.openafs.org/4970 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 84a3c4714fce3c1722802963e1fcc4d7dad8cc55) Change-Id: I16c2a4a6586e63be967b5fb019ede10a24c6cde4 Reviewed-on: http://gerrit.openafs.org/5202 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3f70a7dccc8ec420872afda840e93423c0ac575a 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 Reviewed-on: http://gerrit.openafs.org/4969 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 15c073887b905adaef301863ed87c49f9d77b394) Change-Id: I047f535b023a01468a3ad169d1742002abb59123 Reviewed-on: http://gerrit.openafs.org/5201 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 24471095dc768f13c4b246f1ff04c5793c93a1c3 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. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5174 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit ae6a3929489035ddcd17785abab8900cebd22eb3) Change-Id: I5c79189f82a636b923c074d3c69cb3b6fef732aa Reviewed-on: http://gerrit.openafs.org/5188 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4952c8212a1dd3d996eb4577b0390f21b2ee4cb7 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.) Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5183 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7d0cd1393ff5c69cba2f14fc76aa8f7ca588ccc3) Change-Id: I57198967ad022f50af073ac43643f3a55b0801ef Reviewed-on: http://gerrit.openafs.org/5187 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 362414f7aa04ec15dde4441479cac54be43c75f5 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 Reviewed-on: http://gerrit.openafs.org/5184 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8607d8d250fb41fcf4e60a09917f971c4d6104a) Change-Id: I2ad487e348f84cd7ced884c920230e3371fce902 Reviewed-on: http://gerrit.openafs.org/5186 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba3a5a7de2da13a02f4502f90d23ccc00bb7a69d 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 Reviewed-on: http://gerrit.openafs.org/5149 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from fec4e6bc595014f34c38707c0015c1f76edd770e) Change-Id: Ied99d695c59242903d39249c1d1bb25058d40a24 Reviewed-on: http://gerrit.openafs.org/5151 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d3ff190e148a0407bc82122f40003f6060dfab9e 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. Reviewed-on: http://gerrit.openafs.org/5129 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from f631a11f5e9ab50e62b3aaebbff9ef200ac799fe) Change-Id: I528547f95ebbe83390924844d21a9e850dc5967d Reviewed-on: http://gerrit.openafs.org/5148 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 19cd276d0969853de86c0067980353eeb7309eef 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. Reviewed-on: http://gerrit.openafs.org/5128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 71e64b6f21817872676e74a8c67c0f0bcfb23391) Change-Id: If6582d7242418c15eb007471199a6dfcc6732e3b Reviewed-on: http://gerrit.openafs.org/5147 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a36705f48889821ff38c6f8fc72c5ccb980e14ac 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. Reviewed-on: http://gerrit.openafs.org/5120 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from afc3ded56795d30e4e0f38d11f8302568943c49b) Change-Id: I92610c215d7d44ceb1894bb3ab7784534a66e452 Reviewed-on: http://gerrit.openafs.org/5146 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cf11acc2fd82170f891042ad945f94ec7ea8bb6b 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. Reviewed-on: http://gerrit.openafs.org/5119 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 7e3615208d9e1b03d8eba4fb802744b2b81f8868) Change-Id: I2293643bf708c3e87093005d95c7d1203c6f680a Reviewed-on: http://gerrit.openafs.org/5145 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9d44937928dbd20418f6b9b4fb0fd697f6348ddc 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. Reviewed-on: http://gerrit.openafs.org/5118 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from fa11f71f040b2e6856047c53fdd902109e5c6e52) Change-Id: I4b70abab200ea50b419e215f4b3f3b4d3d7ab484 Reviewed-on: http://gerrit.openafs.org/5144 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cbd458b09b3862cba1f133a89c50e382a8127b16 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. Reviewed-on: http://gerrit.openafs.org/5115 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 4138a778fe821493c726826ffc4715f5f46222d9) Change-Id: Ifd5ba10176ba1a7d6fda7506a0a4c250ad1945f6 Reviewed-on: http://gerrit.openafs.org/5143 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit af292a7dbc5d9eae3fd0b0f69a6adf4401368a2b 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. Reviewed-on: http://gerrit.openafs.org/5114 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 4a24a59d52266fcbbf92041ce3a74a455e84a25c) Change-Id: I84663e5313d1845761ba7fe7043448ba000c9ec5 Reviewed-on: http://gerrit.openafs.org/5142 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cd516507a6df28a8830c798d2d499ca11c217b0c 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 /. Reviewed-on: http://gerrit.openafs.org/5113 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 0b6247c27fcc0b8a2f307ccc545eea777a07f999) Change-Id: Ifc4a649ee2b59115632f8d27a00b2bdb794822d1 Reviewed-on: http://gerrit.openafs.org/5141 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2efb653cf2ee17856875ea32586b3afa23c4c67d 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. Reviewed-on: http://gerrit.openafs.org/5112 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from b61bd99bce68055dc0dd53b82d1d5318c25d9051) Change-Id: If3aaa87f648f6fd1ae21d19d05522d48928dc4ff Reviewed-on: http://gerrit.openafs.org/5140 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ad854ce900ad34e7ab686ed2ab47e33cdc422f5e 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. Reviewed-on: http://gerrit.openafs.org/5111 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 7c59ec8f816120c738b1da83f7db9349d912f573) Change-Id: I332b82b24c97810074e87521c8727b5827d7b54b Reviewed-on: http://gerrit.openafs.org/5139 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c4afc3f125e6df05220da59dbc26a74e9c82aa5e 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. Reviewed-on: http://gerrit.openafs.org/5110 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 214e9a6052b1dab2a0c4383632640936c3e518c6) Change-Id: I24007935b35ac2a603486fc40a79f94b9b90fa8e Reviewed-on: http://gerrit.openafs.org/5138 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f1ee02d073f7b9257d73b7b1a042daa44e54641c 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. Reviewed-on: http://gerrit.openafs.org/5109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from a063ecdc78cf888df2459b32b0082d4767948563) Change-Id: I8395230328385eb8d554cc85d2e659a3b7cacfb7 Reviewed-on: http://gerrit.openafs.org/5137 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit eec4c8fbf8659858cac977991aba562a79bbf00c 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 Reviewed-on: http://gerrit.openafs.org/5108 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 549737f1e7d52256f053c86116b56c3211b084b6) Change-Id: I4eb6f23e035b0774dffce8779d680b16ea607d2e Reviewed-on: http://gerrit.openafs.org/5136 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f7cbd71eb6e0696c2cb89e9af78e057ce53ec255 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. Reviewed-on: http://gerrit.openafs.org/5062 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from c61f5208f553ed1674d1ae51d6e0f16fcdbba47b) Change-Id: Id706189bd0aafb0b55c58f28fff80ba841a8ef48 Reviewed-on: http://gerrit.openafs.org/5135 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cd52a9a711b25703953c7b10b04532a165c34042 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. Reviewed-on: http://gerrit.openafs.org/5061 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 9c2d3180aa760d2a406bb68dd84e73f7d1ec7019) Change-Id: I3150f9d5ee1e1d548b29161086ebcea21b2351cb Reviewed-on: http://gerrit.openafs.org/5134 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 545479dea3e9fc0f3d2b3537aa148c2caf02589a 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. Reviewed-on: http://gerrit.openafs.org/5054 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 0783b8f3821f59004146b4c34a53189ada178d70) Change-Id: I18617371d20798a923c5712188a229633ff43519 Reviewed-on: http://gerrit.openafs.org/5133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0fdeada154476b6a140d8548aa8f44f1d1efeb90 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. Reviewed-on: http://gerrit.openafs.org/5053 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from e91f16ebb704a431f9731bb39bf9b5621b7f6ad0) Change-Id: I80685fae2b581171c580b039ae029ca69bea467c Reviewed-on: http://gerrit.openafs.org/5132 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e474c0809700896a7edf38b75a8df8ced623a2b1 Author: Jeffrey Altman Date: Wed Jul 20 14:04:57 2011 -0400 Window: breakout CM error codes into separate header Reviewed-on: http://gerrit.openafs.org/5052 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from a1af69182b12bedd8a413d38cef9a4691286da46) Change-Id: I82adf60bef97575d47b65561fdc2b097f8ac610a Reviewed-on: http://gerrit.openafs.org/5131 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fcba74d4776af6b21652fee2de628bd1acdd1c02 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. Reviewed-on: http://gerrit.openafs.org/5124 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5ebef72c0299560716f3bc8d59122aedd61cc399) Change-Id: I10aa962b158616d7d9e9207fd0307900abda0cee Reviewed-on: http://gerrit.openafs.org/5126 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ed89a0b0e7980d2c42bb64c59c71f6d7ca2d1e33 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. Reviewed-on: http://gerrit.openafs.org/5095 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f8ff2591f73401e6d9b6def7630f428569e2f3a6) Change-Id: I2196196d7373400f2d7f6d0654047273157df1ee Reviewed-on: http://gerrit.openafs.org/5097 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f35f178101e268612f46ecf8253868275ca1cae 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. Reviewed-on: http://gerrit.openafs.org/5069 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 09d1d8575ce96ef945a4fd8a99a0347f4e258c1e) Change-Id: I4b18cae14a9b620ea62d62eebc0b62f83f67a84a Reviewed-on: http://gerrit.openafs.org/5072 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3e1c4c79a1c4f7762432a5816a50f84e0bf89348 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. Reviewed-on: http://gerrit.openafs.org/5065 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 62cccc4547bd816dfffb2c1a4431c3c674d302f8) Change-Id: I44ec9305c3f8e07cb68b2614b237b62e29a66516 Reviewed-on: http://gerrit.openafs.org/5071 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bc8b5d430cd8fea7d7aad9af1f3e7958f372bfce 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. Reviewed-on: http://gerrit.openafs.org/5066 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ee950e7ecf578bd225eec29b182f108450c5bfaf) Change-Id: Idc2fa790d97b75971c29eec98bb96e799356dc4a Reviewed-on: http://gerrit.openafs.org/5070 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 98c2c2baa02c0aeeda1a1823504cd81ab9833ed2 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. Reviewed-on: http://gerrit.openafs.org/5056 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 45f0cbf83aed2bd534e9b43822c033ef6b4a9b1b) Change-Id: Ic46bcbcc8045773d8ce248fe2dea93b27d24ecf2 Reviewed-on: http://gerrit.openafs.org/5067 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4786eb20cfcff3965479cfc730d8d18fee5c3c01 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. Reviewed-on: http://gerrit.openafs.org/4925 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8bface302c14698a14b7b988e1a7714e84415c04) Change-Id: I130c7289e06ede351adf8ace92fcdbac900b7819 Reviewed-on: http://gerrit.openafs.org/5068 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cd03087df0f7781497dc7dc3958dcf75a753f49f 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. Reviewed-on: http://gerrit.openafs.org/5044 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e06931172eec5a683490040f5564b294d263dac4) Change-Id: I0fbd566258eec2f5d2664acf40289c4d6c544ee7 Reviewed-on: http://gerrit.openafs.org/5045 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7a47d55d0471e69821fc8be31d1e2a1d8cabdebf 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. Reviewed-on: http://gerrit.openafs.org/5022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b6d05986f0c79bdf54169fc7b209b137c0e63a39) Change-Id: Ia72180e49d1fb0a92911cb5158d8eb368d4c2a40 Reviewed-on: http://gerrit.openafs.org/5024 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b69d7234ae380df302872f6c010b92a51b40649 Author: Derrick Brashear Date: Thu Jul 14 11:49:04 2011 -0400 Revert "windows: include cmp_Cmd_Ref_3_en_US component" This reverts commit 96f7d4d3e6ba75d40e7b47acb728a8dbef8c1a01. Not until we have man3 in 1.6 do we need this. Change-Id: If8490d6f66a220fe08995c011fee04d57d8e9adc Reviewed-on: http://gerrit.openafs.org/5019 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f205ea7c1a69bf5b2c73168581292ef70f820c5d Author: Derrick Brashear Date: Wed Jul 13 19:26:22 2011 -0400 make 1.6.0pre7 update versions for 1.6.0pre7 Change-Id: I0efa0e544638de8f6f9d617d02072144f6fdd1ed Reviewed-on: http://gerrit.openafs.org/5011 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74fe7f6acf1b82d2b6bafd0c321d396621a6f7ce Author: Jeffrey Altman Date: Fri Jul 8 09:49:51 2011 -0400 Windows: ChangeLog for 1.5.9907 Reviewed-on: http://gerrit.openafs.org/4954 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 30d68e6934810e3cfc67518d36cb8be26d6542b8) Change-Id: I899f89d277d816bf429e90c09bf69f1703fd82e1 Reviewed-on: http://gerrit.openafs.org/5010 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60b385e87958a43b9bdc98ba40c85cb89f4c1b66 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. Reviewed-on: http://gerrit.openafs.org/4984 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f775c0fb6f9191dcf5d226bfddbf82f52cd1116c) Change-Id: I03b4f02d979bbc851e043e5979a54d00f9c52439 Reviewed-on: http://gerrit.openafs.org/5009 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7fe2d2c18eb6303248cdfd7974becf9d5277374e 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. (cherry picked from commit 6a27e228bac196abada96f34ca9cd57f32e31f5c) Reviewed-on: http://gerrit.openafs.org/4983 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ibfe38e924eb53e279aaeff77882957a32ebb279b Reviewed-on: http://gerrit.openafs.org/5008 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ccd770e8a38d59619f1972672ac9392e92cfcc7b 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. Reviewed-on: http://gerrit.openafs.org/5001 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit beda3b239a13903d4bcd9a5d91d5ff562962cb5a) Change-Id: I3e3c4b8565e373f74bb95416e4c9b101d02fd78f Reviewed-on: http://gerrit.openafs.org/5007 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a508d96354ddb58182046d54be35fcb7eca14a48 Author: Derrick Brashear Date: Wed Jul 13 22:47:57 2011 -0400 volser: remove pragma requiring ultranew gcc this won't fly with the gcc in the field most places. move along. (cherry picked from commit XXX) Change-Id: I7ca987e05502c0ffc75f826b40200467bf0abfbb Reviewed-on: http://gerrit.openafs.org/5015 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4843369f20d437a01f43a6a94ec58fb0a4b7ff3e 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. (cherry picked from commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f) Reviewed-on: http://gerrit.openafs.org/5000 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I72e82d014ea2320a095bb4a3281449d250a52d3b Reviewed-on: http://gerrit.openafs.org/5006 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5452fa62c98b08b5ec3a85d2b7c08585294d4906 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. Reviewed-on: http://gerrit.openafs.org/4985 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 130155ff3c48f2da2433b359588346b4438d24a2) Change-Id: I02e83faa889bb55b025253bbd1c51a389434eee4 Reviewed-on: http://gerrit.openafs.org/5014 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 00d8cbfe5563b5363ceaa4c65f52d3104f596004 Author: Derrick Brashear Date: Wed Jul 13 09:55:21 2011 -0400 Revert "rx: prevent connection channel assignment race" This reverts commit 3620b51779846175b51f82d677838c7cb4dc181d. Change-Id: Idf8d95fe8fec0bdd94e9f9fc1c30695fb52604fa Reviewed-on: http://gerrit.openafs.org/4986 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1ad38526a600f5199cf3df5bbced3ac1c9d8e9ca 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. Reviewed-on: http://gerrit.openafs.org/4973 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4470d849ec731c97dd2fb02dc6cbfe777949b510) Change-Id: Iee356a8424efe3c79745bf1bf5a1553c988d9d12 Reviewed-on: http://gerrit.openafs.org/4982 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8ecd684a33817e94c9671238565a755e5818e753 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. (cherry picked from commit 99b43273c0203881ea3d2d50f0abf000cdc0b03e) Reviewed-on: http://gerrit.openafs.org/4963 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I90ad0dc1f67df2bcaca1da0bb459e730541876cb Reviewed-on: http://gerrit.openafs.org/4981 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d344bfd855c0522437328da630de1301ecc51ee 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). Reviewed-on: http://gerrit.openafs.org/4956 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3559e5c8edd90ffb17e8f3b722ff014654bae336) Change-Id: I75103e0fb327fec91ae00647598450a30cc2cf23 Reviewed-on: http://gerrit.openafs.org/4980 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 918e8c6098a5726f6713cc3ac2a1fc759e1ea36d 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. Reviewed-on: http://gerrit.openafs.org/4926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1accef4e77c8cad518d728d15fbd194bebd49f33) Change-Id: Ie68a006852d1564fa2da226a006a4e137d7cd5ed Reviewed-on: http://gerrit.openafs.org/4979 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 15e3089f89ae5ef3b1cb59074ed335a984918bd7 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 Reviewed-on: http://gerrit.openafs.org/4967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 27af8b4b537236d8c678465d034721dd220641c8) Change-Id: Id4abbc179fc1410b3d45bfc9c69814f683ebcb57 Reviewed-on: http://gerrit.openafs.org/4977 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c90d67f02452ed1811a93c3f82b002d7d2a18737 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. Reviewed-on: http://gerrit.openafs.org/4968 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 82e772bed034ea278e7a7a1b4422d75cc14576dd) Change-Id: I7c8b25da015e028f0a642bbfcf7d0d28bbcc16dd Reviewed-on: http://gerrit.openafs.org/4976 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 96f7d4d3e6ba75d40e7b47acb728a8dbef8c1a01 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 Reviewed-on: http://gerrit.openafs.org/4961 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 88b4e2e52799cfa5999cbc22873407ec8b77766a) Change-Id: I40aacc81c43ec2d142886c9ce11a684c910c37b2 Reviewed-on: http://gerrit.openafs.org/4962 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c49b446ca51f7cef1ae0f04ec475eca6efe367da 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. Reviewed-on: http://gerrit.openafs.org/4955 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit da6c97678f530ca76334613e229337a75f94e297) Change-Id: I6b530366c74fd45ba585fd7af4615a1dc96ac055 Reviewed-on: http://gerrit.openafs.org/4960 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 188c7508f5c57418a758f82edb602813feedccbb 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. Reviewed-on: http://gerrit.openafs.org/4924 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 21854e03eb6fe70a70ea5fecde5c4ef8074e28c9) Change-Id: I3bd5d7d834ddfa11044cf3f44af108f0554096b6 Reviewed-on: http://gerrit.openafs.org/4953 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4973720540a280c2f804c01a1e335dea6e18179e 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. Reviewed-on: http://gerrit.openafs.org/4923 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1ac219f537f75ac5835f750d4c9e5f4dc684c2de) Change-Id: I4dc2a37557e3370f711f6a11743f39df6344676b Reviewed-on: http://gerrit.openafs.org/4952 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 31811fba7fe060da18efe19f885bb1dec5bcbd44 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(). Reviewed-on: http://gerrit.openafs.org/4922 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1a56229910a67cc782959beb45f56d244d6b3c4f) Change-Id: Iaf41b1c6c1aa84791a02451533be0e66aaf85fd1 Reviewed-on: http://gerrit.openafs.org/4951 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit baaf9beb35fc5edaaf524a172a755e70d50ef140 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. Reviewed-on: http://gerrit.openafs.org/4903 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 78e39417af6d2b87f0cbda0b5d3bb3e4859dc0ba) Change-Id: I28f5abee59265403362f3f1472a9fa21a52597c0 Reviewed-on: http://gerrit.openafs.org/4949 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9a2890c4a4b3bf359bd759ef26139d20045b87eb 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. Reviewed-on: http://gerrit.openafs.org/4900 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1ecac71e50e75ce5a45e297d57c480e850975af7) Change-Id: I313f4c4093f3b4f5ee501ef7537d05b557946a70 Reviewed-on: http://gerrit.openafs.org/4948 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 954442e207d8a05d2f26992ff966b56f7af41e1e 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: Idd39fd4811ea03aa7eee62f85f1a0c74c9c5e402 Reviewed-on: http://gerrit.openafs.org/4896 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 31a001f60e5fe729b315f679d1d43b367bd74ea5) Reviewed-on: http://gerrit.openafs.org/4927 Tested-by: Derrick Brashear commit 42f8c24972976bc9bad46d3d97251be2a43ed458 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. Reviewed-on: http://gerrit.openafs.org/4837 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 358099b21c5c888c02bf3754702ae623378c507d) Change-Id: I7accb0e176c6143d87bb7809ead7ced63b9d86dd Reviewed-on: http://gerrit.openafs.org/4946 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eb2d0d9d48f2f1e372ad438ad6ed0cb6516dbcc8 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. Reviewed-on: http://gerrit.openafs.org/4874 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f5349051abebd15fc2f2d77ff5b6dc81e09bdf47) Change-Id: I3593a50b5867c671fe462abd40b50dcbbd2c5204 Reviewed-on: http://gerrit.openafs.org/4945 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d55f70792e98e01b3540cdcfad6751a05bf9e645 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. Reviewed-on: http://gerrit.openafs.org/4876 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 926ce3d35018050bdbe8e00011884954d6b0fd80) Change-Id: Ia617153da8762394659b7c7816e6f3d24af6c4d2 Reviewed-on: http://gerrit.openafs.org/4944 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae81606a284e2144f32bd55cbdba104c00d54d93 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. (cherry picked from commit f2d067b4e48500004236b181dd5a25454f352daf) Reviewed-on: http://gerrit.openafs.org/4875 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: Id65a30ced198853bc6c376153671def71dd600d1 Reviewed-on: http://gerrit.openafs.org/4943 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8265c8652e00d0a0b579bd48efeff4d60872e17f 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. Reviewed-on: http://gerrit.openafs.org/4873 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 25688bc2e7e8da83b4bf22d7cdc3e0214eadc455) Change-Id: I4316be912a5a30856914059984f45782bece0cdd Reviewed-on: http://gerrit.openafs.org/4942 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45b4d17f7b38031afbb434c08ed46e4a26df9ba0 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. Reviewed-on: http://gerrit.openafs.org/4869 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 6b833f575743d4a826750bb6913cd53232a8867f) Change-Id: I51b4de1146df032ff6e1273d8c832bded770e177 Reviewed-on: http://gerrit.openafs.org/4941 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a4dab852e67c6a9bc720f5d5a5ecb815a70ca83 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. Reviewed-on: http://gerrit.openafs.org/4868 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 91b351e88bdb56bfdfc2f5f16f64bb7522796581) Change-Id: I673980bdee6d1316cb363f12d32c96fb2577cb27 Reviewed-on: http://gerrit.openafs.org/4940 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c4e359b69a9f5e8a21cc06f7338595404d290cd2 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. Reviewed-on: http://gerrit.openafs.org/4867 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 0b9c9e9973e8d32cdfe1fc884fb2c310cedc0404) Change-Id: I47525eb4cf0bb6d049094c7f98f8cc79be9ef51e Reviewed-on: http://gerrit.openafs.org/4939 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 99e38c5d4011793f367eb23030340c4caa15e60f 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. Reviewed-on: http://gerrit.openafs.org/4866 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit e8c4fc4f37912a5d30694caef45d27374e9201e7) Change-Id: I5ee6aa255a0b923f445dde2f1e9f0abf98dbe623 Reviewed-on: http://gerrit.openafs.org/4938 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1adddaf9643a3572de22e73e95f2a6c29b4636d5 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). Reviewed-on: http://gerrit.openafs.org/4865 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 0118fb5387e656e515d78d48497a48f1e04a1152) Change-Id: I697eac14f9b4be5c8726f0386e516cb49995f665 Reviewed-on: http://gerrit.openafs.org/4937 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8cc356cb64831a9aa860f53ec8ad4c20951af934 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. Reviewed-on: http://gerrit.openafs.org/4864 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 784babbea1247660f39463403233589a74c6e73b) Change-Id: I1e97e9734d04f898dabad59a88afc929d8888e90 Reviewed-on: http://gerrit.openafs.org/4936 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1b28e72a4335c15cebf3f422a20b29a7049d7a4a 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. (cherry picked from commit 280c80152522f32cf34deae96696b1db8aaaa9bb) Reviewed-on: http://gerrit.openafs.org/4863 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ia8b28be53d7c37fbfd877364930d7dc4a4d52e37 Reviewed-on: http://gerrit.openafs.org/4935 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b62c76954383b2b1f6e8d55f0abcfa6ad97f8980 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. (cherry picked from commit 36e2d13b55085c996d38b30d003296c602ef8ee3) Reviewed-on: http://gerrit.openafs.org/3138 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I5b5b154d78183621c160537172d7c0a3789114e6 Reviewed-on: http://gerrit.openafs.org/4934 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ab4ddaf5583aeacac6be0761b1d52ed1287936b Author: Derrick Brashear Date: Thu Jul 7 16:56:28 2011 -0400 rx: complete fix for starting rexmit timers 1.6-only change. the pullup of e7066a9c30047e787d72f02dd1c28e5e473e494b (as dab406baf28c19710b4a451ae2516dfa1ebeee29) missed this because the code in 1.6 was structured differently at the time. Change-Id: I38e9db1dcc681ae4eecc0f3abd634052b9f93ca0 Reviewed-on: http://gerrit.openafs.org/4933 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 42b252945288024088a7f791f51a1c3a95adbf74 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. Reviewed-on: http://gerrit.openafs.org/3279 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit cb7a5ce44470112d3ba5e341322bb9e7d029e101) Change-Id: I17a863d46f65fca904a22abccb849c8a8c0997ee Reviewed-on: http://gerrit.openafs.org/4932 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aaec3e262bd05017e57ded42309e19e9c200967c 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. (cherry picked from commit e84193ca2a9cef5a13403d291435eb5ad47f5b41) Reviewed-on: http://gerrit.openafs.org/3135 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I1c8da9639b9739bf88a925b7af98c25b3eaeda8c Reviewed-on: http://gerrit.openafs.org/4931 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef78554c5d07dd13b83be5d706483094e907b207 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. Reviewed-on: http://gerrit.openafs.org/4797 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6a22a2f4b7aa0d960cea17b419003986f6184d58) Change-Id: I465e73b7cc7c57b384cd2652bbc8825a898b8bbc Reviewed-on: http://gerrit.openafs.org/4930 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a88e9a249e7fb2a3334ada72d0cc9f263afc6d60 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. (cherry picked from commit e45abc6cc20236b9e91c23cb6f8e90f51b6a4a99) Reviewed-on: http://gerrit.openafs.org/2966 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Change-Id: I3492d351581549872b8332a626dae344757c6a6e Reviewed-on: http://gerrit.openafs.org/4929 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae15c93f0dc2c73908676687f5f1a82abd1b2c64 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 Reviewed-on: http://gerrit.openafs.org/4897 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4e3c3be697bb99ee4846c99550cd2b52929cdca) Change-Id: I7d1da2d26eb8cb9f1f7c231ec70b8f9486c0d146 Reviewed-on: http://gerrit.openafs.org/4947 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7716cf6d253b67e342c6b055497c2076622cd12 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. (cherry picked from commit a80a88e8ba7ac5e2afc5188add482f4e5323128e) Reviewed-on: http://gerrit.openafs.org/4862 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot Change-Id: I023c9b52b104f8930f8d0dd628612cec2226fee0 Reviewed-on: http://gerrit.openafs.org/4918 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 80ba47c54e4aed4cd4b4407c800984b537526fc4 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 (cherry picked from commit ad3b5997c6da17927312f4618d8bb4f7fc542a64) Reviewed-on: http://gerrit.openafs.org/3134 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I6534f5c40e890af916752bf2647a14f9c386e004 Reviewed-on: http://gerrit.openafs.org/4917 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e8801635a41f83bc6bb438a2f33807d7ffeb6430 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. (cherry picked from commit 39484c6e57cf993a713b4a989d1c0c227e6f496c) Reviewed-on: http://gerrit.openafs.org/4861 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I5b33323ceed7231bd70e43284d83dfe1db144188 Reviewed-on: http://gerrit.openafs.org/4916 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit db22ac6d19f88e0ad5aec88ee58b236f3bcc3fbc 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. (cherry picked from commit fe7d38f3205bd879e961f5849ed64df5b495388a) Reviewed-on: http://gerrit.openafs.org/4796 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Change-Id: I85dd1d1706227599a48c7f75ca1947af0b5184bf Reviewed-on: http://gerrit.openafs.org/4915 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 25ae5591f92bdd022712bc4729620dc384272fcd 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. Reviewed-on: http://gerrit.openafs.org/4798 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit cd326b2f54c3397468807c32ce0834f73c9d5d1b) Change-Id: Ic4fa021eb33462ddf759ce0d7a8845edf1ecbed5 Reviewed-on: http://gerrit.openafs.org/4914 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 587cc8652bab48da7282f49bedf2eff8ea1cc88e 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. Reviewed-on: http://gerrit.openafs.org/4799 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ff30293624a7e31d585b9e8f2e1a439cf87b6524) Change-Id: Ic64917c40aa29f9e99c434ab2f9ba2e4abc38883 Reviewed-on: http://gerrit.openafs.org/4913 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8103a9a0e92d937c187515db5a0d57fff5a50df0 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 ... Reviewed-on: http://gerrit.openafs.org/4871 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5614305853f0f87a2418a6fb7ca472a8ef966084) Change-Id: I6b961a470adfe053ecd85af05821e42898fd7847 Reviewed-on: http://gerrit.openafs.org/4912 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbd4ef0161c20de025cadba98bcc78f63b76de2c 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. Reviewed-on: http://gerrit.openafs.org/4860 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b65944973a24e9365dc1ff118ded4c3a1e25f782) Change-Id: I4d2766d98883dad4f27ff4c52e2a03a49733f89f Reviewed-on: http://gerrit.openafs.org/4911 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d5d9e67a9f6c9d3cc13ebca1829f6c348f26cfd5 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. Reviewed-on: http://gerrit.openafs.org/4859 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 699330682f3cb001bf1bfbeaffd806600ccf69e8) Change-Id: Ibe06f46c9ac846fb0381c467242e5c3b439c8907 Reviewed-on: http://gerrit.openafs.org/4910 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f1174887c3bda7d1d5fa4a305e27db493fa15720 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. Reviewed-on: http://gerrit.openafs.org/4858 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit c0cfbc40c8ef3de65f144560918cbd2a5bf187ec) Change-Id: I7976d8d11007c0f597ede707db7cbb617956bd29 Reviewed-on: http://gerrit.openafs.org/4909 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e31c66cb4888ab83fe5170386015067385a9dc6 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. Reviewed-on: http://gerrit.openafs.org/4852 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 800a5642a0b9ff514519b4af30b4d0dadd471480) Change-Id: Ib0d71a34242cdc42753518a454479bccaac0094a Reviewed-on: http://gerrit.openafs.org/4908 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2b70e2508e7c7d6568685a6549f28233b15367f6 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. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4843 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot (cherry picked from commit 34bdd979fc487843c26f15655b94eac7c8f98fee) Change-Id: Ibbedc447ea4b2dfa61f06a4b0b87a5bc884f711a Reviewed-on: http://gerrit.openafs.org/4907 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2b2b647e3299c2dfeb30d2986290e1121d6cb5f3 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. Reviewed-on: http://gerrit.openafs.org/4891 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 51fa590e704c77c0e9ba873ecb854448885030a5) Change-Id: Ic50241081e52b70bf7b6bd7d92df205f7184f7c8 Reviewed-on: http://gerrit.openafs.org/4895 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6a9324ad733385d39594c770227809333248251b 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. Reviewed-on: http://gerrit.openafs.org/4884 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9f77a2d6b3d571a928261563763913c8c6ee2938) Change-Id: Iab58557350fa099c903b0c2b555e5cc2027daafc Reviewed-on: http://gerrit.openafs.org/4894 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ded3b45fb00a636fbf5bc8292fa6ed29b27bca4f 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 Reviewed-on: http://gerrit.openafs.org/4886 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 7532b05221caf2c382d9e8c9ca5af4a284566920) Change-Id: I67eb2b293228cacb4df20ac072beaf03f2111c55 Reviewed-on: http://gerrit.openafs.org/4893 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2265aee592554c0caa270d5988fd7db3e84c212d 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. Reviewed-on: http://gerrit.openafs.org/4819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 418a70feedb5574d28c3fbe513333b0fb102a3ca) Change-Id: I467c2b8cd00b6b248b3c50270da470cebd4b6a5f Reviewed-on: http://gerrit.openafs.org/4892 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c7cad7d1aef1ba202d6e62cfde2a85ae0395304 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. Reviewed-on: http://gerrit.openafs.org/4849 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 327f516477b3dbf6ed6302c706bbb2bf41ae7907) Change-Id: I904095a9143c0aedc0e96d64793200eca7649934 Reviewed-on: http://gerrit.openafs.org/4853 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ddb9b2257e956e981331c5f1fff55487ce8768c5 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. Reviewed-on: http://gerrit.openafs.org/4378 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0b69fd6d5631482a786c2223a7dec0b2c9a07f92) Change-Id: Ifd921019898954414a6d107702786c546d661bd4 Reviewed-on: http://gerrit.openafs.org/4855 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bbf5cd2bd30ea25b82804436cc09e67fb239e8ac Author: Ken Dreyer Date: Wed Jun 15 14:21:27 2011 -0400 Enable -afsdb in the Red Hat packages. Reviewed-on: http://gerrit.openafs.org/4844 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0a318b5bb9d0f5940eeffa092f6adae025d560de) Change-Id: I08e117bf25137099b7d550f4ec397ee987ef4ab0 Reviewed-on: http://gerrit.openafs.org/4856 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ec0527e8ca664de233a711f92e998b94672b352a 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. Reviewed-on: http://gerrit.openafs.org/4847 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 03a54723eaf23b2aad0d026ba5f1a8e7343b3763) Change-Id: I866fb196f8368362bcd673ffb4908ab21a46c544 Reviewed-on: http://gerrit.openafs.org/4854 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2322d8238a2382d0c84dc1382d7a4370c8096a9b 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. Reviewed-on: http://gerrit.openafs.org/4815 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 445a8b5461c66160552136214a1d8d97de15967e) Change-Id: Ic39fecb824be58a8890c665dedcd1eff2b4f9bdc Reviewed-on: http://gerrit.openafs.org/4848 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f9930accfd196d212ceba895762ee9673faf4066 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. Reviewed-on: http://gerrit.openafs.org/4766 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit cc2bc3e17ff5f7a10c515e309f8fec47a6fa14b6) Change-Id: I4773affa193b5210da6416dd8b4321bd3f471429 Reviewed-on: http://gerrit.openafs.org/4794 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3aad0fa57e04fe0c97b4995b544e31f0951da62a 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" Reviewed-on: http://gerrit.openafs.org/4740 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 07f461e8e35147af605ebc86c139b31d2db0bb28) Change-Id: If37ab2164a13c6f4b745aaf221337ba56eede043 Reviewed-on: http://gerrit.openafs.org/4793 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d68c66eb6e8d0df2612485f8c72e155513b6cc36 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. Reviewed-on: http://gerrit.openafs.org/4757 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 23e433f10414d771937cbea5510b6006b6a7b063) Change-Id: I24df764211d99d84b116d1031b05de61b38c3397 Reviewed-on: http://gerrit.openafs.org/4792 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7d84b8a69e10b48227ac72192b22fca4615292cc 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. Reviewed-on: http://gerrit.openafs.org/2986 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit c0a55111d726b26d07661957a65e4d59f155d5e6) Change-Id: I3bef968538c90d6e261142c60a817b4b9e2ad228 Reviewed-on: http://gerrit.openafs.org/4791 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 46842f03d96d586e69b9ed5f70d6f4c220d3a93c 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. Reviewed-on: http://gerrit.openafs.org/4763 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc) Change-Id: I5944c16f558f2651250d122f547fbfd71519c1d1 Reviewed-on: http://gerrit.openafs.org/4786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aa7de1a4d3a985a6bef911186ffa249b075efc42 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. Reviewed-on: http://gerrit.openafs.org/4760 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 55a41d00057106913ce2aba50772a56bc994a9a4) Change-Id: Icd3b85c99e8a41407355f94e561042c13ca15293 Reviewed-on: http://gerrit.openafs.org/4785 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 5dac29b0fd07e22d2e145912588858c81f202061 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). Reviewed-on: http://gerrit.openafs.org/4259 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a6f18413edceed1b0d532005eb62cb1886e7a6f3) Change-Id: I48dafa5fb442cfc92fb673f2b26e1034fc44c0c7 Reviewed-on: http://gerrit.openafs.org/4730 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7640d15c914d40ba42b753afcfc419ef12e39557 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. Reviewed-on: http://gerrit.openafs.org/4719 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 7133266bafbf238ef921690c40846f3ea2d2fc8b) Change-Id: Ifdc7c1d3c4162452c1576942b7bfe37ea5014a77 Reviewed-on: http://gerrit.openafs.org/4726 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 061eb50e3d5b5cce37245a4314aad079ef96ca80 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. Reviewed-on: http://gerrit.openafs.org/4718 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit baf7656f666e0d47047c545561345e7803b8a141) Change-Id: I7feca884d7796ccd3a490d6b81e745c644d9c8f1 Reviewed-on: http://gerrit.openafs.org/4725 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0adfb78e70d6afb3eb55ca0c73017a35023f279f 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. Submitted-by: Hiroki Sato of freebsd.org Reviewed-on: http://gerrit.openafs.org/4721 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 9703b023cc0f5088eab5135acf7417e90ebbb2cd) Change-Id: I058ed4fd637f205701e5aab4d88d65386097f9c0 Reviewed-on: http://gerrit.openafs.org/4724 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85ac4e77b2fd6a4de4ec0224f1f1a3025433cbec Author: Derrick Brashear Date: Wed May 25 17:05:53 2011 -0400 viced: note parms file deprecation /vice/file/parms is unsupported and will be removed later. 1.6 only change. master version will remove it. Change-Id: Id41ca57c1331fb59b87f7f6a06281b640a8c9879 Reviewed-on: http://gerrit.openafs.org/4720 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aa99a3a5f731b90334a45d726264d6d3e0318393 Author: Derrick Brashear Date: Wed May 25 15:31:40 2011 -0400 macos: disable bulkstat 1.6 only change. there's still an issue where potentially multiple contexts reference a vnode which needs to be finalized; the fixup is successful but there's no hint to other threads to reref before proceeding (no actual troublesome access while waiting for the fixup as the vnode will not have actually been CStatd yet) Change-Id: Ib72f69b74c94b7cac74a9a01a54a8872e32f9717 Reviewed-on: http://gerrit.openafs.org/4717 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 756621e29e684b24e1021e0926040ff1dcdcfa49 Author: Derrick Brashear Date: Tue May 24 14:36:04 2011 -0400 des: generated files should not require objects needed in libdes 1.6 only change, since DES is dead. don't require the same misc.o in both libdes and when generating generated files to making, as make dependencies then throw away valid input. Change-Id: Icf6a211e66d7390ac73fa1effb89a0c4a131666f Reviewed-on: http://gerrit.openafs.org/4713 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 025d270d9996c728f10528c6c5c89ededcd7c1a1 Author: Jeffrey Altman Date: Mon May 23 13:26:20 2011 -0400 Windows: ChangeLog for 1.5.9906 (1.6.0pre6) Reviewed-on: http://gerrit.openafs.org/4706 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from ba76149a57f0cfd92672580b7047a557f159ee52) Change-Id: Id400d48bf5e8699558133b4b7812a2703a4508e5 Reviewed-on: http://gerrit.openafs.org/4707 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 37c5c707511e632a39a5e69e03f9ec7ae17d6ede 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 attempted 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. Reviewed-on: http://gerrit.openafs.org/4671 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b3004fbd5007d400a4cd3fb2a5b1c52d98618aab) Change-Id: I3c7452d1f09dc7fdbcffe9b047e4ec682ac6ea03 Reviewed-on: http://gerrit.openafs.org/4705 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af5878cb79e32280dbaebcb16cd0998720b2d856 Author: Derrick Brashear Date: Sun May 22 11:40:46 2011 -0400 make 1.6.0pre6 update for 1.6.0pre6 the various build strings Change-Id: Ic5deaa84f28cc39e955a0fcb1472a849d9feb4a3 Reviewed-on: http://gerrit.openafs.org/4703 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 23db3f30b82d803bf0af5a1ac66841cfa519690e 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. Reviewed-on: http://gerrit.openafs.org/4641 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0) Change-Id: I90afacbdd7ef0f52de4589001ec9bb8ffd292782 Reviewed-on: http://gerrit.openafs.org/4702 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dae4336c1848479609bd173dee757a3d4eb65354 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. (cherry picked from commit 6bdba897f49b8358d3592588a78d9b59757a9c13) Change-Id: I6ed0e035ff928f3cf93fdc42c7ee0f31096de978 Reviewed-on: http://gerrit.openafs.org/4379 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4704 commit b6ed780e28ac2b5b398d4392985622fa37e26e4b 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. Reviewed-on: http://gerrit.openafs.org/4670 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 884d0b058cea4ad6c9338fc7842ea0c619cb263d) Change-Id: Ibcdb7c0564d9ac56fa9e50123950e7f758761111 Reviewed-on: http://gerrit.openafs.org/4701 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 45f444376cf446a0e21795ea627413666f634011 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. Reviewed-on: http://gerrit.openafs.org/4677 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 04087af8494b90f664ac5f274d5db4c12063f238) Change-Id: I7a9c3e4f94496aa1a553ad54f6d43a0d0e6ccd5a Reviewed-on: http://gerrit.openafs.org/4699 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit faac1f8920ad783ddd7886f000611bf474cfe837 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... Reviewed-on: http://gerrit.openafs.org/4686 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0cf06f620213fa62abc16bf717779a1333ce12a0) Change-Id: Ic0392216ca5da072022baa1388380f658d324df2 Reviewed-on: http://gerrit.openafs.org/4698 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7cae02dc6dae05aa50cae5e034b3d0fd6fdaa807 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. Reviewed-on: http://gerrit.openafs.org/4689 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 33cb8a53fdc8907dafed2e77cc1da539d17397c5) Change-Id: Ic538976a697317fd3458c8a619f14dd100c4cdab Reviewed-on: http://gerrit.openafs.org/4697 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit efc9605e03c8e17450aa0afdd329cd7ae5a549f9 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. Reviewed-on: http://gerrit.openafs.org/4685 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ca425b7d49a2bf4c079aa38c0abf68596eca0b30) Change-Id: Ifb2cd9848b5468c950b600052308370b7c8c2af9 Reviewed-on: http://gerrit.openafs.org/4687 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d02d71908a624406e730a334dd9e0ec5f2dbad8 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. Reviewed-on: http://gerrit.openafs.org/4252 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 8336d31ac5092a16cfb206707e69c19f07f99241) Change-Id: Iebf4470f5ddfc591f52f51d1d080bd58d11683a8 Reviewed-on: http://gerrit.openafs.org/4682 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c7eb1f9eacf54aa8224ab7f2b8369c739a45726c 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 Reviewed-on: http://gerrit.openafs.org/4676 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 19f4fa2b4870828269e0751a4874d9ce67a1bb3a) Change-Id: I9d0e2f0ca9d4ddc5ebf9defb44c62f6bf00955d6 Reviewed-on: http://gerrit.openafs.org/4681 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 07758d536d423d9f6a8b1343e8c96dcd95422d5e 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: If363654c4d0dd8efd225c9ff19b99bb4f4b7b70e Reviewed-on: http://gerrit.openafs.org/4675 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2910dca6489954c01fecbc21807310fb6584c45e 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: Ib93ac7d449c7f2cb065219981f16ba319a9273b1 Reviewed-on: http://gerrit.openafs.org/4659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4674 commit 9bb37d675bbdaa76eed441252ff17ab5e79be484 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: I2218d8824af0e35392457b960f11bef970072638 Reviewed-on: http://gerrit.openafs.org/4658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4673 commit 1c063d12aa8ae49bb21620e11da954ef9cf8e32a 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. Reviewed-on: http://gerrit.openafs.org/4643 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0b983054f88d69ca4c0cda07e94103f216bd881d) Change-Id: I41828880a10097059ae0297ae191fa2a96e804d2 Reviewed-on: http://gerrit.openafs.org/4665 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d3e83e86abd0bb6f70e50f208c63bcc248c6673 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 Reviewed-on: http://gerrit.openafs.org/4656 Reviewed-by: Russ Allbery Tested-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8ee33373c1ef24572476d8189a3f6f7505bfc83a) Change-Id: I0349d744a9e16b6448a621fe6f4078b1eb1fa9d2 Reviewed-on: http://gerrit.openafs.org/4664 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit adfe378df858aef951b0a30b640e46ad1feefb2d 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. Reviewed-on: http://gerrit.openafs.org/4639 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit ae638fa383b8270fe2461a2ad91b9101c74f3593) Change-Id: I095c74f51f1ddb74ebaecda221ca45a4f6ad09c8 Reviewed-on: http://gerrit.openafs.org/4663 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 699c407bfbf0fad2667b231a1e73cdf1a0aec7b0 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. Reviewed-on: http://gerrit.openafs.org/4638 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 38efda16a2c5c9e74b5a23b5bdd2818a3353eec2) Change-Id: Ic931ce8118e8d76d799ce7e731451a6a4bf3c241 Reviewed-on: http://gerrit.openafs.org/4662 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99149b9837ae09d1621111075e3bf8f5bac9b6c2 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. Reviewed-on: http://gerrit.openafs.org/4626 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 010fc998a51a0aae2499b128ee8c671885a84e13) Change-Id: Ia505de8e5ec7ded14f2e2e40ac8bd3ef0b91c2fc Reviewed-on: http://gerrit.openafs.org/4637 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 5c52f277108e2b97a14aba6539849f71bd554cd0 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. Reviewed-on: http://gerrit.openafs.org/4654 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 050945e949135c1b98ed353fc05fcf9b8c1587bd) Change-Id: Icc4e65946c8d04bd519c95b969dec1d2359dce51 Reviewed-on: http://gerrit.openafs.org/4655 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0c350f8bfe563f3b1b0fe9977c6c472c530b83f5 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: Ie1a963f3826e10b3f37acf5829532046fe42e88e Reviewed-on: http://gerrit.openafs.org/4633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4635 commit efc227efe96ec30d3c977994ea8dbb53847cab61 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: I68a3054e77236ff307cc45b6563f34ec6605113a Reviewed-on: http://gerrit.openafs.org/4632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4634 Reviewed-by: Derrick Brashear commit acecbcb53867a4d9bf83e2b6a4e933b02723bfd2 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: I32cd79eba33fc80e15308010fafdaecb527d23f0 Reviewed-on: http://gerrit.openafs.org/4629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4630 Tested-by: Jeffrey Altman commit 8238c68dcf8750e279f253123546481731b67854 Author: Jeffrey Altman Date: Thu May 5 20:36:38 2011 -0400 Windows: change log for 1.5.9905 Change-Id: I68135149ca84a18b802a45e53c227b34e67a41a2 Reviewed-on: http://gerrit.openafs.org/4627 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4628 commit 8a13c93eded251fefc3564ecb85378225d6e390e Author: Derrick Brashear Date: Tue May 3 08:47:31 2011 -0400 make 1.6.0pre5 update bits needed for pre5 Change-Id: Iec57e2a69ea02c25b1c71b3d7ac4beb6eafc69c1 Reviewed-on: http://gerrit.openafs.org/4618 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dd408a153adaca8795c2ae4ea88d0dadd067ca22 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. Reviewed-on: http://gerrit.openafs.org/4605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 48633351c597278d4c8efd5a80163f0637c85aaf) Change-Id: I15771316dc657474d8b906df26f927fdbefe384c Reviewed-on: http://gerrit.openafs.org/4617 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 045e72c2b80c49b089d9f1b9cb84bfdad55dd678 Author: Jonathan A. Kollasch Date: Mon May 2 20:03:50 2011 +0000 NetBSD: translate timeval structure format in clock_GetTime() Reviewed-on: http://gerrit.openafs.org/4604 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 350786b3e092150a91bb4542263f648d683e3b7c) Change-Id: I819abb0b3207517f4a560e10896db211006f1980 Reviewed-on: http://gerrit.openafs.org/4616 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a1959864eebf29dbebfff71b9659646d036fcba3 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. Reviewed-on: http://gerrit.openafs.org/4595 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit fd545c51fe34b1452f09d4fbf6458f5b1557e895) Change-Id: Ia19b748596eadc75c6487d5fe854d2c7c4a4595a Reviewed-on: http://gerrit.openafs.org/4615 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 39090b5044101df54f9966063f5d89cc12a59f6d Author: Simon Wilkinson Date: Tue May 3 10:03:22 2011 +0100 Fix com_err renaming The pull up of 352c3e366c2e0a8de4550547192276e62afd2cc1 to the 1.6 branch missed replacing occurences of com_err with afscom_err in the sgistuff and pam directories. Fix this so that Irix builds again. Change-Id: I38ab02859a7cb2ebd60e455e6db4dc2c47710766 Reviewed-on: http://gerrit.openafs.org/4614 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e69ee66caf1aa4131e2516d990c3d766a6d060d5 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. Reviewed-on: http://gerrit.openafs.org/3958 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 76158df491f47de56d1febe1d1d2d17d316c9a74) Change-Id: I6d2d7512682b93e6524f8f60bb8e15818d888e00 Reviewed-on: http://gerrit.openafs.org/4603 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 126333cff710983faeb4185b0470013d66b16717 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. Reviewed-on: http://gerrit.openafs.org/4584 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2a2206bfe16815a6625fee4d37520e9676d88ab4) Change-Id: I80cfbf31ba81d7cf23013c0efcea0b8ac8c341db Reviewed-on: http://gerrit.openafs.org/4602 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2571b6285d5da8ef62ab38c3a938258ddd7bac4e 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 Reviewed-on: http://gerrit.openafs.org/4562 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 79d5b5cce65b10134004c4cb2b7b34ac509cba6a) Change-Id: Id9956be824a4c4d8db7deb65403f4d9740758e42 Reviewed-on: http://gerrit.openafs.org/4600 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f451b4a98d79b84a37a059282d7855636981f265 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. Reviewed-on: http://gerrit.openafs.org/4583 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 047cc473037efa62fa7698878e055ca4665e85ef) Change-Id: I3bfcf49587f826129979b81de95b92cb2b332790 Reviewed-on: http://gerrit.openafs.org/4593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cfd5d1461e6fa28ab277575991d5f8eda3e46ce0 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 Reviewed-on: http://gerrit.openafs.org/4581 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit af175ce2c7a4785ef1992d096adfdb27daa86ee4) Change-Id: Ifd59c8ce93939f7b23e9f64bd7c0e527d3a2fa52 Reviewed-on: http://gerrit.openafs.org/4592 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1ce3765d3427caa96c9cb33ec772212531b5031 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. Reviewed-on: http://gerrit.openafs.org/4580 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9a4e3ade396583d412a85c4e03238d18d5c533ee) Change-Id: I9ec5ed707ef6b726c358fcaa46d81b9ea1a17ce7 Reviewed-on: http://gerrit.openafs.org/4591 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8b7a1e017a5e16137c00f66701913044bb8ef05 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. Reviewed-on: http://gerrit.openafs.org/4530 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 211e906c86be9ad9cba324e776d56093579b6653) Change-Id: Iceb1e2961e9bbb11640c6fccdeb8713a9657df99 Reviewed-on: http://gerrit.openafs.org/4534 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c294038d986d61ef2d35816d96ed86786aed03bc 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. Reviewed-on: http://gerrit.openafs.org/4529 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b07814e037d19dc9868dd202e82d69b96fbdcae) Change-Id: I0b1d9fe46e5b83b93b59ff6facc2421db9136c12 Reviewed-on: http://gerrit.openafs.org/4533 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a62adf29e05dc52debd7bd5ed065ee40893921b8 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. Reviewed-on: http://gerrit.openafs.org/4528 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 484b5b4cf4f88a9ddd04cdbe870d9c2959ef266c) Change-Id: Ia1b7537d7988203bd8c0bbc619c04f5b3f9387a1 Reviewed-on: http://gerrit.openafs.org/4532 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 842e77607f3834001855790086011a5902593b0f Author: Andrew Deason Date: Thu Apr 28 13:55:09 2011 -0500 doc: Fix 'vos endtrans' copyright SNA owns this, not me. Reviewed-on: http://gerrit.openafs.org/4586 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c7212aaaf155f60e28bf592a13e5a50c960e5017) Change-Id: Ib260b89ced9616d31242237048a900616ca9820b Reviewed-on: http://gerrit.openafs.org/4601 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dd8b624cf73c98d8edab2b253d40b4c2589d44d0 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: I65534b78842b4887d2fde67162a9d854437001ed Reviewed-on: http://gerrit.openafs.org/4597 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4598 Reviewed-by: Derrick Brashear commit 61414ab7a8adb3854dcd08aeaf5c642aea8477eb 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 Reviewed-on: http://gerrit.openafs.org/3547 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 352c3e366c2e0a8de4550547192276e62afd2cc1) Change-Id: I3aa116d280fe1b0efdfda79787f53fbee336a4e3 Reviewed-on: http://gerrit.openafs.org/4572 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0ca30d92a1b2445562bee05098121351990f215c 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 Reviewed-on: http://gerrit.openafs.org/4569 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a33f77b6e11214326f5e752de171602c0e9efe86) Change-Id: Ie20120aad8cb477d532594b9462aca3cf993aabb Reviewed-on: http://gerrit.openafs.org/4571 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6357b745863976955963246eed32e53d7962354b 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. Reviewed-on: http://gerrit.openafs.org/4561 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7d72a8c5c4b9df417c9337c01e8a7f26d8f6280b) Change-Id: If0cccaa47f1110eca347734bfbaedc0456e53b21 Reviewed-on: http://gerrit.openafs.org/4579 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7494fa49b29199d282b11b91cd6be8907210e1d7 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 (cherry-picked from commit f2e91cc3fe61956e7661eae9da82ddf746e63824) Change-Id: I752976dd5a68dd4212ad2c0088f799bd6a44ffc6 Reviewed-on: http://gerrit.openafs.org/4382 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4570 commit 5c2288d5eb46350bb7635e87d3ace8c7562b5148 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 (cherry picked from commit 5b9d427141f0a6fd0e83de9564e70ef2cfebf656) Change-Id: Icae627318cd523fa225beb8b53449f61532c4a90 Reviewed-on: http://gerrit.openafs.org/4531 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ac0797822c976b2b3c239ffcbcd7713897743eaa 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: I90c106ff6bb4463c3d55d5ac1bbf225464c80c0d Reviewed-on: http://gerrit.openafs.org/4560 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4568 commit 6c1c8477f97b79404dd4a057c39df57215cffb4f 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: Ibb5bc58dc6bf250d50ae8bd884a08449a356b6e2 Reviewed-on: http://gerrit.openafs.org/4559 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4567 commit 50808ed7003c666f72d26ea2100fd17784744a34 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: If123c7a7564c5dbe509ad107f2c856e96e562d33 Reviewed-on: http://gerrit.openafs.org/4558 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4566 commit 1b577bb643d8d68183bb6396ccb4b7722b8bee4d 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: I24c51395f22c07b11107c03dc749a7c2eff694f7 Reviewed-on: http://gerrit.openafs.org/4557 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4565 commit 89196a625e11cc1c717ab1154693e1439086134f 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: I28350202b954765c570582540fac180bd1f68206 Reviewed-on: http://gerrit.openafs.org/4556 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4564 commit d0edfe441bac4b802b2957bfb331ad04417a2acb 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: Ifbc2602cfa9f32bf5d9b53b71fc67fe0761394ea Reviewed-on: http://gerrit.openafs.org/4479 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4503 commit b6a4792b84bae661128dfa245cba541a7b9837d9 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. 1.6 only: limit it back to 300 elsewhere. 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 Reviewed-on: http://gerrit.openafs.org/4510 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 3cb97cdaa867b0d9fef84c683251a0a8f59a1519) Change-Id: I28a480788271eac1b69fb9704bed5c286be2c4c5 Reviewed-on: http://gerrit.openafs.org/4555 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 270861f67f09e6f22ec5c54105f287b23fa9d9ae 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: Ia1e44d8e15c1e4e076cc6d9bda42ffeaef943f76 Reviewed-on: http://gerrit.openafs.org/4548 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ebf5329e8ca1b3c0b581f436b28f6affe2c7c454) Reviewed-on: http://gerrit.openafs.org/4549 commit 41f48eb4e15817992c536939efeff594d6206559 Author: Simon Wilkinson Date: Thu Apr 21 18:18:54 2011 +0100 Darwin CM: afs_IsDynrootFid takes a fid ... ... not a vcache. Reviewed-on: http://gerrit.openafs.org/4511 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b178496063be6d95f301ae13c3e655c8fe94febc) Change-Id: If77fd99c5b96b243e1a5aee10f93c75fcca3cc94 Reviewed-on: http://gerrit.openafs.org/4552 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 082a217cfae58dd1a7a04d12de0f2b5339d2e74a 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: Ifc61e8b2366d8a191279f6ccbe394e55ffe15fef Reviewed-on: http://gerrit.openafs.org/4550 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce256d586468911d5501f667c53247a837378c06) Reviewed-on: http://gerrit.openafs.org/4551 commit 3cbd777eff4145388b6f238b5ca2e14d8ab182a5 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: Icdd2493e356803b4b2bd00c7349d8d882283d29b Reviewed-on: http://gerrit.openafs.org/4501 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4523 commit 314bc2e0082edea04ffb6908e2479be904b21b8e 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: Id5ab3c5ed7c76551d53fedea96eeded59c2c699d Reviewed-on: http://gerrit.openafs.org/4498 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4522 Tested-by: BuildBot commit 2d6f45161c65f3eaf2ca7f05ebbeb335e2e72fad 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: I7395034c5225ca62b562ea39bd01762c74090b03 Reviewed-on: http://gerrit.openafs.org/4518 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 0d1a063072575bd44378b09b01e9e2fffe5a032e 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: Ie04e86fc5516064a67d7804cc47f2e27a30ea7ea Reviewed-on: http://gerrit.openafs.org/4459 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a26f4b188172ed157b4ddf9006e46186702b5b56 Author: Andrew Deason Date: Tue Apr 12 16:30:55 2011 -0500 libafs: Do not specify an Rx busy channel error Do not specify an error for Rx busy channels in libafs, so we do not get notified of busy channel notifications. The current code just specifies RX_CALL_TIMEOUT for the busy channel error, which has problems (in particular, for RXAFS calls that are not wrapped in an afs_Analyze loop). So, disable this behavior. This is a 1.6-specific change. The master branch will instead get fixes for this functionality, and it will get turned on in 1.6 again as appropriate. Change-Id: I0ed292a61ba4c8d0e59017b3dfaadc88d17591e6 Reviewed-on: http://gerrit.openafs.org/4460 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a90ef45858e30b6319b15150c9b4f70ececb212d 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). Reviewed-on: http://gerrit.openafs.org/4373 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4b8823950d0d7f3806fe9e7aed22502b72a79e4) Change-Id: I1886cbb995a6c3e6ef3d4cc73895215d6293fe15 Reviewed-on: http://gerrit.openafs.org/4388 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8aa6f4221309f44f49cdd00acce88122f1753f6 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. Reviewed-on: http://gerrit.openafs.org/4360 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7d162266c4958b22cc45d65e3f204a96c218e5f6) Change-Id: I1c2aba273d1d597346ecb92f75caed6b6d624454 Reviewed-on: http://gerrit.openafs.org/4371 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1e322b883e036fe0bd5468fe60a0431545fe2376 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. Reviewed-on: http://gerrit.openafs.org/4361 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9376293634393597ac7db88593100937621f6c3f) Change-Id: I8e7e244b2e45a7a3af0505531757b8a54a0b3d29 Reviewed-on: http://gerrit.openafs.org/4370 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 35009a884611d543aff36a0758171798efea5168 Author: Jeffrey Altman Date: Sat Mar 26 13:05:26 2011 -0400 Windows: change log for 1.5.9904 (1.6.0pre4) Reviewed-on: http://gerrit.openafs.org/4347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 620ec4382fbf79908c62e4ce1e451b8743e457ac) Change-Id: Id226e7534ca5d7fee623d3b3a24edac76b354685 Reviewed-on: http://gerrit.openafs.org/4372 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 39a861f0cf10313323219409a2a7095f0fffd9e0 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. Reviewed-on: http://gerrit.openafs.org/4345 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 99ed22fb02a3b44c03327a1fdd5ef56e211724b6) Change-Id: Ie7ba95f14a2c34f11b358b482bd58bdacba6bed6 Reviewed-on: http://gerrit.openafs.org/4369 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8f7ae330d6491dae015c52ae1a3cf0e2333a349b 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. Reviewed-on: http://gerrit.openafs.org/4344 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 55781a831954cb1e7253a12e0f9b581b586c3603) Change-Id: I184a7e0b0ac05361c491821bc6a3756db3e24221 Reviewed-on: http://gerrit.openafs.org/4352 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3133fb26ed6730a735c09129a7097fa56630f07e 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. Reviewed-on: http://gerrit.openafs.org/4351 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7b4da89c8ed266959ec8d3ae4f6627b096206dee) Change-Id: I0051b9d609736fc172a7c3fefd23cb910b4543e6 Reviewed-on: http://gerrit.openafs.org/4355 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit db18dd847694d95f53c3eeec8d444fc911e503f3 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. Reviewed-on: http://gerrit.openafs.org/4350 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit dce071acef1119aceca7eb80a66c035fb03e9259) Change-Id: I17bd69033e51bc5c59d70f982f8deb04fd18d5b4 Reviewed-on: http://gerrit.openafs.org/4354 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84b37573013cf466dd195d748cc316e66dc39031 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. Reviewed-on: http://gerrit.openafs.org/4349 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f901c0f5258c14f5d04d9b64ca5b472c468f60bd) Change-Id: I764eb311082fbaf2b6b918f9023b53f0f3f67872 Reviewed-on: http://gerrit.openafs.org/4353 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7cfdf1ae21676bc83478057b4296160003bdbf7b 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. Reviewed-on: http://gerrit.openafs.org/4315 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c5be1f72875bcb083a9ddef4621efecf62aa880e) Change-Id: Ia90d4d439d054b95d8ea686ab853fb2067e19d38 Reviewed-on: http://gerrit.openafs.org/4337 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 89c6f7382fb1bde29d1bd2ced4e14d48494cab41 Author: Andrew Deason Date: Wed Mar 23 17:38:35 2011 -0500 DAFS: Allow the volumeSalvager to checkout volumes Reviewed-on: http://gerrit.openafs.org/4298 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ad0afb57b9172bb7cfa0853b5f34259c0958d248) Change-Id: I1eac22970f5665c7bdb2138ae380b59263836d99 Reviewed-on: http://gerrit.openafs.org/4336 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3734da6e022687ac16906f5954c30e20fa9d7c94 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. Reviewed-on: http://gerrit.openafs.org/4312 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 04bcfa2821c9deba151f562bb78452276d8d7443) Change-Id: If956be50059ac128b5880131f961342c2661e5b7 Reviewed-on: http://gerrit.openafs.org/4335 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 696fbd86b6f3a864439d72a2b3a55052e2e251cb 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: I23e47791b412f8f6260ca921daaf0200b19f4179 Reviewed-on: http://gerrit.openafs.org/4334 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e7099ec0aeedf8119a274419064d2903bd790cd4 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. Reviewed-on: http://gerrit.openafs.org/4240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 11ad1e467f9708f12fe09228cbb827b8f4e1225b) Change-Id: I3385d7b5a90e77ba8d6c87b9f29f39b62c17bb23 Reviewed-on: http://gerrit.openafs.org/4314 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 713893a2052cdc0ea35c323eabbd6becd387c453 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. Reviewed-on: http://gerrit.openafs.org/4287 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4ebebd0c3f89b65e93f0da6d53665271e6d2a61) Change-Id: I55f07806a4e089577252ddb527a86142b10f797d Reviewed-on: http://gerrit.openafs.org/4306 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ec8456884f5eeaaa5da6bacc35a40568cbe37085 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. Reviewed-on: http://gerrit.openafs.org/4311 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7b00c17b49fe6a54f99f3c23bfc307a4b10d88e2) Change-Id: I0dd638c37a116f39f93f08cc41c400f43a685940 Reviewed-on: http://gerrit.openafs.org/4313 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0263a96a987032bf8a04ce47bc3c70afebd87125 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. Reviewed-on: http://gerrit.openafs.org/4270 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4e8b729d8f216e9f033e95194740ff4cb566688) Change-Id: Ic64819d6182c57e081e0e0d85c3629a3f7c11ed3 Reviewed-on: http://gerrit.openafs.org/4310 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dfde656b6a1f0831ac537586aa0746b46ea93b88 Author: Russ Allbery Date: Mon Feb 14 12:36:18 2011 -0800 Update 1.6 NEWS entry based on 1.6.0pre2 release notes Reviewed-on: http://gerrit.openafs.org/3950 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f378dcf785967374309523a02ea06d6d1a3ff148) Change-Id: Ic5625c6eb32238b177716c0f87ea6e62521a9de8 Reviewed-on: http://gerrit.openafs.org/4309 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eb276810213418c7f8b00b63e92fc465ecd22ec2 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. Reviewed-on: http://gerrit.openafs.org/4285 Reviewed-by: Alexander Ivan Redinger Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b0921071dd1b4d460d406985bba9619561444055) Change-Id: I9e5bb2ce13378a0927763535d885a4728bd48f06 Reviewed-on: http://gerrit.openafs.org/4307 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f8c1bebf88de7376628c86eb3a7250bb78024510 Author: Derrick Brashear Date: Wed Mar 23 14:17:25 2011 -0400 macos next support first brush at supporting next macos. totally not lion about it. (cherry picked from commit XXX) Change-Id: I4ede2a940c3881b588117c2b80f62f71563e78ce Reviewed-on: http://gerrit.openafs.org/4291 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 829dd0bfc0f3315eb885373420fce684b55825b2 Author: Derrick Brashear Date: Wed Mar 23 14:11:31 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. (cherry picked from commit XXX) Change-Id: I48248c2fc081413536763f09608e00153c4ea3ee Reviewed-on: http://gerrit.openafs.org/4292 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 911b2583045bf1609b7f04571cbfd8b3c1df0389 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. Reviewed-on: http://gerrit.openafs.org/4199 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0f1c921fa1738c383fd576e287f356dd13f92a58) Change-Id: Ib56d3f77f0d90f5ad55b3c0de89632d271436f7e Reviewed-on: http://gerrit.openafs.org/4284 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d691ae10903e01db4d6b24a4eb02da536cadf7c 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. (cherry picked from commit ce5e263b488f8cb85662031ee08eea448dab2d27) Reviewed-on: http://gerrit.openafs.org/4244 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: Iec2d640daed1e9c175d17823750f272297f890a7 Reviewed-on: http://gerrit.openafs.org/4283 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 12507bcd2f3313fb97cb926a3eea67e0cd6e05ed 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. Reviewed-on: http://gerrit.openafs.org/4256 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5df51a82947f0ff60d57f551c5faa136ad7f6e0f) Change-Id: Ic710d9ab4da5dc1fdb4a1ffca72590b043bff918 Reviewed-on: http://gerrit.openafs.org/4282 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c31d20162b3648c2f16286f6ceb09f141abd9207 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 Reviewed-on: http://gerrit.openafs.org/3487 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81e7a5adf93a6b5eec104ca4bde429cf6cb0548a) Change-Id: Ie7c6a43d25c621a3faca2a6564fbc06f9af87880 Reviewed-on: http://gerrit.openafs.org/4278 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 893feb97db3638c6f7a222aabf35b63e76e590b4 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. (cherry picked from commit b9ecf28c6c7c232823ac9b44cd00db9afab81c91) Reviewed-on: http://gerrit.openafs.org/3486 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: If53edc8d100d5eacaf4aaad9feee96211e24e1a2 Reviewed-on: http://gerrit.openafs.org/4277 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d0a4f7a6fce300463f11e6c2430cb94df3aaeb5d Author: Derrick Brashear Date: Wed Mar 23 10:54:15 2011 -0400 openafs 1.6.0pre4 set version for 1.6.0pre4, and phasers for stun. Change-Id: I43e36633b679f9af6156025842f2e1556fcbb17b Reviewed-on: http://gerrit.openafs.org/4276 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 21a2c79b76a88640189276c64bd781867ba19357 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 Reviewed-on: http://gerrit.openafs.org/4257 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 71380ee4f3522ba64ed60724a928f8efc16ca132) Change-Id: I0f08b145073faca5d0dda2c6460e57dc448b3450 Reviewed-on: http://gerrit.openafs.org/4281 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ca878f0eac4775f02967e9df31f54a28573f12dd 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. Reviewed-on: http://gerrit.openafs.org/4258 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit af854b4e2f19e5f1a83b686e99ca3dd6122af942) Change-Id: I95bc506e1113d0054b2aaca3a301551de1f086db Reviewed-on: http://gerrit.openafs.org/4280 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 35451a9d436d6359faab933fd2432b84f5dddf8e 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. Reviewed-on: http://gerrit.openafs.org/4267 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 8c418408016ff8d6be9f85c4666a49954f61dbd0) Change-Id: Ie34832eb94f91a6e9083f65aa81333cb7b1fbb30 Reviewed-on: http://gerrit.openafs.org/4279 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d844910d7545df7b66625edcdb5ea2caaf21f341 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. Reviewed-on: http://gerrit.openafs.org/4272 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ef9fc4fadaded1c0ea067b2fd1d423df826606ae) Change-Id: Ieeea51fd247ff4fc1b1da03c94a905c293b9fb7e Reviewed-on: http://gerrit.openafs.org/4275 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d260d9d7ede14123010b96e133a9ac210a432dce 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 Reviewed-on: http://gerrit.openafs.org/4254 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0016e013aa012e179e7ac4c59b19a0ee1cbd0840) Change-Id: I6796dee249eccd7646359deb8f29322b9954f803 Reviewed-on: http://gerrit.openafs.org/4269 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9cb1d688ea96923d2b5abacdcbf9cf755e2145e5 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 Reviewed-on: http://gerrit.openafs.org/4255 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c4744cc699be19fffb49f39f469e91ef6aac6585) Change-Id: I3de2c4799ff1a552e67d4398b76e8736ba2abf7e Reviewed-on: http://gerrit.openafs.org/4268 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74f56c447de1878427655c1394e1805081b65333 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 (cherry picked from commit d73d9a1011cc3e1e5acfbc970434373f732c066e) Change-Id: I4dde25e54e3d76faff58c8e42d0949493aa986f3 Reviewed-on: http://gerrit.openafs.org/4243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95fd8e09d80e3fbefe66ad0b5309b9844b92a12d Author: Derrick Brashear Date: Wed Mar 16 01:06:43 2011 -0400 macos: kernel socket upcall support kernel socket upcall instead of listener env (cherry picked from commit c10f5296d26eac9ac00018199ef579e8f6095c07) Change-Id: Iaad3138106475219194772491d3e0915d60c466e Reviewed-on: http://gerrit.openafs.org/4238 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ee2811b01f3c34d3f07802ff88e2577da1caef6d 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. Reviewed-on: http://gerrit.openafs.org/2873 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 88fc9ada4cfaee354199480916d139400ee0ef5b) Change-Id: I24bf2100bf57a27323cd0e9e5081e767e67c944e Reviewed-on: http://gerrit.openafs.org/4261 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 17b48f99b60ed0f67270d4649ee9bdcda9a7cc59 Author: Simon Wilkinson Date: Tue Mar 15 21:48:43 2011 +0000 Throw the compiler a bone ... ... failing that, a semi colon. Reviewed-on: http://gerrit.openafs.org/4234 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ffdc040d560a461abd59602ad62ba2fbf150227f) Change-Id: I6dc924df277da7e650d6ae26f8520b23be10db3e Reviewed-on: http://gerrit.openafs.org/4235 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ac00619358c7a1b1749440e4c4ca6510ff87687 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: Iaac89f8db96c9428481a638fc72f8d14c53e2045 Reviewed-on: http://gerrit.openafs.org/3393 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4231 commit 66885074b3cf2f1f3c2facedad2e95600b9573c0 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: I225a790e04d8aa1298bbf03a9559ae0b5e63a70d Reviewed-on: http://gerrit.openafs.org/3322 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4230 commit 449d114b475e20535610ee8eed8715fa8071f288 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. 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 (cherry picked from commit 3d92852ba99bc7591515992dfea3436d93c23b85) Change-Id: I72177ad2ee6d0a2c2c3f6d6819289a761b2712f0 Reviewed-on: http://gerrit.openafs.org/4226 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit de478ca8ac14b991082bf0f26fb9807a913980a0 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. Reviewed-on: http://gerrit.openafs.org/4222 Tested-by: BuildBot Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit ff2933a122ddf9421ebcacdc7e4ec5f44333f894) Change-Id: Ibfb050552f8b2357e57139976e2bc42ce6187f4f Reviewed-on: http://gerrit.openafs.org/4225 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7821f0bb503acf6c10547aeb29952768ef1127c Author: Jeffrey Altman Date: Mon Mar 14 22:55:26 2011 -0400 Windows: 1.6pre3 changes Change-Id: Ia4d504c2f9478f88c219375b92cdcb203defddfc Reviewed-on: http://gerrit.openafs.org/4228 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53d991474d8a8a885697cbdfb975f3a55500aa58 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. Reviewed-on: http://gerrit.openafs.org/4124 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 0d1335ad7104a6fa67525b84d70a33e7bb1b6c6a) Change-Id: I27b077c7fd9e8ea5cb67da96b5172d69623e1122 Reviewed-on: http://gerrit.openafs.org/4221 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2a4a4c715928c9c8e34e7d1285e753ea0c05cec1 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. Reviewed-on: http://gerrit.openafs.org/4111 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit dec0ba1cfaf7dd6a4ed23a2f656bd6272600d51c) Change-Id: I2ffa85193ffeb35c9558224985ba7485ec617712 Reviewed-on: http://gerrit.openafs.org/4220 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cf532f7c8845e70df27fe45e7242db170f00babc Author: Michael Meffie Date: Mon Mar 14 10:15:35 2011 -0400 readme typos Fix two typos in README. Reviewed-on: http://gerrit.openafs.org/4218 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ba67ef96bb5216ecb03d656af22b3b7f7542efef) Change-Id: Id202785ee2568bd625c1e781574d21dae3488982 Reviewed-on: http://gerrit.openafs.org/4219 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fbd4a43ddf5131cb597d46cff0419e7685e3210d 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. (cherry picked from commit 4953ce8070497bc494e624d72271bcbc5dc1dbe7) Reviewed-on: http://gerrit.openafs.org/4211 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: If4cfbda25f8d1c5e1da4c1e42982c74becf386e3 Reviewed-on: http://gerrit.openafs.org/4217 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c97ec074977563b756e9ad1c9773c5880965c664 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: Iff5ef4993f082e73cca93e79d17f49cc15b6264f Reviewed-on: http://gerrit.openafs.org/3331 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4207 commit 19d89b94811d93b8a755f7e602d757e7a5c89765 Author: Derrick Brashear Date: Fri Mar 11 08:27:24 2011 -0500 make openafs 1.6.0pre3 create version 1.6.0pre3 in the various bits we need it Change-Id: Ia5768d097b1f4fa0df911db6d9d094584405c4db Reviewed-on: http://gerrit.openafs.org/4205 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 943f463775516875b411a4a0b7a3e9673179051b 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 Reviewed-on: http://gerrit.openafs.org/4206 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7e68671f6acf66b568672d94b37ef456b1de8813) Change-Id: I88f9ae47fcbb2878cc099fe783c72c32cc0b4a92 Reviewed-on: http://gerrit.openafs.org/4208 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 205a787bdb459c3c7d8acf79c6b108120d3a9f0c 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. Reviewed-on: http://gerrit.openafs.org/3472 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 592a33a4787db88993a7bf9d8f5ad8c11a576b56) Change-Id: I809d10d2eceb7d0db92b3d149b13de0dc9221958 Reviewed-on: http://gerrit.openafs.org/4194 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d83e8626db9c5dfca0402ab22796b02333503cc9 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. Reviewed-on: http://gerrit.openafs.org/3971 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3105c7ff0b4ae9c372dc4c1424f63b7f259dcda1) Change-Id: Iced11ca56ced5971ab0cb8dbb65d275754ec33d5 Reviewed-on: http://gerrit.openafs.org/4186 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b5f9a8c0aa4223d5decb8048fc97d317a494d846 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. Reviewed-on: http://gerrit.openafs.org/4183 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 75c2f96364d598ec0c134cb6b366ce067b8b7f49) Change-Id: I932c3d1fdb89f697347c0acc06dc628b3b6175da Reviewed-on: http://gerrit.openafs.org/4185 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba00da1ea833172ab6f6b5c89b5b92c4b5d5f716 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. (cherry picked from commit 8f8522e457eb7703f85da3a193134c50bcd8b6cf) Change-Id: I69b402b1a31bfa1b5e5a14a3a86bc0d3fab7f842 Reviewed-on: http://gerrit.openafs.org/4184 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c0aa61b7914c724b192c78d67b3bc963be4dbcd5 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. Bump shlibafsrpc minor version to 5 instead of 3, so we don't collide with the shlibafsrpc versions on the master branch. Reviewed-on: http://gerrit.openafs.org/4159 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eddcee3ad518dff9fbfda790640c5bfd2e97ef5a) Change-Id: I38981ad3e3c2cbb03c516c02481a2f44cb5f9acf Reviewed-on: http://gerrit.openafs.org/4182 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3260065941c65434c9124fb51559b0519e77fa9b 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. Reviewed-on: http://gerrit.openafs.org/4060 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 974e95302a312c03cd735c0fdaa67fb02d254e26) Change-Id: Ie75dc32c2a2c1ff05a96a1a14650e41ada07609d Reviewed-on: http://gerrit.openafs.org/4170 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f90a3a5b19bb4a8da91f0cbbcb4957c2d8246bcf 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. Reviewed-on: http://gerrit.openafs.org/4059 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit b41575d176c2d485d55aed8780bfab9db4b7587d) Change-Id: I6c3d68f0f5248308d0f32e9fad5c540aaf593962 Reviewed-on: http://gerrit.openafs.org/4169 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c7612a49e1db924a8b8b24319754834b130c9312 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. Reviewed-on: http://gerrit.openafs.org/4058 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08ffe3e81d875b58ae5fe4c5733845d5132913a0) Change-Id: I0336bbc543828237cb9ae97ede18133b4e15100a Reviewed-on: http://gerrit.openafs.org/4168 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0a8bfca218a10df6e83768996a050cff8b19f02f 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. Reviewed-on: http://gerrit.openafs.org/4118 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a862d2df93fd4e8c8c7a0b8eebe9e59b75f54072) Change-Id: I4ec62d4c6b06678af6e8e499e9dafb2d0698c9ab Reviewed-on: http://gerrit.openafs.org/4167 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit be51c660780f8f9c0aa5f037a29130548460b8e6 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. Reviewed-on: http://gerrit.openafs.org/4120 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 40049c56791f3488640ae65c5dc5c4d6503375bd) Change-Id: I1c7f61994b050de7bd8c0e7fc39df978a31530a6 Reviewed-on: http://gerrit.openafs.org/4166 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fd9b8a51d19a64798997835ce783cafab61e6b7f 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. Reviewed-on: http://gerrit.openafs.org/4119 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ddf5ae4f746f2b5e522e10cfcacb6225499e7956) Change-Id: I840930e144260036e2c96d83134a79dee3c9d083 Reviewed-on: http://gerrit.openafs.org/4165 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9cb10be35b6942111a1110f569c8c77191ddbd23 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. Reviewed-on: http://gerrit.openafs.org/4117 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit bb25fc6418bac937b31476754a09199636c24211) Change-Id: I9533d4f841ebc64bdf49c145512471ebbb51136e Reviewed-on: http://gerrit.openafs.org/4164 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 80159e9312ed2249866159170cea568a2108250d 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. Reviewed-on: http://gerrit.openafs.org/2865 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fabd590cc4b0142fe97c4ffa6a4669fe5d44c359) Change-Id: I62eaa14c95ecce3dcd5fdde97f3a45f9103fc7bc Reviewed-on: http://gerrit.openafs.org/4175 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 40514c256bfd60682d57eada6fb88f468095e672 Author: Andrew Deason Date: Thu Aug 19 11:35:40 2010 -0500 Windows: vol-salvage SalvInfo fixes Commit 3d7388b790ef21de552ec60d379764df067ae421 broke the windows build. Fix it: - SVGParms_t has no salvinfo member, but an svgp_salvinfo member - Correct the SalvageVolumeGroup prototype to match the actual implementation Reviewed-on: http://gerrit.openafs.org/2595 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 87dc2a312ac94bc0a8b809a8f879128be8d9c791) Change-Id: I8fd13e683060ae4ae4818a03626e95680cc3e86d Reviewed-on: http://gerrit.openafs.org/4176 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2232f501c879edb0354878223e69aa8c40e07344 Author: Andrew Deason Date: Thu Jun 24 15:45:05 2010 -0500 vol-salvage: Move global vars into SalvInfo struct Reduce the number of globals used in the salvager code, by making functions pass around a 'salvinfo' structure that contains the information regarding a particular salvage. Reviewed-on: http://gerrit.openafs.org/2250 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3d7388b790ef21de552ec60d379764df067ae421) Change-Id: I15137994806f0c753a42347c28cadcf48002b800 Reviewed-on: http://gerrit.openafs.org/4163 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 25529a308e2c4b4fc51ef10c48648316f845a54b 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. Reviewed-by: Simon Wilkinson Reviewed-on: http://gerrit.openafs.org/4152 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit bbf406da30428a22b4a6d28a7d36dbb786013cfa) Change-Id: I5d15097e4c9aa83444520628f484407d244ddf97 Reviewed-on: http://gerrit.openafs.org/4161 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9b62a95e4d5182cca70c690fa810aa5d99a22049 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. (cherry picked from commit 98a0c2f47b8641e3e31ed7d2f7d84c2eb484ef51) Reviewed-on: http://gerrit.openafs.org/4153 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I4e199c748d7b88ff7076106b19c3dec0e60be39a Reviewed-on: http://gerrit.openafs.org/4160 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a48580971da0b26ccd3e1db5efc894bddcc5aa93 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. Reviewed-on: http://gerrit.openafs.org/4095 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2681c49ada5679922f949e9c7d0010f2ee705dab) Change-Id: Ie1858dc4e7dfc6e9db4a4f63deda8018645f9111 Reviewed-on: http://gerrit.openafs.org/4162 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 511fc5d4b50bce273c16acef7b551b8517a6bf46 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. (cherry picked from commit 8992210f27671673a89a541776aa105238ad14cf) Reviewed-on: http://gerrit.openafs.org/3597 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: I318f2f956a48f10e91590ad9f28fab868d8ceb60 Reviewed-on: http://gerrit.openafs.org/4134 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 70938028cd1267aa604d8b983473403eec702a20 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. (cherry picked from commit 9e539fbea456cdb416a487364d67ab54da1249a7) Reviewed-on: http://gerrit.openafs.org/4131 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I9211d919e4584c1dac388155b6f4609f50fe603c Reviewed-on: http://gerrit.openafs.org/4133 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5006ed8e5748dbdca76064dc9520837bcd55fef3 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. Reviewed-on: http://gerrit.openafs.org/4130 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ca0ae15d621dbd90339408a26715a107d1f69f23) Change-Id: If97b81e874c87b10a4c4e5f190f573781fc3c158 Reviewed-on: http://gerrit.openafs.org/4132 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 689317fbd98e28b8f2b884fcb4ec52b62d927143 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. Reviewed-on: http://gerrit.openafs.org/4126 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 64d52938ee26e160a6e2cd64253df096eb5d0c1e) Change-Id: I168fb4cf80106bcaf3f846df68ab5a98b65365ab Reviewed-on: http://gerrit.openafs.org/4127 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c7221c70b89735d8c19b1053818770a5e4d108e4 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. 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 (cherry picked from commit 89ae0b12f20eea8a8b0a3fe493dc52d2def436ce) Change-Id: I0f0d0d2676d49eb33d7eadd3b7616e16e1e9002f Reviewed-on: http://gerrit.openafs.org/4113 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f38c9aeff78db6cebd654051aa1f9ba86f11a2fd 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. Reviewed-on: http://gerrit.openafs.org/4108 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7d516192bed12aa3137bcb86cbe0d8ecd492415c) Change-Id: Iae0d290a41d2df1482e399721469984732096bf4 Reviewed-on: http://gerrit.openafs.org/4112 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 34713abb800a0c30fd6a712df2f4c8d1aab197aa 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. Reviewed-on: http://gerrit.openafs.org/2480 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1466cd755ce3b48d312fb4404f494934840e586b) Change-Id: Id87ef70853212f41d2eabbf02bf67e216d9eb43d Reviewed-on: http://gerrit.openafs.org/4110 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f13e0b298e9515da3d4785c5b5e4ec8ff26fe51d 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). Reviewed-on: http://gerrit.openafs.org/3582 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1bc23299720fc57dfefbb588f1f3de0ec792e069) Change-Id: Iae7294b266446da8d8577ddf68449d3a12784316 Reviewed-on: http://gerrit.openafs.org/4092 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Andrew Deason commit 790f92d55000d320521999261141938244f3e825 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. Reviewed-on: http://gerrit.openafs.org/3901 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 470a6d46175125bfe15bb267ee8f77d60132592a) Change-Id: Ia81a9871a2d38843d0ad2c61af06c8bbaaef3d81 Reviewed-on: http://gerrit.openafs.org/4091 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 739721df17243959468ffd89fc791aca5ca15c6a 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 Reviewed-on: http://gerrit.openafs.org/3939 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c3499218ad604b1985239334d77dd0a94c7128bb) Change-Id: I8280d0f1c2ac6ffb93ddc42a5cc5234401a4fcbc Reviewed-on: http://gerrit.openafs.org/4090 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 566f4f198a2e1e7cc05502bec1db267965a5ccc6 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. Reviewed-on: http://gerrit.openafs.org/4028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 63fb786c541926dbf03a9452288c6a938c7cd6c4) Change-Id: I4d0cc939065c39ca2478006e05fae025921af5b8 Reviewed-on: http://gerrit.openafs.org/4089 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4a068778bd6f3b6d74e40091c124e1db985262c6 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 Reviewed-on: http://gerrit.openafs.org/3963 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit df7cca0fa8c5cbeca8cdb9f065e47f4c927dbbe3) Change-Id: I9046dd9dbd0536a65b694a9331a86651bd1eeabd Reviewed-on: http://gerrit.openafs.org/4088 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ddda954cab7678d5e655af52e49c7fea67e5f8ee 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. Reviewed-on: http://gerrit.openafs.org/3977 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9c7c6a2ca5c45367d1a8ed1710a4c99f8e3c5f6b) Change-Id: I9514087016a2946934d253a79ce0721ce1d8ea0f Reviewed-on: http://gerrit.openafs.org/4087 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2f2fe6fefb3f7bb0184958ee4d6aff3448b972c4 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. Reviewed-on: http://gerrit.openafs.org/3979 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 18b24156f1dc0f727260724023eed583b460218b) Change-Id: Icc856771c82332ee6dcd25692da80c28d2effe99 Reviewed-on: http://gerrit.openafs.org/4086 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4fe833e4a777235034151f630644303779c8f517 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. Reviewed-on: http://gerrit.openafs.org/3978 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 445548636f4d57aaa8e29912803e242f772959c7) Change-Id: I86607ac80f564950b544a9283794f842d0dadadb Reviewed-on: http://gerrit.openafs.org/4085 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78c87a2a7e3fa5efd1cd9093a3d5f32bcd709d04 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(). Reviewed-on: http://gerrit.openafs.org/3897 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 1f1545dfb708b6f70065da58b44676b8eafef772) Change-Id: Id57dea754bb8f2e45b3128afadb52aeea97c4f13 Reviewed-on: http://gerrit.openafs.org/4084 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9fe452316ed225a176ea63f41b34a6e15d6ed51a 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. Reviewed-on: http://gerrit.openafs.org/3903 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9315c66f15fb0d178e1c322cf14c0d64eea46c65) Change-Id: Ia1fed73cc3f227b2bba2c1a66de86b67b58139ce Reviewed-on: http://gerrit.openafs.org/4083 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3aa9e9d9e1378098f1e81321e3369c524398caab 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: I13addcb4b1ff5b36830e190bcee70a504df98e46 Reviewed-on: http://gerrit.openafs.org/4064 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4397159a1c84c890a4f2a84fa2282f0ab9b74154) Reviewed-on: http://gerrit.openafs.org/4065 commit 1285c5311438088865edae1d019ba6c61f162fe9 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. Reviewed-on: http://gerrit.openafs.org/4076 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fbac809a46376fcf60d3dcedc0be962c43d9c74e) Change-Id: I8f56d5cc90957285cfd765f791b584eb36062070 Reviewed-on: http://gerrit.openafs.org/4082 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e67e03f9f6152922d5fdd2efd8108a0766831fa5 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 (cherry picked from commit 86f7ac2f57591cf72ae22f8d1267efcc8e0b6641) Change-Id: Ia6e7b3f10e7efdea3e46c4fb7634f6e28d624e58 Reviewed-on: http://gerrit.openafs.org/4081 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 153a44e4b76172e642320bad0585a6cc8a966273 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 Reviewed-on: http://gerrit.openafs.org/4074 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e16d015a3eec3cf2fb79b27b39bd567bb4f07581) Change-Id: I3bd6270f1d33468e9893aaebd887b23a1eda4f07 Reviewed-on: http://gerrit.openafs.org/4080 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit cc4199637973d2eae32cbaf06ab8daf05ab871d1 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. Reviewed-on: http://gerrit.openafs.org/3583 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 651f66b0ffed08da82b352e3e252a03b8b13c780) Change-Id: I6c3c7e219548c0694dc84d167535cacbbfbb1e02 Reviewed-on: http://gerrit.openafs.org/4079 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 65ddae68df10eae5884376be85185329c036ce9a 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. (cherry picked from commit 4a6a00d6f45bd0ac94e2eb05adee41552073643a) Reviewed-on: http://gerrit.openafs.org/3345 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Iea866ca6dfe758d95ef890f0d95e1c38012048b4 Reviewed-on: http://gerrit.openafs.org/4078 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 41da26a9fdb9565565159daa46f923cc1d371a09 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 Reviewed-on: http://gerrit.openafs.org/3342 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 01b9cee0d0d4a328b662c0138efcd8506126084c) Change-Id: Id1f046f9636632ba4323ee2b69f6270175c34c1b Reviewed-on: http://gerrit.openafs.org/4077 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8cbf8e5c5a4597c0be8861f37ab73d23f125399b 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. Reviewed-on: http://gerrit.openafs.org/3895 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 358f2a23079f940e9adb741d2526895d620d1ced) Change-Id: Ice7b37feb23acef73d64d923243ee622db657b5d Reviewed-on: http://gerrit.openafs.org/4070 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b5bc969a564f33d68de0802c3f59c4e1df357eb3 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. 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 (cherry picked from commit c576ca12b6618d2a121b29562aa70532b4cf65a9) Change-Id: If22e75b52792991f9eae5e27ef9b06dcfb73aae3 Reviewed-on: http://gerrit.openafs.org/4069 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 080d6caa26043b8ee5a8ff53672df3946f57454a Author: Anders Kaseorg Date: Tue Feb 22 19:18:30 2011 -0500 Linux: install_session_keyring: key_alloc flags are unsigned long Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4034 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 559152ac107f91c8c2f11a909ef638551227b04a) Change-Id: I33e909b7ec04a8d7df3b61bd16e1c8e820c38826 Reviewed-on: http://gerrit.openafs.org/4068 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit adf5ea13347aee4227e1253a5fcb68d9a3dcfacd Author: Simon Wilkinson Date: Sat Sep 11 12:43:35 2010 +0100 Linux: Move keyring includes where they're needed We don't need the keyring headers in every file, so reduce namespace pollution by just including them in osi_groups.c, which is the only place that uses them. Reviewed-on: http://gerrit.openafs.org/2746 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 33ce7a9308c8a71fbfcea82a935e32521031f48d) Change-Id: Ia943179a23c856ef9d37d1774192389cfe38612a Reviewed-on: http://gerrit.openafs.org/4067 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dfcdd4a0672d3ebd7dec1969bbcb746196b50d8b 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: Ia3b7b6cc578d84f9ee8ee105992248cf535564c6 Reviewed-on: http://gerrit.openafs.org/4062 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5aebd8d5416f242a84676cac3874fbc71c3cef44 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. 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 (cherry picked from commit 839b62ab414fde02e1a2093bc036c63c708d861d) Change-Id: Ia8ea701c81bad9dc293ecb2848bd971052743c81 Reviewed-on: http://gerrit.openafs.org/4025 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d49ff6addf5cb1b878e707096b8ca9fd4ef621b 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. Reviewed-on: http://gerrit.openafs.org/4020 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0491b2846f81defe92e3fcf8bc4481637ec109b3) Change-Id: Ibd0c39d414552ec95eba09faa4f542acf898af3d Reviewed-on: http://gerrit.openafs.org/4023 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85791f53d7357b971d6f091038c8c4f39c50414d Author: Andrew Deason Date: Thu Feb 17 11:53:08 2011 -0600 LINUX: Fix osi_compat.h include guard Reviewed-on: http://gerrit.openafs.org/3973 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7bbec1f86bbdbf351d36863dc5d971f61051b170) Change-Id: I8a0b1a6bc57cb06778d97ad738c04b03c3ba7876 Reviewed-on: http://gerrit.openafs.org/4015 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0022bdd945a465bb6fe2ff1c821ff267563a60ad 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. Reviewed-on: http://gerrit.openafs.org/3688 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b932375ecca3fefc1190a8d23d5c24ae538cfae) Change-Id: Iec860d1ec5f1208e27e2602f10a83791a3481987 Reviewed-on: http://gerrit.openafs.org/4014 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5d0955ae914857c0fa64c6311f19b734ae59e05d Author: Christof Hanke Date: Sat Dec 4 11:03:13 2010 +0100 Add .gitignore for tsm41 Just ignore some files created during the build. Reviewed-on: http://gerrit.openafs.org/3435 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 3c370ed1e58310cb0202a5d2c826ba6569da831c) Change-Id: I774254ebb7d0cd45f162c7b74df1f0b016d2f7be Reviewed-on: http://gerrit.openafs.org/4013 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1547e54fd6ca7475b11f1202e13c0a4cb7f2dfcc Author: Steve Simmons Date: Tue Aug 31 13:16:15 2010 -0400 More deprecations noted. Reviewed-on: http://gerrit.openafs.org/2633 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 3f69d7247cfbd809aeed1e4d943c2b21da035654) Change-Id: Id20ce6b254720f61aefec18addbb5032849f0b6f Reviewed-on: http://gerrit.openafs.org/4012 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bffc0357227f6bd3a2d2652eb74a5cff0836a7a0 Author: Steve Simmons Date: Tue Aug 31 19:21:50 2010 -0400 Update the man pages 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. Reviewed-on: http://gerrit.openafs.org/2637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 61ddfbaa19f28bd8b352dea307ab752239470026) Change-Id: I18596dd78d0d5875d1aa442098c6bd757f496953 [sxw@your-file-system.com fixed the commit message for this pullup] Reviewed-on: http://gerrit.openafs.org/4011 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6226c082fc87559610076b28fe12f5175efacba6 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. Reviewed-on: http://gerrit.openafs.org/3301 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4669a55b58ddb6905424c4f8123d7e631f52eb35) Change-Id: Ib545b1d7c09dd2ce450517df1b0c0d20248c9161 Reviewed-on: http://gerrit.openafs.org/4010 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d655f9b7bcba9b5fa0ab1ac2bb92e6ed75cf392d 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. Reviewed-on: http://gerrit.openafs.org/3262 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 354d21878ed401c644a5392f86af3fe6e660801f) Change-Id: Ief39cbd5edc9bd9298e199f974d3dcecef31a3d5 Reviewed-on: http://gerrit.openafs.org/4009 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6477acfa576832bd14fcd7bcfe9d24ca008e7ee4 Author: Rod Widdowson Date: Fri Oct 29 14:21:37 2010 +0100 Docs: Specify where the Windows mini dump file is written Reviewed-on: http://gerrit.openafs.org/3187 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c61e1aeeef8f81f75084f457e4d6e5e1d754cfa5) Change-Id: I3ec1a690596b940a1fe8ae2f93d9af1cae1633b8 Reviewed-on: http://gerrit.openafs.org/4008 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1a54c115968f698437fe0d73149f21cce3eaf67c 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 Reviewed-on: http://gerrit.openafs.org/3164 Reviewed-by: Derrick Brashear Tested-by: Jason Edgecombe (cherry picked from commit bd1657fb9d42e46fdc9560687aa0d360395740b2) Change-Id: Ia5a26d636ab093b8992ee595683bac37c7085ba6 Reviewed-on: http://gerrit.openafs.org/4007 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 687831a16c2eeacbab7e62280bf8f897df7f49ef Author: Jason Edgecombe Date: Tue Oct 26 15:06:28 2010 -0400 Quickstart guide: use yum install from openafs repo Reviewed-on: http://gerrit.openafs.org/3159 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9c32ac52f161135e39ed60cf87bfad3d016f3c6f) Change-Id: I837934a526d9bb5b77d42b3d8e7481e6b2e5621c Reviewed-on: http://gerrit.openafs.org/4006 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a138be92a0016ccb237e8216d875720b2dbfd896 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. Reviewed-on: http://gerrit.openafs.org/2908 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e7a12d56bc3b27a3ada37e2799e1925204d23300) Change-Id: Ifa967e9936cb3beed19b1df1e234a13ca9c95e37 Reviewed-on: http://gerrit.openafs.org/4005 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 604f7a2ad251d36410192d982b66fee76ae622f0 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. Reviewed-on: http://gerrit.openafs.org/2894 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 907521feb1b9c7a6c816866a672c7ab84dac6abd) Change-Id: Ie8c2a80b204754f1c17d9fa5e06903a7cdf7e4d2 Reviewed-on: http://gerrit.openafs.org/4004 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear commit 7c6441d435982fd6ff8370b55e02e5fe39aefa61 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. Reviewed-on: http://gerrit.openafs.org/2895 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b1f747c1f131fc1a9f8a5895fb06607a255a27d8) Change-Id: Id35b288a56c8946a34b234eac1e899898d29ae65 Reviewed-on: http://gerrit.openafs.org/4003 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9a5b168f758ed31537d0b604ea32ac586f407856 Author: Russ Allbery Date: Tue Sep 14 10:12:43 2010 -0700 Mention KRB5CCNAME in the aklog man page AFS users not otherwise familiar with Kerberos may not realize that one sets KRB5CCNAME to use an alternative ticket cache. Mention the variable in the aklog man page, although defer to the Kerberos documentation for most details. Reviewed-on: http://gerrit.openafs.org/2761 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Russ Allbery (cherry picked from commit 089cd2c1039315fe400f85eec1c9f2152ea090c7) Change-Id: I0428c8c4dc7f6b1f667e69b571be944777bcb057 Reviewed-on: http://gerrit.openafs.org/4002 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c4a29776c22e0269661d03adc1a125ae3ccbe78b Author: Simon Wilkinson Date: Sun Sep 12 18:41:21 2010 +0100 Add additional dependencies for shlibafsrpc fsint and rxstat need to be build before shlibafsrpc, so add them to the dependencies list. Reviewed-on: http://gerrit.openafs.org/2755 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a4ec68691869deaf12a6fe405394bba2c9003fb9) Change-Id: I5528390faf2c0ff9c85505673f4317b0c3900e0e Reviewed-on: http://gerrit.openafs.org/4001 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32459e5c68cc1442a7dfc0926daf7354c3e060ee Author: Simon Wilkinson Date: Fri Aug 20 13:19:30 2010 +0100 Add a few missing entries to our .gitignores Add a couple of build products to the relevant .gitignore files Reviewed-on: http://gerrit.openafs.org/2599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9da71758f194b98e1be3dee8d588b703874ea9a6) Change-Id: I0d81739fbadad6a1787e17863df0ee6dcdd083bf Reviewed-on: http://gerrit.openafs.org/4000 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bfaefe518b7a5073df9e7292e24e266544e85754 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. Reviewed-on: http://gerrit.openafs.org/3662 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9cc9b0d618ba1c787a8a684077c1d2f205b8889c) Change-Id: Ic342a8ff9dc4c52c8f7178f103db93ba9bef6712 Reviewed-on: http://gerrit.openafs.org/3990 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 98558995d6ac778843f5c1488b6295cf6c2f4744 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 Reviewed-on: http://gerrit.openafs.org/3208 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 572f9baaeb626293f4db62a66db1ea9b9a373c03) Change-Id: I44c71ffedcbe55db696db667d1941a7bdc781cff Reviewed-on: http://gerrit.openafs.org/3987 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 71082a661f6a4b99d51a9eaeeb9eef99f69a93be Author: Simon Wilkinson Date: Mon Sep 6 09:38:47 2010 +0100 aklog: Fix some format warnings Fix some format warnings (size_t vs int) which only appear when we're building with Heimdal. Reviewed-on: http://gerrit.openafs.org/2740 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5bc4b4956509256e8cf13bd04e4615ee2cb31c65) Change-Id: Ifac99313d96dcd3d33733ffd75db752ab3854608 Reviewed-on: http://gerrit.openafs.org/3986 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7a3c6b7c5e442f1060bf46119bd1df9c7d2e2a97 Author: Simon Wilkinson Date: Mon Sep 6 09:37:23 2010 +0100 aklog: Fix weak_crypto tests The tests for the various ways of enabling weak cryptography fail with current Heimdal master, because it defines krb5_allow_weak_crypto but does not prototype it. Fix this by testing for the Heimdal version (which MIT does not provide) first, and only if that's not available, try to use allow_weak_crypto. Reviewed-on: http://gerrit.openafs.org/2739 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 696e1c015eeef259451c101813b9e930e402cb49) Change-Id: Ia69e1899f1e3d058271f147d33b58383ca35b4ec Reviewed-on: http://gerrit.openafs.org/3985 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bf0f3dbd06bd73aeb7333f357708b2ad07918520 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 Reviewed-on: http://gerrit.openafs.org/3209 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 93ab13cbf3cfee30524f63925a11a0ab0c55d600) Change-Id: I48b0f6c40a2a6b989bfc859267b080e31a6ffc3c Reviewed-on: http://gerrit.openafs.org/3988 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 29d624a98cca1a2e31fc8cc51c7e4d1577b5282d 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. Reviewed-on: http://gerrit.openafs.org/3981 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2b094cae6c39bc9e2d8f23f4654e137876b25d57) Change-Id: I764a91e787acb2d2e3d0595cb344bc5b44465bd9 Reviewed-on: http://gerrit.openafs.org/3984 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit de1158431ad3308886c54c8ff3d8b6dc8259c41b 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. Reviewed-on: http://gerrit.openafs.org/3980 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fd010651194f4c9f1324ea7aa8d84426ce9827e4) Change-Id: Ib4f4fe3a6072f9aea4683bb1ba531da8d965b156 Reviewed-on: http://gerrit.openafs.org/3983 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a5bbc871ce360f5c95edf08d2a51b95a6095e3cf 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. Reviewed-on: http://gerrit.openafs.org/3625 Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit da912adbf1512702a17b8e381af3d0225875e67c) Change-Id: Ib00275f873987700312b402d6fe0513ce96e9cf8 Reviewed-on: http://gerrit.openafs.org/3982 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b3ce627af18ebe84436cea57c60544bc74b9026b Author: Ben Kaduk Date: Thu Feb 17 15:00:06 2011 -0500 Pull in 64BIT_ENV for FBSD Support for some newer FreeBSD versions was added after we killed AFS_64BIT_ENV, but the commit to kill it was not cherry-picked to openafs-stable-1_6_x. Cherry-picking the new version support thus introduced a bug, as we still need to define AFS_64BIT_ENV for these systems on this branch. We attempted to fix this previously, but that fix was incomplete. Apply the full fix now. A direct commit to openafs-stable-1_6_x, as this change is not relevant for master. Change-Id: If83edd51552f4719ed80179f7d7423ab15bbb0cb Reviewed-on: http://gerrit.openafs.org/3976 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e31e380d5d3b152adcab1ff944186d21dd6a7733 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. 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 (cherry picked from commit fb325c3c63d844eda1da23e2ab5facba14994a6f) Change-Id: I076fcc2e194b2d23394742a1510fd3ccbb5d7a03 Reviewed-on: http://gerrit.openafs.org/3972 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d79f9306f57de692da1b54148f87be31e2202318 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. Reviewed-on: http://gerrit.openafs.org/3959 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0bb6170b222ee2e9a0a3d224dac890adaed945a9) Change-Id: Ib025c1ddc9a8d09319941eefe32bd2ba1df6764b Reviewed-on: http://gerrit.openafs.org/3965 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 02cbe5171069f3e896bb5b3f3f93f15d52980471 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. Reviewed-on: http://gerrit.openafs.org/3949 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 11b2c6d6fe4dbbf5a54ae1e08e979c35ab6b7fa0) Change-Id: Iaa27ae965482aafd0f981e70ce33df438af650e9 Reviewed-on: http://gerrit.openafs.org/3964 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 07c00c73a195761180dff9685e54949610721b55 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. Reviewed-on: http://gerrit.openafs.org/3690 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 6f39035c92713b08065bee28ffdf06c5fe32a971) Change-Id: I8a9fbfcfee92c333af437a925cf09cea9044adc6 Reviewed-on: http://gerrit.openafs.org/3941 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c17a2fd5d3ba674c61c9902e866153010fee079b Author: Derrick Brashear Date: Mon Feb 14 00:25:14 2011 -0500 make 1.6.0pre2 version changes version changes for unix Change-Id: Iadaa2f74a643faa2646897100c7528de5477a5c1 Reviewed-on: http://gerrit.openafs.org/3938 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a0cd6d544c0f95c7a7cca06848b7bb50ab12581a 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: I3d4c12ee98606fa34c31132b4b0ce0d0937471af Reviewed-on: http://gerrit.openafs.org/3937 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4c1ee95e4aa7daee1cd82b062c1739f1426486c0 Author: Jeffrey Altman Date: Sat Feb 12 14:24:02 2011 -0500 Windows: ChangeLog updates for 1.6.pre2 Change-Id: I19e0dda81df746b9545cb1b9c360af7d207cc665 Reviewed-on: http://gerrit.openafs.org/3926 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/3934 commit 9a91e1a9b190f54e694a9c98f8b2856a310cd825 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. Reviewed-on: http://gerrit.openafs.org/3883 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from commit 281f5bf5fbb0a546edcce62ef4e097ae9bbdbf73) Change-Id: I45caa6aef451a7f93bfa43dfb1ebe9b0b856fbd0 Reviewed-on: http://gerrit.openafs.org/3935 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 66a5faefc78f6a9b8d34a84ea580a2a2889217e4 Author: Jeffrey Altman Date: Tue Oct 26 19:02:31 2010 -0400 Windows: 1.5.78 Change Log summary Change-Id: I6cdd2c5d2818fe69a5454c90fb6cdaeaefc2deb3 Reviewed-on: http://gerrit.openafs.org/3161 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/3933 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96d085708209e8bc41ffc2667ddad2a03e44f950 Author: Jeffrey Altman Date: Sat Feb 12 13:42:29 2011 -0500 Windows: Version 1.6pre2 1.5.9902.0 Change-Id: I5095d7241bcb9ce11455e09c17bda1dec1d9edf9 Reviewed-on: http://gerrit.openafs.org/3931 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 205e790eeba5837903f996203c5408849821d141 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: I246000a9323852d0aeefd7e7357eeece4daa3346 Reviewed-on: http://gerrit.openafs.org/3302 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/3930 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a62fc323540429a6381220b42a8b84bb5195abdb 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: I691fde63adf295c380312772e7d320ff99e89d70 Reviewed-on: http://gerrit.openafs.org/3929 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d1e412b275dd75b023f9cf1b2bf60140ac80948d 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: Idf5f934aaa22c71789ab7970a8e3cd48e1a79d44 Reviewed-on: http://gerrit.openafs.org/3928 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5545a5729073b67069cf56afecae987ca1b89afb 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. Reviewed-on: http://gerrit.openafs.org/3749 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e4660dd8cfb314971224dac5d1d13426d56494dd) Change-Id: Ie59100172daae48dea985749e07416daea88b8d2 Reviewed-on: http://gerrit.openafs.org/3923 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85eb528a680b3611ab2ee53e6097a68f91b09429 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. Reviewed-on: http://gerrit.openafs.org/3748 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit be0e9fb703d9ca0ae17f1117cd53796f82d7fb30) Change-Id: I03d4474d66d015126654d6d031a1870705733a41 Reviewed-on: http://gerrit.openafs.org/3922 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 471ec3d1e25cbd41458454a32fcec3a6ad3ae203 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. Reviewed-on: http://gerrit.openafs.org/3725 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit cd6bd75d1c97ce87ab1597d80fcd3cee2ea18825) Change-Id: I5845e68f3fd7fac905993a0ac7a371e058c9a618 Reviewed-on: http://gerrit.openafs.org/3920 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e648f30a675e2675ece78a681fc0be9aaed121a6 Author: Derrick Brashear Date: Mon Jan 31 11:04:08 2011 -0500 evalmountdata null pointer before use volnamep can be used uninitialized. fix that. Reviewed-on: http://gerrit.openafs.org/3777 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit bf72dbf3d5550857a8d41c910baaa722690c1eee) Change-Id: I0d08aeed130882aeda12c0181d5b738d4c889491 Reviewed-on: http://gerrit.openafs.org/3919 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cc0382da34a0c9b85fd12b3b5288c3765c8ddd85 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). Reviewed-on: http://gerrit.openafs.org/3771 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2eca7aef7b2940e4ef5f9901ce28481af6edb6dd) Change-Id: Ic6cff1884a55aeb2ab29518e8d160000c6254fc5 Reviewed-on: http://gerrit.openafs.org/3918 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af5e870f59bf071b79775eb308ed21ea471b589b 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 Reviewed-on: http://gerrit.openafs.org/3770 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5bcc0ea735ea519298c98b46c66bf1326cdee5e4) Change-Id: Ia47dfe390ea317925acfca709dbd637b68e94ca8 Reviewed-on: http://gerrit.openafs.org/3917 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5d370e4533ade668ce807764cf38d73f38b5f749 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. Reviewed-on: http://gerrit.openafs.org/3769 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ca38c9546e323b59189670b80740510fb9ec5269) Change-Id: I421c95f4f4f0b001ac1eab400dfbabfd2008e7a5 Reviewed-on: http://gerrit.openafs.org/3916 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 968aa2042cb3834cefd39db852999d23649ea080 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. Reviewed-on: http://gerrit.openafs.org/3904 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit ae11ef7898ecffe8eb2a38151602572c24e32a76) Change-Id: I71092131183daa0627c21c328bd5e5bf182a0fc2 Reviewed-on: http://gerrit.openafs.org/3915 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 006260b8b0794b20ce83e466bae23518249f1d6f 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. Reviewed-on: http://gerrit.openafs.org/3882 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 15c497e90edc69312dba6843521ff08f0ac19248) Change-Id: Ibcd82014ca28e8ba0bec6e184bc5ae276a0eea90 Reviewed-on: http://gerrit.openafs.org/3914 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74296237ca5d1d255896e2571224f1d80672d2a9 Author: Ken Dreyer Date: Thu Feb 3 15:22:02 2011 -0500 spelling/grammar fixes for manpages Several small fixes for spelling and grammar. Reviewed-on: http://gerrit.openafs.org/3890 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit dca093a17097f7e24d43afe4544e4be896b86680) Change-Id: Id7a937572a1806f0ef812b8d7089ed5d3c5dabd9 Reviewed-on: http://gerrit.openafs.org/3913 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8d308a9552fcff843b2eda3ee86ef0ad045f2692 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. Reviewed-on: http://gerrit.openafs.org/3879 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ad05600d86d6737f55d7b785bc7c503c4a45be00) Change-Id: I112899208f1b556a84d20d9ea2f2542f030cbfdc Reviewed-on: http://gerrit.openafs.org/3912 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7f8744c33196eb4af612f8c181f0ba73f1309180 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. Reviewed-on: http://gerrit.openafs.org/3821 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit efe4a20c46c73c39bd979437956beddcd3057bc3) Change-Id: Ice4380550fec8c1ac2c2c5ec76e1b73f23cd4829 Reviewed-on: http://gerrit.openafs.org/3911 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e5c361ee5e32cfe007b2283edb9704dc66f43326 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. Reviewed-on: http://gerrit.openafs.org/3599 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8e9fff9ed8d773e4a22730d485c0617c456bb0e0) Change-Id: Ic99253b74d3d88712b1959757d294b31ad590ba0 Reviewed-on: http://gerrit.openafs.org/3806 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e0753a6f560c45aa47e038bc6b718873d2fd634d Author: Andrew Deason Date: Thu Sep 2 15:05:21 2010 -0500 namei: Limit traversal when removing data dirs namei_RemoveDataDirectories currently calls delTree with 'tree' pointing to the part of the path immediately following n_base (i.e. starting at the beginning of n_voldir1). This causes delTree to traverse all of n_voldir1, trying to delete every directory it finds. Since we are typically only trying to remove a single volume when calling namei_RemoveDataDirectories, instead call delTree with 'tree' pointing to immediately after n_voldir1, and beginning at n_voldir2 and try to just rmdir n_voldir1 afterwards. This way, we do not traverse a large fraction of the entire partition when just trying to delete a single volume, and so can significantly speed up volume removals. (cherry picked from commit 1ca0a24775794ba2e645854a3bbaa656f2fc8086) Reviewed-on: http://gerrit.openafs.org/2651 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Iadae1e231b533695af615a231e42ad8204674fe4 Reviewed-on: http://gerrit.openafs.org/3908 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit efd3fa3808499ede8c19ba3ede7bd67524538da1 Author: Andrew Deason Date: Thu Sep 9 14:10:01 2010 -0500 namei: Do not remove n_voldir1 When removing data directories in namei_RemoveDataDirectories, do not remove the n_voldir1 directory (directory X in /vicepa/AFSIDat/X). Removing this directory can race against the creation of an entirely unrelated volume, causing the create op to fail (since it tries to create a directory in a directory that no longer exists). We don't currently have the necessary locking to make this safe, and since the overhead of n_voldir1 existing is pretty negligible, just leave it there. Also add some comments briefly justifying this. Note that other similar races probably exist for directories under n_voldir1, but they would only be between volumes in the same VG, and so are much less likely to occur. (cherry picked from commit f2df207274c65b4fa8c24419150e9084a4d17fca) Reviewed-on: http://gerrit.openafs.org/2727 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I2df4b73dd5125da0a2de52c3011ba167dc036a8b Reviewed-on: http://gerrit.openafs.org/3907 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d3cdeb9e78bec864e9939c5ad6f2d5e9086fbfa4 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. (cherry picked from commit 1c45cc746e7484e72191fc8d010640692e90bc82) Reviewed-on: http://gerrit.openafs.org/3368 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ibe9a94c64d38fe102fdf4fb9c182a5eb3b2adaa5 Reviewed-on: http://gerrit.openafs.org/3906 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b682683bdd032157626448b504336c174e0809c1 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. Reviewed-on: http://gerrit.openafs.org/3178 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Derrick Brashear (cherry picked from commit d21dd16789458c07e63abe021f93f656dba4e52c) Change-Id: I99e0ef2f0c1ff23817ffb13b270bc0f04bcf12a4 Reviewed-on: http://gerrit.openafs.org/3905 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d69b87724790ceb2db25b580cebfc4f18f99dbf9 Author: Andrew Deason Date: Thu Sep 2 11:25:27 2010 -0500 vol: Add VInit cond var and remove busywaits In DAFS, FSYNC_sync was waiting for VInit to reach at least 2 by looping around pthread_yield(). For a server with a large number of volumes, it can take a while for volumes to preattach, and so we are effectively busy-waiting for preattach to finish. This can slow fileserver startup and peg the cpu. So instead, add a condition variable for when VInit changes, and wait on that. Also modify other checkers of VInit to use the cond var. (cherry picked from commit 31bb2e5eb5feb9c8e84d17b49fe70268127cdd43) Reviewed-on: http://gerrit.openafs.org/2648 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I773ab01095bb0c101a34146ef9bf201946ebcf8b Reviewed-on: http://gerrit.openafs.org/3887 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 123c79c2b9a7b1b761df2b67900fe64adb54e091 Author: Andrew Deason Date: Mon Jul 12 15:47:15 2010 -0500 Avoid thread-unsafe PrintInode in threaded code Some potentially-threaded callers were calling PrintInode with a NULL first argument, which is not threadsafe. Alter them to use local storage. (cherry picked from commit 38cf31463e3f3c675de727c1e793e117a90e6d20) Reviewed-on: http://gerrit.openafs.org/2593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I4b6e0f8c41180c017739dbfdb4f2ecbce96df8ec Reviewed-on: http://gerrit.openafs.org/3886 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ab6f0b9630887d634103f425336b2bb38a063580 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. Reviewed-on: http://gerrit.openafs.org/3179 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Derrick Brashear (cherry picked from commit e8991ff8286f151d109bb4f98d885a583e198f83) Change-Id: I1627ce0b78d10626b7d375546b400459ff1724ca Reviewed-on: http://gerrit.openafs.org/3885 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1c8b1964f8d24fb709baf04fe2e1460d08fba848 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 Reviewed-on: http://gerrit.openafs.org/3876 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ba51b43e3558058b949ccc5de1d4559e4caf9d9b) Change-Id: I9a2edb819ba052786ec9f4c9d15d11ea48905af3 Reviewed-on: http://gerrit.openafs.org/3878 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c26c4ad4eec6f6eea50291404165a1d43f4bb22f 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. Reviewed-on: http://gerrit.openafs.org/3773 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 67195401c915b23e092f98c89ab5f5580a9cf3f6) Change-Id: I14e57ca1b6b2f86bee585bc6fa86bdf0b7d77d44 Reviewed-on: http://gerrit.openafs.org/3872 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e4ff7ed4c2be9c17c1fe4709554eafe08dae8dc4 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. Reviewed-on: http://gerrit.openafs.org/3768 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 299e942ae98dfea3a4804c724e5d440715974e0c) Change-Id: I8f676c45794ecf53af65e9b3089c7b2d075089bb Reviewed-on: http://gerrit.openafs.org/3871 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f709e62625758e6c65f752b7d29c2ce1123ee9d4 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. (cherry picked from commit 52556d50298e4a636f07e9a3cf0b6557c882c82d) Reviewed-on: http://gerrit.openafs.org/3759 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I44d8577feba382a193d1f1735a05db74c3151df0 Reviewed-on: http://gerrit.openafs.org/3870 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 06b8a3d52b2d6a3c8c1512bb9a21689e0d1c8b34 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). Reviewed-on: http://gerrit.openafs.org/3758 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08bb83d95027bb3ac68834d12b72bdc647fa24a9) Change-Id: Ia108e8c7c624521965bdbddd7a37ebf281eb7967 Reviewed-on: http://gerrit.openafs.org/3869 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 23d6287f7f494383891a497038e8c0e870e824bf 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 Reviewed-on: http://gerrit.openafs.org/3431 Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 54fb96d2b6517ae491fd7a7c03246850d29156d5) Change-Id: I098c482a6a5b9f34907e9f8f40913df40c5b5d4b Reviewed-on: http://gerrit.openafs.org/3763 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fb1bc201648969e29571252e210aba370b9e5c86 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. Reviewed-on: http://gerrit.openafs.org/3760 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 962a95c21cc82a8bbb1dc1233c91acd7236fc8e4) Change-Id: I6c60dd770057f665f66bf3cea2d653bbe2524979 Reviewed-on: http://gerrit.openafs.org/3867 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a9b922a282cb25cf8de384ba7f1a751ee5e88f24 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. Reviewed-on: http://gerrit.openafs.org/3756 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5817a13b84496c087b350be50c17a8b0f9aac9d5) Change-Id: I1b12c56d680111ba71b611ab9bbb6159a35dd14e Reviewed-on: http://gerrit.openafs.org/3866 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2e2da579524244cc4ec2e18f3608700c9c3b3072 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. Reviewed-on: http://gerrit.openafs.org/3648 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5fe04739e0407079a0439f28c6aaaa86d5399e71) Change-Id: I99660917d9f658cb95be6655aa9fb30cdf73b164 Reviewed-on: http://gerrit.openafs.org/3865 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 759e11e81c6c17171ca8c63383df1b94568faa76 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. Reviewed-on: http://gerrit.openafs.org/3746 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4f838b03bbf9ea0e1ede8a188ea6dde3efb4e231) Change-Id: I295d172e8f14bc50facf38f08e3dc3af02b7404b Reviewed-on: http://gerrit.openafs.org/3864 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 067dcf3f157bbe20087d2b7a7a82d5758004c388 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* Reviewed-on: http://gerrit.openafs.org/3744 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6d2636b886789f2ddc6374c6b7e58ccd28d518aa) Change-Id: Ib07ea6d1e0dad935717810c1279cc7f38645e229 Reviewed-on: http://gerrit.openafs.org/3863 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 280b4c44056a7f8bafe7e8a1d547d254df4ad5bc 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. Reviewed-on: http://gerrit.openafs.org/3751 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 42c5806599c1df65ee8ec1272f691df30ea44d4c) Change-Id: I311d9c642d6272acd229a64a6a72eedf7dd39018 Reviewed-on: http://gerrit.openafs.org/3862 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f24d94ff6ad375f78c7d9b660b0019441856c5e9 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. Reviewed-on: http://gerrit.openafs.org/3750 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e1b0a95352e2e6aa312a526ffcc8a2f77a8fb7df) Change-Id: I7f46c816f6fcd8ce6018f5e93f2ea0044b221b51 Reviewed-on: http://gerrit.openafs.org/3861 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f9105fc04e041c426330dd1df31eb0b502e03ad4 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. Reviewed-on: http://gerrit.openafs.org/3747 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 40497fa667d15aaaa8f6befdc45cff40cc544616) Change-Id: I7887e4ba31556b2bf6b1e2a4867aecd1e8b41297 Reviewed-on: http://gerrit.openafs.org/3860 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9110aac6930a84bc9c61c988743e3b1a447d54df 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. Reviewed-on: http://gerrit.openafs.org/3745 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ffb0cdcc91d86f6e7b62561aebe6dcb722c3d768) Change-Id: I3f69c2a8f76d073afcfe626eec45be9942bf4042 Reviewed-on: http://gerrit.openafs.org/3859 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fb90ef8b3c658644f5153c373fd2d3ad47815625 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 (cherry picked from commit f60bca943f7bc6352a5f7beedbb7ca47559f3513) Reviewed-on: http://gerrit.openafs.org/3739 Tested-by: BuildBot Reviewed-by: Stefan Kueng Tested-by: Stefan Kueng Reviewed-by: Derrick Brashear Change-Id: I0363885c915a9c97bb6f290b5a16d184b244b0b3 Reviewed-on: http://gerrit.openafs.org/3858 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ce7f811ee75b495bc7db6f1186943f960030f827 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. Reviewed-on: http://gerrit.openafs.org/3742 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit de7af90fb8a1a132fb44fcc3d732fb593a45f6db) Change-Id: I76cd2738df31b1609d0065ac2706a86f75d8a269 Reviewed-on: http://gerrit.openafs.org/3857 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ac30f5598f1f03b992151dac04f4a6ffc99099f 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. Reviewed-on: http://gerrit.openafs.org/3711 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Derrick Brashear (cherry picked from commit 5fdc2679dc973fa45bf4b3bc7f21a527492868db) Change-Id: I63855a65c5e209dc7b601e5b5b67ccb21bfb653c Reviewed-on: http://gerrit.openafs.org/3856 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 11d2f9289791656cfbe6a645ac54ae80f75def57 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. Reviewed-on: http://gerrit.openafs.org/3712 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d6528628b4dcadce47bb1a9244768ca3d43b0bf3) Change-Id: I4d55a7e3e8d0f942058d568c8f2f9f1ae1855044 Reviewed-on: http://gerrit.openafs.org/3855 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dfb7202bf37bb0ed723369017c724468a34030fc 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. Reviewed-on: http://gerrit.openafs.org/3707 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Rod Widdowson (cherry picked from commit eb6f3a89a3f4da6d3de2d4ae34743014e4eb0fb2) Change-Id: I6d66617b53f46e832d72ac8ed9a41730fafca521 Reviewed-on: http://gerrit.openafs.org/3854 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d12d7856ddfc297043a9bc0aa9b84199bfe80954 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: If77379b17fa984e3dacd2740726b7309a0e640dd Reviewed-on: http://gerrit.openafs.org/3706 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-on: http://gerrit.openafs.org/3853 commit 1af19c472ea1adcae1dee957e6e021f9f8a54488 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. Reviewed-on: http://gerrit.openafs.org/3289 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit ef8c3db90ae9ec25705027c609a1bae5f186c4f1) Change-Id: I17910490484efcd812f45dfeef1a99d6e450f5fa Reviewed-on: http://gerrit.openafs.org/3894 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d176aa38b9582d19905c3820189022862a5a7a8b 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. Reviewed-on: http://gerrit.openafs.org/3704 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 089a3f5e8b0b00942cd0ccff5be7b4f671fcbf82) Change-Id: Ib3207b7c365b9ede5299bdbc7626e63450198ad7 Reviewed-on: http://gerrit.openafs.org/3851 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 573982aae3c4feaf6e90c28a4c0a679e0fa9210b 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. Reviewed-on: http://gerrit.openafs.org/3703 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 141aca818ef9e5a6af309edc9512cc5cfee38e90) Change-Id: I640d834f0bfd6490cf43183843d771f792f7fc06 Reviewed-on: http://gerrit.openafs.org/3850 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f5ee8c002bb5858094696b6e4904a81c93ab15f7 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. Reviewed-on: http://gerrit.openafs.org/3705 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 01fc5d0577409c889ca5ad6f3bc1d624138922bc) Change-Id: Ia66d30fec2633bc2fbb8a6fcc5fd42a9fc9cace0 Reviewed-on: http://gerrit.openafs.org/3852 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 003113ca69bd87955a5399415343d8eac533a037 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. (cherry picked from commit 259a0e886a29874420010544e33a789cac1692c1) Reviewed-on: http://gerrit.openafs.org/3702 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: Id18bbe7759bc96f83c7a00a0a8698a868fc54c2a Reviewed-on: http://gerrit.openafs.org/3900 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 472b6e23d1b8ab1614538466626c5ae6de46fb06 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. Reviewed-on: http://gerrit.openafs.org/3709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1ad22ed7e14d1ed643add0dbf80c82b96ae69fc8) Change-Id: I4669ee27bd5c3d9100f3e7fc880d6c32e990493f Reviewed-on: http://gerrit.openafs.org/3844 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7c5e66068a7ceaeaf2f2bc1ae34a347c0fb80253 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. Reviewed-on: http://gerrit.openafs.org/3708 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3c25ae062a30c83f6dfb388f31878555d6cb63d7) Change-Id: I5a39e1c255cf5a28e53e9f96d4faf8a6a7e7ebf6 Reviewed-on: http://gerrit.openafs.org/3843 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0c31f0208db96cf0b6e7d84dc919bee7ed20588e 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. Reviewed-on: http://gerrit.openafs.org/3698 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 48508a202129be6e56beaec56314cc13d68d69f5) Change-Id: I6f7c5dc22e45f4da45ebc391512e4a296fe4b2ca Reviewed-on: http://gerrit.openafs.org/3842 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e93ea27b6777de46b281acb5a114b6ac8ba9ddaa Author: Jeffrey Altman Date: Thu Jan 20 01:31:41 2011 -0500 vol: indent cpp definitions; add NAMEI_SPECDIRC Reviewed-on: http://gerrit.openafs.org/3697 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5184261cde260f1aaf67a7cb2fea1b9ba3a4b2b0) Change-Id: I7ab38f6df8892ca6c6e238e22847efdbaec45242 Reviewed-on: http://gerrit.openafs.org/3841 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cf01d49487f4bb6b9fc958b3848e1dc3ac6e18fd 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. Reviewed-on: http://gerrit.openafs.org/3695 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fe9285f77a680b6e6d0995166f3c384aac676a8c) Change-Id: Ic9a17074ce76d1676bb7d83e2e17d7c50e1c45a0 Reviewed-on: http://gerrit.openafs.org/3840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit de350399d593c94f456a53f50d2e08a6a0b1d7ae 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. Reviewed-on: http://gerrit.openafs.org/3701 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8bb5e291777a0439c7a15262bdbc70d8bd9cc4a6) Change-Id: I9c7bb592516f609174fbf2a7b3bb6b5e0e81ba72 Reviewed-on: http://gerrit.openafs.org/3848 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1cf2d94d4703807186924cc4b5fabc5ded7215bf 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. Reviewed-on: http://gerrit.openafs.org/3700 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 270e5c01784f6459dd3d1dec81b714a6d7f2baea) Change-Id: I347fb7b135c6fccb941ca4e34b3fb4f080f5b09c Reviewed-on: http://gerrit.openafs.org/3847 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 278e58232ebbed48c1ce3e3a3833a5ff2df3c1ee 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() Reviewed-on: http://gerrit.openafs.org/3699 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Rod Widdowson Tested-by: BuildBot (cherry picked from commit 959a892afcc1f33871489912a8ea183fc7fca6c2) Change-Id: Ic9942f08af4ce45310bfffae5922c67a0655774d Reviewed-on: http://gerrit.openafs.org/3846 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ca1916ea8f9ce467a429a6dc8c239e46247ff4f7 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. Reviewed-on: http://gerrit.openafs.org/3696 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9e689e96099dba5227e62ea2c6069062daaac85a) Change-Id: I18baf1e1cd409a108845c2db2cb38144593016c8 Reviewed-on: http://gerrit.openafs.org/3845 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f370b4bfa40c2979fdaaad4f52cde1fd80de934 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. Reviewed-on: http://gerrit.openafs.org/3683 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9743a644adb37230eae3b11ad3e4a1e8e7a1ebce) Change-Id: Iaa0ac75de42424411ea66f04afdf0e8303aa4adc Reviewed-on: http://gerrit.openafs.org/3839 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b95c58fe34c202d2a67aa9cacedaa6cebe7e735b 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. 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 (cherry picked from commit 26f0ddd0cd3c7c34880e8717d59ee1d653036455) Change-Id: I14ee3664bc247a432e8b350f78c7b7e56b8232b2 Reviewed-on: http://gerrit.openafs.org/3838 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1382795ebdcde0fea91d923714270edf4b560ded 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(). Reviewed-on: http://gerrit.openafs.org/3674 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8895fe0fab04d49f8c2b279d915c5f292b55c2be) Change-Id: I43e05dde3d2f12d2130b34125a6103b22f0259e9 Reviewed-on: http://gerrit.openafs.org/3837 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 25a77d00e204e082c1b5dd736cef5076bf719f02 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. Reviewed-on: http://gerrit.openafs.org/3659 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f25cbdf09ff890846a68f619ccb1d00ab2b3c7a8) Change-Id: Iabebbb0e620c42898b428352ea2ec3cb64de8d74 Reviewed-on: http://gerrit.openafs.org/3836 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af2897097cd76940b0bfdde49a85b6fb6b7e2436 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. Reviewed-on: http://gerrit.openafs.org/3676 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 802899aac022ab537159f3cd4435d072b5edc4be) Change-Id: I953a780f61ce377179829d4e42e9aab76b3a8f4d Reviewed-on: http://gerrit.openafs.org/3835 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c6ec72bee407b81517266b1d5cef79c947a9429 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. Reviewed-on: http://gerrit.openafs.org/3670 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 038264b4d62803bd71ac0d7706b56b7f18f31dca) Change-Id: I58a6acbe7328faa1d0118073f24321ead378efe4 Reviewed-on: http://gerrit.openafs.org/3834 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e08f9d85fb4f50f6f87a500be0c7ea9b5da585e3 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. Reviewed-on: http://gerrit.openafs.org/3672 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a65ea91e2a6ab3870fe2e9e1a17c82e2a62c2910) Change-Id: Icd7c6225b80d77184e6a15df0dbb4fd0dfcd0506 Reviewed-on: http://gerrit.openafs.org/3833 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bccbd2b25b189cbc86d43fa1b072ab317aafeeb9 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. Reviewed-on: http://gerrit.openafs.org/3671 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit bae39a9aa3738878708f4c67d17750beca4d6dca) Change-Id: I9fa401cb4ddec886a3f39ddfb926ce0be8cfa96e Reviewed-on: http://gerrit.openafs.org/3832 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 23f73b3635eff9ea28d59c755ca88589ed95edda 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. (cherry picked from commit 47e2149335066883450cb2a751bd057dcd1af79d) Reviewed-on: http://gerrit.openafs.org/3669 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: Ic6fbe73ec112994079816942b3456fe95c193200 Reviewed-on: http://gerrit.openafs.org/3831 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ab61bd20868a603279d7df6da00ed072e59e370 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. Reviewed-on: http://gerrit.openafs.org/2979 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 19d2e0e34b5f100fdbec1da8373badd624c02248) Change-Id: Ifd81e41258b1974b4b6e0df893fa37387bc48757 Reviewed-on: http://gerrit.openafs.org/3889 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e1356ef5a23008af5b46e1f89a7360c0f026e42d 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(). Reviewed-on: http://gerrit.openafs.org/3668 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ecf55b063e7c9bbbac426831dfe504c1db92bb52) Change-Id: I40114c0cf071a18612bb1ed29d18ab145f466dec Reviewed-on: http://gerrit.openafs.org/3830 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 914e70a60309104c81daadc4e12ec294c2b22197 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. Reviewed-on: http://gerrit.openafs.org/3667 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 05d5f012e0be9be1c2c82871a75ac76d437b9688) Change-Id: I44913419e09b36a3581320cd169bbc4774cd0208 Reviewed-on: http://gerrit.openafs.org/3829 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 64b3fa0f5a02c8fd394138ffefefdcc86d9e55d2 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. Reviewed-on: http://gerrit.openafs.org/3666 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 714b3ffb2258b316621415c2e81372dc48b4119d) Change-Id: I4a4c8a4894aa25bec883154cb73d1ee24986ba15 Reviewed-on: http://gerrit.openafs.org/3828 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9e7a77991419c96e8594944ae75f06b84e1f7da3 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. (cherry picked from commit a8d1fe61f4a0d906d4086b71c88b0a3ab278b12c) Reviewed-on: http://gerrit.openafs.org/3180 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: Ieaf8b87862a692559971b2a54882a485590a715d Reviewed-on: http://gerrit.openafs.org/3827 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d0b9da6f0734e638087cfe6092df1a7b80c5bc9 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. (cherry picked from commit 0a4a03ae68bea51a74a4ef496d50a800bd3e0cbd) Reviewed-on: http://gerrit.openafs.org/1864 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I2fa3aa60a13c81e0a0bc7ffb5b323ec7580f560f Reviewed-on: http://gerrit.openafs.org/3826 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b7c5f7b560e5dd116e6da99d19ec1a0dc969fe6 Author: Michael Meffie Date: Mon Mar 15 12:42:23 2010 -0500 ihandle positional read and write When available, use POSIX positional read and write calls in the ihandle package. Originally written by Derrick Brashear and Andrew Deason. (cherry picked from commit 335ccb4082657b7d0e4e9af1076356cf115642d2) Reviewed-on: http://gerrit.openafs.org/1562 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I6616a8f7ba04410c57097fb6fa687258b847ac4e Reviewed-on: http://gerrit.openafs.org/3884 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3b0dbf3c86b98a66e1723b65da0a2761eeede651 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. Reviewed-on: http://gerrit.openafs.org/3176 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: Derrick Brashear (cherry picked from commit 50b6a116a1c412d0e6d7442d13d6e92c9dbb35ee) Change-Id: Iaa340515bf36d249d4f2160b55c3fbb267bb90ee Reviewed-on: http://gerrit.openafs.org/3825 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 44a4189514266a097c6efdb6b9e0067c96ea4424 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. Reviewed-on: http://gerrit.openafs.org/3665 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 98f633c60d20834cee0bbc0770a3146b06642a59) Change-Id: Ibfdbcb9e2da6216f31f7a73d42acafa59b651350 Reviewed-on: http://gerrit.openafs.org/3824 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 432b50226075b1748448e104a9b6fd90cf33a542 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. (cherry picked from commit e8e69d5b2c611df249fd613ed068fc030a0e30d1) Reviewed-on: http://gerrit.openafs.org/3664 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: Ifc9f7efcafee5a17fcf112556184be0072deb108 Reviewed-on: http://gerrit.openafs.org/3823 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9707d7fcd921730b5242ab59cebcdff929011c2 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. Reviewed-on: http://gerrit.openafs.org/3658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a61a719d35cd6008f35c4f5cb8aaa83453d1d8c1) Change-Id: I2183cd52298ea1d1204102fee66dea4755de3b41 Reviewed-on: http://gerrit.openafs.org/3820 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 451706f5cb2a616ae2ffd2a2e120cbbdb2351fe8 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. Reviewed-on: http://gerrit.openafs.org/3657 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e50cab06c4a5dad37b27f411dfd511130567726d) Change-Id: Ifff3cc8d9424c74d39a792f83b838965af95faea Reviewed-on: http://gerrit.openafs.org/3819 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d51daf617f0f5cdd5f8c225bfafc74fc19b7d3b6 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. Reviewed-on: http://gerrit.openafs.org/3628 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8d157961e96ec6b504ea40dcef51fb4a8d61d371) Change-Id: I4120181c4384aa0f3f6f4c016c594d45cf037921 Reviewed-on: http://gerrit.openafs.org/3818 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 83c6b5f79f9dc73c7e17797a544275d273e833db 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. Reviewed-on: http://gerrit.openafs.org/3627 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 60322b46755d0bfedc239e3e9287f6ae625cd836) Change-Id: Iae527081b431863fa1eae418b8468741f75f3f2e Reviewed-on: http://gerrit.openafs.org/3817 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fd022f97b7341a40efd8e3db5f3091d3a3e77b31 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. Reviewed-on: http://gerrit.openafs.org/3630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9f584e811486da7129a61da554fae09029b0de67) Change-Id: I32ff33df359fb7794e9cf47c2027eb48363c80eb Reviewed-on: http://gerrit.openafs.org/3816 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bd78d2a45c779115711fb5e6ef94e05cf176d932 Author: Jeffrey Altman Date: Sat Jan 8 12:19:07 2011 -0500 Windows: remove all refs to unused buf_GetNew() Reviewed-on: http://gerrit.openafs.org/3629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f58b17a6150f8d303b408f9eed27bf0e850ec580) Change-Id: Ideb8532a8de53152aa902834d7dd012a464ad000 Reviewed-on: http://gerrit.openafs.org/3815 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9868976247f698ac9482a553c4f321bb009c299 Author: Jeffrey Altman Date: Tue Jan 4 11:18:25 2011 -0500 Windows: remove unused vars from cm_server.c Reviewed-on: http://gerrit.openafs.org/3617 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9bb6b06c76802f8080c4c19b99efa7c6423f9021) Change-Id: Ie0afcd7a98520b06830ef919377630a7e9526036 Reviewed-on: http://gerrit.openafs.org/3814 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 25231ef066e88ed2f84745de31771e53b1c6f120 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. Reviewed-on: http://gerrit.openafs.org/3615 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 605b7c3baaeb7553cb2e150f1156eba6be04c1f8) Change-Id: Ia215c34f06976dee588292fccb7396a49ab98035 Reviewed-on: http://gerrit.openafs.org/3813 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c6893df719c724abc42a49419a9bd9651b1ede2a 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. Reviewed-on: http://gerrit.openafs.org/2585 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 13ae3de3f6ce5de2395823ee5f862a863caf2e51) Change-Id: I03adce371f17c8865b469b9b5cb94209395261c2 Reviewed-on: http://gerrit.openafs.org/3812 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 02a52022fe1f2d08ce62b053d2ce48b041487352 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 Reviewed-on: http://gerrit.openafs.org/3605 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 616763cd077fab807da21590bd9ad3b0b02ea844) Change-Id: I4ccd8e976185b98536e061a20be43805db619a4a Reviewed-on: http://gerrit.openafs.org/3811 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 63503dfda678e08fd76f5c3e5561449d663933e0 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. Reviewed-on: http://gerrit.openafs.org/3604 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b6576d8cb554af50dfe7b6d9b668bd35ff202a83) Change-Id: I41b190d15bff93be656c6f844a740cce9812ae04 Reviewed-on: http://gerrit.openafs.org/3810 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3cafe5836603f4fb93b05b994767487da04fb722 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. Reviewed-on: http://gerrit.openafs.org/3603 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 4e3207335771b78ff27a1f1c0755cdfcf78d7f30) Change-Id: Idc6ae445bc9fad467dede51d5885646bb610c0ef Reviewed-on: http://gerrit.openafs.org/3809 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b18a15a17f71fcbd92001d1af2a81f3337100afc 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. Reviewed-on: http://gerrit.openafs.org/3602 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e4b59c633962d7784485f8e2d4185edaf91bf23d) Change-Id: Ic8053f7307ee937add5e0d5b9e35c03cf8ccb302 Reviewed-on: http://gerrit.openafs.org/3808 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a3a7fb4fd617aaa1bd372bc2929caa9d01987cc6 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. Reviewed-on: http://gerrit.openafs.org/3600 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 463b045b9fe4a412877c2a65f5deafb1442c1bf1) Change-Id: I64f43459a212ceb1b4f89e45a9827fc7b981ff6e Reviewed-on: http://gerrit.openafs.org/3807 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 715a025c12ab06c3397ee10d72eee55eecc9fcbe 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. Reviewed-on: http://gerrit.openafs.org/3591 Reviewed-by: Russ Allbery Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 683747b9c4b3d9d77fb8c68df09a59807d027a42) Change-Id: I3ed5f647631bdd6983a53f4e6a2193aaddf37e0f Reviewed-on: http://gerrit.openafs.org/3805 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c4afe2d7cfb54fc39e6419a166cd2fdf051c18bf 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. (cherry picked from commit afef1712f28a1c83cfb732d1c4fde7faec4811fc) Reviewed-on: http://gerrit.openafs.org/3546 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Change-Id: Iaaa70fbef86524df82bc04754276836fff643357 Reviewed-on: http://gerrit.openafs.org/3804 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ff1c2a48273e7626365f07dc91056fcba2e7b46 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. Reviewed-on: http://gerrit.openafs.org/3822 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c15468e2605446fa89e351131ba429a360d823f8) Change-Id: I58f4a600fe976703412b76d7aeba1e316e08d05b Reviewed-on: http://gerrit.openafs.org/3877 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1711d5ecd1f57e618ebe1dfecaf0cda966228916 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. Reviewed-on: http://gerrit.openafs.org/3552 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bb4c0234b2fa5ae91097b6c40cbfda6ed7484eb0) Change-Id: Icabba0b9bb6a1484d3ee3bc21dc6a39343e5491c Reviewed-on: http://gerrit.openafs.org/3803 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 9a4a911f143d3ad295141342d085b65e928e4abc 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. Reviewed-on: http://gerrit.openafs.org/3545 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 27469e59b134efef6c908a1bfa8162d4bf9b8275) Change-Id: Id80cb41732a6daffa2f03a4313ef3cb9f94b87ea Reviewed-on: http://gerrit.openafs.org/3802 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7fa6a762a960d7b803a37cc0e9ce00e46869329e 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. Reviewed-on: http://gerrit.openafs.org/3502 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f8400699a881eb4f675cba1fbcd7f7ac6eecd355) Change-Id: Ibeb735922101dd89c998746f06f9c56354533506 Reviewed-on: http://gerrit.openafs.org/3801 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b8fc8d9ae5213377543a3b92671aeb44326426a4 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. Reviewed-on: http://gerrit.openafs.org/3500 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6229ffb7ae365174ccacabe00d1e986d2f9b2019) Change-Id: I7ed0ffbffc88c25e6b586d927c8422711d2bd7b8 Reviewed-on: http://gerrit.openafs.org/3800 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b5f0df472f9a39492de2cfb3855362a89ad4603b 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. Reviewed-on: http://gerrit.openafs.org/3494 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f88c91f7778b9a8bf920dce08ccab76ac0b1b433) Change-Id: Ib3956cf1035b8d9dbcc985877304837a52f9d760 Reviewed-on: http://gerrit.openafs.org/3799 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5d400f224c843d854eebbe7b76bd83a570c5c6ff 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. Reviewed-on: http://gerrit.openafs.org/3493 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 95fc9ece507d3c5bd7914afadaaae9456eea9b7a) Change-Id: I37e2740af4ad257398325007a1d1e1e4ba3bae45 Reviewed-on: http://gerrit.openafs.org/3798 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bde0c76e2d17b9da517f9df783a661cf3da70625 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. Reviewed-on: http://gerrit.openafs.org/3492 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b20329e01968d3562f78382b27f7de9948a96899) Change-Id: I5d8b8059101b147583f006bcdd4abd301721be62 Reviewed-on: http://gerrit.openafs.org/3797 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7d4b46224a82b221874a882318ec8d600ce193db 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. Reviewed-on: http://gerrit.openafs.org/3477 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ddc4057ce786ebbe75b8b2c971b1013187062f1f) Change-Id: I1a4325364e650fb82600e0c2c6ec64fd42912b23 Reviewed-on: http://gerrit.openafs.org/3796 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9c04c49439076fd20ea3274bd2d8e753482c3206 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. Reviewed-on: http://gerrit.openafs.org/3485 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7b7cd95ec0adc2c58b0387a5ff788251127f504e) Change-Id: I74bf87d251663404e830f30fcbf47275b1aa468a Reviewed-on: http://gerrit.openafs.org/3795 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 19de9fbd5215f7879afeb3c95204adf5327e50a0 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. Reviewed-on: http://gerrit.openafs.org/3484 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fea0ee62ab854148a354c1aa9ebc5f042448210e) Change-Id: Ib032930c53b8025e82819e0f82e994b5bdf6c5ba Reviewed-on: http://gerrit.openafs.org/3794 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dd2e11ef9e20031821505fb609628cff7d0f6449 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 Reviewed-on: http://gerrit.openafs.org/3467 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f71219918e604a2909774e360cbfea9f9e3d9dcc) Change-Id: I34191b8b67277f5cc8421323a1293c8ebd60c213 Reviewed-on: http://gerrit.openafs.org/3793 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bc0c13a84ba37958c0146903b9449dc426805465 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. Reviewed-on: http://gerrit.openafs.org/3466 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 94591a635bdd23ba74298c64273d4688405aa370) Change-Id: Iff1053a2ed1789f2a5047a59b8df4fad94e9062c Reviewed-on: http://gerrit.openafs.org/3792 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e052fe1a30aa09940a86b5b78d420d90c3b5dc50 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. Reviewed-on: http://gerrit.openafs.org/3446 Tested-by: Stefan Kueng Reviewed-by: Stefan Kueng Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a433f750ad7f0a3c0adbf4c5d6221b7517c0eedb) Change-Id: Ie7e2e7778efd0c6d9724f1eb65adf8942141a47e Reviewed-on: http://gerrit.openafs.org/3791 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c53868fe2819c76249ccbae2a6f38ec546a33174 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. Reviewed-on: http://gerrit.openafs.org/3442 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6fe9313180dfe1d509ae97a1e16a67195357cf7b) Change-Id: I38b4b45e6868283a7f59071f6326389dd569ea2d Reviewed-on: http://gerrit.openafs.org/3790 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85cafd2f6ab11c2b16fafd2f668eb5d317d0d4ac 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 Reviewed-on: http://gerrit.openafs.org/3441 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3756fc78af48c5543c267b086fbd4872fea2e33c) Change-Id: I3ab7f121a937769e899dc8d7c604fc23f07ada1e Reviewed-on: http://gerrit.openafs.org/3789 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 801ebb8a2d76f0bba5ac8b8476cabd24b80522b9 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 Reviewed-on: http://gerrit.openafs.org/3440 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1d7534fb95a8fb77d6b0f3fe0816094b36bde850) Change-Id: Ie298784afdbc4329b97fecea73135b4fd173a866 Reviewed-on: http://gerrit.openafs.org/3788 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9145aa49e9b9462ea5bcd2140a9ede0a74b0921 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. Reviewed-on: http://gerrit.openafs.org/3439 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 24a9ba4b829a871defea75ddf17fb621035ca008) Change-Id: I2f77de3255b229bfa00437af59d11c0da5646458 Reviewed-on: http://gerrit.openafs.org/3787 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5f02e76f11922bf010e24f004c9d628f8402ad03 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 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 (cherry picked from commit 3ff9c24c0e2d72dcce65fc7706dcdb1cd3090965) Change-Id: Ifa20508a1b30ebd88e4968d76d325c2e2be51039 Reviewed-on: http://gerrit.openafs.org/3786 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7f2e16f7788674619e4a75f59ce785c51771c0cc Author: Stefan Kueng Date: Fri Dec 3 22:58:54 2010 +0100 Windows: afs_shl_ext Show icon mount point overlay 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 (cherry picked from commit 92183f4ac31f20862a992b8b3d52dcbe0ebb7eb9) Change-Id: I966cc9bbb03a5682f3227238c635fb5634502c8c Reviewed-on: http://gerrit.openafs.org/3785 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2a626ae9ec92f0c508fd1eb7ea399c91d4dc7832 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. Reviewed-on: http://gerrit.openafs.org/3874 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d12d2c08eef5b2bffccefac61465b7d4e40bba9f) Change-Id: I6920aa378361c1c78285b595303f32ed3194462b Reviewed-on: http://gerrit.openafs.org/3875 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6ed9c64c8d3127a30f9651445d82703eada23943 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. 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 (cherry picked from commit f8f8c0a48fbe086870a0cf35a62278c2b4ab743b) Change-Id: If19cafed9d19ce5f6a529c64fe48a03c13cb0e03 Reviewed-on: http://gerrit.openafs.org/3784 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9e8db134b4bf80f2599b62c6cc3133411d4a9182 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. Reviewed-on: http://gerrit.openafs.org/3419 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 166de9ffa29244f38f1d2c1e8b0fa9a9fd1802b5) Change-Id: I2d7424e891d728b4b0589989c8a58f15594db412 Reviewed-on: http://gerrit.openafs.org/3783 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c93d28abf492cc04274ad9501fb60f0351d6f264 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. Reviewed-on: http://gerrit.openafs.org/3392 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit cc54175e43ce14c01f9c103541ffad795b17629c) Change-Id: Ic94f1701f5d1d0d080e5751093a685e89d892b1a Reviewed-on: http://gerrit.openafs.org/3782 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 44542a7c1197441c9aa4f3d1a923d239094261e5 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. Reviewed-on: http://gerrit.openafs.org/2726 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d8e382df39aa5a92950a1219002a85e5457d8a97) Change-Id: I19541800fa7d1ce1c5922b9338b4b8370151fd93 Reviewed-on: http://gerrit.openafs.org/3781 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 48938a5555d7ba7c11b8a77bcd9065c9c9a39c59 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. Reviewed-on: http://gerrit.openafs.org/3388 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a2c31a754c2d75dcf6a674f365ad50fc40f595ec) Change-Id: I38a93f34f3cd8b71ad0f33ca700162d133b11b7a Reviewed-on: http://gerrit.openafs.org/3780 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ccbc727f3a89b4a23ff7797193166e50542750c2 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. Reviewed-on: http://gerrit.openafs.org/3387 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5186e1686f1eaa1f5aaddfaa90da715aba045f67) Change-Id: I2a4de2258027b0a943d0f223c7493b8d33393777 Reviewed-on: http://gerrit.openafs.org/3779 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2307aeadf717cf20f05b197007aad5da9ca996fb 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. Reviewed-on: http://gerrit.openafs.org/3661 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2045653647fc2de451c9615f18316416de7e1657) Change-Id: Ie3945eb37628ed3bd55f9cb53dd2f4d122f3b087 Reviewed-on: http://gerrit.openafs.org/3778 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit db9e4dc533f37670266cabdbe2b54aab7c738219 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. Reviewed-on: http://gerrit.openafs.org/3755 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 14f5466eeea8cc088d64c6f270c05be457a01cfe) Change-Id: Iecf2c6a5c9a7df61cd2728eda3ee0a937e2f29f9 Reviewed-on: http://gerrit.openafs.org/3757 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6fda948715e83fd8dc6ab53550b99e3657353e4f 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: Ia2de70e1c3b9bcc25fbd6cb23c2d05eabb0a53a1 Reviewed-on: http://gerrit.openafs.org/3692 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from commit bc674908ca5100a0734069a019d9a31788dd52fb) Reviewed-on: http://gerrit.openafs.org/3754 Tested-by: Derrick Brashear commit a4e25471cdc2e3b9881e0159516e3fc68f8d6c09 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: I30100b84c6665ba334899a49ababa8d938af97d1 Reviewed-on: http://gerrit.openafs.org/3689 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/3724 commit b94639888b2937764e8ee9eed085607961187549 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. Reviewed-on: http://gerrit.openafs.org/3684 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6d8e3392b77d72f6d05b94fa9c48813ceed5980d) Change-Id: I7f37c2da40f2ecada7255c1d60e8b14a1f7e6f81 Reviewed-on: http://gerrit.openafs.org/3723 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 25221d9665e101e49a070c4393853446f01085ca 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. Reviewed-on: http://gerrit.openafs.org/3430 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ba63d22bfb0b18ab054c39cafafeb8c6881fe687) Change-Id: I08d46d7e9c288e6b81f8c9cf3a16f6e48ac3462f Reviewed-on: http://gerrit.openafs.org/3722 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9819f90850a454e9b799267b6f646f9a26723b9b 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. Reviewed-on: http://gerrit.openafs.org/3686 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 646a6a41698da45550a3cb899f104d9e3e548ea4) Change-Id: I8f57b0042e89dd917ee11e86709d9e6ae8ad7287 Reviewed-on: http://gerrit.openafs.org/3721 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 51a17746b6eeb2f69f1f8c3466815b5c241e56f2 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). Reviewed-on: http://gerrit.openafs.org/3429 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b23163f05e55128cc0dc874396a765a400a77fd5) Change-Id: I22bad3e58896e25bae49d87dca0452e6595c7a2c Reviewed-on: http://gerrit.openafs.org/3720 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ed7b24c1bc8b26a5c8099105a0078c4eb7181c39 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). Reviewed-on: http://gerrit.openafs.org/3685 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5ff6c88fcc0c35843e91dc45e4bd297efd0d4445) Change-Id: I7d2df5fe80bd4de8c74200ada879a7bc1358e134 Reviewed-on: http://gerrit.openafs.org/3719 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0678466715bde1148e7a3b553b0cec2f7d1c9c99 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. Reviewed-on: http://gerrit.openafs.org/3682 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5367b5f1494ca2cf09f62d7f2ffa6304e38a648) Change-Id: I362f1b6ab808ff171cebc429eb74703c7151d026 Reviewed-on: http://gerrit.openafs.org/3718 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7a6569e66156411dd100668fb6b3d79178045dde 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. Reviewed-on: http://gerrit.openafs.org/3681 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1c7420422313375f7132479c588f09eabac73c70) Change-Id: I9c5b77456472e26fc575165617d81ec6796f7c45 Reviewed-on: http://gerrit.openafs.org/3717 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0e47c6fea6bb75f6427ed3ae632b74d312850c9d 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. Reviewed-on: http://gerrit.openafs.org/3687 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a5441776b639cd32c2271917dd55fa491f9e512f) Change-Id: I1a92ec8b1cb989217d114918cc590caa3f7b4455 Reviewed-on: http://gerrit.openafs.org/3716 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6b0268c439181bb14fcd97fca47eb8ac993e4069 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. 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 (cherry picked from commit 7c0d4b331e8d1f962aae5328490944182311a569) Change-Id: I514f9f434d72fdca37c088376d17bcf2cca40325 Reviewed-on: http://gerrit.openafs.org/3680 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0df3ed13ab2bf972fbc9162c5175cdb6255a7dc5 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. Reviewed-on: http://gerrit.openafs.org/3656 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3c91f1d88165dca085a26b87f2c0148e84e179d2) Change-Id: I7709c886da933023a48ae368373e31f131539d42 Reviewed-on: http://gerrit.openafs.org/3679 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b7bd939f53dfa54d9c7c94b13691a13235aa7020 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. Reviewed-on: http://gerrit.openafs.org/3651 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6edcb1830480ef55d9dcb8a3b4735c30d802cbe4) Change-Id: I570372cae294b8060fbd77ed58939129ad56dd5d Reviewed-on: http://gerrit.openafs.org/3678 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 782e0f3ae1f8453d54560e6dcc85537c5671edb0 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). Reviewed-on: http://gerrit.openafs.org/3653 Tested-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 6d03eef7217be8f0b72f34ab023e69c976dea84d) Change-Id: I473bcaa368c739265b911e79d596193f75ff8697 Reviewed-on: http://gerrit.openafs.org/3655 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8ebf94a929e396e027f7490d11a4ff22cfc2bba2 Author: Derrick Brashear Date: Wed Jan 12 16:55:09 2011 -0500 FBSD: we're 64 bit capable define AFS_64BIT_ENV as we can support 64 bit long long integers. Change-Id: If76168275333eca1b9505c5ead75b891550363ae Reviewed-on: http://gerrit.openafs.org/3654 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9ae3974714d6d26711cfe59ed7bf5559c43a472b 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. Reviewed-on: http://gerrit.openafs.org/3551 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b1cb3607ff66b7fc6201fab2af57761156b1927f) Change-Id: I3b22c12a20b33ca0e4df5a66c2edfc4167000a1c Reviewed-on: http://gerrit.openafs.org/3650 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ae05c4f6d6c5675596b37d8f4b45eb5614bff705 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 Reviewed-on: http://gerrit.openafs.org/3548 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6040a4daa0b04085f18a8e232a1a99dc7cc36cf5) Change-Id: I148dbb0c5d8485d6f8fecae7a2d59e07a1a4d02b Reviewed-on: http://gerrit.openafs.org/3649 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5ae6fcdc87b452c391c3a1905ce96a8cf5d0d348 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. Reviewed-on: http://gerrit.openafs.org/3375 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4a2d1973fc5c2aac05beef5d64e7a486757c54af) Change-Id: Ie8801404c370f64b0075169d63cf790c71bf2537 Reviewed-on: http://gerrit.openafs.org/3647 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 185653831c0ab953c52c8faf2a874f9782da136b 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. Reviewed-on: http://gerrit.openafs.org/3374 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 46a6d6129d80c4027d8a9f0e1d06b32cc12d6367) Change-Id: I042a30ac2a5e8156a233a0ff0f46aa5cd4fcd675 Reviewed-on: http://gerrit.openafs.org/3646 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 467266dd40e465cfc06d43af28e72500c39f3ef9 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. Reviewed-on: http://gerrit.openafs.org/3373 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 9657695d34badaac654227be8c731a1512f2106b) Change-Id: I57c44352f11ca7f68f6c3644345a7d48da8c1bf9 Reviewed-on: http://gerrit.openafs.org/3645 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8cc17dde65f0ce42802fb29f07e9e98001764fec 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. Reviewed-on: http://gerrit.openafs.org/3283 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e4250dc64eb26b5da1480e9f5bd58d016f81847f) Change-Id: I54dc4ef040b816596cf48edf866976943220d988 Reviewed-on: http://gerrit.openafs.org/3644 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3fbac5f800b689d40fd7bdef63dacfd5125e3714 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. Reviewed-on: http://gerrit.openafs.org/3282 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0b6b2b3cab09eacf9b03638d8770c83aeb0b8fea) Change-Id: Ic7241fb27bd177eb7279292804def753f9120407 Reviewed-on: http://gerrit.openafs.org/3643 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c10f264656ccc03549de4f6aa11bf08e33148668 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. Reviewed-on: http://gerrit.openafs.org/3281 Reviewed-by: Matt Benjamin Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8ec31f26770ef1e85fb3a6005467f0e2d3ce1715) Change-Id: Ib47a8cc62611c6e7c904898990b38ae48d8478e3 Reviewed-on: http://gerrit.openafs.org/3642 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6b4f5f240e3529c45981db8ea15ae788cbeb94b5 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. Reviewed-on: http://gerrit.openafs.org/3372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 1de6d5bb0122d00c398202451bf88042ea08aa3e) Change-Id: I6d2970f9b8811e145e2a03105c64cbd6714c0c5a Reviewed-on: http://gerrit.openafs.org/3641 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a26755c9d6739fc9c84bb462fd3a051dea402114 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. Reviewed-on: http://gerrit.openafs.org/3637 Reviewed-by: Matt Benjamin Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8c541079573274d726180d3d9679c6a26cda84ea) Change-Id: Ibaae9a766ef01cf4c68995c2bef454bae5d03b38 Reviewed-on: http://gerrit.openafs.org/3640 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5de4614c14f73b3d6d4b0da3ed87b6264b42332a 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. Reviewed-on: http://gerrit.openafs.org/3266 Reviewed-by: Jeffrey Altman Tested-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit f2c6ae300a211460c24c87752cf9400b9e61ee1f) Change-Id: I3b7ad3f9672975a87dbe337256d42166fc638b34 Reviewed-on: http://gerrit.openafs.org/3639 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8adedcaf5822e88e230c6cd988083d4676251f88 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. 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 (cherry picked from commit 37c20528df26a43ec81b8e0f7658f1516d3c1b39) Change-Id: I7e78989c313269388808c26d521f4075c0749cd4 Reviewed-on: http://gerrit.openafs.org/3638 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cc4ce815780ae7e28adc9c47160f2270c0854e9d 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. Reviewed-on: http://gerrit.openafs.org/2969 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3f0c08ad93bf98fbe64d5714649d675712410cc9) Change-Id: Ieebbf65b1764304f0b8e38bb32f0e4f61c332932 Reviewed-on: http://gerrit.openafs.org/3620 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36921e8c26e2f86dbe322e43574d588c767883d6 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: Ibea3da2c5d18a2609989b547a1c587c25e3f07ff Reviewed-on: http://gerrit.openafs.org/3549 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 28032bc1c1aaa4c25e94025a8fa9e2b4e8131ce3) Reviewed-on: http://gerrit.openafs.org/3633 commit d8f4635333dabc59cecdba602b14971b6b2da0b0 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(). Reviewed-on: http://gerrit.openafs.org/3590 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman (cherry picked from commit a7836dda8c1aab18c937c7e8909d4d9a678a53fa) Change-Id: I9af8aee92e0e187923ccd952a5487ea419446720 Reviewed-on: http://gerrit.openafs.org/3626 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 79678407c53070f488abafbd8a724b10b05ddb4b 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. Reviewed-on: http://gerrit.openafs.org/3296 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie (cherry picked from commit 97474963e58253f8c891e9f6596403213d53527b) Change-Id: I5a14c490dba7e1ad815856ccb3f90e210e09f50d Reviewed-on: http://gerrit.openafs.org/3624 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 22bb66ca73f98a7786aac79f1600b374e927addc 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. Reviewed-on: http://gerrit.openafs.org/3596 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 02a2f6005042b9370350bdc03d4aab83355b205d) Change-Id: I1d3ec3929a8974d571e9b3712e53db4fceab4879 Reviewed-on: http://gerrit.openafs.org/3635 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0c6ecb1274e15fac5aa106ca0bcf0e4969ea67c3 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. Reviewed-on: http://gerrit.openafs.org/3595 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3503f32848ab3fcb0df5a0b40518106bf19cee6e) Change-Id: Ib6b32fe942f5083e18f32404156a42cd82bf5c5a Reviewed-on: http://gerrit.openafs.org/3634 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0f48add85f29de63eeaf1d6342f675131dc4ab79 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: I594f31ba05c3847e5d83d89748266d24547bf97b Reviewed-on: http://gerrit.openafs.org/3035 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/3632 Tested-by: Derrick Brashear commit 72e2b1119136315a5845c7af00aa73456985d6fa 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: I4733489d50d3459172ee2eb021190d013f68018a Reviewed-on: http://gerrit.openafs.org/3275 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/3631 Tested-by: Derrick Brashear commit 2da52a3b73ec84aef21284cd217aeaaf330fce00 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. Reviewed-on: http://gerrit.openafs.org/3289 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit ef8c3db90ae9ec25705027c609a1bae5f186c4f1) Change-Id: I6f950fd23eba9e00470e424ae49ee6ce9d7ca6f4 Reviewed-on: http://gerrit.openafs.org/3618 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 95882c8b96b525749633a86d35c93b5efd8073f3 Author: Andrew Deason Date: Tue Dec 21 16:11:50 2010 -0500 HPUX: Allow des.c to compile The HP-UX compiler does not like des.c without 'register' keywords. Be sufficiently retro so the build can continue. Change-Id: Ief032712893d96c2c198da82238eefe6807082cd Reviewed-on: http://gerrit.openafs.org/3571 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a3e5291ec08d686ca07610fdbac8d5916f27343 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. Reviewed-on: http://gerrit.openafs.org/3592 Tested-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 676a4efc232bc77fe20e46c2dbe45e89f89cd670) Change-Id: I324e55c82bf2e353143368ccd4ca074a646d11d1 Reviewed-on: http://gerrit.openafs.org/3594 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d8b59ab659aacdd2dd878cb521ba4f095096c165 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 Reviewed-on: http://gerrit.openafs.org/3569 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fa4b1f3aeb33c28b2d8e2724542d1696fcc87773) Change-Id: I9a108b38fa30e1a45f07c5d5d7d680d2b7d0257f Reviewed-on: http://gerrit.openafs.org/3578 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 87a98b3109d389eac0e4a9bb4862ca9e320e21fc 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". Reviewed-on: http://gerrit.openafs.org/3568 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 64e564b29e95898a6eb85dc527d046aab241fb8f) Change-Id: Ia1165e1ff37c18417deef56e79ed791ca77d7a53 Reviewed-on: http://gerrit.openafs.org/3577 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b442143bbdffabeb33fc4f536e0d1f7316aec4bd 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. Reviewed-on: http://gerrit.openafs.org/3373 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 9657695d34badaac654227be8c731a1512f2106b) Change-Id: Id663878335875d191280f289b8b353c7834648de Reviewed-on: http://gerrit.openafs.org/3576 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b024eeb6c78f133d1c87458cfd2d60b446bf9ede 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 Reviewed-on: http://gerrit.openafs.org/3565 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 468ff8e4d298baba9c2d4f96d1a3ec12cf64d0c7) Change-Id: Ia1fed7345c38b891d644f459b97b36a9f2611a0a Reviewed-on: http://gerrit.openafs.org/3567 commit 28c898cbfa9a4d83295aa5d2348e344afe35d95e 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. (cherry picked from commit 0ef3ce2006b81f590c62a51b7ec903ebff24b9c8) Reviewed-on: http://gerrit.openafs.org/3563 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I9c30a9b05fb776bff9b19adf58a701799cce0a27 Reviewed-on: http://gerrit.openafs.org/3566 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b9c7a3ed764d9a9daaf110d3078a74dfac4c4b7a 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. Reviewed-on: http://gerrit.openafs.org/3365 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 222067f6f8fd4f596302befbc48918e10547ed1d) Change-Id: I4bdf000bbdc10b0818c2fab6eaff912f18e1f4fb Reviewed-on: http://gerrit.openafs.org/3561 Tested-by: Derrick Brashear commit f0b69fcdc80fa637a557c75ea0f99c62ebb98681 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. Reviewed-on: http://gerrit.openafs.org/3555 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4f89d4ad348f1b20b9f27e8985fa09eafb6212e0) Change-Id: I10c81fc3242294266468560628ff4f328e6e6997 Reviewed-on: http://gerrit.openafs.org/3560 commit 95b83af1bc2a2c8664128a5923d1f702214f287f 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. Reviewed-on: http://gerrit.openafs.org/3554 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit ad0b390ec5303576cee37fa49bfd2a732b365a83) Change-Id: Ie31976505170bb01895dfd8734267ab497af901c Reviewed-on: http://gerrit.openafs.org/3559 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 656541447d9ae5da859550533a4b74766730dc49 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. Reviewed-on: http://gerrit.openafs.org/3553 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6f65ace58d2c50313e307204c0e4a6408483a211) Change-Id: If290faf297c3c3267cd0969bbbc3036bae256f8e Reviewed-on: http://gerrit.openafs.org/3558 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2fa92a58e827aec77c8b4dbe50d06e54d185f316 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. Reviewed-on: http://gerrit.openafs.org/3366 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 18793d4bfaeb88fd456c8d489165139126c0d293) Change-Id: Ifd31548dfecdd1a4838047e2548a8b2265422d26 Reviewed-on: http://gerrit.openafs.org/3557 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0f27f0925c17c24e98687f92e5299541a7ab794c 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! Reviewed-on: http://gerrit.openafs.org/3542 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f32a0df37be23fd87fa24187bbdd6a1ec73a2b27) Change-Id: I461955f97646be673a73ca64d3e511b0b113a477 Reviewed-on: http://gerrit.openafs.org/3543 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1e8ecdd05b21d2d4922530421051359dabb35d94 Author: Derrick Brashear Date: Thu Dec 16 13:39:02 2010 -0500 openafs 1.6.0 pre1 make changes for prerelase 1 of 1.6.0 Change-Id: I04c61080dff4827b95b22238bfb08a26a4514955 Reviewed-on: http://gerrit.openafs.org/3536 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 243eaf6620c4d08bff82b02c46bf833415f1b05e 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: I6752819239cd3a88e1782596554595c3e862c413 Reviewed-on: http://gerrit.openafs.org/3535 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 556772c9639ed2ab00a7951df01cb98bfb6b24bf 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 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 (cherry picked from commit 1519144f83925d82117f31ce0872f77660f197ee) Change-Id: I2b630a3264d04d6fbb626b7ef997da9bf081ade1 Reviewed-on: http://gerrit.openafs.org/3513 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef445de0b09bb4f1c80e0541f9fff37a44b5d835 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. Reviewed-on: http://gerrit.openafs.org/3498 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4e00fc6f0e412f438f2f72f8b427c21810d00109) Change-Id: I4f10e0de116dc3e19b7bbcb3eb304c894a67160e Reviewed-on: http://gerrit.openafs.org/3509 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0152303542a98bef563b327f6102a89e46fe3d24 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. Reviewed-on: http://gerrit.openafs.org/3497 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9da7f3cc73bf990427a9dd80ba2bbbb618383ea3) Change-Id: I440d33e5cdd94dc5c7d12ddef1e63a05e53d787d Reviewed-on: http://gerrit.openafs.org/3508 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 58604e7adcb3208c68c7188cf2151504bb34218e Author: Andrew Deason Date: Fri Dec 10 14:43:24 2010 -0600 Add afs init script for Solaris 11 Reviewed-on: http://gerrit.openafs.org/3499 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2cd0a1e4ff82349f8671783e40ea478096d69b56) Change-Id: Iaf0241a8f5651dda1ad84ebb097350f0dc2bab85 Reviewed-on: http://gerrit.openafs.org/3507 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84fccf150f58fa620a4f93f497e80616d4184ed6 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. Reviewed-on: http://gerrit.openafs.org/3344 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 03ab065e0ccf291d45a93b7d63c022bcad3aac34) Change-Id: I4623ba9c00ea19b33d73831f6f11ba2d2e32b1a0 Reviewed-on: http://gerrit.openafs.org/3511 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 800ff75c7129e6690082ef3959214163e216f425 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. Reviewed-on: http://gerrit.openafs.org/3260 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7d6860c852296d96eac2785739bcfb9de76cd92d) Change-Id: If8912f8cba8e12525f12f75cd53cf77bb7d4c547 Reviewed-on: http://gerrit.openafs.org/3510 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 60d0759f212be50147345537cbad90421325e1e2 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 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3491 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3fd789dfbdc05c7c00798bc305d743deea05e155) Change-Id: I8b39e5d4156a99e5435f7329d7d1b3465ddcadc2 Reviewed-on: http://gerrit.openafs.org/3506 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1e7d213fcbc9f89413fd712fe98dab3c1db111de Author: GCO Public CellServDB Date: Mon Dec 13 10:53:05 2010 -0500 CellServDB update 13 Dec 2010 Change-Id: I5048d1932943687bc2829326e32b530b2a8a9c41 Reviewed-on: http://gerrit.openafs.org/3504 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6e245f307be77d67eacfdfd5b3c3eae4115bb61d 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. Reviewed-on: http://gerrit.openafs.org/3341 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit acdef43d818ee56e6c1f1dc29f508c02793c8355) Change-Id: If7dbe6f41f015025447e68eb1fc9ea14e56d6fe2 Reviewed-on: http://gerrit.openafs.org/3496 Tested-by: Derrick Brashear commit 6b6d28d73726de84b1c54e10a21dc1e441912518 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. Reviewed-on: http://gerrit.openafs.org/3292 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit fb6b22cf77039962f22f462ee602f0e4a8153817) Change-Id: I30890cc3ad3f1a932218b6c8aac653cf747cdf2c Reviewed-on: http://gerrit.openafs.org/3495 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 18e38453925174f574d011b0f3d557763450391e 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. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3278 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c07b47169adb85621c328a3687ea62ef84e43bb1) Change-Id: Ia91a598fc4b25f5fd7f29aed38a7caa3437ffc89 Reviewed-on: http://gerrit.openafs.org/3490 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4bc728d3bd51fe32eebe602aab1079c52831d3a8 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. Reviewed-on: http://gerrit.openafs.org/3468 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9aad0979e9ff0601c249eb66a6ecfb3e76264702) Change-Id: If819975bd24e29da1142531c3f0eb27755e65afb Reviewed-on: http://gerrit.openafs.org/3489 commit 2a9744f57faf8a9c6ad08b72015612a7934dbb3a 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. Reviewed-on: http://gerrit.openafs.org/2089 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4f1efdc8b73ed734197925766530d033c6f9794a) Change-Id: I85c8f56b706f5ad335968f3f9857b284a28024ef Reviewed-on: http://gerrit.openafs.org/3488 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0bddd655c9fff2386ef605c03546beca038d2bf4 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. Reviewed-on: http://gerrit.openafs.org/2872 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5988923898e15cb50d550e54119869b38cb5bc5b) Change-Id: I1cbc48537a0b038838a8bc102842b05195d685c3 Reviewed-on: http://gerrit.openafs.org/3481 commit b11f35353a19d760820dad80441aead7594408d3 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. Reviewed-on: http://gerrit.openafs.org/3274 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e890f090e11d09b6e6b929642cbd92a56fb6e66e) Change-Id: I3f42b2c0f54f30989f7a1a3fd18171deb4b814f1 Reviewed-on: http://gerrit.openafs.org/3480 commit a2a096547d341b3475c13ff9a2845284f973990f 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. Reviewed-on: http://gerrit.openafs.org/3272 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ef4b9e13ef6a79d7e5f540297e486189fdedf085) Change-Id: I2f49d5eb6f9bad2343ee9a9c84ccbc1f323cc8a8 Reviewed-on: http://gerrit.openafs.org/3479 commit 6c5a28647dfaa3cac5e08279ffacb6484c8926ef Author: Derrick Brashear Date: Tue Dec 7 00:34:11 2010 -0500 tweak afs server conn error handling a bug in a 1.6 pullup of be770d4336c2fd7b8a83f18577ae6bb23a3f3e99, properly mark servers down for rx errors except OPCODE pulled up and failed to push edited change. Change-Id: I329ab83646c30597548b08d5ed0a4f1f6cd3115d Reviewed-on: http://gerrit.openafs.org/3470 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d5e4447f5ddd023a9312d703fb21d59274b7d19d 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. Reviewed-on: http://gerrit.openafs.org/3259 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8401d0281f833638c1cfc5cb862d77fe97232ecb) Change-Id: I2bd574981d6a63fca88f1a635db09521f6347e9f Reviewed-on: http://gerrit.openafs.org/3461 commit 1dd1ff13b607ddac781604d245f0e0fcb0df26e8 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. Reviewed-on: http://gerrit.openafs.org/3391 Reviewed-by: Matt Benjamin Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 622403c87a8cbcedcd1212fd32414285d103887b) Change-Id: Ic5cfc4db2ff5b55730de31832b64bc1bf0696767 Reviewed-on: http://gerrit.openafs.org/3459 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit c945f17666ad5a4cf36545476d46951732c7e8db 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. Reviewed-on: http://gerrit.openafs.org/3200 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ebd18bfade80bd66422aad4310375ee460cd1ed5) Change-Id: Iac808cf603043a8996f1c8657765ef8a0a7e6d88 Change-Id: I163a4314a0598eec9a514bbc564d8dc2ff91acae Reviewed-on: http://gerrit.openafs.org/3458 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit c0b38dc2970148fc9d0efc43ce1476454d7a2520 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. Reviewed-on: http://gerrit.openafs.org/3389 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4e4ed9de93d202d21cab4c40d37fcfacc85694e) Change-Id: Icccc9f116c707a9af776f59231fc4999865b6344 Reviewed-on: http://gerrit.openafs.org/3457 Tested-by: Derrick Brashear commit a463e658969e112260a631f910b4d431c76835a4 Author: Derrick Brashear Date: Mon Dec 6 13:55:22 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 (cherry picked from commit be770d4336c2fd7b8a83f18577ae6bb23a3f3e99) Change-Id: I97f161e19140591c304e748eead8dcc46852f94a Reviewed-on: http://gerrit.openafs.org/3456 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a9095c0bc8b7ce7f48f0b90ed80233bb9d23aeaa 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. Reviewed-on: http://gerrit.openafs.org/3418 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eaaba59773002ca3ba3e15d1aea69ae4b9493359) Change-Id: Id2e4af53a371c3b9e605752424c74c082d0c4182 Reviewed-on: http://gerrit.openafs.org/3455 Tested-by: Derrick Brashear commit 763ba0965c0338deaacdc538e23ff3854ea1bc77 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". Reviewed-on: http://gerrit.openafs.org/3417 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 35daebc577ab11a5fd80d678764a3a681cc5f2f3) Change-Id: Iffbccfdf0f066d0cb02bb39146afd9520c9bc277 Reviewed-on: http://gerrit.openafs.org/3454 commit 3141167ad1d360e2da4c26225f86e3ad0789bd85 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. Reviewed-on: http://gerrit.openafs.org/3405 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 2d2ac3ca5fbd221d297861c0b5c409e9e004545c) Change-Id: I60c8aeb69484c87b10cdda8a317702d2f80ee849 Reviewed-on: http://gerrit.openafs.org/3453 commit 8a534a9a8e0d0f3547130ffb4c9bc74f71839869 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. Reviewed-on: http://gerrit.openafs.org/3402 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 2822416059fe192dc7e3c261b1e93510f2f10f3e) Change-Id: I6fba524733ecf35e60419d449838e93a7a5255a6 Reviewed-on: http://gerrit.openafs.org/3452 commit 62988aa3762ba28ba875100673a2e0f64d8611fa 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. Reviewed-on: http://gerrit.openafs.org/3401 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8fa01c4d602fac6d5d81b119d0593f02087e4302) Change-Id: If4a47f57a804a2492659d74a5e930f4a962f1748 Reviewed-on: http://gerrit.openafs.org/3451 commit 4d0797d6d9fa6d92efbcac9afb72383f0cd7fa32 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. Reviewed-on: http://gerrit.openafs.org/3424 Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6eb1088aad9163ab8d4a4dda513444290c55daa6) Change-Id: I0c5c8554caf777e8c97529a7d640a79211a0300c Reviewed-on: http://gerrit.openafs.org/3450 commit eb563acb2175012759b06ed6dc86939d4b2c9614 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. Reviewed-on: http://gerrit.openafs.org/3423 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit bd2e024dc230693b1c6cbcfe40d4270a475b02d0) Change-Id: Ie80dfd0be5e8c5560763b3fa50a27ed766340aa5 Reviewed-on: http://gerrit.openafs.org/3449 commit 4209e98c2d61256bbfe07f3d005b83746ec4a5d0 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. Reviewed-on: http://gerrit.openafs.org/3245 Reviewed-by: Marc Dionne Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 2ea841feac2de8ade987c18cb7043aacfebe0d83) Change-Id: I1f17068a1a06654568f30b75c5c65da0100995cd Reviewed-on: http://gerrit.openafs.org/3251 commit fee17990194cde86f8ec190086425df49dc30d78 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. Reviewed-on: http://gerrit.openafs.org/3357 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 53d1fae4c422317dab0b7bf7fb0dedc5eb1f3607) Change-Id: Iab0a729f44ad32c416c5898078c57d93142d3c5e Reviewed-on: http://gerrit.openafs.org/3359 commit 87fbb5033762ea90e70b1fae1389c8fe8afdfa90 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”. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/3277 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 14980b477822ecc66e95f8c2a71f0fc11839afbd) Change-Id: I8bbee19ae1a36b2222df224856d08ea71ce91d83 Reviewed-on: http://gerrit.openafs.org/3306 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b17c71d67a06c43d32eedb862f84a3e8e518ac44 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. 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 (cherry picked from commit f9409fcdffa594aff9530038a5ac81a2495da3b6) Change-Id: If14d34183d8a28232f5f38fbe807c23dce1abf1b Reviewed-on: http://gerrit.openafs.org/3287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d01e8830661a0939215e1d94be73d8b91053133d 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. Reviewed-on: http://gerrit.openafs.org/3294 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c8dc68299d47ae4d7f0c9a1354de9ddd37ff86fc) Change-Id: I10ac0ce495f2784ec270ebb50fc92c983cc0308b Reviewed-on: http://gerrit.openafs.org/3295 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fb7e276efdf1c68144c8d210582c0b66ab1ab081 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. Change-Id: I2226bfa5ce170cce252c8d55c13b23552a682150 Reviewed-on: http://gerrit.openafs.org/3267 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 946d3064a3bc6763bdfb0bf8020f3eb3c9d2e2c5 Author: Derrick Brashear Date: Thu Nov 4 08:23:52 2010 -0400 openafs 16 merge error on rx mutex inversion fix remove an extra bogus line left when cherry-picking. (cherry picked from commit d5ce8d19ace9b87816dd36663420136f5f2ad746) Change-Id: I4fa8cf8c4f0aafc04ffe7a9e48f2437dfb9e19db Reviewed-on: http://gerrit.openafs.org/3256 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 608b568a8956469df419d1b48917444d7cd1a594 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. Reviewed-on: http://gerrit.openafs.org/2982 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Reviewed-by: Tom Keiser Tested-by: Derrick Brashear (cherry picked from commit 9fa496d11ff2a361b4693034f6caad90da995312) Change-Id: I2e0f5eb2942830523b19d2596c50d0fba0fc9a1a Reviewed-on: http://gerrit.openafs.org/3248 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit f5f3f9106a6b2b91ee1a9e22027f78f84d1d1dec 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 Reviewed-on: http://gerrit.openafs.org/3220 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 862e29a98aee72918fc25e960556f732ba80522c) Change-Id: I11847718cb5321ff2b08850786cc147390040f42 Reviewed-on: http://gerrit.openafs.org/3246 Tested-by: Derrick Brashear commit c1157279a03172bb51b54ef8e955f35b184773ac 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. Reviewed-on: http://gerrit.openafs.org/3163 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 812333c9a0d4722142d22186fe9b07b39fe6993b) Change-Id: I54e58a5bb2ae88bfd4518c248fc9d3377c0c0981 Reviewed-on: http://gerrit.openafs.org/3235 commit afcc5918ff41fa661a86f46f2c436d05e2abd616 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. (cherry picked from commit d5ce8d19ace9b87816dd36663420136f5f2ad746) Change-Id: Ic4b13dcf09006d3c8171b63f254129fe202e7155 Reviewed-on: http://gerrit.openafs.org/3243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2a85a613d58f1d944d4d93181fb8d3143554215a 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(). Reviewed-on: http://gerrit.openafs.org/2837 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5613ea60fc9431dbc87bc8ad6439f9b5af38af5c) Change-Id: Ie8e72b1c3d68e698048594b5ceddf90910fbc05e Reviewed-on: http://gerrit.openafs.org/3249 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f4c7651744a64c77688f28879cf67c17db2897ca 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 Reviewed-on: http://gerrit.openafs.org/3173 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9749e5284cb8915d5e9b886bd74f1580d5bff28c) Change-Id: I72975f54e7434f20fac32e4821801d43d13846ce Reviewed-on: http://gerrit.openafs.org/3242 Tested-by: BuildBot commit 6ce137b37627b349db5a8b1fdf0d9d2b61495070 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" Reviewed-on: http://gerrit.openafs.org/3174 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 46cf6c8f365d25122c550b76be61a880d16f531b) Change-Id: If9b63e4d8a377bc23be07ab82f3dc73779d95fa1 Reviewed-on: http://gerrit.openafs.org/3241 Tested-by: BuildBot commit b127deeeb34ae898cf2ee08954ba76932acabeae 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. Reviewed-on: http://gerrit.openafs.org/3175 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e1ed8ab1d93906e1b556de332fa32601a9a489fc) Change-Id: I028a96a669fff3db48c05f2d894e9c6ef31fad12 Reviewed-on: http://gerrit.openafs.org/3240 Tested-by: BuildBot commit deed8d63348508a6bcbda49e64b73cfd41ce2199 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. Reviewed-on: http://gerrit.openafs.org/3182 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 68aace4054430105ceaf52ce8e316f3ae01e7dc8) Change-Id: Ia481b1b36dbecbeca5a9e69dbcd78b7a754f9cc9 Reviewed-on: http://gerrit.openafs.org/3239 Tested-by: BuildBot commit 1ceab26371030d94c5a837745ae2cebcbd81b93b 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. Reviewed-on: http://gerrit.openafs.org/3165 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0cc3cc9412c232e2ec799ee1f1a9a90f3e56ab66) Change-Id: I453e6eced8145a0b361ce4a54baf9f7411128d2f Reviewed-on: http://gerrit.openafs.org/3238 Tested-by: BuildBot commit 51363199a658c74fc9481cedbaf44bdddc4c8441 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. Reviewed-on: http://gerrit.openafs.org/3186 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 832607318b9ad4ab38bb62515cdb4959cc21a656) Change-Id: Ic4274a4a5640166669714798b909b2efb3b84cdb Reviewed-on: http://gerrit.openafs.org/3237 Tested-by: BuildBot commit 01c6e73f988b3b9c811766657698726488914362 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. Reviewed-on: http://gerrit.openafs.org/3181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5fce5754cee4f466f99681fcd7f42e5735e9776d) Change-Id: I3b2215f017aae91a91e1a1955f34bf149679223b Reviewed-on: http://gerrit.openafs.org/3236 Tested-by: BuildBot commit ab4e008a3b357644c1f16ebc63ea2fae5270243c 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. Reviewed-on: http://gerrit.openafs.org/3195 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b6367aa84b9d1c7529b6f3a12bbfeacc91384ffb) Change-Id: I41ccb2b84347c4182d5b782faee176c9800d640a Reviewed-on: http://gerrit.openafs.org/3234 Tested-by: BuildBot commit 2e595e929fc679bd5eb82084e0a60d23fe9e827f 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. Reviewed-on: http://gerrit.openafs.org/3196 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit aad83a30a82407bfa6ac15b49fd31d69b563e898) Change-Id: Ibf7f1744f0030c92b45b1558d7f5e52409208e60 Reviewed-on: http://gerrit.openafs.org/3233 Tested-by: BuildBot commit 9635188652022e0bc9d8d683f1335c1df1cf8033 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). Reviewed-on: http://gerrit.openafs.org/3197 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4f5cdd73f665434f531144151f9b6e1f4702cf02) Change-Id: I301f61e507ad5947a786709af907a99b91725021 Reviewed-on: http://gerrit.openafs.org/3232 Tested-by: BuildBot commit f4677a65312e92fc3a12b29efa6bbc174df563be 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. Reviewed-on: http://gerrit.openafs.org/3008 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit c77ac5ce976b6f3e5a13a3f739ddbb6e32a177b1) Change-Id: I94ada76f835ccd01e2061034bd6585d6f1d5dccb Reviewed-on: http://gerrit.openafs.org/3231 commit 1739600c214d990b8d511d5bc6a1439316a7f153 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. Reviewed-on: http://gerrit.openafs.org/3007 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit d390df097cac0fb7815c43e071040559612b6360) Change-Id: I930627e92672dd5012d5bca08d469f7fb7624be1 Reviewed-on: http://gerrit.openafs.org/3230 commit 7667610bfa2912e3d5cd9b37174d74c901dca75d 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 Reviewed-on: http://gerrit.openafs.org/3005 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b04a450df2e54a549f9c7e014016475fa566937b) Change-Id: I63ae7edeff59bcd264a371c3bfd71220da4b4a39 Reviewed-on: http://gerrit.openafs.org/3229 commit 3991cf2f0fcea26c3d766c54e1b8161226980841 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. 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 (cherry picked from commit 1fa575c09ea7aa66e657b226465cb90dbba4af70) Change-Id: I0e748b513bcb97c436bd10c8a80222fc10fce08c Reviewed-on: http://gerrit.openafs.org/3228 commit 2d376fcf2684433310cc7e7cf4cf74343e5ead6c Author: Jason Edgecombe Date: Tue Oct 26 15:00:58 2010 -0400 Quickstart Guide: Add some verbiage about /vicepXX/AlwaysAttach Reviewed-on: http://gerrit.openafs.org/3158 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9c8d58cd93b98120a7ff31a90b3f9f0ef354a1bc) Change-Id: I11a6177257338520602e1cb6be029583e94c4b43 Reviewed-on: http://gerrit.openafs.org/3227 Tested-by: BuildBot commit 3ae4cf04c8f9faac49f234f633b24eff0388f4d1 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. Reviewed-on: http://gerrit.openafs.org/3199 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a546fc1707bc32ecb71d42dd48f91eebe3876439) Change-Id: Id46c636faaf356bf6d7e08b4e22380f50e8dd944 Reviewed-on: http://gerrit.openafs.org/3226 commit 8110c2cb4435c2e287b5b4a362f38334f1b413ad 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. (cherry picked from commit af0951f373224ce17b341bc5d227fdd5ea621762) Reviewed-on: http://gerrit.openafs.org/3194 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I2af9e1a54bd291f779b5380c0f45f9527e3c7cd8 Reviewed-on: http://gerrit.openafs.org/3225 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c5b516c1cf5fa4627a293053e775b4ab1da5f44a 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. Reviewed-on: http://gerrit.openafs.org/3217 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 81602ffa3b6d981ab96ca17d970e585b7be28e6d) Change-Id: I65f8e7816c8505cc2daddd4d646b65e6062cf686 Reviewed-on: http://gerrit.openafs.org/3224 commit ccc14955235dbf7d8f1244f6204aa34ba99a2d53 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. Reviewed-on: http://gerrit.openafs.org/2329 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 0aa7fac246ce044c757530ebe96d3a05c2f33894) Change-Id: I76db861c862789801d74578c4965a2bc41c2047b Reviewed-on: http://gerrit.openafs.org/3223 commit cab87d3f7b6686de7072eb166ccc7c5fe0f6536c 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. Reviewed-on: http://gerrit.openafs.org/3207 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear (cherry picked from commit c120f5c9b64a1333f965125dcfc435e922b47356) Change-Id: I33e3f312ca07e9e2f7f5453495d6695a42e2cc19 Reviewed-on: http://gerrit.openafs.org/3222 Tested-by: BuildBot commit d45097f046aa62c9d479fda39927c450e6fdd551 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. (cherry picked from commit 58901738ad6280d0777dd8e77f8c09cc45da04bc) Reviewed-on: http://gerrit.openafs.org/3177 Tested-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I6918987cd784e4e550c2525b537bda290dbacae8 Reviewed-on: http://gerrit.openafs.org/3221 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a6a318c12cda5b7d8309a64f12ecab6bd879d8e8 Author: Jeffrey Altman Date: Thu Oct 14 17:24:33 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: I449d0822a39554a1f45b5b509d70e093e7ceb690 Reviewed-on: http://gerrit.openafs.org/3171 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8c2d56f9e4a612af420450fac1cf0423dc2e4eca 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 (cherry picked from commit 78502b61b3e8b288ce6fec1f66d14d7e2431642a) 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 Change-Id: Iac34946f9de773ea7489cd75edba220bca2158e3 Reviewed-on: http://gerrit.openafs.org/3172 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b58b1faf9210812c2c68b1fa69d98e765896c368 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. Reviewed-on: http://gerrit.openafs.org/2987 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3616cdc306f58f90be1cb4f524aa5720d8d638fe) Change-Id: I45f839aeba7d7611ab170f6c58cc30547a2e640f Reviewed-on: http://gerrit.openafs.org/3169 Tested-by: Derrick Brashear commit 8bb5b578789c71abcc199b1e88a7f18fabddeb05 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. Reviewed-on: http://gerrit.openafs.org/2961 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 091b6e19d14b8d7c7396496d050fff5d067791a9) Change-Id: I4f26ea2c3db67c164236dc84b78084822b562b95 Reviewed-on: http://gerrit.openafs.org/3167 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 44a052adfef139120ee588a23c1f342297e11334 Author: Derrick Brashear Date: Tue Oct 26 23:28:57 2010 -0400 make openafs 1.5.78 update version strings and such Change-Id: Ia3c8bff95ea72708d815d74a35a55d4348d560f2 Reviewed-on: http://gerrit.openafs.org/3168 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 867b3313a52b2c740f536bec47ad516160615aa5 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. Reviewed-on: http://gerrit.openafs.org/3147 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1664a2642b56febc08af8f95250a6d64761a525f) Change-Id: I25a0eaaacb44555c1ddf5f538ef9c6792f6dac59 Reviewed-on: http://gerrit.openafs.org/3156 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dab406baf28c19710b4a451ae2516dfa1ebeee29 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. (cherry picked from commit e7066a9c30047e787d72f02dd1c28e5e473e494b) Reviewed-on: http://gerrit.openafs.org/3137 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I64edd961e7e9cd615e07cc3f32d9bf71f74c8c8e Reviewed-on: http://gerrit.openafs.org/3155 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 712f43ebda08d2fe10e3f026f89085f1cb6a29ab 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. (cherry picked from commit 36e2d13b55085c996d38b30d003296c602ef8ee3) Reviewed-on: http://gerrit.openafs.org/3138 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I43102ffc961d33255c995f4ff84142b7203cd11b Reviewed-on: http://gerrit.openafs.org/3154 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 81aacd67095cbcac6a05d7c2f34c8b053f8478f7 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. Reviewed-on: http://gerrit.openafs.org/3136 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 802d50bc4e220b9bf404ac1ee36720023986d98e) Change-Id: I4db12f228e5f10f7ab4a68604828823f6b783677 Reviewed-on: http://gerrit.openafs.org/3153 commit 7c17aa2eb0e9c6c42b49f4d617e17aaff2cea7c6 Author: Jeffrey Altman Date: Mon Oct 25 23:05:00 2010 -0400 Windows: Fix math error in rx_Writev processing LICENSE MIT Reviewed-on: http://gerrit.openafs.org/3148 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e848f3c2160745228e0f770f8daf4fffcca7507a) Change-Id: I5f31ae8500ace8e5a95f21510cb7c3eaae547aee Reviewed-on: http://gerrit.openafs.org/3152 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7399b74d8b0a25cb4d75ef50a0f50383f35351f5 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 Reviewed-on: http://gerrit.openafs.org/2999 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e356090ba21395e110b8a403a5efaf725ca3ffc8) Change-Id: I0afb35343d111fd32c0ee65d8ab976a65c27e1a5 Reviewed-on: http://gerrit.openafs.org/3151 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 68ad359ac24ff75157f8a118d22ce14f7e8fa717 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 Reviewed-on: http://gerrit.openafs.org/2876 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9d912b6f1c4f3d242429c66291107b2badd166e4) Change-Id: Ie18184f5d6d911ba18ad216cb3726378333f6213 Reviewed-on: http://gerrit.openafs.org/3036 commit 1a3cae13171830aa681814aa150851475ad5e555 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 Reviewed-on: http://gerrit.openafs.org/3033 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f943a4eb524434d25ecf99cba0843ded13aef176) Change-Id: I8ede65aef843af358455126301067d0b889ae9a8 Reviewed-on: http://gerrit.openafs.org/3143 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit cc76c31402ed1f8a884f7e8c630371520bd34574 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. Reviewed-on: http://gerrit.openafs.org/2977 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1418b4fec23459aafec4b5a787e2c2b89f6af1f1) Change-Id: I4eab1a4a3ea33bdcd7ccb27aea0927eed16892ca Reviewed-on: http://gerrit.openafs.org/3142 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 25e962d334f30656bf3a70cdf32dae2911fb7c5f 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 Reviewed-on: http://gerrit.openafs.org/3032 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2c12b80a4fdb8323ff3fdd194ff1994ad0a0b8e1) Change-Id: Ic5b3d8e267bc10ee1802e5c391f87d37d605bec9 Reviewed-on: http://gerrit.openafs.org/3141 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit ebe41ce107fe5b8ad185d247a2632384071d34ec 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. Reviewed-on: http://gerrit.openafs.org/3031 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 58e7b85ab7c3c839c5dd126bd1c254f68a16b73a) Change-Id: If2ad45645bc27af3a8ecd97f047b5558c73b173d Reviewed-on: http://gerrit.openafs.org/3144 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 174020545f4539b2174200e1544bd0daa797e35b 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. Reviewed-on: http://gerrit.openafs.org/3030 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit da18ca41751b43576f6652a16f69260e0c6ac0d6) Change-Id: Ie560d081e160ec1518c6d3fd307455ae8d219651 Reviewed-on: http://gerrit.openafs.org/3128 Tested-by: Derrick Brashear commit 4463034235ff875f59966a61261dc904a92004dc 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. Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 290495fab1b2a8f1dc842cb2dd6de2d9922169c6) Change-Id: I13fef02ad3c456614cd71227e6a0ae8b4a3f5c72 Reviewed-on: http://gerrit.openafs.org/3127 Tested-by: Derrick Brashear commit e339f372a22d1d4586539bacdf60cf8bc8f0ec47 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. Reviewed-on: http://gerrit.openafs.org/3026 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5c8981e0404287f2aa46390d3a9e8a52261906ab) Change-Id: I82cf73cc8153d9aba669dc581231a88949b6ec4d Reviewed-on: http://gerrit.openafs.org/3126 Tested-by: Derrick Brashear commit 30308fd6e4f6f142ccfde96bc69348bca6574847 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. Reviewed-on: http://gerrit.openafs.org/3027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c8f47626e2428449bfb64844e46fe5ad6b8e0f1c) Change-Id: Ib9aada7b549e661eaf965747011ffbe85e306d4d Reviewed-on: http://gerrit.openafs.org/3125 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 72bda3acbc2f610deebddeeec3a152691f028aa4 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. Reviewed-on: http://gerrit.openafs.org/3028 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 046f230ed4dde4c31d849893eec750437135342e) Change-Id: I5c3084346631e4f07987d1dab2b1b891dbefbda0 Reviewed-on: http://gerrit.openafs.org/3124 commit 7d53e9694247b34f6a462390a5ecb2b82c0b26c6 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. Reviewed-on: http://gerrit.openafs.org/3025 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6f3938e80a79a4a3684565a6960bce18e167aea4) Change-Id: I4f084faaa5e058bb16045552135c70ac0a1683d3 Reviewed-on: http://gerrit.openafs.org/3122 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit bf3009f3bc54823734752b579b6c75d1dc00c792 Author: Jeffrey Altman Date: Wed Oct 20 19:35:10 2010 -0400 Windows: Improve cm_SyncOpDone logging Reviewed-on: http://gerrit.openafs.org/3022 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 64f732764cab7387943647285d5e5203f0c74218) Change-Id: I5345fe5912afb7b41f7c27f12b3df3862f04a5de Reviewed-on: http://gerrit.openafs.org/3121 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 77c1b49eb65c83c30a16c1a68465c4abe1ec5261 Author: Jeffrey Altman Date: Wed Oct 20 19:31:19 2010 -0400 Windows: remove unnecessary prototype from smb.c Remove rx_StartClientThread() prototype. Reviewed-on: http://gerrit.openafs.org/3021 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5880a576273c3b5f7683937df42bacf506007ba2) Change-Id: I0b61600b48239fbd30d8e8a13cc73fe33e4fe5df Reviewed-on: http://gerrit.openafs.org/3120 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8cfae7b20afc97b0136149305aa788acea933371 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 Reviewed-on: http://gerrit.openafs.org/3020 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 49e57b8c3b5e13f7ce48c6be5677827d970df5fa) Change-Id: Ib33babf87605c8f93ee87e8f7c8084e213eedbc4 Reviewed-on: http://gerrit.openafs.org/3119 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 63ffaff799af046a6f68bc1cf12a145638278341 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. Reviewed-on: http://gerrit.openafs.org/3019 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dd01970f440cc68fbd71a1544ee655131f42be51) Change-Id: If6743a5b341f40f42955638d5e2f09b3cb24924f Reviewed-on: http://gerrit.openafs.org/3118 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 650e41f75a28cb93301e46ca5d6ae74156f5b80b Author: Jeffrey Altman Date: Wed Oct 20 19:26:06 2010 -0400 Windows: prototype cm_PerformanceTuningInit() Reviewed-on: http://gerrit.openafs.org/3018 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bc810f4ac04fb6385e57d235f976d3f42f83e28a) Change-Id: Ib328db77b9783e3d6ecae3d719c8e85952b10488 Reviewed-on: http://gerrit.openafs.org/3117 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit d0958b07d30c0627e26f105a0f6f65b286af1186 Author: Jeffrey Altman Date: Wed Oct 20 19:25:00 2010 -0400 Rx: prototype rx_StateClienThread() Reviewed-on: http://gerrit.openafs.org/3017 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3f2f327df4d8cbac927e290d03d78611f7b12a69) Change-Id: I04ef0f93571ca450adf4e1b33268cf9c100822b9 Reviewed-on: http://gerrit.openafs.org/3116 Tested-by: Derrick Brashear commit e9610e23af9eeabbd43bd894e229c0d7e42fcf5d 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. Reviewed-on: http://gerrit.openafs.org/3016 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 929ca25d6d3fef07ea7c103dcd43a2658cdf71bd) Change-Id: Id8bc93ec669333e8016d0958eb5c0fd87b76d9e0 Reviewed-on: http://gerrit.openafs.org/3115 Tested-by: Derrick Brashear commit 5396d713327509d8bbf413be3db1c7da60f097e7 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. Reviewed-on: http://gerrit.openafs.org/3015 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit da400a24a7c9d5ac1595f10e0c76df5a461aa5dc) Change-Id: I3e8c77e30021055192951765bb823b635775e128 Reviewed-on: http://gerrit.openafs.org/3114 Tested-by: Derrick Brashear commit 05a7177c91570f40c5812aa1904b554f6478c5a5 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. Reviewed-on: http://gerrit.openafs.org/2960 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit f7799a35c5942ba4feda3bc8c848cdaa8e0b7b76) Change-Id: Idf4ba83ba187fd97caa85d0d042662c3b12efa02 Reviewed-on: http://gerrit.openafs.org/3113 commit bda8dca6f7d04cb8bcb069fa1517213deb3cda1c 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. Reviewed-on: http://gerrit.openafs.org/2997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 525ea8b60cc198f7e12da7a1aaffdcad2bb3ef21) Change-Id: Ide4c225516dc7585b49ba7b244b56446297c74d1 Reviewed-on: http://gerrit.openafs.org/3112 commit 9de921860a70e5599aff895ba6bb7581cef3362f 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. Reviewed-on: http://gerrit.openafs.org/2958 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 4e71409fe1305cde4b9b341247ba658d8d24f4d0) Change-Id: Idc064d5950b4235a303a933d046546b67add6623 Reviewed-on: http://gerrit.openafs.org/3111 commit 68758ed3d63ecd95f19d482b034d82cd29d267a6 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. Reviewed-on: http://gerrit.openafs.org/2944 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 98688ddf70cbfe21d22e5832b2f50d626b4183e9) Change-Id: I6db42ba9cb1614fd86616d6b425f821c3199620c Reviewed-on: http://gerrit.openafs.org/3110 commit e88096d63177ba00e2dc75ef3cbc88ecb5ba8f0a 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. 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 (cherry picked from commit 5e9676144bc3d9b186495a06d14581a4fc97beff) Change-Id: I37434f1ad44ed1fad41cf454291c91e0b046ec80 Reviewed-on: http://gerrit.openafs.org/3109 Tested-by: Derrick Brashear commit f14f8d45bcf3181f08971e6ed8d54bff48bbafe6 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 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 (cherry picked from commit ebfc586fd2d00085a384763cc519c2af6ce5223e) Change-Id: I6a107dc5a1a6d98823f5377657856ca41566cb2b Reviewed-on: http://gerrit.openafs.org/3108 Tested-by: Derrick Brashear commit 28f65219b409136e0bc66358f5711b32277baad2 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). Reviewed-on: http://gerrit.openafs.org/2985 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ffe445483a07c751202a1ef06136f70402ec895d) Change-Id: I918ed4acdcfecbe1f879746d80b501714f1e775f Reviewed-on: http://gerrit.openafs.org/3107 Tested-by: Derrick Brashear commit e3f8208e33c20713b8d0f61aa6af8f4dd96c359e 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" Reviewed-on: http://gerrit.openafs.org/2965 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0adb2d758c23e1c02d5894d2c534b685999d821c) Change-Id: I76449230243425c7f14df5ff9795bcdc3076fbdb Reviewed-on: http://gerrit.openafs.org/3106 commit 5728523ec8647d4e9ced717b5a79f34a670cd7c4 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. Reviewed-on: http://gerrit.openafs.org/2975 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 59927e20052c3f075e0269e46691bc94c3974f86) Change-Id: I0f4c548d450b3c1019ff9c013edbc967cafe6c24 Reviewed-on: http://gerrit.openafs.org/3105 Tested-by: Derrick Brashear commit 072c481194426d26b6d9f5ade108e6b3eff560d0 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 Reviewed-on: http://gerrit.openafs.org/2973 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ba96ebba7197420b1511bd1aae9db495398e038a) Change-Id: I3c98809bf8763c03a6f1c27e7ebe68ddb8ad1318 Reviewed-on: http://gerrit.openafs.org/3104 commit badfd710f7ae960a7b2e88b2cb80a2ef2aff4c8e 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. Reviewed-on: http://gerrit.openafs.org/2968 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a91da7a7b91ce0c4584092cd666eca89d39b8abf) Change-Id: Ie84351628fd112aa1724180a08dba10f0903a016 Reviewed-on: http://gerrit.openafs.org/3103 commit fb8a2049e355dc9a4cd6e7264a2d18d61447e2af 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. Reviewed-on: http://gerrit.openafs.org/2957 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 09aec1539dbe4e4c72ec7acadf2d25e6f93c5982) Change-Id: I589fa248a124a15248e23b6154e193e4d136fde8 Reviewed-on: http://gerrit.openafs.org/3102 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b740896e826b92b2678d1a21ec65f7911a384ce4 Author: Jeffrey Altman Date: Sun Sep 19 10:46:34 2010 -0700 Rx: Permit ADAPT_WINDOW code to build Add missing fields to rx data structures. Update variable references. Reviewed-on: http://gerrit.openafs.org/2783 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit be91260047627fb4fffeeed73c7f24c80448c673) Change-Id: I2f5db5cc88919e61d09d5d1dbbb2679c0b9d1415 Reviewed-on: http://gerrit.openafs.org/3101 commit 8d2dbb7a96ed41885dfdb90d672168fd41a31713 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: Ib9a0c65d91b4dc61c8d00381c8266b88b1d89b81 Reviewed-on: http://gerrit.openafs.org/2947 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7d6080a841ff8c91052fa708d5be3b582f8a971d) Reviewed-on: http://gerrit.openafs.org/3065 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 487dabb1b0ff41dd5bee0800c153248347fb723c 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. Reviewed-on: http://gerrit.openafs.org/2967 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 48aca4a605fa46b677a50687d6ea911fbe7d2032) Change-Id: I1496e5bff75deeb1210eac6fba8a9a7fe70c6e5f Reviewed-on: http://gerrit.openafs.org/3064 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 189b0b1ef2044d4212bbdb3f5a40dfdcde132ed6 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. Reviewed-on: http://gerrit.openafs.org/2971 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 198447ee71ca6510b760141395af5002daab2424) Change-Id: Ia0ef7444577a8fb6480302a080397ee8674245cd Reviewed-on: http://gerrit.openafs.org/3063 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9370454d45116111ec760a1c0fae4f55daace70c 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. Reviewed-on: http://gerrit.openafs.org/2970 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9577ec85c967ce4eb0c5a5ab45761a25da30038a) Change-Id: Idbd4e6521246e5f7133b4582181af856f0acc530 Reviewed-on: http://gerrit.openafs.org/3062 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 30957b0c37f7a52c8c893bcd9ee5dcbec41a7370 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. Reviewed-on: http://gerrit.openafs.org/2943 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6880d4a3a227f6c05332ef799123e0a05b190aa9) Change-Id: I3d6ef65eeff2e59d662cd7f406bd5b8c1d3b11c6 Reviewed-on: http://gerrit.openafs.org/3061 commit 86eeef8dd6ea6b52608535902c6d7f7a6761763e 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 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 (cherry picked from commit e279ae77a7e9babcace78b67c40ccc959161d77a) Change-Id: If61e12ea02d90980f2ec4b9503a26aff841161f6 Reviewed-on: http://gerrit.openafs.org/3060 commit 429c364e8c9e33eef8edab0c144c10105efac3f8 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. Reviewed-on: http://gerrit.openafs.org/2956 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e16d7b7d6a6980fbda3186a578fb7e26fc334194) Change-Id: Ib77ea09f2b2334ccae269a5e24519cd8b0f0875a Reviewed-on: http://gerrit.openafs.org/3059 Tested-by: Derrick Brashear commit 6edebf1d04350c082c4ededc168fbd69142eed56 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. Reviewed-on: http://gerrit.openafs.org/2962 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e95c8eaaf53dee68fe4db14acc0385a6bb84b992) Change-Id: Ieb534d407635e79d181156f7fa6c70b6b8477e93 Reviewed-on: http://gerrit.openafs.org/3058 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit efb46988c070bed9e558990a45bc7ffdeb35f79b 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 Reviewed-on: http://gerrit.openafs.org/2950 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7f742f45a2aaa9dcb400aa1dc35ce617876fe7fd) Change-Id: I7e58f35956be8f1acd4ebfbd407ddde6b8bcb136 Reviewed-on: http://gerrit.openafs.org/3057 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit d89a0dec2ae7d37c948c625367a144b82e1734d4 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. Reviewed-on: http://gerrit.openafs.org/2948 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a2888f6d405150933bc31d1470ca2426bdf77c50) Change-Id: I2443cced5105a0e31ffe04c156370b75e06ced97 Reviewed-on: http://gerrit.openafs.org/3056 Tested-by: Derrick Brashear commit f25752c7ad40829de2c55a6009be55464f284737 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. Reviewed-on: http://gerrit.openafs.org/2951 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 50b99f85cae778ab270590d1282fd9d84a0e6ca3) Change-Id: Ifde4220ea5f2f987b8e6f1fd3e4ba3ee93e31c8c Reviewed-on: http://gerrit.openafs.org/3055 commit 812fdcb982e05ade3507d2e72a006108e9dacd7d 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. Reviewed-on: http://gerrit.openafs.org/2940 Reviewed-by: Russ Allbery Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f1a0239fba5855c5fed418f057bd5397d412e907) Change-Id: Ib28e6f6ce9cced9d44cfccbb02c10289acd818e1 Reviewed-on: http://gerrit.openafs.org/3054 commit 8ef28051b242ec22121550a167e59964bc0a23ca 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. Reviewed-on: http://gerrit.openafs.org/2942 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c2ed2577f9c16df3088158fb593d7aab6e8690d0) Change-Id: I4479a8941b8c53aed1949134e171133d338919bb Reviewed-on: http://gerrit.openafs.org/3053 commit da73496ba698ee2cc3c008775622014278d07739 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 Reviewed-on: http://gerrit.openafs.org/2913 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 77456c07945659ff1254732aa8e428e6301e5ee6) Change-Id: I0de6b6cfe1598ae09471b25a506f34bfe577c2a7 Reviewed-on: http://gerrit.openafs.org/3052 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e29f391bded8b0ec097414300dbdebbd8f5ec0a2 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. 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 (cherry picked from commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9) Change-Id: I9042caf4364ce65704e3ddfde159be50d0c11c1b Reviewed-on: http://gerrit.openafs.org/3049 commit e7edf03db5451552e25e23ddceff50b7a2831433 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. Reviewed-on: http://gerrit.openafs.org/2914 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 51c761706a9945ab40d34b4212bd463fa617636e) Change-Id: I164fd4a1c4456ce6e8f7e90402d204cc1d2f84f3 Reviewed-on: http://gerrit.openafs.org/3051 Tested-by: Derrick Brashear commit 7b14d729bd03d231fb7c4b090aecff5f1aea9c9e 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. Reviewed-on: http://gerrit.openafs.org/2912 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 21e1bb9bb46b0e8e2523c3310ea8e602d2b07091) Change-Id: I88181baf4b4b5d0078593ffb27dedfd3f761db57 Reviewed-on: http://gerrit.openafs.org/3050 commit 4cd053a1604d667c0714ccb6c77c1073a3a509be 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. Reviewed-on: http://gerrit.openafs.org/2910 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d73bd5778a22f574a6f065a18f18d4379e9ffb4a) Change-Id: I34e4a08472573f8ad103df6c556e90838b68117b Reviewed-on: http://gerrit.openafs.org/3048 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8c25d98cce08280348b5d948758932ac2f56cc46 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 Reviewed-on: http://gerrit.openafs.org/2893 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 4803d50bdb8cdeae2c3f86b5c09e853573bc49eb) Change-Id: I5d26d0b0edbd5eb11345c4be937d7ff986f46855 Reviewed-on: http://gerrit.openafs.org/3047 Tested-by: Derrick Brashear commit 2dafa9b57b5e58f6d65c502dcb1ded87ae682ce5 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. Reviewed-on: http://gerrit.openafs.org/2731 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 9fed169b1c5c823fd96cea94daf712b2cf06c901) Change-Id: I2bb301084fa3d2433cd5bf5f8bfde3b1726f2fae Reviewed-on: http://gerrit.openafs.org/3046 Tested-by: Derrick Brashear commit e567a29f920ede89003b16e21bd739f9648683bc 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), ...) Reviewed-on: http://gerrit.openafs.org/2891 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 60c4b248893f80431b2ea2a5d558c3536f86611a) Change-Id: If507801c8df170a88044ff9c87b9a97c076ca222 Reviewed-on: http://gerrit.openafs.org/3045 commit 2b8a90ad216330e23ce87d8062a56e65f63124e6 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 Reviewed-on: http://gerrit.openafs.org/2887 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 565ab7aa8e751c06d03c3ab0034915572c29ef7c) Change-Id: Ie690178b7709851d1c7f75d6cb0353cddf1866ff Reviewed-on: http://gerrit.openafs.org/3044 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e496c0da54faf610a1b5963887bc679c8c615846 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 Reviewed-on: http://gerrit.openafs.org/2886 Tested-by: Jeffrey Altman Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 6ad0e5b529dbfd7a2401a0622eb4ea5269124ceb) Change-Id: I55e67817c019dceab045973171bd53db468dfc2c Reviewed-on: http://gerrit.openafs.org/3043 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit d906c07b147d9daa7995e564e4f81daf82d65575 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. Reviewed-on: http://gerrit.openafs.org/2881 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit b62cacf889a6a231a97951baad6594e4066880bd) Change-Id: Ieb4d8126477f9c8b293b8690a2e7f206de7ea92d Reviewed-on: http://gerrit.openafs.org/3042 commit 7ca2bb09472302c90be1d686e0f2e90c433d0924 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. Reviewed-on: http://gerrit.openafs.org/2871 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3cd3715e608b801b4848399e42cb47464e6e3cc3) Change-Id: I782e92935a04ce10b410b67043ea41fee262c1d5 Reviewed-on: http://gerrit.openafs.org/3041 commit 2dd3b7a8ec57580fb22eee22a9cbd67204b92135 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 Reviewed-on: http://gerrit.openafs.org/2877 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 12e6531f0079597280e1b3961738af55d682d3f5) Change-Id: Ia54818dddd693dfe5b41e8459f55453dd1c8361f Reviewed-on: http://gerrit.openafs.org/3040 commit 0991d6bed5b6656607bb57cdd419771ea94686f5 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 Reviewed-on: http://gerrit.openafs.org/2883 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 59e6ac8a5c354b746a4b984f4a10af91ebeef5f3) Change-Id: I20a902e9e3074334764954faf297200e5dc60b80 Reviewed-on: http://gerrit.openafs.org/3133 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 47d79237b6378a95907df110d96c262896779e61 Author: Jeffrey Altman Date: Thu Sep 16 14:23:41 2010 +0200 Windows: Negative Caching for Volume Lookups If a volume lookup returns VL_NOENT or VL_BADNAME, cache the negative response for five minutes. This prevents volume lookup storms caused by the same volume lookup being performed repeated during a short time period. This can happen if mount points to volumes that do not exist are present in a directory that is being evaluated by Windows Explorer or Common Control File Dialogs. This functionality is implemented by storing the most recent update time for the volume group as part of the cm_volume_t. A non-existing volume group is identified with a new CM_VOLUMEFLAG_NOEXIST flag. The presence of the lastUpdateTime value also permits volume location information to expire at lastUpdateTime + lifetime instead of expiring all volume information simultaneously each lifetime period. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/2771 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a00da7d2c9a66f1e5984ec2b3bd3efe10793e1c9) Change-Id: I3603e746a6df1834612647931cc09228428842db Reviewed-on: http://gerrit.openafs.org/3132 Tested-by: Derrick Brashear commit 22cae170a5babe36d56aa3a5a5503d15d28c297d 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" Reviewed-on: http://gerrit.openafs.org/2875 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0ecc90f3cd3f5a7c96b3689ab0c5f6a42edc3ed0) Change-Id: Ic85f7ea234a50935c5fad9804d459b6198902e4c Reviewed-on: http://gerrit.openafs.org/3038 Tested-by: Derrick Brashear commit 8d486ba36d09071998e11a46323120cb1feb6e33 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. Reviewed-on: http://gerrit.openafs.org/2759 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e04f17704a4ceb242ea0b01abd225f89fa0979e7) Change-Id: I86499a2d73dbcdf04445e9f4976ef81e8f2d24ab Reviewed-on: http://gerrit.openafs.org/3037 Tested-by: Derrick Brashear commit 0372a9f65dcd26519d4bb6b83ddddcbc0b3a4ebc 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) ... Reviewed-on: http://gerrit.openafs.org/2869 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 87e96c30e069a2379365c9947a311e700cf51c4d) Change-Id: Id46afcb341104795c8e206261a2b1dfac289f37b Reviewed-on: http://gerrit.openafs.org/2938 Tested-by: Derrick Brashear commit 9eb31d72809566d3b0484db7bb6a890daf6a06ec 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. Reviewed-on: http://gerrit.openafs.org/2874 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 2bcd9044f747315cc1ea00b8c63982307edcc6c7) Change-Id: If1b79a5659be16bdf056ae89af284eb47e82c4c7 Reviewed-on: http://gerrit.openafs.org/2937 commit 9823df261bac3c2e45584f5b1d4e0b6bd7cb9b14 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. Reviewed-on: http://gerrit.openafs.org/2650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7e12632cd2c8e07baa5e6c8aecd5311870771133) Change-Id: Ibe7da6f9916c1664050c28d136fe887b35a540ba Reviewed-on: http://gerrit.openafs.org/2936 commit 2d4bb5a38f8fba5a5899870359a39a3e892e2243 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. Reviewed-on: http://gerrit.openafs.org/2868 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 364691145698c8f9b87466cd9d9e2c54f8c6aaa9) Change-Id: Id9b143811a988095cda9d8f09b67732e3d18156b Reviewed-on: http://gerrit.openafs.org/2935 commit a6b7c5c0b5d843e0bda2c7f8ff6446374ea7e935 Author: Asanka Herath Date: Mon Aug 30 15:36:50 2010 -0400 Windows: Set NTDDI_VERSION when setting _WIN32_WINNT Reviewed-on: http://gerrit.openafs.org/2866 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e9fafac6cba6e024f08e8743d60b7853a2940ba2) Change-Id: I04ff519adef8f9050d29d3236a28a979bd6f734b Reviewed-on: http://gerrit.openafs.org/2934 Reviewed-by: Asanka Herath Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 89c018a72fe2528fd2c97d58d0d4396ef4bfed67 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. Reviewed-on: http://gerrit.openafs.org/2856 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit cbaef553978b7d81ba6d7b7721bcea97fe41870a) Change-Id: I64b315fdc2f6b33b2fe9690060c2f0cca0cc2ae6 Reviewed-on: http://gerrit.openafs.org/2933 Tested-by: Derrick Brashear commit 67dea45cead2cc9912b744bb5d0255c9e3807219 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. Reviewed-on: http://gerrit.openafs.org/2864 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 791b7a4c660ef468286eb6f51e66b4faa4bb6c7b) Change-Id: I6c58f2f08dafa5a0db98febde8f2fcb6781225e1 Reviewed-on: http://gerrit.openafs.org/2932 Tested-by: Derrick Brashear commit 0054458d07ee4304ad52d6ace68c742b1b8a68e8 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. Reviewed-on: http://gerrit.openafs.org/2857 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 50920c0384189a6c635ca58c38bf7c942c0446b2) Change-Id: I523afdacfc2a50239219d6d39cbea58ca22fee2e Reviewed-on: http://gerrit.openafs.org/2931 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c864ba58f49caf46a9e3be95135ada12eced174d 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 Reviewed-on: http://gerrit.openafs.org/2852 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0cac17105b632f495a8000a06a721e0bb163e2f4) Change-Id: I7aa9b2673359f374ecf4cf4c63eaa9ad9ed20171 Reviewed-on: http://gerrit.openafs.org/2930 commit 7243f91d1af01f0f45bfc2f086dd6435c71d016c 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() Reviewed-on: http://gerrit.openafs.org/2850 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9d790e18fadc318305b58809c0715c4e07c82b85) Change-Id: Ibfd1dd69024c00c08308d69315c6cf971a6e0932 Reviewed-on: http://gerrit.openafs.org/2929 commit ce0a56e3ac918f3195252a07a72e3afe62b9ecd0 Author: Marc Dionne Date: Fri Sep 10 20:40:56 2010 -0400 viced, tviced: Set but not used variables Remove or ifdef out some variables that are set but never used. Spotted by gcc 4.6 Reviewed-on: http://gerrit.openafs.org/2853 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a2de10a1705a88ef652f4489383801a15c938a12) Change-Id: Ic9186fd94a00445097af96e67eaeac1cc4b16915 Reviewed-on: http://gerrit.openafs.org/2928 Tested-by: Derrick Brashear commit 20c58aa2d0c501292415612eef725eab7e7f4b3c Author: Marc Dionne Date: Sat Sep 25 15:28:37 2010 -0400 tubik: minor Makefile cleanups Rework the install targets for udebug to avoid warnings in the case where afssrvbindir = bindir Remove commented out compile line for udebug Reviewed-on: http://gerrit.openafs.org/2851 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit e6c9cf2466e849753db99b48b0da26665ef0a0e3) Change-Id: Iab023770f7d28f2e8b205ae5572d12e2c14dd742 Reviewed-on: http://gerrit.openafs.org/2927 Tested-by: Derrick Brashear commit fec331439faeba9fbc92d81300bcda655cb300e9 Author: Simon Wilkinson Date: Mon Sep 27 11:47:51 2010 +0100 rxperf: Really set UDP buffer size On Unix, the UDP buffer size has to be set before we open any sockets. Otherwise, the default (64k) buffer size is used and never changed. Move the calls to SetUdpBufSize in rxperf.c so that the -u command line option actually has an effect. Reviewed-on: http://gerrit.openafs.org/2855 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e23f3ae22f11433713860b37b89a94b12fd70e8d) Change-Id: I11dbe7bef29cb1ef105f831b5909f9a611385efb Reviewed-on: http://gerrit.openafs.org/2926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5b4e1b9618502092ada077905398d0ed1435602f Author: Simon Wilkinson Date: Sun Sep 26 15:20:22 2010 +0100 Fix rxperf so that it works with pthreads *) Don't allocate 512K on the stack *) Don't pass stack allocated data into pthread_create() Reviewed-on: http://gerrit.openafs.org/2854 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8c0498699366f7e40253d00604da3d9043b32851) Change-Id: Iadf2c5512e50aa3f10ee583dddfe5d580e0542bf Reviewed-on: http://gerrit.openafs.org/2925 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0813ec725e6e3820159237dfcc9a848383f865aa Author: Russ Allbery Date: Sat Sep 25 16:42:57 2010 -0700 Update Debian packaging to 1.5.77-2 release Contains DKMS robustness fixes, improvements to the defaults for the module build, and cleanup of the openafs-client init script. Updates the build system for the new demand-attach binary naming and for the changes to supported configure options. Fixes some issues with afs-newcell. Forces disabling of the Linux syscall probing in kernel module builds, since no supported Debian kernel allows this and it causes problems. Update debhelper to V8, which allows simplification of debian/rules and debian/module/rules. Reviewed-on: http://gerrit.openafs.org/2849 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7d272f05059a4b467ee41a2a0d8781e9f9c4c250) Change-Id: Ic0468c79db043651889b2a9b2e18b0246acf7c71 Reviewed-on: http://gerrit.openafs.org/2924 commit 59667ab5d2aba473312872169feb6c9373c488f5 Author: Michael Meffie Date: Thu Sep 23 10:15:57 2010 -0400 scout: display fetch and store counts as unsigned Fetches and stores are already defined as unsigned, so format them as unsigned values when displaying in scout. This fixes the bug where scout shows those counts as negative values on busy servers which have been running for a while. Reviewed-on: http://gerrit.openafs.org/2843 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e28bb036b85ea90c0ecf8d52a17043374c1fef3a) Change-Id: If4d0a72b94e743dd336f31b4c21da7e68f800f11 Reviewed-on: http://gerrit.openafs.org/2923 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f74abfb4d0b8d354a0ce3abf60c4da6e0ac4e14c Author: Simon Wilkinson Date: Thu Sep 23 17:41:47 2010 +0100 rx: Big windows make us sad The commit which took our Window size to 128 caused rxperf to run 40 times slower than before. All of the recent rx improvements have reduced this to being around 2x slower than before, but we're still not ready for large window sizes. As 1.6 is nearing release, reset back to the old, fast, window size of 32. We can revist this as further performance improvements and restructuring happen on master. Reviewed-on: http://gerrit.openafs.org/2844 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a99e616d445d8b713934194ded2e23fe20777f9a) Change-Id: I6080c69ba51c8743b8c48bf0e0b7dd481185688d Reviewed-on: http://gerrit.openafs.org/2922 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 96ad6896b45ef3a5dee411d38cba700b8c51f284 Author: Simon Wilkinson Date: Thu Sep 23 15:01:58 2010 +0100 libafsrpc depends on rxstat and fsint ... in the same way as shlibafsrpc Reviewed-on: http://gerrit.openafs.org/2842 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4884de5bc8b5a984eeb5927685308874296e88b8) Change-Id: Iad2820d94c42c4f43fa22803680bfd56221fa97b Reviewed-on: http://gerrit.openafs.org/2921 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 588b00f7714648b50b0c4dbc7644022527ed1f63 Author: Simon Wilkinson Date: Thu Sep 23 10:42:25 2010 +0100 rxperf: Add build rules to build a pthreaded version The pthreaded version of rxperf is much more interesting than the LWP one now, so add some rules so that Unix can play with it too. Reviewed-on: http://gerrit.openafs.org/2841 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c21c90515ac37862a6002441790a721489fa89a8) Change-Id: Ie8c26191e6d7603dcd6a99ef9938efb33dea1e33 Reviewed-on: http://gerrit.openafs.org/2920 commit 8b9e96e0d1a4037464f6452f1213c66dfb390101 Author: Simon Wilkinson Date: Thu Sep 23 10:40:02 2010 +0100 rxperf: Fix the Unix build again Fix the Unix build of rxperf again Reviewed-on: http://gerrit.openafs.org/2840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c87377834701195fe98d75ad34324bc1748e13a0) Change-Id: I50f7a69e1f88ca814d7d9b508464cb49da6231f7 Reviewed-on: http://gerrit.openafs.org/2919 commit 3b1a9ce2124e2db6146465ae39e887929388a628 Author: Simon Wilkinson Date: Fri Sep 17 22:03:20 2010 +0100 tests: Fix objdir builds Fix the tests so that they work when we have a separate build directory. Reviewed-on: http://gerrit.openafs.org/2828 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 259cca4050102e98ade929cc648a69d9f57c07fa) Change-Id: I5ba19639a8146af23a377bbfd2bfe0cf0911c0ea Reviewed-on: http://gerrit.openafs.org/2918 commit e67d4684eef4a83f1ac8dc064d348de62ffe0a39 Author: Jeffrey Altman Date: Wed Sep 22 16:28:48 2010 -0700 Additional functionality for rxperf Add the ability to initiate multiple pthread threads issuing calls on the same connection to the server. Add ability to set max window size. Add ability to adjust min peer timeout. Reviewed-on: http://gerrit.openafs.org/2835 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9a6dca070733dd5065c37cd044a3d2ded2268b14) Change-Id: Ifeb786f3f7bf2433ff6f5729773a7e4794511cd6 Reviewed-on: http://gerrit.openafs.org/2917 commit f7ceeac38bf9aa728e23fe529f7b1b8f3e55e60a Author: Simon Wilkinson Date: Wed Sep 22 19:50:47 2010 +0100 rxperf: Fix so it builds on Unix Fix assorted errors in the rxperf utility so that it will build on Unix. Reviewed-on: http://gerrit.openafs.org/2834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a10f644fd21482559039f79e4a14fd39a83f6f9b) (cherry picked from commit a421dbb79a96e6ac4ca004c6b65ace313c340c3f) Change-Id: I80532b781fe758112718ab8d5b268e4005d4376d Reviewed-on: http://gerrit.openafs.org/2916 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 35293ae2700e1f5179d6ef95ab14d2e02041e6ac Author: Simon Wilkinson Date: Wed Sep 22 17:33:26 2010 +0100 rxkad: Make the test suite build again Make the rxkad stress test suite build again. Reviewed-on: http://gerrit.openafs.org/2832 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d17adc30027d795068504dc736dac849ed42a884) Change-Id: I388a7bf87f402cee02695aab4c8d309589995648 Reviewed-on: http://gerrit.openafs.org/2915 commit 8815bf3992004211d18f5c074a010e4e28521e6d Author: Jeffrey Altman Date: Mon Sep 20 10:02:18 2010 -0700 Rx: Permit MakeDebugCall() be be compiled when RXDEBUG is undefined If MAKEDEBUGCALL is defined, build MakeDebugCall() even if RXDEBUG is not defined. Change-Id: I98d3216e8bf1e1f3b6b62c962d33db316d0f51ac Reviewed-on: http://gerrit.openafs.org/2818 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ed25a920232cb659c2997c91c5bc92a659ff163a) Reviewed-on: http://gerrit.openafs.org/2823 Tested-by: Derrick Brashear commit a6e4aac08f5d31ae3a20491be2d54883ccb41649 Author: Jeffrey Altman Date: Mon Sep 20 05:07:08 2010 -0700 Rx: Change minimum peer timeout to 2ms The previous value, 350ms, is historical. Now that networks are so much faster, an artificially high timeout value when backed off results in an extremely long delay before communication can resume. Change-Id: I6207fb3e5c26a36704abc1f9210af53e0ff1fae6 Reviewed-on: http://gerrit.openafs.org/2815 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c77f2f1369fead87acb440134213ebf6d23f8fd7) Reviewed-on: http://gerrit.openafs.org/2824 Tested-by: Derrick Brashear commit e57578c1d4945c63eb63897e08b983aa596a55a1 Author: Jeffrey Altman Date: Mon Sep 20 05:11:20 2010 -0700 Rx: Do not hold call lock across memcpy in rx_ReadProc/rx_WriteProc 1.4.x does not hold the call lock across memcpy operations in rx_ReadProc, rx_ReadProc32, rx_WriteProc, rx_WriteProc32. The claim is that the call curpos, curlen, and nLeft fields which refer to the current packet being processed will not be touched by any other thread. Therefore it is safe to drop the call lock to permit another thread to add packets to the call while the memcpy is performed in parallel. This patchset continues to hold the call lock longer than the original implementation but does drop it for the length of time it takes to copy data from the packet buffer to the application buffer. Change-Id: I87dacdf541ba50db80ab55e500b38edab5126dc2 Reviewed-on: http://gerrit.openafs.org/2817 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e197c19cedaafa0d2bb59212fb171083f2140041) Reviewed-on: http://gerrit.openafs.org/2822 commit 2373bef5cce4e93435174149a3e56067e4420b02 Author: Jeffrey Altman Date: Mon Sep 20 05:10:22 2010 -0700 Rx: Permit udp buffer size to be set in rxperf Change-Id: I4680e038e2965ca8bc13f76955b85e924435c6af Reviewed-on: http://gerrit.openafs.org/2816 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7b9607639816b19fdf1b70b4c04ba984f9bf3613) Reviewed-on: http://gerrit.openafs.org/2821 commit 25a0b9f2921aa26ca7247a97db5dbe7bace7ad49 Author: Jeffrey Altman Date: Sun Sep 19 09:17:08 2010 -0700 Windows: Export additional RX debugging variables from afsrpc.dll Export rxi_nRecvFrags @2008 DATA rxi_nSendFrags @2009 DATA rx_initReceiveWindow @2010 DATA rx_initSendWindow @2011 DATA rx_intentionallyDroppedPacketsPer100 @2012 DATA rx_intentionallyDroppedOnReadPer100 @2013 DATA so they can be referenced from pthreaded builds of src/rx/test tools. Exported variables must be present in both FREE and CHECKED builds. Change-Id: Ia7f3ee0143679bab1ce74f71dc3a996cda1f18a8 Reviewed-on: http://gerrit.openafs.org/2779 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7ee80a853cebc472d9d9664dbfcccadd1d49d5fc) Reviewed-on: http://gerrit.openafs.org/2814 commit bd9f7b125fcb1f2dff350f38e57ec04c256004b1 Author: Jeffrey Altman Date: Sun Sep 19 09:14:06 2010 -0700 Rx: PrintTheseStats should not be dependent on RXDEBUG When RXDEBUG is not defined, PrintTheseStats generates an error even though the statistics are in fact available. The global variable rx_packetTypes was not being defined without RXDEBUG. Make rx_packetTypes defined always and permit statistics to always be printed. Change-Id: Ife708d34b5d56374c8aff9aa7c941d39b37ca4a1 Reviewed-on: http://gerrit.openafs.org/2778 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f1183f16285be040b7150414c9563a9bceb53210) Reviewed-on: http://gerrit.openafs.org/2813 Reviewed-by: Rod Widdowson commit e7bd67e5bd700b502f47a7c82bb19b4ad98f7dab Author: Jeffrey Altman Date: Sun Sep 19 09:08:42 2010 -0700 Rx: move TSFPQ prototypes from rx_globals.h to rx_protoypes.h Function prototypes belong in rx_prototypes.h not in rx_globals.h. Remove EXT macro from function prototypes as functions do not require special treatment in order to be exported by a DLL on Windows. Change-Id: Ieb617db634f2cfa57410e77e276c703311304547 Reviewed-on: http://gerrit.openafs.org/2777 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 00afdbed0ff474aaf45a49b157843af9cb8483ad) Reviewed-on: http://gerrit.openafs.org/2812 Reviewed-by: Rod Widdowson commit 36ce1b03e4d9a01f7a128b2deabf03b4ace4ecf0 Author: Jeffrey Altman Date: Sun Sep 19 09:03:39 2010 -0700 Rx: properly compute dataPacketsReSent statistic The global dataPacketsReSent statistic should be the sum of all peer->reSends and dataPacketsSent should not include the count of resent packets. Prior to this patchset, dataPacketsSent included the resent packets and dataPacketsReSent was computed as the number of requests for Ack instead of the number of packets resent. Change-Id: I969003f7ec1805d09c14ac342453f86fdb5df99a Reviewed-on: http://gerrit.openafs.org/2776 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8549ebe0a81ac9a526d13f96ba63e048d8b77aa7) Reviewed-on: http://gerrit.openafs.org/2811 commit 88168412f37514338b55daebf9fa16742d6bfd3f Author: Jeffrey Altman Date: Sun Sep 19 09:00:57 2010 -0700 Rx: always use tservice variable in rxi_ServerProc Since tservice has been assigned to call->conn->service, use it instead of call->conn->service when calling executeRequestProc(call) Change-Id: Id26c4c63f054bcd1e3ef5349900c910e3c9cf2be Reviewed-on: http://gerrit.openafs.org/2775 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 72cadfd86a0efc0079639671d613005ff403ccc4) Reviewed-on: http://gerrit.openafs.org/2810 commit ffaf0a53adf1b39bf3796f778c4e6e712ae2ea84 Author: Jeffrey Altman Date: Sun Sep 19 08:57:02 2010 -0700 Windows: Release builds of Rx should be lean and mean Only build checked builds of Rx with -DRXDEBUG -DRXDEBUG_PACKET -DRX_TRACK_PACKETS -DRX_REFCOUNT_CHECK Change-Id: Ib4666d30b1e48eca172331353d9e376b2516f183 Reviewed-on: http://gerrit.openafs.org/2774 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e77c7be7537cbcbee77a297b5b52a6287462462f) Reviewed-on: http://gerrit.openafs.org/2809 Reviewed-by: Rod Widdowson Tested-by: Derrick Brashear commit e1f1286dc264e186bf3c9ced5b41d7298ed954ad Author: Jeffrey Altman Date: Sun Sep 19 19:48:57 2010 -0700 Rx: Only backoff the peer timeout once If a packet is missing, the peer timeout is backed off to provide a new starting point for timeout computation. The backoff state must be stored in the peer object to ensure that multiple failures do not result in more than one backoff before a successfully received packet is available for recomputation. Change-Id: I6794b3a020801ff421e4ed776afb581962b111a9 Reviewed-on: http://gerrit.openafs.org/2787 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3b4cad3b78ec5df7253067c70e19c066552d7145) Reviewed-on: http://gerrit.openafs.org/2808 commit 6a8e622bbec9fd6263d621669208e26f88339391 Author: Jeffrey Altman Date: Sun Sep 19 09:47:37 2010 -0700 Rx: only compute peer bytes sent and received if rx_stats_active Computing the bytes sent and received is an expensive operation. If rx statistics collection has been disabled we should not collect the peer data. The most expensive operation is the rx_FindPeer() call that is performed during rxi_ReadPacket(). rxi_ReadPacket() is processed by the rx listener thread which must be as fast as possible. Change-Id: I5403c88aa85f9049fe50a9c1f3dbaad7d8b802bd Reviewed-on: http://gerrit.openafs.org/2782 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7d16c8b84ac8cc0251231819bfb0eefc2040322a) Reviewed-on: http://gerrit.openafs.org/2807 commit ada57bb70e23fbb5ee52dd456b33c8cdd41885ff Author: Jeffrey Altman Date: Sun Sep 19 09:35:03 2010 -0700 Rx: avoid lock churn in rxi_ReceiveAckPacket rxi_ReceiveAckPacket can acquire and drop the conn_data_lock several times and acquires and drops the peer_lock unnecessarily. This patchset adds a variable to track whether the conn_data_lock is held in order to avoid the need to drop it and reacquire it based upon conditional operations. It also relocates the peer->maxPacketSize computations in order to consolidate the work performed under the peer_lock. Change-Id: I0bc9e42e8ef198a04315f9f2df529073ce9dfd03 Reviewed-on: http://gerrit.openafs.org/2781 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c59ce29602086f795d5fbaef6a5f88fae9dd2dea) Reviewed-on: http://gerrit.openafs.org/2806 commit 16ab9e71926790ef19b5f6695f312ceb01d9e884 Author: Jeffrey Altman Date: Sun Sep 19 08:28:21 2010 -0700 Rx: Build rxperf test application on Windows rxperf made assumptions that it was built against LWP, used buffer sizes for read/write that were too small, made use of non-portable types, and set signal handlers that are unsupported. Change-Id: I55515cac0f441116df7fd0aaf100fb3ae99b220f Reviewed-on: http://gerrit.openafs.org/2773 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 449976acd54ff46fd6cdb9a6e12acf3789665bcf) Reviewed-on: http://gerrit.openafs.org/2805 commit d36d8cb4254889606416416f12fd5e5352984334 Author: Jeffrey Altman Date: Sun Sep 19 08:03:50 2010 -0700 Rx: Move rxperf test application to src/rx/tests rxperf is a test application. Move it to the tests directory Change-Id: I946a8026760d860667ea5707d8a3e0d3b895d908 Reviewed-on: http://gerrit.openafs.org/2772 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5c3a1ed88de16db4c2081bbf1a4e397ce459bcf3) Reviewed-on: http://gerrit.openafs.org/2804 Tested-by: Derrick Brashear commit 430cefbeac69be2489c512d9a3482b256344906f Author: Jeffrey Altman Date: Sun Sep 19 09:20:01 2010 -0700 Rx: cleanup testclient and testserver test applications Permit testclient and testserver to be built on Windows as pthreaded applications. Remove warnings. Fix prototypes. Remove variable declarations for rx library variables defined in rx_globals.h. Increase the buffer sizes. Disable use of packet dropping when the library is built without RXDEBUG. Change-Id: Ic8483eb64cbed4958baf8fd054e01c7c40832599 Reviewed-on: http://gerrit.openafs.org/2780 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7ded3209a2fbd8d0108f9322d708551e93b6ef76) Reviewed-on: http://gerrit.openafs.org/2803 Tested-by: Derrick Brashear commit ade14eedf35ac8912dee130c5d6c706cf5efe7f8 Author: Simon Wilkinson Date: Sun Sep 12 12:07:59 2010 +0100 Linux: print after BUG() is pretty useless Calling BUG() panics the machine, so having a print statement with further debugging information after it doesn't help much. Swap the ordering, so we at least see the message. Change-Id: I3aa3b8ba5faaa40cef7bb046093b322212eea2b8 Reviewed-on: http://gerrit.openafs.org/2754 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ff100901e0da8d236c7ae8b4d478600146d8f182) Reviewed-on: http://gerrit.openafs.org/2802 commit 1ac380b0d39fc0a4657ff134b0ef2d9bb63af3f1 Author: Andrew Deason Date: Wed Sep 15 12:19:33 2010 -0400 libafs: Fix pioctl get/putInt alignment issues We don't know if the buffer for pioctl data is aligned to anything, so we can't just dereference the given pointer as an int or anything else. So, just memcpy the data in for ints and such; conveniently, afs_pd_getBytes and afs_pd_putBytes can do this for us, so just use that. Change-Id: Id1abdae55308db6fe1e13f541a5d776daa6af934 Reviewed-on: http://gerrit.openafs.org/2763 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8fd83543b60aefb4b7c5a0116d1538a89f58bbb3) Reviewed-on: http://gerrit.openafs.org/2801 Tested-by: Derrick Brashear commit cb978ebcb68bf490e86e0f93de48b6119bae39ed Author: Marc Dionne Date: Fri Sep 10 19:55:39 2010 -0400 vlserver: Set but not used variables Remove some variables that are set but never used in the vlserver directory: - n1,n2,n3 and n4 in vlclient.c appear to have never been used even in the original IBM code - some variables in vldb_check.c that are no longer used after some recent changes Spotted by gcc 4.6 Change-Id: Icd9e7da151b3a485c917ed5bd99eb26998dfa818 Reviewed-on: http://gerrit.openafs.org/2784 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ee3538218d342bb74ab849763421b9ec075251b3) Reviewed-on: http://gerrit.openafs.org/2800 Tested-by: Derrick Brashear commit 3bbcfde65e30581b2d5c66d3a1592fe942581cf7 Author: Andrew Deason Date: Tue Sep 14 12:15:22 2010 -0400 volser: Delete timed-out temporary volumes When a transaction times out on a volume, delete the volume if it is a temporary volume (destroyMe is set). This prevents half-created volumes from accumulating, which can take up space and screw up certain vol ops in some versions. Change-Id: I94e9adc767b84a2a32d980f508af33b823560950 Reviewed-on: http://gerrit.openafs.org/2760 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit bc56f5cc97a982ee29219e6f258b372dbfe1a020) Reviewed-on: http://gerrit.openafs.org/2799 commit 33139547312eb8e70650ba02034fc21d52e53ab2 Author: Marc Dionne Date: Sat Sep 11 13:23:11 2010 -0400 butc: Set but unused variables Remove unused variable taskId writeData() systematically returns 0, so make it void and adapt call sites that assigned the return value but never used it. Also move the function up in the file to avoid the need for a forward declaration, and make it static since it's only used here. Spotted by gcc 4.6 Change-Id: I2f61c0395796498175f2cb9131066b00657f99a7 Reviewed-on: http://gerrit.openafs.org/2785 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f1796b0f4ad0202ad32e06bb849f443984cf22b5) Reviewed-on: http://gerrit.openafs.org/2798 Tested-by: Derrick Brashear commit bfd269535f032dce04c0769ac2ca97ca3753fcf9 Author: Marc Dionne Date: Thu Jul 1 11:38:20 2010 -0400 Linux: normalize error return for emulated syscalls pagsh and other code expect setpag() and pioctl() to behave like a regular syscall or pioctl, that is to return -1 on error, with errno set to the specific error code. On Linux, the underlying emulation does a straight return of any error code it gets from the ioctl, and errors are not properly caught by the callers. As an example, pagsh won't detect an error from setpag such as exceeding a keyring quota limit. With this patch, the user will see this: $ pagsh setpag: Disk quota exceeded sh-4.1$ The code in proc_afs_syscall is modified to set errno to the error code and to set errorcode to -1 in case of error. proc_afs_sycall is reindented while we're changing code there. FIXES 126230 Change-Id: I945f2d28eb0ae26c7f42502c90eb2e6e95c29a58 Reviewed-on: http://gerrit.openafs.org/2770 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0bc837f68a72ba1f75d940cc5dd057774d9f36bb) Reviewed-on: http://gerrit.openafs.org/2797 commit b83ceefb2dffd082d3f7cc5b40e2d202f161ff65 Author: Derrick Brashear Date: Wed Sep 15 04:26:13 2010 -0400 disable Rx packet tracking minimize the impact of Rx packet tracking. in particular, do no extra queue scans, which means the rest of the state which tracks where a packet is now isn't of use. make it possible to re-enable. Change-Id: I5b9ed039a0394edcea48bb46729cd2ce2f71d4b9 Reviewed-on: http://gerrit.openafs.org/2762 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4bbf0dae237e01127f4d1a4d913f00e8dad859a3) Reviewed-on: http://gerrit.openafs.org/2796 Tested-by: Derrick Brashear commit e18a8f62065ffa7b2ca49d7b4baabd7d7ba92555 Author: Marc Dionne Date: Sat Sep 11 10:46:50 2010 -0400 Always check return code from iod_Write The return code from iod_Write is checked at every call site in the file, except this one. Check it, and return VOLSERDUMPERROR if appropriate. Spotted by a set but unused warning from gcc 4.6 Change-Id: I84f38a4b3b1e37c25be9c76702b0d2818058454e Reviewed-on: http://gerrit.openafs.org/2733 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e0708617b8f5df625b6ad62920665e704f1374f7) Reviewed-on: http://gerrit.openafs.org/2795 commit db86d1a9767213b0cf64e366f1086c71656fc55f Author: Marc Dionne Date: Sat Sep 11 14:57:17 2010 -0400 rx: Set but not used variables Remove some unused variables in the rx code. These generate warnings with gcc 4.6. Change-Id: I1e19c82cd05bcd47a65d77079019f1f0b6704826 Reviewed-on: http://gerrit.openafs.org/2732 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a8cf472fd1723fa0e5f4edc34e470443c941f017) Reviewed-on: http://gerrit.openafs.org/2794 commit 0b80be05c2adcb765e7e4cf1a8a63e772609e428 Author: Simon Wilkinson Date: Wed Sep 8 08:24:55 2010 +0100 Ignore *.dSYM files in working directory Failed Mac OS X debugging builds leave *.dSYM directories lying around the tree, which just litter the contents of "git status". So, ignore them. Change-Id: Ic2b79f299d724b770bf83cb24f2aac7c4063efdb Reviewed-on: http://gerrit.openafs.org/2744 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 290204c6e92d61c5b12b90d09e8202731caa0400) Reviewed-on: http://gerrit.openafs.org/2793 commit 02f39f7b168cae20117a56dd0dbf4eeaa87b3bcc Author: Simon Wilkinson Date: Wed Sep 8 08:22:57 2010 +0100 Add config.log to gitignore globally When you end up explicitly regenerating chosen Makefiles by running ../../config.status Makefile, the working tree ends up littered with config.log files. Currently, we only ignore config.log in the top directory - extend this so that it's ignored across the tree. Change-Id: If3cfec82fbf78e97ee769b36315ba23dcfe8a950 Reviewed-on: http://gerrit.openafs.org/2743 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4a353545c3f0e91cc85d7feb379997a1eda9f6e3) Reviewed-on: http://gerrit.openafs.org/2792 commit 3eb62601471b44ebb6ed5e06945681c2eb320736 Author: Simon Wilkinson Date: Wed Sep 1 11:09:46 2010 +0100 RX: Make the sample client and server build Make the RX sample client and server build again Change-Id: I81ce12eadcb4150dd503e41f9a7fd1a850d31a11 Reviewed-on: http://gerrit.openafs.org/2737 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 71171262602d7f261adbffd5047266e94c4a6f92) Reviewed-on: http://gerrit.openafs.org/2791 commit e106ac54b7f5dba4bb94f6920ed345a6e0c049af Author: Simon Wilkinson Date: Sat Sep 11 08:25:15 2010 +0100 vlserver: Use com_err for Ubik error messages Use com_err to return a sensible string, rather than just an error code, for errors with Ubik initialisation. This has the specific benefit that the error when the database directory doesn't exist, or isn't readable, becomes Ubik init failed: file not found when processing dbase" rather than Ubik init failed with code 5382 Change-Id: I5f770377668a7f545cad7e422f28afd7c9f9888d Reviewed-on: http://gerrit.openafs.org/2735 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6380213d296c138349c77fa4a51655fac23cfeea) Reviewed-on: http://gerrit.openafs.org/2790 commit fb5c2b4c1f05743f392890b6b2b90fe94e8df599 Author: Marc Dionne Date: Thu Sep 9 21:02:05 2010 -0400 Warning fix for gcc 4.5 "operation may be undefined" warnings The inc_header_word and set_header_word macros make repeated use of their argument, which triggers many (~30) warnings with gcc 4.5, like this one: ./ptutils.c:473:6: warning: operation on ‘cheader.foreigncount’ may be undefined Removing the cast to afs_int32 in the macros gets rid of the warning, and should be safe since we're just getting a small positive integer value - the offset of the member in the structure - and passing it to the pr_Write function which expects an afs_int32. Change-Id: Ie493520f874cddbb4b7f9f7ebe4b3922a848d0d0 Reviewed-on: http://gerrit.openafs.org/2729 Tested-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d69914a5f0580f8048072d3b734558ea5b7b2df5) Reviewed-on: http://gerrit.openafs.org/2789 Tested-by: Derrick Brashear commit a16b1119b870a8f7e968ea1ae71ee950e2adbf78 Author: Michael Meffie Date: Thu Sep 9 15:22:29 2010 -0400 manpage correction for restorevol -file option The restorevol -file option specifies which file to read. Change-Id: I5c03eaaf8bf82fc6d3fb83ff08e8278257e7b65f Reviewed-on: http://gerrit.openafs.org/2728 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 92ff0028f2e6a2f24dd5369f9b31e9852bf92abc) Reviewed-on: http://gerrit.openafs.org/2788 commit e36b4e0068b602d37e215430a2a576033dfb97b4 Author: Russ Allbery Date: Tue Sep 21 14:11:53 2010 -0700 Update bos create man page for new naming of demand-attach binaries The demand-attach fileserver binaries now have a "da" prefix. Adjust the documentation in the man page for bos create accordingly, and add the new binaries to SEE ALSO. Change-Id: Ib70bad87aaf8bfc483ffbfe402db01c178e6c4e4 Reviewed-on: http://gerrit.openafs.org/2830 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 82b7327b5ba66c6ddbc898ad383b4e5f2b08ec38) Reviewed-on: http://gerrit.openafs.org/2845 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit a2cf6b8d9f7a95b6195302ed68e7c4bbbdb38169 Author: Russ Allbery Date: Tue Sep 21 16:45:53 2010 -0700 Fix POD errors in fileserver and dasalvager Fix missing newlines before =back commands. Change-Id: If8e65c94f48c271c37c1b4bbec1b17d383c8375d Reviewed-on: http://gerrit.openafs.org/2831 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 10281b5be240707ed2eb75bdb68d9d23ff0011c8) Reviewed-on: http://gerrit.openafs.org/2846 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit f7f366d0ee20c58f97b771b96217875e0ec59bee Author: Russ Allbery Date: Wed Sep 22 16:34:42 2010 -0700 Link dafssync-debug(8) to fssync-debug(8) The two commands are documented identically for right now, so just link the dafssync-debug man page to the fssync-debug man page. Remove the incorrect statement in the man page that fssync-debug only works with demand-attach. FIXES 128166 Change-Id: I812641ad7a345c7f5412c3c97ed1ba393e981639 Reviewed-on: http://gerrit.openafs.org/2836 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 68d074d8aa98e76fb85289c69300d17695b98d0b) Reviewed-on: http://gerrit.openafs.org/2847 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit ca2a73638f124f6bd65bac56bed8f96b1bd1d03a Author: Simon Wilkinson Date: Thu Sep 23 08:58:21 2010 +0100 libuafs: Don't #define user libuafs used to #define user to usr_user, so that any references to 'struct user' would become 'struct usr_user'. However, none of the kernel code uses struct user, and this #define conflicts with the definitions in sys/user.h on Linux. So, just remove it. Thanks to Russ Allbery for the original problem report. Change-Id: I7868c8ddade2df626f5ecae597144641dfc551b7 Reviewed-on: http://gerrit.openafs.org/2838 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 200a9947f548eb7158e92de62ddaa76fcfe4ba46) Reviewed-on: http://gerrit.openafs.org/2839 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit c12a6ec003fef78ed869bb92e384dfacf02add98 Author: Russ Allbery Date: Mon Sep 20 14:19:11 2010 -0700 Add NEWS entries for OpenAFS 1.5.77 and 1.5.76 Based on the public announcement for 1.5.77. Change-Id: Ic368e16e16b03a79de6196a2e355eca0f420de77 Reviewed-on: http://gerrit.openafs.org/2819 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0a9e57c45e4412d9dac7050d693a22044ddc1d0f) Reviewed-on: http://gerrit.openafs.org/2820 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 9faff2047e738445b66ed14dcc843d00ecfa26e9 Author: Steve Simmons Date: Tue Sep 7 17:38:27 2010 -0400 Add new file src/venus/cacheout to things that should be ignored. Reviewed-on: http://gerrit.openafs.org/2719 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 41acfb91fa7fefae1f9a69aadc187a1403ec5827) Change-Id: I0d95c9f63a20814fbb882db0b8c063e179d62b9c Reviewed-on: http://gerrit.openafs.org/2722 commit dbd2e6c12057de7eccd09a05a5712f196157b322 Author: Derrick Brashear Date: Tue Sep 7 14:40:53 2010 -0400 openafs 1.5.77 make 1.5.77 in various places we need it Change-Id: Ic7e487ce76f86f50d2565e75a3b2f7642ecadd87 Reviewed-on: http://gerrit.openafs.org/2713 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fba7087c981b01d37ecce3d0a1645fa7ebdf6779 Author: Derrick Brashear Date: Tue Sep 7 20:31:20 2010 -0400 ubik recovery and remote use correct file number the file propagation "out of band" changes should not hardcode recovery on file 0, but instead work on any file the interface is acting on. use the provided file number. Reviewed-on: http://gerrit.openafs.org/2715 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f8ff458ef02d5ef49bc467304e40571d871385c8) Change-Id: I2cf324c9759f9878c5b37603480a9c803c041641 Reviewed-on: http://gerrit.openafs.org/2717 commit fce40951d4e3fc586e5e7bca545c1b4c6adbff04 Author: Jeffrey Altman Date: Tue Sep 7 14:35:22 2010 -0400 Windows: 1.5.77 Change Log summary Change-Id: Ic0362956470ddb76fac64d21927b3e51b7980ea6 Reviewed-on: http://gerrit.openafs.org/2710 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 99811e3e5faf5917975d7ec3c3d16e2ed9a5bf50) Reviewed-on: http://gerrit.openafs.org/2712 commit cb498f02f7bc90dab005c478033413eedca27478 Author: Jeffrey Altman Date: Fri Sep 3 00:02:17 2010 -0400 Windows: revise NTSTATUS response for ALLBUSY, ALLOFFLINE, and ALLDOWN Replace STATUS_IO_TIMEOUT with RPC_NT_SERVER_TOO_BUSY for CM_ERROR_ALLBUSY. Replace STATUS_PATH_NOT_FOUND with RPC_NT_SERVER_UNAVAILABLE for CM_ERROR_ALLOFFLINE and CM_ERROR_ALLBUSY. These errors provide a more meaningful message to end users when a failure occurs. LICENSE MIT Change-Id: I34483f8f696285477fa0f8a8dac3b0ff33dee6b4 Reviewed-on: http://gerrit.openafs.org/2663 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit de441ba420b8fc38ce1b36bee06097f21cc6514b) Reviewed-on: http://gerrit.openafs.org/2714 commit fcca1f7bbee8198d8aeead3003bbff28f5dd9080 Author: Jeffrey Altman Date: Tue Sep 7 08:21:12 2010 -0400 Windows: Improve SMB detection of Local System account Depending on the authentication method, the smb session authenticated name for the "local system" account may be the nul string. In this case it is impossible to use the name to determine if the authenticated entity is the "local system" account as required by smb_SetToken. To work around this problem, smb_AuthenticateUserExt() will now obtain the Security Identifier (SID) for the authenticated account. The string representation of the SID will be used in place of the name by smb_ReceiveV3SessionSetupX() when constructing the smb_user_t object. A new flag, SMB_USERNAMEFLAG_SID, indicates when the name is in fact a SID. smb_userIsLocalSystem() checks for the SMB_USERNAMEFLAG_SID flag and performs a SID comparison when it is set. smb_SetToken() will accept either MACHINE\user or a SID string as the smbname. It will obtain the SID if possible and create a SID-based smb_user_t. It is possible that a SYSTEM service will use an anonymous (S-1-5-7) SMB connection. In that case, we also check the RPC Impersonation SID to see if it is SYSTEM. If so, the RPC identity supercedes the SMB identity for SetToken. smb_IoctlRead, smb_IoctlV3Read and smb_IoctlRawRead are now all consistent with regards to name processing. Fixed a couple of comments as well. FIXES 128022 LICENSE MIT Change-Id: I8f9ccd4a4dddea52d151288855c7e129e2f31b28 Reviewed-on: http://gerrit.openafs.org/2709 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 19f50c13b4542cc84c33eaca4b2cc6ac0b75eb98) Reviewed-on: http://gerrit.openafs.org/2711 commit 81e9b15f568bbfdbbfa54c2f2aaf7f1f1e5beb62 Author: Jeffrey Altman Date: Thu Sep 2 21:17:24 2010 -0400 Windows: Modify signature of buf_CleanAsync and buf_CleanAsyncLocked The buf_CleanAsync() and buf_CleanAsyncLocked() signature does not include a cm_scache_t pointer even though buf_CleanAsyncLocked() needs a pointer to the matching cm_scache_t object. There are some calls when the cm_scache_t object is already known. For those cases it is more efficient to avoid the additional lookup especially when buf_CleanAsync*() is being called on every buffer associated with the cm_scache_t object. At the same time add a flags field and a constant CM_BUF_WRITE_SCP_LOCKED to permit the lock state of the cm_scache_t to be passed in. Finally, fix up the usage in buf_FlushCleanPages() which gains the most from these changes. LICENSE MIT Change-Id: I3726441ff83a89e24d790174ca71396d633f1be6 Reviewed-on: http://gerrit.openafs.org/2662 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1ef135110b7d850e2c40bbbb6b7de69c76872fa9) Reviewed-on: http://gerrit.openafs.org/2708 commit a7e9c8316765b3b7a8933aafba3681e2e4d106ef Author: Jeffrey Altman Date: Thu Sep 2 21:05:15 2010 -0400 Windows: Permit cm_scache rwlock to be dropped when "Stablized" The cm_buf_opts_t cm_BufStabilize() function was implemented such that holding the cm_scache_t.rw lock had to be exclusively held until cm_BufUnstablize() was called. Unfortunately, this prevents using Stabilize/Unstabilize to protect the cm_scache_t during Flush operations as the cm_scache_t.rw lock must be acquired after the cm_buf_t mutex and not before it. This patchset reimplements the synchronization logic using the new CM_SCACHEFLAG_SIZESETTING flag and cm_SyncOp(). LICENSE MIT Change-Id: Iaada83f7f3b75bb3b213b33b2399e900e48a2fbc Reviewed-on: http://gerrit.openafs.org/2661 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fa961c02fbb7dc54fa4c02c38dfd07c44eb696d3) Reviewed-on: http://gerrit.openafs.org/2707 commit da0a17c9fc0bb54f081355ace48f0ea988dce7bc Author: Jeffrey Altman Date: Sun Aug 29 23:41:02 2010 -0400 Windows: fail cm_CheckNTOpen if READ|DELETE for readonly file If the readonly file attribute is set (stored as a unix mode) then a CreateFile operation should fail if the file is opened for DELETE in combination with any other privilege. LICENSE MIT Change-Id: Ie8ebb6d230cf65d9ce2411bab2fcc4e561081505 Reviewed-on: http://gerrit.openafs.org/2660 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ee26ce51f67c7a91d843184374240bbc29e1660b) Reviewed-on: http://gerrit.openafs.org/2706 commit 695fc9ba0111ca0455395fac62ce50ec42f48329 Author: Jeffrey Altman Date: Thu Aug 26 11:33:43 2010 -0400 Windows: Add validation for directory buffer contents If the directory buffer contents are garbage we can crash the service. Add some simple validation checks to ensure that cm_dirEntry_t objects have the correct flag value and that the name strings are not too long. LICENSE BSD Change-Id: If4a276007ff7a21a641825037a1035ea20db79c5 Reviewed-on: http://gerrit.openafs.org/2658 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 72584be7fb0b6eb01ca5cb9c0703e9bc1b92f547) Reviewed-on: http://gerrit.openafs.org/2705 commit 8c4d5075c3b074584db03b7858a8d066057318f4 Author: Jeffrey Altman Date: Tue Aug 24 16:46:45 2010 -0400 Windows: cm_TryBulkStatRPC must process VIO errors If the bulkStat errorCode indicates that a particular object is inaccessible due to a VIO error, we must update the server status appropriately in order to permit failover. LICENSE MIT Change-Id: I19ce3d2c5b138d519fb1c437f6d5109d7d8b1310 Reviewed-on: http://gerrit.openafs.org/2657 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3f69933c4243d6861d5cce701c28f2dee088e6c2) Reviewed-on: http://gerrit.openafs.org/2704 commit 0ed1eca089eb965d4416dcb5f26b97d082e66786 Author: Jeffrey Altman Date: Tue Aug 24 16:42:57 2010 -0400 Windows: better handle RX_MSGSIZE errors An RX_MSGSIZE error is returned by the new PMTU detection code. It is critical that such an error result in a retry of the operation that failed. Otherwise, the PMTU detection can't work and the server will be marked down. Secondly, it is important that such errors not leak to the application layer. Map them to CM_ERROR_RETRY in all cases. LICENSE MIT Change-Id: I966fe259080bd31ec60fdb6715f54e18e190c790 Reviewed-on: http://gerrit.openafs.org/2656 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b11ff643b5665ec252ca96dc19af1446fb72481f) Reviewed-on: http://gerrit.openafs.org/2703 commit 5010d19abc4eb35434dbf4918105daf43a8c4e67 Author: Jeffrey Altman Date: Tue Aug 24 16:40:38 2010 -0400 Windows: print the value of cm_OfflineROIsValid to afsd_init.log If we say we are printing the value of cm_OfflineROIsValid, do so and not cm_deleteReadOnly. LICENSE MIT Change-Id: I8b0bc73798feea413f8ce79f9965664fc050ef76 Reviewed-on: http://gerrit.openafs.org/2655 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 874c5ca8359d49703f1f37d7fb70204c182d0f86) Reviewed-on: http://gerrit.openafs.org/2702 commit f024479e88ada8d924c0f8ebb29afa94b0c64b49 Author: Jeffrey Altman Date: Sun Aug 22 10:05:59 2010 -0400 Windows: Handle RX_RESTARTING consistently for all RPCs Translate RX_RESTARTING to the same cache manager error code for all RPC classes. LICENSE MIT Change-Id: I4540e9886d1de68d9b3f8a2e72508f876225ff4a Reviewed-on: http://gerrit.openafs.org/2654 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 87c9e7e6e4f8be4778d183940f349557193146c7) Reviewed-on: http://gerrit.openafs.org/2701 commit 54fd97ac8c19dae4ff6524bd463cc01316fbf701 Author: Jeffrey Altman Date: Sat Aug 21 00:23:45 2010 -0400 Windows: Log cell along with volume id for server errors When logging server volume instance errors to the windows application event log, be sure to log the cell as well. Translating from server ip address is non-trivial. Make it easier for administrators triaging issues to plug the volume and cell info into vos commands. LICENSE MIT Change-Id: I801fcd5c1afba4a8cdef4386fec72b9a529d4cfb Reviewed-on: http://gerrit.openafs.org/2653 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2ef83d24846e6035b752fcbe98d980e046e074f9) Reviewed-on: http://gerrit.openafs.org/2700 commit 66221b5ba602e1ad1a292b09652fb6f4d965af6b Author: Jeffrey Altman Date: Sat Aug 21 00:22:22 2010 -0400 Windows: unix modes represented in octal Since unix mode bits are represented in octal in most cases make sure we log them that way. LICENSE MIT Change-Id: Ia8106c7bbd3230380c7efa437b6eb0a90398bda3 Reviewed-on: http://gerrit.openafs.org/2652 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a97282bf76730fd05c2365aa1c58ce96174efd37) Reviewed-on: http://gerrit.openafs.org/2699 Tested-by: Derrick Brashear commit 3edc17fd817359969ec1327115db10f0d4aa1066 Author: Derrick Brashear Date: Fri Sep 3 08:18:41 2010 -0400 rx msgsize retry logic change only rewrite to RX_MSGSIZE if the MTU changed. otherwise, leave well enough alone Change-Id: If7311c623c61064c52b42fbb131aa8ff007c3741 Reviewed-on: http://gerrit.openafs.org/2664 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b91e7e86b429b6182d8ee23c471bef4f48af560f) Reviewed-on: http://gerrit.openafs.org/2698 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b030d05e0501790499d84d048f29549b9e0d1aa0 Author: Andrew Deason Date: Fri Sep 3 10:59:45 2010 -0500 cacheout: Improve error handling Bail out when we encounter errors in initialization. Among other things, this prevents a segfault if we can't read the client configuration. Change-Id: I8b35163c5c4750eb05539a225069327051a3f148 Reviewed-on: http://gerrit.openafs.org/2665 Tested-by: BuildBot Reviewed-by: Jeffrey Hutzelman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit defd84d0fb43a068d2b9ae88a103ffea266c8d95) Reviewed-on: http://gerrit.openafs.org/2697 commit a06053cbb4f0c32127a73aeeca90fc5309ff4c08 Author: Andrew Deason Date: Fri Sep 3 16:32:11 2010 -0500 vos: Show effects in single-volume dryrun mode Fix -dryrun mode for 'vos syncvldb' to also show the effects when run against a specific volume id. Change-Id: I3a2db96fc8016939f2f2f9561aba29527701ad59 Reviewed-on: http://gerrit.openafs.org/2667 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e07f87070c901d71c2f4fa594738ce0a16c77ea1) Reviewed-on: http://gerrit.openafs.org/2696 commit 6f2ba2c18a0f0c154f3b6696fec694a9179b055f Author: Andrew Deason Date: Fri Sep 3 15:20:10 2010 -0500 vos: Show after effects in dryrun mode The dryrun mode of operation for 'vos syncvldb' and 'vos syncserv' does not currently show the "status after" portion of its output, so they don't really show what the commands will do. Change them so "status after" is shown for -dryrun when sync'ing servers or partitions, and count changes towards the count at the end. Change-Id: I6cc20c28a989925a1262570b286fdd7d290c0a9a Reviewed-on: http://gerrit.openafs.org/2666 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5705a46a75917cb34b4ea9161dde4ee43d0d4eb0) Reviewed-on: http://gerrit.openafs.org/2695 commit 0a7498a90b5257ca24e600a6913e8939cd81b3f7 Author: Marc Dionne Date: Sun Sep 5 10:48:52 2010 -0400 afs_DoBulkStat: don't call afs_Analyze without holding the GLOCK Limit the scope of the GUNLOCK-GLOCK blocks to cover only the RX calls. This prevents afs_Analyze from being called without the GLOCK, which causes an oops in afs_icl_Event4() where there's an ASSERT_GLOCK. Change-Id: Ifa6942d08f22479c0affba3ebd1fc9bf4063d8a5 Reviewed-on: http://gerrit.openafs.org/2668 Tested-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 526b8a7ca53977d6cdb91427932ac6b18bb7064d) Reviewed-on: http://gerrit.openafs.org/2694 commit 1df1d53a6e392eead9be6430e9294bc28480db45 Author: Andrew Deason Date: Wed Sep 1 11:14:37 2010 -0500 RedHat: Do not force krb5-config path If the %krb5config macro is not defined, do not force using /usr/kerbers/bin/krb5-config, since sometimes that is not where it is (RHEL6 puts it in /usr/bin). Instead only specify KRB5_CONFIG if krb5config is defined; otherwise let configure find krb5-config for us. Change-Id: I35cc03ddbba7edd2c03d8f72b9636d4a7f6e64c0 Reviewed-on: http://gerrit.openafs.org/2642 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 469cc14bd16b9e1a7ed8404224de63862c1f52f5) Reviewed-on: http://gerrit.openafs.org/2693 commit 6c05fc5c4d5db0e1504c6c69df880f023456ccb1 Author: Andrew Deason Date: Wed Sep 1 10:32:53 2010 -0500 RedHat: Update openafs.spec for configure changes We no longer have the configure options --enable-disconnected and --with-krb5-conf. Remove them from the spec file and instead specify krb5-config via the KRB5_CONFIG variable. Change-Id: Ic9d9505f0526e38bf084683d9be3367851005a97 Reviewed-on: http://gerrit.openafs.org/2641 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 83f85c9ad6c439eb9676436a3e09c40c2813f1c1) Reviewed-on: http://gerrit.openafs.org/2692 commit 8ff34a177197e3b62847856c4c9e97e910dba9ab Author: Andrew Deason Date: Wed Sep 1 10:18:17 2010 -0500 RedHat: Use git-version in makesrpm.pl We no longer have the OpenAFS version in the AM_INIT_AUTOMAKE. Get the version from the equivalent AC_INIT version, which is determined by running build-tools/git-version. So, run git-version to get the version. Change-Id: I5feb72ba35566315654ab88f2047be8a7ac6b40a Reviewed-on: http://gerrit.openafs.org/2640 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 346ccf51ddedadd7f6709276237c26b7871ffbaf) Reviewed-on: http://gerrit.openafs.org/2691 commit 92de18b6cc344b742261e4344070721fa909eb6c Author: Andrew Deason Date: Wed Sep 1 10:12:31 2010 -0500 RedHat: Use configure.ac in makesrpm.pl We don't have a configure.in anymore; instead we have a configure.ac. Change-Id: Ic79b5577cf2d5cd3021fe933ca5405fb2d514a4d Reviewed-on: http://gerrit.openafs.org/2639 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 86ccd1c0f486d38b13a71a3c99879f546ad18b15) Reviewed-on: http://gerrit.openafs.org/2690 commit f2e7059dbe1f7ce0297d6968a87841980dca6410 Author: Russ Allbery Date: Wed Sep 1 10:52:30 2010 -0700 Update Autoconf Kerberos probes to latest rra-c-util version We will now look for krb5-config in /usr/kerberos/bin (the path used on Red Hat Enterprise prior to RHEL6) if it isn't found in the user's PATH. This update also adds a new probe for krb5_get_init_creds_opt_free which is not yet used, but may eventually be useful for klog.krb5. Change-Id: Iefd67c02ac44fd5f1a30883d1cd6ea4e489b32b1 Reviewed-on: http://gerrit.openafs.org/2644 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ae868642e1936509184cbe9b539733445902bdf3) Reviewed-on: http://gerrit.openafs.org/2689 commit d622e893c12fa1b43e99dc12bd27ec7dc5c8bcfc Author: Jonathan Billings Date: Tue Aug 31 15:15:26 2010 -0400 Linux: Updated RedHat spec file with new demand attach servers and docs Added the following to the openafs-server package: dafileserver dafssync-debug dasalvager davolserver salvageserver salvsync-debug Added the man pages for the above. Added a man page for krb.excl Change-Id: Ifac99e77de4f7b07dc6e76df0237b1960a73cb0d Reviewed-on: http://gerrit.openafs.org/2630 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 69c1d5e2debdafd971216a