commit bb589cf99095573a17545c29d2de69cd57804d91 Author: Jeffrey Altman Date: Fri May 24 06:54:12 2013 -0400 Windows: 1.7.25 (1.7.2500) Update the version numbers. Change-Id: Id9d089c36ae1058ec368821de875a31ad08ea2a7 Reviewed-on: http://gerrit.openafs.org/9939 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 258ec900e095e842796630f5e62e26ab32b735a8 Author: Jeffrey Altman Date: Fri May 24 06:53:22 2013 -0400 Windows: 1.7.2500 Change Log Change-Id: I205d032c9f1947f98ae7b5a2c3995cb00db0bc40 Reviewed-on: http://gerrit.openafs.org/9938 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 152f0760278a2a7148a90bb13096b0c9cc74caa9 Author: Heimdal Developers Date: Mon Feb 25 23:00:46 2013 +0000 Import of code from heimdal This commit updates the code imported from heimdal to 66f4c441e9e0de68fbcf81763642779ac5c33631 (git2svn-syncpoint-master-199-g66f4c44) Upstream changes are: Kumar Thangavelu (1): unning "kinit --fast-armor-cache=xxx" against a Win2K3 domain resulted in a crash with the attached backtrace. FAST is not supported with RC4 keys which are used in Win2K3. The code already handles this but the error code is not propagated up the stack. Love Hornquist Astrand (1): add socket_set_nonblocking Roland C. Dowdeswell (3): Optimise _krb5_n_fold() a bit. Use krb5_enomem() more consistently in lib/krb5. Further improvements to lib/krb5/n-fold.c: Reviewed-on: http://gerrit.openafs.org/9264 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a9fd0810d2425f9e0936c3c52903d73e9e74a6ab) Change-Id: Ie2b641490de5d0e931aaccecc7800b7ad6b5c1a3 Reviewed-on: http://gerrit.openafs.org/9936 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e78d9897e7844f4b77399233b35c61b7ee9a8e8e Author: Heimdal Developers Date: Fri Aug 31 13:14:51 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to 4a438db29d361b7e5f47b86ced1482a96cde86ea (switch-from-svn-to-git-3008-g4a438db) New files are: roken/rename.c Reviewed-on: http://gerrit.openafs.org/8025 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8ab7e73fe2933aa3910b94fe28f6adf3e5c214fd) Change-Id: Ic5022a4e6d0d0ebfbe3eead082610b50c474f3b8 Reviewed-on: http://gerrit.openafs.org/9935 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 502c52c8159a377269093d29c072ceb222a62d45 Author: Derrick Brashear Date: Fri Aug 31 08:09:31 2012 -0400 update libafsdep to include external without being in 3rd party dirs everything below src/external is managed out of other trees, put our libafsdep at the top Reviewed-on: http://gerrit.openafs.org/8023 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 81c172343c17644a496dbe0d2ab48b7925c11cb4) Change-Id: I082fe804fa4578569ab8a02c4e03de10a70b24f9 Reviewed-on: http://gerrit.openafs.org/9934 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c32a3b294157d8f024f6b13d9809323038cbf4d Author: Christof Hanke Date: Fri Aug 24 05:18:31 2012 +0200 out-of-tree-build: extend configuration, namely libafsdep-files and configure-libafs.ac so that building the kernel-module on linux in a separate obj-directory works. Reviewed-on: http://gerrit.openafs.org/8012 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c2b13458498e8c27aa6eb1f2a777cf9bfe4488df) Change-Id: I85d3f9b998f45966af1fef65bd4748ad0c38ee99 Reviewed-on: http://gerrit.openafs.org/9933 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e5cc6adfae8085362ecc609105bb12fea6f34122 Author: Heimdal Developers Date: Thu Aug 16 17:26:07 2012 -0400 Import of code from heimdal This commit updates the code imported from heimdal to 4a438db29d361b7e5f47b86ced1482a96cde86ea (switch-from-svn-to-git-3008-g4a438db) Upstream changes are: Michael Meffie (1): drop __restrict some more, to please old compilers Reviewed-on: http://gerrit.openafs.org/8003 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 99238baed75205fd7a1885ed6b8fc8505d4faf95) Change-Id: I27def01d28c0d4265d1675257625f0d0f3c614d2 Reviewed-on: http://gerrit.openafs.org/9932 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b8fc27e14cf2921ceb8670363b4c6fecf31525a7 Author: Jeffrey Altman Date: Thu May 23 16:57:21 2013 -0400 Windows: Return bytes_read count from cm_GetData The existing interface for cm_GetData takes an input buffer and a buffer size and no method by which the number of bytes read into the buffer can be returned. Add an output parameter to permit it. Reviewed-on: http://gerrit.openafs.org/9930 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25a0cf6fbc34988439172eb6c03477aa945c1071) Change-Id: Ia10ac125c1ee26595df00473411969a8fcb55829 Reviewed-on: http://gerrit.openafs.org/9931 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c625f23319a887a81a43a9763399548add0cb694 Author: Jeffrey Altman Date: Fri May 17 12:06:00 2013 -0400 Windows: Protect against infinite VIO retries Keep track of the number of VIO errors reported by the file servers. If the count exceeds 100, abandon the request. Reviewed-on: http://gerrit.openafs.org/9923 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 436836d81ad17d78ddfe794db0c3bbf8f31a2783) Change-Id: Ic5aba58fe688fde4c7f4fc1fbffd58c91b8d0241 Reviewed-on: http://gerrit.openafs.org/9925 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5f35d412f18351738b1303a1d9097ec66e9bceab Author: Jeffrey Altman Date: Thu May 16 15:47:11 2013 -0400 Windows: AFSNameArrayClone leak in AFSCommonCreate Do not leak the AFSNameArrayClone if AFSLocateName fails. Reviewed-on: http://gerrit.openafs.org/9922 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 594c97675fd961b347b451bd000804962df1b721) Change-Id: Id6ed6eef71999540c48775bc25ed0bd290f5b574 Reviewed-on: http://gerrit.openafs.org/9924 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 44783cda9fce441d7dd87f71fb343320a79b268f Author: Jeffrey Altman Date: Thu May 16 06:47:13 2013 -0400 Windows: remove unused and leaked uniRootFileNameClone In AFSCommonCreate remove the allocated but never used but leaked 'uniRootFileNameClone' Unicode string. Reviewed-on: http://gerrit.openafs.org/9920 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f4b78c3eb12afc70d5ff3021313d3f868cb9f661) Change-Id: Ife8b429cb1240517def38ea44a9e3daa00e83ee8 Reviewed-on: http://gerrit.openafs.org/9921 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4997afea8ca5a676786dbf1482d9de15df57ac8c Author: Jeffrey Altman Date: Mon May 13 10:09:11 2013 -0400 Windows: NotifyHardLink avoid null ptr reference In AFSNotifyHardLink, if the TargetDirectoryCB out parameter is non-NULL but pDirNode is NULL, do not attempt to increment the DirOpenReferenceCount because doing so will trigger an exception. Reviewed-on: http://gerrit.openafs.org/9903 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 975c11cb357f553f9f90a231546e0b42c6e79d31) Change-Id: I7e90eb51193ed3b1e3305ee2127b779a79bac6b5 Reviewed-on: http://gerrit.openafs.org/9904 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bf8206f3e13458c1418de6cda65293c8677c3626 Author: Jeffrey Altman Date: Tue Apr 9 12:26:31 2013 -0400 Windows: Fix trace msg typo in AFSDeleteDirEntry The name of the function in the trace messages is wrong. Reviewed-on: http://gerrit.openafs.org/9899 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4a91ac6f8383daa0be43d15da3be7be8d54034ac) Change-Id: I969a221134b7b5c5e6fd3a0bf45bd81adbebf307 Reviewed-on: http://gerrit.openafs.org/9901 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e8a9581e966e059e35c1ff2e3c41a5813547ec7a Author: Jeffrey Altman Date: Thu May 9 21:48:16 2013 -0400 Windows: AFSCleanup move CCb access inside try block A crash dump was examined which showed a deadlock due to the leak of a SectionObjectResource in a code path in which the holding thread could not have obtained it. The FileObject->FsContext2 (Ccb) pointer referred to invalid memory which may have been due to pool corruption. The only code path in which the SectionObjectResource is held exclusive and then the Ccb pointer is used outside of a try-except block is in AFSCleanup(). Move this reference inside the try-except block just in case. If the Ccb is invalid, at least this way AFSRedirLib will catch the exception and free the SectionObjectResource before continuing. Reviewed-on: http://gerrit.openafs.org/9892 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c42912d6da6ff7536b1301b4fb7f556513e8692c) Change-Id: I20ba146da60cd30721653ed6abb65802457352ea Reviewed-on: http://gerrit.openafs.org/9897 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 989f9142b8b8c185b22bb1678013900a3ed3f11e Author: Jeffrey Altman Date: Thu May 9 18:31:19 2013 -0400 Windows: AFSClose Set FsContext* to NULL After the Fcb OpenReferenceCount is decremented it is no longer safe for the Fcb pointer to be referenced. Set FsContext to NULL. After the AFSRemoveCcb() call, it is no longer safe to reference the Ccb pointer. Set FsContext2 to NULL. Reviewed-on: http://gerrit.openafs.org/9890 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit dcae72c87e63b595c4e86cb199ff75332b51506a) Change-Id: Id1e4d37b055a289847d9ea2def23a402644c7080 Reviewed-on: http://gerrit.openafs.org/9896 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f6468625f221720de2bb92d10215b2f08948e784 Author: Jeffrey Altman Date: Thu May 9 18:30:42 2013 -0400 Windows: AFSClose remove dead code Reviewed-on: http://gerrit.openafs.org/9889 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6c42bc9090324a5ce57678b31b76ad5ef8ed1d34) Change-Id: I61c0f1d1280bd2adbb70a2d73ec34201bbc7dfa3 Reviewed-on: http://gerrit.openafs.org/9895 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 585266e9454e20d4f517bdeb9d15e0a9aa5a25a0 Author: Jeffrey Altman Date: Thu May 9 18:28:09 2013 -0400 Windows: AFSCommonWrite do not leak SectionObjectResource If the write request is neither an extending write nor a non-cached write and (liStartingByte.QuadPart + ulByteCount) >= pFcb->Header.FileSize.QuadPart, then the SectionObjectResource pointer will be leaked. Instead release it before retrying. Reviewed-on: http://gerrit.openafs.org/9888 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit d1577c80bb8f6752b775a64af68649b648c659d9) Change-Id: I77a248a13ccd8e2fe887f96ef820228b3a78b168 Reviewed-on: http://gerrit.openafs.org/9894 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7ff3bfd9d88e8e2c75993038f402fb9811b5ba9e Author: Jeffrey Altman Date: Tue May 7 22:57:00 2013 -0400 Windows: Version 1.7.24 (1.7.2400) Change-Id: I19ca8372942c8b6a932eb58e6c4507f9557a45da Reviewed-on: http://gerrit.openafs.org/9874 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6328fc5ad217b6849c1d95a64e78f90f101458e5 Author: Jeffrey Altman Date: Tue May 7 22:47:28 2013 -0400 Windows: 1.7.24 Change Log Change-Id: I3293c21ccf3fbf9cdc5eed851df4c23f8316f3ea Reviewed-on: http://gerrit.openafs.org/9873 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 885739d525b112e416a463cac428f201e4f29e30 Author: Jeffrey Altman Date: Wed May 8 14:10:01 2013 -0400 Windows: RDR_GetVolumeInfo do not always return success If the call failed because all servers are down or all instances of the volume are offline or busy, tell the caller. Do not return fake data. Reviewed-on: http://gerrit.openafs.org/9882 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2608ce67f1ba5ed1ed63525fad90db9d67547ec6) Change-Id: Idbcac1678453e5538ecda4a0744cbca79f69c4e9 Reviewed-on: http://gerrit.openafs.org/9885 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 837e24df3c96b14e8fd0f11aebf1d4c9a79d0c3c Author: Jeffrey Altman Date: Wed May 8 14:08:59 2013 -0400 Windows: cm_Analyze if no retry don't sleep If error handling response is not going to result in a retry of the call, do not sleep. Reviewed-on: http://gerrit.openafs.org/9881 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5342de7a58c4516259fa48ee2d282bc6046830cb) Change-Id: Ibb9003caf50b01510900e32d399632a4fd1432e0 Reviewed-on: http://gerrit.openafs.org/9884 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 959767bf30b5848598fccae33522868661e34d15 Author: Jeffrey Altman Date: Wed May 8 13:08:30 2013 -0400 Windows: only retry ALLBUSY for five minutes Add a volbusyCount field to cm_req_t. Increment the count each time CM_ERROR_ALLBUSY is processed by cm_Analyze for a given request. Wait 15 seconds between retries and retry up to 20 times and then fail. This prevents requests from blocking for a volume that isn't going to come back online for hours. Reviewed-on: http://gerrit.openafs.org/9876 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 663f32e93ec2d17ca59c64c8115cd51183ea3629) Change-Id: I4e98c68d80717946428ed5859284915b7e727924 Reviewed-on: http://gerrit.openafs.org/9883 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ac24e694dece9a77b940df960091e19fe1b36305 Author: Jeffrey Altman Date: Tue May 7 21:50:40 2013 -0400 Windows: Release Notes updates Document ReparsePointPolicy registry value. Document known Explorer Shell Paste bug. Update ShortNames registry value. Document Cygwin 1.7.18-1 support for AFS Symbolic Links. (cherry picked from commit 79c7b34afd3231a80a7aa4f163b89cb6eca4dfb7) Change-Id: If01d25937be6a7b0c9db9b6d65f0bcb55ae580b9 Reviewed-on: http://gerrit.openafs.org/9872 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1b75d83a5daf4521fb372c402853864af2ef32b7 Author: Jeffrey Altman Date: Mon May 6 15:12:54 2013 -0400 Windows: AFSLibExFreePool*() macros Introduce the AFSLibExFreePool() and AFSLibExFreePoolWithTag() macros which simply call ExFreePool() and ExFreePoolWithTag(). The prefix AFSLib indicates that memory allocated by AFSLibExAllocatePoolWithTag() must be freed before unloading. AFSExFreePool*() cannot be used because that is a pointer to a function provided by AFSRedir.sys which may not be assigned when memory must be freed. The only time that ExFreePool() should be used is if the memory was allocated by a system function. Change-Id: I68333d5f2dc907bf7a510f018469a14085ca3a3a Reviewed-on: http://gerrit.openafs.org/9853 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4cda20f3d7846b10905645ec915a3ea29bce4f28) Reviewed-on: http://gerrit.openafs.org/9871 commit eddb69a79b48feb6bce6156a7119a1bfcaf25a4b Author: Jeffrey Altman Date: Mon May 6 15:05:10 2013 -0400 Windows: Use AFSLibExAllocatePool for library local If the memory allocation is for an object that must be freed before the afsredirlib.sys driver unloads, use the AFSLibExAllocatePoolWithTag interface. AFSExAllocatePoolWithTag allocates the memory from afsredir.sys which prevents Verifier from being used to detect leaks. Change-Id: I5f1307de17e11b27098df2faf1af515d87a58235 Reviewed-on: http://gerrit.openafs.org/9852 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b655055a2693c44605995abe638673d842ebd5d9) Reviewed-on: http://gerrit.openafs.org/9870 commit c2682d53bd88c640e8690b99e935931a5feed802 Author: Jeffrey Altman Date: Tue May 7 18:36:16 2013 -0400 Windows: RDR_Initialize must cleanup threads on failure If RDR_Initialize() fails after instantiating the worker thread pool it must call RDR_ShutdownFinal() to destroy the pool before exiting. Otherwise, the threads will spin endlessly as each DeviceIoControl call to the redirector fails. Change-Id: Idbda56655912c9758213bca9eba71426ec1d24c3 Reviewed-on: http://gerrit.openafs.org/9860 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5ea6e66433826c9745e4a211bd2801995e35fa5e) Reviewed-on: http://gerrit.openafs.org/9868 commit 606f77e7473aca22b8ce42f1c142db1df99254a3 Author: Jeffrey Altman Date: Wed Apr 17 18:21:40 2013 -0400 Windows: IOCTL_AFS_GET_DEBUG_TRACE Pemrit the active Debug Flags and Trace Configuration to be queried by administrators. Change-Id: Ida711c7c910df7fbd3218d78b525dbebffa3ddac Reviewed-on: http://gerrit.openafs.org/9798 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ff2a5fed4da67907cc86162553d3689db3a22c06) Reviewed-on: http://gerrit.openafs.org/9867 commit c0ebf3c499d7383f5702eae83bdf6498a1264338 Author: Jeffrey Altman Date: Wed Apr 17 18:18:30 2013 -0400 Windows: Add IOCTL_AFS_GET_REPARSE_POLICY Introduce IOCTL_AFS_GET_REPARSE_POLICY to permit the global and active authgroup reparse point policies to be queried. Change-Id: Iadc7a8e788b18dac34e4f8655d59c26ce0deb1ab Reviewed-on: http://gerrit.openafs.org/9797 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit edea22524a4d348f570e969dd75cd7f9e3876b32) Reviewed-on: http://gerrit.openafs.org/9866 commit b654dbd60817607fcb7aa9b3ac00a770f5c82f49 Author: Jeffrey Altman Date: Sun Apr 14 21:08:20 2013 -0400 Windows: "ReparsePointPolicy" registry key HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters DWORD "ReparsePointPolicy" Valid values are: 0 - No global policy set 1 - Reparse Points to Files treated as the target File Change-Id: I42f6d7892b3adf1ba59b2e90204352c184a502e9 Reviewed-on: http://gerrit.openafs.org/9789 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aa09c830709a4f5bbe5c259e0934e4bed4b8e832) Reviewed-on: http://gerrit.openafs.org/9865 commit abed234ebfb6f929c2168372e623ccd8eb8c2044 Author: Jeffrey Altman Date: Sun Mar 3 23:10:51 2013 -0500 Windows: CreateFile Reparse Point to File as File Apply the Reparse Point to File as File Policy to CreateFile. If the FILE_OPEN_REPARSE_POINT flag is specified to the CreateFile operation and AFSIgnoreReparsePointToFile() returns TRUE, evaluate the target object (if possible) and if the object is a FILE, then ignore the FILE_OPEN_REPARSE_POINT flag. Otherwise, re-evaluate the request to attempt to open a reparse point if it exists. Change-Id: I454501966afd9a500773e14a425f2a975ce31c22 Reviewed-on: http://gerrit.openafs.org/9343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6a3eca32a6a89bf533d3075ac5cb3b24da1b1326) Reviewed-on: http://gerrit.openafs.org/9864 commit bab88236d6bbc1fb06f6d9e358f910f52023ccf7 Author: Jeffrey Altman Date: Sat Mar 2 01:06:52 2013 -0500 Windows: DirControl Reparse Point to File as File Implement the Reparse Point to File as File Policy for directory queries. Change-Id: I7afdccdbdfae5b10898e1b9fd2e6d8fdfd73cce1 Reviewed-on: http://gerrit.openafs.org/9342 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dfd8ec397cc24b7ed991a5ef9c544162a7228abc) Reviewed-on: http://gerrit.openafs.org/9863 commit c40de0897bbc92947c80e4eb0cf57c6f1577f17a Author: Jeffrey Altman Date: Sun Apr 14 18:57:53 2013 -0400 Windows: AFSRedirLib AFSIgnoreReparsePointToFile AFSIgnoreReparsePointToFile() is a helper routine that uses the global reparse point policy to decide whether or not a reparse point whose target is a file should be reported to applications as a file. When per-AuthGroup or per-Process policy is supported, this function should be modified. Change-Id: I1e5fb5c6b901c4b56fadef4acd3c6c78f38a48d1 Reviewed-on: http://gerrit.openafs.org/9788 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f782d1dd20ee6048ca165e808adc9a01b2666746) Reviewed-on: http://gerrit.openafs.org/9862 commit 9af44df29938c91b536becba68a3729c2bde8958 Author: pete scott Date: Wed Feb 27 08:51:44 2013 -0700 Windows: IOCTL_AFS_SET_REPARSE_POLICY IOCTL_AFS_SET_REPARSE_POLICY is a new ioctl that can be executed by anyone to alter the behavior of AFS Symlink-to-File reparse point processing. Policy can be set for a global default or for the active authentication group. If the AFS_REPARSE_POINT_TO_FILE_AS_FILE policy is active, afs symlinks will not be reported as reparse points if the symlink target is known to be a file. This patchset implements the ioctl but not the "reparse point to file as file" functionality. Per authgroup policy setting is permitted by the ioctl but is not supported at this time. This patchset was modified by Jeffrey Altman. Change-Id: I5e49365c871bf780403071914bcc81e6c2eec0ae Reviewed-on: http://gerrit.openafs.org/9341 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit I6fd8b3c7f94dd97e15d6b82642f43cb2d8193563) Reviewed-on: http://gerrit.openafs.org/9861 commit 8c711e04f7ea01ae174dad8b7a9b24ce285ec1d5 Author: Jeffrey Altman Date: Sat May 4 11:56:30 2013 -0400 Windows: Report Case Sensitive Search Return the FILE_CASE_SENSITIVE_SEARCH volume flag as part of afs volume properties. NTFS does and our search algorithm is case sensitive first, then case insensitive. Reviewed-on: http://gerrit.openafs.org/9850 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5ae397146a8b33eb924f6a3420e2247f1986b1ad) Change-Id: Ie56203766afa9d6a98bfdffba8f2a869b937ea76 Reviewed-on: http://gerrit.openafs.org/9851 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4eb413ff09e244a701a4cece02567651a8b3335c Author: Jeffrey Altman Date: Fri May 3 11:23:31 2013 -0400 Windows: Introduce CM_CONN_FLAG_NEW The new CM_CONN_FLAG_NEW flag is set on the cm_conn object whenever a new rx_connection has been created. The flag is cleared in cm_Analyze if the call succeeded or if the error is one that is generated as a result of communicating with the peer. If no communication with the peer has taken place the connection is considered "new". For errors that would result in forcing a new connection, check whether the existing connection is already "new". This avoids an extra RX_CALL_DEAD timeout period in the case where a "new" connection was already in use. Reviewed-on: http://gerrit.openafs.org/9847 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0e2d4c0fcb45389d20dad93ae29b1c84364b59bf) Change-Id: Ie6f13291442fa2e15613ce09b5da27f247c225f6 Reviewed-on: http://gerrit.openafs.org/9849 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 03a272a050150e249fcb6da147e98e4613e5cac0 Author: Jeffrey Altman Date: Fri May 3 11:21:39 2013 -0400 Windows: Use interlocked ops for cm_conn flags cm_conn flags can be modified by multiple threads. Use interlocked operations for thread safety. Reviewed-on: http://gerrit.openafs.org/9846 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 1fed4439da374a134975726c1e1efa52a5359264) Change-Id: I416f74e6d2b937ae8b87d7c0d2d94527d5d796e6 Reviewed-on: http://gerrit.openafs.org/9848 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ef64fffd6122dac0649df8a081e672df6217a02b Author: Marc Dionne Date: Fri May 3 09:11:50 2013 -0400 Windows: Use mtafsutil library when linking with pthreads Use the multi-threaded version of the util library in a few places that are linking with pthreads but use the standard version. Change-Id: I41f780eb5fda841f22fae2d2afb36cc5225e94f1 Reviewed-on: http://gerrit.openafs.org/9844 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9845 commit 2b5318b3e78a7f8b267a751421e79eaf103a3917 Author: Jeffrey Altman Date: Wed Apr 24 23:30:53 2013 -0400 Windows: pSrcObject instead of pSrcFcb->ObjectInformation In AFSSetFileLinkInfo and AFSSetRenameInfo consistently use the variable pSrcObject instead of pSrcFcb->ObjectInformation. pSrcObject is a local alias. Mixing both forms in the same function is confusing. Reviewed-on: http://gerrit.openafs.org/9810 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit a7165067d79814bacabd55e9bab66c6a3ae45b76) Change-Id: I0c52a00a0e5015f152db0e3e6e85f7c613908ca4 Reviewed-on: http://gerrit.openafs.org/9826 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 718dfde928d610479c3587964ec10fa677f43301 Author: Jeffrey Altman Date: Wed Apr 17 20:17:09 2013 -0400 Windows: AFSLocateNameEntry incorrect pCurrentObject pCurrentObject is supposed to be an alias for pDirEntry->ObjectInformation but it was not always being updated when pDirEntry was replaced. As a result several tests were being performed incorrectly and the wrong data was being logged. Reviewed-on: http://gerrit.openafs.org/9809 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit cb9d0ff3da5c42667afb6f702523d1ffd2d72a5f) Change-Id: I0833137e54e39b95754b83d43c1d0324506e59ec Reviewed-on: http://gerrit.openafs.org/9825 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a5270b4c05bd040a87a4c1b34fb3260d8cbb7db3 Author: Jeffrey Altman Date: Wed Apr 17 18:35:36 2013 -0400 Windows: More ObjectInformation RefCnt Protection Protect addition ObjectInformation Reference count transitions with the VolumeCB.ObjectInfoTree.TreeLock. AFSProcessUserFsRequest AFSSetRenameInfo AFSInvalidateCache AFSInvalidateVolume AFSAllocateObjectInfo AFSDeleteObjectInfo AFSGetObjectStatus AFSDeleteDirEntry Reviewed-on: http://gerrit.openafs.org/9799 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 18ba93882f9dad15899624bc4f439e70d584982a) Change-Id: Id89cdb0f920e7f1ce06108990463c41b5f334e27 Reviewed-on: http://gerrit.openafs.org/9824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 99c06328a4efc6562e6eedc80fd5e55eefe6f1f3 Author: Jeffrey Altman Date: Sat Apr 13 01:57:56 2013 -0400 Windows: AFSExamineVolume drop TreeLock if waiters After each call to AFSExamineObject drop the ObjectInfoTree.TreeLock if there are threads waiting for access. The garbage collection process should not delay real work. Reviewed-on: http://gerrit.openafs.org/9786 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5952cc139c102035591e8c95bbba313cf709d332) Change-Id: I78ef97395e18c4377a56cb3e6ce6a24eda4cdd5c Reviewed-on: http://gerrit.openafs.org/9823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7925a205a144f195b33b00e3645e0cb704204973 Author: Jeffrey Altman Date: Sat Apr 13 01:56:39 2013 -0400 Windows: AFSPerformObjectInvalidate hold TreeLock When decrementing the ObjectInfoCB reference count hold the Volume's ObjectInfoTree.TreeLock shared. Reviewed-on: http://gerrit.openafs.org/9785 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a6037b153d78791d68b694a487456fbb52e410d0) Change-Id: I13a0d55f5aaf7968e0cdfaba06a458bed04c4a1b Reviewed-on: http://gerrit.openafs.org/9822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2807e28783c9df891c1e634ff0ab458ffacc2f03 Author: Jeffrey Altman Date: Sat Apr 13 01:55:26 2013 -0400 Windows: ObjectInfoCB update last access time Each time the ObjectInformationCB object is looked up from the ObjectInfoTree the LastAccessCount field should be updated except in cases of invalidation, garbage collection, and extent processing. This is particularly important when an ObjectInfoCB is attached to DirectoryCB in AFSInitDirEntry and when constructing directory snapshots or validating directory content. Reviewed-on: http://gerrit.openafs.org/9784 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d2b54c0ac42625715e9f74e06fa20820c2b7aa28) Change-Id: I00ede923e9bc1ed286cfbfc3c5d906be3c8d416f Reviewed-on: http://gerrit.openafs.org/9821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bed27dd3a272923b4835935dff08b4af5dba56a6 Author: Jeffrey Altman Date: Sat Apr 13 01:52:45 2013 -0400 Windows: AFSFindObjectInfo update last access time Add a boolean parameter to AFSFindObjectInfo() which is used to indicate whether or not the last access time for the found ObjectInfoCB should be updated. Set the new parameter in all calls to AFSFindObjectInfo(). Reviewed-on: http://gerrit.openafs.org/9783 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit c51e9b35813b8630a297094df722d2f2a2e60927) Change-Id: Ia6bf09b37bb6416ae414152333eb515f915b1cfa Reviewed-on: http://gerrit.openafs.org/9820 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3f8eda16cc6821ca84560e9e1f66a4d4f2bd309c Author: Jeffrey Altman Date: Fri Apr 12 11:12:13 2013 -0400 Windows: AFSInvalidateVolume ObjectInfo refcnt decrement In AFSInvalidateVolume a reference count is obtained in order to ensure that the object is valid throughout the invalidation request. Although the refcnt is obtained while holding the TreeLock the refcnt was not released while holding the TreeLock which could open the door for another thread to race. Reviewed-on: http://gerrit.openafs.org/9782 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ed76e573ae5db4fb83d57217562c4998ffa845cb) Change-Id: I98a42d6cfaef5e8de9ec5f04a89a5b7a78dbabd3 Reviewed-on: http://gerrit.openafs.org/9819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5412b8f9b7deb396635e46c4f747f0a93209c347 Author: Jeffrey Altman Date: Fri Apr 12 10:58:47 2013 -0400 Windows: AFSInitDirEntry allocated ObjInfoCBs valid In AFSInitDirEntry the pattern was to find or allocate an ObjectInfoCB then destroy it if the DirectoryCB creation fails for some reason. The problem with this approach is that once the VolumeCB ObjectInfoTree.TreeLock is dropped the ObjectInfoCB is findable. That means that the contents of the ObjectInfoCB must be valid. This patchset makes three changes. First, in the case where the ObjectInfoCB is allocated, the fields of the ObjectInfoCB are populated from the DirEnumEntry before the TreeLock is dropped. Second, if the DirectoryCB allocation fails the ObjectInfoCB is not deleted. It is perfectly valid and can be used by a subsequent AFSInitDirEntry call. Perhaps one that is racing with this thread. It will eventually be cleaned up by the AFSPrimaryVolumeWorkerThread. Finally, when the ObjectInfoCB reference count is decremented the TreeLock is held shared in order to prevent races with other threads that might be incrementing it themselves. Reviewed-on: http://gerrit.openafs.org/9781 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a1aa06e82ca770456884b1b96b4f0c109cd06a85) Change-Id: I99f08a307560b06bd8b66ee177b2c8b5799707a4 Reviewed-on: http://gerrit.openafs.org/9818 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c051d6ce2e890d6302e42589f22c1b5dd53b81ce Author: Jeffrey Altman Date: Fri Apr 12 01:53:54 2013 -0400 Windows: AFSSetDispositionInfo Verify Dir Enum Before testing whether or not a directory is empty, the directory must be enumerated. If it is not, enumerate it. Reviewed-on: http://gerrit.openafs.org/9780 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9fd825790e4e61aa5fdf8996874fc9be8b1d1cc0) Change-Id: I09d5e069e76162b605b2a9433c4b01c43842f159 Reviewed-on: http://gerrit.openafs.org/9817 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 20b476512883483c1b74aea357d68ae75a22bc40 Author: Jeffrey Altman Date: Thu Apr 25 11:16:11 2013 -0400 Windows: Reset CM_VOLUMEFLAG_RO_SIZE_VALID flag The CM_VOLUMEFLAG_RO_SIZE_VALID flag was being reset using the wrong field which resulted in the flag never being cleared and the correct volume size not being reported. Reviewed-on: http://gerrit.openafs.org/9805 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e11da4c5869a0534b7767e2566d4743bc7e8189e) Change-Id: I25f7123e2dd763b122e04bb5faaf213f6f21c294 Reviewed-on: http://gerrit.openafs.org/9816 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 37e05eab20122b3347dbd8d2264542056f0c9f2f Author: Jeffrey Altman Date: Wed Apr 24 23:33:13 2013 -0400 Windows: fail if pSrcParentObject cannot be resolved In AFSSetFileLinkInfo and AFSSetRenameInfo return STATUS_INVALID_PARAMETER if pSrcParentObject cannot be determined. Otherwise, a NULL pointer dereference will occur. Reviewed-on: http://gerrit.openafs.org/9807 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 4512b47be83d708f4dfe6e45a205653635658c23) Change-Id: If0b2824569a1195a861c183df7c0468f87384b61 Reviewed-on: http://gerrit.openafs.org/9815 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3a33d42bd1768e0545be342fc904d5462d026fe7 Author: Jeffrey Altman Date: Wed Apr 24 23:34:45 2013 -0400 Windows: SetFileRenameInfo Do not replace pSrcParentObject If pSrcParentObject is replaced by pTargetParentObject then the reference count obtained by the AFSFindObjectInfo() call at the start of AFSFileRenameInfo will be released on the wrong object. This will result in a reference leak on pSrcParentObject and an undercount on pTargetParentObject. pTargetParentObject can then be garbage collected while it is in use. Reviewed-on: http://gerrit.openafs.org/9806 Reviewed-by: Peter Scott Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0653c81c2abc658f32e07fc6cc1a1ff2b35a9041) Change-Id: I1b594c8dba53848064803f6dba06d19d6a55e65a Reviewed-on: http://gerrit.openafs.org/9814 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fb7cd6bd4177f7001c8b23fd02d979f7941f717f Author: Jeffrey Altman Date: Fri Apr 12 01:14:39 2013 -0400 Windows: RDR_DeleteFileEntry test for empty directory RDR_DeleteFileEntry should check to see that a directory entry that is a directory is in fact empty. The most frequent use of RDR_DeleteFileEntry is to check whether the object can be deleted prior to setting the DeletePending state which in turn results in the object being deleted during Cleanup. If the directory is not empty during Cleanup it is too late for the error to be seen by the application. Reviewed-on: http://gerrit.openafs.org/9779 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2632c3f459dc47946b2e973c045056c3dca719f2) Change-Id: Ied2bf58ecf3eae1cb7496549919169509514b01a Reviewed-on: http://gerrit.openafs.org/9813 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cfdd888216561c533465b73ff432871534918d1f Author: Jeffrey Altman Date: Fri Apr 12 01:11:22 2013 -0400 Windows: cm_MapRPCErrorRmdir EEXIST == ENOTEMPTY If the file server is asked to remove a directory that is not empty one might expect it to return UAENOTEMPTY but instead it returns UAEEXIST. The error translation function cm_MapRPCErrorRmdir did not include EEXIST in the list of errors that convert to CM_ERROR_NOTEMPTY. Prior to IBM AFS 3.5 the file server did return ENOTEMPTY and if a particular platform did not define ENOTEMPTY, ENOTEMPTY was defined to be EEXIST. To late to change things back now. Reviewed-on: http://gerrit.openafs.org/9778 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6c73b8350a4bc67db271a5294c5fdf1e51e9033a) Change-Id: I81f11638e1105371d4c70840e8902773e4a9a84a Reviewed-on: http://gerrit.openafs.org/9812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d67054b64644ca1313ce89034e45a40dd75e2d85 Author: Jeffrey Altman Date: Fri Apr 12 01:09:13 2013 -0400 Windows: cm_BPlusDirIsEmpty Provide a function to determine if a directory is empty or not. Reviewed-on: http://gerrit.openafs.org/9777 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5e8bfcb42cbb3652238fec2dbe1c1d65bc2c1ccd) Change-Id: I3d71df833104c4dc049b737a593224657453ccfd Reviewed-on: http://gerrit.openafs.org/9811 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c1845c608e7dfc6ed9663d02e1c87646cd58e4b0 Author: Jeffrey Altman Date: Thu Apr 11 09:20:03 2013 -0400 Windows: cm_Analyze VICECONNBAD and VICETOKENDEAD cm_Analyze forces new rx connections in response to VICECONNBAD and VICETOKENDEAD errors but failed to mark the cm_req_t with CM_REQ_NEW_CONN_FORCED and failed to set 'forcing_new' to true ensuring that a retry would take place even if the cm_req_t included the no retry flag. Reviewed-on: http://gerrit.openafs.org/9773 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7647c6c4a1a23bdf3ffe502d31f26ed052d0378a) Change-Id: Ia243f7fd6c3a4fa619ecd1dca1b051cde028f058 Reviewed-on: http://gerrit.openafs.org/9776 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b6b1013374205630e15263d20d72b3298a192bb8 Author: Jeffrey Altman Date: Thu Apr 11 09:17:53 2013 -0400 Windows: Force new connection upon RXKADEXPIRED cm_Analyze invalidated the credentials for the cell upon receiving an RXKADEXPIRED error from a server but failed for force the establishment of a new rx connection to the server. As a result, the expired credentials would continue to be used until the credential expires. Reviewed-on: http://gerrit.openafs.org/9772 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 545ea65599230641ffaaff4077f72430aa5e7038) Change-Id: I2ada6f05bd055a437e8fe9f26ba707ebde2d3417 Reviewed-on: http://gerrit.openafs.org/9775 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5f9c055b3ddc1e68586df09df8d871aee0c5e378 Author: Jeffrey Altman Date: Tue Apr 9 10:48:12 2013 -0400 Windows: Comment CommonWrite VDL Change Add a comment reminding the reader that CcSetFileSizes only needs to be called on a ValidDataLength change if the VDL value has decreased. A write operation cannot result in a decrease therefore CcSetFileSizes does not need to be called from within AFSCommonWrite(). Change-Id: I06aae37390038f4eb72b71941a732cb330fceee9 Reviewed-on: http://gerrit.openafs.org/9757 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9769 commit 55d82bfca3166dedec08667a0c2e1002784313f7 Author: Jeffrey Altman Date: Tue Apr 9 10:35:52 2013 -0400 Windows: CcPurge range modified by non-cached write When a non-cached non-paging write occurs, the update bypasses the Windows cache. As a result any cached data in the modified range is now invalid and must be purged. CcPurgeCacheSection is known to trigger some filter drivers to open the file from a worker thread. To avoid a deadlock on the Fcb->NPFcb->Resource that resource must be dropped. Holding the SectionObjectResource exclusive is sufficient to protect against races with other writes, reads and SetEndOfFile operations. While purging the cache prior to calling the service might be more desireable, it cannot be done safely without violating the lock hierarchy. Therefore, the purge is performed after any call to the service completes. Change-Id: I08cd6d9d25f1395e9b5b71dc225ae5827bbe33c7 Reviewed-on: http://gerrit.openafs.org/9756 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9768 commit 00550ff8a41b530fa1e4fcd287c50d03803d2bb4 Author: Jeffrey Altman Date: Tue Apr 9 08:12:29 2013 -0400 Windows: Race between NonCached and Cached Writes The following race was identified by Rod Widdowson. A. File is complete up to 1000 Eof=1000, VDL=1000 B. File Eof is set to 2000. Eof=2000, VDL=1000 (SetInfo doesn't move VDL) C. Locks dropped. Thread1) Write comes in for 1000 for 500. This is not extending. Locks taken shared. Thread1) Data Written to Server. Thread stalls. Thread2) Read comes in for 1000 for 1000. Locks taken shared so it proceeds. Thread2) CcRead calls CcZero and so the cache get zeros from 1000 to 2000 Thread1) VDL moves forward. The windows cache is now poisoned between 1000 and 1500 and protected by the VDL. Any future reads gets the wrong data and any write to that part will cause an overwrite of zeros. Instead of holding the Fcb->NPFcb->Resource and Fcb->NPFcb->SectionObjectResource shared during a NonCached write, hold it exclusive because the write is occurring behind the back of the windows cache. Change-Id: Ifffbc6dd36a6ed79766be1f2d3e729f23f41fe3f Reviewed-on: http://gerrit.openafs.org/9754 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9767 commit 36a8058b50257b93bb82f987f45a215c492da8a3 Author: Jeffrey Altman Date: Sat Apr 6 16:38:59 2013 -0400 Windows: DirectIO AFS_INVALIDATE_DATA_VERSION Implement cache flush and purge operations in response to AFS_INVALIDATE_DATA_VERSION requests when DirectIO processing is in use. Change-Id: If37ee4b3486a7a112f34bb07cc433f4832fdab8d Reviewed-on: http://gerrit.openafs.org/9744 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9766 commit 5fbd6f682d310e4227aef046373134a50eeebccb Author: Jeffrey Altman Date: Sat Apr 6 16:31:07 2013 -0400 Windows: AFS_INVALIDATE_DATA_VERSION only by service Let the service make all decisions regarding when a data version invalidation should be initiated. If during directory enumeration or entry validation a data version change is noticed, that is an indication that the meta data should be updated. Change-Id: Id6aa23124521db5cbc6117e850818d7ea3024aef Reviewed-on: http://gerrit.openafs.org/9743 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9765 commit 35c60eb0a487ca4666160543e2d90faaa25a8438 Author: Jeffrey Altman Date: Sun Apr 7 08:26:18 2013 -0400 Windows: Update ValidDataLength on all nonPagingIo Instead of updating the Fcb->Header.ValidDataLength only when processing cached writes, update it for all non-PagingIo extending writes. This ensures that a file that is extended by a mixture of cached and non-cached (NO_INTERMEDIATE_BUFFERING) writes will properly trigger a page fault when the Windows cache manager does not have a complete page cached. Change-Id: I93db003817cd12403dac07164a6d8f4ee7d0abc3 Reviewed-on: http://gerrit.openafs.org/9742 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9764 commit 31fdb07b669ed321627d28ae4412745e42e915ab Author: Jeffrey Altman Date: Mon Apr 8 08:56:31 2013 -0400 Windows: hold locks during non-cached writes Writes can alter both the EndOfFile (Fcb FileSize) and the ValidDataLength which must remain synchronized with the data known to the service. Dropping the Fcb.Resource and the SectionObjectResource prior to performing non-cached writes opens the possibility of a race in which data changes and length updates can be altered independently. Efforts are made to avoid holding locks across calls to the service because they can result in deadlocks with object invalidation or extent management. However, object invalidation for data version changes are now handled in a worker thread. It should be safe to hold onto the Fcb Resource and SectionObjectResource across non-cached write processing. The locks are not held in the paging IO path so paging non-cached writes (which cannot be extending) will not prevent cached writes from taking place in parallel. The reason it is critical for the ValidDataLength and the FileSize to remain in sync with the data for non-paging non-cached writes is that these values are used to determine whether the Windows cache manager should trigger a page fault to read data from the service upon receiving an extending cached write that doesn't fill the page. Change-Id: I80736daafdb9e6edcc1eeec9a9203fdaad28dfe8 Reviewed-on: http://gerrit.openafs.org/9745 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9763 commit e97a55de3fba782a3d2305e476bf6cd671ccb802 Author: Jeffrey Altman Date: Mon Apr 8 23:41:48 2013 -0400 Windows: DOS Device VolumeInfo max name length In 1.7.2200 the AFS Redirectory began to return cellname{%,#}volume as the volume label in the Volume Information response. For UNC paths this is fine but for DOS devices on Windows 7 and earlier returning a volume label that is longer than the NTFS maximum label length (32 characters) results in the Explorer Shell treating the volume as if it does not support long file names. From this patchset forward if the FileObject->FileName indicates that the query is for a DOS Device, only return the AFS volume name and not the cell informmation in the Volume Information response. FIXES 131632 Change-Id: Iff751051bc6f5a3cfdafd569da13fdf68bb6e26b Reviewed-on: http://gerrit.openafs.org/9751 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9762 commit ab51c5db5d03110c68d0e5612cda50131523e7ff Author: Jeffrey Altman Date: Mon Apr 8 23:37:39 2013 -0400 Windows: \\afs\all is not a server for NP enumeration \\afs\all is a special share name that refers to the global root which in the AFS redirector is actually \\AFS. However, from the perspective of the network provider interface \\afs\all is just a share which refers to a directory. Do not treat attempts to evaluate it as if they were the same as evaluating \\AFS. One is a global enumeration (\\AFS) and the other is just a hidden share name. Change-Id: Idc415ac304c4805c1682c6554fe2304778b5f318 Reviewed-on: http://gerrit.openafs.org/9750 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9761 commit 3ba7262e04baaa3107067826fe18c1a7d7c6003b Author: Jeffrey Altman Date: Mon Apr 8 21:54:57 2013 -0400 Windows: AFSConfigureTrace process DebugFlags Do not ignore the DebugFlags value if it is only value that has been changed. Change-Id: Ie8682ce398fff01bb5411ea63fd772f740120818 Reviewed-on: http://gerrit.openafs.org/9749 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9760 commit a9e4670d509bc7f055003bf2a0a69ec2a671515b Author: Jeffrey Altman Date: Mon Apr 8 21:51:48 2013 -0400 Windows: Runtime RDR Trace Toggle Modify the IOCTL_AFS_CONFIG_LIBRARY_TRACE DeviceIoControl message to pass an AFSDebugTraceConfigCB which is used to toggle the value of the Library's AFSDebugTraceFnc pointer. When the trace log is enabled, the AFSDbgLogMsg parameter is non-NULL and when the log is disabled, the parameter is NULL. Change-Id: Iffcb2b25d7cc77b8d41a50c8f9967a4c41944e7d Reviewed-on: http://gerrit.openafs.org/9748 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9759 commit 8605d551452d716a286044b77506b3dde2628d41 Author: Jeffrey Altman Date: Mon Apr 8 09:26:28 2013 -0400 Windows: CM_CONFIG_DATA_VERSION 23 The cm_volume_t data structure changed. Increment the data version for the 1.7.24 release. Change-Id: Ib987265cd5b453cec76add161d5c5a1955b668c6 Reviewed-on: http://gerrit.openafs.org/9746 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9758 commit 05e20f3d379021d3f1de1ccbfb5ca06e782e3b37 Author: Jeffrey Altman Date: Thu Apr 4 10:47:38 2013 -0400 Windows: Avoid unnecessary Ccb->DirectoryCB->ObjectInformation In almost all cases where an AFSCcb is present the associated AFSFcb is also present. The AFSFcb has a direct pointer to the AFSObjectInfoCB. This patchset replaces the Ccb->DirectoryCB->ObjectInformation references with Fcb->ObjectInformation. This avoids one level of pointer indirection and will make it easier to remove the DirectoryCB ObjectInformation pointer in the future. Reviewed-on: http://gerrit.openafs.org/9724 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6aa6639b619636c5d63d6413956ed980844160b1) Change-Id: I99731f570c84b0d8c12a782eb1b89436e82d945c Reviewed-on: http://gerrit.openafs.org/9741 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b5dd09557a5ff2b2ffbcedb4608c0bfa94ccbd2b Author: Jeffrey Altman Date: Wed Apr 3 23:37:53 2013 -0400 Windows: AFSInitPIOCtlDirectoryCB Vol ObjInfoTree Hold the VolumeCB->ObjectInfoTree.TreeLock exclusively when calling AFSAllocateObjectInfo() in order to protect the lists of child objects. Reviewed-on: http://gerrit.openafs.org/9723 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e762eec9ac9b648e9878e03e4b3bf185d2e2a1c3) Change-Id: I09c55d88958e115f4dab52729cee79fb58144e6e Reviewed-on: http://gerrit.openafs.org/9740 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 35fdcc752e52596f962c607a841ed8fceffd26b4 Author: Jeffrey Altman Date: Wed Apr 3 23:33:40 2013 -0400 Windows: Switch to Interlocked ops for RDR Set/Clear Switch to using interlocked operations for the SetFlag and ClearFlag macros. Reviewed-on: http://gerrit.openafs.org/9722 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dd73c9c1ef98b94ee1f4e870b52e2604422595e3) Change-Id: If462505f48f6d87ae3e655566e5ad97c068f4317 Reviewed-on: http://gerrit.openafs.org/9739 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 433d6e9d312b19b0d13b84bf0383009826aa7ef7 Author: Jeffrey Altman Date: Tue Apr 2 14:13:57 2013 -0400 Windows: AFSDeleteDirEntry set input to NULL AFSDeleteDirEntry() frees the memory allocated to the DirectoryCB. To ensure that an invalid memory pointer is not accidentally used by the caller after the memory is freed, use InterlockedCompareExchangePointer() to set the input parameter to NULL prior to destroying the DirectoryCB. Reviewed-on: http://gerrit.openafs.org/9721 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 76e33082d12eaeaaf87df53986b46a508c7ad68d) Change-Id: I5413a4dff4a550025975f752b9a65400e92aa035 Reviewed-on: http://gerrit.openafs.org/9738 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c589dd95f856c1f1e70b06825b1c0ff4fcb07c5 Author: Jeffrey Altman Date: Tue Apr 2 00:46:27 2013 -0400 Windows: AFSPrimaryVolumeWorkerThread reorg Periodically there is a lost race which results in a valid DirectoryCB with a non-NULL ObjectInformation pointer that refers to freed memory. This major reorganization simplifies the logic and attempts to close potential loopholes. First, the AFSExamineDirectory() function is removed and replaced by a call to AFSDeleteDirEntry(). The AFSExamineDirectory() function examined all of the children AFSObjectInfoCB objects which in turn duplicated much of the logic of AFSExamineObjInfo at the cost of increased complexity due to the additional layer of locked objects. Once the AFSDirectoryCB is removed a subsequent pass of the worker thread will free the AFSObjectInfoCBs. Second, the AFS_OBJECT_REFERENCE_DIRENTRY category had been used for both DirectoryCB references and the Pioctl references. A new AFS_OBJECT_REFERENCE_PIOCTL category has been created to improve the ability to track the allocations and releases. Third, the AFSPrimaryVolumeWorker thread now attempts to hold onto the VolumeCB TreeLock exclusively. Previously the lock was held shared. However, it is not safe for both the garbage collection and the find routines to both be shared. One has to be exclusive. Although holding the TreeLock exclusively in the garbage collection processing will result in the lock being held for extended periods of time, it is more likely that there will be benefits from parallel access during AFSFindObjectInfo() calls. Attempts to obtain most other locks are non-blocking. If the lock cannot be obtained, the object must be in use. Therefore, it should not be garbage collected. Reviewed-on: http://gerrit.openafs.org/9720 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba78ac675c2a90359dedc9cf16e38e6d7e606eaf) Change-Id: Ia72186a7406f24fe66d2a1dbefe562d91c2c14aa Reviewed-on: http://gerrit.openafs.org/9737 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 531ebbd4533c4545321ceff1c34b9b6d621ad263 Author: Jeffrey Altman Date: Tue Apr 2 00:40:54 2013 -0400 Windows: FindObjectInfo refcnt under lock AFSFindObjectInfo performed the search of Volume object tree protected by the TreeLock but dropped the lock before incrementing the reference count. This behavior contributed to a race with the AFSPrimaryVolumeWorkerThread which has to drop the VolumeCB TreeLock periodically in order to safely cleanup FCBs. Reviewed-on: http://gerrit.openafs.org/9719 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9285cc3d5270306377ef3d6f90468129a8cfd376) Change-Id: I1eb87bf7eabb9a3c152dfc31ac2727b8970b0b61 Reviewed-on: http://gerrit.openafs.org/9736 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 22933c6b941dd41da782ec605e00921eeb6a80ba Author: Jeffrey Altman Date: Thu Mar 28 00:32:37 2013 -0400 Windows: AFSDeleteDirEntry Protect against NULL reference Now that AFSDeleteDirEntry can be called with a DirectoryCB whose ObjectInformation pointer can be NULL, protect against unintentional dereference. Reviewed-on: http://gerrit.openafs.org/9691 Reviewed-by: Mark Vitale Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 559674b36b0f58060e564786b4969ab9e6f777a8) Change-Id: Ib7d7a96a97e257635ef95b8e177cb70f82df662f Reviewed-on: http://gerrit.openafs.org/9735 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e81040ca039cdc0831cf5933137fcd3cab01d198 Author: Jeffrey Altman Date: Tue Mar 26 09:02:00 2013 -0400 Windows: AFSDeleteObjectInfo AFS_OBJECT_HELD_IN_SERVICE Move the check for AFS_OBJECT_HELD_IN_SERVICE until after the TreeLock is held. Reviewed-on: http://gerrit.openafs.org/9674 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a8383140c9ca238657e8bf1ce63f8ef7d571cdac) Change-Id: I235e7eb95a354d839629dbbe2e37e7c32bdea10c Reviewed-on: http://gerrit.openafs.org/9734 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2d68b10981331f0b4d0d962d4b892529f3837c1c Author: Jeffrey Altman Date: Tue Mar 26 09:01:17 2013 -0400 Windows: Add comment to AFSInitDirEntry Reviewed-on: http://gerrit.openafs.org/9673 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 774bc5eb6be5cc7cab5d86dd40438e18cc7f3da7) Change-Id: Ib010c49b3a39ae9a92d67a130bab5df699f08310 Reviewed-on: http://gerrit.openafs.org/9733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 450c5e8d248e3b005fcb26f1fefac63eafeb7522 Author: Jeffrey Altman Date: Tue Mar 26 08:59:14 2013 -0400 Windows: AFSDeleteDirEntry deleted flag shuffle Move the assignment of the deleted flag earlier in AFSDeleteDirEntry() to avoid potential invalid memory access. Reviewed-on: http://gerrit.openafs.org/9672 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f915b4ef15bf815d9405284130e031bd558ce8f1) Change-Id: Ie8ffa154c9caf80f7cbd479a79f0cb5c17320fd5 Reviewed-on: http://gerrit.openafs.org/9732 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 67018ed214b0053855b61c50674fc0054a8fe2eb Author: Jeffrey Altman Date: Tue Mar 26 08:56:19 2013 -0400 Windows: Protect AFSDeleteObjectInfo calls Only permit AFSDeleteObjectInfo() to be called if the reference count returned by AFSObjectInfoDecrement() is zero. Reviewed-on: http://gerrit.openafs.org/9671 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7252f3125da093a1f9de5ef7ded470ddad12eb9d) Change-Id: Id099faf08ebd9d51a82b8903840b32950c32b159 Reviewed-on: http://gerrit.openafs.org/9731 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5ed6e9fa03a3c270fe8f95a3882981a628b2420a Author: Jeffrey Altman Date: Tue Mar 26 08:52:59 2013 -0400 Windows: AFSExamineObject() refcnt underflows Now that the reference counting is likely to be correct, do not garbage collect objects with negative reference counts. If the reference counts are wrong the objects will never be destroyed but that is now a safer choice than freeing memory that might be in use. Reviewed-on: http://gerrit.openafs.org/9670 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 36fee95e32835cf20286c5225e56b303dd4563da) Change-Id: Idafa8a58f362cfb082ddaee32715b1ff8550249d Reviewed-on: http://gerrit.openafs.org/9730 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fc1607c1545bb4e4256cf0cebb6717ebb2909f77 Author: Jeffrey Altman Date: Sat Mar 30 20:16:48 2013 -0400 Windows: FileSystemAttributes = FILE_READ_ONLY_VOLUME Instead of testing for Characteristics = FILE_READ_ONLY_DEVICE which applies to the entire device, only return media protected errors if the volume FileSystemAttributes include FILE_READ_ONLY_VOLUME. Reviewed-on: http://gerrit.openafs.org/9699 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5c2a770e0ed02b2cae658a7cbf30e91105194a57) Change-Id: I77cf4c8c35e181c86af2cd8e41099b0a8ee139fb Reviewed-on: http://gerrit.openafs.org/9729 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6e28b6e3373b54055da64c6e910921e47cd20c50 Author: Jeffrey Altman Date: Sat Mar 30 20:15:42 2013 -0400 Windows: RDR DeviceObject Characteristics Set both FILE_DEVICE_SECURE_OPEN and FILE_DEVICE_REMOTE when creating Device Objects for the AFS Redirector. Reviewed-on: http://gerrit.openafs.org/9698 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9174531dca75f1f2d235ed806f784422792c3ab2) Change-Id: Ia820dfa0744201ebb46be5be62fcfe1b68bcaf9e Reviewed-on: http://gerrit.openafs.org/9728 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f5ccaf3e58fd29eeb2b40586d65d39f7c918f51d Author: Jeffrey Altman Date: Sat Mar 30 19:58:12 2013 -0400 Windows: Move AFSVolume functions to new file In an effort to declutter AFSFcbSupport.cpp, move AFSVolume functions to a new source file, AFSVolume.cpp. Reviewed-on: http://gerrit.openafs.org/9697 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8f04ab0b61d3b254d187b6c057c781ba9ebd7a0d) Change-Id: I300db7a9c41e471c30590bee7109ebcacfbe2ded Reviewed-on: http://gerrit.openafs.org/9727 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 454e452f921e489b434c60caa04b3f3da32a24ca Author: Jeffrey Altman Date: Sat Mar 30 19:54:11 2013 -0400 Windows: Move Name Array functions to new file In an effort to reduce some of the clutter in AFSGeneric.cpp, move the Name Array functions to AFSNameArray.cpp. Reviewed-on: http://gerrit.openafs.org/9696 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7cfbfc3d2c8157978d2faaf55ce88c9ada88ffac) Change-Id: I546e11ab1be9786a31348e7337d4565dc05a722e Reviewed-on: http://gerrit.openafs.org/9726 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 68e735d6172ec92fe048feda249404250ccbc9e0 Author: Jeffrey Altman Date: Thu Mar 28 12:06:34 2013 -0400 Windows: AFSDeleteObjectInfo InterlockedCompareExchangePointer Correct the third parameter passed to InterlockedCompareExchangePointer in AFSDeleteObjectInfo() which prevented *ppObjectInfo from being set to NULL. Reviewed-on: http://gerrit.openafs.org/9689 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bc1b79d030eb9e2b9076edb90cce7807dae5d949) Change-Id: I59d06ac477812f749689cc4294200850dce32878 Reviewed-on: http://gerrit.openafs.org/9718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c5020cd9e9a1bdbbafdf6680718503d34431cc5a Author: Jeffrey Altman Date: Thu Mar 28 00:28:35 2013 -0400 Windows: additional AFS_SUBSYSTEM_OBJECT_REF_COUNTING Add missing cases of reference count value changes which were not being logged. Reviewed-on: http://gerrit.openafs.org/9690 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a8a6b8dd93082579d08282c65a6437d66fc5facc) Change-Id: I2e8e162896ebbd1d8902bd3639edc100976648ef Reviewed-on: http://gerrit.openafs.org/9717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bb090d8d4d1c79ce5fda74c247b488f1c522322a Author: Jeffrey Altman Date: Tue Mar 26 08:21:49 2013 -0400 Windows: add AFS_OBJECT_REFERENCE_FS_REQ Add a new object reference category AFS_OBJECT_REFERENCE_FS_REQ which is used to avoid overloading AFS_OBJECT_REFERENCE_DIRENTRY. Reviewed-on: http://gerrit.openafs.org/9668 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f2e6a92f4435df8d6a632995b08f2b98bb65e0bc) Change-Id: I6b5e24cc8d891d968800dc46e7f314aa83e5891c Reviewed-on: http://gerrit.openafs.org/9716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 885dd930d22614aba397a644f95abead8fd38529 Author: Jeffrey Altman Date: Wed Mar 27 00:49:56 2013 -0400 Windows: cache readonly volume size information Cache the volume size information for .readonly volumes which can be reset when the volume callback is broken. This reduces the number of RXAFS_GetVolumeStatus RPC calls issues on .readonly volumes. Reviewed-on: http://gerrit.openafs.org/9681 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 50faf84b4b46b337cd576f4bcaceed423d63544b) Change-Id: I4a28ed8dd842f1eee81c46d9f66622c695417989 Reviewed-on: http://gerrit.openafs.org/9715 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 90dec897f6a1c955e4e4286399fa088764c08218 Author: Jeffrey Altman Date: Tue Mar 26 09:08:58 2013 -0400 Windows: btree enumeration bulk stats Each of the btree enumeration bulk stat operations include the directory object in the bulk stat list. If the only object in the list is the directory object, do not perform the bulk stat rpc as it just wastes time. All of the required objects are already cached with current callbacks. Reviewed-on: http://gerrit.openafs.org/9675 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b518ffc0da37d38f05fa1d35852500784caefba6) Change-Id: Ic8fe9f6d579fc507252a720012937a0bfa943e31 Reviewed-on: http://gerrit.openafs.org/9714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0d264140f8c6652018b0c613ad2149549e978bc3 Author: Jeffrey Altman Date: Mon Mar 18 23:55:39 2013 -0400 Windows: Version 1.7.2300 (1.7.23) Change-Id: I121db6b265f7ddab9b58bc1a57b0791b612700b7 Reviewed-on: http://gerrit.openafs.org/9632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 86301cb3fd6d42d7c48daef47a5934e88d2a7c7f Author: Jeffrey Altman Date: Mon Mar 18 23:49:56 2013 -0400 Windows: 1.7.2300 ChangeLog Change-Id: I24723381fb100706980183dd03c65f4a4fe63a55 Reviewed-on: http://gerrit.openafs.org/9631 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1d441162b8a8af673f2cb439e22f3da00c4e15e5 Author: Jeffrey Altman Date: Fri Mar 22 21:14:48 2013 -0400 Windows: Create Symlinks in Volume Roots Permit the CreateSymbolicLink API to create symlinks in volume root directories. Change-Id: If339ecac89eec7f89ff4907d1bba9bca85c698c3 Reviewed-on: http://gerrit.openafs.org/9656 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9658 commit a33ddda31d7135dd9b39398b6ee66f9ef6e3ea6f Author: Jeffrey Altman Date: Fri Mar 22 16:10:54 2013 -0400 Windows: Robocopy Symlinks This patchset enables AFS Symlinks and DFSlinks to be copied to a local NTFS disk using robocopy's /SL option. Separate print names and substitute names are now provided permitting the reparse data copied from AFS to be applied to a local disk object for recreation. Change-Id: Ifbd9cc82af4802c932023b579dc25c74b1bc47ce Reviewed-on: http://gerrit.openafs.org/9655 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9657 commit 2f2a5ac8c54581294f8a604592c826748478f503 Author: Jeffrey Altman Date: Thu Mar 21 07:57:34 2013 -0400 Windows: NPAddConnection no local name and connected The WN_ALREADY_CONNECTED error is only to be returned if a local device name (aka drive letter) is provided in the request. Otherwise, the proper return status is WN_SUCCESS if an unnamed connection is requested. Reviewed-on: http://gerrit.openafs.org/9642 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a0b015ecb214f9d655b28b895093dbb09fd8f001) Change-Id: I51e3a87513925ed15272c46d0ac2da78800ccaf4 Reviewed-on: http://gerrit.openafs.org/9654 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fc87ed55c865f89e5db2d55263009e9721c3bc6f Author: Jeffrey Altman Date: Wed Mar 20 16:23:59 2013 -0400 Windows: NPCancelConnection without drive letter When canceling a network connection to a UNC path, do not match connections that have drive letters assigned. Only cancel the connection if there it matches the UNC path and has no local name. Reviewed-on: http://gerrit.openafs.org/9640 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f7cf559480c04989c7c46126f2036fe78f301705) Change-Id: I5de276acfe2441eb74a6cf1ea1b5e2f2d4a85458 Reviewed-on: http://gerrit.openafs.org/9653 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c8b3242c84533597ba44522fee888288fda17802 Author: Jeffrey Altman Date: Fri Mar 22 00:54:36 2013 -0400 Windows: AFSDeleteObjectInfo InterlockedExchange Use InterlockedExchangePointer to disconnect the ObjectInformationCB pointer from the caller. This ensures that only one thread can successfully call AFSDeleteObjectInfo on the same object at a time. Reviewed-on: http://gerrit.openafs.org/9644 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ef5ea5120ea0af85d73fa7588dd0efc947a174d9) Change-Id: Ifd6644acd0051cb4d483933264f4a76ff772d8af Reviewed-on: http://gerrit.openafs.org/9652 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b4dd44b1315d3dce57124929f7526cf150b1f133 Author: Jeffrey Altman Date: Thu Mar 21 19:34:25 2013 -0400 Windows: FSCTL_SET_REPARSE_POINT NULL ptr dereference Avoid a potential NULL pointer dereference if the ParentObjectInfo object cannot be found. If the Btree lookup fails, do not call AFSCreateSymlink() and do not decrement the ObjectInfo refcount. Doing so will result in a BSOD. Reviewed-on: http://gerrit.openafs.org/9643 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ed1b562b8174028502099bd224e7e73740a89362) Change-Id: I9ae07f923863714df4b155e01e7e628719e150a9 Reviewed-on: http://gerrit.openafs.org/9651 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aac3e976fc86d816ed02f67ab60848016f789306 Author: Jeffrey Altman Date: Thu Mar 21 06:28:25 2013 -0400 Windows: Remove Driver Verifier warning of memory leak Work items are now queued in an AFSRedir.sys data structure and are not freed when AFSRedirLib.sys is unloaded. Therefore, do allocate the memory with AFSLibExAllocatePoolWithTag(). The allocation by AFSLibExAllocatePoolWithTag results in a false Driver Verifier warning of a memory leak on unload. Reviewed-on: http://gerrit.openafs.org/9641 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ce8ff9cbf66ad78a9b9dc5871a4bc4f3f9ee15d) Change-Id: I4f857c99fc2b51a03830ec024b4af93afd7d9682 Reviewed-on: http://gerrit.openafs.org/9650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 13d1782ebe240f3456a7593a9b10568aeba2ed82 Author: Jeffrey Altman Date: Wed Mar 20 10:10:03 2013 -0400 Windows: buf_ClearRDRFlag and cm_directIO When 'cm_directIO' is true, there are no RDR held buffers therefore there is nothing for buf_ClearRDRFlag() to do. Do not pass 'Go', do not obtain cm_scache.rw exclusive nor buf_globalLock shared. Simply return immediately. Reviewed-on: http://gerrit.openafs.org/9638 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3a31f5d90c490a23b3f59f50aa9ced63b8cb98af) Change-Id: I3d994ca361f3a512ad86b031a7a53fb381e4f241 Reviewed-on: http://gerrit.openafs.org/9649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ba1a49b928d2b221fa4cacfa003719bd5a674f1b Author: Jeffrey Altman Date: Wed Mar 20 10:08:21 2013 -0400 Windows: buf_RDRBuffersExist and cm_directIO If 'cm_directIO' is true, then no RDR buffers exist. Return immediately, do not pass 'Go', and do not lock and walk the buffer hash table. Reviewed-on: http://gerrit.openafs.org/9637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d3c04329a396cc82a71321bb209b783a1524018e) Change-Id: I607fdb4ed1c919b805eef708be66bed60e78f423 Reviewed-on: http://gerrit.openafs.org/9648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7686880191a159352874c86d95b4fcabc446b778 Author: Jeffrey Altman Date: Wed Mar 20 10:04:41 2013 -0400 Windows: buf_CleanVnode avoid lock contention In the middle of the big loop do not obtain buf_globalLock unless cm_buf.qFlags & CM_BUF_QREDIR is non-zero. buf_globalLock is heavily contested and any reduction in contention is an improvement. CM_BUF_QREDIR is never set when 'cm_directIO' is true (now the default) so this is a huge win. Reviewed-on: http://gerrit.openafs.org/9636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cda4f6c3ff92a35e2ff8b2eb114729144fff165f) Change-Id: I335a29ff96d9b88727efb09f991d2aff4e4bf7cf Reviewed-on: http://gerrit.openafs.org/9647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5ab708cbcebaad422e2b5d4b2027b5685539fd73 Author: Jeffrey Altman Date: Tue Mar 19 11:48:42 2013 -0400 windows: AFSQueryDirectoryQueryDirect no Symlinks When evaluating symlinks for directory enumerations, the response must properly set the FILE_ATTRIBUTE_DIRECTORY flag based upon the file attributes of the target. At the present time the target is not evaluated by the service and AFSQueryDirectoryQueryDirect does not have the correct context in which to evaluate the target. Instead of returning an incorrect result to the application, exit AFSQueryDirectoryQueryDirect() returning STATUS_REPARSE_OBJECT which is interpreted by AFSQueryDirectory() to perform a full directory enumeration. Reviewed-on: http://gerrit.openafs.org/9633 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit f9dac53a75aff66696f78255ed08cc49c696d337) Change-Id: Ic4c88725ecf39fbc08dbe29491c4b8eed7bb9d89 Reviewed-on: http://gerrit.openafs.org/9646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6612f8049edaebdb3780d6e9838b56aaae755cde Author: Jeffrey Altman Date: Mon Mar 18 22:43:09 2013 -0400 Windows: 1.7.23 Release Notes Add explanation of Win 7 Explorer Shell Read-Only Volume vs Network Drive Letter Mapping bug. Reviewed-on: http://gerrit.openafs.org/9634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 46a61f61c2432c53a787724e88925cb823fac012) Change-Id: I32ff2f61d4bbdf12a5f1ee1af8e317662ae2c6f0 Reviewed-on: http://gerrit.openafs.org/9645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 815ec40ba0b99124b0e690662fa884dc96fc4ece Author: Jeffrey Altman Date: Mon Mar 18 12:07:55 2013 -0400 Windows: Avoid cm_Analyze race on cm_serverRef lists cm_Analyze() accepted as a parameter a pointer to the first element on a cm_serverRef list which is only ever used for VL operations. cm_Analyze() would separately call cm_GetVolServerList() to obtain the cm_serverRef list for RXAFS operations. Then the variable 'serversp' would be set to the first element of the list. 'serversp' was then used to refer to the list and would be passed to cm_SetServerBusyStatus() and cm_ResetServerBusyStatus() which would in turn obtain the cm_serverLock while it manipulated the cm_serverRef status flags for the elements in the list. The problem is that passing a pointer to the first element of the cm_serverRef list without holding cm_serverLock can permit the list contents to be altered including removal of the first element. If the race is lost and the memory associated with the first element is freed before access, the afsd_service.exe will crash. This patchset makes a number of changes. First, the cm_serverRef_t parameter is changed from a pointer to the first element of the list to be a pointer to the HEAD pointer of the list. Since it is ever only used for cm_cell.vlServerp lists, the parameter is renamed to 'vlServerspp'. Second, a separate "cm_serverRef_t ** volServerspp" variable is allocated for the return value from the cm_GetVolServerList() operations. cm_SetServerBusyStatus() and cm_ResetServerBusyStatus() are altered to accept a pointer to the HEAD of the list instead of a pointer to the first element. The cm_serverLock is now held read instead of write because the list itself is not being altered. All of the state changes being applied to the cm_serverRef objects are atomic. Finally, cm_serverLock is held across all list traversals within cm_Analyze(). A read lock is obtained if the elements of the list are not being removed or inserted and a write lock is obtained if they are. Reviewed-on: http://gerrit.openafs.org/9625 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b5675b57f815722f8c37fcfed5a2bd7b1ef112d6) Change-Id: I24b318948f876dacba155752900889eb63b5b69b Reviewed-on: http://gerrit.openafs.org/9629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ce12d7e54fa726d450a1e59fb95b79623a0b4d44 Author: pete scott Date: Wed Mar 13 07:54:00 2013 -0600 Windows: Replace AFSDbgMsgLog func with macro In order to reduce computation overhead when trace logging is not active replace the AFSDbgMsgLog function call with a macro, AFSDbgTrace. Reviewed-on: http://gerrit.openafs.org/9621 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 19dc2fac408bd619f67c2e7ee29b42c81c1150bc) Change-Id: I7ebca240a1719f7d75419347c2ea1af6f4a6a6fa Reviewed-on: http://gerrit.openafs.org/9628 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5f72d0ebd96193cd4b09ed901e8af14c7d590a6e Author: Jeffrey Altman Date: Sun Mar 17 08:43:39 2013 -0400 Windows: Test AFS_DBG_FLAG_BREAK_ON_ENTRY earlier During AFSRedir.sys initialization, check the AFS_DBG_FLAG_BREAK_ON_ENTRY registry flag before initializing the trace log system. Reviewed-on: http://gerrit.openafs.org/9622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1437789abaf86a6448d7a2d8dc197876ab2a9ea6) Change-Id: I860fdf4761add55468af2cfe1758bb6dfe275f5a Reviewed-on: http://gerrit.openafs.org/9627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 05c29543b111c36bd8eb161119f51eb4fc03d1c3 Author: Jeffrey Altman Date: Fri Mar 15 11:40:29 2013 -0400 Windows: Increase AFS DeviceObject StackSize Increase the StackSize parameter of the DeviceObjects allocated by the AFS Redirector framework. The StackSize parameter is used to notify callers how many Irp Stack frames will be consumed. Now that the redirector is using IoCompletion routines, an additional stack frame is required to handle calls to the AFS Redirector library driver. Thanks to Peter Scott for identifying the solution. FIXES 131618 Change-Id: Ib66f884911f0d425e6e07f338a36b3ebedeb8871 Reviewed-on: http://gerrit.openafs.org/9609 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f493a652b28e5e5606e0ec6741b884545b5d1902) Reviewed-on: http://gerrit.openafs.org/9624 commit b9cb35f5a05efddaf33a3578e116f5bd801b7b7e Author: Jeffrey Altman Date: Sat Mar 16 01:18:14 2013 -0400 Windows: File Attribute Reporting Consistency Do a better job of consistently reporting file attribute information via directory queries and file information queries. Avoid computing file attribute information for file information queries that do not return them (e.g., Name Information) because computing it is expensive. Reviewed-on: http://gerrit.openafs.org/9613 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 830744ff437a27b00044e7e94f3824b0db969c0b) Change-Id: Ia9c5ec1dc3dc4f6bc58fd74b0d99fe14cacfe28e Reviewed-on: http://gerrit.openafs.org/9620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 192c51b48ed3751a7c81fe51373a95719d3d715d Author: Jeffrey Altman Date: Sat Mar 16 01:15:01 2013 -0400 Windows: netbios name comparisons are case insensitive When parsing the symlink target string to categorize it as AFS Symlink or DFS Link, the comparison with the netbios name string must be case insensitive. Otherwise, symlinks are reported to the redirector as DFS Links. For the most part they will work since the AFS redirector requesting MUP to Reparse the \\AFS path will call back into the AFS redirector. However, the attributes on symlinks to files will be wrong as DFS Links can only be links to directories. Reviewed-on: http://gerrit.openafs.org/9612 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 170bbbdb93df64d3657026e13aba26c40d93f51d) Change-Id: I63d5e840f7dfeb34a1ee88d47c37d9c2be52a6d7 Reviewed-on: http://gerrit.openafs.org/9619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7306bfac3e3e1c99324d901b6162d1537b525248 Author: Jeffrey Altman Date: Sat Mar 16 01:13:01 2013 -0400 Windows: add RDR_ExtAttributes Add RDR_ExtAttributes to compute the file attributes for redirector queries. The attributes reported via the RDR interface need to be different from the SMB interface because the SMB interface does not support reparse points nor does it support DFSLinks. Reviewed-on: http://gerrit.openafs.org/9611 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a8599a126513548bac790a2cbe4cbd1153312ef5) Change-Id: I5835f5f275c14e3d329ef98e80a432a5f44eda81 Reviewed-on: http://gerrit.openafs.org/9618 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ab8fa78f32bf398c040d79ed48f20866feeaee3e Author: Jeffrey Altman Date: Fri Mar 15 13:07:21 2013 -0400 Windows: drive mapping enumeration infinite loop If WNetEnumResource returns an error as opposed to success, such as ERROR_UNEXP_NET_ERR, the enumeration loop would retry forever passing zero for 'cEntries' which in turn results in a successful response containing zero entries. Change the while conditional to test for continued success instead of ERROR_NO_MORE_ENTRIES. Reviewed-on: http://gerrit.openafs.org/9610 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e5966117c4f0db631e0e25fc27f63e4caa76fa23) Change-Id: I81d514fd9aa0a72c4a6d341f5182602ae2da7862 Reviewed-on: http://gerrit.openafs.org/9617 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9b87bb2eccaf1710eb2b229148665e8036addf3c Author: Jeffrey Altman Date: Thu Mar 14 19:40:14 2013 -0400 Windows: remove last bits of BIOD from Direct Store Direct I/O Store operations are performed directly against a memory buffer stored in the background direct store rock structure. There is no BIOD used in the current implementation. Remove the BIOD from the call stack. Reviewed-on: http://gerrit.openafs.org/9607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 086b47404f7c79acd95fea04684a6af6fb09df1a) Change-Id: I21b94ae8b53095e71d15b027bd2321ef8aec26d1 Reviewed-on: http://gerrit.openafs.org/9616 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 04e5ed960d4ec7a14c19f571720c50746252e746 Author: Jeffrey Altman Date: Thu Mar 14 13:05:28 2013 -0400 Windows: VolumeInfoReadOnlyFlag registry option Windows 7 Explorer Shell has a bug when processing drive letters mapped to UNC paths whose target volume information specifies the FILE_READ_ONLY_VOLUME flag. When set, not only is the .readonly volume treated as read only but all volumes that can be accessed via the drive letter. This bug is fixed in Windows 8. Add a registry configuration option to permit configuration of the behavior. Sites that do not use drive letter mappings will want to enable it even on Windows 7 because it permits the Explorer Shell to disable the "Delete" and "Rename" options and others when the current directory is read only. The default is disabled on Win7 and below; enabled on Win8 and above. Reviewed-on: http://gerrit.openafs.org/9606 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit adb6add99a6cd1c22a4a11f531e6e94e66c45d9b) Change-Id: I174eed07b86e8fdcd744e2839fa27439e153f9f5 Reviewed-on: http://gerrit.openafs.org/9615 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 029a1b17792efe61cb9cba4001b96264f829fd99 Author: Jeffrey Altman Date: Thu Mar 14 12:30:36 2013 -0400 Windows: Protect against DirEntry with NULL ObjInfo During cleanup protect AFSExamineObjectInfo() and AFSExamineDirectory() from DirectoryCB objects that have a NULL ObjectInformation pointer. Reviewed-on: http://gerrit.openafs.org/9603 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ec5fd2ce07d2e8adfa5c34d978bc786f36dac044) Change-Id: I7354c5c3eabf698b2f1a800fe05e3651079f96f7 Reviewed-on: http://gerrit.openafs.org/9614 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9b90da7247c4f9fd55931488d1d5943892063354 Author: Jeffrey Altman Date: Tue Mar 12 13:02:23 2013 -0400 Windows: 1.7.22 (1.7.2200) version info Change-Id: I5f8569e34ccfe7dc4fc42abb29e9a36129584db1 Reviewed-on: http://gerrit.openafs.org/9592 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 216baf2bb644e7f57c95dceee733cb06349fabbb Author: Jeffrey Altman Date: Tue Mar 12 13:00:59 2013 -0400 Windows: 1.7.22 ChangeLog Change-Id: Ib5ad62f60e361eb0d74eb9b5e3d0df529e042f0b Reviewed-on: http://gerrit.openafs.org/9591 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 38820e214a6c16beadb88af04b70da9e7d7ccda7 Author: Jeffrey Altman Date: Tue Mar 12 10:59:44 2013 -0400 Windows: ReleaseNotes updates explicitly list WinRT as unsupported. Mention KFW 4.0. Update Reparse Point text. Update JPSoftware Take Command references. Update UNC path processing text. Reference PowerShell 3.0 and Cygwin. (cherry picked from commit efa28ec92af76bdeb59d557ae2849d71d669423e) Change-Id: Iddfaf04c7f0871f32af4adca473981b1f756e72f Reviewed-on: http://gerrit.openafs.org/9590 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f02a3c7d6b8b5a004a1a1d054d9ed966c002da69 Author: Jeffrey Altman Date: Tue Mar 12 00:38:05 2013 -0400 Windows: avoid null cellp dereference during dump When performing a memory dump if cm_ucell_t.cellp is NULL, do not attempt to print the cell name. Reviewed-on: http://gerrit.openafs.org/9582 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 4811f432ba51b53be4edf8288eaa61613e6b787c) Change-Id: I6162fde059667432c53330d67d3d995af358d89e Reviewed-on: http://gerrit.openafs.org/9586 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 44f530bb335820dc19418687963c65755868b994 Author: Jeffrey Altman Date: Thu Dec 6 23:28:56 2012 -0500 Revert "Windows: Treat all cached writes as write-through" This reverts commit 5130681fa2d4a35d3f0b578d92c5db1892fdfb18. Reviewed-on: http://gerrit.openafs.org/9572 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3e4daf06a6e18d1a151b7de0b76b1a1698bdc814) Change-Id: I1642538cae4e5b95b7db9da81b9fe71284078a33 Reviewed-on: http://gerrit.openafs.org/9585 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c6492f783fafb616fdaa47ee55f4830a51b0fa8a Author: Jeffrey Altman Date: Mon Mar 11 00:43:26 2013 -0400 Windows: Enforce free space checks every 1MB Instead of performing a free space (or quota) check on every extending write, perform the check only when the file length is increased beyond the next 1MB boundary. The file server permits 1MB quota over runs and issuing the volume status rpc to the file server is extremely expensive. Especially for append only applications that write just a few bytes at a time. Reviewed-on: http://gerrit.openafs.org/9555 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit eecf7a1372f8fcb01d73b628850b488414d9ca3a) Change-Id: I3f7b0233189b6bdc2cb76580e3597438ae7e47f3 Reviewed-on: http://gerrit.openafs.org/9584 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fee7b5438c5f539f2c0f00875c59bae0033f1470 Author: Jeffrey Altman Date: Fri Mar 8 01:41:22 2013 -0500 Windows: Use Microsoft IO_REPARSE_TAG_SYMLINK tag For symlinks and DFS Links use Microsoft's NTFS Symlink tag, IO_REPARSE_TAG_SYMLINK, instead of the OpenAFS assigned tag. The DeleteFile() and RemoveDirectory() Win32 APIs do not delete non-Microsoft reparse points and instead delete the target object. While it is possible for Take Command and potentially Cygwin to alter their behavior with AFS specific knowlege, it is not possible to alter the Explorer Shell, cmd.exe and powershell. Using the Microsoft tag is a violation of Microsoft policy. Reviewed-on: http://gerrit.openafs.org/9497 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2998ab45353e631a348d1dded9ff21b8438628a0) Change-Id: I17e0f8a8dfc6ec394799eac2fc240055c4915932 Reviewed-on: http://gerrit.openafs.org/9580 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8f42a6b5f2061569005d364def787842c731d786 Author: Jeffrey Altman Date: Thu Mar 7 00:54:32 2013 -0500 Windows: GetReparseData UNC path format When specifying UNC paths for Symlink and UNCLink targets output the paths using true UNC notation "\\server\..." instead of "\server\...". Reviewed-on: http://gerrit.openafs.org/9426 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 241382e3bf588269b5115fea1be0f782de43ca2a) Change-Id: I7f0d67fa5e44905c46e3b0c158166671064f77e4 Reviewed-on: http://gerrit.openafs.org/9579 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 63b01c0486a0baec4859970cde707508181a1b27 Author: Jeffrey Altman Date: Thu Mar 7 09:25:09 2013 -0500 Windows: cm_BPlusDirEnumBulkStatNext index error In cm_BPlusDirEnumBulkStatNext the 'next' variable was being set even if the FileId was not added to the list of objects added to the cm_bulkStat array. Delay the assignment to ensure that 'next' refers to the first element in the array. In the CM_ERROR_BULKSTAT_FAILURE processing, 'next' is used to obtain a reference to the cm_scache object that is supposed to correlate to the [1] entry in the array. If 'next' == -1, there is no such entry. Add a conditional to ensure that 'next' is not used when its value is -1. Reviewed-on: http://gerrit.openafs.org/9450 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 470b57cc4a60d18aaab41a58b6a93f8baa3caead) Change-Id: I510cc8d99c306e607e4766bfa60ca54b9d3b74be Reviewed-on: http://gerrit.openafs.org/9578 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit eab9c0f7b98f9c13e0b723b7d78438096240ed7a Author: Jeffrey Altman Date: Thu Mar 7 00:59:01 2013 -0500 Windows: PopulateCurrentEntry Symlink Targets Handle a broader range of symlink target formats and be more precise regarding what is an afs symlink or a dfs link. Reviewed-on: http://gerrit.openafs.org/9428 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ee79fb61f5a0c996b76a37392b58be01bc8cf19e) Change-Id: Iec0f945c2572000a95e7253f5922270d2e4451a5 Reviewed-on: http://gerrit.openafs.org/9577 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2ab574d1eda7037900fffc6d1f7a436856da247f Author: Jeffrey Altman Date: Thu Mar 7 00:56:15 2013 -0500 Windows: Claim success for Delete Reparse Tag The typical pattern for deleting a reparse point is 1. open reparse point object 2. delete reparse tag 3. set delete on close 4. close handle Claim success when we receive delete reparse tag fsctl so that the delete on close disposition can be set. Reviewed-on: http://gerrit.openafs.org/9427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit abbee864c48fb2e439c4141130ada184fad23db5) Change-Id: I870f25bbddb5de551b99c0497491ca95e75ccde5 Reviewed-on: http://gerrit.openafs.org/9576 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6f882088af9226119c1e2710b0114cf884b62428 Author: Jeffrey Altman Date: Mon Mar 11 00:03:38 2013 -0400 Windows: Report actual volume creation time The cm_scache.volumeCreationDate is populated by any non-bulkstat callback issuing operation. If it is not set at the time the redirector requests volume information, force an RXAFS_FetchStatus and then use the resulting timestamp in the response. Reviewed-on: http://gerrit.openafs.org/9554 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d64cd65a23996a7bb79cfecfdc0383de72601497) Change-Id: Ia0a19898a4792655a606cf67824b671d0b57f151 Reviewed-on: http://gerrit.openafs.org/9575 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d157a4ccbe4245d6d41d17673db157cd98c11b17 Author: Jeffrey Altman Date: Sun Mar 10 10:51:47 2013 -0400 Windows: RDR_UpdateFile dscp != scp Do not set bScpLocked when obtaining scp->rw as scp != dscp. Reviewed-on: http://gerrit.openafs.org/9553 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 002d97363f01e0099519c35fc2f5a2af4305267e) Change-Id: Ic22e2f4e6f4eaf87f2931df3c1d3a08cc0ce5b72 Reviewed-on: http://gerrit.openafs.org/9574 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 60a8a7fa8cc5dd58c69202301cf08fccadfe7018 Author: Jeffrey Altman Date: Wed Mar 6 09:53:41 2013 -0500 Windows: Service processing for Symlink creation Initial support for symlink creation via the Win32 CreateSymbolicLink api. Add support for AFS_REQUEST_TYPE_CREATE_SYMLINK redirector requests via the new RDR_CreateSymlinkEntry() function. Since CreateSymbolicLink api creates a new directory or file object and then assigns the Microsoft reparse tag data to that object, RDR_CreateSymlinkEntry must first delete the empty directory or file and then create the new symlink object in its place. If the empty object can be removed but the symlink cannot be created, STATUS_FILE_DELETED is returned to indicate to the redirector that a failure occurred that changed the state of the directory without creating a new object. If the empty object cannot be removed, a STATUS_ACCESS_DENIED error will be returned and the empty object will unfortunately remain in the AFS directory. Target path translation is performed. Absolute AFS paths are stored in UNIX notation. Absolute non-AFS UNC and device paths are prefaced with "msdfs:". Reviewed-on: http://gerrit.openafs.org/9425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 75ee4fb1afce75316fd05b013b36a24f218118dc) Change-Id: Id4d01ab0c2bff817b46ef4ee6e8f9ba2ff0a6c59 Reviewed-on: http://gerrit.openafs.org/9573 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5e00d01fb15a47384a08235077961539f467e352 Author: Jeffrey Altman Date: Sun Mar 10 10:49:42 2013 -0400 Windows: IsSpaceAvail lock order violation cm_IsSpaceAvailable() obtains the cm_scache.rw lock of the volume root directory. Therefore it is a lock order violation to call the function while any other cm_scache.rw lock is held belonging to an object in the same volume. vnode 1 is always less than any other vnode value. Reviewed-on: http://gerrit.openafs.org/9552 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 249a5934605106f9025643321eb8e24f113fdd2a) Change-Id: I417590f6d82432c67cc13f5b3d3dbcbd56c1fa85 Reviewed-on: http://gerrit.openafs.org/9562 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e56875e7b5996952205704a33600eff731fe37cb Author: Jeffrey Altman Date: Sat Mar 9 15:43:14 2013 -0500 Windows: Fix directory to service null mask lookups The direct to service for non-wildcard lookups, commit b7ba97ad537bd0e9a241f052ddd1c3a50c74745b, introduced a bug when the search mask is left unspecified. Do not set bNonWildcardMatch to TRUE when the mask is NULL. Reviewed-on: http://gerrit.openafs.org/9542 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit f6180b9da6d2e89c9b8bbe62dc49f02f9ab6829a) Change-Id: Id2fd7800098c11f6f52e69867382a73fd1c53fe6 Reviewed-on: http://gerrit.openafs.org/9561 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0aefd520416996d0a0da6702b825b1b44166f3b0 Author: Jeffrey Altman Date: Thu Mar 7 22:05:20 2013 -0500 Windows: Permit deletion of reparse points AFSSetDispositionInfo did not set the AFS_DIR_ENTRY_PENDING_DELETE flag if the DirectoryCB type was mountpoint, symlink, dfslink or invalid. This patchset permits the flag to be set so reparse point objects can be deleted without using the AFS "symlink.exe remove" command. Reviewed-on: http://gerrit.openafs.org/9475 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 816834cc03317bdda7f9fad0afdd838aa3cea52a) Change-Id: I43a4b50b51e9b1eb375a58d6cec01ca9d7755f12 Reviewed-on: http://gerrit.openafs.org/9560 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7b3855f928be1c75cc346896a8d62b3bdf5d33d5 Author: Jeffrey Altman Date: Thu Mar 7 17:39:05 2013 -0500 Windows: AFSLocateNameEntry Backup Volume Change When AFSLocateNameEntry() calls AFSBackupEntry() in the name array it is possible that the DirectoryCB returned belongs to a different VolumeCB. If so, pCurrentVolume must be updated and reference counts must be adjusted. Reviewed-on: http://gerrit.openafs.org/9465 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 540a73dc18bfacebc72dfac2e3c3d9f06c87e18f) Change-Id: I53abb70f1ca887874c0311f86f5069d57908c172 Reviewed-on: http://gerrit.openafs.org/9559 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ca1f3afbca414222890b72b30893e2cef53fa353 Author: Jeffrey Altman Date: Thu Mar 7 17:28:36 2013 -0500 Windows: AFSLocateNameEntry OutVolumeCB can be NULL It is possible for the AFSLocateNameEntry OutVolumeCB parameter to be assigned a NULL value upon return. Handle it in the callers. Reviewed-on: http://gerrit.openafs.org/9464 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit c9846c9e804299de41a298adf69c9c0666d8ec85) Change-Id: Ief17ed8a0d4f73cb20931dcd6f20355faafb33d3 Reviewed-on: http://gerrit.openafs.org/9558 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3eb9fe1b64d3f68504ad4f47b4534b0815a03f91 Author: pete scott Date: Tue Mar 5 13:21:41 2013 -0700 Windows: RDR SymbolicLink create support Permit the redirector to handle Microsoft's IO_REPARSE_TAG_MOUNT_POINT and IO_REPARSE_TAG_SYMLINK requests. The IO_REPARSE_TAG_SYMLINK request is issued as a result of a CreateSymbolicLink Win32 API. Creating a symlink in Windows is not equivalent to the way a symlink is created in AFS or UNIX. Instead of creating a symlink object whose data string represents the target and mode bits indicate that the stream should be treated as a link, on Windows it is a two step process. To create a symlink to a directory, create an empty directory and then assign the reparse tag data to the directory object. To create a symlink to anything else, create an empty file and assign the reparse tag data to the file. Deleting a reparse point simply removes the reparse tag data and not the underlying directory or file. The way this will work for AFS is that assigning reparse data to an existing directory or file will require that the object be deleted from the directory and a new symlink object be created in its place. This is why upon successful completion of the upcall to the service the directory object information has the AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED flag cleared. This patchset permits symlink creation but does not do anything to support symlink removal. Symlink target data is not validated. Reviewed-on: http://gerrit.openafs.org/9424 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0cc602a065f5df9959f735ff14e05a6798b9b0b9) Change-Id: I1d481ca9b191e9e23391c16cf38f0ea1485644df Reviewed-on: http://gerrit.openafs.org/9557 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 725e403173c2f5f94166f69337e17b70d26db720 Author: Jeffrey Altman Date: Tue Mar 5 07:52:37 2013 -0500 Windows: Avoid race during cm_FreeServerList cm_FreeServerList obtains cm_serverLock exclusively and in some circumstances will call cm_FreeServer(). cm_FreeServer() will drop the cm_serverLock if the cm_server_t.refCount is zero in order to avoid a lock order violation when calling cm_GCConnections() since cm_connLock is higher in the lock hierarchy. The call to cm_FreeServer is performed after the cm_serverRef_t to be deleted is identified but before it is removed from the list. There is the potential for two threads calling cm_FreeServerList() to race and for more than one thread to attempt to delete the same cm_serverRef_t twice. Fix this by: 1. maintain a private copy of the cm_server_t pointer, delete the cm_serverRef_t and update the list pointers before calling cm_FreeServer(). 2. obtain and release a refcnt on the next cm_serverRef_t to ensure that it is not deleted out from underneath the thread in case the cm_serverLock is dropped. Reviewed-on: http://gerrit.openafs.org/9391 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 1b048f1f571eb02976a78a4dabafb3c677fbf9d0) Change-Id: I0ee55f76f1af181bc8c3d2ea79aeb76e9f7fa8f6 Reviewed-on: http://gerrit.openafs.org/9556 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8d2e4e6c45a1943ab2cceaa9095d2c1ef5d2c3e2 Author: Jeffrey Altman Date: Sun Mar 3 22:54:53 2013 -0500 Windows: AFSPopulateNameArrayFromRelatedArray change Modify AFSPopulateNameArrayFromRelatedArray so that the DirectoryCB parameter can safely be NULL. A NULL DirectoryCB input is required to copy the entire NameArray. Reviewed-on: http://gerrit.openafs.org/9340 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a3a79c5a15bff7e978ff4bae2d2a480b73750392) Change-Id: I43b1779db30aa345a89d9acd17644d1341a051ed Reviewed-on: http://gerrit.openafs.org/9384 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dead06e4e2aa65507e9775baa883110cef4a5099 Author: Jeffrey Altman Date: Sun Mar 3 22:10:39 2013 -0500 Windows: AFS_NAME_ARRAY_TAG value The AFS_NAME_ARRAY_TAG value collided with AFS_NAME_BUFFER_TEN_TAG. Change its definition. Reviewed-on: http://gerrit.openafs.org/9339 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 1ac432b7d0259a01e158016307966c76b3ba9d79) Change-Id: Ife31cdf48f73777c35c951223fa6a9f77e664b3f Reviewed-on: http://gerrit.openafs.org/9383 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e9fe43a7f292e6ef2aa1a852c320c9f12195ba5b Author: Jeffrey Altman Date: Sun Mar 3 14:16:35 2013 -0500 Windows: Add AFSCreateSymlinkCB data structures AFSCreateSymlinkCB and AFSCreateSymlinkResultCB Used for creating a symlink to either a file or a directory. Reviewed-on: http://gerrit.openafs.org/9338 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit 89b07844d318637cf8c643d60dd174cb1f71db87) Change-Id: Ib84cced422cd11296d65cc5a6f79f2efda65e5d2 Reviewed-on: http://gerrit.openafs.org/9382 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ea221c739d07abdeb653d8ad2f59812bdab96966 Author: Jeffrey Altman Date: Thu Feb 28 17:11:57 2013 -0500 Windows: afslogon !KA_USERAUTH_AUTHENT_LOGON Patchset 305133cde60fec7fb1050caf60a4319cdcf88a27 halted the practice of calling ka_UserAuthenticateGeneral2() with the alternate smbName. It should have halted the practice of passing flag KA_USERAUTH_AUTHENT_LOGON which indicates that the smbName parameter has been provided. Passing KA_USERAUTH_AUTHENT_LOGON without the smbName field results in a KTC_INVAL error. This error only impacts sites that still use kaserver or Kerberos v4 for authentication. Reviewed-on: http://gerrit.openafs.org/9318 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1c4e7ddb498f86b232f0f1de1f40690e97bf6a65) Change-Id: I0d2c23b2a7baf07f0e2b74479a665742e67c0cfa Reviewed-on: http://gerrit.openafs.org/9319 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a9311872cde5151610e2b00f032cf80369a6a12b Author: Jeffrey Altman Date: Wed Feb 27 15:21:56 2013 -0500 Windows: Build libafsauthent.dll against mtafsubik.lib Instead of building a private copy of the ubik objects, link against mtafsubik.lib. eviewed-on: http://gerrit.openafs.org/9302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 87f2a92afb58660846d39c71ce630c3acfb72020) Change-Id: Ie3c57d76709336261e11e2959eb384c1de990c78 Reviewed-on: http://gerrit.openafs.org/9307 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 933783a287a78f5e14be29dfe7406516ecce178a Author: Jeffrey Altman Date: Wed Feb 27 15:19:41 2013 -0500 Windows: afsio reduce library link list When linking afsio many of the libraries specified in the EXELIB3 list were unnecessary. The only lib in the list that is required is libcmd.lib. Rename EXELIB3 to LIBCMD and prune the rest. Reviewed-on: http://gerrit.openafs.org/9301 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 9d4f7ca48cf1f553bbb566e715fe986627a5d47f) Change-Id: Id77bf5f11d145806db71cd983d236c8217a4bbf6 Reviewed-on: http://gerrit.openafs.org/9306 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f27bccdf2048d01c1359cdd07c8f70032ceb91c5 Author: Jeffrey Altman Date: Wed Feb 27 15:07:57 2013 -0500 Windows: Remove RXAFS* from afsrpc.dll afsrpc.dll is supposed to be the multi-threaded dynamic loadable version of the RX package. It has also included the RXAFS and RXAFSCB client functions from src/fsint. Including the RXAFS* is nice in theory but in practice the afsd_service.exe must link to afsint.lib anyway in order to obtain access to RXAFSCB_ExecuteRequest() which is part of the server portion. Linking to both results in multiple instances of the same symbols in which case afsint.lib must be linked to first and the dynamic version of the functions are ignored. The only other module that used RXAFS* functions from afsrpc.dll is the adminutil library from the libadmin package. adminutil doesn't implement the server functions but it can just as easily link against afsint.lib. Removing RXAFS* from afsrpc.dll results in a library that only contains RX, RXSTATS, core xdr and rxkad. This patchset also fixes some minor bugs: 1. $(UTILOBJS) were not being linked to the library due to a typo. 2. Always use multi-thread safe versions of afsutil.lib Reviewed-on: http://gerrit.openafs.org/9300 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e2ef4ce23d0cd0eddadfb39a39a29593093f0b6f) Change-Id: I68d0655a6f8a7b22003ee0fbbc2045dffe21bb1d Reviewed-on: http://gerrit.openafs.org/9305 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c1737f62f3a7c9d36e0236dfdda7e3c48d3e2181 Author: Jeffrey Altman Date: Wed Feb 27 22:16:33 2013 -0500 Windows: Move grmutex, etc. to afspthread.dll afsauthent.dll exported: pthread_recursive_mutex_lock pthread_recursive_mutex_unlock grmutex (DATA) even though a dedicated afspthread.dll existed and all pthreaded modules must link to afspthread.dll and not all link to afsauthent.dll. Move these functions and the global mutex variable to afspthread.dll to ensure that only one instance of the variable is present in any binary. Also remove from src/libafsauthent/NTMakefile the local building of src/util object files and link to mtafsutil.lib. Reviewed-on: http://gerrit.openafs.org/9303 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d6cfcf46a8f3ec03e2f805aca6e5012eb6633803) Change-Id: I5ffcf4b6f0cea9cfbca2f01927e477a72292a0d1 Reviewed-on: http://gerrit.openafs.org/9304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 019533af61639e1d2f7a685c999744d0e987381f Author: Jeffrey Altman Date: Mon Feb 25 00:17:46 2013 -0500 Windows: Test NameArrayReferenceCount before deletion In commit c753d398f2005c886932f20b49af15efc489a829 the AFSDirectoryCB.DirOpenReferenceCount was split and the NameArrayReferenceCount field was added. However, it failed to modify all of the DirOpenReferenceCount checks prior to calling AFSDeleteDirEntry() to include a check on the NameArrayReferenceCount. This patchset corrects that oversight. Reviewed-on: http://gerrit.openafs.org/9254 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a10e96b3aa631a0488532f88d3959fdf22265d35) Change-Id: I4717af0d9a73581f5bc19eaee0fa8d7e349b4da9 Reviewed-on: http://gerrit.openafs.org/9261 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 49f136ee3dc317833db4f97748594965c76a13ba Author: Jeffrey Altman Date: Sun Feb 24 14:01:28 2013 -0500 Windows: no side effects from AFSDbgLogMsg calls Do not perform assignments or call side-effect resulting functions as parameters to AFSDbgLogMsg. Reviewed-on: http://gerrit.openafs.org/9242 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ff649d5bf51d78959de769e35eec61a5667d5939) Change-Id: I63adaa0cb9c06e17f9523d1a56f93bebc38fe49a Reviewed-on: http://gerrit.openafs.org/9243 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6b45b0294596074e08b9e70238fcaa9d8a4dc010 Author: Jeffrey Altman Date: Sat Feb 16 20:22:27 2013 -0500 Windows: ReleaseNotes reformatting Oxygen 14.2 automatically reformatted the text. Reviewed-on: http://gerrit.openafs.org/9212 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 9a8fa5d64fa5ab35dcd9dbced48eee00a0d614cc) Change-Id: I60c9562f21b442afb04a5680c1585b91249ab374 Reviewed-on: http://gerrit.openafs.org/9227 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 36235ecd6834d5c3dfe4c6639f26e15cee33058a Author: Jeffrey Altman Date: Sun Dec 16 12:42:17 2012 -0500 Windows: Direct IO Support for Service This patchset implements and enables by default the new Direct IO pathway between the AFS redirector and the afsd_service.exe. When Direct IO is enabled all reads and writes are performed by the AFS redirector locking memory allocated by the kernel and mapping it into the service's memory address space. The service supports cache bypass in this mode when the AFS_REQUEST_FLAG_CACHE_BYPASS flag is set in the request from the redirector. When cache bypass is active, the AFSCache file is ignored and data is either directly fetched from or stored to the file server. Cache bypass is enabled by IIS and other applications that request no intermediate buffering when opening file handles. This is often done because the application implements its own data caching. All cache bypass store operations are synchronous. When cache bypass is not enabled, the memory region provided by the AFS redirector is either used to populate the cm_buf_t objects or is populated by them. When cache bypass is not enabled, one outstanding store operation can be in flight asynchronously to improve performance. Direct IO is enabled by default and can be disabled by creating the registry value. ..\Services\TransarcAFSDaemon\Parameters "DirectIO" DWORD 0x0 Reviewed-on: http://gerrit.openafs.org/9211 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2ca80b4b6a3fde34b5eeeba37d2df5a9e253d787) Change-Id: Ibe0956428209ce91c8b1ca2da2bb81dd05a474b9 Reviewed-on: http://gerrit.openafs.org/9226 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5f9e49017941a01cac4483905f93954e8b52dbeb Author: Peter Scott Date: Fri Jan 25 00:46:37 2013 -0500 Windows: Direct IO for AFS Redirector Implement a new IO processing model in which extents are not passed between afsredirlib.sys and afsd_service.exe. Instead the AFSCache file is maintained exclusively by the service and the redirector locks kernel memory, maps it into the service's address space, and permits the service to manage all IO directly. This interface adds an AFS Cache Bypass option to the AFS Redirector which is activated when the file handle has been opened with the no intermediate buffering option. This patchset implements the kernel interface. A subsequent patchset will implement the service component. Assisted by Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/9210 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit be0296a8ade48c8944056999eab787bc0db1a01f) Change-Id: I075cf9c9622cf0c78c8708afc30edf560d8465a9 Reviewed-on: http://gerrit.openafs.org/9225 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6fb20629ba9a649ed6a6a87587c769e1b7f79589 Author: Jeffrey Altman Date: Fri Jan 25 02:21:27 2013 -0500 Windows: Add flag BUF_GET_FLAG_BUFCREATE_LOCKED Modify the buf_Get() and buf_GetNewLocked() interfaces to permit the cm_scache.bufCreateLocked lock to be held prior to calling to buf_Get(). Holding the cm_scache.bufCreateLocked lock before the buf_Get() call prevents a race with another thread that attempts to set the file size. Reviewed-on: http://gerrit.openafs.org/9209 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 49329541a13cdee3361d0246256a27d2a5ee8bef) Change-Id: I44743b3baa7d020e4cefa79a38846336f384a3dd Reviewed-on: http://gerrit.openafs.org/9224 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a2798dc5fdd8c756fa85d503ec68894ad14c376d Author: Jeffrey Altman Date: Sat Feb 16 17:51:12 2013 -0500 Windows: Set AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED Set the ObjectInformationCB AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED flag from within the AFSEnumerateDirectory() function and not from its callers. Reviewed-on: http://gerrit.openafs.org/9119 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 225b0e80854ac5c1584b46a75358caeb6638cd24) Change-Id: I29066ff95efaba9468e5acce1c2c32588a3885ad Reviewed-on: http://gerrit.openafs.org/9223 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1a48b81dbf6aa91e51034f0a3ef536f2a2478966 Author: Peter Scott Date: Fri Feb 15 08:44:06 2013 -0500 Windows: Permit direct to service non-wildcard lookups The AFS redirector has required that directories be fully enumerated when the directory object is opened. This is a very expensive operation involving large numbers of file server RPC round trips for directories with tens of thousands of objects and those containing symlinks. This patchset delays directory enumeration for the last component in a path until such time as dirctory data is requested by the application. If the request is for a non-wildcard pattern, the service will be asked to provide the details for just the one required object. Delaying the directory enumeration improves performance for GetFileAttributes[Ex], GetDiskFreeSpace[Ex], GetVolumeInformation, and GetNamedSecurityInfo Win32 API calls. In those cases it is no longer necessary to enumerate the target directory at all. Reviewed-on: http://gerrit.openafs.org/9118 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b7ba97ad537bd0e9a241f052ddd1c3a50c74745b) Change-Id: Id84fdd33a675b27b11ba8479a8449fe412af3076 Reviewed-on: http://gerrit.openafs.org/9222 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e8e4e2c5dbdcae6cd417b6a06263a6aabb75a9f9 Author: Jeffrey Altman Date: Mon Feb 18 23:11:27 2013 -0500 Windows: EvalByName pass LastComponent flag Add AFS_REQUEST_FLAG_LAST_COMPONENT flag for use with AFS_REQUEST_TYPE_EVAL_TARGET_BY_NAME requests to the service. When set the service will perform cm_Lookup calls without the CM_FLAG_CHECKPATH flag set. Reviewed-on: http://gerrit.openafs.org/9133 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0dd623ea9a933091ea9f9624558885ec6961b0f1) Change-Id: I1e0ad22146390513cc787835219e104f50cb823f Reviewed-on: http://gerrit.openafs.org/9221 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d8c8555d43b71a1a7ea8288ab4e5dc516a23eeed Author: Jeffrey Altman Date: Mon Feb 18 21:26:23 2013 -0500 Windows: EvaluateByName support case-insensitive lookups Directory lookups in AFS should favor case-sensivite matches but permit case-insensitive matches otherwise. The service should not follow mount points. The redirector exposes mount points as junctions. Reviewed-on: http://gerrit.openafs.org/9132 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6896ca2cc33bfc80e72a71af2b0588e74234644c) Change-Id: I4cc9b81a3d870e64b92601f473e9a5278a734531 Reviewed-on: http://gerrit.openafs.org/9220 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1b9fca46086b5fd1f098f4633ce38310b1fcb33c Author: Jeffrey Altman Date: Mon Feb 18 10:37:49 2013 -0500 Windows: IO Subsystem Trace modifications Display file offsets consistently as %0I64X. Reviewed-on: http://gerrit.openafs.org/9129 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 03bac87d167c101ae8042162b11c246a95575528) Change-Id: I37297de16bb871789c53f0fb45d9aeb0c9bb267e Reviewed-on: http://gerrit.openafs.org/9219 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 85b6d9c9f71912f3da73681ccc607d0195a51af5 Author: Rod Widdowson Date: Tue Feb 19 16:12:26 2013 +0000 Windows: Move work item queues over to the Control Device Currently, when the library is unloaded it stops all worker threands and then evaporates the work item queues. Thus any work items which are pending will disappear. Whilst it is OK that the threads going away, any work items need to remain queued so that when the library is restarted the work can continue. This checkin does this by moving the work item queues and their synchronization primitives into the FS maintained Control Device Object Extension. The list of worker threads remains in the Library Device Object Extension. Reviewed-on: http://gerrit.openafs.org/9139 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit 6e6c1b9aa2e1937c7b6dbbf2a6987181e3ff7711) Change-Id: Ib87b5bbd862b25ea1a9d79b7b6ddfcaa89498297 Reviewed-on: http://gerrit.openafs.org/9218 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 246e30bb7e5e557786817d25047acff6d6470868 Author: Jeffrey Altman Date: Mon Feb 18 10:34:59 2013 -0500 Windows: Initialize Irp->IoStatus.Information earlier Initialize Irp->IoStatus.Information to zero immediately upon beginning processing of the IRP in the write path. Reviewed-on: http://gerrit.openafs.org/9128 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit 6136b236c4ac1b63531665862701d0e2d2916d35) Change-Id: I47fc61d6cab231c010fbd5428c20b8168826a9db Reviewed-on: http://gerrit.openafs.org/9217 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9e3166b6636c614eaea8a8e31ba5368126bba15d Author: Rod Widdowson Date: Mon Feb 18 10:33:29 2013 -0500 Windows: Call CcDeferWrite rather than loop If we are about to write into the cache and we do not have enough memory we call CcDeferWrite and return STATUS_PENDING. This allows the cache to call us back when there is memory. The write is performed on the IO queue which is shared wth paging writes. However this does not cause paging writes to block in a memory shortage situation since the request will either be deferred again (releasing a thread to service a paging write) or will complete quickly. Further we allocate all our resources upfront so we fail fast and in the appropriate place. Reviewed-on: http://gerrit.openafs.org/9127 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit 11aa3e09e591b325e80c5d4a420051923f121b82) Change-Id: Ib905f28a4a6f950c218f734f9c933844b42ac39e Reviewed-on: http://gerrit.openafs.org/9216 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 44e52caec9a5c03421006008e0e71fd7e907b862 Author: Rod Widdowson Date: Fri Feb 15 05:57:29 2013 -0500 Windows: Allow the Library to pend a write request If the library pends a request pending memory becoming available then the FS must ensure that the library stays loaded until the IRP is completed. Reviewed-on: http://gerrit.openafs.org/9126 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 82161c478a871d959daf7f3ffb4d38d1bfabe6d6) Change-Id: If9fec748668ed77cf92b656a93ef82b87bc662bb Reviewed-on: http://gerrit.openafs.org/9215 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a8381c54ca75b4762766f6fbe6f73027d074deca Author: Rod Widdowson Date: Fri Feb 15 06:48:08 2013 -0500 Windows: AFSWriteCommon collapse redundant condition We never get non cached and yet paging IO. Even if we did it would be inappropriate to call CcCanIWrite. Therefore, collapse two if statements into one. Reviewed-on: http://gerrit.openafs.org/9125 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit 6c1d28958db1c0ec50b41274dffa9c58e448a9db) Change-Id: I61c7dd3375109e4800ed9968fdbfc1bf8072f1df Reviewed-on: http://gerrit.openafs.org/9214 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e27004c6fc726d8fca443bbe067dc9b0b10abddb Author: Andrew Deason Date: Mon Jan 14 12:45:04 2013 -0600 rx: Honor RXS_PreparePacket errors rxi_PrepareSendPacket calls RXS_PreparePacket to allow the security class to modify the given packet appropriately (to be undone by CheckPacket on the other endpoint). However, currently rxi_PrepareSendPacket ignores all errors generated by RXS_PreparePacket, and processing continues as if there was no error. For rxkad, an error often results in the given packet being untouched. This means that the security checksum is not calculated, and thus not populated in the packet, and for encrypted connections means that the packet contents are not encrypted. This occurs for any error generated by the security class PreparePacket routine. For rxkad, the most common error is probably RXKADEXPIRED, though some other internal errors are possible as well. This behavior has a few effects for rxkad: 1. When any error is generated by PreparePacket, the other endpoint generally bails out with the error RXKADSEALEDINCON, since the security checksum of the packet is 0, which does not match what the checksum should be. This results in error messages like 'rxk: sealed data inconsistent'. This can be very confusing if the actual error is, say, just that the given credentials have expired. 2. For connections requiring encryption (rxkad_crypt), an error from PreparePacket means that the packet payload is sent in the clear. This can happen for about a window size's worth of packets. 3. If a client ignores errors/inconsistencies with the checksum and encryption, etc, they can keep reading data for the call forever, even after their credentials have expired. To fix this, make an error from RXS_PreparePacket cause a connection error for the given connection, and immediately send a connection abort. No further error checking should be necessary for the callers of rxi_PrepareSendPacket, since they already check for call/conn errors before sending any actual packets. Reviewed-on: http://gerrit.openafs.org/8909 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 03d3dacae16847352af754ac13c854ca0df0c08c) Change-Id: I3c00011d00bda5708a9b91addb5d218eff8439e0 Reviewed-on: http://gerrit.openafs.org/9213 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b1b0e1ae50861d89aaf110f17fd7d1a9ce73ffaf Author: Jeffrey Altman Date: Thu Feb 14 14:43:58 2013 -0500 Windows: Ensure pResultCB exists before Authentication When processing requests from the redirector it is possible for the ResultCB to not be allocated. This can occur either due to an out of memory condition in a synchronous request or due to an asynchronous extents or byte range lock request. Move the assignment of the Authenticated state after the allocation of the ResultCB from the stack in case of out of memory conditions. Reviewed-on: http://gerrit.openafs.org/9110 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7c31bd5e2d0da3a1c9e29337d5a90147f3b03158) Change-Id: I498d49b49da2231f321fe811b514ad8c9e489792 Reviewed-on: http://gerrit.openafs.org/9117 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e46d8f985640ca2b025a4cf19931e12788c0c624 Author: Jeffrey Altman Date: Thu Feb 14 09:26:16 2013 -0500 Windows: Unique file ID is per volume The unique file ID returned as part of the BY_HANDLE_FILE_INFORMATION data structure obtained via GetFileInformationByHandle() is only guarranteed to be unique within the volume where volume uniqueness is determined by the volume's serial number. It therefore doesn't make sense to return the volume id as part of FILE_INTERNAL_INFORMATION IndexNumber. Instead return Vnode and Unique as that is what ensures uniqueness within an existing AFS volume. Unfortunately, {VolId, Vnode, Unique} does not guarantee uniqueness for when multiple cells are in use. Reviewed-on: http://gerrit.openafs.org/9108 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9b48daff341773580b3635e476fea112374986f2) Change-Id: Iae521bed6874595c061b1ecc530e9f1d7597fc34 Reviewed-on: http://gerrit.openafs.org/9116 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a526a3e6453c6432f36c38f1bf6629f12b62ce5c Author: Jeffrey Altman Date: Thu Feb 7 16:53:45 2013 -0500 Windows: RXAFS_BulkStat failures The RXAFS_BulkStat RPC is quite brain dead. The client requests status information on up to AFSCBMAX FIDs. The file server replies success only if all of the client credentials provide access to all of the requested FIDs. If status info cannot be provided for any one of the FIDs, the error code of the failure is returned with no context as to which FID failed. To simplify the logic within the cache manager a new local error code, CM_ERROR_BULKSTAT_FAILURE is introduced to replace whatever error was received from the file server. This error is returned by cm_TryBulkStat and cm_TryBulkStatRPC. The caller of either of those functions should interpret the error to mean that the current user context cannot be used to perform a bulkstat operation against the provided cm_scache directory. Instead, individual RXAFS_FetchStatus operations must be performed. This patchset implements such error handling for both the SMB and RDR interfaces. This change permits the Windows cache manager to properly enumerate a directory for which the user only has list permission and cannot read the status info for files and symlinks. Reviewed-on: http://gerrit.openafs.org/9080 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cb414f6899212f314313a781b63486661e9d1394) Change-Id: Icec0dc311c6c9152d15d7e61c32a001e651d95ca Reviewed-on: http://gerrit.openafs.org/9115 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 11b28627c5d33b33ea7b432b7acbae6c1f5af960 Author: Jeffrey Altman Date: Tue Feb 12 16:32:18 2013 -0500 Windows: cm_BPlusDirNextEnumEntry return all errors Return all entries in the directory enumeration regardless of any errors returned from cm_BPlusDirEnumBulkStatNext(). Set the error code in the returned cm_direnum_entry_t.errorCode field so that the caller can determine how the error should be handled on a per entry basis. Reviewed-on: http://gerrit.openafs.org/9103 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3eb7c4f42946b48fc7b63c9caf8e3e262ca9f88f) Change-Id: Ic656ad318130cb2f90eb71ff8e6b07225af9b6ee Reviewed-on: http://gerrit.openafs.org/9114 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f91ee52f8f305e4a9c5ca5be00681579d31141b6 Author: Jeffrey Altman Date: Wed Feb 13 14:04:28 2013 -0500 Windows: Add Cell name to AFSProcessRequest parameters Knowing the cell name for the request can be useful to the file system driver which otherwise does not have access to a conversion from FileID.CellID to Cell name. Reviewed-on: http://gerrit.openafs.org/9107 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 210ebcfbe428687c263a06ead80893393402d608) Change-Id: I51da7fe1905a7a8d6bffa35acd34273982d83a8f Reviewed-on: http://gerrit.openafs.org/9113 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 99a083e1557afc4eb959897b89994e00aa66cb1b Author: Jeffrey Altman Date: Wed Feb 13 21:53:46 2013 -0500 Windows: Add Cell to FS Volume Information Label Add the Cell name to the VolumeLabel field of the FILE_FS_VOLUME_INFORMATION structure. This permits "cell#volume" to be displayed by cmd.exe's DIR command and other applications that call the GetVolumeInformation() or GetVolumeInformationByHandle() Win32 APIs. Reviewed-on: http://gerrit.openafs.org/9106 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4382c9902f28a99e2163c9fe583d3f4861e6043e) Change-Id: Ie8c28d9096b7ae957a4ea4aee4133081f10b1172 Reviewed-on: http://gerrit.openafs.org/9112 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 667b937cc6136127f884df890a98f061c99f6526 Author: Jeffrey Altman Date: Wed Feb 13 13:12:34 2013 -0500 Windows: CellLength reported in octets CellLength must be converted from WCHARs to BYTEs in the response to the redirector. Reviewed-on: http://gerrit.openafs.org/9105 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6373d01ca010aa687e6aa0c218d1379e57e60888) Change-Id: I6ca27ff7306a50d78809ee26d0a2d1ad01167488 Reviewed-on: http://gerrit.openafs.org/9111 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3c1f5d4ae110a87534699b64f9aa6849d5afdacd Author: Jeffrey Altman Date: Mon Feb 4 14:56:27 2013 -0500 Windows: Use AFS_OBJECT_REFERENCE_MAX in struct Use AFS_OBJECT_REFERENCE_MAX to size the array in the struct. This should have been a part of patchset e267774f1a4f9cc5bfc32c545df36a4bf7947607. Reviewed-on: http://gerrit.openafs.org/9066 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 52cc7988371ead9b2903d90453598b3d07ce1696) Change-Id: I11a26c41f630cc0a304f55b94c9f7fbda4d1a6b6 Reviewed-on: http://gerrit.openafs.org/9102 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c7a5ececfdbf45fcef8e224978788972748c3196 Author: Jeffrey Altman Date: Wed Feb 6 11:58:55 2013 -0500 Windows: Do not pass relative paths to redirector RDR_SetInitParams provides two paths to the redirector, the AFSCache file path and the path of the %TEMP% environment variable. If either of these paths are relative paths and not absolute (or full) paths, the redirector and the service will interpret them differently. Ensure that the full paths are delivered to the redirector. Reviewed-on: http://gerrit.openafs.org/9074 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e9af3e644205d7fff2a47e6eaa4a028e783d2df4) Change-Id: Idd9efa0bbeb08eea72d032ad6ddfb3eef645ae6b Reviewed-on: http://gerrit.openafs.org/9101 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a127795e46bfd5be823397cc568fefffe26793c0 Author: Jeffrey Altman Date: Sun Feb 10 20:05:49 2013 -0500 Windows: Move Authenticated field to CommResultCB Add the Authenticated state of the request to the CommResultCB so the redirector knows the state of all requests. Reviewed-on: http://gerrit.openafs.org/9091 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 351cefe9b60032fe77aa09c0803ef051fb5b4665) Change-Id: I0af3de16c4417ebf0aa760eddbb49aba19775dcb Reviewed-on: http://gerrit.openafs.org/9100 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 95eb9c75ff734d047590f7a28cac1710fa82f26c Author: Jeffrey Altman Date: Mon Feb 11 16:40:36 2013 -0500 Windows: Do not double increment cm_data.currentCells During cm_cell generation the cm_data.currentCells value was incremented twice. As a result cm_currentCells did not equal the number of cm_cell objects allocated. Upon restart the AFSCache contents would be discarded. Reviewed-on: http://gerrit.openafs.org/9090 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d8f47f05d4e5580801916ef4ead30560e42d0b77) Change-Id: I0e96316a532e84e2abba97910890bd2cc6507f00 Reviewed-on: http://gerrit.openafs.org/9099 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ab591af9cec6f91f5bfdb0309112feb7c274453d Author: Jeffrey Altman Date: Fri Feb 8 14:17:12 2013 -0500 Windows: Move Trace Stmts from FILE to CLEANUP Relabel trace statements in AFSRemoveDirNodeFromParent, AFSRemoveNameEntry, AFSDeleteDirEntry, and AFSRemoveFcb from the FILE subsystem to the CLEANUP subsystem. This assists in reducing the noise when attempting to watch the file system requests that are received by the afs redirector. Reviewed-on: http://gerrit.openafs.org/9089 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f9f9a7ab1791bfce1e2d442c683bb664dd2ab630) Change-Id: I54040196f59c4fee6f381ecbb4e2554bceb5e05e Reviewed-on: http://gerrit.openafs.org/9098 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 095a82b2051897351cbbdb96f77923167997378e Author: Jeffrey Altman Date: Fri Feb 8 23:46:44 2013 -0500 Windows: AFSLocateNameEntry tracking DirectoryCB IN/OUT AFSLocateNameEntry previously accepted ParentDirectoryCB as an IN/OUT parameter in which a reference count was passed in but a reference count was not passed back out. The DirectoryCB parameter is an OUT parameter for which a reference count should be returned on success. This patchset simplifies the logic. ParentDirectoryCB is IN only and OutParentDirectoryCB and DirectoryCB are out only. AFSLocateNameEntry never releases a reference count provided by the caller and it always returns OutParentDirectoryCB and DirectoryCB with a new reference count unless they are NULL. It is the callers responsibility to determine if ParentDirectoryCB has changed and to release all of the references. Reviewed-on: http://gerrit.openafs.org/9087 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a1b6015cec049367c4832d7299bcdba19ea3b3fe) Change-Id: I0d6e3a49ff127b20fe0a020703bc1a1d9f007e45 Reviewed-on: http://gerrit.openafs.org/9097 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a34be3ec9d8b47db6691641bbb8f4a90a3cdc105 Author: Jeffrey Altman Date: Fri Feb 8 17:28:09 2013 -0500 Windows: AFSLocateNameEntry separate VolumeCB In/Out Tracking the VolumeCB references within AFSLocateNameEntry has proven to be very error prone. When the VolumeCB parameter is an in/out parameter the caller cannot reliably determine whether or not AFSLocateNameEntry replaced the updated the pointer and whether it properly released the references. This patchset changes the interface so that VolumeCB and ParentDirectoryCB have separate in and out parameters. The caller is now responsible for tracking its own Volume reference counts and AFSLocateNameEntry obtains its own which will either be returned to the caller as a non-NULL OutVolumeCB or released. This patchset turns ParentDirectoryCB into an IN only parameter and adds OutParentDirectoryCB as a dedicated OUT parameter. However, it does not alter any associated reference count logic. That will be implemented in a subsequent patchset. Reviewed-on: http://gerrit.openafs.org/9086 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ef02d3845bedf5daf4628e52d4452ea58eb7909a) Change-Id: Ia1f110b9cf2ba89f77dd012d74a6f9a1d646a68a Reviewed-on: http://gerrit.openafs.org/9096 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0a89f9972c32c8a2e70a7e0109c3f504fde3e93 Author: Jeffrey Altman Date: Wed Feb 6 22:44:44 2013 -0500 Windows: GetVolumeInfo cell name The service was supposed to provide the redirector the cell name as part of the AFSVolumeInfoCB response from RDR_GetVolumeInfo. Add a new field to store it and populate it. Reviewed-on: http://gerrit.openafs.org/9079 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a5865493a27cc8fbb849e683c7dffa187d2e3e71) Change-Id: I4e9bd64528b921c2faccf197ca4f6d3757c62a8b Reviewed-on: http://gerrit.openafs.org/9083 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3dda941762d80a5bb2f8228726376785c56ca03a Author: Jeffrey Altman Date: Wed Feb 6 22:43:16 2013 -0500 Windows: Return full volume name for RO and BK RDR_GetVolumeInfo must return the full volume name (not the volume group name) for RO and BK volume types. Reviewed-on: http://gerrit.openafs.org/9078 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c0f465cc3ab1392c793c2bcbc912a55dc02ad46c) Change-Id: I7d7df3f0894aa84e92b7d553a1b45e7bdb8f565c Reviewed-on: http://gerrit.openafs.org/9082 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 394c1482b6f21099cb606ad39d24f3352d0a3933 Author: Jeffrey Altman Date: Wed Feb 6 19:35:00 2013 -0500 Windows: AFSFileOpenResultCB.Authenticated Notify the redirector whether the the result of a file open request is the result of a user authenticated action. Reviewed-on: http://gerrit.openafs.org/9077 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit aa5d0d708f6a758396b04779ceac271a039439fb) Change-Id: I1dfcfba2a1963aeb11b01ef3bf7ad0f12cbdbf43 Reviewed-on: http://gerrit.openafs.org/9081 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit eab1666f7a3fcb664ddd376e085797fa3881aaea Author: Jeffrey Altman Date: Wed Feb 6 19:32:28 2013 -0500 Windows: add cm_HaveToken cm_HaveToken answers the question of whether a cm_user_t has a token for a specified cell. Reviewed-on: http://gerrit.openafs.org/9076 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 748e07d24367e80e353446bdb97f61ce420d303d) Change-Id: I861dbefdde31317a63d5a3c548c3ea51b509d07e Reviewed-on: http://gerrit.openafs.org/9084 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9ee70f50d88ad01a68bf56b0114953094606e3f6 Author: Jeffrey Altman Date: Tue Feb 5 00:29:12 2013 -0500 Windows: AFSLocateNameEntry double free Volume RefCount If AFSBuildMountPointTarget fails when called from AFSLocateNameEntry the pCurrentVolume reference count will have been freed even though the pointer has not been updated. If the failure is STATUS_OBJECT_NAME_NOT_FOUND and AFSLocateNameEntry was called by AFSCreateCommon, the Volume reference count will be freed twice. Reviewed-on: http://gerrit.openafs.org/9069 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 028258e6393bd76df0944dc77266bfba176ada73) Change-Id: I84b8f82929a3349fb2a08ac58c19f37e7813091e Reviewed-on: http://gerrit.openafs.org/9073 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 85e894471e2b461905478665765c8a500903579a Author: Jeffrey Altman Date: Mon Feb 4 16:22:56 2013 -0500 Windows: AFSObjectInfoDecrement correct return value The return value must be the new ObjectReferenceCount value not the value of the Reason counter. This was broken by patchset e267774f1a4f9cc5bfc32c545df36a4bf7947607. Reviewed-on: http://gerrit.openafs.org/9068 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e7df2fcedcd05b5f73f5398433289b52b769c0ea) Change-Id: I45c67e1a0b6e26527668ad195192c4ad1bee61e6 Reviewed-on: http://gerrit.openafs.org/9072 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2219fcd548aa298eea9f3a68d8232507c8ddb186 Author: Jeffrey Altman Date: Mon Feb 4 15:14:16 2013 -0500 Windows: AFSVolumeCB track RefCount reasons Introduct AFSVolumeIncrement and AFSVolumeDecrement functions which are used to increment not only the AFSVolumeCB.VolumeReferenceCount but also a new VolumeReferences[Reason] counter. In the future when a VolumeReferenceCount error occurs it may be possible to isolate the cause to a subset of the code. In the process, the VolumeReferenceCount necessary to free the AFSVolumeCB object is changed from 1 to 0 and AFSInitVolume no longer initializes the AFSVolumeCB count to 2. The signature for AFSInitVolume and AFSLocateNameEntry are modified to permit a volume reference reason to be provided. This permits the reference to be allocated in one function and released in another without resulting in count imbalances. Reviewed-on: http://gerrit.openafs.org/9067 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d0e7d8c76e038c5bd76b49fd8ca7b588e848a4f1) Change-Id: I895f1ba9fa9513b8080e08aa44fb0f2da389a856 Reviewed-on: http://gerrit.openafs.org/9071 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c1774887d7e4a47bdba4c1064c4890f01bcf2095 Author: Jeffrey Altman Date: Sun Feb 3 14:03:36 2013 -0500 Windows: cm_SetupFetchBIOD reserving type Change type of 'reserving' to afs_uint64 to match the return type of buf_TryReserveBuffers(). Reviewed-on: http://gerrit.openafs.org/9062 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4b3f499b20ba50cf92e6caeb747c56e53a5a55f3) Change-Id: Id3eedda4acca2bdc69136c995efb0aefc2d1174f Reviewed-on: http://gerrit.openafs.org/9064 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a65706639321e474593915a22261f1c2400cca35 Author: Jeffrey Altman Date: Sun Jan 27 15:43:58 2013 -0500 Windows: cm_user interlocked operations Convert cm_user refcnts to use interlocked operations. Reviewed-on: http://gerrit.openafs.org/9061 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e4d97fa3e4a0d02160e082547b84c437472bfaae) Change-Id: I5dc693021772055cd7e232ec27122b867de7691d Reviewed-on: http://gerrit.openafs.org/9063 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit afbaad7172a51d8bc12dbfab45e5a83206f2ffa2 Author: Jeffrey Altman Date: Sun Feb 3 01:20:36 2013 -0500 Windows: Fix RDR_BkgFetch rock assigment The wrong variables were assigned to the rock base and offset in the final queuing of a RDR_BkgFetch request within RDR_RequestFileExtentsAsync. Introduced in 8b874aa205cd05b8109a296c8cb8ad0bb5114553. Reviewed-on: http://gerrit.openafs.org/9058 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5f17b9f9295b4f1c86cc71a5253f93a9c56078a4) Change-Id: Ib7229763a7dd35c58450c69da87d168057248a68 Reviewed-on: http://gerrit.openafs.org/9060 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2d9b6894586051c2e5bd77be2d2dbce9619f5497 Author: Jeffrey Altman Date: Tue Jan 29 12:28:57 2013 -0500 Windows: dirty threshold 64 * chunksize must be large enough to keep the pipe full Reviewed-on: http://gerrit.openafs.org/8996 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3ecdfadded7cb6de6a0204cb1cf70ae764e17769) Change-Id: I0560c39e2e64f8860d011d6e6cc0859e730aff26 Reviewed-on: http://gerrit.openafs.org/9057 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 71b820aeae789dfbf2b02acb23c073ea4641f2ec Author: Jeffrey Altman Date: Mon Jan 28 21:12:10 2013 -0500 Windows: More RDR Garbage Collection This patchset addresses the failure of AFSVolumeCB, AFSDirectoryCB, and AFSObjectInformationCB objects to be garbage collected by the AFSPrimaryVolumeWorker thread. The AFSPrimaryVolumeWorker thread is broken up into smaller pieces. Reviewed-on: http://gerrit.openafs.org/8995 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2e7c203a6cc84b2d4e4c67bd47277c19315853ae) Change-Id: Ib295ec9a80b12d40af85f4aea4881aad44f6fdb1 Reviewed-on: http://gerrit.openafs.org/9056 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 769829cb6cfd050ffa09c1e9be95328dea59cbc5 Author: Jeffrey Altman Date: Sun Jan 27 15:06:09 2013 -0500 Windows: AFSEvaluateTargetByID Sanity Check Result If the file server provides the service with bogus status info and that status info is inconsistent with the allocated fields in the associated ObjectInformationCB and FCB structures, it can result in a BSOD. Perform some basic sanity checks and if an inconsistency is discovered, fail the request. This may result in the inability to access a file/directory but will prevent a BSOD. Reviewed-on: http://gerrit.openafs.org/8994 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8099525c4a0251974c0a66c4b72fc26187691f29) Change-Id: I1890f0f7d8766506051615406d14aecb7552dce7 Reviewed-on: http://gerrit.openafs.org/9055 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fb55eabb96700716402a9fb2f89c8b25a5cf3e83 Author: Jeffrey Altman Date: Fri Feb 1 13:40:22 2013 -0500 Windows: Replace ParentObjectInformation pointer Although rare there have been crashes which were the result of the ObjectInformationCB being freed while another ObjectInformationCB is pointing to it via the ParentObjectInformation pointer. This patchset removes the pointer and replaces it with the ParentFileId which is used to lookup the Parent ObjectInformationCB via the VolumeCB BTree of all volume objects. The reference counting rules remain the same. Reviewed-on: http://gerrit.openafs.org/8993 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5649d84f1a96e3b2cc1dc42d67d3facb4e4b5d07) Change-Id: Icdb8a8955edf081bd18eec6fab841fef319c90d8 Reviewed-on: http://gerrit.openafs.org/9054 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d8042786866df23142bcb1ea9b205f29efa8c25b Author: Jeffrey Altman Date: Fri Feb 1 13:39:22 2013 -0500 Windows: Test for PRSFS_INSERT in redirector interface If a test for PRSFS_WRITE fails and the cm_scache.creator is the current user, then also test for PRSFS_INSERT privilege. Reviewed-on: http://gerrit.openafs.org/8978 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a5378b71ee9b4e2a0c25df95dced1026dbbf7a39) Change-Id: I48168b7c756d0db8d22d34b758153474b7eef7f5 Reviewed-on: http://gerrit.openafs.org/9053 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fd3e350ce1dd2f64b12a8350e9e9cf684b9c0d6c Author: Jeffrey Altman Date: Fri Jan 25 00:45:21 2013 -0500 Windows: Additional I/O subsystem trace messages for AFSWrite When debugging be able to obtain additional details about the I/O subsystem. Reviewed-on: http://gerrit.openafs.org/8977 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7c3f5bfba68964dfda989adb59a2b9efdb37eb4d) Change-Id: I61af896f98314736adad3ff4f94fe6f45d6b9752 Reviewed-on: http://gerrit.openafs.org/9052 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8fcc9d80b688282329764dc32a40c3fb5e58821a Author: Jeffrey Altman Date: Fri Jan 25 00:18:37 2013 -0500 Windows: .readonly space reporting .readonly volumes can be stored on multiple partitions which each have a different size and free space available. To ensure consistency regardless of which partition the .readonly is accessed from and because .readonly volume sizes cannot change, report the allocation size of the volume as the partition size. Continue to report that volume has zero free sectors because the volume cannot be written to. Reviewed-on: http://gerrit.openafs.org/8976 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ed6354881d6f55ced842e3e78a02133fba8823ae) Change-Id: I09bdfa8799d9871f263acdf16d00a7479c287c5d Reviewed-on: http://gerrit.openafs.org/9051 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5c91e4f7d0d2c7f2174ed0cd4573cc30d3d38d27 Author: Jeffrey Altman Date: Fri Jan 25 00:17:25 2013 -0500 Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY Instead of stating that the AFS device is read only; report that the volume in question is read only using the FILE_READ_ONLY_VOLUME file system characteristic. Reviewed-on: http://gerrit.openafs.org/8975 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ddba1a1f06d140f5683e173db5a384ac5ac40977) Change-Id: If89ee5b6ff6d004a866c9f82507165096571a062 Reviewed-on: http://gerrit.openafs.org/9050 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fe6eb3c7f393386a6889fa1ce5b80d8f6566688c Author: Jeffrey Altman Date: Fri Jan 25 00:13:03 2013 -0500 Windows: AFSQueryFsAttributeInfo use service response The File System attributes are set by the service in the volume information request. Use the values the service provides instead of returning an incomplete hard coded list. Reviewed-on: http://gerrit.openafs.org/8974 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5880a7326428b3d17049e92b1ccc590ad3fc7897) Change-Id: I78a793f57d1bb4395e9e62a3dae23e02956ff111 Reviewed-on: http://gerrit.openafs.org/9049 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 79d829c2fa4c6b7ea5d0bc84b661c5c9ed8565cb Author: Jeffrey Altman Date: Fri Jan 25 00:11:41 2013 -0500 Windows: FILE_FS_DEVICE_INFORMATION Device Type Consistently report our device type as FILE_DEVICE_NETWORK_FILE_SYSTEM instead of FILE_DEVICE_DISK or FILE_DEVICE_DISK_FILE_SYSTEM except when returning FILE_FS_DEVICE_INFORMATION where we must lie and state that the device type is FILE_DEVICE_DISK. Otherwise, the Win32 API GetFileType() returns FILE_TYPE_UNKNOWN instead of FILE_TYPE_DISK. Applications built from msys (but not current cygwin) treat files of type FILE_TYPE_UNKNOWN as special character devices instead of files. This breaks msysGit. Reviewed-on: http://gerrit.openafs.org/8973 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e41d08c9a15a722d0974b763e41d84788f742b6a) Change-Id: Ice3cac94603c9a45b2caa5685cf176b2161bdc3d Reviewed-on: http://gerrit.openafs.org/9048 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 634196430b7114c2f3211860423089bb6733fb96 Author: Jeffrey Altman Date: Tue Jan 22 12:46:20 2013 -0500 Windows: RDR_CleanupFile FSync only files If the cm_scache type is something other than a file, there is no point performing an FSync. Do not incur the overhead. Take into account any outstanding AsyncStore operations that might be in-flight. Reviewed-on: http://gerrit.openafs.org/8972 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cac8dea092d62141da700c691b3609ed4dc08c04) Change-Id: Ic83a9d4a51e442d69b176df088e956adbedd82bb Reviewed-on: http://gerrit.openafs.org/9047 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0e53d74c0c08871d9e90f41556fc6fac93ed68c1 Author: Jeffrey Altman Date: Tue Jan 22 12:44:21 2013 -0500 Windows: AFSCleanupFile always flush on last handle Do not rely on a count of dirty extents to determine if the service should flush a file during a cleanup operation. Simply because there are no dirty extents held by the redirector does not imply that the service has no dirty buffers for the file. Reviewed-on: http://gerrit.openafs.org/8971 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ae06c2ea48651ebd90635ffcc68bbccfeb908c8) Change-Id: I79103db4c309b1cd4560aaeaad1d945548cdefd7 Reviewed-on: http://gerrit.openafs.org/9046 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4dc488ae6645ec3ef93cbf0da7ddb23675fb66b9 Author: Jeffrey Altman Date: Sun Jan 20 13:27:51 2013 -0500 Windows: clear ASYNCSTORING flag in scache recycle If the scache has been recycled the ASYNCSTORING flag cannot be accurrate. Clear it. Reviewed-on: http://gerrit.openafs.org/8970 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5bedc5e03a21409b7d2426387584267e33073457) Change-Id: I97bcb95b3b3a10d0449cb76918b2ef6a51e8ceaf Reviewed-on: http://gerrit.openafs.org/9045 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ead0ae4a1d8247f4c26843ec73cc35793265f002 Author: Jeffrey Altman Date: Sun Jan 20 13:26:24 2013 -0500 Windows: restructure daemon state tracking Move all of the per thread state info into a struct and allocate an array of structs instead of an array for each data type. Reviewed-on: http://gerrit.openafs.org/8969 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e7e83d8c7e2aef13109eff53cede43a1904bbe91) Change-Id: Ic966724dcddda27dee8e695b6ca4dd28e47c23a0 Reviewed-on: http://gerrit.openafs.org/9044 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 56c85da4594eef1d23b633427cc71efd8f63e681 Author: Jeffrey Altman Date: Sun Jan 20 13:23:50 2013 -0500 Windows: osisleep cleanup Reviewed-on: http://gerrit.openafs.org/8968 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 294fce5ddf4abbe9675f759b2512bdc306659944) Change-Id: Ifdb229f553571b2d15389cb875645f0c1b100b97 Reviewed-on: http://gerrit.openafs.org/9043 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bedfc1402a3b7c00b8038347f5c13633074fbc6c Author: Jeffrey Altman Date: Thu Jan 17 21:02:36 2013 -0500 Windows: remove out of date cm_buf #define Reviewed-on: http://gerrit.openafs.org/8967 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b93ddf1a9c49988e84bfddff37bc55949d49768c) Change-Id: I01aaed85fd01500796fec4a3de0b3f1900f3f923 Reviewed-on: http://gerrit.openafs.org/9042 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4030e400a78c7c3547a4eb585d976768ddfcf0db Author: Jeffrey Altman Date: Thu Jan 17 01:44:27 2013 -0500 Windows: Convert BkgDaemon Procedures to use rock The BkgDaemon functions accepted four 32-bit parameters into which 64-bit offsets and lengths were fit. Convert the routines to use a procedure specific rock type which is allocated by the caller to cm_QueueBkgRequest and freed by cm_BkgDaemon. The use of a rock will permit greater flexibility for future background procedures to be implemented that require more complex data to be passed around. Reviewed-on: http://gerrit.openafs.org/8966 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8b874aa205cd05b8109a296c8cb8ad0bb5114553) Change-Id: Idae7ffcb5c8207e5d8f0681046810d14b26ae84f Reviewed-on: http://gerrit.openafs.org/9041 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0a5bdddb3134e56408e371ac543633776bd72673 Author: Jeffrey Altman Date: Thu Jan 17 01:42:54 2013 -0500 Windows: Set dirty page limit to 2 x ChunkSize / 4096 4096 is the size of a memory manager page. ChunkSize is in octets. Windows doesn't wait until the limit is reached to begin flushing and ChunkSize is not a hard limit. Reviewed-on: http://gerrit.openafs.org/8965 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5be1779547d800e1a040fe1969336adab0c01afa) Change-Id: I1b969f1cb486bc01675771d1c291594ae6b55e5d Reviewed-on: http://gerrit.openafs.org/9040 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4aaa4194bd9de12b9ee0be59482b1a4d92c72181 Author: Jeffrey Altman Date: Thu Jan 24 19:42:41 2013 -0500 Windows: Add CM_MERGEFLAG_CACHE_BYPASS If a store operation is performed direct to the file server bypassing the AFSCache, call cm_MergeStatus() with CM_MERGEFLAG_CACHE_BYPASS to ensure that the valid version numbers for the cm_scache_t object are incremented appropriately. After a cache bypass occurs, only buffers with the current data version number are valid since the cached data will be incomplete. Reviewed-on: http://gerrit.openafs.org/8964 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8b62d08760b2cde9fb0b15b695d8467191c0669f) Change-Id: Ic0f3d4629324c3cf39eff469f02ffd16653f09d8 Reviewed-on: http://gerrit.openafs.org/9039 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 762544cbe1fb4acf8cc6abcf19222d09ddec055b Author: Jeffrey Altman Date: Wed Jan 30 21:45:44 2013 -0500 Windows: AFSInitPIOCtlDirectoryCB fixes Rename ObjectInfo parameter to ParentObjectInfo since it does represent the parent of the PIOCtlDirectoryCB that is being allocated. If the AFS_DIR_ENTRY_TAG allocation fails, do not call AFSDeleteObjectInfo( pObjectInfoCB) prior to the try_return because AFSDeleteObjectInfo() will be executed in the try_exit block. Finally, do not increment the pDirNode->ObjectInformationCB reference count when returning STATUS_REPARSE. The reference count is tracked by the pDirNode pointer and has already been allocated. Reviewed-on: http://gerrit.openafs.org/8963 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 65ff9935728e0142728e29295c7ef69bf73cecf4) Change-Id: I93092df5b6b8d3c8b961d92d2eb186607e9619ed Reviewed-on: http://gerrit.openafs.org/9038 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a27c45de2b154887cdd7279a1ca5db5854f8eeca Author: Jeffrey Altman Date: Thu Jan 24 19:28:44 2013 -0500 Windows: Additional trace %p and %d changes Use %p when logging pointers. Use %d for counts. Reviewed-on: http://gerrit.openafs.org/8962 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3847ec9531b7bde9a2af9edded5b19d797789752) Change-Id: I1dcb214bc9c34cfb42365b098b839ba50e9d60bd Reviewed-on: http://gerrit.openafs.org/9037 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e78d557fc65a2fc9716e4a3a43a64864f4727120 Author: Jeffrey Altman Date: Thu Jan 24 19:25:37 2013 -0500 Windows: AFSProcessCreate drop DirOpenRefCount on exit AFSProcessCreate() must not maintain its DirOpenReferenceCount when bFileCreated is true because the AFSCcb maintains its own count and the one obtained by AFSProcessCreate() will only be leaked. Reviewed-on: http://gerrit.openafs.org/8961 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 391bdbf9ace271ef41d6c73031d172cdad802f79) Change-Id: I21fc51484a629df2393661b335338c1643002897 Reviewed-on: http://gerrit.openafs.org/9036 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa8f04f4ac828d95803f6bc0441a30e3b029d66a Author: Jeffrey Altman Date: Thu Jan 24 19:14:42 2013 -0500 Windows: Trace DirectoryCB allocations Add a trace subsystem for tracking Directory Entry allocations and deallocations to assist with debugging. Reviewed-on: http://gerrit.openafs.org/8960 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4811fd8844d1294ee37c14bac7cfae776d09c9b4) Change-Id: I55947685ec9634bc504faf436221656ca03abbfc Reviewed-on: http://gerrit.openafs.org/9035 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1750b32fc09511aa57614687bcd811982624fee5 Author: Jeffrey Altman Date: Thu Jan 24 18:55:24 2013 -0500 Windows: Introduce NameArray Reference Counts Split the DirOpenReferenceCounts into those related to DirectoryCB reference counting unrelated to the NameArrays and those that are related to the NameArrays. This helps track down the source of overcounts and undercounts. Reviewed-on: http://gerrit.openafs.org/8959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c753d398f2005c886932f20b49af15efc489a829) Change-Id: If1ef8a39c5e37dda3d9cb8ae7685d46bf0004cda Reviewed-on: http://gerrit.openafs.org/9034 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 637de8364f6497f6bf950640ee947c70bd69e316 Author: Jeffrey Altman Date: Thu Jan 24 18:52:51 2013 -0500 Windows: AFSSetRenameInfo Notify correct object of change When AFSSetRenameInfo makes a change, it is the parent object that must be notified not the parent of the parent. Reviewed-on: http://gerrit.openafs.org/8958 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e5e952f5fc1cb8a6d2789938e30fb00e5bb570d8) Change-Id: I650e7bfd9977629fce6d30e8bcf5c665330fb46f Reviewed-on: http://gerrit.openafs.org/9033 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b7938f419a7b75a18b662de9beab46a7d076ae6f Author: Jeffrey Altman Date: Thu Jan 24 18:51:01 2013 -0500 Windows: Allocated VolumeCB from PagedPool Only the non-paged portion of the VolumeCB should be allocated from the non-paged pool. Allocate the VolumeCB itself from the paged pool. Reviewed-on: http://gerrit.openafs.org/8957 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8d4757284a08d5e7123fab696c5da64faa4e6fb7) Change-Id: Ib3a2b4a0a46879281a0e8c4934dc44d08acdc62b Reviewed-on: http://gerrit.openafs.org/9032 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 06f583861a73d904598da84507d7f1f95552d5e3 Author: Jeffrey Altman Date: Sat Jan 26 23:19:05 2013 -0500 Windows: Move VolumeWorkerContext to NonPaged pool The VolumeWorkerContext contains a KEVENT which must be allocated from the NonPaged pool. Move it to the AFSNonPagedVolumeCB struct. Reviewed-on: http://gerrit.openafs.org/8992 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 34f4427a978a485d83b1faa57fd786e47b8dddf5) Change-Id: Ic5711743ae4fa725913f775cbd4ec9d3506e8c53 Reviewed-on: http://gerrit.openafs.org/9031 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 348e15876a9e4c830966e5a06fac2e5c561a3e4d Author: Jeffrey Altman Date: Thu Jan 24 18:44:33 2013 -0500 Windows: Categorize ObjectInformationCB RefCnts To assist in tracking down the source of ObjectInformationCB overcounts and undercounts, add an advisory array which tracks the reference counts by category. In the procress ensure that all reference count changes are logged by tracing. Reviewed-on: http://gerrit.openafs.org/8956 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e267774f1a4f9cc5bfc32c545df36a4bf7947607) Change-Id: Iaa7f599fe349e206bdf11f5ef98334912c2d55ff Reviewed-on: http://gerrit.openafs.org/9030 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2ccb3fb980e879bc2fd43651c7ac4667e2c3c020 Author: Jeffrey Altman Date: Thu Jan 24 18:24:55 2013 -0500 Windows: AFS_SUBSYSTEM_OBJECT_REF_COUNTING fixes A large number of trace messages monitoring ObjectInformationCB reference counting were categorized under AFS_SUBSYSTEM_FCB_REF_COUNTING instead of AFS_SUBSYSTEM_OBJECT_REF_COUNTING. This patchset applies the correct subsystem category. Reviewed-on: http://gerrit.openafs.org/8955 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fce3f679f1842a3c4b867a3152414566fc56fb81) Change-Id: I11747489c5139eb09661884eaceb018880f348a3 Reviewed-on: http://gerrit.openafs.org/9029 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f2db12ae96b85866f552abef950d8d8d8df2bae1 Author: Jeffrey Altman Date: Thu Jan 24 16:29:52 2013 -0500 Windows: Reduce RDR Object Lifetime Adjust the redirector object lifetime from 10 minutes (600 seconds) to 20 seconds. The object lifetime is how long an object can remain idle before garbage collection is permitted. Reviewed-on: http://gerrit.openafs.org/8954 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3e38897012ab8075df96b9e1ecca2a2ebc23cc30) Change-Id: Iedaabb1bfefe0924836799bdecc82312815c98aa Reviewed-on: http://gerrit.openafs.org/9028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0b9fcbb1dd91d8043d9a834a89cfdd1b50e09b87 Author: Jeffrey Altman Date: Sun Jan 13 10:15:02 2013 -0500 windows: Update raw fetch/store operations rawops.c is a hold over from Eric Williams' original attempt to implement an AFS redirector. When the rest of the his code was purged from the tree and replaced with a more complete implementation based upon the Kernel Drivers's File System framework rawops.c was left behind. Although the source file has been compiled as part of the build, its functions ReadData and WriteData have never been called. This patchset: 1. renames the functions to raw_ReadData and raw_WriteData 2. modifies the function signatures and provides a header with prototypes 3. requires that cm_scache.rw be write-locked upon entry 4. renames variables 5. removes the #define CM_BUF_BUFSIZE and relies upon cm_data.blockSize instead 6. Always write back the current range as an async store instead of the previous chunk as random write patterns will fail to store all of the dirty buffers. Reviewed-on: http://gerrit.openafs.org/8953 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 24b6365169e48d21bbb97fb456860f63389a5bcf) Change-Id: If35404a6d6647ad5018e62e08ad4795d56c25f3f Reviewed-on: http://gerrit.openafs.org/9027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 180c5cae4a7d6549f921e1b2fc8e7f80b980919b Author: Thorsten Alteholz Date: Wed Jan 30 20:11:04 2013 +0100 fix some typos in bos_setrestricted the real name of the command is: 'bos setrestricted' it is sufficient to name 'bos install' only once Reviewed-on: http://gerrit.openafs.org/8990 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 69f634503482f899e4d422b16100636905c72ea8) Change-Id: Ie2035826c22dc218fb9b06bd1b16791def434549 Reviewed-on: http://gerrit.openafs.org/9026 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8eeee382a11388be1df4f8ddc82661e2da36f7a3 Author: Jeffrey Altman Date: Wed Dec 19 16:52:34 2012 -0500 Windows: Disable hard dead timeout for RDR File Server connections The UNIX cache manager does not implement hard dead timeouts on file server connections. The Windows cache manager had to because of the SMB connection timeout requirements. For the AFS redirector there is no timeout requirement. Therefore, when the SMB stack is disabled the Windows cache manager can disable the hard dead timeout. The idle dead timeouts are in place to cancel connections when file servers stop replying with real data. Reviewed-on: http://gerrit.openafs.org/8828 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2f8de279e11ff954c0034eb1fd4695cb015d956f) Change-Id: Ib89f5ff041511bb2582aaee9c0ca6af67705ce87 Reviewed-on: http://gerrit.openafs.org/9025 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0055e5fb30e669234b71584803d3e06aabac9144 Author: Jeffrey Altman Date: Sat Dec 29 15:58:06 2012 -0500 Windows: Decrement Fcb OpenHandleCount while locked AFSCleanup performs tests on the Fcb Open Handle Count to determine when to perform final cleanup tasks on the last handle close. The test is protected by holding the Fcb Resource. If the Open Handle Count is decremented after dropping the Resource, it creates a race with other threads that might be blocked entering AFSCleanup to close their handle on the same object. Reviewed-on: http://gerrit.openafs.org/8863 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e297a00dfca21103672ab97145895cabf97112a8) Change-Id: I414d1514bf4b201960aef9286695c28647a439f6 Reviewed-on: http://gerrit.openafs.org/9012 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e21ba804068f04d2675ba4e6e8e671a6ba840220 Author: Jeffrey Altman Date: Sat Dec 29 16:12:21 2012 -0500 Windows: AFSOpenRoot obtain VolumeRoot OpenReferenceCount earlier In AFSOpenRoot obtain the VolumeRoot reference count before performing any operations that require use of the VolumeRoot. If the operations fail, release the reference count. Reviewed-on: http://gerrit.openafs.org/8862 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit af3f627e676c5b849b721c75a84a88fc6e54ec52) Change-Id: I6d7522a5d64ae5d6aadd8655e3af10dc2ec46e1d Reviewed-on: http://gerrit.openafs.org/9011 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 47bb761fd60940a10f11f390005a64e68380a008 Author: Jeffrey Altman Date: Sat Dec 29 16:10:14 2012 -0500 Windows: RDR FILE Processing Tracing Additional/improved trace messaging for name not found and path not found errors. Reviewed-on: http://gerrit.openafs.org/8861 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1e6ec171caced9b7b3dd78c4931d7047bad07e1f) Change-Id: I6b9ddd97828b0559864224236a907bfca1ba47ff Reviewed-on: http://gerrit.openafs.org/9010 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a5788a4befb25d6caaaead1c8cd39c04e0cb8a45 Author: Jeffrey Altman Date: Sat Dec 29 00:57:31 2012 -0500 Windows: DirOpenReferenceCount reorganizing completed This patchset completes the reorganizing of the DirOpenReferenceCount handling. Now that every AFSCcb is given a refCount in AFSInitCcb() which is released in AFSRemoveCcb() it is possible to simplify some of the logic surrounding DirOpenReferenceCount handling across the AFSCommonCreate -> XXX -> AFSLocateNameEntry -> {MountPoint, Symlink} call sequences. Wherever possible releasing of DirOpenReferenceCounts occur in a functions try_exit block. AFSCommonCreate() uses the new variables bReleaseDir and bReleaseParentDir to track whether these refcounts need to be released. Additional comments document the decision making. There was at least one code path in AFSLocateNameEntry() where the DirOpenReferenceCount could be dropped when it should not have been. (pExistingDirNode == pDirNode). Reviewed-on: http://gerrit.openafs.org/8860 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c0627f8620594191ce5901937175c5f1a93daec2) Change-Id: I4d9435ae474e78843421132d71b00908904cfb7a Reviewed-on: http://gerrit.openafs.org/9009 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3a398760812ab79b1788bbe84625c7e48a2e901b Author: Jeffrey Altman Date: Sat Dec 29 00:51:55 2012 -0500 Windows: NameArray DIRENTRY_REF_COUNT logging Include the NameArray pointer in the AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING log messages generated from the NameArray management routines. This permits correlation between the reference count changes and the NameArray to which they were associated. Reviewed-on: http://gerrit.openafs.org/8859 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9f0f9d9ecea59b76c1794b405ab43eeb99edfe68) Change-Id: I607a007e78aa62103e6733d0248f46f8c9212c4d Reviewed-on: http://gerrit.openafs.org/9008 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 099db590d93adfa8c1518b6a1ee1fe410658e51a Author: Jeffrey Altman Date: Sat Dec 29 00:49:43 2012 -0500 Windows: AFSSetRenameInfo DIRENTRY_REF_COUNTING When logging the result of the DirOpenReferenceCount increment, use lCount instead of referencing the DirOpenReferenceCount field which could have been changed. Reviewed-on: http://gerrit.openafs.org/8858 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0ea2174f018ffff363da03e21b4f6c9f59263ed1) Change-Id: I243bcd0ce63f88b20e8c083cd9ec9cb93252fbdc Reviewed-on: http://gerrit.openafs.org/9007 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c0c6d4af0648cba1f84e77153a04a05cf93a92d Author: Jeffrey Altman Date: Sat Dec 29 00:44:27 2012 -0500 Windows: AFSSetFileLinkInfo() DirOpenReferenceCount handling AFSSetFileLinkInfo() would leak a DirOpenReferenceCount when pNewTargetDirEntry is not NULL upon exit. It also did not properly handle a STATUS_REPARSE response from AFSNotifyHardLink(). The AFSInsertDirectoryNode() call should not be performed when the result is STATUS_REPARSE since that means the entry already exists. Reviewed-on: http://gerrit.openafs.org/8857 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8bd8f371d73fafddb409cdcc98467632dc111125) Change-Id: Ibb4aa0368e479551850ca25ea370b9e7b8f34989 Reviewed-on: http://gerrit.openafs.org/9006 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit adc6cb8a920d4dbc01f13d3cb1c37a4bf61be81b Author: Jeffrey Altman Date: Sat Dec 29 00:29:45 2012 -0500 Windows: AFSClose() DirOpenReferenceCount handling Unless the caller of AFSRemoveCcb() steals the DirectoryCB object from the AFSCcb before calling AFSRemoveCcb(), AFSRemoveCcb() will release the reference count. In all but one case where the DirectoryCB must be accessed after the AFSCcb is destroyed AFSClose() can now let AFSRemoveCcb() do the work. Reviewed-on: http://gerrit.openafs.org/8854 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit f849fb1f6be4d4f8c34d150c8cdce1435a7125bf) Change-Id: I17d5493ac7845a310b200aae357daf50915cd6bf Reviewed-on: http://gerrit.openafs.org/9003 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 41ed5580a2873a90035df1a70a86b7c034c6ceb7 Author: Jeffrey Altman Date: Sat Dec 29 00:28:04 2012 -0500 Windows: Fix AFSLocateNameEntry prototype The VolumeCB parameter is an IN/OUT parameter. Reviewed-on: http://gerrit.openafs.org/8853 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit afdb0dac9201a235dc1fd35e52e43895979b4583) Change-Id: I7c3d4c81883acf01571980d3ba3f2dbc3e10bc72 Reviewed-on: http://gerrit.openafs.org/9002 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6bd33520407116c0819a44190181130da0836cf Author: Jeffrey Altman Date: Sat Dec 29 00:17:59 2012 -0500 Windows: AFSInitCcb redefinition The new AFSInitCcb() allocates its own DirOpenReferenceCount to associate with the AFSCcb.DirectoryCB. It also accepts the GrantedAccess mask and the FileAccess values which are stored in the AFSCcb. These changes simplify the callers and remove responsibility of tracking whether or not the DirOpenReferenceCount was successfully associated with the AFSCcb. The allocated DirOpenReferenceCount is always released by AFSRemoveCcb(). Reviewed-on: http://gerrit.openafs.org/8852 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9b3c7b41926758ed9060664a3da93820054db550) Change-Id: I7fdc5a4ce48481e68a57dde36c109406fe44d75b Reviewed-on: http://gerrit.openafs.org/9001 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e78afe16a4af6ceae10c3b153ffb800fccbfccea Author: Jeffrey Altman Date: Thu Dec 27 14:41:29 2012 -0500 Windows: AFSRemoveCcb cannot fail Since AFSRemoveCcb cannot fail, change the signature from returning NTSTATUS to void. Remove all error handling code. Reviewed-on: http://gerrit.openafs.org/8851 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 207890788079c82d81a1a7f2a0972ed165583798) Change-Id: I6ffc2f8dd42f1691eb5e29485d198bb4e7afc65a Reviewed-on: http://gerrit.openafs.org/9000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c18debeede1782e99cac1ebdfc98438966c23f38 Author: Jeffrey Altman Date: Wed Jan 23 22:50:26 2013 -0500 Windows: Use %p for ptrs in redirector trace messages Pointers were being logged with %08lX which results in partial pointer values being logged on 64-bit systems. Reviewed-on: http://gerrit.openafs.org/8943 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 9c07dd592a0b4c55266d63b26118ca23df6747a5) Change-Id: Ib48006f098189501c69a2fb1501dc735308da41b Reviewed-on: http://gerrit.openafs.org/8944 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f944811411e64d70046273cffcb058f5ecd21de3 Author: Jeffrey Altman Date: Fri Jan 25 03:25:46 2013 -0500 Windows: rename 'rbytes' to 'rxbytes' for clarity Throughout cm_dcache.c, the various 'rbytes' represents the number of bytes to be read from the next rx_Read or rx_Readv call. Rename the variable to 'rxbytes' to improve clarity. Reviewed-on: http://gerrit.openafs.org/8952 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4cda8a5551719a005e4f927dfd1fb25dc2c219) Change-Id: Iab90767ef8c10fe8d2614d4deafcb12dd1318062 Reviewed-on: http://gerrit.openafs.org/9016 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 01bc23f3ad679b21100d9543561d82df7ef2f758 Author: Jeffrey Altman Date: Thu Jan 3 14:11:31 2013 -0500 Windows: Update Bulk I/O Descriptor Update the cm_bulkIO_t and associated functions such that the 'reserved' field is no longer a boolean indicated whether or not buffers have been reserved but instead becomes a count of the number of buffers that have been reserved. buf_TryReserveBuffers is modified to return an afs_uint64 count of the number of buffers reserved instead of a boolean. cm_SetupStoreBIOD, cm_SetupFetchBIOD, and cm_ReleaseBIOD altered to store the reserved buffer count and use it when freeing the BIOD. Prior to this change it was not possible to reserve a count other than the number of buffers it takes to store one chunkSize of data. Reviewed-on: http://gerrit.openafs.org/8951 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 23fa416581568c2c58c6f2739139b9486ba8fa10) Change-Id: I38aba9f0af1ff550ee3993f99cf598be1faa7741 Reviewed-on: http://gerrit.openafs.org/9015 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c2dc06e3a947a195ff050d8847efd2148c78e4e Author: Jeffrey Altman Date: Sun Dec 16 02:02:06 2012 -0500 Windows: reformat Reviewed-on: http://gerrit.openafs.org/8950 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8cb3e2eee81c3ec87f27fbfab18d6560490cb6d8) Change-Id: Ida7f17651dda8219106f6901c68003da0bd0ab2d Reviewed-on: http://gerrit.openafs.org/9014 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f326ef27f344ecc67b60f64712726efbf7307baa Author: Jeffrey Altman Date: Tue Nov 6 06:41:47 2012 -0500 Windows: handle CM_ERROR_RETRY in cm_Analyze() cm_Analyze() was not forcing a retry when it received CM_ERROR_RETRY. Reviewed-on: http://gerrit.openafs.org/8949 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 87b7396e3106febd651ff60051550007716e8e49) Change-Id: I711485a5dbfcd3d4b703bf5e4b7e04baddb6e0ea Reviewed-on: http://gerrit.openafs.org/9013 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0e7c3b905e0eba43064b469f8eb8ca7d8c5221f6 Author: Jeffrey Altman Date: Sat Dec 29 00:40:25 2012 -0500 Windows: AFSNotifyHardLink() DirOpenReferenceCount handling This patchset consolidates the releasing of the DirOpenReferenceCount within AFSNotifyHardLink() into the try_exit block. This clarifies the logic and avoids duplicate code blocks. Reviewed-on: http://gerrit.openafs.org/8856 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 479f35832515c3235865e0e286d0fd5e5e406d47) Change-Id: I67eca7f972cf687732372dd1efe3c893c36f3b17 Reviewed-on: http://gerrit.openafs.org/9005 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 254562e5719516fdf7a1bded69be9c8bdb6792ec Author: Jeffrey Altman Date: Sat Dec 29 00:36:44 2012 -0500 Windows: AFSNotifyFileCreate() DirOpenReferenceCount handling This patchset consolidates the releasing of the DirOpenReferenceCount within AFSNotifyFileCreate() into the try_exit block. This clarifies the logic and avoids duplicate code blocks. Reviewed-on: http://gerrit.openafs.org/8855 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5ef1aeb60f14ca3807a2855c23cb011e0fc046fb) Change-Id: I495f6cc1ea6464e148478d0e8da01c9909744c05 Reviewed-on: http://gerrit.openafs.org/9004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d86347132a668a09891871ed4523b280c0e227a9 Author: Stephan Wiesand Date: Mon Jan 28 15:53:36 2013 +0100 CellServDB update 28 Jan 2013 Change-Id: Icb622cc5480aeba108b9a11f55cfb44ab7f7c262 Reviewed-on: http://gerrit.openafs.org/8982 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 35ee4abecd2ed77eaa49e9748e4034ad9ad37edc) Reviewed-on: http://gerrit.openafs.org/8986 Reviewed-by: Jeffrey Altman commit 8ee134421169a3d160bf6a2c504b61510b0820f7 Author: Rod Widdowson Date: Sun Dec 30 11:13:24 2012 +0000 Windows: Police Library IOCTLs Ensure that the callers of the various library ioctls have the correct identity or privs. All this policing is done in the fs (non unloadable) layer, and to ensure that the library layer cannot receive these calls directly we forbid non create Opens of the library control device. Reviewed-on: http://gerrit.openafs.org/8893 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 4da5f0b498782094b979737f6bee6e0bd2f5cb79) Change-Id: Ic23830ed30468e2b2f8c8125ce175daa589b6b93 Reviewed-on: http://gerrit.openafs.org/8935 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cd7ae7e60231fd003a7b83c5710a9773b308b6a6 Author: Rod Widdowson Date: Fri Dec 28 15:00:15 2012 +0000 Windows: Police the DEBUG TRACE ioctls When we get a IOCTL_AFS_GET_TRACE_BUFFER, a IOCTL_AFS_CONFIGURE_DEBUG_TRACE or a IOCTL_AFS_FORCE_CRASH, we check to see whether the caller is in the Administrators group and if it isn't we fail the request with ACCESS_DENIED. NOTE that this does not check whether the user has done the "run as admin" thing. We actually need to determine which priviledges are appropriate to this action and use that rather than group membership to police these actions and this will be added in a later patch. Meanwhile this represents a significant increment in security from previously. Reviewed-on: http://gerrit.openafs.org/8843 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dd672fffe9bfef6bd872b008e7f3e3dd5f904a80) Change-Id: I3566649677e2a0962167f3a7d0fb2b8b201b5c7d Reviewed-on: http://gerrit.openafs.org/8934 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bb2149251e7d72fa038918acee8869fbdfc3af33 Author: Dan van der Ster Date: Fri Dec 14 11:08:44 2012 +0100 rxperf: print achieved transfer rate Prints the client transfer rate in appropriate units (kbit/s, Mbit/s, or Gbit/s). Reviewed-on: http://gerrit.openafs.org/8758 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 07d83cd473146a0db9c2ed521b6fa6ba607b0d40) Change-Id: Iacd6dedd035265062373ac700fe9537db3ce0478 Reviewed-on: http://gerrit.openafs.org/8933 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9e9309a31b11890099fef3f84e7def757006fd27 Author: Russ Allbery Date: Thu Jan 3 09:13:26 2013 -0800 Fix spelling error (retreive for retrieve) in strings Caught by Lintian analysis of the compiled binaries. Reviewed-on: http://gerrit.openafs.org/8865 Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 2e5ef04e24c89e846af7aae7da57a0b0f5e200c3) Change-Id: I3ae8b3c4bed7197e19667c34d93c933d1047efd1 Reviewed-on: http://gerrit.openafs.org/8932 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 94bdfb9a44d85da9732e737b7925128c34f3dffe Author: Rod Widdowson Date: Fri Dec 28 15:43:52 2012 +0000 Windows: Restrict the Service IOCTLS to the service process When the service starts the system we save it's PID and when we see a IOCTL_AFS_INITIALIZE_REDIRECTOR_DEVICE, IOCTL_AFS_PROCESS_IRP_REQUEST, IOCTL_AFS_PROCESS_IRP_RESULT, IOCTL_AFS_SYSNAME_NOTIFICATION or IOCTL_AFS_SYSNAME_NOTIFICATION ioctl we check that the calling process has that PID. Change-Id: Ie66676bba4b4e4d858979babe9c0af4c53ea0143 Reviewed-on: http://gerrit.openafs.org/8844 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3ee5e20170b4c42f6fccabaf70e28d14e35fae53) Reviewed-on: http://gerrit.openafs.org/8886 commit 52fb1b1ac5adcfc32408a09049c6f6cb38b9267a Author: Rod Widdowson Date: Fri Dec 28 14:40:40 2012 +0000 Windows: Only allow the local system account to speak to the redirector When we get the IOCTL_AFS_INITIALIZE_CONTROL_DEVICE IOCTL we check to see whether the calling process is the LOCAL_SYSTEM_SID (the one that services run at if they are not running as a specified SID). If we are not then the initialize fails ACCESS_DENIED. If the debug build ONLY, setting the AFS_DBG_DISABLE_SYSTEM_SID_CHECK bit in OpenAFSDebugFlags circumvents this check, allowing interactive debugging. Existing code stops two processes (or even handles) from trying to initialize the system. Change-Id: I2ef8ca3a0df908acba38b435178d0509e96d6114 Reviewed-on: http://gerrit.openafs.org/8842 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5138c07abd076e0fa90d70a175a3a822fb127ef5) Reviewed-on: http://gerrit.openafs.org/8885 commit 13dbaf5f6b4ded161b762d15dc4ab6264c2f57b0 Author: Jeffrey Altman Date: Mon Dec 24 02:40:08 2012 -0500 Windows: GetResourceParent processing for \\afs When the input name is \\afs the parent must be an empty NETRESOURCE structure. The null lpRemoteName field represents no parent. Reviewed-on: http://gerrit.openafs.org/8831 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 75d9c88281b686822a71ffabe76cb4aebd35d0ee) Change-Id: I9d738e11f053ea99fe5f2508bbd459c616b7449d Reviewed-on: http://gerrit.openafs.org/8835 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6e49e017afb0017aa175f721d5423881b0efa517 Author: Jeffrey Altman Date: Wed Dec 19 16:59:57 2012 -0500 Windows: Add SERVERHASINLINEBULK macros Implement SERVERHASINLINEBULK and SET_SERVERHASINLINEBULK macros. Apply them to cm_vnodeops.c. Reviewed-on: http://gerrit.openafs.org/8830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5f43eb2919e20eaa18f8252f47f1ae0eceb246f1) Change-Id: I5fdd8549f58808b333acb0847c3572a93b961df6 Reviewed-on: http://gerrit.openafs.org/8834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 35c8ead35823c816b95b0f815ecfb75e427b1125 Author: Jeffrey Altman Date: Wed Dec 19 16:58:25 2012 -0500 Windows: move SERVERHAS64BIT macros to cm_conn.h Move the SERVERHAS64BIT and SETSERVERHASNO64BIT macros to cm_conn.h from cm_dcache.c. Reviewed-on: http://gerrit.openafs.org/8829 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 9054392cdc750a17854103a87dfb12b445b8bba1) Change-Id: Ic9847db660769dff579360de16dd5d135c6cad9f Reviewed-on: http://gerrit.openafs.org/8833 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c3acc04a9b70dff9f6f8ed254c70965b5f283417 Author: Jeffrey Altman Date: Wed Dec 19 16:47:36 2012 -0500 Windows: Fix smb_GetCallerAccess prototype to supress warnings. Reviewed-on: http://gerrit.openafs.org/8827 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b74c778bfd70c6db65e9c6d686b2482ae6a72bbe) Change-Id: Iad6c9273b13c40ab4754dfa8ca345f7ff694ef87 Reviewed-on: http://gerrit.openafs.org/8832 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bbe04e4b2f5507ffc8326c8d433ac141da4b3d44 Author: Jeffrey Altman Date: Sun Dec 23 23:15:59 2012 -0500 Windows: SetRenameInfo do not reference deleted name After the Target Dirctory CB has been deleted, it is not safe to reference the FileName component. Use the uniTargetName in the error log message. Reviewed-on: http://gerrit.openafs.org/8825 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit fc85e66d453c0f066f6cfa48222d20e18ea9b316) Change-Id: Ifdb98277fda873904800a395accd4602722365d1 Reviewed-on: http://gerrit.openafs.org/8826 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 41add492ab0ba8d15bf891f4efd19220edfc63d5 Author: Rod Widdowson Date: Sun Dec 23 14:48:14 2012 +0000 Windows: more warnings on kernel builds This is the same sort of changes a per git commit 8a4094e9ffa5d0f96501817c8ffd3cc8dc7ec62b but this time for the fs tree. Again most of the work is UNREFERENCED_PARAMETER, initialize variables where the compiler lacks the smarts and remove unused locals. Reviewed-on: http://gerrit.openafs.org/8823 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 93d674d702ab1bd452b139f5ba628db2c082f536) Change-Id: Ic83297350c5bff799a57640675b63064e96856f8 Reviewed-on: http://gerrit.openafs.org/8824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 41991a5497236651d05a0328bd904594c5d9808a Author: Jeffrey Altman Date: Wed Dec 19 11:45:56 2012 -0500 Windows: Remove unused AFSVolumeWorkerThread The currently implmentation does all maintenance work in the AFSPrimaryVolumeWorkerThread which is associated with the AFSGlobalRoot volume object. Remove AFSVolumeWorkerThread as it is unused. Reviewed-on: http://gerrit.openafs.org/8793 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fef0776df4f358c58cc0a6b5f3396573dd1a2d2a) Change-Id: If9e32300707605ece60d5c343ba55706948c9a2d Reviewed-on: http://gerrit.openafs.org/8822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 76fdabaa5accd1eb28eb2d100091dcfe496e8ddd Author: Jeffrey Altman Date: Wed Dec 19 09:31:06 2012 -0500 Windows: Wait for all worker threads to exit The signalling mechanism for waking and shutting down worker threads relies upon a per-queue event. Therefore it is not guaranteed that the worker thread that AFSShutdown*Thread() is attempting to wait for is in fact the thread that will be woken and exit. Modify the code to loop waking threads until the one that is being waited for does in fact exit. Subsequent calls to AFSShutdown*Thread() will bypass the wait if the thread has already exited. Reviewed-on: http://gerrit.openafs.org/8783 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1726aec2b2291c4b1e89e21fa0f5a27318671a6f) Change-Id: I0e4c96908cec4ea8a71bd44ebfa70168aca1ce1b Reviewed-on: http://gerrit.openafs.org/8821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d9a2d2f190de076ae64300dbd84e06072e52f93d Author: Rod Widdowson Date: Fri Dec 21 16:17:34 2012 +0000 Windows: warnings on kernel builds I turned some new warning (by virtue of a more modern compiler) and threw up a few hundred. This checked supresses them: - Mostly remove variables which are never used - Make unused parameters UNREFERENCED_PARAMETER - Initialize a couple of variables which were either forgotton or the compiler wasn't smart enough to notice were initialized. Also strip out some extraneous tabs which had crept in. Reviewed-on: http://gerrit.openafs.org/8812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8a4094e9ffa5d0f96501817c8ffd3cc8dc7ec62b) Change-Id: Iad9b04015c620f94d40db076705472e3b55d47d3 Reviewed-on: http://gerrit.openafs.org/8820 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8c1288ed64714a3e136a644eac1e64466d5dfdbc Author: Derrick Brashear Date: Wed Dec 19 10:59:24 2012 -0500 Windows: limit number of retries due to kdc repeat error don't retry forever. does not apply to master due to difference in sdk for kerberos Change-Id: Ic95e4fcb20a14eb3179a0a859c6c1ed5654accc7 Reviewed-on: http://gerrit.openafs.org/8792 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f9e9d9aebf2f671b099253ec847b0dd32ce5c686 Author: Jeffrey Altman Date: Thu Jun 7 09:52:13 2012 -0400 Windows: KFW_AFS_klog() changes If an explicit 'realm' is specified as input: a. Do not duplicate a request for afs/cellname@REALM if the explicit realm matches the realm of the client principal. b. If afs/cellname@REALM fails, request afs@REALM for the explicit realm. This patchset does not apply to master due to Kerberos Compatibility SDK conversion. Change-Id: I16b62325fc6797e1b2009d051eefcc29b000f10b Reviewed-on: http://gerrit.openafs.org/8773 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c23664aff7a78010ba462317087e84f7ae3c8518 Author: Jeffrey Altman Date: Thu Jun 7 09:27:00 2012 -0400 Windows: handle KRB5KRB_AP_ERR_REPEAT errors This patchset adds logic to handle a KRB5KRB_AP_ERR_REPEAT error sent by a KDC for the Windows aklog and the afskfw library. The KRB5KRB_AP_ERR_REPEAT is sent when the KDC detects a replay. However, the KDC replay detection is known to generate many false positives. If KRB5KRB_AP_ERR_REPEAT is received, wait one second and retry the request. This patchset does not apply to 'master' due to Kerberos Compatibility SDK conversion. Change-Id: I96518168d035f3c666761354348bd750718731a1 Reviewed-on: http://gerrit.openafs.org/8772 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ada0d9e751f95ff9b8fbbbe9b6fa0c5f3cadd0e8 Author: Jeffrey Altman Date: Sat Dec 15 12:26:18 2012 -0500 Windows: AFSLocateNameEntry Evaluate Symlink Target Instead of validating the symlink target if both the TargetFID and the Target Name fields are undefined, perform the validating if either of them are undefined. Reviewed-on: http://gerrit.openafs.org/8765 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fb4ae03f8d34af499d1c2960fa1345074b5a2f79) Change-Id: Idcf7d6d60001bcebf09c47a1659c5cecb591674e Reviewed-on: http://gerrit.openafs.org/8774 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1a35c95233cb7658a0a90620f893fb53589f6e2b Author: Jeffrey Altman Date: Sat Dec 15 12:23:58 2012 -0500 Windows: AFSLocateNameEntry Absolute Symlink Cell resolution During AFSLocateNameEntry processing of an absolute symlink the component being searched for in the AFSGlobalRoot volume may not be found. In this case, use AFSCheckCell() to query the service to resolve the name. If the AFSGlobalRoot happens to be the Freelance Root Volume then the service can resolve it even though it is not present in the directory listing. Reviewed-on: http://gerrit.openafs.org/8764 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1dea312bd4974bc3abcdf2aa527ef4c3ca1e283b) Change-Id: I6a8230d1d4ad6089fc59117225aaf6d30bac8f21 Reviewed-on: http://gerrit.openafs.org/8771 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5bf8ef32c3ce3b413dcd22c0d25f8f6184b7596f Author: Jeffrey Altman Date: Sat Dec 15 12:19:31 2012 -0500 Windows: cm_NameI Freelance Eval of Absolute Symlinks In cm_NameI() it is possible that a symlink to an absolute path is reached for which the component after the 'mountRoot' is not present in the mountRoot directory. If the mountRoot is the Freelance root.volume then it is appropriate to attempt automatic cell resolution. Reviewed-on: http://gerrit.openafs.org/8763 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3bddf7905198dc8f99ae5ab6195b51e5a9bc2e7e) Change-Id: I6da069a00fe018394b5e513c51824d46e1d9df8f Reviewed-on: http://gerrit.openafs.org/8770 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e5c86e8405a52eec3f5c73a5b9221c1c799e3cae Author: Jeffrey Altman Date: Sat Dec 15 12:18:52 2012 -0500 Windows: Set Symlink mpDV after reading target string When a cm_scache object, symlink, has its mountPointString field successfully populated by cm_GetData(), the mpDV field must be assigned the current dataVersion value in order to prevent unnecessary queries of the mountPointString from the file server. Reviewed-on: http://gerrit.openafs.org/8762 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0d9ffd712af25c1ca2bc92c428a599c495bc08dd) Change-Id: I7cc99e3644f3e1ec1059b0869d66544efd3502b9 Reviewed-on: http://gerrit.openafs.org/8769 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 05c4350bc43971e165fe9244de28582a7b3b3dd7 Author: Jeffrey Altman Date: Thu Dec 13 23:33:54 2012 -0500 Windows: If no inlinebulkstat, set the flag correctly If RXAFS_InlineBulkStatus fails with RXGEN_OPCODE, cm_SetServerNoInlineBulk must be called with the 'no' parameter set to True. Otherwise, thE cm_server object will not remember that the RPc is not supported. This is important for avoiding unnecessary timeouts on IBM AFS 3.6 servers. Reviewed-on: http://gerrit.openafs.org/8756 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aaa217b079b426a405e1364bf39276b13cd5f353) Change-Id: I3d4fd09264a4d3169fc1d7927930d09b3fe0fb7c Reviewed-on: http://gerrit.openafs.org/8768 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3865f95ea096713dadfcebf9bcdc4ab833c9ab84 Author: Jeffrey Altman Date: Thu Dec 13 13:27:21 2012 -0500 Windows: *ParseIoctlPath path has trailing slash Make it explicit that a pioctl input path that ends in a trailing slash is consistently interpretted as a directory. \\afs\cell\mp\dir\ == \\afs\cell\mp\dir\. Reviewed-on: http://gerrit.openafs.org/8755 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1e03c535da1ace4e878ee1f6985d68259d518f12) Change-Id: I59b95bc75108d6c6b4dfc2d4dd1b18aba68cf581 Reviewed-on: http://gerrit.openafs.org/8767 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c036aa94bdbfb894129ac853ad3be8be5d51fef0 Author: Arne Wiebalck Date: Thu Dec 6 16:23:05 2012 +0100 Update 'vos shadow' man page Change the 'vos shadow' man page to say that updating the VLDB with shadow volumes does only work if the VLDB entries for the corresponding source volumes are deleted first. Reviewed-on: http://gerrit.openafs.org/8652 Tested-by: BuildBot Reviewed-by: Dan van der Ster Tested-by: Dan van der Ster Reviewed-by: Ken Dreyer (cherry picked from commit 83ccb62012d7b3b696dd48e05feb8adeb203463a) Change-Id: I1adf0222bf9ab0f063a404e8702afe23bc59f841 Reviewed-on: http://gerrit.openafs.org/8766 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 340a6ce79a57e343f54672ce0873d981a3608a6f Author: Jeffrey Altman Date: Fri Dec 7 15:40:44 2012 -0500 Windows: 1.7.21 (1.7.2100) Version Change-Id: I47e020f5446f78e0165f7acca089d024105123d9 Reviewed-on: http://gerrit.openafs.org/8724 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c092313401a1bbdcc550e5cd21a6731fe514e27f Author: Jeffrey Altman Date: Fri Dec 7 15:39:57 2012 -0500 Windows: 1.7.21 Change Log Change-Id: I285e8333d812df4fb199d6547e7aa16891ed3e9d Reviewed-on: http://gerrit.openafs.org/8723 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ccb9b500478eba24a7db2a4432fbf008041de4a0 Author: Jeffrey Altman Date: Sun Dec 9 18:23:59 2012 -0500 Windows: Release Notes updates document adobe reader protected mode issues Explain Stats, Volumes, and Cells registry values many other minor improvements. Reviewed-on: http://gerrit.openafs.org/8733 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b11ac53fff26f35f3615b61e2e451a359eb9cdc1) Change-Id: Ibc36aaae64eddb233008d89760a43b29ed8d6d50 Reviewed-on: http://gerrit.openafs.org/8735 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5c0e85c5b91b93e7c9618d601ec3c01f1e174e29 Author: Jeffrey Altman Date: Sun Dec 9 18:13:01 2012 -0500 Windows: Correct RDR Subsystem value overlap AFS_SUBSYSTEM_LOAD_LIBRARY and AFS_SUBSYSTEM_PROCESS_PROCESSING were both assigned value 0x00010000. Ensure that all values are unique and match the documentation. Reviewed-on: http://gerrit.openafs.org/8732 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fc14fde0f7c1b36df61a60c718485ec54f414f6) Change-Id: Ia6db86b6d72b6340993afeb331c389855da8f5cf Reviewed-on: http://gerrit.openafs.org/8734 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47c58f186a66da0155e8db73d5c9eac93f4c63d4 Author: Jeffrey Altman Date: Sun Dec 9 01:18:03 2012 -0500 Windows: buf_usedCount can be 64-bit If buf_usedCount is 64-bit, must use 64-bit Interlocked operations. Define buf_IncrementUsedCount() and buf_DecrementUsedCount() macros to wrap the 32-bit and 64-bit Interlocked operations as appropriate. Reviewed-on: http://gerrit.openafs.org/8729 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b454f2ef0ea4efae0d703947ba67d4fd00545685) Change-Id: Id3b2529c76c1bcb781cecd566b5893cd138470d4 Reviewed-on: http://gerrit.openafs.org/8731 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 745ad6eb51497dee857c6b47579ed28b9cdcbef4 Author: Jeffrey Altman Date: Sun Dec 9 00:31:58 2012 -0500 Windows: RDR Dynamic root Freelance only commit 6c708d1415b27bf8f2804f3407e4fbe2f7bf1009 does not restrict the AFS redirector dynamic root detection only to the Freelance volume root directory. This logic should not apply to arbitrary mount point target paths. Reviewed-on: http://gerrit.openafs.org/8728 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 107d7ace8b83af10c18c84b94851f5105261225f) Change-Id: I4cdf1c74ac90273366a289acbc08a85aac1a1732 Reviewed-on: http://gerrit.openafs.org/8730 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4e6f376d064a7b72839c148a1082276cefc2e2f5 Author: Jeffrey Altman Date: Thu Dec 6 14:24:12 2012 -0500 Windows: AFSProcessOpen !MmFlush release SectionObjectResource Restructure the code around the MmFlushImageSection() call in AFSProcessOpen() to ensure that the SectionObjectResource is released even when the flush fails. Reviewed-on: http://gerrit.openafs.org/8713 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 34f51936859c57b8b23047ff352100005c4efa12) Change-Id: Iaf4a3b744d1fdc2f51c7d38a4e4f2e652de63e47 Reviewed-on: http://gerrit.openafs.org/8722 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 61f595d63ba1c67d23138c3d0cb232b8561f83d8 Author: Jeffrey Altman Date: Thu Dec 6 23:24:44 2012 -0500 Windows: AFSCachedWrite reset LastServerFlush when Forced If the ForceFlush parameter to AFSCachedWrite is set to TRUE, the Fcb->Specific.File.LastServerFlush value must be reset to ensure that the AFSPrimaryVolumeWorkerThread will trigger an extent flush on its next pass. The LastServerFlush value will not be reset by AFSNonCachedWrite() when called as a result of a CcFlushCache() call as it appears to be PagingIo. Reviewed-on: http://gerrit.openafs.org/8717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 339723e78eafec71576f04ed83e2d4417f6919a4) Change-Id: Ie4f024d879f1436e24a81aaafefcacea496736bd Reviewed-on: http://gerrit.openafs.org/8721 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bd660c3e9e0e6392e7b4190980776129daabfae3 Author: Jeffrey Altman Date: Thu Dec 6 23:20:57 2012 -0500 Windows: Periodic Worker CleanupFcb to Flush Dirty Extents The AFSPrimaryVolumeWorkerThread must not check the ObjectInformationCB reference count when determining whether or not to call AFSCleanupFcb(). One of the tasks of AFSCleanupFcb() is to flush dirty extents to the service. Reviewed-on: http://gerrit.openafs.org/8716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dd0f4bcd06c2283bc4ebbd3b44ed0f0e47b73d03) Change-Id: I291bb092c23f989f433e29d59d28668bdf109a7d Reviewed-on: http://gerrit.openafs.org/8720 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7614e06bae4fff210df31887df5f2e35bcb04d3a Author: Jeffrey Altman Date: Thu Dec 6 14:59:22 2012 -0500 Windows: SetDispositionInfo !MmFlush SectionObjectResource In AFSSetDispositionInfo() if MmFlushImageSection() fails, be sure to release the SectionObjectResource. Reviewed-on: http://gerrit.openafs.org/8714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b30c9dcfacb3785360c422c19ef2cc0eea151291) Change-Id: I7023b505bc17166218c3e3c3b2cf91d304764d66 Reviewed-on: http://gerrit.openafs.org/8719 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1d6da79d8a073f59d18643e6d9a33238ff4a0529 Author: Jeffrey Altman Date: Thu Dec 6 08:16:01 2012 -0500 Windows: SetVolumeState is not an invalidation Volume state notifications (online, offline, unknown) from the afsd_service.exe to the afs redirector are not invalidation events. The verify flag should not be set, the extents should not be purged, etc. Just set or clear the AFS_VOLUME_FLAGS_OFFLINE. Reviewed-on: http://gerrit.openafs.org/8651 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 42c404ba5d46699865892fb424c9ed514ca66db3) Change-Id: Ie4b0db91cf88a7e5b633e28269c28e1428ad47b6 Reviewed-on: http://gerrit.openafs.org/8718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0e6f996d65e62dd56afff72560572f7369d9d1a4 Author: Jeffrey Altman Date: Wed Dec 5 13:07:08 2012 -0500 Windows: AFSSetRenameInfo Drop TreeLocks MmForceSectionClosed If the Target directory TreeLock is held across the MmForceSectionClosed() call in AFSSetRenameInfo() Trend Micro's TmPreFlt!TmpQueryFullName call can deadlock in its worker thread when AFSCommonCreate() attempts to AFSLocateNameEntry() which requires shared access to the TreeLock for the search. Reorganize the Target Entry Exists case to call MmForceSectionClosed() after the directory entry has been deleted. That should throw a monkey wrench into Trend Micro's attempt to scan it. Reviewed-on: http://gerrit.openafs.org/8607 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a774fa8a6acf44b19e566c2da1bb416ef5d2983c) Change-Id: I6128f30495dcfd3a1ed79056e0afeeac5aaa5c0c Reviewed-on: http://gerrit.openafs.org/8650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c5ba290e79dd2bccd135d4984f6ea25d3208c6bb Author: Jeffrey Altman Date: Tue Dec 4 16:57:36 2012 -0500 Windows: Prevent lock inversion SetFileRenameInfo SetFileRenameInfo calls MmForceSectionClosed() which can call back to the afs redirector via the Cleanup processing. AFSCleanup() requires an exclusive hold of Fcb->Resource so we must obtain the lock first in AFSSetFileRenameInfo() prior to obtaining the SectionObjectResource. Reviewed-on: http://gerrit.openafs.org/8603 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b338928bd4663a50963b24d38d337cd1c9f4b87e) Change-Id: I3025c75fea32db3cd2e4527fb55208c87577cb56 Reviewed-on: http://gerrit.openafs.org/8616 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5ad617bada56779e8d08890e3fce71a870c0c4b2 Author: Jeffrey Altman Date: Tue Dec 4 16:56:21 2012 -0500 Windows: addition debug for --validate-cache Print the value of the header size, the magic value and the dirty flag. Fail check if header size and magic do not match current version of afsd_service.exe Reviewed-on: http://gerrit.openafs.org/8602 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ec6c7c1ce46b9a63f5e79071a25f12c94aed798e) Change-Id: I1f3d5d3cdd3fa60041b2e67153d6034e6e93a911 Reviewed-on: http://gerrit.openafs.org/8615 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6843e197ee2eae414c3ec29811cb25e3e29a5b6e Author: Jeffrey Altman Date: Tue Dec 4 13:27:59 2012 -0500 Windows: AFSProcessDFSLink to Dos Device Support msdfs links to :\ Map them to IOMgr as \??\:\ Reviewed-on: http://gerrit.openafs.org/8601 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2c7e2007342a86006199039408b7acbb63267235) Change-Id: Ifd13d194d33582cc1a3a5d3d8b5a54b893daa529 Reviewed-on: http://gerrit.openafs.org/8614 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 02e394a8a7c14d89ca3ff5c604c61f2e1d0707a5 Author: Jeffrey Altman Date: Mon Dec 3 13:39:18 2012 -0500 Windows: fs getcalleraccess Implement VIOC_GETCALLERACCESS and associated 'fs getcalleraccess' for Windows. Varies from the Unix implementation in the following ways: * getcalleraccess supports the -literal switch to permit querying rights of symlinks and mount points * multiple files can be provided on a single command line The VIOC_GETCALLERACCESS pioctl returns the user access rights and the anyuser access rights. Reviewed-on: http://gerrit.openafs.org/8598 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5616b7e2f91c9cdac1f026b852b8db923de11a10) Change-Id: I42b190391a6242e683bc6de6aafd671ddd14b164 Reviewed-on: http://gerrit.openafs.org/8613 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3623b68b46cc494bdaa8f61b93545087ee4ec6b6 Author: Jeffrey Altman Date: Sat Nov 24 11:44:16 2012 -0500 Windows: AFSDevControl print control if exception Reviewed-on: http://gerrit.openafs.org/8599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5adf1476b1c95ab61f7944f751928e5f47720478) Change-Id: Id564b31d9268e153e98d259132cfc41acef0dc0d Reviewed-on: http://gerrit.openafs.org/8612 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7e05c83222e21fe4cafabfe1b91a0943fa9b408b Author: Jeffrey Altman Date: Sat Nov 24 20:10:49 2012 -0500 rx: set abort client_initiated flag to match direction In a recent incident involving packet reflection back to the file server, aborts were being sent by the file server in response to a server sent packet. The aborts sent in response also failed to set the CLIENT_INITIATED flag in the header which permitted the the actual client to confuse the Abort as applying to its client initiated connection. in rxi_SendRawAbort, set the CLIENT_INITIATED flag to the opposite of the packet the abort is being sent in response to. Thanks to Chaskiel Grundman for the suggestion. Reviewed-on: http://gerrit.openafs.org/8513 Reviewed-by: Chaskiel Grundman Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 8e68e08901b0ad003ad1e5114a155bfac83bdd83) Change-Id: I747ce5c47203356d1332e0f4158da44784c466cc Reviewed-on: http://gerrit.openafs.org/8611 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 49a17f9e49de0743a96f0349f8637f283de54bd1 Author: Jeffrey Altman Date: Sat Nov 24 19:47:01 2012 -0500 rx: RX_INVALID_OPERATION abort unknown service only Patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the sending of RX_INVALID_OPERATION aborts for connection attempts requesting a service not offered by the rx peer. By sending aborts for all failures of rxi_FindConnection() the set of incoming packets that are responded to is broader than simply those with non-matching serviceIds. This patchset restricts the transmission of RX_INVALID_OPERATION aborts only to the explicit case in which rxi_FindConnection() attempted to find a service and either failed to find a match or couldn't apply the requested security class/level to that service. Reviewed-on: http://gerrit.openafs.org/8512 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81212b18b3411b538c4a1bb94732948902005beb) Change-Id: I5177b5fe770c405122b02069156b65d039e50ffb Reviewed-on: http://gerrit.openafs.org/8610 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 621a20eaee3da3084fc9534a0bda5f38ec950893 Author: Jeffrey Altman Date: Mon Dec 3 10:01:24 2012 -0500 Windows: shuffle trace messages for clarity Some of the trace messages for VolumeReferenceLocks and VolumeReferenceCounts were in odd places. Move them for consistency and clarity. Reviewed-on: http://gerrit.openafs.org/8581 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cbce3193b0cac9073b0bf5369b3b4994feaa0b4e) Change-Id: I10ab01c844defd23560ab481184be68906e4741d Reviewed-on: http://gerrit.openafs.org/8597 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0e38deac5543690867483ec5611e3803f7661ee3 Author: Jeffrey Altman Date: Mon Dec 3 09:11:14 2012 -0500 Windows: Handle AFSLocateNameEntry() STATUS_REPARSE AFSLocateNameEntry() can return STATUS_REPARSE in addition to NTSTATUS failure codes. As in the case of an NTSTATUS code other than STATUS_OBJECT_NAME_NOT_FOUND, the reference counts are decremented in AFSLocateNameEntry() if STATUS_REPARSE is returned. Reviewed-on: http://gerrit.openafs.org/8580 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e58eaae182dc877c0818b3cc5e8ea408606863f0) Change-Id: I870bdd0391e8308251821bfcb592433f4235c9ef Reviewed-on: http://gerrit.openafs.org/8596 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ea97b72f06a4d4779fd91c721da610d314ee86bb Author: Jeffrey Altman Date: Sat Dec 1 07:54:59 2012 -0500 Windows: Decr. used buf count flush and deleted files When flushing the cache (fs flush*) or when deleting files or when a file server reported error indicates that the buffer is bad, decrement the used cache count so "fs getcacheparms" now indicates a floating value based upon the number of buffers containing potentially valid data. Reviewed-on: http://gerrit.openafs.org/8579 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f25a061b7192531b54933088e4ac8adcde22961c) Change-Id: I2a9d44d14f8bbc11a4a709933061b0d17e5eb8ca Reviewed-on: http://gerrit.openafs.org/8595 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 44df10954ba228a61251aa1fc77f65d63d289779 Author: Jeffrey Altman Date: Sat Dec 1 07:30:57 2012 -0500 Windows: Restore "fs getcacheparms" used space buf_Init() adds all of the available buffers to the free queue at startup and cm_data.buf_freeCount tracks the number of items in the free queue. So it cannot be used as a method of reporting how much of the cache space has been used. Add a new buf_usedCount parameter to the cm_memmap data to track the number of cache blocks that have been used up to the total number of allocated blocks. buf_usedCount can then be used in cm_IoctlGetCacheParms to restore the original behavior. Reviewed-on: http://gerrit.openafs.org/8578 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 66a5703463baad5739b6d47ed12d0a3a7b0c489a) Change-Id: Iec0b8b7e4976cc94b7fb55999c108b1bc09ed8b9 Reviewed-on: http://gerrit.openafs.org/8594 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9227b805fba1b0bc318c0a0ce597e9e27bdf10d1 Author: Jeffrey Altman Date: Thu Nov 29 03:14:42 2012 -0500 Windows: QFileInfo only Verify Entry when necessary During a QueryFileInformation request only call AFSVerifyEntry() when the AFS_OBJECT_FLAGS_VERIFY flag is set on the ObjectInformationCB. The AFS_OBJECT_FLAGS_VERIFY flag is set in response to an invalidation event from the cache manager. Let the cache manager decide when our data is no longer consistent with the file server. Reviewed-on: http://gerrit.openafs.org/8568 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit be27d61961cb490e3f1033d9e0943d2655b73b8a) Change-Id: Ia3a951b0ce828583f9037ffe84589f1f4906451a Reviewed-on: http://gerrit.openafs.org/8593 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d0e35ace148fc2c30d3e517fa16519c783181446 Author: Jeffrey Altman Date: Thu Nov 29 03:13:11 2012 -0500 Windows: Dir Enum only validate when necessary During a directory enumeration, do not call AFSValidateEntry() for every DirectoryCB. Instead only do so when the AFS_OBJECT_FLAGS_VERIFY is set on the ObjectInformationCB. Reviewed-on: http://gerrit.openafs.org/8567 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f499babad036b9efc4c5f0aab252cfadcfb0c22f) Change-Id: I8e1f62bc547c1d141ab6afca626c66042dd6fb7b Reviewed-on: http://gerrit.openafs.org/8592 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e055f6361960760de599661710de5f42513fe658 Author: Jeffrey Altman Date: Thu Nov 29 03:02:48 2012 -0500 Windows: AFSTearDownFcbExtents count extents properly Fcb->Specific.File.ExtentsCount cannot be used directly in the for loop conditional because each call to AFSFreeExtent() decrements the value. Instead, save the original value to 'lFcbExtentCount' and use that in the loop conditional. Reviewed-on: http://gerrit.openafs.org/8566 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 957601aeab7050413c4e0c9994e2c263a1b8374d) Change-Id: I307386434e973715e9801588046dd76b27525803 Reviewed-on: http://gerrit.openafs.org/8591 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cc08505e3a3f3d84385259d3839f94c3bef97061 Author: Jeffrey Altman Date: Thu Nov 29 03:00:48 2012 -0500 Windows: AFSCleanup calls AFSDeleteFcbExtents When the hard link count of the file drops to zero, call AFSDeleteFcbExtents() instead of AFSTearDownFcbExtents() because the file has been deleted and the extents have been implicitly released. Reviewed-on: http://gerrit.openafs.org/8565 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit da6c8d57287392c0e7d0c512dab5bcf019421f81) Change-Id: Ia62d717a3a5eec7b26da17894bc9906d625e0c8a Reviewed-on: http://gerrit.openafs.org/8590 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b926dbaabd270bb1dc03786d5dfafe762559b2dd Author: Jeffrey Altman Date: Thu Nov 29 02:58:46 2012 -0500 Windows: AFSDeleteFcbExtents() Similar to AFSTearDownFcbExtents() but does not release the extents to afsd_service.exe. It is intended for use when the FCB's extents are implicitly released as the result of file deletion. Reviewed-on: http://gerrit.openafs.org/8564 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 037d568de530603299b1dd3be6fd623ca81c25c5) Change-Id: If33884ecb78c2a4a90c6e7e9340a426d5ab31aee Reviewed-on: http://gerrit.openafs.org/8589 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ac9f759b7c43a37898e2883523e6d7b1f18a143b Author: Jeffrey Altman Date: Wed Nov 28 02:48:48 2012 -0500 Windows: Fcb sectionObjectResource Add a SectionObjectResource to the AFS_FCB structure. This lock replaces the Fcb.Resource in protecting the SectionObjectPointers. The new resource is being added to assist in avoiding deadlocks caused by Trend Micro and perhaps other AV products when CcPurgeCacheSection() is called while holding the Fcb.Resource which is required in AFSProcessOpen(). Reviewed-on: http://gerrit.openafs.org/8563 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dc87e01c704d4cb16c26368597b383dc738d4d25) Change-Id: I2a10315a7c8c65327cd736e1c7a25a903a5dda2b Reviewed-on: http://gerrit.openafs.org/8588 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0162a2d78b0abf94bd8600e2a0191702421f007c Author: Jeffrey Altman Date: Tue Nov 27 14:26:21 2012 -0500 Windows: Implement dynamic cell detection for RDR RDR_EvaluateNodeByName knew how to parse \\afs\foo#bar\ notation but couldn't perform a lookup for a cell that wasn't already in the root directory. Add support for autorecognition. Reviewed-on: http://gerrit.openafs.org/8562 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6c708d1415b27bf8f2804f3407e4fbe2f7bf1009) Change-Id: I213c29e33f5d07bbb6ac2f8cb9433a7d73ae3dee Reviewed-on: http://gerrit.openafs.org/8587 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 78def630c4bf6f9aa98fde1a5de50a1264e801ff Author: Jeffrey Altman Date: Tue Nov 27 00:35:20 2012 -0500 Windows: PrimaryVolumeWorkerThread Garbage Collect Fcb Revert commit cecd99abd3837ef820d78fb15e450c8688b0f39b. Failing to garbage collect the FCB from the ObjectInformationCB at the earliest opportunity opens the door to a deadlock with Trend Micro's anti-virus driver. Trend Micro attempts to make a copy of the file data each time a CcPurgeCacheSection() is performed on the FCB. If during AFSValidateEntry or AFSVerifyEntry a DirectoryCB-> ObjectInformationCB->FCB is discovered which has a non-NULL SectionObjectPointers.DataSectionObject and the data version in the DirEnumEntryCB differs from the ObjectInformationCB, a CcPurgeCacheSection() call is performed while holding the FCB->NPFcb->Resource exclusively. Trend Micro will deadlock the thread making the CcPurgeCacheSection() call when it attempts to open the file in one of its worker threads. Reviewed-on: http://gerrit.openafs.org/8529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a428033bfe78c00dad84af9c14645723344297cf) Change-Id: I41364742c723ed40513f2fe42952b9758545adae Reviewed-on: http://gerrit.openafs.org/8586 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit db6a2740d0fffce33adf65054f59c6e8ccb9a262 Author: Jeffrey Altman Date: Mon Nov 26 11:25:43 2012 -0500 Windows: RefCounts, Asserts, and Trace Logging Rename DirectoryCB.OpenReferenceCount to DirOpenReferenceCount to distinguish it from the FCB.OpenReferenceCount. This makes it easier to search for instances within an editor or debugger. Ensure that all InterlockedIncrement and InterlockedDecrement calls on a reference count field assign their value to a local 'lCount' variable. Ensure that 'lCount' is used within any trace log messages and conditionals. Add ASSERT( lCount >= 0) after all reference count decrements in order to catch underflows. Change conditionals from (RefCount == 0) to (RefCount <= 0) so that object destruction can occur when there has been an underflow. This is important in release builds for which ASSERT() is a no-op. Reviewed-on: http://gerrit.openafs.org/8522 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b5876a60f7406cdf67a4802b5b6fdf772a303eff) Change-Id: Ib83ec54316a2358fdc756c9f51b1ca4d82bf4db6 Reviewed-on: http://gerrit.openafs.org/8577 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 63f15b46d67d855184414a4c36b40d07daa14204 Author: Jeffrey Altman Date: Mon Nov 26 11:16:56 2012 -0500 Windows: AFSClose File FCB/CCB cleanup before DirCB Move the processing of FCB and CCB cleanup ahead of the DirectoryCB cleanup. It is not safe to dereference the Ccb->DirectoryCB until after the CCB has been destroyed. Reviewed-on: http://gerrit.openafs.org/8521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 438b0d8a239068c58065f7a552d45b8077f027dd) Change-Id: I69ac0289ca559784c93828b1b8ef9e16e288c7b5 Reviewed-on: http://gerrit.openafs.org/8576 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 32d29bf0055a90a888758412fe97186e1e17b6e3 Author: Jeffrey Altman Date: Sun Nov 25 18:13:53 2012 -0500 Windows: AFSDeleteObjectInfo not on volume roots The VolumeCB embeds an ObjectInformationCB structure which must not be freed by calling AFSDeleteObjectInfo(). Add an assert in the checked build and return without destroying the object in the free build. Reviewed-on: http://gerrit.openafs.org/8520 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 71ef2663da36f50a7eabe6b70971714a8f5f5dd5) Change-Id: Id173c816e01129870716e0225beceb23df93edb8 Reviewed-on: http://gerrit.openafs.org/8575 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 080e986bec52639c4ace2ae263a237201455176b Author: Jeffrey Altman Date: Mon Nov 26 07:10:05 2012 -0500 Windows: Missing DirEntry Ref incr AFSLocateName In the STATUS_NAME_COLLISION error path the DirEntry refcnt must be incremented because it will be decremented before exit from AFSLocateName(). Reviewed-on: http://gerrit.openafs.org/8518 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 282e2bdd7f34f26073e003a84a85cb4f8b59f0cd) Change-Id: I5de64c2407b84c1539523aebd038ed59068af1ab Reviewed-on: http://gerrit.openafs.org/8574 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3d1be670467a7da52745e9f47ef1ce75ac776c22 Author: Jeffrey Altman Date: Mon Nov 26 01:18:19 2012 -0500 Windows: AFSLocateNameEntry move InsertNextEntry In AFSLocateNameEntry, move the InsertNextEntry to name array call from before the directory entry DirOpenReferenceCount is incremented to afterwards. This permits InsertNextEntry() to consistently assert based upon the DirOpenReferenceCount value. Reviewed-on: http://gerrit.openafs.org/8517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcfd1f99d8dd7a83bf09330dfd3b1fc6cc8b11c0) Change-Id: I70532de60e329443381311ecbf23f0abc9df27af Reviewed-on: http://gerrit.openafs.org/8573 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d2817d8d8fb292878be2e123a470314d3397843e Author: Jeffrey Altman Date: Sun Nov 25 18:06:17 2012 -0500 Windows: AFSInvalidateCache volume refcounts AFSInvalidateCache failed to release the volume reference count when FileId is the volume root. In the non-root case it released it too early permitting a race with AFSPrimaryVolumeWorkerThread calling AFSRemoveVolume(). Reviewed-on: http://gerrit.openafs.org/8516 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5a09e6ab2b1913f438eae113f41a7ef9ea92387d) Change-Id: If4a66d17a515e6483a487c4888583b01763f1403 Reviewed-on: http://gerrit.openafs.org/8572 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 140a5aff26521085a073628fb0a953a141fbbd4b Author: Jeffrey Altman Date: Sat Nov 24 14:36:46 2012 -0500 Windows: Fail RX_INVALID_OPERATION errors RX_INVALID_OPERATION errors were not resulting in an eventual failure and the RPC was being repeated indefinitely. There were three subtle problems: 1. RX_INVALID_OPERATION was being processed by cm_Analyze() resulting in a retry in all cases. Even those where no connp was passed in as NULL. connp == NULL implies that no server could be obtained so the RPC was not issued on this pass. As a result there should be no retry. 2. RX_INVALID_OPERATION was mapped to CM_ERROR_UNKNOWN which is not an error that is reported to the AFS redirector. 3. RDR_BkgFetch was setting CM_REQ_NORETRY and permitting the retries to be handled by the cm_daemon threads. However, CM_ERROR_UNKNOWN was not treated as a fatal error by cm_Daemon. Address the failures in the following ways: A. cm_Analyze no longer retries calls which did not take place. B. Create a new CM_ERROR_INVAL_NET_RESP error for RX_INVALID_OPERATION which is translated to the Win32 STATUS_INVALID_NETWORK_RESPONSE error. This is now returned to the AFS redirector and treated as a fatal error. C. RDR_BkgFetch no longer queues tasks to cm_Daemon with the CM_REQ_NORETRY flag set. Reviewed-on: http://gerrit.openafs.org/8510 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ded88c8f8d1dc6758344b708d2aa55f3b29651c7) Change-Id: I933488689c2e0582a2b1f46a4488837e696d036d Reviewed-on: http://gerrit.openafs.org/8571 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f917a8986a893c8bd4ea4d6586ad6015310910f0 Author: Andrew Deason Date: Tue Nov 13 23:30:41 2012 -0600 rx: Lock call for KeepAliveOn/KeepAliveOff rxi_KeepAliveOn/Off expect the call lock to be held after the call has been initialized. So, hold it in the rx_KeepAliveOn/Off callers. Reviewed-on: http://gerrit.openafs.org/8463 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 866c05825c9964aa92740bcb0f20f26b451e65ea) Change-Id: Id020e0b20857e1e79ca970be9f57d0f2e64fbfbb Reviewed-on: http://gerrit.openafs.org/8570 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8f7527b802406e0f96bd7fee49e3465b4cb9e392 Author: Jeffrey Altman Date: Tue Nov 27 00:16:58 2012 -0500 Windows: cm_LookupInternal obtain type of target cm_LookupInternal needs to return the target of a mount point if the matching directory entry is a mount point. Therefore, if the target type is unknown the status information must be queried. Reviewed-on: http://gerrit.openafs.org/8528 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9ed02a628afd700a0e3c47ac92fa9c89d0827301) Change-Id: Id4b653f846485c47dbfa6a90ac0d33aa5836a63f Reviewed-on: http://gerrit.openafs.org/8531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6511c8be27e2c66822f56bece9fb47db036cc00a Author: Jeffrey Altman Date: Tue Nov 27 00:08:30 2012 -0500 Windows: cm_GetNewSCache init mpDV to BAD when allocatiing a new cm_scache_t object the mpDataVersion field must be initialized to CM_SCACHE_BAD_VERSION. Zero is a valid data version for a mount point or symlink. Reviewed-on: http://gerrit.openafs.org/8527 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 11c8a64ffc10addb5fe7b68b78666cd91edccfb9) Change-Id: Ia3c4ea863d208aa9b556c902b1cbad56abd49795 Reviewed-on: http://gerrit.openafs.org/8530 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ccb4aabc0b1399389dfa05480a03bc883f88c89d Author: Jeffrey Altman Date: Sun Nov 25 14:30:07 2012 -0500 Windows: AFSValidateEntry Symlink TargetName During an AFSValidateEntry if the data version of the symlink object has not changed, do not discard or rebuild the target name if already assisgned. Reviewed-on: http://gerrit.openafs.org/8515 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit 45721d0d5603ac0d7dae477bf0ed33c54bba6dbc) Change-Id: I36e6d3234e0c6acb3aaf608731e14d203182569f Reviewed-on: http://gerrit.openafs.org/8526 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3a82d6aadfd727003c2f4c3ac1c11923ae3a53fe Author: Jeffrey Altman Date: Sun Nov 25 23:56:47 2012 -0500 Windows: Panic if RDR_Initialize SERVICE_DISABLED If RDR_Initialize() fails with ERROR_SERVICE_DISABLED it means that the AFSRedir.sys driver loaded but the AFSRedirLib.sys driver library cannot be loaded. In this situation neither the RDR nor SMB interfaces can successfully be used. Panic! Reviewed-on: http://gerrit.openafs.org/8514 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5ab61bbc5c5f50183e737184de03b1b9153e208a) Change-Id: I6fdb75aac0d1f6dad77aaf888433d75d0c9d9d65 Reviewed-on: http://gerrit.openafs.org/8525 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit be434ad483bd39bd877835481be9aaebc32489cb Author: Jeffrey Altman Date: Fri Nov 16 17:20:33 2012 -0500 Windows: GetResourceInformation print path earlier In the network provider, GetResourceInformation was logging the input resource path after the afs redirector chopped it up. Log it before the DeviceIoControl call. Reviewed-on: http://gerrit.openafs.org/8509 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e3373c5ad24bf2ff858d1f33fa0dd65236c928de) Change-Id: I1d67269caeca413c74d1daadadf5b29e5c2fb105 Reviewed-on: http://gerrit.openafs.org/8524 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 34d3eabb57fa6bcf975801d88df6e603532a6124 Author: Jeffrey Altman Date: Sat Nov 17 00:43:00 2012 -0500 Windows: Add Hard Link support to Service Implement Hard Link support to the redirector interface in the service. It is implemented to support hard links across directories even though AFS does not currently support it. cm_Link() will check before issuing an RPC to the file server. ReplaceIfExists functionality is implemented by cm_Unlink() followed by cm_Link() if required. Reviewed-on: http://gerrit.openafs.org/8482 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 873f8978fd13ae5a52d7401788d84237dace105f) Change-Id: I147f23336060610d167e6ab2e7410e0cc6024cee Reviewed-on: http://gerrit.openafs.org/8508 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bb40eb3cfc2bb587afb1f3c80fc33198f2c13684 Author: Jeffrey Altman Date: Fri Nov 16 22:27:02 2012 -0500 Windows: Add Hard Link support to AFS Redirector Both Windows and AFS support the notion of hard links to files. Add an implementation to the AFS redirector. The body of the functionality and the IOCTL to the service permits the specification of hard links to files across directory boundaries. There is a restriction within AFSSetFileLinkInfo() which prevents cross-directory requests. However, this can be taken out if AFS ever permits them. Decrement object information link counts on directory entry deletions. Do not delete object information context blocks if the link count is greater than 0. Increment link counts when hard links are added. A subsequent patchset will implement the afsd_service support. Reviewed-on: http://gerrit.openafs.org/8481 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2b86ae33fead57696488e4b8c425cf8ae1bdd0f1) Change-Id: I1177404734af157c488f6bc38347e000f28c0d71 Reviewed-on: http://gerrit.openafs.org/8507 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6351ecae8581f1fd68e3a1afd2ecec941bb90743 Author: Jeffrey Altman Date: Thu Nov 22 11:52:11 2012 -0500 Windows: Trend Micro QueryDirectory deadlock Trend Micro will deadlock both itself and the AFS redirector by calling a worker thread to generate a temporary file name during an active FindFirst Directory Query. The Trend Micro worker will also attempt to enumerate the directory. If the directory contains an entry for which the data version as reported by the service is different than the data version in the ObjectInformationCB a deadlock will occur on the matching FileCB Resource. To avoid this deadlock, prevent AFSValidateEntry from purging or updating the ObjectInformationCB and FileObject information when called from AFSQueryDirectory. Reviewed-on: http://gerrit.openafs.org/8492 Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3ed4794c1ed7db14b67eb0c3bb65c1aed18ff35) Change-Id: I902f479ae995ca8dc0ba96f0eef4ec873ca60257 Reviewed-on: http://gerrit.openafs.org/8506 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ad307dfe79ab1c17a57cad8f5b988ccb28cbe33c Author: Jeffrey Altman Date: Mon Nov 19 15:33:33 2012 -0500 Windows: Missing lock in AFSNotifyRename If the ParentObjectInformation and TargetParentObjectInformation are different, the TreeLock for each must be held. Reviewed-on: http://gerrit.openafs.org/8479 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d733f9daed95feef2eefb3d68dc16607b1321142) Change-Id: I2b2e87d51e9f791980a06b7cbb31faa3d8b30cbd Reviewed-on: http://gerrit.openafs.org/8505 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1cac9ed220e57bf859ec137bcb4ac7f9824c1b2b Author: Jeffrey Altman Date: Mon Nov 19 15:30:09 2012 -0500 Windows: AFSSetRenameInfo always set pRenameInfo Make it easier to debug AFSSetRenameInfo by setting pRenameInfo so that the FILE_RENAME_INFORMATION structure is visible within the debugger on all code paths. Reviewed-on: http://gerrit.openafs.org/8478 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 8245b2bc7aab4553f368470d97d0110f9daa4fe9) Change-Id: I6bf7c55febea9b20754e87965b773c41a6c3e312 Reviewed-on: http://gerrit.openafs.org/8504 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 36ef4bb8d0f70c4d7f55dcd3491e77bff6674c42 Author: Jeffrey Altman Date: Thu Nov 15 23:13:17 2012 -0500 Windows: SetFileRenameInfo Improve Error Handling If a Target FileObject is not provided by the IOManager and a Target RootDirectory Handle is provided something has gone wrong. Return STATUS_INVALID_PARAMETER to indicate the invalid state. If the target directory is not specified by FileObject and a full target path is provided return STATUS_NOT_SAME_DEVICE to force an object Move instead of Rename. Reviewed-on: http://gerrit.openafs.org/8477 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit dbc2589731ff5c6879745be8be5c5bf46844a4ef) Change-Id: I9a7d6db93f8a4a8dd0ef00eba3b0c8d7116cc600 Reviewed-on: http://gerrit.openafs.org/8503 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7852076aab78c5cbb22d05140f3c3622132ec40e Author: Jeffrey Altman Date: Wed Nov 21 18:08:35 2012 -0500 Windows: smb_ReceiveTran2QFileInfo Pioctl support Similar to the QueryPathInfo support for _._AFS_IOCTL_._ the QueryFileInfo interface must respond to pioctl queries. When GetFileAttributes() on XP is called from the afslogon.dll the QFileInfo path is used instead of the QPathInfo path. Reviewed-on: http://gerrit.openafs.org/8491 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 42e812c7abf5fafbbfeebd40828978e8b4639860) Change-Id: I773c7d611c7e6b12cb738138fe89573e1708f7c5 Reviewed-on: http://gerrit.openafs.org/8502 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 726abac3a42696c8c02394a9f440657cb60e1fc5 Author: Jeffrey Altman Date: Wed Nov 21 18:03:10 2012 -0500 Windows: afslogon do not specify smbName for tokens The smbName was added to the Windows ktc_SetTokens() interface to provide a mechanism for passing the Windows account name that the tokens should be associated with via Integrated Logon. This was only required when the Authentication Provider did not impersonate the user context prior to calling ktc_SetTokens(). Now that impersonation is used, the ktc_SetTokens() call will do the right thing without the smbName. In fact, when impersonation is used setting the smbName does the wrong thing by specifying the AFS_PIOCTL_LOGON flag which is only valid if the SYSTEM account is issuing the ktc_SetToken() call. Reviewed-on: http://gerrit.openafs.org/8490 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 305133cde60fec7fb1050caf60a4319cdcf88a27) Change-Id: I8fa3456b9fc2bf560e06a089bff26011cfbe17d9 Reviewed-on: http://gerrit.openafs.org/8501 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e50932722905edbfc67ae53807ac94d84eca910 Author: Jeffrey Altman Date: Wed Nov 21 01:13:49 2012 -0500 Windows: Fix smb_ReceiveTran2QPathInfo Pioctl support The path check should needs to include the root directory slash when comparing to the \_._AFS_IOCTL_._ path to detect a pioctl request. Reviewed-on: http://gerrit.openafs.org/8488 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eca3d56436c16e4634afe1954a2a15424b4ad5f1) Change-Id: Ic455a8d1ce7eab9918e29ceb59332a4932eb7d26 Reviewed-on: http://gerrit.openafs.org/8500 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 154554cdf97f39c7f6b57174b0551cdc5df59b5a Author: Jeffrey Altman Date: Tue Nov 20 01:23:08 2012 -0500 Windows: QuerySecurity deny access to SACL The SACL requires System Access Level. Requests for SACL by end user applications must be denied. Permit access to Owner, Group, DACL and Label but not SACL. This change permits executables to be initiated from drive letter mappings. Reviewed-on: http://gerrit.openafs.org/8483 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5acf8b7f98ecd3daa721e60b49c7a582c7ce3b8d) Change-Id: If4bd65afbc4918a0c7d750ae4333f462ffd9e7be Reviewed-on: http://gerrit.openafs.org/8499 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 12cde9e067957fe8789be5ae34b979e940cc4512 Author: Jeffrey Altman Date: Mon Nov 19 15:06:47 2012 -0500 Windows: Fix Redir link counting Each object in AFS has a link count which tracks the number of directory entries that refer to the FileId. In the redirector there is one ObjectInformationCB per FileId and one AFSDirectoryCB for each directory entry. When a directory entry is deleted perhaps by delete on close it is important to ensure that the matching ObjectInformationCB is not deleted unless the Link count drops to 0. Reviewed-on: http://gerrit.openafs.org/8480 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6d37315a9c4fa4aae99715dd18827fcc0b543ba3) Change-Id: Ia26bb86aaefc7b6287a8255001cd7f31145bb215 Reviewed-on: http://gerrit.openafs.org/8498 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62876c4acaa48e1decc4da181ef97dcc92e5715f Author: Jeffrey Altman Date: Sat Nov 17 21:44:52 2012 -0500 Windows: buf_CleanLocked protect against NULL bp->userp The cm_buf_t.userp field should never be NULL if the CM_BUF_DIRTY flag is set but apparently it sometimes is. cm_BufWrite() requires that the userp parameter be non-NULL. Otherwise, an assertion fails and afsd_service.exe panics. If bp->userp is NULL, use cm_rootUserp. The worst that will happen is the write will fail due to an access denied error. Reviewed-on: http://gerrit.openafs.org/8475 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f436fe03c80e21b6a58a6de962070841e00791ef) Change-Id: I9b080e0c0160f1bdc6cf666a3f05d21ef0d20d21 Reviewed-on: http://gerrit.openafs.org/8497 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d5ef8f72ae28741e8fac0a5d99cbe018df2900d0 Author: Jeffrey Altman Date: Sat Nov 17 21:39:50 2012 -0500 Windows: do not adjust deleted scache LRU ordering Instead of moving deleted scache objects so that they are next in line to be recycled, do not move them at all. Making them next to be recycled results in the CM_SCACHEFLAG_DELETED flag value being lost. Reviewed-on: http://gerrit.openafs.org/8474 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 887cff5b0f84ad3b758bc4258b1f1302401c2c1d) Change-Id: I2e1fc28eeb6c2a7871443a1b70abb9006454d5de Reviewed-on: http://gerrit.openafs.org/8496 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0de25555dc65ebb46527f37d7bd7d02b96c7973 Author: Jeffrey Altman Date: Sat Nov 17 21:32:44 2012 -0500 Windows: buf_CleanLocked validate cm_scache_t If the cm_scache_t object is not passed in by the caller ensure that the cm_scache_t has a valid callback. If the cm_scache_t has the CM_SCACHEFLAG_DELETED flag set, clear the dirty flag on the cm_buf_t and do not bother contacting the file server. Reviewed-on: http://gerrit.openafs.org/8473 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c99797eadc80efa24972a85d1c37e03393c888ca) Change-Id: If4b04f6d5dbdf531ed32fffd992361c3c1ace17f Reviewed-on: http://gerrit.openafs.org/8495 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa9084bd1a79989ea1928150d0bed9c3eee19486 Author: Jeffrey Altman Date: Sat Nov 17 17:11:42 2012 -0500 Windows: buf_SetDirty add assertion the userp parameter must never be NULL. Reviewed-on: http://gerrit.openafs.org/8472 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f03247ddd7f5b4a9cf8ef132757d794546c884ef) Change-Id: I61f9495847f6db5292c73fee514d51d731ff2a36 Reviewed-on: http://gerrit.openafs.org/8494 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c621fe4b9912b22a49ae064736e5d3c1eeef66fe Author: Jeffrey Altman Date: Wed Nov 14 07:02:01 2012 -0500 Windows: Hold ProcessTreeLock across AFSValidateProcessEntry AFSValidateProcessEntry() is called from AFSProcessCreate() which holds the ProcessTree.TreeLock exclusive across the call and from AFSCreate() and AFSRetrieveAuthGroup() where it is not held at all. Add a parameter to AFSValidateProcessEntry() that indicates whether or not the ProcessTree.TreeLock is held. If it is held, it must be held exclusive. If it is not held, the lock must be acquired within AFSValidateProcessEntry() and it must be held for the entire lifetime of the pParentProcessCB reference. Failure to hold the TreeLock for the lifetime of the reference permits a race with AFSProcessDestroy() that can result in the parent ProcessCB being destroyed while its Resource is held. Reviewed-on: http://gerrit.openafs.org/8455 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e1d149c925cfcc2656086bee2416fb319e1bd9ca) Change-Id: I466cbc82cf4a7a54e82236cdcc01982c6c0baeb1 Reviewed-on: http://gerrit.openafs.org/8468 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e84316780bec7dc6f125b37c277026692ecc0de1 Author: Jeffrey Altman Date: Tue Nov 13 17:59:06 2012 -0500 Windows: Do not reset cm_buf.offset on error When an error occurs the cm_buf_t is not removed from the hash tables. Since the scacheHashTable hash is built from the fid and the offset it is not safe to reset the offset field. Resetting the offset field results in an assertion failure during buffer recycling. Reviewed-on: http://gerrit.openafs.org/8452 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f56c01d313140b625b4342feddfe464342d1ced4) Change-Id: I4c64e8b6a8a158d3b3faeaef301792a667f4a8b2 Reviewed-on: http://gerrit.openafs.org/8454 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57c76152b41cbfbe6d5b8d4bc0c94fa82300d0e2 Author: Jeffrey Altman Date: Tue Nov 13 09:14:39 2012 -0500 include roken.h in yacc parsers Reviewed-on: http://gerrit.openafs.org/8450 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 91f43fb6f798bdcae95e43a1fe5923742b307622) Change-Id: I6012fd1cf6428b90602a2e9eef2fdf3e9c38fd85 Reviewed-on: http://gerrit.openafs.org/8453 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e05e52ed5666ee6a0369f7b1c14f4cd5ec4ffc90 Author: Jeffrey Altman Date: Mon Nov 12 16:38:33 2012 -0500 Windows: 1.7.2000 (1.7.20) Change-Id: If7ec2704d977cae9644c027812cdf6cefb37925f Reviewed-on: http://gerrit.openafs.org/8444 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5ed19099adc368e275ecf0453da0a0e08527cb94 Author: Jeffrey Altman Date: Mon Nov 12 16:37:24 2012 -0500 Windows: 1.7.2000 ChangeLog Change-Id: I518dcb9ca0e63ce0749cad90812ee91cf8ed854b Reviewed-on: http://gerrit.openafs.org/8443 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 47fb61cd7c0b77796e22abd51e60df9a176fe055 Author: Jeffrey Altman Date: Mon Nov 12 18:54:54 2012 -0500 Windows: SYMSTORE the entire WINNT/afsrdr tree The tools directories need to be imported into the symstore one directory at a time. The "build.exe" output files afsredir.sys, afsredirlib.sys and afsrdfsprovider.dll must be imported from within the kernel build environment script. Change-Id: Ida7d84deecfb1ec4f508c5c40fc5576e2cb7b3e4 Reviewed-on: http://gerrit.openafs.org/8445 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fb5eccb2fe30b04497e3e12efab6080ef03d896d) Reviewed-on: http://gerrit.openafs.org/8446 commit 74107e5c296b659018b56e6223b759bbae41025d Author: Jeffrey Altman Date: Mon Nov 12 11:47:50 2012 -0500 Windows: Add AFSRedir binaries to Symbol Store (cherry picked from commit 34178070a3e4867651f61e8c088edc6b6a0f4e63) Change-Id: I9b921ca9f9857531e612429f2295c532acea6a5e Reviewed-on: http://gerrit.openafs.org/8442 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d3f390a0b16827950161b659d3f683304a36eebe Author: Jeffrey Altman Date: Mon Nov 12 07:13:07 2012 -0500 Windows: torture should not reference roken.h Do not include roken.h in torture tests. The torture test should not be linked to afsroken.dll. Reviewed-on: http://gerrit.openafs.org/8431 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e15a612252e881783638e297e33a88f499017614) Change-Id: I2f8531863a31b59c8cabd48447a7a9f832e3595b Reviewed-on: http://gerrit.openafs.org/8440 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e3d9d198eb993eccaebdf8a3a5408d626fe0eefe Author: Jeffrey Altman Date: Sun Nov 11 22:00:07 2012 -0500 afsio: process windows file paths consistently Windows file paths can use either '\' or '/' as a path separator. libafscp on the other hand requires '/' and argv[0] will always use '\'. Introduce a new function ConvertAFSPath() which converts the input path to '/' and converts \\afs to /afs. A future commit should access the registry and make use of the NetbiosName and MountRoot values to perform the conversion correctly. Reviewed-on: http://gerrit.openafs.org/8430 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0bef3159d3698a941154bd21352eb35bd94edb8c) Change-Id: I97d570e6c3d46f3290a975f90a3bdf79b9d7167d Reviewed-on: http://gerrit.openafs.org/8439 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b8556e792eb4b86074ee1839431b35bb1e1fc55c Author: Jeffrey Altman Date: Sun Nov 11 21:53:13 2012 -0500 libafscp: Windows TellMeAboutYourSelf response The address list and uuid are computed in init_afs_cb(). There is no need for special Windows processing within TellMeAboutYourSelf. Reviewed-on: http://gerrit.openafs.org/8429 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit be50ea11feee47695c89906ea9b8a299342ff345) Change-Id: I977ba3ae638b7dc3e3ea8e463ec135659ef99aaf Reviewed-on: http://gerrit.openafs.org/8438 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 428d930e1959b780136f4eb472747eb06ace92cc Author: Jeffrey Altman Date: Sun Nov 11 21:52:27 2012 -0500 libafscp: build as pthreaded for windows Reviewed-on: http://gerrit.openafs.org/8428 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit cdad65170d717dfe7e7f53510e7e331fa746c20d) Change-Id: I5f46ca9333925127f731a065e44bea585a124457 Reviewed-on: http://gerrit.openafs.org/8437 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e118ef8105dff13b77e405ac711fc62b000b1fc8 Author: Jeffrey Altman Date: Sat Nov 10 23:41:21 2012 -0500 Windows: afsrpc.dll MAKEDEBUGCALL Enable debug calls from the pthreaded RX library. Reviewed-on: http://gerrit.openafs.org/8427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 81db8d9764e721386ca78af96daf2a7d26ae94bb) Change-Id: I75608c2f7ac6361fe297d1007d25b1ab3ea681bf Reviewed-on: http://gerrit.openafs.org/8436 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5a111584df34bda3472a18e6531dfe8bd774f461 Author: Jeffrey Altman Date: Mon Nov 12 13:22:50 2012 -0500 Windows: KFW_get_default_realm with no Krb5 afslogon.dll is performing a NULL pointer dereference in afskfw.lib KFW_get_default_realm() when no Kerberos v5 implementation is installed on the system. On XP and XP64, this is resulting in a system BSOD when winlogon.exe dies unexpectedly. Change-Id: If0e6b2b894a76d6586b1eeb42d951e52cb9e2cc3 Reviewed-on: http://gerrit.openafs.org/8435 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ba29e26c6b7e9d429b915f700c543af90fd6360a Author: Jeffrey Altman Date: Fri Nov 9 19:15:25 2012 -0500 Windows: Version 1.7.1900.0 Change-Id: I125e35dcedc6460b120c7377647d8ae09dd52215 Reviewed-on: http://gerrit.openafs.org/8425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9de934b193afbbace3f334702c2e84f41dc5bf9f Author: Jeffrey Altman Date: Fri Nov 9 19:14:39 2012 -0500 Windows: 1.7.1900 ChangeLog Change-Id: Ib4b1f91fd66a3a836cac9d15df6757bb524f6c8a Reviewed-on: http://gerrit.openafs.org/8424 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 113eb4093581c4df9258413e12af9b92af895f33 Author: Jeffrey Altman Date: Sat Feb 11 17:31:00 2012 -0500 Windows: default cell grand.central.org Change the default cell from openafs.org to grand.central.org since there is no openafs.org cell. All openafs software is distributed from the grand.central.org cell. (cherry picked from commit 0d515bb54a957c321cc152644a793c98b1b05c48) Change-Id: Iadae4d6015e8e54afe9a47ebd6882bf2e664f245 Reviewed-on: http://gerrit.openafs.org/6701 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0ce0fbc5f568799b011bbfc83084e457aab00ff9 Author: Jeffrey Altman Date: Thu Nov 8 13:26:36 2012 -0500 Windows: use hKUserMap to read afslogon username hkTemp is not the correct registry handle. Use hkUserMap Reviewed-on: http://gerrit.openafs.org/8412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 15670c1ae95182d98c6e874672ef7138e1949dfe) Change-Id: I4aaadf784bf3bc98f8c4594e161a68c8094a3823 Reviewed-on: http://gerrit.openafs.org/8419 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 69419b824658afafc2210c28f52f5463a38b51d6 Author: Jeffrey Altman Date: Thu Nov 8 12:20:30 2012 -0500 Windows: Prevent SMB unitialized variable access smb_ReceiveNTTranCreate would make use of 'fidp' before it was allocated. Reviewed-on: http://gerrit.openafs.org/8411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6f79eb36593a2b20e712cf7e828e987e12f8e99f) Change-Id: I94de9fed9ae08118b7f818445b7d98a175bc4056 Reviewed-on: http://gerrit.openafs.org/8418 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72f8e5f19efbaa5ee8f02e66628746a4f53f8217 Author: Jeffrey Altman Date: Thu Nov 8 11:29:20 2012 -0500 Windows: Treat invalid AFSFetchStatus as VBUSY Modify cm_Analyze() to accept an AFSFetchStatus parameter which when set is verified for validity. If the status info is invalid, then consider the response equivalent to VBUSY and attempt to query an alternate file server (if any.) Log the invalid status info to the Windows Application Event Log as a Warning. When cm_Analyze() is processing the response of an RPC that returns multiple AFSFetchStatus structures, pass in the one that corresponds with the source object. Reviewed-on: http://gerrit.openafs.org/8404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c01e552b857d0a472c79f60704906936cbb2eb19) Change-Id: Iac26228f91760bd7bb7c8cd4c9d0e9209c3d3d10 Reviewed-on: http://gerrit.openafs.org/8417 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 10c073d8914732383cfbb20a4c2687a846bad8c3 Author: Jeffrey Altman Date: Thu Nov 8 10:39:43 2012 -0500 Windows: cm_IsStatusValid Break out validity checking for AFSFetchStatus responses into a new function. Reviewed-on: http://gerrit.openafs.org/8403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d87a9adeb66f405441be35b12048012a527c122d) Change-Id: I75fc13abd5eb8f63fef7f0ead9c60a5594b9ead1 Reviewed-on: http://gerrit.openafs.org/8416 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 80365b9cce72e3d3785fbcef3e44716f852da8d5 Author: Jeffrey Altman Date: Thu Nov 8 00:24:14 2012 -0500 Windows: cm_MergeStatus now returns an error code cm_MergeStatus() can fail if the AFSFetchStatus InterfaceVersion field does not have the value 0x1 as that is the only version that is defined by the protocol. The return code will be CM_ERROR_INVAL. cm_MergeStatus() returns 0 on success. Update all of the call sites. Reviewed-on: http://gerrit.openafs.org/8402 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 45f0a9ba7f139749a969e73362194b380988116d) Change-Id: I392e01b34333cc3e5ad6767b6b8c18ecc699709e Reviewed-on: http://gerrit.openafs.org/8415 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51021ac306c7b3b355c64c978a029537e3341a25 Author: Jeffrey Altman Date: Thu Nov 8 15:48:18 2012 -0500 NetIdMgr: Krb4 is optional 32-bit builds should not require the krb4 library. Change-Id: Ie8fc92360843b073e3a91c9ae68e4417f579f22b Reviewed-on: http://gerrit.openafs.org/8414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3764cbfbc9f26738b5e6693e8729e79dbb0092c6 Author: Jeffrey Altman Date: Thu Nov 8 15:19:33 2012 -0500 Windows: Make krb4v32.dll and krb524.dll optional Permit afskfw.dll to be built with USE_KRB4 and USE_KRB524 without the requisite DLLs being available on the target machine. Change-Id: I2f83994123de9c3ae94b409dcde5a133fb256476 Reviewed-on: http://gerrit.openafs.org/8413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb15fcf09120cb0935d2b38695aa6cbfcae24df3 Author: Jeffrey Altman Date: Wed Nov 7 16:34:23 2012 -0500 Windows: RDR_CleanupFileEntry protect lock release Prevent lock release of scp->rw when not held. Reviewed-on: http://gerrit.openafs.org/8372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 30ee8b645ea28b8f4f4794b2620fef723d03de9d) Change-Id: I7519462daf8db02798224edda40c20ad7c87d867 Reviewed-on: http://gerrit.openafs.org/8400 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c63244e83fa0590a535646bbc782210f9d636ad6 Author: Jeffrey Altman Date: Tue Nov 6 06:39:39 2012 -0500 Windows: call MIDL_user_allocate instead of calloc In the RPC service routines do not call calloc() directly. All memory will be deallocated by a call to MIDL_user_free() so use MIDL_user_allocate() to perform the allocation. Modify MIDL_user_allocate() to call calloc() instead of malloc() to ensure that the memory is initialized to NUL bytes. Reviewed-on: http://gerrit.openafs.org/8365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8c7846f4e1dd89db4ff3b03c558d97cd13cbb205) Change-Id: I2689dce0ca19748d7656f7bfca5d1d119ca6b06e Reviewed-on: http://gerrit.openafs.org/8399 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e4e3326742f330f808aa6a85021b0e99e14db3ac Author: Jeffrey Altman Date: Tue Nov 6 06:38:14 2012 -0500 Windows: no more _wcsdup; use wcsdup _wcsdup is not mapped by roken.h. Use wcsdup which is. Reviewed-on: http://gerrit.openafs.org/8364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 40964dd39decf8b64d82090b5bb9ecac05901c07) Change-Id: If42035172c26dd7cc496c6907b7d7556a30aa90d Reviewed-on: http://gerrit.openafs.org/8398 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 16c68a7166df9aba5c24d8761da579f5673ce725 Author: Simon Wilkinson Date: Fri Oct 26 15:23:48 2012 +0100 rx: Refactor code to acknowledge a whole TX queue We acknowledge a whole transmit queue whenever an ACKALL packet is received, or whenever the call changes direction. As the same logic is used in both locations, pull it out into a common helper function. Reviewed-on: http://gerrit.openafs.org/8300 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 96d50fc0e1d8b709a86d76318c8a1801cbff12d7) Change-Id: I60e5b0404f5efbe6b2822aec44e5cbbad5543520 Reviewed-on: http://gerrit.openafs.org/8397 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 27acd671c85e1fc84a000c8c26c20284980ad7f5 Author: Simon Wilkinson Date: Fri Oct 26 14:55:02 2012 +0100 rx: Remove duplicate out of order ACK check Once we've moved the congestion window, there's no going back. So any ACK packets that attempt to move the window backwards by including a 'firstPacket' value earlier than the current window position must be ignored. However, we check (and ignore) these packets twice. Once in rxi_ReceivePacket, which only checks in the client side case, and again in rxi_ReceiveAckPacket, which has a more complete check that runs for both client and server connections. Remove the identical check from rxi_ReceivePacket in a continuing effort to clean up this bit of code. Reviewed-on: http://gerrit.openafs.org/8299 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 8d359e6dff5317698597e77f0a1dd5ba2bfb569a) Change-Id: I29c72136d02a16381e33d8836f35528ba7b1f055 Reviewed-on: http://gerrit.openafs.org/8396 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e648143cc546fdd8763d63ac8cbd78e2caa13a62 Author: Simon Wilkinson Date: Fri Oct 26 14:52:46 2012 +0100 rx: Remove duplicate security layer check rxi_FindConnection checks that the connection it returns has a security layer matching that of the incoming packet. Don't duplicate this check within the rxi_ReceivePacket code. Reviewed-on: http://gerrit.openafs.org/8298 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit daeb917110f6b358d505eef50088bbb4573a6130) Change-Id: I8bcd4b176cf0070f35108dd910382a2142a7b643 Reviewed-on: http://gerrit.openafs.org/8395 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 18caf3b254f99253710bc2011c052216af0202b6 Author: Simon Wilkinson Date: Fri Oct 26 14:50:51 2012 +0100 rx: Refactor rxi_ReceivePacket call selection Refactor the call selection logic in rxi_ReceivePacket so that it is a little bit easier to follow, and better optimised to the common case. Split the current logic into a function for packets being received by a server, and a function for packets being received by a client. Reviewed-on: http://gerrit.openafs.org/8297 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3c6570413c94afe4107634e9ca3f923f3cd30c21) Change-Id: I0ac84fe47398b92a24e6c34cd4f0036e7bb27fcb Reviewed-on: http://gerrit.openafs.org/8394 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a0637889b615320b4d10ffdab1e575165a6859d2 Author: Simon Wilkinson Date: Fri Oct 26 12:21:41 2012 +0100 rx: Don't build a call to immediately abort it If the server is over the busy threshold, then don't create a new call structure just to be able to send an abort on that call. Instead, use rx_SendRawAbort to send an abort packet on the appropriate channel. Reviewed-on: http://gerrit.openafs.org/8296 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a0ae8f514519b73ba7f7653bb78b9fc5b6e228f8) Change-Id: Id164497112a24b1ec303754b1324b0e76e3cb653 Reviewed-on: http://gerrit.openafs.org/8393 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f76fc875d79fb55a9735bba3bf0940d756f2039a Author: Simon Wilkinson Date: Thu Oct 25 13:34:33 2012 +0100 rx: Remove unreachable debug statement ReceivePacket has a dpf which is conditional on the packet having a zero callnumber. However, just before we reach this debug statement, we always return if the header doesn't have a call number included. So, the debug statement can never run. Just remove it, as it's potentially confusing. Reviewed-on: http://gerrit.openafs.org/8295 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 0c9e55639cc02d90e9fd108572bb5ee64db3ddcc) Change-Id: Idf15dba8889c8e0fe7e35e2b74a8e4b324e0805e Reviewed-on: http://gerrit.openafs.org/8392 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8ebaa49ca2c1ae72dba2d0ed7d9055111f15fd56 Author: Simon Wilkinson Date: Thu Oct 25 11:32:03 2012 +0100 rx: Don't have 2 different protos for rxi_CheckCall Use a single prototype for rxi_CheckCall in both the pthread and lwp cases. Remove the #ifdef maze at the call sites, and take advantage of the fact that MUTEX_EXIT reduces to an empty string in the lwp case. Reviewed-on: http://gerrit.openafs.org/8291 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9358e452a90c3d87f025a54e503da2b2d062dbef) Change-Id: I5128d720672e50dc78af7e0c9e93d6078e604485 Reviewed-on: http://gerrit.openafs.org/8391 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6af838e28f0cae3e37c4814c85ba3ab2de2efc87 Author: Simon Wilkinson Date: Thu Oct 25 11:27:33 2012 +0100 rx: Don't double check conn->call We currently have call = conn->call[channel] if (call) { ... } else { call = conn->call[channel] if (call) { ... } } As we don't drop (or acquire) any locks between the first and the second check of call, there's no way that the result can be different from the first time we checked. So just get rid of the uneccessary code, and reindent the following block to match. Reviewed-on: http://gerrit.openafs.org/8290 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e93b6dca2f593e479499122eedef1e65452aaaac) Change-Id: I5f3283a76945be92790baf58aafc32c501666b97 Reviewed-on: http://gerrit.openafs.org/8390 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 549194f1db2c69d4ab3f05363274335e1db88f22 Author: Simon Wilkinson Date: Thu Oct 11 12:34:46 2012 +0100 rx: Move server queue entry structure out of rx.h Hide the server queue management structure in its own header file, rather than exposing it globally in rx.h. This structure has always been private - applications have no business knowing about it! Reviewed-on: http://gerrit.openafs.org/8231 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eca07c108cc61fc9a6da720848e1beb78833f670) Change-Id: Iaddcbadfca19f0a9b870ac24d5f707bd04e37e81 Reviewed-on: http://gerrit.openafs.org/8389 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c447b82be0fdf797a01b0f700ec3e9f43b3838b7 Author: Andrew Deason Date: Tue Sep 11 14:23:02 2012 -0500 rx: Skip rxi_CheckPeerDead if we are DALLY DALLY connections don't need to be marked dead, so just skip the whole function if we are DALLY. Reviewed-on: http://gerrit.openafs.org/8120 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a2877368045947ca28c29283ef03f1510d764d4d) Change-Id: Ib0d7103a100918db038703e5e71dead663e5b964 Reviewed-on: http://gerrit.openafs.org/8388 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b64f1e118740026f98fdbbcb8090e8b618848f28 Author: Andrew Deason Date: Tue Sep 11 13:59:21 2012 -0500 LINUX: Ignore 'offender' in error queue processing The 'offender' is who generated the error, possibly who sent us an icmp packet (the given 'port' will be 0). What we want is the peer that is actually unavailable, which is already in the 'addr' variable we received from the recvmsg itself. Reviewed-on: http://gerrit.openafs.org/8119 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4532e96bb96ab6424c7c00327c094f9b5b307f91) Change-Id: I9cb4302ed08f164637c3f62f7d5d19395fcd7884 Reviewed-on: http://gerrit.openafs.org/8387 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 04f583497aec3ccbbc12947321b8af2b5aef2bca Author: Andrew Deason Date: Tue Sep 11 12:48:14 2012 -0500 rx: Check for peer deadness in rxi_Resend If we need to resend something, the peer we're sending to may be dead. Check if the peer is dead in rxi_Resend, so we don't have to wait (possibly several seconds) for the next rxi_CheckCall. Reviewed-on: http://gerrit.openafs.org/8118 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 083ec556af66c755c93f821146e06423e27cfba9) Change-Id: I4085ed4a89ea7fc7509c938fe5f8e85aedbfebf8 Reviewed-on: http://gerrit.openafs.org/8386 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0bd2db504666736b11d67425734ea8f6af3e5e2b Author: Andrew Deason Date: Mon Sep 10 16:31:01 2012 -0500 rx: Process all errors received When we receive a buffer of errors from the error queue, loop through all of them, and do not stop at the first applicable one we find. Reviewed-on: http://gerrit.openafs.org/8116 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot (cherry picked from commit 0ac9fe184a323fef212c421b844a45838f4d6e57) Change-Id: Ie62e4e0ad8fe98c094e937b3808baa17c23473e6 Reviewed-on: http://gerrit.openafs.org/8385 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3c60cac6e2f7ca27a14f2816e4f2ed85520faaf0 Author: Derrick Brashear Date: Tue Oct 16 09:25:03 2012 -0400 linux: always define do_handlesocketerror even if we are not handling socket errors, have a stub function Reviewed-on: http://gerrit.openafs.org/8240 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c172d469dde64b5dfaf762c5ad52dfe842dffb02) Change-Id: Ied4748ba1dec38873adedf95b5b2c50c6c42f03a Reviewed-on: http://gerrit.openafs.org/8384 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4d699186b1d56a9367f30b925449ebc5e6d727d5 Author: Derrick Brashear Date: Wed Oct 17 18:52:41 2012 -0400 rx: pthread sendmsg should return success, not a bytecount thanks to Marc Dionne for noticing the error Reviewed-on: http://gerrit.openafs.org/8246 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 37ef85d44a3275c1f367eaa6d241cd6d602a472b) Change-Id: I79527bc057abc586358ea8a6f9abbe5bb60096b7 Reviewed-on: http://gerrit.openafs.org/8383 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dd0cb5723f23b9ec6a0bc4729b2a948d811a87a7 Author: Andrew Deason Date: Fri Sep 7 17:04:18 2012 -0500 LINUX: Allocate error queue buffer once We call osi_HandleSocketError in a loop, so make sure we process all of the errors. We were allocating a buffer to process the errors in osi_HandleSocketError itself, but we can reuse the same buffer on subsequent invocations, to reduce allocation/free pressure if we need to call osi_HandleSocketError more than once. So, do that. Reviewed-on: http://gerrit.openafs.org/8115 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7c0484413d9928512b934ee92b2634444dd8ae58) Change-Id: Ib2d261ea5572b3faf399b56c30103af8e73c607c Reviewed-on: http://gerrit.openafs.org/8382 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 10c1ebd9f517a5bcd828bebbadb7a2a3c42d19a9 Author: Andrew Deason Date: Fri Sep 7 16:58:05 2012 -0500 rx: Process error queue after noticing errors If errors exist in the socket error queue, we will notice by a sendmsg or recvmsg returning an error. If we never get an error, we don't need to check the error queue. So, only call osi_HandleSocketError after such an error has been returned, so we can avoid unnecessarily checking the error queue when there are no errors. Reviewed-on: http://gerrit.openafs.org/8114 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson (cherry picked from commit cddd859d2a6a05a01c971c23dba0b43eceb6b93b) Change-Id: I3a714e61384096bc29df7c83a395d4c5bfacff17 Reviewed-on: http://gerrit.openafs.org/8381 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fa6ca956be907ca23b5ccb3aa022c5ae77057046 Author: Andrew Deason Date: Wed Aug 1 16:31:09 2012 -0400 LINUX: Fix error queue processing Receiving error queues in the Linux kernel is a little different from userspace. When we encounter a cmsg that is not CMSG_OK, we need to break out of the loop, and not just continue, since we can keep trying to process the same cmsg over and over. In addition, on successful return, the msg_control buffer has been modified to point to the next available buffer space, and msg_controllen contains how many bytes are remaining. So, we need to adjust the msg_control and msg_controllen values to get something more familiar. Reviewed-on: http://gerrit.openafs.org/7927 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 407cfd281eab375512881945999b7e13ba93936e) Change-Id: I4ae9ed0146fa8b2b47d5894236d2148ec02d6472 Reviewed-on: http://gerrit.openafs.org/8380 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit de8371a973a1bc3fa2b9b2e1a823bd8d9735df5c Author: Andrew Deason Date: Wed Aug 1 15:56:27 2012 -0400 LINUX: Avoid SO_ERROR for RXERRQ_ENV SO_ERROR is for receiving errors from some nonblocking operations; it has little relevance to our network operations. For Linux, use a similar structure as userspace error detection, instead of SO_ERROR. Reviewed-on: http://gerrit.openafs.org/7926 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d55df0ac8351b1518d2c3cde6e3938b98b3f21f7) Change-Id: Iaa4a2666dacb78b114db7b419d0783aae09f5f8a Reviewed-on: http://gerrit.openafs.org/8379 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2204939202248660c19b35ae740281563c7a35e1 Author: Andrew Deason Date: Mon Sep 24 13:03:34 2012 -0500 LINUX: Define printf/uprintf as variadic macros Instead of defining the string 'printf' itself, make printf (and uprintf) variadic macros. This avoids renaming printf to printk for things like '__attribute__((format(printf,X,Y)))'. Note that this is Linux-specific; compilers on other platforms may not support variadic macros. This avoids many warnings in the Linux kernel module build if we include Linux headers after AFS headers. Reviewed-on: http://gerrit.openafs.org/8150 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: BuildBot (cherry picked from commit 179096d9b2c461f02236bbf670b46597ff2d4c3c) Change-Id: Ie8254f2ad3cdd3f51fd3e0bfa9e249fc5ad56fbe Reviewed-on: http://gerrit.openafs.org/8378 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 455285d4edf9e62f1008c90bd9f4a0df05885c51 Author: Jeffrey Altman Date: Fri Nov 2 13:50:44 2012 -0400 Windows: 1.7.1800.0 Version Number Change-Id: I106b298f7ebbec5a470b893f5bcc74142ca786b5 Reviewed-on: http://gerrit.openafs.org/8361 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 51daad12bbb0d6eeeb8b69117ffb2a441f7e6fd3 Author: Jeffrey Altman Date: Fri Nov 2 13:48:58 2012 -0400 Windows: 1.7.1800 ChangeLog Change-Id: If9f01bec9ede11b7ea02436096de44a7aea058b7 Reviewed-on: http://gerrit.openafs.org/8360 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 045d6a8230cc2d82030c035f285e77d2c16655b2 Author: Jeffrey Altman Date: Wed Oct 31 20:59:30 2012 -0400 Windows: Use MountRoot for Absolute Symlinks Replace the absolute symlink processing in AFSLocateName(). Implement AFSIsAbsoluteAFSName() to test whether or not the path is in fact an absolute /afs path by comparing the input string to the registry MountRoot value which specifies the case sensitive root path for all absolute symlinks stored in the AFS cell. If a symlink target path begins with a directory separator and is not an absolute afs path name, return an error. Construct the substitution string using the target path without the MountRoot prefix. Add functionality to AFSRedir.sys to read the MountRoot from the registry and pass it on to AFSRedirLib.sys. Reviewed-on: http://gerrit.openafs.org/8353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba718cba9285fc9f663b0fd15524bc5474cca893) Change-Id: I374885151f7186c509927a16fde0fcb493340881 Reviewed-on: http://gerrit.openafs.org/8359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ba51958148c1d6648d5d8d89b1371cd2709a2d31 Author: Jeffrey Altman Date: Wed Oct 31 12:04:50 2012 -0400 Windows: cm_ConnByServer increment under lock Incrementing the cm_conn.refCount must be performed while holding the cm_connLock in order to prevent cm_GCConnections() from seeing an in-use object as having a zero count. Reviewed-on: http://gerrit.openafs.org/8347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6580d64b5d8ef0ccce71b72783b33c9e6f75b9e8) Change-Id: I649d8421733eb600c99ac9bab7930f9e96a878b2 Reviewed-on: http://gerrit.openafs.org/8352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 58e507705c6db508ec75f59b7e8a2d478af53886 Author: Jeffrey Altman Date: Wed Oct 31 09:53:57 2012 -0400 Windows: cm_FindVolumeByName refactoring The cm_volume allocation within cm_FindVolumeByName() was racy. Given how locks were obtained and dropped it was possible for two threads to both determine that a cm_volume_t object needed to be allocated. It might even have been possible for two threads to attempt to allocate the same object. This refactoring ensures that if a volume cannot be found under a read lock that a second search is performed under the write lock in case the object had in fact been allocated during the transition. Once it is determined that an allocation is required, the cm_volumeLock is not dropped until the object has been built and inserted into the name hash table. This ensures that two threads cannot attempt to allocate a cm_volume object for the same volume group. InterlockedIncrement is used to manage the cm_data volume count. Reviewed-on: http://gerrit.openafs.org/8346 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b0283d5f17aafecf258479d6691682af3baaa0fd) Change-Id: Id007305b27bde907b1cebee7fdd57d985c968fd8 Reviewed-on: http://gerrit.openafs.org/8351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0ab8eb1880559b1e620aaa8d379e3d0b28859e3c Author: Jeffrey Altman Date: Wed Oct 31 09:52:23 2012 -0400 Windows: use cm_GetVolume / cm_PutVolume Instead of locally incrementing and decrementing the cm_volume refCount field use cm_GetVolume and cm_PutVolume. Doing so makes it easier to see if there is an imbalance. Reviewed-on: http://gerrit.openafs.org/8345 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d914034d4c5fd48fb89b1380da24984a520bae33) Change-Id: I2820461c66d4f73de7723fb98e4f4c4a5f632812 Reviewed-on: http://gerrit.openafs.org/8350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72bd572e1677cff23ece22d59a78082bbcfc22d8 Author: Jeffrey Altman Date: Wed Oct 31 09:50:34 2012 -0400 Windows: Interlocked ops for cell and scache allocation Replace foo++ with InterlockedIncrement for cm_data cell and scache counters which are used for allocating objects. Reviewed-on: http://gerrit.openafs.org/8344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2b798792fb56c5feda8e68dd433c82f43b1698aa) Change-Id: I3f27046d59882ba3ccfae8729b2fecaac7c2a1d1 Reviewed-on: http://gerrit.openafs.org/8349 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 215d3947efc9937a8fb6c8eae6fc5a9e0f1add32 Author: Jeffrey Altman Date: Tue Oct 30 21:54:20 2012 -0400 Windows: Do not flush dirty bufs to deleted FID If the FID is known to have been deleted, drop all dirty data returned from the redirector on the floor. Reviewed-on: http://gerrit.openafs.org/8343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aa3579b26503f42de50e7c58c56937a7fbf4d45f) Change-Id: I2ea9faf6954556de174848a965ef95830d605606 Reviewed-on: http://gerrit.openafs.org/8348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0565f0cd5c4e755a9751a55541ebd8e2a31c75f7 Author: Jeffrey Altman Date: Mon Oct 29 12:59:14 2012 -0400 Windows: Set Server Prefs recalc immediately When processing the set server preferences pioctl call cm_RankServer() to update the server preference value reported by "getserverprefs" in addition to cm_ChangeRankVolume() or cm_ChangeRankCellVLServer(). Reviewed-on: http://gerrit.openafs.org/8328 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7e8278e1447328bc57396803a1651cbb497198d0) Change-Id: I61ba7281debf0ffaecc6cd600e585e7bbbc0f115 Reviewed-on: http://gerrit.openafs.org/8331 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62035687e4eb8cd44eee2daff01e9f1af1be864f Author: Jeffrey Altman Date: Mon Oct 29 10:33:18 2012 -0400 Windows: mark server reference offline for VOFFLINE cm_Analyze() was not marking the cm_ServerRef_t reference to a volume instance as srv_offline in response to a VOFFLINE error. As a result the same volume instance is tried again and again. Reviewed-on: http://gerrit.openafs.org/8326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e59cf940ce1cb2ed72ccf05ce39f73019547d9b1) Change-Id: I546f607d964b8205de3bdf1510896b4140072242 Reviewed-on: http://gerrit.openafs.org/8330 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dda406780922c387d3e774045980362b90541a5f Author: Jeffrey Altman Date: Mon Oct 29 09:19:13 2012 -0400 Revert "Windows: Media Protected if create on RO volume" This reverts commit f3f282265a3d9e3c968fd06793e6d1a91337f443. Returning STATUS_MEDIA_WRITE_PROTECTED in preference to STATUS_OBJECT_NAME_COLLISION when the file results in silent failures by some applications (ie, Firefox.exe) when the first directory in the path below the share name is the root of a .readonly volume. FIXES 131416 Reviewed-on: http://gerrit.openafs.org/8325 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c7061310b7865c635c382490703ff951c2f9af3f) Change-Id: I5b26ab98216d8039abdb369dc40633b4dca0d6dc Reviewed-on: http://gerrit.openafs.org/8329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3339ab5753d57bc0b79d0b89890548dd20876510 Author: Jeffrey Altman Date: Sat Oct 6 17:34:52 2012 -0400 Windows: Makefile dependencies Permit "afsrdr" and "extra" to be built without the rest of the tree by making them depend on "config". Reviewed-on: http://gerrit.openafs.org/8321 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c584b68213aef29f9df7fc104b584e8559b7d4fe) Change-Id: I7715afabfbfecd27117724bf4a35c5499675379a Reviewed-on: http://gerrit.openafs.org/8324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6d36e02635460b07fa084b4b96bbff75936d33af Author: Jeffrey Altman Date: Mon Aug 6 12:19:26 2012 -0400 Windows: Send all \\AFS\PIPE to afsd_service Anytime there is a pipe service request, forward it to the afsd_service.exe and permit the service to manage the request. The prior implementation resulted in STATUS_FILE_NOT_FOUND errors being delivered when an unexpected service was requested. Reviewed-on: http://gerrit.openafs.org/8320 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e9e5978a4dc3738708f23d15a3e91cee1f34a5f2) Change-Id: If52ee90d9ab2e7a1e60bd46ffb3e98ba967366f3 Reviewed-on: http://gerrit.openafs.org/8323 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 67c8f4efb29f12c522af32028194e3c1957658ac Author: Jeffrey Altman Date: Wed Sep 26 01:51:37 2012 -0400 Windows: Treat EIO from file server as fatal error Return STATUS_DISK_OPERATION_FAILURE to caller when a file server fails an RPC with EIO. Previous behavior was to retry the request indefinitely. Reviewed-on: http://gerrit.openafs.org/8319 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit f7148418961e3083b895c0875b15060213921e4d) Change-Id: I0dcf27c11fd486af04149ee9f41241c86dab23cb Reviewed-on: http://gerrit.openafs.org/8322 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0a07d9eb44fa10864fdce21e710eb85ce1292742 Author: Jeffrey Altman Date: Fri Oct 19 11:26:21 2012 -0400 Windows: ObjectInfo RefCount 0 <-> 1 transitions When the reference count transitions from 0 <-> 1 ensure that the ObjectInfoLock is held exclusive to prevent the current thread from altering the state while another thread is holding the ObjectInfoLock shared in order to conditionally perform an action based upon the the reference count being zero. Reviewed-on: http://gerrit.openafs.org/8257 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5857dd36b2b129fd2cf187650723b896c24f5177) Change-Id: Iaeade8593bbdfaa1aa8f26cb369ec2dbdb338924 Reviewed-on: http://gerrit.openafs.org/8318 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9fef88d44f0378c0e21503118ac239137e6e8bdd Author: Jeffrey Altman Date: Thu Oct 25 18:42:11 2012 -0400 Windows: PrimaryVolumeWorker ObjectInfoLock deadlock Patchset eaad522651a81f20eac4966a55a731e0e59e39dd inadvertently introduced a deadlock with invalidation requests from the service. It is not safe to hold the ObjectInfoLock resource across calls to AFSCleanupFcb(). Instead of holding the lock obtain a reference to the ObjectInformationCB. Reviewed-on: http://gerrit.openafs.org/8308 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd7a16d5b09d963ded1fb4314632e9fb5d513b29) Change-Id: Ie8097257fba34b9703115d71f45899de82595f2f Reviewed-on: http://gerrit.openafs.org/8317 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b55c914f8841408934bf9ebb284220c2fb297496 Author: Jeffrey Altman Date: Thu Oct 25 14:33:29 2012 -0400 Windows: AFSCleanup re-organization Reorganize the activities of the AFSCleanup() for File FCBs so that the Fcb Resource can be dropped prior to issuing the cleanup request to the cache manager. The cache manager can block for a long period of time while flushing data and holding the Fcb resource blocks all subsequent CreateFile requests. Reviewed-on: http://gerrit.openafs.org/8307 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 08d446424873c2d46b00b6d4604766051e5ba837) Change-Id: I9668855b68bcab18d22ced414e0a1dbc391090b9 Reviewed-on: http://gerrit.openafs.org/8316 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6f1a72d1c2af2786463e6586b03a3ad85bd23245 Author: Jeffrey Altman Date: Thu Oct 25 14:31:14 2012 -0400 Windows: AFSCleanup Flush Data decision AFSCleanup() should instruct the cache manager to flush dirty data when the Context Control Block indicates that the handle being closed was opened for writing and was granted appropriate permissions. The decision to flush should not be dependent on the open handle count because the last handle might belong to an authentication group that does not have write permission. Reviewed-on: http://gerrit.openafs.org/8306 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3a996b58dea74be4748446c63b7d3c4c631b1881) Change-Id: I86ec89f3feb3e9e160cc53c2a5dda15eb29772f4 Reviewed-on: http://gerrit.openafs.org/8315 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bcb87d6281802778548f9f5b76ccbee6b5ea2ced Author: Jeffrey Altman Date: Thu Oct 25 14:12:42 2012 -0400 Windows: buf_DirtyBuffersExist return value buf_DirtyBuffersExist() should return 'found' not '0'. Reviewed-on: http://gerrit.openafs.org/8305 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ea2f25372cc09c958780990f6cb8d064c7e7a0e3) Change-Id: I1f5485917a78d588ec31034720ad73e74f9a2f7c Reviewed-on: http://gerrit.openafs.org/8314 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 643914b05b551ad93fdfd1cbbae2d8846460c52e Author: Jeffrey Altman Date: Mon Oct 22 20:40:21 2012 -0400 Windows: AFSMarkDirty() require ExtentsResource held Instead of dynamically testing if the ExtentsResource is held and if not acquire it within AFSMarkDirty(), simply require that it be held. AFSMarkDirty() is only called from one location. Reviewed-on: http://gerrit.openafs.org/8304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c33c678760e254e67037d62e38f6eedc139eaf6f) Change-Id: Id36b5bcf97fbb1db2aea79a49be8bd590328c778 Reviewed-on: http://gerrit.openafs.org/8313 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1963299e8b3a2a94cd9f733a2ecf69b6aea21628 Author: Jeffrey Altman Date: Mon Oct 22 20:34:59 2012 -0400 Windows: AFSFlushExtents QueuedFlushCount leak The FCB QueuedFlushCount was decremented in all code paths but only incremented if the AuthGroup acquisition succeeded. Increment the counter before the AuthGroup checks. Reviewed-on: http://gerrit.openafs.org/8303 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3c57bab34ee74b4951cf637537ff73d86986fd3e) Change-Id: I8035967a4c31a4ac848e9f6ec8a8be6163450d4e Reviewed-on: http://gerrit.openafs.org/8312 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a5f4f528569df90e53d46b440ebd5014241c0aae Author: Jeffrey Altman Date: Mon Oct 22 20:29:47 2012 -0400 Windows: RDRFunction remove DebugBreak DebugBreak hard coded into the source tree makes debugging other unrelated issues difficult if the code path being executed includes them. Remove them. Reviewed-on: http://gerrit.openafs.org/8302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 651cceabc3e5f939554e50437b9ed3181b6f7b1f) Change-Id: Icdf728cb1572e8c027be95e2efc3255aac435ac1 Reviewed-on: http://gerrit.openafs.org/8311 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4f377adb6797cbd86b62d382aa48e5c35c2a4196 Author: Jeffrey Altman Date: Fri Oct 19 09:33:18 2012 -0400 Windows: Promote DELETED from DirEntry to ObjInfo On deletion of the DirEntry in AFSDeleteDirEntry() set the AFS_OBJECT_FLAGS_DELETED flag on the ObjectInformation object if and only if the AFS_DIR_ENTRY_DELETED flag was set in the DirEntry. Setting the AFS_OBJECT_FLAGS_DELETED should not be conditional on the ObjectInformatION ReferenceCount being zero. Remove the test and set of AFS_OBJECT_FLAGS_DELETED from AFSClose() because that operation will already have been performed in the call to AFSDeleteDirEntry() if necessary. Reviewed-on: http://gerrit.openafs.org/8256 Reviewed-by: Derrick Brashear Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f869b6f8c11f859fad6e3649faf7e724e0bd1d6d) Change-Id: I9e93ca54ed8cd9a610b1f84d1a46887f9e90c5ea Reviewed-on: http://gerrit.openafs.org/8310 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 37d7920c31aa0ee2d432002c4235aff9877e9859 Author: Jeffrey Altman Date: Tue Oct 16 09:36:56 2012 -0400 Windows: Remove 'bAllocatedFcb' from AFSCreate.cpp All functions now call AFSInitFcb() and the ObjectInfo->Fcb == NULL test is performed internally. Therefore, it is not possible for the caller to track whether or not an Fcb was allocated. It is irrelevant. The Fcb will be cleaned up when the ObjectInfo is destroyed by the PrimaryVolumeWorker thread. Reviewed-on: http://gerrit.openafs.org/8242 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0b538f21bea758a92f2bd9f8d529e8889c4a9e63) Change-Id: I9d2e9a336d12bed2dc9498100827300c0b253a27 Reviewed-on: http://gerrit.openafs.org/8275 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 40234f2c51620fe302fde1df7a227db328e26555 Author: Jeffrey Altman Date: Sun Oct 7 23:41:32 2012 -0400 Windows: PrimaryvolumeWorker do not pause if busy fcb The AFSPrimaryVolumeWorkerThread should not unnecessarily block on the FCB Resource because such blockage could be the result of of waiiting for extents to be delivered from the service. The AFSPrimaryVolumeWorkerThread is the primary method by which extents are released back to the service. AFSCleanupFcb() is modified to return STATUS_RETRY if the Fcb resource cannot be obtained without blocking. The AFSPrimaryVolumeWorkerThread() does not call AFSCleanupFcb() with 'ForceFlush' parameter set to TRUE and remembers if STATUS_RETRY is returned. If any Fcb was busy, then the worker does not wait for the 5 second timer to fire. Reviewed-on: http://gerrit.openafs.org/8227 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2bfe3653e3eec99a1199392912a4136668406212) Change-Id: I54b18ec2e4598a4128f7437949d39a5a51b5957f Reviewed-on: http://gerrit.openafs.org/8274 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2f6b1a2321a6576c711fd317c9fbf859484afcc8 Author: Jeffrey Altman Date: Fri Oct 19 08:37:25 2012 -0400 Windows: avoid race set/clear ExtentsRequestComplete The FCB ExtentsRequestComplete KEVENT setting, clearing and testing was racy. Clear the event before issuing the request to the service and if the request fails, set it in case two threads issued requests for the same FCB in parallel and one fails and the other succeeds. We must ensure that a clear does not mask the event being set prior to the request thread returning. Reviewed-on: http://gerrit.openafs.org/8255 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dfcb68cdc82260f614b2efed2529dc7c559d1933) Change-Id: I4de873c060a59d6311e99703af6f846cb470eaf6 Reviewed-on: http://gerrit.openafs.org/8273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b9d9fa557cbfb567a816ef716994f981009a6095 Author: Jeffrey Altman Date: Thu Oct 18 09:56:12 2012 -0400 Windows: clear pending delete upon deletion During cleanup processing if the DELETE_PENDING flag is set the service will be told to delete the file when the handle count reaches 1. At that point the file will be deleted and the DELETED flag will be set on the object info object. The DELETE_PENDING flag was not being cleared which could lead to confusion. This patchset clears the flag after deletion. Reviewed-on: http://gerrit.openafs.org/8253 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 555412a03f18aff0d30401082ad2946a68bd7694) Change-Id: Ia05d02b749420647dd401c4e13fed23b25c46f2f Reviewed-on: http://gerrit.openafs.org/8272 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 68b92894ff144f014ee48b439a751dac05f36b1c Author: Jeffrey Altman Date: Sun Oct 7 10:23:19 2012 -0400 Windows: AFSInitFcb Check ObjectInfo->Fcb for NULL Now that AFSInitFcb is called under the ObjectInfoLock, it is once again safe to perform a test for ObjectInfo->Fcb != NULL and return immediately if an Fcb is already assigned. Reviewed-on: http://gerrit.openafs.org/8226 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 05fa1202fb63e32aff3c60d47286c8af232322fe) Change-Id: Ia743b62070404fc336a511c213592256df0028f6 Reviewed-on: http://gerrit.openafs.org/8271 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3e502c3bfdb4ab5e183368a079ed12095a3f2597 Author: Jeffrey Altman Date: Sun Oct 7 10:20:11 2012 -0400 Windows: Fix DV Raced Trace Message Parameters Data Versions are logged as HighPart:LowPart not QuadPart. Reviewed-on: http://gerrit.openafs.org/8225 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9eb4bcfced06554d08c0f95de54f2285f48de890) Change-Id: Ic8c687f8c6b48833f332e928adb2c65bb30bbcd1 Reviewed-on: http://gerrit.openafs.org/8270 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5df4cfff5bfe94698c486812551dc647c0104f5e Author: Jeffrey Altman Date: Fri Oct 5 11:36:45 2012 -0400 Windows: Protect ObjectRefCnts with ObjectInfoLock The ObjectInfoCB.ObjectReferenceCount is tested to determined when it is safe to remove an FCB from the ObjectInfoCB. The value must not be permitted to change while a removal is performed. Protect AFSRemoveFcb() calls with exclusive holds of the ObjectInfoCB.NonPagedInfo->ObjectInfoLock. New functions: AFSObjectInfoIncrement() AFSObjectInfoDecrement() perform all increments and decrements while holding the ObjectInfoLock in a Shared state. Reviewed-on: http://gerrit.openafs.org/8224 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eaad522651a81f20eac4966a55a731e0e59e39dd) Change-Id: I168e0cd748b68781300ef0b487d54b87779ec0c2 Reviewed-on: http://gerrit.openafs.org/8269 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0e200c7d905feaf2a49d01a94e15e4da70365b73 Author: Jeffrey Altman Date: Tue Oct 2 21:11:01 2012 -0400 Windows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb Do not call AFSRemoveFcb() on a directory entry whose Fcb has a non-zero use count. Reviewed-on: http://gerrit.openafs.org/8223 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cecd99abd3837ef820d78fb15e450c8688b0f39b) Change-Id: Ia93aaf621c53a9b917f62d873e00fb7d17177fac Reviewed-on: http://gerrit.openafs.org/8268 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fc273ed18996aa849d4e7c54bf1445fa2b3e60ea Author: Jeffrey Altman Date: Tue Oct 2 21:07:21 2012 -0400 Windows: Always AFSInitFcb and AFSRemoveFcb Instead of comparing ObjectInfo->Fcb to NULL and conditionally calling AFSInitFcb() or AFSRemoveFcb(), always call them and use InterlockedExchangePointer() as the test. Reviewed-on: http://gerrit.openafs.org/8221 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8827be708460eb1cbd58001d3247ed7bb160ebc8) Change-Id: Ia08f7483575d15caefdd28e031a76a26de7cca62 Reviewed-on: http://gerrit.openafs.org/8267 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c293e9a36c5db0ca6fb6bda97299b1726da5b30e Author: Jeffrey Altman Date: Sat Oct 6 17:36:25 2012 -0400 Windows: AFSRequestExtentsAsync and AFSDoExtentsMapRegion When calling AFSDoExtentsMapRegion() the FCB ExtentsResource must be held. AFSRequestExtentsAsync() failed to hold the ExtentsResource across the call. Reviewed-on: http://gerrit.openafs.org/8220 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 23c920066976ac5ede41dd799c84d97ff5174c4c) Change-Id: Iea2c0bd6dbb76d3563ef793e6145b97af50f442c Reviewed-on: http://gerrit.openafs.org/8266 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c21edb43020f7fee685df6c9502d1a0d83b10e2c Author: Jeffrey Altman Date: Tue Oct 16 09:08:37 2012 -0400 Windows: Remove Fcb.Specific.File.LazyWriterThread The LazyWriterThread should not be recorded in the FCB. It is possible for multiple lazy writes to occur on a file in parallel in separate threads. The value is not used for anything in any case. AFSCommonWrite() tests the LazyWriterThread value but only if 'bMapped' is FALSE. Since 'bMapped' is always TRUE, the comparison is never performed. Remove the test and the value. Reviewed-on: http://gerrit.openafs.org/8241 Tested-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f6ab5cc8bd216383b8584aa05a5516862b59ab70) Change-Id: I9acd8eb2c019e6205f84d410eeed60aaf688d790 Reviewed-on: http://gerrit.openafs.org/8265 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3d5332740a378f5b9a56808ed6da57cef9b756f0 Author: Jeffrey Altman Date: Sun Oct 14 15:46:06 2012 -0400 Windows: Add cm_SyncOp to cm_ReadMountPoint() Add a cm_SyncOp(CM_SCACHESYNC_FETCHDATA) call to cm_ReadMountPoint() to prevent multiple FetchData RPCs being issued for the same mount point at the same time. Reviewed-on: http://gerrit.openafs.org/8235 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fe28a0c5966ac50fa3bccf5d98db4a3532f1e4a4) Change-Id: Id60a557cc74e76f7f8dadb76495c9ec7b12a2ace Reviewed-on: http://gerrit.openafs.org/8264 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0ed72896d5e5b37c334351a337e9a4636d55104d Author: Jeffrey Altman Date: Tue Oct 2 21:09:35 2012 -0400 Windows: AFSInitFcb assign pFcb->ObjectInformation In AFSInitFcb() assign pFcb->ObjectInformation before the InterlockedExchangePointer call and not afterwards. Assigning it afterwards leaves a small race where the ObjectInformation value will be invalid. Reviewed-on: http://gerrit.openafs.org/8222 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7b1115d47019a9948c574ebad7b1323a30b16ab6) Change-Id: I9b0e4ab2ca0d59e2b5e5cf64e75859fda84b6ef2 Reviewed-on: http://gerrit.openafs.org/8263 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7490c3b486b1d17d5843b88cf525499fde852919 Author: Jeffrey Altman Date: Tue Oct 16 20:26:43 2012 -0400 Windows: OpenTargetDirectory AFSInitFcb Reparse Test In AFSOpenTargetDirectory the test to determine if AFSInitFcb allocated a FCB or returned an existing one (STATUS_REPARSE) was reversed. If AFSInitFcb was called and AFSOpenTargetDirectory eventually failed, an in use FCB would be freed. Reviewed-on: http://gerrit.openafs.org/8244 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7fd98901620cfb2f44f53b1d717834e39959c538) Change-Id: I74ca5e6ab0cd28dce97faf9c4bd2c57a7c7eae2f Reviewed-on: http://gerrit.openafs.org/8262 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1ebb1af737ed64350a74941316722d2dd99f67b2 Author: Jeffrey Altman Date: Fri Oct 5 11:40:44 2012 -0400 Windows: ObjectInformationCB indentation Fix indentation within ObjectInformationCB structure Reviewed-on: http://gerrit.openafs.org/8219 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae10a40c5c18a7e52fb11d95b28333e312ffffce) Change-Id: I9eb7728f470fd31ff31737cfb5e72ed803a3090a Reviewed-on: http://gerrit.openafs.org/8261 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 32a76e64b4dd30f7594372a03d45b144e09bdf21 Author: Jeffrey Altman Date: Sat Oct 6 01:40:47 2012 -0400 Windows: Do not call buf_ClearRDRFlag unlink/rmdir When processing unlink and remdir operations initiated by the SMB stack do not call buf_ClearRDRFlag. The redirector upon receiving the AFS_INVALIDATE_DELETE call will cancel outstanding extent operations, mark the FCB deleted, and tear down any held extents. Reviewed-on: http://gerrit.openafs.org/8218 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1335eefeffb70b0759015d39e6732ee075537982) Change-Id: I0710b6fa353c0a8e60965e19cc0b1d70a2e02d2e Reviewed-on: http://gerrit.openafs.org/8260 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6405991ce2b07adaa73d02ed4c960c75d4735ab3 Author: Jeffrey Altman Date: Fri Oct 5 20:16:35 2012 -0400 Windows: Correct alloc size SetFileExtents result AFSFileExtentCB objects not AFSSetFileExtentsCB objects. The latter are too large. Just wastes memory. Reviewed-on: http://gerrit.openafs.org/8217 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 816776215de17d5cf4e1f992ae27c7c1f5b5f43d) Change-Id: Ia60753e9899261a896f5a77cfdfa7db2f4fbd7d7 Reviewed-on: http://gerrit.openafs.org/8259 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 795d7d4297b9c86aa503830a40843833a8d18a29 Author: Jeffrey Altman Date: Thu Oct 4 22:07:40 2012 -0400 Windows: AFS_INVALIDATE_DELETE must cancel IO When processing an AFS_INVALIDATE_DELETE the redirector must cancel any outstanding extent requests on the file prior to tearing down the extents. This code path is triggered either when VNOVNODE is received from a file server or when an alternate cache manager interface (SMB) unlinks the file. Reviewed-on: http://gerrit.openafs.org/8206 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c53220c179b06fdeb03879e8dc5e10f69bbe0a5f) Change-Id: Idb708a2033f0335d1d1293dc3c976b5c1e5dda51 Reviewed-on: http://gerrit.openafs.org/8258 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 024c09510208572b23889b6e5f1634b888d171ff Author: Jeffrey Altman Date: Mon Oct 1 12:03:49 2012 -0400 Windows: File Info Query Symlinks For Symlinks, always set the Reparse Point attribute and set the Directory attribute if the target is a directory. Do not return the file attributes of the target. Reviewed-on: http://gerrit.openafs.org/8171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 338014a231235fe25116b09c1e8978db2db1dbb3) Change-Id: I74d0ca1575624f46b9906f1dabc61ddff335db90 Reviewed-on: http://gerrit.openafs.org/8193 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4b9f6fc0a71b470f005725271d072cf3a0a3517a Author: Jeffrey Altman Date: Mon Oct 1 11:04:23 2012 -0400 Windows: Dir Enum behavior for Symlinks / MPs Comparisons of the behavior of cmd.exe, powershell.exe, and tcc.exe with regards to directory enumeration show that when Symlink file information is returned that the "reparse point" data should be reported along with whether or not the target is a directory. For mount points, the reparse point file information should always be returned and the type should always be directory. The target timestamps, file sizes, etc. should never be returned. Reviewed-on: http://gerrit.openafs.org/8170 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dd59f6f6114a436ae86b70cd0837e97eea18dde8) Change-Id: Ib37d60d47a313427a289603f3c6000400d881569 Reviewed-on: http://gerrit.openafs.org/8192 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 01df02d2b73940fd3fd088460fadfcb40f467853 Author: Jeffrey Altman Date: Wed Sep 26 22:03:03 2012 -0400 Windows: Move afsredir process type check The process type check in afsredir.sys was performed during the Process Creation callback which is processed in the context of the parent process which might not be the same type (32-bit or 64-bit) as the process being created. Reviewed-on: http://gerrit.openafs.org/8165 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 22d68eec6de654bdc6a8d5b005b86320a46ac8f0) Change-Id: I4f6e8bda3cd3676d5a4c63a85d84033285b93658 Reviewed-on: http://gerrit.openafs.org/8191 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62b37582e2e572a804950cf1835bfa1faeb8c901 Author: Jeffrey Altman Date: Tue Sep 25 13:01:53 2012 -0400 Windows: Fix memory leak SRXAFSCB_GetCellServ In commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb strdup() was replaced by xdr_alloc() and memcpy(). Unfortunately, the patch was wrong and the pointer to which the result of xdr_alloc() was assigned was overwritten with zero. Reviewed-on: http://gerrit.openafs.org/8162 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 137ea396dbbcf302bce8200e3da7d4693b464ca7) Change-Id: Ie54f6977dd5f3a83f7d60f45d5aee983da2a9305 Reviewed-on: http://gerrit.openafs.org/8190 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57971e6383c1fc5dc423ec5af28023f8cd0ad1f6 Author: Jeffrey Altman Date: Tue Sep 25 12:59:04 2012 -0400 Windows: duplicate ExtentsResource hold All callers to AFSDoExtentsMapRegion() hold the ExtentsResource so there is no need to obtain it again within the function. Instead add an ASSERT to confirm that the resource is held. Reviewed-on: http://gerrit.openafs.org/8161 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae8527269ca091d47a1232a0469921ba7c54f65b) Change-Id: I0e4ea681affb6af639f2043e18ca6f63f3dac3e7 Reviewed-on: http://gerrit.openafs.org/8189 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c6ccc42118ccabf8b65283b20030a9b0a96c0fba Author: Jeffrey Altman Date: Tue Sep 25 14:32:06 2012 -0400 Windows: make static RDR_ParseIoctlPath[Parent] The RDR_ParseIoctlPath and RDR_ParseIoctlPathParent functions are helper functions within RDRIoctl.cpp. Make them static and remove them from the header. Reviewed-on: http://gerrit.openafs.org/8160 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5c348e5a9f276b45e2351e4c1adf2bafd4659484) Change-Id: I63ff75ad572fe866181a521a3709f1049df9967e Reviewed-on: http://gerrit.openafs.org/8188 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2b094118b3f2a671d38cdc3a3179fe5806e3c6e7 Author: Jeffrey Altman Date: Tue Sep 25 14:31:11 2012 -0400 Windows: remove reqp param RDR_IoctlWrite/Read The RDR_IoctlWrite and RDR_IoctlRead functions no longer use the cm_req_t parameter so remove it. Reviewed-on: http://gerrit.openafs.org/8159 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1df112db3c06b6d16a027acbfe8739410630c66e) Change-Id: Ic79c3139d7b9fa72be911afcf17302970e604eff Reviewed-on: http://gerrit.openafs.org/8187 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 47fc2f5bb5e5ebf29aedafefbae7b326999685d4 Author: Jeffrey Altman Date: Tue Sep 25 14:18:39 2012 -0400 Windows: add cm_req_t to RDR_ioctl_t The cm_req_t structure flags store information related to the source of the request and whether the process is WOW64 or not. This information is required for proper pioctl processing. Add a cm_req_t structure to the RDR_ioctl_t structure and initialize it in RDR_SetupIoctl() which is called from RDR_PioctlOpen(). Reviewed-on: http://gerrit.openafs.org/8158 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 63ded5bc452bf6cdd10db4d9e1befb9a71fad539) Change-Id: I0deab7d9c408c9fe429b07ba231b30ae47ae0d7b Reviewed-on: http://gerrit.openafs.org/8186 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0821fe0d441966f6d3617a04d82adc0613339e48 Author: Jeffrey Altman Date: Tue Sep 25 14:16:10 2012 -0400 Windows: Add bWow64 param to RDR_InitReq Instead of using the pattern RDR_InitReq(&req); if (bWow64) req.flags |= CM_REQ_WOW64; add bWow64 as a parameter to RDR_InitReq(). Reviewed-on: http://gerrit.openafs.org/8157 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac97f8f5a6937398db7d1902ff6bab7adbc24f4a) Change-Id: Ibde72ff4ad8cbca3e6f44d51f72458cb820d6976 Reviewed-on: http://gerrit.openafs.org/8185 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa276c7ce84cef1a38088a380a1e40c9a1154a3b Author: Jeffrey Altman Date: Sun Sep 23 14:03:19 2012 -0400 Windows: cm_ExpandSysName for 64-bit processes on 64-bit Windows, only 32-bit processes have the WOW64 request type flag set. Reverse the conditional to permit proper evaluation of the 64-bit sysname list. Reviewed-on: http://gerrit.openafs.org/8147 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c2e4112ffe44bc5c638a79f88eab0377ec992784) Change-Id: I0017785bb792f6ee3aaa169e75e04a27ff0cacc2 Reviewed-on: http://gerrit.openafs.org/8184 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6359527c377de5987caafcc158dfc9201ed2257f Author: Marc Dionne Date: Fri Sep 21 20:08:58 2012 -0400 bozo: fix typo in help text Fix a typo for "interface" in the help text for bosserver. Reviewed-on: http://gerrit.openafs.org/8144 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie (cherry picked from commit 58c089e642198a210462b3bf508056b56667f879) Change-Id: Id0e85ec2e5c605487c879d0e144703c2b5709380 Reviewed-on: http://gerrit.openafs.org/8183 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e51ba115d6debaaa26e03c7de18d2601a6971d91 Author: Andrew Deason Date: Thu Aug 30 17:10:36 2012 -0500 rx: More afspag-specific objects For Linux, each object in the kernel module needs to be in only one module for KBUILD_MODNAME. For AFS_RXERRQ_ENV, we pull in some additional headers that require KBUILD_MODNAME in rx. So, just add a few more afspag-specific rx objects. Reviewed-on: http://gerrit.openafs.org/8113 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Andrew Deason (cherry picked from commit 1046bf7904dd323e1cd1c1788870052c315ec2a3) Change-Id: Ica8b9790a0961f0ccf49e0db82eb2e2e1f1e48e0 Reviewed-on: http://gerrit.openafs.org/8182 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 43dca051d66e4ce90c7d43dcddee230d2571ce26 Author: Andrew Deason Date: Thu Aug 30 16:36:48 2012 -0500 rx: Do not include linux/module.h This isn't available in userspace; we don't need it, so just don't include it at all. This was introduced in 9cd98379. I had thought it fixed a build failure, but I believe now I just made a mistake during build. Reviewed-on: http://gerrit.openafs.org/8112 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Tested-by: Derrick Brashear (cherry picked from commit 0e68488ec1a8420511095b389a7d820b9e115f11) Change-Id: Id2a5ba70eba7edbc20c338450826d8c8f771f84a Reviewed-on: http://gerrit.openafs.org/8181 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3191d23badfe1701a0c507ddbfa7bbee4d89425a Author: Andrew Deason Date: Tue Sep 11 18:46:42 2012 -0500 rx: Save errno in LWP rxi_Sendmsg Much of this code examines errno or WSAGetLastError to determine what to do. However, some other operations between the actual sendmsg call and code that examines errno may modify errno. So, save the value of errno to ensure errno reflects the actual error we got from sendmsg; this also slightly simplifies some of the logic. Reviewed-on: http://gerrit.openafs.org/8110 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 347908cd0031c558c266ec412aa49200ae2b3204) Change-Id: Ic422f8f53c13e63763c7762a4609f13cf99d78bb Reviewed-on: http://gerrit.openafs.org/8180 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 16fa5d6b78f043aecf3d6be60c8aae77c72f071e Author: Andrew Deason Date: Tue Sep 11 12:56:22 2012 -0500 rx: Split out rxi_NetSendError This logic is duplicated in a couple of places. Just extract it into its own little function for easier modification. Reviewed-on: http://gerrit.openafs.org/8109 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 27ee85123284b77004c757fec7cd6c9af3078e05) Change-Id: I2bb0ad0d17908bdcfa8e0792c8964aca82ffae7e Reviewed-on: http://gerrit.openafs.org/8179 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 50c859b4bd6332a4b6e3313b9744bafb121ca00d Author: Andrew Deason Date: Mon Sep 24 14:20:07 2012 -0500 doc: Fix Solaris 11 kernel module path For Solaris 11, the module goes in drv, not fs. Reviewed-on: http://gerrit.openafs.org/8152 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit a7278eb5620507cd70086582cf539b4024b46194) Change-Id: Ia5265a0a55237d356a43d18e0921c88e73f91f79 Reviewed-on: http://gerrit.openafs.org/8178 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e97c4b4f81b7014e7091d193d979d6f29e1eecb Author: Michael Meffie Date: Fri Sep 21 15:58:29 2012 -0400 doc: solaris x86 kernel module path Add instructions for solaris x86 kernel module installation. Reviewed-on: http://gerrit.openafs.org/8143 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 5ef5cf48f3d2ba52cf5ed428728215b5b5f8d0b2) Change-Id: Id75e008695ccbfaa861ae7df8414afd1dc2b6b07 Reviewed-on: http://gerrit.openafs.org/8177 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b04769604ff01089ce7be43d523da197dd7fd177 Author: Chas Williams (CONTRACTOR) Date: Sun Sep 23 19:02:19 2012 -0400 doc: fix kindle builds of documentation Use kindlegen located by the configure stage and test for kindlegen and dbtoepub before building in all cases. Reviewed-on: http://gerrit.openafs.org/8148 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Ken Dreyer (cherry picked from commit fe72b581d7c0a5285f109109ae7ed703f1d62b6f) Change-Id: Ib7483fe0ce2813fbeeff0d001e374d7f0e0777c6 Reviewed-on: http://gerrit.openafs.org/8176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c745f6626e1cdd875a651563d1aee41bcde0058 Author: Andrew Deason Date: Thu Aug 2 15:02:09 2012 -0400 doc: Add quotes to bos create in DAFS QSG section In appendix C in the QSG, we give an example 'bos create'. The given -cmd arguments should have quotes, or they will be interpreted as individual arguments to 'bos create'. Reviewed-on: http://gerrit.openafs.org/7930 Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 112348b4a5721a2c0585669160b7ec7d1689eb30) Change-Id: I14f1366af94232c29016d689aecc68ef19feb52d Reviewed-on: http://gerrit.openafs.org/8175 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ccc8dba20d5720252d5c2764ed3fff855e61f20f Author: Ken Dreyer Date: Thu Sep 6 12:24:25 2012 -0600 doc: fix examples of direct volume access Fix the Unix examples to use ":volume" instead of "#volume", and add a couple more examples. Reviewed-on: http://gerrit.openafs.org/8052 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ed0624c32e671f8ae391a61ff8b870ecde740216) Change-Id: I143a1343f3f68ab8713ca59a7e230b35f00a83b5 Reviewed-on: http://gerrit.openafs.org/8174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ff501befc70225458925da15ed6285a1576780ac Author: Jeffrey Altman Date: Wed Aug 15 13:29:33 2012 -0400 Windows: 1.7.1700.0 version update Change-Id: I4a1778aa65f40ab820b0059a8304468eab651216 Reviewed-on: http://gerrit.openafs.org/7998 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e3253bd3df159e5f8c61a6b3e89bce0b14b26ba8 Author: Jeffrey Altman Date: Wed Aug 15 13:28:43 2012 -0400 Windows: 1.7.17 ChangeLog Change-Id: I1c152e2b57d3f585ca63ab659072cfcf15f19841 Reviewed-on: http://gerrit.openafs.org/7997 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e19dd1f704b40eb66bd98c42f33767dcf260df6e Author: Jeffrey Altman Date: Wed Aug 15 00:53:21 2012 -0400 Windows: disable short names on Win7 and 2008 R2 After listening to a presentation from Microsoft's file system team and speaking with anti-virus vendors, it is not only safe to disable ShortNames on non-boot volumes in Win7 and 2008 R2 but it is a definite win for performance, stability and security of the system. Reviewed-on: http://gerrit.openafs.org/7989 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6e2dd6e65cae4157538c29fb4362da4d15406b0e) Change-Id: Ia8d2977949855624e8c7e65a04f3e952a87868b5 Reviewed-on: http://gerrit.openafs.org/7991 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5d0faa27db6affab9278c539f8cab777a42c6fc7 Author: Jeffrey Altman Date: Mon Aug 13 17:56:02 2012 -0400 Windows: AFSProcessUserFsRequest NULL dereference Protect against an Irp with a NULL FsContext2 field. These represent Irps that are not intended for our device since they do not have an AFSCcb associated with it. Reviewed-on: http://gerrit.openafs.org/7971 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit aaa1844b8f806513661d16c6429d4d1b890471f2) Change-Id: If4478d92011709840e8f4a5ba8b31db0480f5c89 Reviewed-on: http://gerrit.openafs.org/7973 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ad9fd2d434c8624f68df3ede59ac174a7ff0e615 Author: Jeffrey Altman Date: Sun Aug 12 22:51:54 2012 -0400 Windows: reset volume NOEXIST flag In response to fs checkvolumes the NOEXIST flag should be reset. It should also be reset if the volume location update fails because of a commumicaton (or other) error with the VLDB server. The volume's lastUpdateTime is refreshed on error. Reviewed-on: http://gerrit.openafs.org/7969 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 165c9e7465378f26db546c5f78fc4eeca0ba094a) Change-Id: I5f7f72221b60d8cef559fce9c469cf1640b6d168 Reviewed-on: http://gerrit.openafs.org/7972 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 89d99ddc17d518f03ccdbd2c6cf1bd17dd55886b Author: Jeffrey Altman Date: Thu Aug 2 21:13:45 2012 -0700 Windows: sdk install missing headers Reviewed-on: http://gerrit.openafs.org/7933 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69fd66abe7465e605c4b1460298514c3638c7864) Change-Id: Ib8eb3232777c1b0f0ffb9c07df5764213ef0b34d Reviewed-on: http://gerrit.openafs.org/7968 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96d0711af2f31878d46afab834f9e59b2cabc51c Author: Jeffrey Altman Date: Thu Aug 2 21:12:25 2012 -0700 Windows: remove sdk sample token.c The sdk sample is no longer applicable. Reviewed-on: http://gerrit.openafs.org/7932 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5a707645b7d14f37f3d7fd8d06685f3940631a44) Change-Id: Ifa4f6f679a547f5be2dfb7e537157001b3a6d5cb Reviewed-on: http://gerrit.openafs.org/7967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 48ed9bdfc44b1239fd009e5d42bd489954fbeee9 Author: Jeffrey Altman Date: Fri Aug 10 18:04:49 2012 -0400 Windows: document command prompt lnk limitation Command Prompt shortcuts cannot be used when stored in AFS. Reviewed-on: http://gerrit.openafs.org/7955 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b10a0af8b3a88c4170403679b9c179258a225abe) Change-Id: I3e82c64877329600501d106bb8c49b64894fed71 Reviewed-on: http://gerrit.openafs.org/7966 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 68deb6e90be8f969221a2fb5d904900382963c33 Author: Jeffrey Altman Date: Wed Aug 8 16:42:47 2012 -0400 Windows: Freelance Discovery configuration Add new "FreelanceDiscovery" configuration option to permit Freelance dynroot mode to be used without the automatic discovery of cells and generation of mount points. Reviewed-on: http://gerrit.openafs.org/7950 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ecb3568210777fab98c51811aecaa1d2a085bc0b) Change-Id: Ica7c7ebe11c679ac2452edb70507937d3a661188 Reviewed-on: http://gerrit.openafs.org/7965 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7a90c5559f80fc8db9dac4cc3dabf6fb919c65a0 Author: Jeffrey Altman Date: Wed Aug 8 13:54:48 2012 -0400 Windows: disable short names on Windows 8 Add "ShortNames" option to control whether 8.3 compatible short names are generated for objects stored in AFS. Set the default to on for all operating systems prior to Windows 8 and Server 2012. Reviewed-on: http://gerrit.openafs.org/7949 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b48d45006cdfe1734935f54277c0bc27459a404e) Change-Id: I07baa91b4b6818d58a6b44da60740683e65f4dd9 Reviewed-on: http://gerrit.openafs.org/7964 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1f8ea11565e8c6eb61fd4545b6367684c9314b2f Author: Peter Scott Date: Tue Aug 7 09:07:41 2012 -0400 Windows: FileNormalizedNameInformation take one Add a response to FileNormalizedNameInformation requests. Respond with the long file name. As yet there is no translation from short name to long name for full paths. Reviewed-on: http://gerrit.openafs.org/7948 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1d2a050e99e1feb9a5cee9956b48eb56bd9ad95d) Change-Id: Ia7ddc4f75dfabee4727567a44f1666a307c1d9d9 Reviewed-on: http://gerrit.openafs.org/7963 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a21e01d0cdec473b0006668ab1cda94e5f09ced2 Author: Peter Scott Date: Mon Aug 6 15:15:57 2012 -0400 Windows: FSCTL_SET_PURGE_FAILURE_MODE Windows 8 adds FSCTL_SET_PURGE_FAILURE_MODE. Failure to respond with success prevents anti-virus filters from scanning the file system. For now just return success. Reviewed-on: http://gerrit.openafs.org/7947 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0af079f2d03d1b76bd4221cb56b27091b5635fd0) Change-Id: Iec6275be71305d82d0d6710754b3336abcb4e2b6 Reviewed-on: http://gerrit.openafs.org/7962 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c2137ae92aecf0a873b9d26ed23db20b22199af Author: Peter Scott Date: Mon Aug 6 15:12:12 2012 -0400 Windows: disable short names in redirector option If requested during redirector initialization, disable short name processing. Future versions of Windows (8, Server 2012, and beyond) will no longer require short names. Reviewed-on: http://gerrit.openafs.org/7946 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 831763ce6633d5377f5476651a8685f0673751de) Change-Id: I2b9963336a5dc82028e70cf9ea8fb98bc945f0cc Reviewed-on: http://gerrit.openafs.org/7961 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5cae938851c383cedf8b340ba8869db22cdd47e4 Author: Peter Scott Date: Mon Aug 6 12:59:35 2012 -0400 Windows: Consolidate Device Flags Move Device Flags to common/AFSRedirCommonDefines.h Reviewed-on: http://gerrit.openafs.org/7945 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d8e9d2f2bc0f95642836bca2d66bb09379884142) Change-Id: I2d748c50261230506f80120ec50dc08b5a54d664 Reviewed-on: http://gerrit.openafs.org/7960 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fe6553e8187703670fc1a41c426f2467e2aa6117 Author: Andrew Deason Date: Thu Aug 2 11:58:12 2012 -0400 rx: Process ICMP unreachable errors When a machine receives ICMP errors, we can detect them in AFS_RXERRQ_ENV environments. Many of these errors indicate that a machine is not reachable, so we are guaranteed to not get a response from them. When we get such an error for a particular peer, mark all relevant calls with an RX_CALL_DEAD error, since we know we won't get a response from them. This allows some calls to dead/unreachable hosts to fail much more quickly. Do not immediately kill new calls, since obviously the host may have come back up since then (or the routing/firewall/etc was fixed), but only calls that were started before the current error was received. Note that a call doesn't actually notice until the next rxi_CheckCall, since directly killing each of the relevant calls would be rather slow. So, we don't notice a dead peer immediately, though we notice much more quickly than we used to. Reorganize the error queue processing a little bit to make this easier to do. Reviewed-on: http://gerrit.openafs.org/7929 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9cd983799e622c9acf5dd6e0b9ae3a3a75eaa8ce) Change-Id: Ica0a79e9b23b235f9a098bdf5043508f4c6a5411 Reviewed-on: http://gerrit.openafs.org/7959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f77c7a778b7c6071b762978e9daa284a7ecc6c27 Author: Andrew Deason Date: Wed Aug 1 15:19:02 2012 -0400 rx: Create AFS_ADAPT_PMTU and AFS_RXERRQ_ENV Currently we have the ADAPT_PMTU define, which turns on functionality in Linux to detect PMTU-related ICMP errors for Rx. However, this is really turning on two separate pieces of functionality: the PMTU processing, and the processing for ICMP errors in general. So split this out into two defines: AFS_ADAPT_PMTU, and AFS_RXERRQ_ENV. The former is for processing PMTU discovery, and the latter is for processing ICMP errors. Both of these are left disabled due to issues in the error processing. Although PMTU discovery is the only functionality which makes use of ICMP errors, this will change in the future. Reviewed-on: http://gerrit.openafs.org/7925 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 403f72ec7620c8c5d39d860edd7d8e775e2776e6) Change-Id: I86a6809b9b5590208a4bed139efc6753e538ca5a Reviewed-on: http://gerrit.openafs.org/7958 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f0c99bbf2839a471e841ef695e93af60a8ecc940 Author: Andrew Deason Date: Wed Aug 1 15:11:48 2012 -0400 rx: Formatting fixes Some minor fixes to preprocessor indentation and other minor formatting things in rx.c and rx_user.c. Reviewed-on: http://gerrit.openafs.org/7923 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3cf4c1fbad712984074a916897b77841c3e24752) Change-Id: I248b0add753c55e8aa0b2adf06a5b29c3e132103 Reviewed-on: http://gerrit.openafs.org/7957 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 67dee100e51abf63424a0aaf030f3a73bf6e8a52 Author: Andrew Deason Date: Wed Aug 1 14:57:06 2012 -0400 rx: Remove ADAPT_MTU and MISCMTU Ever since 5bcf626ddaf92e199c4b46c11ad276013a47db52, ADAPT_MTU has been unconditionally defined. MISCMTU has always been unconditionally defined, and not used anywhere. Remove both of these, assuming they are always defined. Note that ADAPT_MTU != ADAPT_PMTU. Reviewed-on: http://gerrit.openafs.org/7922 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a3759e0af8717f478a32420b8c8d125fae15cd25) Change-Id: I08ec5d3845bfb021b479105ec218c503d04dd1a0 Reviewed-on: http://gerrit.openafs.org/7956 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c4f957b214e9ae77b399a5b55016819176cc3614 Author: Jeffrey Altman Date: Mon Jul 30 19:02:55 2012 -0400 Windows: 1.7.1600 (aka 1.7.16) Change-Id: Ia02778bc1f79c480ea0b0a66f6f1b87f16689193 Reviewed-on: http://gerrit.openafs.org/7910 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 25a2b06b96178b8866a616ce43fb3850a8cecbc3 Author: Jeffrey Altman Date: Mon Jul 30 19:01:13 2012 -0400 Windows: 1.7.1600 ChangeLog Change-Id: Iff5c4044a2f383fa24850d81088f064f01050b8f Reviewed-on: http://gerrit.openafs.org/7909 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 27d8898e9cb931c7489129f724cf67ef58121076 Author: Simon Wilkinson Date: Sun Jul 29 15:14:11 2012 -0400 Windows: Rename cm_btree struct data Rename the "struct data" in cm_btree.h to something less generic in order to avoid conflicts with other code. Reviewed-on: http://gerrit.openafs.org/7898 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8c01141ccaa538b182ee79ec2d8ed5ec12b58f11) Change-Id: Iff8345e643c0d8d0608c9da7ef31c3cd6b5ccdf8 Reviewed-on: http://gerrit.openafs.org/7908 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8e2240f2f077554054bd4f4e22190773f800ce07 Author: Jeffrey Altman Date: Mon Jul 30 15:19:57 2012 -0400 doc: Windows Release Notes Integrated Logon Expand on support for integrated logon details. Explain the new capabilities for per-user configuration and name mapping. Reviewed-on: http://gerrit.openafs.org/7905 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 070e90a92175eb91b3709598859fabb0c843d0a9) Change-Id: I948b6b644687f4d8054d7f3f42ea2184919d7ff3 Reviewed-on: http://gerrit.openafs.org/7907 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 11ebd24c35363262eb9558f5a8867d47ae5e14b8 Author: Jeffrey Altman Date: Mon Jul 30 00:43:01 2012 -0400 doc: Remove USA vs International from AdminGuide OpenAFS does not have separate distributions for the United States and the rest of the world. Nor are there any restrictions on the capabilities of the Update Server. Reviewed-on: http://gerrit.openafs.org/7902 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit da9f42d044725ae128feffcfbeaab67b31aaab44) Change-Id: I98249c3ebb84ae4f4a73a502b0511d46dad8c849 Reviewed-on: http://gerrit.openafs.org/7906 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6c51a6c3e3ab322d5d920a469bf8cc71c08378e2 Author: Jeffrey Altman Date: Mon Jul 16 17:29:54 2012 -0400 rx: protect against ACKs with serial as prevPacket patchset 4e71409fe1305cde4b9b341247ba658d8d24f4d0 introduced a check in rxi_ReceiveAckPacket for out of order ack packets which relied upon the value of the previousPacket field. Unfortunately, some versions of RX store the previous packet's serial number in the field instead of previous packet's sequence number. Modify the check to only discard out of order ACKs if the previousPacket sequence number is within the valid window. Reviewed-on: http://gerrit.openafs.org/7785 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e02fd4d358f20bcf001f0486afe1750d4013dea3) Change-Id: I66cb544ff1e1b204fbd0be30b6d9813276d85e50 Reviewed-on: http://gerrit.openafs.org/7889 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 27a6e9c5bb4bdf59f5166ed262aba5fe95a6ae03 Author: Jeffrey Altman Date: Thu Jul 26 18:35:48 2012 -0400 rx: better rxi_FindRpcStat check for end of queue patchset 1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec tested for an empty queue but what is really required is a test for end of queue after the queue_Scan(). If the queue_Scan() completes at the end of the queue, in other words, pointing at the list head, then return NULL because no match was found. Reviewed-on: http://gerrit.openafs.org/7886 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 300dd717fa57df77175807cf7cf6be36cb1f9fef) Change-Id: Icc492c329314a359bff7396c278173a855490ae9 Reviewed-on: http://gerrit.openafs.org/7888 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c7ceff340724b2cbf7e7a8666bd82fd50fd9af65 Author: Jeffrey Altman Date: Wed Jul 25 01:55:27 2012 -0400 rx: protect against invalid params in rx_Copy*RPCStats Protect against: . rxi_Alloc() failure Reviewed-on: http://gerrit.openafs.org/7873 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ee2b9c2d3ee22dfbc8fd2eb2cc470ae853d4e19a) Change-Id: Iaf8e9f5d07508e97c71db7b6bb9695d82ab50684 Reviewed-on: http://gerrit.openafs.org/7887 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8d4ee792479ff8885ad5c8877c695e091f8a7eac Author: Jeffrey Altman Date: Tue Jul 24 13:56:02 2012 -0400 Windows: NPAddConnection3 debugging Define Add3FlagsToString() and use it when generating debug output from NPAddConnection3(). Reviewed-on: http://gerrit.openafs.org/7860 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5f60992bfe17b74526bf7d26c5e0df2a2d1c4833) Change-Id: I83d4a31d5ed2d676cdfdcb9dd375a5ff893a264f Reviewed-on: http://gerrit.openafs.org/7867 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 758bdd8f829b57b53f934e260605fd1d23d9d733 Author: Jeffrey Altman Date: Tue Jul 24 13:53:49 2012 -0400 Windows: Correct exceptions in AFSRDFSProvider Correct two errors in the generation of debug strings that were triggering invalid memory access exceptions. Reviewed-on: http://gerrit.openafs.org/7859 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 16b671cf3bddfc1c8cd9f760f99320ac21e583ac) Change-Id: I6734cd1181912e9948e1fbdd3a9608457656c4a4 Reviewed-on: http://gerrit.openafs.org/7866 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 880984efc1026008da5dc7688f45bfc982a0d889 Author: Jeffrey Altman Date: Sun Jul 1 22:31:04 2012 -0400 Windows: No VLDB server blocking probes Now that we have background probes, use them for VLDB server probes. Reviewed-on: http://gerrit.openafs.org/7854 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ff703fcbb93399f12fb3210b729f82fb43f0ed1) Change-Id: I2722efef6a2ab304f2301b689f68bc40db8856d6 Reviewed-on: http://gerrit.openafs.org/7857 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 287e2d9ec19b45c4e6e08588a074495d53bc051e Author: Jeffrey Altman Date: Sun Jul 1 22:27:13 2012 -0400 Windows: NOPROBE means probe in background thread It is important that down servers be detected as soon as possible. When it is not possible to perform a blocking probe, perform a probe in a backgrond thread. Reviewed-on: http://gerrit.openafs.org/7853 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ceeb0474578914a64cc938e52533e6c7911396b2) Change-Id: Ibb8eca39c445ff10bd580785618b059796c43bad Reviewed-on: http://gerrit.openafs.org/7856 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c778cd59f10bbc7896589f4ec89e77acea42949 Author: Jeffrey Altman Date: Sun Jul 22 01:19:57 2012 -0400 Windows: get rid of _strdup and use rk_strdup Do not use the _strdup() C RTL function. Use strdup() so that rk_strdup() roken replacement can be used. Reviewed-on: http://gerrit.openafs.org/7848 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 736e0dbeec54e19801e96ba93d471bd5a995f4f3) Change-Id: I6249d21cd28c7d22292d5f2d2d740119b712d728 Reviewed-on: http://gerrit.openafs.org/7851 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ae12ff90f8b988b04b9c2a472fa68448d89ec194 Author: Jeffrey Altman Date: Fri Jul 20 10:19:07 2012 -0400 roken: rk_strdup rk_wcsdup exports Reviewed-on: http://gerrit.openafs.org/7847 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 907dbac89cfde3d3663c14fa17ca5ac9ced5a846) Change-Id: Ia7b559032277a56cc3497165fa4d3493eb952009 Reviewed-on: http://gerrit.openafs.org/7850 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 71eb47be1e971748edfc9c865669188c9f3ef594 Author: Heimdal Developers Date: Mon Jul 23 17:27:56 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to b8a53329fc8bf2fe8c4f4058512f828d7654e3f8 (switch-from-svn-to-git-3003-gb8a5332) Upstream changes are: Jeffrey Altman (2): Windows: rk_strdup allocator Windows: rk_wcsdup allocator Nicolas Williams (1): Fix bug in _krb5_expand_path_tokensv() Reviewed-on: http://gerrit.openafs.org/7842 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cabfe32c335002d2cfc77481c33d091cc7fd0dda) Change-Id: I4cd8514ae0b0d5db73fe830cd57fd43f1e29d4a8 Reviewed-on: http://gerrit.openafs.org/7849 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6a663f0d02b1b3a8046a5703d0a74d60ab862bd Author: Simon Wilkinson Date: Wed Jul 18 10:22:07 2012 +0100 ptserver: Make ptclient build again Make the ptclient utility build again, and add it to the ptserver Makefile so that it is built by default and, hopefully, won't bitrot again. Reviewed-on: http://gerrit.openafs.org/7841 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5dce817d40bc69684451e88fe8a0f1078f1f3880) Change-Id: If9faa3d004b5b89289c140a2e242a97df949ed06 Reviewed-on: http://gerrit.openafs.org/7846 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2804437c8ac4ae341b8802c14238415d1eac2fb7 Author: Simon Wilkinson Date: Mon Jul 16 20:09:04 2012 +0100 auth: Fix GetTokenEx with NULL cellName If GetTokenEx is called with a NULL cellName, it means use the local cell. To do this with the legacy interface, a 0 length string must be used for the cell instance of the ktc_principal passed to GetToken. Fix this so that we do so, rather than attempting to strcpy(..., NULL) which never ends well. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/7840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0eca3c1822683ccf1b559eb8e455688c5bdc1fc9) Change-Id: Iada3afa508588f17bfad299774cc4fa01ba2e570 Reviewed-on: http://gerrit.openafs.org/7845 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 11d4bb0172e064c0fc2175a0cb473991faadd8c3 Author: Jeffrey Altman Date: Sun Jul 22 20:40:41 2012 -0400 rx: rxi_FindRpcStat must test for empty queue When queue_Scan is executed on an empty queue the queue element variable, in this case 'rpc_stat' is the queue head, _RXQ(q), and not NULL. Callers of rxi_FindRpcStat() expect NULL on failure to find or create an rx_interface_stat object. Correct the behavior by testing for an empty queue and return NULL immediately if the queue is empty and the caller is not requesting creation. Reviewed-on: http://gerrit.openafs.org/7835 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec) Change-Id: I71ad98b943e08804aa15672cdf428a501871923b Reviewed-on: http://gerrit.openafs.org/7844 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1363b0be1432422a4957babc53679b756e11b614 Author: Jeffrey Altman Date: Mon Jul 23 01:38:03 2012 -0400 Windows: cm_UpdateVolumeLocation volp locked When calling cm_UpdateVolumeLocation the volp->mx must be held. cm_Analyze() did not obtain the mutex as required. Reviewed-on: http://gerrit.openafs.org/7839 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 748a3e29b624d10e90af43cb0dc65a4f96c0310e) Change-Id: I389508d60d9cfb21eb21118c1da646d5ba644c92 Reviewed-on: http://gerrit.openafs.org/7843 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 31edc36ef950d860704adf816eb7030291469eb1 Author: Jeffrey Altman Date: Mon Jul 2 10:26:05 2012 -0400 Windows: Recompute server rank periodically After VL_ProbeServer and RXAFS_Getcapabilities RPCs call cm_RankServer() to recompute the server ranks based upon the updated peer statistics. Reviewed-on: http://gerrit.openafs.org/7827 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 30e26c07d42d8e8208c51719bc823e387d5919ee) Change-Id: I2b9e0eb02a53771d1b04b2cb1dbf3b25c9be7a1f Reviewed-on: http://gerrit.openafs.org/7834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 356f086eeed592537ac74423ecc081fc7d425452 Author: Jeffrey Altman Date: Fri Jul 20 02:57:35 2012 -0400 Windows: Clear peer RPC stats on IP addr change When an IP address change has been detected, clear the peer RPC statistics used for server ranking. Reviewed-on: http://gerrit.openafs.org/7826 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a3e2bd0d0183fab913264b04c6772f000367cb73) Change-Id: Ib6db0a7325ca489b7b89e528c2c6169b6104739e Reviewed-on: http://gerrit.openafs.org/7833 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f3b4c62118bb8a68fe15523fc99f0ece87d28e94 Author: Jeffrey Altman Date: Fri Jul 20 02:55:20 2012 -0400 Windows: server rankings by RPC statistics Use VL_ProbeServer for VLDB servers and either opcode_RXAFS_GetCapabilities or opcode_RXAFS_GetTime for File servers. Reviewed-on: http://gerrit.openafs.org/7825 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c0d652dcdead56c53c622ade5df0f50e8aefd0f2) Change-Id: If7402f8367332db85f64fc0b6e415df6a19f0958 Reviewed-on: http://gerrit.openafs.org/7832 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 75fa0708398a43d68d5cec4d14a1c7ac3cf20496 Author: Derrick Brashear Date: Sat Jul 21 00:17:14 2012 -0400 rxgen: per-opcode stats allow access to per-opcode stats Reviewed-on: http://gerrit.openafs.org/7802 Tested-by: BuildBot Reviewed-by: Jacob Thebault-Spieker Reviewed-by: Derrick Brashear (cherry picked from commit c1081a3ab5dc7e5c83ad84dd0b5c795969745d7d) Change-Id: I82525a1e3d1953eda5fbc51e7e83b1d855251e03 Reviewed-on: http://gerrit.openafs.org/7831 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 94bca9314db4ce25a5639126b89d534affc53b6b Author: Derrick Brashear Date: Sat Jul 21 00:07:41 2012 -0400 rxgen: emit opcode defines in header define an opcode-name-specific define with the numeric value of the opcode Reviewed-on: http://gerrit.openafs.org/7801 Reviewed-by: Jacob Thebault-Spieker Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c3767f1e90b7ba61efcb25e022d27f35d1accc2b) Change-Id: I031521eca93f077dece90e949a4fdfe0555dee70 Reviewed-on: http://gerrit.openafs.org/7830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72386186bfb742e3e03865025027dff65c6a3c07 Author: Garrett Wollman Date: Sat Jul 21 00:04:58 2012 -0400 xdr: fix two old FIXMEs related to signed/unsigned arithmetic It's implementation-defined whether the C '>>' operator, when applied to a signed integer, is sign-extending or zero-filling. If you want unsigned arithmetic, you have to ask for it explicitly. One assumes the reason for the shift is to avoid overflow if the returned size/count is later converted to a signed int, in which case maybe it would be better to use INT_MAX here. This is the minimal change necessary for correctness. Reviewed-on: http://gerrit.openafs.org/7800 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 417df0d495a8636aec6959b074a35885e20022c9) Change-Id: I6be50edca3098fb21148c4eaa3cd6a3654eafe6a Reviewed-on: http://gerrit.openafs.org/7824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5ea02f3bf645011cffd899db6957d9ef7780543f Author: Jeffrey Altman Date: Sat Jul 21 12:17:46 2012 -0400 Windows: AFSTearDownFcbExtents loop conditional If there are extents in the list with a non-zero ActiveCount, those extents will be skipped and the list 'le' will never become empty. Add an additional condition to ensure that the loop is only executed once for each extent in the list. Reviewed-on: http://gerrit.openafs.org/7810 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 860812931f3adf07c85ac2a56deb149b9c0d33bb) Change-Id: Ia3f52f6f4d9a01dfb75fb4c529f794c6ee773740 Reviewed-on: http://gerrit.openafs.org/7823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit feb7aecbfb262418e9a5b82578aaad5862d34d93 Author: Jeffrey Altman Date: Sat Jul 21 12:02:20 2012 -0400 Windows: memory leak AFSInitPIOCtlDirectoryCB In an error occurs during AFSInitPIOCtlDirectoryCB processing the nonpaged pool allocation would be leaked. Reviewed-on: http://gerrit.openafs.org/7809 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6b0bc2f6ff6ffecb4dd158ba5d2021d46bad7da0) Change-Id: I75f592e347aea821993eb334d0dba1675a86b92f Reviewed-on: http://gerrit.openafs.org/7822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dfeb6c0c3bce8195ea30f5c13b68655124ef4ec8 Author: Jeffrey Altman Date: Sat Jul 21 12:00:21 2012 -0400 Windows: memory leak AFSRemoveVolume Do not leak the VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->NonPaged allocation and the associated lock object. Reviewed-on: http://gerrit.openafs.org/7808 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit af1bdc2b7758615ac22505128415a4f10a1f8f10) Change-Id: I9c265e2474d3cda8a450abf3d5fc53fc619f16e5 Reviewed-on: http://gerrit.openafs.org/7821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 963468e2c04bafb9eff48a1088086eea8fc698c0 Author: Jeffrey Altman Date: Sat Jul 21 11:52:22 2012 -0400 Windows: AFSExFreePool -> AFSExFreePoolWithTag Replace AFSExFreePool() with AFSExFreePoolWithTag() which is a wrapper around both ExFreePool() and ExFreePoolWithTag(). If a 'Tag' value, is provided, ExFreePoolWithTag() is used. Otherwise, ExFreePool(). Specify allocation tag values wherever possible. Path name buffer tags are not specified because they are allocated using multiple tags. The same is true for network provider string buffers. This is being done in order to debug a memory corruption issue. Warning: this is a change to the AFSRedir->AFSRedirLib interface and therefore both drivers must be updated with a reboot and not simply restarting the service. Reviewed-on: http://gerrit.openafs.org/7807 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fe61f35d35003121c94b717a1dd79119c9073adc) Change-Id: Icf830401c672c8953eedbfaa76e4bc36de8f5edb Reviewed-on: http://gerrit.openafs.org/7820 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit eae9b21df9607570660e2e59d8afe2a80b8f3482 Author: Jeffrey Altman Date: Sat Jul 21 11:57:40 2012 -0400 Windows: Freeing SeQueryInformationToken allocations Memory allocated by SeQueryInformationToken() must be freed with ExFreePool() and not AFSExFreePool(). Reviewed-on: http://gerrit.openafs.org/7806 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8a11435eed2d3d1d1aef0ebb92822b34299b2e4d) Change-Id: Ib623b967f43e422b7f6f280abd9904fc8f8b9167 Reviewed-on: http://gerrit.openafs.org/7819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa5840c4d501cb823135f46586dbce4b2ab4dc8d Author: Jeffrey Altman Date: Fri Jul 20 10:20:02 2012 -0400 rx: fix abort on missing service patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the possibility that a NULL connection pointer could be dereferenced. Prevent it. Reviewed-on: http://gerrit.openafs.org/7794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3ec1bdf9c74bd250d49065fa84475a5123461744) Change-Id: If65086177fd0d65d4ba4a57153b453abe939cf3c Reviewed-on: http://gerrit.openafs.org/7818 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ee8adc30052bf3d14bf20bd9ef5840e8bb977cf0 Author: Jeffrey Altman Date: Mon Jul 16 16:53:32 2012 -0400 rx: rxi_ReceiveDataPacket do not set rprev on drop In KERNEL builds if there are no available packet buffers the new packet is dropped on the floor. In that case, the call's rprev field should not be updated because the packet was never "received" for delivery to the application. Remove a dead comment from the same block of code. Reviewed-on: http://gerrit.openafs.org/7784 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit bbf92017b084a8ba8df81effe06d11421cdf4bb0) Change-Id: Id31069be917ca016ade77c204e8d6fb710891f51 Reviewed-on: http://gerrit.openafs.org/7817 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9296e66a32e209676c8407ed3816e4eb712e622d Author: Jeffrey Altman Date: Fri Jul 20 01:00:38 2012 -0400 Windows: avoid memory overrun during extent release While tearing down extents, if an extent is found to be in use it will be skipped. Must use 'ulReleaseCount' as the index into the released extent array. Reviewed-on: http://gerrit.openafs.org/7796 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 91f17adf01e54302b0c8d86df5627214f0bdf5d0) Change-Id: Ia57382aa1f4cdfe9737eda4eacab7de332dd42a8 Reviewed-on: http://gerrit.openafs.org/7816 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 478205d4ff97fb77f4b546e3d13257b248cf0b9a Author: Jeffrey Altman Date: Fri Jul 20 00:59:33 2012 -0400 Windows: more roken.h include corrections Reviewed-on: http://gerrit.openafs.org/7795 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ec46ced616f7af72fa3ce1d60304ae475977a28) Change-Id: I2cc589914785b56446a3116808eb2b61a4fa88f7 Reviewed-on: http://gerrit.openafs.org/7815 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 70d64aa2d657d7b5140d82d1cfcf29c12bd81636 Author: Jeffrey Altman Date: Fri Jul 20 02:54:18 2012 -0400 windows: add afsroken to afssvrcpa NTMakefile Reviewed-on: http://gerrit.openafs.org/7797 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 14c98f9df9fd7686f6fc453edaf70168e19e6da9) Change-Id: I286bc7cae9d3d575dd1d231f4b9aa484b1f8cdd4 Reviewed-on: http://gerrit.openafs.org/7814 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a39180f16b7bde8fc9cfe49effd6f98175e555f5 Author: Garrett Wollman Date: Sun Jul 15 15:41:25 2012 -0400 rx: dead initialization in rxi_RestoreDataBufs Don't initialize iov only to overwrite it immediately below. Reviewed-on: http://gerrit.openafs.org/7770 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0b69ca34eb55f9d0a53e5f6b2e6155c7824b2fde) Change-Id: I2545e0e71b002856ef6d88fe2727eb73cf7fffba Reviewed-on: http://gerrit.openafs.org/7813 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 39a546d0efa76be7656e7c0eea044b7c618f14c3 Author: Garrett Wollman Date: Sun Jul 15 22:00:04 2012 -0400 rx: eliminate dead variable sdl in rx_getAllAddr_internal() Near as I can tell, sdl is only assigned once, and is never read. Reviewed-on: http://gerrit.openafs.org/7775 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6422be38fc8084a58b70412e3cfe087a4e1e57b8) Change-Id: Ic0223e37bd85736e80f3ac79d1726e94c53f1a55 Reviewed-on: http://gerrit.openafs.org/7812 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 343b1ca3f4292fb1f681954887a1d46a4a6e4b9a Author: Garrett Wollman Date: Sun Jul 15 15:01:29 2012 -0400 rx: don't leak a connection hash table in unlikely error condition If getsockname() returns an error (which shouldn't be possible), rx_InitHost would leak a connection hash table (which probably doesn't matter because the caller will just exit anyway). Make the analyzer happy by freeing the memory anyway. Reviewed-on: http://gerrit.openafs.org/7768 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 53c432d1feba6454af4526b4d797b45a6f205eac) Change-Id: Id95faca47ee0eeb4fac9fcc188b5d94d2b61de78 Reviewed-on: http://gerrit.openafs.org/7811 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c4aed9b5992ed37b3c8039088f95ccd5a19c036f Author: Simon Wilkinson Date: Wed May 30 18:25:51 2012 +0100 rxgen: Make input strings const Modify the code generation routines so that string inputs to RPCs are declared as (const char *) on the client side. This doesn't affect callers as we can freely cast from (char *) to (const char *), but means it is easier to write API wrappers that accept const arguments. Reviewed-on: http://gerrit.openafs.org/7556 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ed02c6ff8a4bc2cc82876a4b1736a8985548a71c) Change-Id: Ia56cca791b7bfad453d4cd6300f718dd167454d3 Reviewed-on: http://gerrit.openafs.org/7791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c26ffea568351e8f718f9642346b848a165189ee Author: Simon Wilkinson Date: Thu Sep 8 11:26:39 2011 +0100 Remove redundant header includes Remove includes of system headers where roken.h already takes care of including them. This simplifies the source tree, reduces the amount of work done by the compiler, and ensures that all of our headers are included with the correct guards The list of files to edit was generated with the following script: list=`grep include external/heimdal/roken/roken.h.in \ | sed -e's/#include//g' | sort | uniq`; \ for A in `find . -name *.c | xargs grep -l roken.h \ | grep -v external/ | grep -v WINNT/`; do \ found=0; \ for B in $list; do \ if grep "$B" $A > /dev/null; then \ echo "$A : $B"; \ found=1; \ fi; \ done; \ if [ $found == 1 ] ; then mvim -f $A; fi; \ done Reviewed-on: http://gerrit.openafs.org/5815 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 83b76f564b0972c6163656637b2d64d06895e41a) Change-Id: I84ab2910badc87da6cc242f454d8253fce6af128 Reviewed-on: http://gerrit.openafs.org/7790 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e4a4498ab5e81eec8247942e67a97f1447ede74a Author: Jeffrey Altman Date: Fri Jul 6 16:04:28 2012 -0400 Windows: add cm_ServerListSize() cm_ServerListSize returns the length of a cm_serverRef_t list. Reviewed-on: http://gerrit.openafs.org/7759 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6b8c43559073caa7f0b9db25bab4812606740e7d) Change-Id: I755d5a93e44e858f4fcf5dddbf3320077d1ee848 Reviewed-on: http://gerrit.openafs.org/7762 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d884d144914c586bbae6fe6757a2a0bbefa81250 Author: Jeffrey Altman Date: Fri Jul 6 16:02:38 2012 -0400 Windows: add cm_IsVolumeReplicated() Given a file id indicates whether the volume it is located on is replicated or not. Reviewed-on: http://gerrit.openafs.org/7758 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2dbe1316a17716e57013cf41e7b19ec898b94cbf) Change-Id: I6aa7bc2c60162025745e30aa0f5a31d2a359b8e9 Reviewed-on: http://gerrit.openafs.org/7761 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b683b39d60a44818717547d01cbfff3ef590f572 Author: Jeffrey Altman Date: Mon Jul 9 09:34:22 2012 -0400 Windows: Redesign of server preferences Server rankings should be composed from three values: 1. administrative preferences 2. network address locality 3. peer performance (rtt and congestion window) This ensures that local subnet servers are always preferred. Add a new rank for down servers so they are always sorted las in cm_serverRef lists. Reviewed-on: http://gerrit.openafs.org/7757 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a9be0735b5e23adefc5fd57083ca206e61820bab) Change-Id: I6954a851115ba4b5bb3987ed46afd487156b03a7 Reviewed-on: http://gerrit.openafs.org/7760 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5064ac9d4b579ec5e9b2d6bca30379392fac9837 Author: Jeffrey Altman Date: Tue Jul 10 00:13:04 2012 -0400 Windows: cm_SyncOp waiting logic Use interlocked increment and decrement to track the waiters and use the wait queue itself to determine if there are waiters instead of the CM_SCACHEFLAG_WAITING flag. Reviewed-on: http://gerrit.openafs.org/7752 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f70952a347dff39bd445f8361224e1c622a5b1cf) Change-Id: I115c480b07d1e82bfe05f8c57acd38eeb05aa94d Reviewed-on: http://gerrit.openafs.org/7755 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2a70ca6d9665686026726ef97a7378a3cfda8550 Author: Jeffrey Altman Date: Tue Jul 10 00:09:14 2012 -0400 Windows: remove unused CM_SCACHEFLAGs CM_SCACHEFLAG_CALLBACK and CM_SCACHEFLAG_STATD were cleared at various points and tested at various points but never set. Remove them. Reviewed-on: http://gerrit.openafs.org/7751 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 80732b94ef8a8fd239d8f77d8e10f0d770f0ec24) Change-Id: I09eda21c5bda81dffc4c389c490c8182d7f19efb Reviewed-on: http://gerrit.openafs.org/7754 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 53e25c5da1e1d1bb9572b057bf93e50b1089bf8c Author: Jeffrey Altman Date: Sat Jul 7 14:11:23 2012 -0400 Windows: not all short rx_Read[v] reads are fatal When performing a RXAFS_FetchData[64] RPC, a short read from rx_Read[v] is not a reason to stop processing the call unless it is the first read and the file server FetchData offset bug has been detected. If not, only stop processing if the rx_Read[v] return value is <= 0. Reviewed-on: http://gerrit.openafs.org/7749 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6fb3b7aa317a6429daf86b140785875a70686bac) Change-Id: Id05c4abe07bf2e8a1980f15fc60874be444406a5 Reviewed-on: http://gerrit.openafs.org/7753 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e452a497e9aeb60070763d7c59b679e98e599a58 Author: Jeffrey Altman Date: Mon Jul 9 00:49:13 2012 -0400 Windows: record mount point string data version The Windows cache manager stores the mount point or symlink target string in the cm_scache_t object. If the string is the empty string then the target needs to be resolved. Otherwise it is considered up to date. With this approach, care must be taken to ensure that the string is erased whenever the data version changes. This patchset records the data version of the mount point target string in the cm_scache_t object. Being up to date is determined by comparing the current data version of the object to the mount point string version. A match and the string is up to date. Reviewed-on: http://gerrit.openafs.org/7745 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 606d9554e2880c2978675b7eae3fa5f53bd07c3d) Change-Id: I60b241a4e8fb798cff58ac7eb812774e0fdc892d Reviewed-on: http://gerrit.openafs.org/7748 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5452d3c074b71d146c8172fd4f04b7afe1e79927 Author: Jeffrey Altman Date: Sun Jul 8 02:00:17 2012 -0400 Windows: initialize afsStatus and callback structs In cm_GetBuffer, cm_GetData, cm_VerifyStoreData Reviewed-on: http://gerrit.openafs.org/7744 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit df46bb407a9073374337f4b8e4291e18c74e548c) Change-Id: I9c0ec99a067347b20836d2daa3f1902fb7deefcc Reviewed-on: http://gerrit.openafs.org/7747 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4ffe3e2a05f9c2db4a530ac9f19bd0d49a985c7e Author: Jeffrey Altman Date: Fri Jul 6 15:07:13 2012 -0400 Windows: cm_MergeStatus unknown interface numbers Ignore status information if the interface number is unknown. Currently only version 1 is recognized. Reviewed-on: http://gerrit.openafs.org/7743 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8115841e2fc9d827a7207ddc18e5c84e466ed7e7) Change-Id: Ib2cf79618a44e8da09bc61dc670c10266a3bc39f Reviewed-on: http://gerrit.openafs.org/7746 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e5a353fd7e25dcec7cd95e4e61814cc45c2e1ec0 Author: Jeffrey Altman Date: Thu Jul 5 16:55:03 2012 -0400 Windows: interlocked ops for osi lock flags Use interlocked operations to set and clear the flags in the osi mutex and readwrite lock objects. Reviewed-on: http://gerrit.openafs.org/7720 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9bc068edc890991b5d384108ce972c12d3c18975) Change-Id: I82d22e45e4f0245e70b7339e4eb0e74e5252bbb5 Reviewed-on: http://gerrit.openafs.org/7740 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c0f38392d8c58a2ba38fe2cc0f304badd356c5dd Author: Jeffrey Altman Date: Thu Jul 5 16:52:51 2012 -0400 Windows: use spin counts for osi base locks On multiprocessor systems, spin counts are faster than entering a processor wait state when there is critical section contention. Microsoft recommends a count of 4000. This feature is only available on XP and above which is fine since OpenAFS master and 1.7 no longer support Windows 2000. Reviewed-on: http://gerrit.openafs.org/7719 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d5f067aa735968d4da6685f0883ca978d5e6795c) Change-Id: I9ace400460db98caa7939227ad6b78c2d65bfd7c Reviewed-on: http://gerrit.openafs.org/7739 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d089fbd8b2467bc85146d7c18f13a112ae419bba Author: Jeffrey Altman Date: Thu Jul 5 21:13:21 2012 -0400 Windows: X86 DEBUG Interlocked Or and And X86 DEBUG builds do not have a native InterlockedOr or InterlockedAnd. Therefore, we must provide our own. Reviewed-on: http://gerrit.openafs.org/7726 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f4baf7cf99ef52f3ce9d6a7ee577cd9140a8bdc5) Change-Id: I0fdd34867294f8c3f321636c460c538a862fa001 Reviewed-on: http://gerrit.openafs.org/7738 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ffbc08082074e79bb30027c9e1d637311976b7fb Author: Jeffrey Altman Date: Thu Jul 5 18:25:09 2012 -0400 Windows: remove unused 'deltas' from cm_CheckServersMulti() Reviewed-on: http://gerrit.openafs.org/7725 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 52f3878da4b8f5356e7799f2659d41cade0dbdee) Change-Id: I984e13007ade5028989c834d560e3aa9ae657bcb Reviewed-on: http://gerrit.openafs.org/7734 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6b0b63b14c6397b7c812a0f5b8934e8eb4dc07d9 Author: Jeffrey Altman Date: Thu Jul 5 18:22:24 2012 -0400 Windows: Apply cm_GetVolServerList() to cm_ConnFromVolume() Use cm_GetVolServerList() in cm_ConnFromVolume() to ensure an error is returned instead of dereferencing a NULL pointer if the serverRef list for the requested volume cannot be obtained. Reviewed-on: http://gerrit.openafs.org/7724 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3b3b620a03b56dba7f0696f8175b9fb2c8fbd6ae) Change-Id: Ic533b9c63a7956f6d5e268967d84efb71e5d4395 Reviewed-on: http://gerrit.openafs.org/7733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 92301b34b3e102aa2d1971ef747c32b6e53903f7 Author: Jeffrey Altman Date: Thu Jul 5 18:21:51 2012 -0400 Windows: Apply cm_GetVolServerList() to cm_Analyze() Using cm_GetVolServerList() it is possible to simplify the logic in cm_Analyze(). It is no longer necessary for cm_Analyze() to call cm_GetServerList() which must obtain its own reference the the cm_volume_t object via a fileId lookup. This reduces lock contention and makes the code a bit more readable. Reviewed-on: http://gerrit.openafs.org/7723 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e3400414f676b9a0033f041f81671534ffdab99) Change-Id: I2814fd77939be638d7159504604e3432bb9f115f Reviewed-on: http://gerrit.openafs.org/7732 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a0add5e0141bc0377d95ced27d3e8b6a1cd3fcbe Author: Jeffrey Altman Date: Thu Jul 5 18:16:09 2012 -0400 Windows: Add cm_GetVolServerList cm_GetVolServerList() is a wrapper for cm_GetVolServers() that returns CM_ERROR_NOSUCHVOLUME if the server list cannot be obtained for the requested volume. Reviewed-on: http://gerrit.openafs.org/7722 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2575d87824fbf5d0e1a5fcb3a1b49949d6fbe2ee) Change-Id: I07fcf9d2cf444da4d58ba1f18803b3b9a3e9b177 Reviewed-on: http://gerrit.openafs.org/7731 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c3f677d8d3b6982238822fe9bfe7c91ca97252f3 Author: Jeffrey Altman Date: Thu Jul 5 18:06:13 2012 -0400 Windows: Modify cm_GetVolServers and cm_GetServerList Move the determination of the 'replicated' state into cm_GetVolServers() so that cm_GetServerList() and cm_ConnFromVolume() can be implemented without duplicating the resolution of the cm_vol_state_t object. Reviewed-on: http://gerrit.openafs.org/7721 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ef5686b1a11e1a6ba4590b09170306190d6c7393) Change-Id: I8871bdf34bc5b42927df9043ea3949a6cb5783bc Reviewed-on: http://gerrit.openafs.org/7730 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 02bd4dfcbc85d5057d714000bd6da259d2545654 Author: Jeffrey Altman Date: Thu Jul 5 14:54:04 2012 -0400 Windows: cm_ConnByServer hold userp->mx only while necessary The cm_userp_t does not need to be locked while the cm_conn_t force new connection processing is taking place. Reviewed-on: http://gerrit.openafs.org/7718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5b9e9265a0df707e9fb79842ab5aa94b59b8e88e) Change-Id: I2de503c0c37e9808d120a0639e2a7d00a1a99dec Reviewed-on: http://gerrit.openafs.org/7729 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6cf8cef580dcad0e8d3951ab76f753f9dc53e2e Author: Jeffrey Altman Date: Thu Jul 5 14:33:50 2012 -0400 Windows: cm_ConnByServer add conn to list after init Do not add a newly created cm_conn_t to the cm_server_t connsp list until after the object is fully initialized. Reviewed-on: http://gerrit.openafs.org/7717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3ce54e6b7be8c2996a0fda2d7ad9780fca2f0ef) Change-Id: I5561be88c466f4b50a5d4ab72d534f1a01fb9c17 Reviewed-on: http://gerrit.openafs.org/7728 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3eead71d40da2e325dfc033f8f696edacadf3834 Author: Jeffrey Altman Date: Thu Jul 5 11:03:35 2012 -0400 Windows: cm_HaveCallback optimize .readonly If the cm_scache_t has a registered callback, there is no reason to obtain a volume reference for a .readonly. Just use the callback. Reviewed-on: http://gerrit.openafs.org/7716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f73aebbe8772e62bf8930d70e9edab2f82ff8984) Change-Id: I60cc53888b6bf328f95c9b15ea910f34ce05ddc9 Reviewed-on: http://gerrit.openafs.org/7727 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5c1c8888a23506f8ae890be21d31d53037271508 Author: Andrew Deason Date: Thu Jun 28 18:56:47 2012 -0500 doc: Add fs bypassthreshold man page FIXES 130050 Reviewed-on: http://gerrit.openafs.org/7602 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 828ef9c39a14af265796755718c10b63513f952c) Change-Id: I002b8832ffc4fc425d30a9d9375f1b143197bfa7 Reviewed-on: http://gerrit.openafs.org/7736 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f49dc589ece4ea468c5c6343d19bda1ed4a07d55 Author: Jeffrey Altman Date: Tue Jul 3 15:38:33 2012 -0400 Windows: RDR RXAFS_GetVolumeStatus vs 1.1 'l' only The Windows redirector relies upon the ability to obtain volume status information to decide whether a file system volume object can be created and whether or not an extending write can be permitted. As of this writing, the file server always performs a PRFS_READ access check on the volume's root directory (1.1) vnode as a condition for releasing the volume state information which includes: Message of the day (if any) Offline message (if any) Online flag InService flag Blessed flag NeedsSalvage flag Type MinQuota MaxQuota BlocksInUse PartBlocksAvail PartMaxBlocks All of this information is publicly available to anonymous users via "vos examine" so it is odd that it is hidden from anonymous cache managers. When RXAFS_GetVolumeStatus fails, the AFS redirector was failing to create a file system object for the AFS volume. That in turn prevented the volume from being accessed even if the user had 'l' in the root directory and full access everywhere else. This patchset will make up fake data for the AFS volume if the RPC fails. However, doing so does have consequences. The client will be unable to make an accurate determination regarding free space on the file server. As a result, an extending write may be permitted which writes data into the system page cache which in turn cannot be written to the file server. Such data will be lost and unrecoverable. Reviewed-on: http://gerrit.openafs.org/7704 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 561b9ce80938d316223f2b313f8224fe06af9d5a) Change-Id: Ia8bce4e37d6b642b751c2c087ec95401a0e3681d Reviewed-on: http://gerrit.openafs.org/7715 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 416928d72d0fda65472ed8e8b13cc925d325967c Author: Jeffrey Altman Date: Tue Jul 3 12:51:27 2012 -0400 Windows: HaveCallback vs readonlyVolumeVersioning If the cm_scache_t volumeCreationDate is 0, the field is not valid for comparison. Add a check during the have callback test. Reviewed-on: http://gerrit.openafs.org/7680 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 261ec65f20df46ed043d16a869d042cf61c6eda7) Change-Id: I4347568f1e2d5b4a489206be527d5695382703c1 Reviewed-on: http://gerrit.openafs.org/7714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8edf1fae65e094b7ed7412ea06a0dbd97d87e6e1 Author: Jeffrey Altman Date: Tue Jul 3 12:49:53 2012 -0400 Windows: HaveCallback vs OfflineRO Is Valid commit f716962ab41847af4450d0a361f5de9195b32ed0 inadvertently broke the offline .readonly is valid functionality when readonly volume versioning is disabled. Restore it. Reviewed-on: http://gerrit.openafs.org/7679 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3485a35b7a548d850d55dde4634ba78e5330aa9) Change-Id: I3fb66a3d7afe2d32d00e419e5e85885f9eb86af7 Reviewed-on: http://gerrit.openafs.org/7713 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c9369cc66995cb33c167356a1a525191ba0bc8c9 Author: Jeffrey Altman Date: Tue Jul 3 12:42:52 2012 -0400 Windows: cm_DiscardSCache volumeCreationDate commit f716962ab41847af4450d0a361f5de9195b32ed0 clears the cm_scache_t volumeCreationDate field. It shouldn't because the volumeCreationDate is not a property of the callback. It is a property of the status information which does not change simply because the callback expires. Reviewed-on: http://gerrit.openafs.org/7678 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 64a37fa9f916cd1e8f0ec9bb252fda13aa8b4cd4) Change-Id: I18be397abb0cd223ac508c6addd11d00c64c54ba Reviewed-on: http://gerrit.openafs.org/7712 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1112b37cde4adf4099a22012fff94e87f661af89 Author: Jeffrey Altman Date: Fri Jun 29 00:35:49 2012 -0400 Windows: add missing items to 'clean' rules Reviewed-on: http://gerrit.openafs.org/7653 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 673127f6928c9c2fb5a3b0400fa36d4afcf1e5df) Change-Id: Ic8b5b529a4363d007e51d2db2d2228f422a8b3a9 Reviewed-on: http://gerrit.openafs.org/7711 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1a91b15f58a392349aee541799ec2dfde9bfd737 Author: Jeffrey Altman Date: Mon Jun 25 23:06:30 2012 -0400 Windows: afslogon expand short domain names Depending on how the user specifies the domain name during login, NPLogonNotify may be given a short or a full domain or kerberos realm name. If the name is the short name, attempt to expand it automatically if there is no 'realm' configured for the short domain name. This patchset relies upon data in the local registry instead of using an API such as NameTranslate in order to avoid network queries to the domain controller that might not be reachable. Reviewed-on: http://gerrit.openafs.org/7650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17584782a4d76facf5a89a3eeeebfcc23582b3e8) Change-Id: I50c66298e4543932c02d5dce2f1d524d0bcf157f Reviewed-on: http://gerrit.openafs.org/7710 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit df5273d767615acd49a902ab61b9c53604c4f47f Author: Jeffrey Altman Date: Mon Jun 25 01:38:41 2012 -0400 Windows: afscreds import lsa before renew expiring Reviewed-on: http://gerrit.openafs.org/7649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 712c0c1d0e506a9010d7a5cc93dfd49bee006d41) Change-Id: I1b4a6add63d52e870c25633695365395934cdbcc Reviewed-on: http://gerrit.openafs.org/7709 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1bd14e690357f50a5048a20b640c285dcadd8e81 Author: Jeffrey Altman Date: Mon Jun 25 01:33:02 2012 -0400 Windows: Remove HELP from afscreds The old .hlp format is no longer supported and the text of the help files is long out of date. Remove the HELP buttons from the dialogs and all references to WM_HELP message processing from the application. Reviewed-on: http://gerrit.openafs.org/7648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0834e40bd7444ba1f1770c60b387cf513b279a4b) Change-Id: Ia014ef3c07567d485d06b57523ff48d4766b07a7 Reviewed-on: http://gerrit.openafs.org/7708 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 76eed245b38f6cd37592a93ab80b5bcd3cd99573 Author: Jeffrey Altman Date: Mon Jun 18 22:03:21 2012 -0400 Windows: afslogon major refactoring NPLogonNotify() This is a major refactoring of NPLogonNotify() that is meant to reduce redundancy and add functionality. Key highlights include: * New Domain\user hierarchy that permits configuration settings to be applied on a per user basis instead of a domain basis. As part of the extension the username itself can be mapped. * Attempt to import the MSLSA credentials prior to performing KFW_AFS_get_cred(). * Do not perform redundant KFW_AFS_get_cred() calls. * Add a flag to indicate if the authentication name is the LSA principal name. * Add more debugging messages. Reviewed-on: http://gerrit.openafs.org/7635 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 91795c659087371f941231e51fe284de010e60b1) Change-Id: I52546ff59a81b94ad14cb502ab8cce469bb1d284 Reviewed-on: http://gerrit.openafs.org/7707 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c951367645735cbac0c97361bdcef1c068fbc412 Author: Jeffrey Altman Date: Mon Jun 18 21:58:26 2012 -0400 Windows: afslogon cast away warnings cast away size_t to int warnings in 64-bit builds. Reviewed-on: http://gerrit.openafs.org/7634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 76ae0f01b32d3e87273ff6d2c9c20eec59e22e16) Change-Id: I2d84f48b4c9039f28842c2cb50ff5cf51dd3735e Reviewed-on: http://gerrit.openafs.org/7706 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 48261878f54e8aa24f3e72ebf161be53178c7b8e Author: Jeffrey Altman Date: Sun Jul 1 22:19:08 2012 -0400 Windows: cm_UpdateVolumeLocation misplaced lock The volume->mx was obtained in the wrong place which resulted in the potential of a panic caused by obtaining the mutex when it was already held. Reviewed-on: http://gerrit.openafs.org/7654 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4707174938b92df189697a2b7e463438c37c1ed0) Change-Id: Ia1d9eca674650f26cded72460253df37508e6bc2 Reviewed-on: http://gerrit.openafs.org/7703 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cd241d1b7e2e6c411aa7d2edad9b9326fa8f0e2d Author: Jeffrey Altman Date: Fri Jun 22 00:25:26 2012 -0400 Windows: check perms before RXAFS_GetVolumeStatus Instead of calling RXAFS_GetVolumeStatus naked, perform a read permission check using RXAFS_FetchStatus first. This permits EACCES caching to prevent unnecessary requests. Regardless of which FileId is queried, always use the root vnode FileId for the permission check. The file server performs its permission check using the root vnode. Reviewed-on: http://gerrit.openafs.org/7641 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 05ac74528b30d36c195ff8f4df343fa72082a213) Change-Id: Ia9408c2c80bcce0e857afdfe9f7e524f38ccaa07 Reviewed-on: http://gerrit.openafs.org/7694 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1eff75e057cd219c4bcd0f8897c88d9dca201dc4 Author: Jeffrey Altman Date: Thu Jun 28 22:29:19 2012 -0400 Windows: WiX backup additional registry keys Move backup storage to HKLM\Software\OpenAFS\BackupSettings Backup HKLM\SYSTEM\...\Services\AFSRedirector Add ..\TransarcAFSDaemon\NetworkProvider "Debug" value Reviewed-on: http://gerrit.openafs.org/7652 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4929b0cb0b57a803a84673fe0faf619d088ed910) Change-Id: Ia19e90923149a67aeee43c2d2da30d8ee9c0ff77 Reviewed-on: http://gerrit.openafs.org/7702 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6f2a7f061578c4b90de134a6b050c751bf576cab Author: Jeffrey Altman Date: Wed Jun 27 01:00:20 2012 -0400 Windows: ensure TreeLock obtain and release same pointer The indirection ObjectInformation->ParentObjectInformation does not appear to be stable. When acquiring and releasing a parent TreeLock, use a local variable to store the ParentObjectInformation pointer and use that to access the TreeLock. This will ensure that the resource obtained is the one that is released. Reviewed-on: http://gerrit.openafs.org/7651 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 03dfcce05aabf2ceecdb84528fc837176c52af77) Change-Id: I07adac68fbeb4b4da927a805880cc3cf0c845708 Reviewed-on: http://gerrit.openafs.org/7701 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cdb92d6ab2e56c688cceaed36a25d0064cc8877c Author: Jeffrey Altman Date: Sun Jun 24 10:16:42 2012 -0400 Windows: Media Protected if create on RO volume If there is an attempt to create a file/directory on a readonly volume as indicated by the Volume Characteristics, return STATUS_MEDIA_WRITE_PROTECTED immediately. Do not bother contacting the afsd_service. Reviewed-on: http://gerrit.openafs.org/7647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f3f282265a3d9e3c968fd06793e6d1a91337f443) Change-Id: I5706108cd59ae5d46614182f32c3d38744c1ebe1 Reviewed-on: http://gerrit.openafs.org/7700 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aac8059a2cf1860233dd8064f2e00ce7b8219c82 Author: Jeffrey Altman Date: Sun Jun 24 10:12:51 2012 -0400 Windows: Remove incorrect assert AFSVolumeInfo When querying the volume information, the input FileId does not have to be a volume root. Remove this extraneous assertion. Reviewed-on: http://gerrit.openafs.org/7646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 53413685ce56c5adba7b095265a62a5088977de2) Change-Id: I6b0b74d17c865e6b8b71c8fce435e0a1e2f06e0d Reviewed-on: http://gerrit.openafs.org/7699 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e5a5204cfd0034ab3cbdaed480dc04aa68e6b0da Author: Jeffrey Altman Date: Sat Jun 23 15:04:29 2012 -0400 Windows: NPGetConnectionPerformance Restore the implementation of NPGetConnectionPerformance in AFSRDFSProvider.dll. This time just return 0 for all fields except for the preferred read/write size which is set to 64K. When this function is not implemented at all, a query for performance of a \\AFS path will be processed by the SMB redirector. This can result in a 20 second timeout while waiting for the SMB Browser query for "AFS <20>" to complete. Reviewed-on: http://gerrit.openafs.org/7645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dddd393198bc066e0fea478baf719c97cd51ec53) Change-Id: I500db48d8769bd04d3d545dfe9b4afc1eec67d9a Reviewed-on: http://gerrit.openafs.org/7698 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 32603879ea1235ea94669b01714534ad244bdc8e Author: Jeffrey Altman Date: Sat Jun 23 11:11:47 2012 -0400 Windows: ShellExt Add Prop Page only if AFS If the file is not in AFS, do not add any of the AFS specific property sheets. Reviewed-on: http://gerrit.openafs.org/7644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5a6cf1494613b83332e4fad01980bb636c510a88) Change-Id: I8a07b457d5ac13f5a8e79f370b9ebd11e4fe15e9 Reviewed-on: http://gerrit.openafs.org/7697 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ec8205f7143b50336b88d98a1aeb0ac375ad2092 Author: Jeffrey Altman Date: Fri Jun 22 16:51:00 2012 -0400 Windows: ShellExt display error if symlink not AFS If the path in which a Symlink is to be created is not located within AFS, display an error dialog. Reviewed-on: http://gerrit.openafs.org/7643 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d95d4fcca997ea3f8bfbf4a2c1f22c402446aad8) Change-Id: I4fc890c257713508fac0a9cb1be22fb770f5f2b0 Reviewed-on: http://gerrit.openafs.org/7696 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 78e2a2a7eb0a75a8f46cd2b1ea1547020f30a32b Author: Jeffrey Altman Date: Fri Jun 22 16:46:23 2012 -0400 Windows: Dir Invalidation Notify Current Object When an invalidation is processed for a directory object, send the notification on the directory object that was invalidated not its parent. Reviewed-on: http://gerrit.openafs.org/7642 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 349c1f53383ee26eb13729d703b0b9e89865ec0c) Change-Id: I162834f5e33540ee5503fd6b0a6d319da47c8f7e Reviewed-on: http://gerrit.openafs.org/7695 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e3b89ae16b28f44f125e2d3f7d9a04ca91dad30b Author: Jeffrey Altman Date: Thu Jun 21 19:37:25 2012 -0400 Windows: cm_GetROVolumeID empty server list check Instead of testing for a non-NULL server list, check to see that the list itself is non-empty. Reviewed-on: http://gerrit.openafs.org/7640 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4785361388d21c46dd30332d89bb201522ee1a6c) Change-Id: If64a704c1fbb409af08cf75baa6743b1e3aafc29 Reviewed-on: http://gerrit.openafs.org/7693 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3e3af8f807e71bc0fcc0544bf5e21ac73676e618 Author: Jeffrey Altman Date: Thu Jun 21 19:34:58 2012 -0400 Windows: Replicated requires more than one site The VLDB response may include a list of servers some of which are not valid replicas because the DONOTUSE flag is set or because the replica site may be out of date. Instead of setting the replication state based upon the server count in the VLDB response, use the number of RO sites that were deemed valid at the end of processing. Reviewed-on: http://gerrit.openafs.org/7639 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 056399bb0d2186bae96223c7f7665e1bc0aed82f) Change-Id: If30ad2642de72188beb419b8635888f48c723139 Reviewed-on: http://gerrit.openafs.org/7692 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e3bd648d2c09acd2f6de46510d0cf464e807f21d Author: Jeffrey Altman Date: Thu Jun 21 19:29:26 2012 -0400 Windows: [Inline]BulkStat VolSync not accurate? Instead of only recording the volume creation date when cm_readonlyVolumeVersioning is true, record the date whenever the RPC in use is not a RXAFS_[Inline]BulkStatus. This is tracked by the addition of flags for cm_MergeStatus and cm_EndCallBackGrantingCall which identify when the RPC was in fact a BulkStat variant. As a reminder, pre- 1.4.11 and 1.6.0 file servers do not properly set the VolSync structure when responding to BulkStat RPCs. At present, there is no method of identifying when it is safe to use them. When cm_readonlyVolumeVersioning is TRUE, it is assumed that the file servers are new enough to do the right thing. Reviewed-on: http://gerrit.openafs.org/7638 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 877053a8cd419c6a6470972f18c4adc7ddb0f163) Change-Id: Ie2b1cf720cb09eada5f8ec5bc7b6756a3f240dbb Reviewed-on: http://gerrit.openafs.org/7691 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b49dc136565481271e0bd5835691bf8139bad0b4 Author: Jeffrey Altman Date: Wed Jun 20 00:05:44 2012 -0400 Windows: force vldb lookup if server list is empty The Windows cache manager can mark server references as "deleted" which can give the impression that a server reference list is not empty when it is. If the volume list is empty any attempt to issue an RPC would fail with a CM_ERROR_ALLDOWN error. Since the VLDB data is current, this condition will remain for two hours. This patchset adds a new error, CM_ERROR_EMPTY, which is returned when the server reference list is empty. cm_Analyze() is modified to process the CM_ERROR_EMPTY error by attempting to update the server reference list. If the update succeeds and the list is no longer empty, the RPC is retried. Otherwise, the RPC fails as before. Reviewed-on: http://gerrit.openafs.org/7637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae25cf277c8d70da0e6666316baf98d5c117a03b) Change-Id: I954872a1db9467c441875609e75794c0bf0fcf07 Reviewed-on: http://gerrit.openafs.org/7690 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 417ed4a7bf42d383e8c681e0a8a16be4a6373c18 Author: Jeffrey Altman Date: Tue Jun 19 18:48:31 2012 -0400 Windows: Freelance Short circuit all vol updates As long as the cell is the Freelance Cell ID the volume updates should be short circuited. There is no benefit to performing the extra work. Reviewed-on: http://gerrit.openafs.org/7636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e0b9b89dd98d0bf449556e3f28b479dd61e7eb95) Change-Id: I1ea014e4a8bd0c8523d0cecc7411afb53c199a18 Reviewed-on: http://gerrit.openafs.org/7689 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fa9ea681d9a5d642d5fe05f7d06c14aea8ef4e73 Author: Jeffrey Altman Date: Mon Jun 18 21:55:49 2012 -0400 Windows: AFS_Startup_Event must query Debug value For proper debugging to be performed within the AFS_Startup_Event processing, the "Debug" value must be queried from the registry. Reviewed-on: http://gerrit.openafs.org/7633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7fd1dc6c887c3bf786632901bc72b8250298a98f) Change-Id: I24654b699575075f7019535dd8c4370666b3a350 Reviewed-on: http://gerrit.openafs.org/7688 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a9cfc752a175e600648f45fef4e239ed7e462c0e Author: Jeffrey Altman Date: Mon Jun 18 21:49:18 2012 -0400 Windows: NPLogonNotify secure erase password The user's password is copied during the NPLogonNotify processing, be sure to erase it from the stack before the function completes. Reviewed-on: http://gerrit.openafs.org/7632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 187af8d11350c2ff509244f216c72bdd4b88451a) Change-Id: Ie242635713e8e2f7b6221494bb0245249f05ef7c Reviewed-on: http://gerrit.openafs.org/7687 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 01aed7438439b508dccc2031f933d0bc677120ae Author: Jeffrey Altman Date: Mon Jun 18 21:48:05 2012 -0400 Windows: afslogon impersonate when deleting tickets When tickets are obtained via the KFW_AFS interface the user context is being impersonated. Do the same when cleaning up. Reviewed-on: http://gerrit.openafs.org/7631 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c8b1f007b530c072ee1f5654833f68e45a2eafd5) Change-Id: Id764642e6eba30ee7b60cc34519fbfadb2960282 Reviewed-on: http://gerrit.openafs.org/7686 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 239f08217b5a87792dae93929d19652fd6cd943c Author: Jeffrey Altman Date: Mon Jun 18 21:45:39 2012 -0400 Windows: afslogon make error dialog system modal Prevent error dialogs from getting lost behind the desktop during logon. Make them system modal. Add a warning icon as well. Reviewed-on: http://gerrit.openafs.org/7630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae5aba17cc5d45805f7d263fd645fba0d3bb5116) Change-Id: I522cfa931105f5a5f2330ebf8628caf21bcd7ca7 Reviewed-on: http://gerrit.openafs.org/7685 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 88fd053c8b612a7ec4bfb2c46248086ac36c8bc0 Author: Jeffrey Altman Date: Mon Jun 18 21:39:51 2012 -0400 Windows: afslogon MapAuthError return WN_NET_ERROR (ERROR_UNEXP_NET_ERR) to indicate a problem with this network provider when an error occurs instead of returning WN_NET_SUCCESS. Reviewed-on: http://gerrit.openafs.org/7629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7adb93cf51d56936d51b70758a959342728fea56) Change-Id: I1d0c9bae64cd05478f7a67dd3d1653f56e88aa86 Reviewed-on: http://gerrit.openafs.org/7684 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b891f308db28ab155964c5ddc150356f97439631 Author: Jeffrey Altman Date: Mon Jun 18 21:37:49 2012 -0400 Windows: afslogon OutputDebugString If the NetworkProvider "Debug" value has the 1th bit set (2), generate all debug values to the debugger via OutputDebugString(). Reviewed-on: http://gerrit.openafs.org/7628 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 43d53bed6f591257fee55c343699ee1d3b223ff6) Change-Id: I6d23455c5c0d9f4e710c7b139eac0cfce3e4f803 Reviewed-on: http://gerrit.openafs.org/7683 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fab5e06696540593e4d9209b242524199eb3e947 Author: Jeffrey Altman Date: Thu Jun 7 09:23:26 2012 -0400 Windows: misplaced brace in KFW_AFS_get_cred A misplaced brace in KFW_AFS_get_cred() results in KFW_AFS_klog() being executed twice in a row if successful. The second attempt could fail due to a KRB5KRB_AP_ERR_REPEAT error issued by the KDC. Reviewed-on: http://gerrit.openafs.org/7626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d7690835aca12b3d38722a8dafa6efbfb1f549ee) Change-Id: I0a02cbe0b9128b7c17f3ba90cbc39512254daa43 Reviewed-on: http://gerrit.openafs.org/7681 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d0245b0960884d57e18bb6673a5957ca5f5ae7b9 Author: Jeffrey Altman Date: Mon Jun 18 10:10:32 2012 -0400 Windows: Do not permit RDR worker threads to quit If the DeviceIoControl from the service's redirector worker threads fails the thread will terminate. This is a problem because if all of the threads quit the afs redirector will end up deadlocking all requests since there will be no method of delivering them to the service. If there is an error log it (if possible), and retry. Hopefully it will be transient. Reviewed-on: http://gerrit.openafs.org/7627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e513799232f72ce9deabe5097f06f42d4ce09bf2) Change-Id: I2527a126ebd2d19052fa6b059a67e8611754fb52 Reviewed-on: http://gerrit.openafs.org/7682 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1d175e1e479eaf448a8e65cb918121f73d6b98b0 Author: Andrew Deason Date: Thu Jun 28 15:43:27 2012 -0500 doc: Correct volume size CAUTIONS notes 2 terabytes is 2^41 bytes, not 2^31 bytes. Also clarify that volumes can be much larger than this. FIXES 130188 Reviewed-on: http://gerrit.openafs.org/7598 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 300cbb28b08c2fd3709942cc6c48e7d9369a3394) Change-Id: Iaeb3208673fbbe257a9fa5735c18fbac996b5dda Reviewed-on: http://gerrit.openafs.org/7677 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8e1ee1a7c4598522fa4c25502cd62a94f51efb53 Author: Andrew Deason Date: Thu Jun 28 17:47:32 2012 -0500 doc: Fix whitespace errors Reviewed-on: http://gerrit.openafs.org/7599 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcaa53a6d7289665b64037a0d96ae4c6cbf4f776) Change-Id: I1eac5eaf797f68d8e9f5f7e8df1ba301544b0434 Reviewed-on: http://gerrit.openafs.org/7676 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e5b0879b67a4693c7c41f663ae477f840d934ae6 Author: Andrew Deason Date: Thu Jun 28 15:30:40 2012 -0500 doc: Consolidate CAUTIONS notes about volume size Reviewed-on: http://gerrit.openafs.org/7597 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3ff8ef499c56008f4d2ebf5b81e08e98eb0c0826) Change-Id: Icefd8c8e9eab3b7e539bdae84d498b18780714b5 Reviewed-on: http://gerrit.openafs.org/7675 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6dbe036ba6aee910fab265d4118f8db74385d2fd Author: Jeffrey Altman Date: Mon Jul 2 01:56:35 2012 -0400 Windows: export roken allocators Use rk_alloc, rk_calloc, rk_free, rk_realloc instead of Windows C RTL allocators. The OpenAFS source tree has a bad habit of allocating memory in one module and freeing it in another. This is not a problem for POSIX but is disaster on Windows. This change ensures that all OpenAFS modules share the same allocator. Reviewed-on: http://gerrit.openafs.org/7625 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5e91c3b5d1a70f7af2e04ac74d98ae6b407f169c) Change-Id: I8d0e2d3c6ecf700ebbee6d90826c1d27ca458732 Reviewed-on: http://gerrit.openafs.org/7669 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c600de8cf24da4b026ef524a9990662b8c9b194c Author: Heimdal Developers Date: Mon Jul 2 15:00:30 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to 3fe55728404c602884f16126e9cc60fc5a3d8f20 (switch-from-svn-to-git-2993-g3fe5572) Upstream changes are: Andrew Bartlett (1): Revert "make paranoia check less paranoid" - check that key types strictly match Jeffrey Altman (3): do not include stdint.h unprotected Windows EAFNOSUPPORT defined by VS2010 roken: Use a common allocator for all windows Love Hornquist Astrand (2): add rk_getpwnam_r move windows compat errno constants to after is included Nicolas Williams (7): Fixes to make Heimdal -Wall -Werror clean Make krb5_kuserok() pluggable and add features (including MIT config compat) Generalize token expansion to allow for context-specific tokens Address code review comments (use krb5_enomem()) Make master build on Windows Fix a compiler warning in lib/roken/snprintf.c on 32-bit Ubuntu Move base into lib Roland C. Dowdeswell (3): Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues. Provide support for enctype aliases for ease of use. Additional changes to make -Wshadow build on Ubuntu 10.04. Simon Wilkinson (1): hcrypto: Use correct size for memset in md2 New files are: roken/realloc.c roken/win32_alloc.c Reviewed-on: http://gerrit.openafs.org/7612 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9c0b7be87de83493ca1d5a01326982ce5c8c131b) Change-Id: Ic2d0405e9fa67818e3de5e26beafe96a6fcec34e Reviewed-on: http://gerrit.openafs.org/7668 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c65d97e2b6513afa63bb3b0d68a28111b723661 Author: Simon Wilkinson Date: Mon Jul 2 14:50:10 2012 +0100 roken: Import Windows allocator changes Roken now supports using a single allocator across all of the objects which include that roken library. Two additional objects are required to support this, so add them to the list of symbols that we import. Reviewed-on: http://gerrit.openafs.org/7618 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e05a63045230e732d6abb1f4baf8ed5275e19e69) Change-Id: I2560309da93a8cfda2908ad67c8a83ebc177f4fd Reviewed-on: http://gerrit.openafs.org/7667 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 88108fec2246dc1c2c61b792104270f6464f0ca2 Author: Jeffrey Altman Date: Mon Jul 2 11:49:54 2012 -0400 Windows: HAVE_UINTPTR_T The Windows build has a definition of uintptr_t. Add HAVE_UINTPTR_T to the Windows config.h file. The sources imported from Heimdal make use of it. Reviewed-on: http://gerrit.openafs.org/7623 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a41ab064962ef4865dfa5023c4b314c6f935ed64) Change-Id: Iad64cba28652df03d3c1563c12553d53fb482cfd Reviewed-on: http://gerrit.openafs.org/7666 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f4e781f1b2eeb358a39e1429e77d1a8894d8a595 Author: Jeffrey Altman Date: Mon Jul 2 01:42:35 2012 -0400 Add HAVE_INT64TOINT32 test in stds.h Windows SDK v6.0 and above include a platform specific definition of Int64ToInt32. Use the platform definition when available. Reviewed-on: http://gerrit.openafs.org/7622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 7c2399115153609edc87a4c487d18e7f8b41dcba) Change-Id: I0c7c0ff66cab6e89261265233afb4a9441a539e2 Reviewed-on: http://gerrit.openafs.org/7665 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 48b9016804bd691d29af0fdfec83d51894ca7b42 Author: Jeffrey Altman Date: Mon Jul 2 10:36:22 2012 -0400 Windows: remove unused defines from param.h Remove #if 0 disabled definitions and those for strtoll and strtoull as they are not used anywhere in the tree. strtoll and strtoull will conflict with the next roken.h update. Reviewed-on: http://gerrit.openafs.org/7621 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6f779c18678d4d9549c2977c2c3c9d15a0f13524) Change-Id: I1944978187b813a027ebecc6918e889ace06ad95 Reviewed-on: http://gerrit.openafs.org/7664 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c1d43ece8ceebdfa7b3037dc25526974d1f1eee8 Author: Jeffrey Altman Date: Mon Jul 2 01:35:43 2012 -0400 Windows: link to afsroken.dll All binaries must be linked against afsroken.dll. Reviewed-on: http://gerrit.openafs.org/7620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 754180b61ee4cb84bd21046afd813b0dc03fad54) Change-Id: I6bb8959e14257d0441490dc0d48b362a699be46f Reviewed-on: http://gerrit.openafs.org/7663 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0dae86e3c4e57d5334889492045f9016147a7760 Author: Jeffrey Altman Date: Mon Jul 2 01:32:25 2012 -0400 Windows: roken.h ordering The order of include files must be afsconfig.h afs/param.h afs/stds.h roken.h Reviewed-on: http://gerrit.openafs.org/7619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3078c4a59240540b085799495270872bc9393912) Change-Id: Id4239598f5d32ec3479bcd8ec739f120bc0e5fc2 Reviewed-on: http://gerrit.openafs.org/7662 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5c88ceaec365562f1b85ef997e235e39aa5e361b Author: Jeffrey Altman Date: Mon Jun 11 14:45:15 2012 -0400 Windows: afslogon is only an authentication provider afslogon.dll is just a Authentication Provider DLL. It does not provide network file system browse and mapping functions. Therefore, do not include the "ProviderPath" registry value when the AuthentProviderPath variable is sufficient. Reviewed-on: http://gerrit.openafs.org/7550 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d8397c7c320cd8557e4a24a9ff84b029c07b165e) Change-Id: Ia968616663fe0f28f297e59266aff9d3688e0415 Reviewed-on: http://gerrit.openafs.org/7661 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7e4c5a3a65fff70be3933a663bfd62d9c81e044f Author: Simon Wilkinson Date: Wed Apr 18 23:25:33 2012 +0100 roken: Add setprogname Add setprogname to the list of functions that we test for, and replace with a libroken alternative if it is missing. Remove setprogname and getprogname from the AC_CHECK_FUNCS list, as AC_REPLACE_FUNCS is a superset of this test. Reviewed-on: http://gerrit.openafs.org/7250 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit db733e325e558d4f36835639e340ecee94f7fcb5) Change-Id: If26d16f8562ba5e573cbf64252aec8c7f8071f66 Reviewed-on: http://gerrit.openafs.org/7660 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4ac1cb398a55b8ad48b99ecbef02b27ab79718f0 Author: Heimdal Developers Date: Wed Apr 18 23:16:39 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408) New files are: roken/setprogname.c Reviewed-on: http://gerrit.openafs.org/7249 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit c0952be8d870cf1fc7837b86b373a100886742e4) Change-Id: I0d9feef001d0aa7b7ac64ce54ac9557870157b5d Reviewed-on: http://gerrit.openafs.org/7659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a267381b8f04400be5839c1a43aff9d155b465c8 Author: Simon Wilkinson Date: Wed Apr 18 23:15:15 2012 +0100 roken: Add setprogname to list of imports Reviewed-on: http://gerrit.openafs.org/7248 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 02eb5507481a3f05423081df3c1d07597cd36dc4) Change-Id: I949d36331e901b08f39cb955d68154812592c482 Reviewed-on: http://gerrit.openafs.org/7658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a2afb1f4a743faf771218c0ec790218680d553ec Author: Simon Wilkinson Date: Fri Jun 1 13:20:57 2012 -0400 rx: provide mechanism to send a bare abort packet simply put an abort on the wire Reviewed-on: http://gerrit.openafs.org/7562 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5019ecd5fad0846abcd92835411c7b0f3f2170ca) Change-Id: I23f7ea60922aa0d2fbed4015d3ec910bea6817cd Reviewed-on: http://gerrit.openafs.org/7605 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3e6f88c98424e7ebe375871ce1b881721721c3f2 Author: Andrew Deason Date: Mon Jun 18 15:06:49 2012 -0500 doc: Consolidate NetRestrict format docmentation We were specifying exactly the same format in two different places; consolidate them into one place. In addition, explicitly say there are is no way to specify a range of addresses, in case some people are confused by the previous versions of this man page that erroneously said you could use 255 as a wildcard. Reviewed-on: http://gerrit.openafs.org/7565 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4bab02f023f53041c3ac58fd75cffd27ec92df0) Change-Id: I13b7374f8b7378413e0ed1cfeae7e1a83702c447 Reviewed-on: http://gerrit.openafs.org/7608 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e66f4a891355f36911eddd6ec39c831447fae4e5 Author: Andrew Deason Date: Mon Jun 18 15:02:09 2012 -0500 doc: Remove reference to NetRestrict wildcards Commit 80fc888a9223050481de932233fe7121a48df194 got some of this, but forgot the other reference. We don't support these anywhere, so remove it here, too. FIXES 125340 Reviewed-on: http://gerrit.openafs.org/7564 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4ae005062e2c927b77ea23d95934d5af463878b3) Change-Id: Ib3ef062cb0d7bf448e5282d6c855ded5afc2f22a Reviewed-on: http://gerrit.openafs.org/7607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3da1ccf09431162b5d03186c3a6b23986dead6a8 Author: Derrick Brashear Date: Fri Jun 1 13:16:31 2012 -0400 rx: abort on missing service currently rx does not send an abort if a service does not exist; it quietly ignores the packet. provide a hint we have done so. Reviewed-on: http://gerrit.openafs.org/7563 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1) Change-Id: Ice2ba42988ff2f65a45511505ef4e1d78dc94901 Reviewed-on: http://gerrit.openafs.org/7606 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5df006f89bdfb77a742c30a7924854091e3c0cdc Author: Simon Wilkinson Date: Thu Jun 7 20:46:27 2012 +0100 rx: Constify rx_opaque_populate rx_opaque_populate doesn't modify the data passed into it, so make that argument const Reviewed-on: http://gerrit.openafs.org/7557 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit c855dd726a6f2681bf51a9596ec600a8cc88fb59) Change-Id: I7f73646a4d6473c88937a45e5696aaa4ea4e4c66 Reviewed-on: http://gerrit.openafs.org/7604 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c4f72e041e5872b87479d9cb6e0c17ddabf21cf Author: Jeffrey Altman Date: Wed Jun 6 12:13:08 2012 -0400 Windows: 1.7.15 (1.7.1500.0) Change-Id: I2b9a9cceb005eb3c61645e9bbccf376092675eb3 Reviewed-on: http://gerrit.openafs.org/7534 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 48ec8209d3193a5b684687e2f35abd2b78a9ddb4 Author: Jeffrey Altman Date: Wed Jun 6 12:10:16 2012 -0400 Windows: 1.7.15 change log Change-Id: Ic0ebd6db72addf1b2b2b6f7cf3a89b143273e4ac Reviewed-on: http://gerrit.openafs.org/7533 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 81e92593ee734f51097b7c02746fdcd304a0a7ed Author: Jeffrey Altman Date: Tue Jun 5 23:25:08 2012 -0400 windows: AFSQueryVolumeInfo exception info Protect against NULL FileObject or ObjectInformation. Log additional information when an exception is caught in AFSQueryVolumeInfo. Reviewed-on: http://gerrit.openafs.org/7525 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0d2c1dfd5510e9c84cb3b56c00370f0fc114e87b) Change-Id: I66e32c1e4227c3be19eb42a2dcf128821e4a0b80 Reviewed-on: http://gerrit.openafs.org/7532 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0f1f1659469e0d8e8b4ebb255ebeae0f73e03ff Author: Jeffrey Altman Date: Tue Jun 5 23:07:40 2012 -0400 Windows: SMB GetFileAttributes support commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41 added a GetFileAttributes query to the pioctl interface to protect against printing pages on printers with a broken smb protocol implementation. This patchset adds support for GetFileAttribute on _._AFS_IOCTL_._ files to the SMB implementation. Reviewed-on: http://gerrit.openafs.org/7524 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 371af87a23b61187ca9d54c8e6819f2121fbf1db) Change-Id: I40f8c8c7f36d354eccc180758d9c7467af6a00bb Reviewed-on: http://gerrit.openafs.org/7531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 818e3794584ea55bd8921bfd498b70b0a934ded9 Author: Jeffrey Altman Date: Sat May 26 19:16:47 2012 -0400 Windows: Introduce AFSFreeExtent() Consolidate all operations necessary to free an extent in a single function, AFSFreeExtent(). Reviewed-on: http://gerrit.openafs.org/7521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6e704d967334a3f990e2ba1c758e4f054234e97e) Change-Id: I6514159214add9265647dcc82aef64a7bd3768da Reviewed-on: http://gerrit.openafs.org/7530 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 806319cc15e43fe30c7fed83f7eb2755f665858e Author: Jeffrey Altman Date: Sat May 26 18:11:06 2012 -0400 Windows: Adjust extent release strategy All extents were flushed whenever AFSReleaseExtentsWithFlush was executed. This included a call at the completion of each NonCached Read operation which could result in heavy thrashing as the data would be released prior to it being needed by the application. This patchset makes the following adjustments. First, AFSReleaseExtentsWithFlush() has been modified to release all but 1024 extents belonging to the file. Second, NonCached Reads only execute AFSReleaseExtentsWithFlush() when there are more than 4096 extents associated with the file. Third, AFSReleaseExtentsWithFlush() now has a 'bReleaseAll' parameter which is used for calls from AFSCleanup() and AFSFlushExtents() which need to be able to flush all extents attached to a FCB. Reviewed-on: http://gerrit.openafs.org/7520 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cee6a383d3d1732e78827c839ee9513847e03aa6) Change-Id: I683d8188523ce991ad7c461178984c098ddb5faa Reviewed-on: http://gerrit.openafs.org/7529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 08088f359bb61d0f979c811f7223ff579067f2cf Author: Jeffrey Altman Date: Sat May 26 18:09:30 2012 -0400 Windows: AFSRedir code cleanup Remove unnecessary intermediate variables. Do not drop lock only to reacquire. Formatting. Reviewed-on: http://gerrit.openafs.org/7519 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5335f77bd56b7a94fd0225477fe7b7a707df86b7) Change-Id: Ib0330bbf0331f669460969ea8b4a9c9f82e448df Reviewed-on: http://gerrit.openafs.org/7528 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 66d256fa83f2751bbc5304c68037156d0576a195 Author: Jeffrey Altman Date: Sat May 26 18:06:07 2012 -0400 Windows: Remove extent from all skip lists Before freeing the memory for an Extent object, the extent must be removed from all of the extent skip lists. Otherwise, the lists will be corrupted. Reviewed-on: http://gerrit.openafs.org/7518 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ed0eb70f36121ca5cacbf0b87ab9d05bfbb526b8) Change-Id: I0d07f213e2132297c5e3d8a7bf5cad94b5854cf7 Reviewed-on: http://gerrit.openafs.org/7527 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 273c579c41dd6ab6dd41d619a1e0d515ab41695c Author: Jeffrey Altman Date: Sat May 26 18:04:25 2012 -0400 Windows: consoldiate NextExtent() implementations Both AFSExtentsSupport.cpp and AFSIoSupport.cpp provided NextExtent() implementations. The AFSExtentsSupport version was more general. Use that one for both modules. Reviewed-on: http://gerrit.openafs.org/7517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c5f32b315982bf23f33d0395f404fe93563f0b8d) Change-Id: Ifaf9132f0217590267a2b0486d8b00e65aa583b8 Reviewed-on: http://gerrit.openafs.org/7526 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 07b134b088cb493555e9805f30a99cc519081c41 Author: Jeffrey Altman Date: Sun May 27 11:20:11 2012 -0400 Windows: Protect against null volp dereference In cm_RecycleSCache cm_GetVolumeByFID can fail leaving 'volp' a NULL pointer. Do not call cm_PutVolume() if cm_GetVolumeByFID fails. Reviewed-on: http://gerrit.openafs.org/7506 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e94b2338691d9450749e5f3e51f85e99f90b4bea) Change-Id: I051c641f49556ec4d6f82501243ac2a085787ac5 Reviewed-on: http://gerrit.openafs.org/7512 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 053f2253ffbbd9b576a5b4c46b3df3e4d500bf9e Author: Jeffrey Altman Date: Fri May 25 21:47:23 2012 -0400 Windows: Avoid deadlock on ProcessTree Lock Reviewed-on: http://gerrit.openafs.org/7505 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce8d0aefd1a6915df281ec2551b3f090c2a3b322) Change-Id: Id7e9ba86dd886c8160ac967fa44e657bfc603258 Reviewed-on: http://gerrit.openafs.org/7511 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5254a3abcec5e9b44a7e97a9b41118eb608bae93 Author: Jeffrey Altman Date: Thu May 24 20:46:27 2012 -0400 Windows: Add CCB NonPaged Resource for synchronization Add a NonPaged ERESOURCE object to the AFS_CCB structure for use in synchronizing access to the Ccb->Flags field and the construction of Directory Snapshots. Reviewed-on: http://gerrit.openafs.org/7478 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25948ccbc369087958d2159fb7dd995c21c92b20) Change-Id: I00a4f212302911fa89edff74241e7228009156d4 Reviewed-on: http://gerrit.openafs.org/7510 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 79f55a86d45bf19f13798e142b7f75fe5dbaeddb Author: Jeffrey Altman Date: Thu May 24 20:45:07 2012 -0400 Windows: Make CCB_FLAGS_DIRECTORY_QUERY_MAPPED consistent Use CCB_FLAG_DIRECTORY_QUERY_MAPPED instead of CCB_FLAGS_DIRECTORY_QUERY_MAPPED. Reviewed-on: http://gerrit.openafs.org/7477 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fffce9aee4c7c93e140eb56e449f9a9ff6345659) Change-Id: I535d88dcd4507bb6b187218c8eeee20d26ffbd84 Reviewed-on: http://gerrit.openafs.org/7509 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 227fbefac733789a7597b8b3b8dc7fda23fa5f0a Author: Jeffrey Altman Date: Thu May 24 17:47:25 2012 -0400 Windows: Remove unused async read/write operations Removing dead code. Reviewed-on: http://gerrit.openafs.org/7476 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 611436eaec4db67a856b0617c00224d4359d804a) Change-Id: I77c61b5387e98bc34141d36b27a76628457adb04 Reviewed-on: http://gerrit.openafs.org/7508 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8f18ee0c1eed4bd3aa83bfae419e93fbca6ab62d Author: Jeffrey Altman Date: Thu May 24 04:57:19 2012 -0400 Windows: Avoid deadlock on VolumeCB->VolumeLock AFSPrimaryVolumeWorkerThread() holds VolumeCB->VolumeLock SHARED across the call to AFSCleanupFcb() -> CcPurgeCacheSection(). If a filter driver such as Sophos (savonaccessfilter.sys -> savonaccesscontrol.sys) triggers an AFSCreate() in response to the cache section being purged that will force the evaluation of the file path by AFSLocateNameEntry(). If the path contains a mount point that requires validation, AFSBuildMountPointTarget() is called which in turn required the VolumeCB->VolumeLock EXCL. AFSBuildMountPointTarget() only requires the VolumeCB->VolumeLock if the VolumeCB->RootFcb == NULL. That should only be true if the VolumeCB was allocated by AFSInitVolume() or under very rare race conditions. This patchset refactors AFSInitVolume() to ensure that it holds an extra VolumeCB->VolumeReferenceCount reference. This reference is used to assist in the refactoring of AFSBuildRootVolume() and AFSBuildMountPointTarget() to avoid races with volume root object invalidation as well as permitting the VolumeCB->VolumeLock to be ignored in the common case. Avoiding the acquisition of VolumeCB->VolumeLock during mount point target evaluation has the additional benefit of reducing lock contention during path evaluation. FIXES 130812 Reviewed-on: http://gerrit.openafs.org/7474 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 06a602bfd40661ef89b3d6b39dd8574015a15b92) Change-Id: I817dc51ae57adb145cbd9078c86f9df12b31fd28 Reviewed-on: http://gerrit.openafs.org/7507 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 17935ccac0746a6a00ae89f6a927a06079bf81b5 Author: Jeffrey Altman Date: Mon May 21 10:41:49 2012 -0400 Windows: Version 1.7.14 (1.7.1400.0) Change-Id: I19b416ddddf2782e26e14d72cd69ca33a70aadb7 Reviewed-on: http://gerrit.openafs.org/7427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5bc744393a448c5859f2bd5910a473b820945966 Author: Jeffrey Altman Date: Mon May 21 10:41:11 2012 -0400 Windows: Change Log for 1.7.14 Change-Id: I9bfc760ca369a1eda4c5ffcfcd37ffd1c32e9e39 Reviewed-on: http://gerrit.openafs.org/7426 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9c5f88462aea016dd6b9c71775b7d33b8269b385 Author: Jeffrey Altman Date: Fri May 18 16:31:19 2012 -0400 Windows: avoid deadlock TreeLock vs Fcb Resource Cannot call AFSPerformObjectInvalidate directly because ObjectInfoCB->Specific.Directory.DirectoryNodeHdr.TreeLock is held during the sequence AFSVerifyEntry->AFSValidateDirectoryCache->AFSVerifyDirectoryContent and AFSPerformObjectInvalidate requires the Fcb->NPFcb->Resource which must be held prior to the TreeLock. Reviewed-on: http://gerrit.openafs.org/7423 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3a7dbe331580e418d1bdd5d75769512bb5e38cee) Change-Id: I4c2e41d86576a98aaac1bb9a594f81370bd6e80f Reviewed-on: http://gerrit.openafs.org/7425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5e9a300fed955a6a60a82b3a39b5bfafca8d1db7 Author: Jeffrey Altman Date: Fri May 18 10:19:13 2012 -0400 Windows: buf redir queue mgmt scp can be null buf_InsertToRedirQueue, buf_RemoveFromRedirQueue, and buf_MoveToHeadOfRedirQueue can be passed a NULL cm_scache_t pointer. If the pointer is NULL (as is the case during buf_Init() processing) the scp->redirMx must not be obtained or a crash will occur. Reviewed-on: http://gerrit.openafs.org/7422 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 564c9733e5f1f1bd2417063e3ccd8228ca763a2e) Change-Id: I87937a1e43375b09a993cebb59e5c8ce8f23ce84 Reviewed-on: http://gerrit.openafs.org/7424 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9ffca21ee2de29ad5582a9853c331889c00b65c2 Author: Jeffrey Altman Date: Wed May 16 23:26:00 2012 -0400 Windows: Version 1.7.13 (1.7.1300.0) Change-Id: I387b7b52bdf1158a5cb9fa07f7dcff24efdd170e Reviewed-on: http://gerrit.openafs.org/7417 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit de25527993ca50d6636669f376e882dc40e49387 Author: Jeffrey Altman Date: Wed May 16 23:25:19 2012 -0400 Windows: Change Log for 1.7.13 Change-Id: I7fa493bf48c6938055d36ac7a0952494264e4749 Reviewed-on: http://gerrit.openafs.org/7416 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3e7897d2b85712acfa40ee633f52f097115f16dc Author: Jeffrey Altman Date: Wed May 16 09:52:00 2012 -0400 Windows: Apply MAX_FID_COUNT to AFS Redirector Provide consistency between the SMB path parser and the AFS redirector path processing by using the same constant, MAX_FID_COUNT, for both. MAX_FID_COUNT is the maximum number of unique file ids that can exist in a path after all mount points and symlinks have been expanded. The current value is 512. Reviewed-on: http://gerrit.openafs.org/7412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e04f324b5dc87391d9fc08820a4ff22b7dda84c3) Change-Id: I0671e60db76bcc4f1148c4fed8a28978b6a4d505 Reviewed-on: http://gerrit.openafs.org/7415 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d6f610af93b8318424c4bd9a870ce20fc9852a28 Author: Jeffrey Altman Date: Mon May 14 11:11:57 2012 -0400 Windows: AFSTearDownExtents may experience active extents If there are extents with a non-zero ActiveCount when AFSTearDownExtents() is executed, it must leave them alone and attached to the File Control Block. This has implications for its callers, especially AFSCleanupFcb() since it may be the case that a Cleanup cannot be completed. The AFSPrimaryVolumeWorker thread must therefore check after calling AFSCleanupFcb() whether or not the Fcb ExtentCount is zero before calling AFSRemoveFcb(). Reviewed-on: http://gerrit.openafs.org/7406 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 94f96c6aae142478bf0824e7c3a3a810494a123d) Change-Id: I64f8c98af9aab0d56df9c9f1646aee0c107ab437 Reviewed-on: http://gerrit.openafs.org/7414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a5e2435b06a31c392a4c755e62f0f956d565d762 Author: Jeffrey Altman Date: Tue May 15 23:27:36 2012 -0400 Windows: avoid duplicate work cm_Analyze During VNOVOL processing, if the volume is replicated and the server reference status is "not busy", set the status to busy and avoid calling cm_SetServerBusyStatus() because that function mirrors the loop that is already being processed. Reviewed-on: http://gerrit.openafs.org/7411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9a768fb7ac06c887c45f6ed144c312fe357ab1e) Change-Id: I22dc8434463ad517986f37fc9f465e6313961935 Reviewed-on: http://gerrit.openafs.org/7413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 22f9ad8c8275466c65b6ce221a62007d5031e299 Author: Jeffrey Altman Date: Tue May 15 00:23:17 2012 -0400 Windows: init section ptrs for pioctl files FIXES 130783 Reviewed-on: http://gerrit.openafs.org/7407 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 97581f751024527d1090566f2d59fd1b14235b67) Change-Id: Ic0a8ff1159f61c624def9d69473fd4b21d335712 Reviewed-on: http://gerrit.openafs.org/7410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 06ce992d6599f7a6a2bb09eee8b9370c3c20f99f Author: Jeffrey Altman Date: Mon May 14 00:12:17 2012 -0400 Windows: Redir Ioctl thread safety A crash dump showed that it is possible for a Cleanup to race with a Read from the ioctl file. Add reference counting to protect against crashing under such a circumstance. Reviewed-on: http://gerrit.openafs.org/7405 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac08a0c30d1b8f4f5f13a6e78b86d32e2cb34f65) Change-Id: If0a8b29c15ae4efcbf9239277118049063626c1a Reviewed-on: http://gerrit.openafs.org/7409 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 08354ffea087b96a102a7647f63b15fb3b6a2b8b Author: Jeffrey Altman Date: Fri May 11 19:24:54 2012 -0400 Windows: Permit Media Player to work with mapped drives Windows Media Player was failing to play media files from mapped drives if the mapping was to a directory several levels below \\afs\cellname\. The code to permit SUBST drive letters to work got in the way during NPGetConnection processing. Try to get the connection info without the drive substitution logic. Try again with the drive substitution if the result is no connection present. FIXES 130757 Reviewed-on: http://gerrit.openafs.org/7402 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a160606616cae6e047d97d4e86f075ebe8c2e366) Change-Id: I451cb15843961ebd0efb9535e837db8c6b1dc56c Reviewed-on: http://gerrit.openafs.org/7408 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef449b78b82fa43df07cd35fafc74c77c6c152e6 Author: Mark Vitale Date: Wed May 2 13:55:16 2012 -0400 DOC: vos convertROtoRW security requirements They were copied from another command; corrected them. Reviewed-on: http://gerrit.openafs.org/7305 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit a2f523b50592e261fe9cd3ef32978e786011c3c7) Change-Id: Ie43754053461b472ab0885c40d9422daa16bb854 Reviewed-on: http://gerrit.openafs.org/7404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a19f5d33c2a4db714a1e0f120d7ef23a0aa7821f Author: Ken Dreyer Date: Fri Mar 16 13:37:20 2012 -0600 doc: add Windows section to fs newcell fs newcell works slightly differently on Windows. Document the differences in the man page. FIXES 125094 Reviewed-on: http://gerrit.openafs.org/6919 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 186158c9eb2379ec350831b8fb244c51ae234a6e) Change-Id: I8ad8d0ace88b3399319b92cd4aed55c495be6528 Reviewed-on: http://gerrit.openafs.org/7403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57f04d788400e0d96287da1ab0d1552339621d50 Author: Jeffrey Altman Date: Wed May 9 10:44:39 2012 -0400 Windows: cm_GetBuffer do not retry if biod empty Reviewed-on: http://gerrit.openafs.org/7390 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 90ecc0ff72607afeebafd9355a4fa42d5d994180) Change-Id: I3b0baeff7c0f78a79ad430849dee87e5a4d36eee Reviewed-on: http://gerrit.openafs.org/7397 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 24f3348a6e1686d7d229afb5f59f9adb9c9c6edd Author: Jeffrey Altman Date: Thu May 10 08:36:33 2012 -0400 Windows: Avoid deadlock during "fs memdump" When the afs redirector is in use, it is possible that "fs memdump" could be executed while all of the pages in the Windows page cache are dirty with data that must be purged and flushed to \\afs. In such a situation it is not safe for afsd_service.exe to hold global locks such as buf_globalLock, cm_scacheLock, etc. while performing WriteFile() calls against %TEMP%\afsd_alloc.log if afsd_alloc.log was opened without the FILE_FLAG_NO_BUFFERING flag. Doing so can result in a deadlock as it can become impossible for the Windows page cache to purge data to complete the WriteFile() as all extent operations block waiting for the global lock to be cleared. The correct long term approach would be to use the FILE_FLAG_NO_BUFFERING flag when opening %TEMP%\afsd_alloc.log. However, this requires that all writes to the file be performed using buffers that are consistent with the drive geometry. Such an approach would be incompatible with the _CrtMemDumpAllObjectsSince() operation and would require a redesign of the current interfaces. See http://msdn.microsoft.com/en-us/library/windows/desktop/cc644950(v=vs.85).aspx for requirements when using non-buffered writes. The short term fix is to dump the contents without holding the global locks. This can result in an inconsistent view of the world but will ensure that deadlocks are avoided. This patchset makes such a change when the afs redirector is in use. Reviewed-on: http://gerrit.openafs.org/7391 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c6782b86d77f8653d8dd4bc27d0cbcca5f13747f) Change-Id: I8480426dde949c2e5c733b511b5900c3b4cac172 Reviewed-on: http://gerrit.openafs.org/7396 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 77797ff1c547498874bde72c3dd5a22062aa515a Author: Jeffrey Altman Date: Mon May 7 13:19:54 2012 -0400 Windows: Version 1.7.12 (1.7.1200.0) Change-Id: I55a56f2f18326a42985aad61d19bd81a6adf8230 Reviewed-on: http://gerrit.openafs.org/7371 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 423cedc8bab477356fc566f8a36aceeb0b6af335 Author: Jeffrey Altman Date: Sun May 6 18:13:14 2012 -0400 Windows: 1.7.12 Change Log Change-Id: Ib641770d8285f7627a8477c59eea966f888fe7f9 Reviewed-on: http://gerrit.openafs.org/7362 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7fe3c7704c723194d4f6d282c3dd479d77478fae Author: Jeffrey Altman Date: Mon May 7 11:35:07 2012 -0400 Windows: cleanup redirector pipes If pipe creation fails, cleanup the mess. At shutdown, if there are pipes that have not been closed by Windows, clean them up. This is just to ensure that at shutdown the reference counts of cm_scache_t objects in the cache are reset to zero. Reviewed-on: http://gerrit.openafs.org/7366 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e9e14b551901db8f5be4d4c6060c709d2a3596be) Change-Id: If1441b12c5aa8d1496d21aa27179f34f6d3e2d2b Reviewed-on: http://gerrit.openafs.org/7370 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2dc9a798983e072cf13f86356ba0e73ef607a407 Author: Jeffrey Altman Date: Mon May 7 00:56:11 2012 -0400 Windows: Correct refcount leak The new duplicate avoidance code in cm_QueueBKGRequest() leaked a cm_scache_t and a cm_user_t reference count. Reviewed-on: http://gerrit.openafs.org/7365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 542dad75733354a6fb1e912d3ff75d414459078b) Change-Id: Ib21026219cda4e6edec2ecf5a0f9a623bd152fea Reviewed-on: http://gerrit.openafs.org/7369 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 872a9f2dd939fb938917960622b93f69b2fabf9c Author: Jeffrey Altman Date: Mon May 7 00:54:27 2012 -0400 Windows: fix build with DEBUG_REFCOUNT cm_GetSCache added a new parameter. The same parameter is required for the cm_GetSCache macro when DEBUG_REFCOUNT is defined at build time. Reviewed-on: http://gerrit.openafs.org/7364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6da91dfcb8ffa83a4663e73359abc6c8b6128e34) Change-Id: I9c8e85cc295571ecf80c84e0d8e56fff9c204dd7 Reviewed-on: http://gerrit.openafs.org/7368 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8f85819c3e4c32589a770c596ec055e58f69b7b1 Author: Jeffrey Altman Date: Sun May 6 19:31:03 2012 -0400 Windows: Checksum server lists on Volume Errors For VMOVED, VNOVOL and VOFFLINE checksum the server lists for the current volume. If the server list changes as a result of the forced volume location update, do not set the updated flag which prevents subsequent volume location updates for the current cm_req object. This combined with the previous patchset to filter volume locations based upon the VLSF_NEWREPSITE flag will avoid outages during vos release operations. Reviewed-on: http://gerrit.openafs.org/7361 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4fce72b0e6ddabce64af5fb7cef35492933f58d8) Change-Id: Ie2165b5698171fba4959228a4aafcf85915d502f Reviewed-on: http://gerrit.openafs.org/7363 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b508c5a6fe0a31e384d088fb95147bf4c2b2f857 Author: Jeffrey Altman Date: Sun May 6 09:54:55 2012 -0400 Windows: cm_SetServerBusyState use cm_ServerEqual When the busy state of a server is set it must apply to all server references if the server is multi-homed. Use cm_ServerEqual() to do so. Reviewed-on: http://gerrit.openafs.org/7355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 345d643729ed588c4e49e69607bee5793809b01d) Change-Id: I1448923b26bf66abc8dfb04b05afcccd1e57f6c4 Reviewed-on: http://gerrit.openafs.org/7360 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 99d925dc0a51159a13f041692ad5c6654598074c Author: Jeffrey Altman Date: Sat May 5 21:37:00 2012 -0400 Windows: Track Mixed RO Volume Release State If the volume location information indicates that a replica site is VLSF_NEWREPSITE then it implies that some of the replicas are out of date. Ignore the out of date replicas when constructing the list and force a volume location list reset every five minutes while the replica site info is mixed. Reviewed-on: http://gerrit.openafs.org/7354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 193a56aa664ccfb39a3447f81735f2183a914c76) Change-Id: I7efb0cefcf3b59065d7bc276f3786796d4eb3242 Reviewed-on: http://gerrit.openafs.org/7359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57ceebef318b231b4061a9180b208dbcfa4b1472 Author: Jeffrey Altman Date: Sat May 5 20:46:08 2012 -0400 Windows: Make CM resilient to transient VNOVOL The 1.6.0 and 1.6.1 file servers send transient VNOVOL errors which are no indicative of the volume not being present. For example, VNOVOL can be sent during a transition to a VBUSY state prior to salvaging or when cloning a .backup volume instance. As a result the cache manager must attempt at least one retry when a VNOVOL is receive but there are no changes to the volume location information. This patchset records the VNOVOL error in the cm_req_t structure If the volume is replicated, the volume's server reference into a busy state. If the volume is not replicated, the thread is paused for two seconds. In both cases, the request is retried. If the VNOVOL error is received a second time from the same server, the volume server reference is deleted as before. This is done to prevent repeated requests to the VLDB server and the file server that are expected to fail. The server reference will be restored to the volume on the next volume location update. Reviewed-on: http://gerrit.openafs.org/7353 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1af906799b2de90d41139dadaf2dd654e4fd2df3) Change-Id: I3ce391face92e1e48031bc3ccea5d6603c51a745 Reviewed-on: http://gerrit.openafs.org/7358 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5f76de62563d65810b7ec528ad67dc2eb0c454b3 Author: Jeffrey Altman Date: Sat May 5 19:11:07 2012 -0400 Windows: cm_GetNewSCache drop lock to permit change In cm_GetNewSCache the entire LRU queue is searched for a cm_scache_t object that is safe to recycle. If none are the LRU queue was immediately searched again without dropping the cm_scacheLock or taking a pause. As a result it is quite possible that a thread about to release a cm_scache_t was blocked from doing so. This patchset factors some of the logic a bit differently to improve readability and adds new log messages to help diagnose the cause of a problem if no cm_scache_t ever becomes available. Reviewed-on: http://gerrit.openafs.org/7352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 46c1f1391b6e1b95798e183b8f34cba5c074e0ad) Change-Id: Ieab2d8c0e6c725d4d0048dfb57c576bcc8899ca9 Reviewed-on: http://gerrit.openafs.org/7357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2d734604f642d0e452a691bd723ce88b886489c3 Author: Jeffrey Altman Date: Sat May 5 13:50:36 2012 -0400 Windows: Remove dead code in AFSRead.cpp Reviewed-on: http://gerrit.openafs.org/7351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dbab42ca724668a8d0b0e33dd998fa9312b781d1) Change-Id: Id6ca18369babca5407af535df2cac97db2f8b8bf Reviewed-on: http://gerrit.openafs.org/7356 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4fcaa4d08e7c9eb263fde25fc08db8bc1b65e80f Author: Jeffrey Altman Date: Thu May 3 20:01:22 2012 -0400 Windows: FCB cleanup must be done before ObjectInfo When processing the cleanup and destruction of a File Control Block the related ObjectInfoCB is required for proper cleanup. Reorganize the AFSPrimaryVolumeWorkerThread logic to ensure that this is true. This involves dropping the VolumeCB->ObjectInfoTree.TreeLock around the AFSCleanupFcb() call. While the lock is released it is possible for the ObjectInfoCB->OpenReferenceCount to change. Therefore, new checks must be added after the lock is re-acquired to ensure that an in-use object is not destroyed. Reviewed-on: http://gerrit.openafs.org/7327 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f76cf9a3fb30b8c89c91ca10eaff8308cab9630a) Change-Id: I26590ca31da2b363fa9eb5f450425c42ae42f6a5 Reviewed-on: http://gerrit.openafs.org/7348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d2ce6622b81132717c80380a31074423300059cc Author: Jeffrey Altman Date: Thu May 3 19:58:31 2012 -0400 Windows: AFSInitFcb STATUS_REPARSE cleanup If a race is detected when creating a new File Control Block in AFSInitFcb() the Fcb Header must be torn down and the ExtentsResource and DirtyExtentsListLock must be deleted prior to freeing the pool memory. Reviewed-on: http://gerrit.openafs.org/7326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e691a757d6f43fa11e3b9a84cf5cbb151a8e9a3b) Change-Id: I89a7746527500892bfffa0661cc8320887a52f7a Reviewed-on: http://gerrit.openafs.org/7347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c431d39eb05bab87e75686cb5433b84ae8fbfe2b Author: Jeffrey Altman Date: Wed May 2 18:20:45 2012 -0400 Windows: cm_BkgFetch do not impose arbitrary timeout The afs redirector will queue extent requests for the entire file if it is being copied to local disk as long as there is enough page cache space to store it. If the file is 8GB and the bandwidth from the file server is 100K/second it may take a while to get to the end of the request queue. Do not arbitrarily time out the requests. Reviewed-on: http://gerrit.openafs.org/7320 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f12a20e2279dc9446a1b74217c9995e3d9fc099b) Change-Id: Ibb1da787cef20eb1ffbedd11252bae68872efbef Reviewed-on: http://gerrit.openafs.org/7346 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5130681fa2d4a35d3f0b578d92c5db1892fdfb18 Author: Jeffrey Altman Date: Wed May 2 18:05:26 2012 -0400 Windows: Treat all cached writes as write-through Treat all writes that are cached in the windows page cache as write-through requests so that they are delivered immediately to the AFS cache. The upside is that the afsd service can begin to store data to the file server immediately which can be of significant importance whe the AFSCache is larger than the file size and the file size is large and the bandwidth to the file server is slow. In that situation the entire file can be written into the windows page cache and will only be flushed to disk at the last handle close on the file. The downside is that all data will be written to the file server including that for files that will later have the delete pending flag applied. Reviewed-on: http://gerrit.openafs.org/7319 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b12a038b487a47e99700c0d51273aee37aecbfca) Change-Id: Ic02b98c321d5ab28ded9a6a97f4f181de216b7b4 Reviewed-on: http://gerrit.openafs.org/7345 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b95f16bda5f557613adc3f5a63bbab225583c0e0 Author: Jeffrey Altman Date: Wed May 2 18:04:23 2012 -0400 Windows: AFSQueueFlushExtents permit NULL AuthGroup If the AuthGroup is NULL, search for an AuthGroup to use when queuing the flush extents request. Reviewed-on: http://gerrit.openafs.org/7318 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fb70aab0e06099bbfe9b1fa388722d0b28f81a3) Change-Id: I4f9ffd4b75413a0bbdd1cfd2eb0de3f9aa0b6a4f Reviewed-on: http://gerrit.openafs.org/7344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 71b52dca2b4fb11bbc2f8f9fa6ce169df60078e1 Author: Jeffrey Altman Date: Wed May 2 18:02:28 2012 -0400 Windows: refactor AFSCleanupFcb move the checks for deleted and invalid files earlier in the function to simplify other conditional tests. Reviewed-on: http://gerrit.openafs.org/7317 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba8e60d70a74fc2c6899b29f330a5bfa59175912) Change-Id: I1094c224ae20eb5e8d248acd3f180ee61f7f57dc Reviewed-on: http://gerrit.openafs.org/7343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2154709ee2fadd8eeaf224a6153131e63c1ff59b Author: Jeffrey Altman Date: Wed May 2 18:01:31 2012 -0400 Windows: correct typos or mistaken comments Reviewed-on: http://gerrit.openafs.org/7316 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 23bec3fe9f12c0af08f03b0b9cb70add7be859ba) Change-Id: If6f09be94e224eb1b7ce51eb8e8a8fb83eef6da6 Reviewed-on: http://gerrit.openafs.org/7342 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c43a1ad5aca64586dc91cc27df6c72a69af6db45 Author: Jeffrey Altman Date: Wed May 2 17:58:39 2012 -0400 Windows: RDR_RequestFileExtentsAsync set current DV if the buffer returned from cm_GetBuffer() has an offset that is beyond the serverLength and it has a "bad" data version, set the data version to the current value. This is for debugging clarity. Reviewed-on: http://gerrit.openafs.org/7315 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f86b17ab2b9ea75dacfcb508f138256c3827655b) Change-Id: I8465581809a88f8fb7d27d9521d115312a9ff99e Reviewed-on: http://gerrit.openafs.org/7341 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 75ddd7d9fd56aca0dd173ba6040386926ab34aca Author: Jeffrey Altman Date: Wed May 2 17:52:44 2012 -0400 Windows: refactor cm_GetBuffer avoid BIOD construction Constructing a BIOD is a very expensive operation as it requires obtaining exclusive locks on each and every buffer that in the collection. The prior code would construct a BIOD for a chunk worth of buffers and then check to see if the current buffer is beyond the serverLength or the truncation position. If so, the buffer is cleared and the buffer is returned as current after releasing the BIOD. This is very wasteful. Instead, check every buffer in the BIOD to see if it should be made current or not. If yes, do so before releasing the BIOD. This permits the construction of the BIOD to be avoided for the rest of the buffers in the chunk. Reviewed-on: http://gerrit.openafs.org/7314 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a7fec07348889e9455ccec3b5028aec385b83e5f) Change-Id: Ie7dbf5191e37bba8ed5ad9aab0b840da6ccdeccc Reviewed-on: http://gerrit.openafs.org/7340 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6da62eb7b586ad48adbd7f4227a5fdd305087bfe Author: Jeffrey Altman Date: Wed May 2 17:47:46 2012 -0400 Windows: cm_InitDaemon initialize cm_bkgQueueCountp[] Reviewed-on: http://gerrit.openafs.org/7313 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6b602e59af8d360f7ca2c48734477c21a94396af) Change-Id: I2cd62154321169c553da6404f82d7fa84a1e8717 Reviewed-on: http://gerrit.openafs.org/7339 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d3d867db8fd65edf3284d2f07c4caef1d8c002a3 Author: Jeffrey Altman Date: Wed May 2 17:42:59 2012 -0400 Windows: cm_QueueBKGRequest improvements Do not add duplicate requests into the queue. Outstanding extent requests will be re-issued by the afs redirector on a periodic basis while waiting for them to be satisfied. If they are pending there is no need to remember them a second time. Use separate queues for Fetch and Store operations. Store operations might be blocked on the file server but a Fetch operation might be served from the cache. Reviewed-on: http://gerrit.openafs.org/7312 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b750d82a8460cc1bd5a5761ed160b09ac5c132f5) Change-Id: I0af9e58dca47b552ad8949a77bbe6e79fc65883b Reviewed-on: http://gerrit.openafs.org/7338 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c3fd5816caf0159278a74dfc6f4d73ac777088cb Author: Jeffrey Altman Date: Wed May 2 17:39:12 2012 -0400 Windows: buf_GetNewLocked skip redirector owned buffers If a buffer is owned by the afs redirector, regardless of whether or not it is dirty, do not use it. Reviewed-on: http://gerrit.openafs.org/7311 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce7fe9ccfbfe0fd17416758357036881d5d2b5f4) Change-Id: I560a6046f2e5dc5502c37e6e4d64c4beb424d9bb Reviewed-on: http://gerrit.openafs.org/7337 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7aedb1f9ccf0bc111ad1a3ded531e781ca8371ab Author: Jeffrey Altman Date: Wed May 2 16:57:11 2012 -0400 Windows: buf_RemoveFromRedirQueue in buf_Init use buf_RemoveFromRedirQueue in buf_Init instead of the roughly duplicated code. Reviewed-on: http://gerrit.openafs.org/7310 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcf1079f580fe1f2afa86f5e0312792817d52d2f) Change-Id: I9cad7d01cfffed473f72ebf1ec1124d0149f7cf3 Reviewed-on: http://gerrit.openafs.org/7336 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4a20c197d73e513dd30563131b140e8e64fab71b Author: Jeffrey Altman Date: Wed May 2 14:32:01 2012 -0400 Windows: AFSInitializeProcessCB failure stack exhaustion If AFSInitializeProcessCB() fails in AFSProcessCreate() it can lead to a recursive loop of AFSValidateProcessEntry() -> AFSProcessCreate() calls. Only call AFSValidateProcessEntry() if AFSInitializeProcessCB() succeeds. On failure, log an error to the trace log. Reviewed-on: http://gerrit.openafs.org/7309 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2246e7887cccd9e3d3524c3079b80b5cecaac433) Change-Id: I07807ae570d7144127a024d310f3877e039e3b51 Reviewed-on: http://gerrit.openafs.org/7335 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3cef034e00db5caca34246ef36582bf932610599 Author: Jeffrey Altman Date: Mon Apr 30 06:22:41 2012 -0400 Windows: More useful AFSDumpFile exception info Modify AFSExceptionFilter to accept the __FUNCTION__ name where the exception occurred. Generate the trace dump file after the exception has been handled so that it is possible to see where it happened in the trace output. Reviewed-on: http://gerrit.openafs.org/7308 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ad5916d19fe85c89db7675cac551a1e7634d5bdc) Change-Id: I58571c8488ca605fd44a38fe3babdfa4f2470e37 Reviewed-on: http://gerrit.openafs.org/7334 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c8925eea8873e62cdbe30ec3e5bc5f9b0db44d6e Author: Jeffrey Altman Date: Mon Apr 30 06:18:58 2012 -0400 Windows: VNOSERVICE error translation Translate VNOSERVICE as CM_ERROR_RETRY and not CM_ERROR_OFFLINE. Reviewed-on: http://gerrit.openafs.org/7307 Tested-by: BuildBot Tested-by: Chas Williams - CONTRACTOR Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f70a12adef9a915ada728350e0b9e1e5104f7ea7) Change-Id: Ic898f3ca80df6c8a1f28aad96046f7bc0716ed77 Reviewed-on: http://gerrit.openafs.org/7333 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f0c18d5500683ec1d173c92e845fbffc9387bf13 Author: Jeffrey Altman Date: Mon Apr 30 06:18:06 2012 -0400 Windows: VNOSERVICE message text correct message text to indicate that an rpc has not been serviced. Reviewed-on: http://gerrit.openafs.org/7306 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c87fe04a61a97d61859684d53bb2d3ef7ee65da8) Change-Id: I4adb54d6119f23a2e2c50b078f24a92ad1031891 Reviewed-on: http://gerrit.openafs.org/7332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8c3e63ef2bc14fb1fe7ca6b3ca940515b68aa504 Author: Jeffrey Altman Date: Sun Apr 29 10:31:07 2012 -0400 Windows: reorg RDR_CleanupFile to prevent lock leak RDR_CleanupFile could fail to drop a file lock if the user does not have write permission on last handle close even if the file is readonly or there were no dirty extents to be stored. The error handling would return the error immediately and skip the file lock release. This patchset changes the logic so that the user permissions are not tested if the file is located on a readonly volume or if there are no dirty extents or metadata changes to store. In addition, if there is an error, skip to unlock processing and not to function exit processing. Reviewed-on: http://gerrit.openafs.org/7292 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 50752e2f60d613fda1e70b798a72679bea5d65f8) Change-Id: I5a5eb35451749f84f6b1ba9e959f27a5eb204c79 Reviewed-on: http://gerrit.openafs.org/7331 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51c209b59004a5f5d851918ecc987e0fd764a9c8 Author: Simon Wilkinson Date: Sat Apr 21 11:25:25 2012 +0100 rx_identity: Add a super user value Add an RX identity type that can be used to represent the super user who is granted access using printed tickets. Reviewed-on: http://gerrit.openafs.org/7261 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4b63b93f24157aefa33f28c67ebea41803cc068e) Change-Id: Ibeff1ef13845070e6d7d8d22ba497ac26fdd22cd Reviewed-on: http://gerrit.openafs.org/7330 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ce1bb7b1a888eed357500b35240e5058e8ae4d83 Author: Simon Wilkinson Date: Sat Apr 21 11:24:25 2012 +0100 rx: Make identity and opaque usable with NULL vals Make it possible to have NULL values for elements of the rx_identity and rx_opaque structures. Reviewed-on: http://gerrit.openafs.org/7260 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit e1eb0fd66af158b86aec9c21cda836d84bc21c59) Change-Id: I84878aa107103b6daaa274b57a96bfd604ef18d8 Reviewed-on: http://gerrit.openafs.org/7329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit adcd6d3a153f24ffd7a6d770b2234015f4793476 Author: Simon Wilkinson Date: Fri Apr 13 14:49:59 2012 +0100 rx: Use native 64bit data counters Modify the peer, call and rpc_stats structures to use native 64 bit types for the bytesSent and bytesRcvd data counters. All of our platforms support native 64bit quantities now, so there's absolutely no value in rolling our own. Reviewed-on: http://gerrit.openafs.org/7205 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8e62ddaa3706319b425327b9516c91290274590a) Change-Id: Iaca75af5a754d1c69fc378b07a8dd41e9d383c51 Reviewed-on: http://gerrit.openafs.org/7328 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 64854176282bc3fe596eca534fc23b8d464b72a1 Author: Jeffrey Altman Date: Sun Apr 29 10:40:31 2012 -0400 Windows: Cc FileObject Settings Modify the assigned CcSetReadAheadGranularity() from 64K to the afsd_service configured chunk size. Assign a CcSetDirtyPageThreshold() to be twice the configured chunk size. Reviewed-on: http://gerrit.openafs.org/7294 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 07ff10c7fc194ee503b52691da000ab2c69d0fb1) Change-Id: Ia138445cc0298dca5c63c07e79137ff9e6c632da Reviewed-on: http://gerrit.openafs.org/7300 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 30bc159a439769159d28a90161d67157a5aa131b Author: Jeffrey Altman Date: Sun Apr 29 10:37:35 2012 -0400 Windows: correct cm_Analyze log message A VNOSERVICE log message takes three parameters and not one. Use the correct log macro. Reviewed-on: http://gerrit.openafs.org/7293 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cf0d53b06a42a21238f13d65feb8e5ebf602da4d) Change-Id: I1d3a1c8e510cb63d3889ba064846c7e001348de7 Reviewed-on: http://gerrit.openafs.org/7299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7e305deb852dd0a38259b24e4189dc0333c04f23 Author: Jeffrey Altman Date: Fri Apr 27 08:54:56 2012 -0400 Windows: remove unnecessary libs from aklog/asetkey Unnecessary lwp libs were linked into the aklog/asetkey binaries on Windows. lwp and pthread should not be mixed. Reviewed-on: http://gerrit.openafs.org/7289 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a400f2a8a0732db57d725a8629ba869ed71caf9f) Change-Id: I9a2c0946fff940a304e895f1af63e8781d149dc7 Reviewed-on: http://gerrit.openafs.org/7298 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 05aab6fe12015b6401f3ebbe8ec2fcd2d0e01494 Author: Jeffrey Altman Date: Wed Apr 25 20:16:22 2012 -0400 Windows: Remove High Security Integrated Logon High security mode for integrated logon never was high security. It use was deprecated in the 1.5 series and it has no use at all in the afs redirector world. Remove it. FIXES: 21702 Reviewed-on: http://gerrit.openafs.org/7285 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2a83f03100deae0f13c255e41ab849d172859971) Change-Id: I3ec21ca5c7aa57cc9295aab84d4944185d50a8bd Reviewed-on: http://gerrit.openafs.org/7297 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ca477741fddc39c529d4e10d4654a2580caa1b7c Author: Jeffrey Altman Date: Wed Apr 25 18:05:01 2012 -0400 Windows: fs getcacheparms The get cache params output is supposed to include two values: . the size of the cache . the size of the cache in use Windows no longer has a concept of an unused cache buffer. All buffers are inserted onto the freelist and are available for recycling when the AFSCache file is created. Instead of reporting the used cache space as 0K, report it as the full cache in use. It is likely to disturb users less. Reviewed-on: http://gerrit.openafs.org/7284 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7d0a0b66cca5dfd7f9c42032393632abadb1aa76) Change-Id: I4ef3e27201505a18c1e841a7b10db43530fcfcf0 Reviewed-on: http://gerrit.openafs.org/7296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6be1fd0d8caa419131daccdd554d5b72d94e21cb Author: Jeffrey Altman Date: Tue Apr 24 15:41:39 2012 -0400 Windows: AFSValidateEntry CcPurge on DV change The variable bPurgeExtents was not being set when a DV change was detected in AFSValidateEntry(). This resulted in the purge being skipped and old data being left in the cache. Reviewed-on: http://gerrit.openafs.org/7280 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 229131ab12d3c62a650ebff8c97acd5778f5bca1) Change-Id: I71a9f2ceab512f478d1750eee07d35304ac18d0b Reviewed-on: http://gerrit.openafs.org/7283 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 97e5ce37e2a481dc5f64d0d3684c540ff8c12e84 Author: Jeffrey Altman Date: Mon Apr 23 20:18:20 2012 -0400 Windows: Directory validation should purge data changes immediately During AFSEnumerateDirectory() and AFSVerifyDirectoryContent() calls use AFSPerformObjectInvalidate() instead of AFSInvalidateObject() to trigger the data purge. This is necessary to avoid a race as AFSInvalidateObject() will queue a work request that will be performed after the metadata is updated. Reviewed-on: http://gerrit.openafs.org/7279 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d4c9cbc75edd632bd5bf22042c6502d03dda2d9c) Change-Id: I46f11e9716874e3d6121ea8e5e6e448dcf575f6d Reviewed-on: http://gerrit.openafs.org/7282 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ad16c3ecdddc4c4e2e61169c2998de7a5f3777d0 Author: Jeffrey Altman Date: Mon Apr 23 20:08:47 2012 -0400 Windows: Flag purge on close if CcPurgeCacheSection fails CcPurgeCacheSection can fail. If it does, remember that the purge still needs to be performed by setting the AFS_FCB_FLAG_PURGE_ON_CLOSE flag on the File Control Block. Reviewed-on: http://gerrit.openafs.org/7278 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 76f2e07fd039e0175540ae0ca3330a4bec86e1fe) Change-Id: I9a194a0a8e79d59ec743186a414c6aa5215c0c68 Reviewed-on: http://gerrit.openafs.org/7281 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 397aaa3cb3cc0519c7aaf6332c58829e556e313f Author: Jeffrey Altman Date: Sun Apr 22 23:34:48 2012 -0400 Windows: Version 1.1.1100 (1.1.11) Change-Id: I64341254c3d0ef501fb3e382f037c66b79ff2efd Reviewed-on: http://gerrit.openafs.org/7272 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 40a434c5109578e8a87225e3432973874b626db8 Author: Jeffrey Altman Date: Sun Apr 22 23:33:59 2012 -0400 Windows: 1.7.11 Change Log Change-Id: I5f29896e7f502f453cdc84feee6ab47e6397f7a4 Reviewed-on: http://gerrit.openafs.org/7271 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 46c62bc282c8e58c66231584caa2622fd7675c48 Author: Jeffrey Altman Date: Thu Apr 19 07:14:16 2012 -0400 Windows: Add global root to name array if share name If the share name was resolved by querying the service instead of finding the entry in the root.afs root directory, construct a name array in AFSParseName() that includes the AFSGlobalRoot above the resolved share root directory. In AFSBackupEntry, check for the case where two volume root entries appear in sequence without an intervening mount point. Reviewed-on: http://gerrit.openafs.org/7252 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 749cb03e3c4b95c19803fc718d59ba79e8f8292f) Change-Id: Ie5ab8f4b8ac9104b27169637059ef91bfc9a7fcd Reviewed-on: http://gerrit.openafs.org/7269 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 580cfb8a3f80058c8bbee8d8cb00f865451b181a Author: Jeffrey Altman Date: Thu Apr 19 05:14:51 2012 -0400 Windows: cm_ResetACLCache handle NULL cellp It is valid for the cellp parameter to be NULL. When invalidating all ACLs for a user pass 0 to cm_EAccesClearUserEntries(). FIXES 130704 Reviewed-on: http://gerrit.openafs.org/7251 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9dce9e2461d7b375c0ff4caaf400a6b448322e74) Change-Id: If8a780667bee2147e95f594a6d6518049200e8e8 Reviewed-on: http://gerrit.openafs.org/7268 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 28da7e9ce8c160429e0f42823ed12b9a9f4a0cd4 Author: Jeffrey Altman Date: Wed Apr 18 17:26:00 2012 -0400 Windows: reverse order of EACCESS and USER locks The user lock is obtain while holding the eaccess lock. Reflect it in the hierarchy. Reviewed-on: http://gerrit.openafs.org/7247 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d55a767287d7f0ae1b3a018f3cb7b2a6730ebafa) Change-Id: I779be8074cd55f303f85db4fcd066f9881d2af28 Reviewed-on: http://gerrit.openafs.org/7267 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 600b5002b45d83c6421c4e82c433c90690fb66a1 Author: Jeffrey Altman Date: Mon Apr 16 22:09:40 2012 -0400 Windows: Version 1.7.10 (1.7.1000) Change-Id: I0f7dd0333cb059b681d8ad0f907aad5d95a8afac Reviewed-on: http://gerrit.openafs.org/7230 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4bdf2f633ba19b8cfcd0dda2bbb593635cf729b4 Author: Jeffrey Altman Date: Mon Apr 16 22:08:46 2012 -0400 Windows: 1.7.10 change log Change-Id: I86963e63f1d78c39444541d217eda5fcaef31599 Reviewed-on: http://gerrit.openafs.org/7229 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d355eb025d3f257c4b20ab4e21d1edfa5853d716 Author: Jeffrey Altman Date: Mon Apr 16 15:22:35 2012 -0400 Windows: Drop Fcb Resource across SetEOF and SetAllocation If the file size or allocation is being altered, we must hold the PagingResource and drop the Fcb Resource. Dropping the Fcb resource is necessary to avoid a deadlock with TrendMicro's filter if the size is set to zero and acquiring the PagingResource is necessary to prevent races now that the Fcb Resource is no longer held. Reviewed-on: http://gerrit.openafs.org/7224 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0ac28aa703459df60e9f18348fb1d4f73d5c042c) Change-Id: I51aa94511a003efd7135dad5f2457c267ecfc9a5 Reviewed-on: http://gerrit.openafs.org/7228 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b49885e18ca994f9fdcbc1809d7c522b367dee8d Author: Jeffrey Altman Date: Mon Apr 16 14:47:38 2012 -0400 Windows: Hold PagingResource across ExtendingWrite When the file allocation size changes the PagingResource must be held exclusively to prevent races. Reviewed-on: http://gerrit.openafs.org/7223 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd161ec0e474485c6a1a43019b802e3b663098df) Change-Id: I134f7250b8c81c0ec5d908c67db81a871d7e96e5 Reviewed-on: http://gerrit.openafs.org/7227 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d88b42e0b40dac2b185203281251c7ff8a6479c0 Author: Peter Scott Date: Mon Apr 16 12:25:01 2012 -0400 Windows: AFSProcessOverwriteSupersede CcSetFileSizes Instead of calling CcPurgeCacheSection() in AFSProcessOverwriteSupersede() as part of the file length truncation to zero, call CcSetFileSizes(). Wait to call CcSetFileSizes() until after the Fcb->Resource has been dropped but while the Fcb->Header.PagingIoResource is still held. Make sure that file sizes are restored in the Fcb->Header if the afsd_service rejects the file update. Reviewed-on: http://gerrit.openafs.org/7220 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8e1490f5799f0a307760047a133aade806b32afc) Change-Id: I259c6b1f27fbadb8cbbf8702fa9db75fa8b14bb3 Reviewed-on: http://gerrit.openafs.org/7226 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 20bb041d194459bc5f55db52ffa75ec184cea696 Author: Simon Wilkinson Date: Fri Apr 13 19:14:44 2012 +0100 rx: Remove surplus call to FindPeer When stats are enabled, rxi_ReadPacket calls FindPeer immediately the packet is received from the wire. The peer structure that it gets is used solely to increment a counter, and then thrown away. Given that FindPeer requires a lock, and a hash lookup, this is really inefficent. Instead, delay the compilation of statistics until rxi_ReceivePacket. Call FindPeer for version and debug packets which have no associated connection otherwise wait until we have found the packet's connection, and use the peer which is linked from there. Reviewed-on: http://gerrit.openafs.org/7206 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a3ff62857cb76e403c11a27a250aa3c79d66ebb6) Change-Id: I1344dac9d2391b6254bba7c1ded8f344010538a5 Reviewed-on: http://gerrit.openafs.org/7222 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9c3125e94a5d95ec560327cc217491681db24556 Author: Andrew Deason Date: Thu Mar 29 10:30:47 2012 -0500 rx: dec rx_nWaiting on clearing RX_CALL_WAIT_PROC Currently, a couple of callers (rxi_ResetCall, and rxi_AttachServerProc) will decrement rx_nWaiting only if RX_CALL_WAIT_PROC is set for a call, and the call is on a queue (presumably rx_incomingCallQueue). This can cause an imbalance in rx_nWaiting if these code paths are reached when, in another thread, rx_GetCall has removed the call from its queue, but it has not yet cleared RX_CALL_WAIT_PROC (this can happen while it is waiting for call->lock). In this situation, rx_GetCall will remove the call from its queue, wait, and e.g. rxi_ResetCall will clear RX_CALL_WAIT_PROC; neither will decrement rx_nWaiting. This is possible if a new call is started on a call channel with an extant call that is waiting for a thread; we will rxi_ResetCall in rxi_ReceivePacket, but rx_GetCall may be running at the same time. This race may also be possible via rxi_AttachServerProc via rxi_UpdatePeerReach -> TryAttach -> rxi_AttachServerProc while rx_GetCall is running, but I'm not sure. To avoid this, decrement rx_nWaiting based on RX_CALL_WAIT_PROC alone, regardless of whether or not the call is on a queue. This mirrors the incrementing rx_nWaiting behavior, where rx_nWaiting is only incremented if RX_CALL_WAIT_PROC is unset for a call, so this should guarantee that rx_nWaiting does not become unbalanced. Reviewed-on: http://gerrit.openafs.org/6986 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 660720d1f54a867e21f78b6ec4c024235e4c37b7) Change-Id: I374190636ca97e29c4743d9a42eb3f1e68c264a5 Reviewed-on: http://gerrit.openafs.org/7221 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2e4646f8b3d4314fad8ee66a1e558b586c79ffd6 Author: Jeffrey Altman Date: Sun Apr 15 17:40:03 2012 -0400 rx: conn_call_lock leak In rxi_ReceivePacket, if the packet is for a client connection and there is no call allocated, the conn->conn_call_lock was leaked. Introduced by 95c38dff3740d7e24971ceb5875c06e7abfce102. Reviewed-on: http://gerrit.openafs.org/7218 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6a9b0d8c56ab80bdcc8d4e2d0b28a606837141cc) Change-Id: Ic7ec7c1edb4afdaf478d64c7220c0cd0a9f3de30 Reviewed-on: http://gerrit.openafs.org/7219 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d258e0f6c69e6a06da4ce1f6021712ef2bbdecb1 Author: Jason Edgecombe Date: Sun Apr 8 12:10:58 2012 -0400 DOC: Factored common text out of the vos_backup and vos_dump man pages Change-Id: I84bd722834297778ab2e719996b2f8528d8706d6 Reviewed-on: http://gerrit.openafs.org/7126 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f26330904607c6c939c037587b473644deea669d) Reviewed-on: http://gerrit.openafs.org/7217 commit 9f298ea19909ae3761e8f5e12d16b0e07a2f02d1 Author: Jeffrey Altman Date: Sat Apr 14 09:43:48 2012 -0400 Windows: pioctl use GetFileAttributes Instead of attempting to CreateFile(OPEN_EXISTING) the _._AFS_IOCTL_._ file, try using GetFileAttributes() to obtain the attributes of the file. The file doesn't exist in the directory listing but the afs redirector and the afs smb server will respond to the request. Perhaps the SMB servers in the broken printers will fail it. Reviewed-on: http://gerrit.openafs.org/7210 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41) Change-Id: I438416c3166beaca965fc3c07e7f279c2a78a95e Reviewed-on: http://gerrit.openafs.org/7216 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 796b0edcf93abb3e1a9a2e440a687146539e34aa Author: Jeffrey Altman Date: Sat Apr 14 11:06:58 2012 -0400 Windows: _._AFS_IOCTL_._ hidden and system Query file attributes returned only the system attribute and not the hidden attribute. Must return both. Reviewed-on: http://gerrit.openafs.org/7209 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 718a6a0c464e1c2f477acbe48770c2297720a57d) Change-Id: If575ed10f476416e925a5c9afc33adbf77edc00e Reviewed-on: http://gerrit.openafs.org/7215 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1ad5659643537e2f24f108ad2a32d459f137d706 Author: Jeffrey Altman Date: Fri Apr 13 23:16:56 2012 -0400 Windows: Remove PurgeContent param AFSVerifyEntry When verifying a directory entry we must update the metadata for a file therefore we must also purge the data if the version number changed. This is not optional. Reviewed-on: http://gerrit.openafs.org/7208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3cdfdc4792444c54a36341b6a8a66ae1a8085cec) Change-Id: Id808b5b3fc441eb7fb94d7652f6695b5fc57c903 Reviewed-on: http://gerrit.openafs.org/7214 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f3327a2905bd6a7858c7ac4a135344acf93d3de4 Author: Jeffrey Altman Date: Fri Apr 13 20:17:48 2012 -0400 Windows: Flush data and then drop locks The redirector must flush the data to the file server and then drop the file locks. Doing it the other way creates races. Reviewed-on: http://gerrit.openafs.org/7207 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ead0a458272abe79fcca5e521b2960d90d358465) Change-Id: I6f0176b15c30cb798ca4950a41ee6ec91231aa11 Reviewed-on: http://gerrit.openafs.org/7213 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1d26e9c72ee5da7afebd51434ca62ef3dfa73900 Author: Simon Wilkinson Date: Sun Jan 8 11:45:57 2012 +0000 rx: Rework code which pulls packet from recv queue Both rxi_ReadProc and rxi_FillReadVector contained copies of the same code to pull a packet out of the receive queue, and turn it into the call's currentPacket. Abstract this out into a single common function, so we're not maintaining the same code in two different places. Reviewed-on: http://gerrit.openafs.org/7195 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a187be182ce2915b68af0e318bef352d41f7715a) Change-Id: Ic6b215729e117948c5a19faa757fc33a99299573 Reviewed-on: http://gerrit.openafs.org/7212 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5fae0e26da534e1dbb54630842f033e7aca547f6 Author: Simon Wilkinson Date: Fri Jan 6 10:12:26 2012 +0000 rx: Tidy up currentPacket handling Instead of making a copy of the call->currentPacket variable in our read/write routines, reference it directly. Make it clear that currentPacket is used solely by the application thread, and remove a number of mistaken comments that suggest otherwise. Reviewed-on: http://gerrit.openafs.org/7194 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 7b45d62ec18726a49dcffe8ddbca8f446ca0bb3e) Change-Id: I3b1e3167425c43ecb1eb759b4c65069e83dd0a2b Reviewed-on: http://gerrit.openafs.org/7211 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7f87e6b68f196d17e83bafead2686362dd6004bd Author: Jeffrey Altman Date: Wed Apr 11 11:59:17 2012 -0400 Windows: missing brace in RDR_CleanupFileEntry Fix 46d76d8821f4c8476499757d509ce1a6bab764b1 Reviewed-on: http://gerrit.openafs.org/7189 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ed8b38d1d0f2e74ff7280c09afbc6fd4d2df1b23) Change-Id: Id4826bc070a264e1dd203a27ff4769e330f25093 Reviewed-on: http://gerrit.openafs.org/7193 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4377759302847530d5adf8c2aa9d201683de1c42 Author: Jeffrey Altman Date: Wed Apr 11 00:29:03 2012 -0400 Windows: Do not delete in CleanupFile if error If an error was detected when processing RDR_CleanupFileEntry() do not perform the file deletion. Just return the error as attempting the deletion could result in an exception. Reviewed-on: http://gerrit.openafs.org/7186 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 46d76d8821f4c8476499757d509ce1a6bab764b1) Change-Id: I70f70d41fb909c777b2782658e7bc761994cf8e6 Reviewed-on: http://gerrit.openafs.org/7192 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec366861fa1cb3a904bb9e2b4da95275ed3ae1fe Author: Michael Meffie Date: Tue Apr 10 16:07:37 2012 -0400 doc: distributed files are under dest Add the dest path component in the quick start guide instructions for copying files from a binary OpenAFS distribution file. Reviewed-on: http://gerrit.openafs.org/7187 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc770a5007ae16aa5477bf1748f3e0666f665781) Change-Id: I1535f153b0220438861f9a103236d426f525387f Reviewed-on: http://gerrit.openafs.org/7191 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman commit 8ac84d2764dfa233c3743db3c755732e49148890 Author: Jeffrey Altman Date: Tue Apr 10 10:17:51 2012 -0400 Windows: AFSValidateProcessEntry, ullProcessId 64-bit In AFSValidateProcessEntry(), ullProcessId is 64-bit and must be printed as an %I64X in AFSDbgLogMsg() formats. Reviewed-on: http://gerrit.openafs.org/7172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 46474374e1914fb556d38f09f50cdbbaeaa1aef0) Change-Id: I58170d56bdf4a6ed8eb9e9334cb746e260e89651 Reviewed-on: http://gerrit.openafs.org/7174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 54dfb0f4ce0985c46b434275f2ce8bd7ff810abb Author: Simon Wilkinson Date: Mon Apr 9 23:13:28 2012 +0100 roken: Add rk_getprogname to Windows mapfile Add the rk_getprogname symbol to the Windows mapfile so it can be used by roken consumers. Reviewed-on: http://gerrit.openafs.org/7139 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 7bab9649aa9d4fe467d2f0fa6df2747a97f35950) Change-Id: Id526908adf801387d8f8c3d46b115734645c3e7b Reviewed-on: http://gerrit.openafs.org/7173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 24b15378540ab0523b0ba87c5f6fc20dc2ac1ca2 Author: Simon Wilkinson Date: Sun Apr 1 12:27:04 2012 -0400 rx: Remove packet burst elements from peer struct The peer structure contains a number of elements left over from an earlier, burst based, congestion control strategy. As OpenAFS has never implemented this strategy, just remove these elements from the structure, and store 0 values for these elements in the debug packets. Reviewed-on: http://gerrit.openafs.org/7006 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3109a66fb2df8e3f2878938c5b62222e8212c0f1) Change-Id: Icf98b897fa350ddbe0d28935b61989ca3a5a19a5 Reviewed-on: http://gerrit.openafs.org/7171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2672ad1490bd0edfe8e78081c9574d6c5cf1f6bc Author: Simon Wilkinson Date: Fri Nov 25 20:51:40 2011 +0000 rx: Remove the unused packet skew code We don't (and haven't, since the release of OpenAFS) use the packet skew calculations for anything. However, maintaining them requires taking locks in some critical parts of the transmission code path. For both speed, and maintainability, reasons remove the skew code from the tree - it's in git if we ever want to go back to it. Reviewed-on: http://gerrit.openafs.org/7004 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit aa6f52584ea1aea170da578328cc35e567a5b0b4) Change-Id: I73597d58c67b483cc8f6e8b4ecc701096564da49 Reviewed-on: http://gerrit.openafs.org/7170 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d3e9fbdcf064d10dac5a9cc55cd6254b6b269780 Author: Simon Wilkinson Date: Tue Dec 6 14:06:05 2011 +0000 rx: Hide internal packet functions Hide functions in rx_packet.c which are only used by that file by making them static. Reviewed-on: http://gerrit.openafs.org/7003 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman (cherry picked from commit 84d09a831afcfa8d0971dcbe4f1fc7823cec9e10) Change-Id: I36eb56e93f13dbd2e6cfeb9b266d99b36f302234 Reviewed-on: http://gerrit.openafs.org/7169 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0f394729e0de45a5a70e662b0e0bba0438909a4 Author: Simon Wilkinson Date: Mon Dec 5 18:56:03 2011 +0000 rx: Hide struct rx_peer from the rest of the tree The peer structure is an internal RX structure, so it shouldn't be contained in public header files, or used by non-rx modules. Hide the structure definition in rx_peer.h, and convert the rx_HostOf and rx_PortOf accessors from macros into functions. This will also help with adding support for non-IPv4 addresses to RX. Reviewed-on: http://gerrit.openafs.org/7002 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9862ac0dbb72d8f5f9f894e567261e52354e0b15) Change-Id: I037682925cd6b85623d145a69b166c4532592a6c Reviewed-on: http://gerrit.openafs.org/7168 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa31fb6f57ae91dafa0a0735b88576191725a1ad Author: Simon Wilkinson Date: Thu Apr 5 15:43:23 2012 -0400 shlibafsrpc: Add additional XDR functions Export the afs_xdr_pointer and afs_xdr_u_char functions so that shlibafsauthent can make use of them. Reviewed-on: http://gerrit.openafs.org/7065 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00992c66972aeab96cca9781b02a780ab49dce23) Change-Id: I260e16b2b8b1d78e7746b016193a8dd7e600445d Reviewed-on: http://gerrit.openafs.org/7167 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ceaff3299dd24846a99b6f3021438f9148a8ba30 Author: Simon Wilkinson Date: Thu Mar 22 14:39:27 2012 +0000 libafsrpc: Export connection accessor fuctions Add various connection accessor functions to the export map file for libafsrpc so they can be used from within RX security layers. Reviewed-on: http://gerrit.openafs.org/6948 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20429272805d029de80275a4e092291be7d747e9) Change-Id: I4562782937789a48fd22caffecce6d9f96ac6c4d Reviewed-on: http://gerrit.openafs.org/7166 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2e87b81ce702668804869fbd24297fcc50ca7b1b Author: Simon Wilkinson Date: Sun Apr 1 15:40:24 2012 -0400 rxperf: Build again Fix rxperf so that it builds again Reviewed-on: http://gerrit.openafs.org/7011 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e4430d9d487b1b93717886eeb2621bbe50899838) Change-Id: I8a9d301d52d2ddcd74854a25507b792a65b54664 Reviewed-on: http://gerrit.openafs.org/7165 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0bf238c010136685a88bc16a30fa3fa350b1f839 Author: Jeffrey Altman Date: Mon Apr 9 07:18:32 2012 -0400 rx: remove peer burst elements from rx/test Subsequent patchsets will turn rx_peer into an opaque object and remove the burst elements entirely from the tree. For now remove them from rx/test Reviewed-on: http://gerrit.openafs.org/7130 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 578cdc35e645489823f322b09632fca2fd7b2c31) Change-Id: I5a3a0f6ce73e4da5d7e7b0c3bf051080102d3fd5 Reviewed-on: http://gerrit.openafs.org/7164 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62ab24bdae3a157bd94cee55810060f82b20204a Author: Simon Wilkinson Date: Wed Dec 7 18:30:00 2011 +0000 rx: rxi_AckAll isn't an event handler rxi_AckAll is coded as if it is an event handler, yet the only call site is a direct call from rx.c. So, rework the function to remove all of the event handling code, change its arguments to match, and make it static. Reviewed-on: http://gerrit.openafs.org/6999 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01a1b79288c532f99e2da52aa13262d4c0fc1f79) Change-Id: I432a0268e02ff4365ed83ed241ba639e68a48cd9 Reviewed-on: http://gerrit.openafs.org/7163 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ae7d0b1e701242a53726dccdd39f50db770ca7aa Author: Simon Wilkinson Date: Wed Dec 7 19:14:03 2011 +0000 rx: Tidy up function scope in rx.c Rework headers to more clearly indicate which functions in rx.c are considered part of the 'public' rx interface, and which are for internal use only. Move internal functions either to be static in rx.c (if they are used only within that file), or defined in rx_internal.h. Remove entirely the unused function rxi_NatKeepAliveOn() Reviewed-on: http://gerrit.openafs.org/6998 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit a20c4893670df80c15585f68d244f2f82bfa0758) Change-Id: I2c498cd77193d4d2c5956f5a66decce2ccdb91f6 Reviewed-on: http://gerrit.openafs.org/7162 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 521a8c9e33a164edc2ec206128a4ad847d4198b2 Author: Simon Wilkinson Date: Mon Nov 14 10:28:38 2011 +0000 rx: Remove trailing else from RX_KERNEL_TRACE The RX_KERNEL_TRACE ifdefs all contain a trailing else, which makes no logicial sense given the rest of the code. The only effect of this trailing else is to cause packets to not be sent when tracing is enabled, which probably isn't the desired behaviour. Reviewed-on: http://gerrit.openafs.org/7001 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 084c2c1687fda07c768837e8fd7cc0904818f977) Change-Id: Iac3430eb753684bbf2c945d0dabd03e8c8f31a0b Reviewed-on: http://gerrit.openafs.org/7161 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 393ae08b38d5c8df1c8ef8bba22cc519902afd9f Author: Simon Wilkinson Date: Sat Jun 25 18:29:27 2011 +0100 rx: Remove unused ACKHACK macro rx_globals.h had a macro called ACKHACK which at one point looks like it was used to determine whether to send an ACK or not. We now have a more sophisticate mechanism for determining this, and the old macro doesn't seem to have been used in a long time. So, remove it to avoid confusion. Reviewed-on: http://gerrit.openafs.org/7000 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2427cb000cb70cfca5b2a61d4f5f9ca54488fc55) Change-Id: I94bcdd0d16cc16630e1af7e730e1130aa17b087c Reviewed-on: http://gerrit.openafs.org/7160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f857b87ff304193e1209efb146603fdfec92f2b6 Author: Simon Wilkinson Date: Sun Apr 8 18:31:15 2012 -0400 tests: rx needs roken On Linux, the RX library has a dependency on libroken for the rk_socket function. Add this dependency to the RX tests. Reviewed-on: http://gerrit.openafs.org/7127 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 02f470e99d5853808bca532ff953c2bbc0b8176c) Change-Id: Icfcc2dd6febbf7f4a0eddd4c57486f542faed2dd Reviewed-on: http://gerrit.openafs.org/7159 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b7ed23f479e3b62f5b5005c0ab632333f311f12f Author: Simon Wilkinson Date: Fri Mar 30 19:39:51 2012 +0100 rx: Remove needless braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from the Unix CM to make clang happy. Reviewed-on: http://gerrit.openafs.org/7088 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 5e107724f3661254cfdb693ae2d4d1c5238eba7d) Change-Id: I82833f58df0fa54234a04796bee8ae464e001ac6 Reviewed-on: http://gerrit.openafs.org/7158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cb4d73b7a30eb5eaf7aaf8fcb343e6f9b07836bd Author: Simon Wilkinson Date: Fri Mar 30 19:37:36 2012 +0100 rx: Handle negative returns on packet reads rxi_RecvMsg returns an int, because it can return a negative value upon error. Don't store its return value as an unsigned int, because this may hide the potential errors. Modify the error handling loop so that errors get to where they are intended. Reviewed-on: http://gerrit.openafs.org/7087 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 438d6ba63cda7d7484c545a4fd181803e84d68eb) Change-Id: Ib877885e4ca5c2b6a580b5c9403666e2a2c02b1a Reviewed-on: http://gerrit.openafs.org/7157 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b3e2e07ef0b7784f7184b1a6f86ebb452eeb8815 Author: Simon Wilkinson Date: Thu Jan 5 10:51:06 2012 +0000 rxgen: Tidy up server side freeing The way in which rxgen handles freeing of objects allocated by the RPC stub has evolved over the years. Originally, there appears to have been a "somefrees" parameter which was used to track whether objects required freeing or not. However, this parameter has fallen in to disuse, as support for typedefs and unions were added, and which parameters require freed is now tracked within the description structures themselves. So, get rid of somefrees, as it is now just confusing. The generated code to free a set of RPC arguments currently looks something like: fail: z_xdrs->x_op = XDR_FREE; if (!xdr_string(z_xdrs, &Name, AFSNAMEMAX)) goto fail1; if (!xdr_string(z_xdrs, &OfflineMsg, AFSOPAQUEMAX)) goto fail1; if (!xdr_string(z_xdrs, &Motd, AFSOPAQUEMAX)) goto fail1; if (rx_enable_stats) { rx_RecordCallStatistics(z_call, RXAFS_STATINDEX, 19, RXAFS_NO_OF_STAT_FUNCS, 0); } return z_result; fail1: if (rx_enable_stats) { rx_RecordCallStatistics(z_call, RXAFS_STATINDEX, 19, RXAFS_NO_OF_STAT_FUNCS, 0); } return RXGEN_SS_XDRFREE; Which isn't very efficient, or easy to modify. So, change the code generator to produce code that looks like: fail: z_xdrs->x_op = XDR_FREE; if ((!xdr_string(z_xdrs, &Name, AFSNAMEMAX)) || (!xdr_string(z_xdrs, &OfflineMsg, AFSOPAQUEMAX)) || (!xdr_string(z_xdrs, &Motd, AFSOPAQUEMAX))) z_result = RXGEN_SS_XDRFREE; if (rx_enable_stats) { rx_RecordCallStatistics(z_call, RXAFS_STATINDEX, 19, RXAFS_NO_OF_STAT_FUNCS, 0); } return z_result; This does the same thing, but is easier to read and is more consistent with the way that we structure marshalling and unmarshalling. Reviewed-on: http://gerrit.openafs.org/7005 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e202822b8efd7511f8652064cd8831c0a049dce6) Change-Id: I13699150f4adf9f46c2ae26fef5af7fd72aa3756 Reviewed-on: http://gerrit.openafs.org/7156 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b77a28be66a8d2151c51fe26f61c9dd5a9496e85 Author: Simon Wilkinson Date: Sun Jan 8 11:49:53 2012 +0000 rx: Get rid of some uneccessary temporary vars rx_ReadProc and rx_ReadProc32 originally used temporary variables (which were, at one time, declared as "register") to hand optimise a couple of routines. With the removal of register throughout our code, this is no longer helpful. Reviewed-on: http://gerrit.openafs.org/6997 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e6e8e26a3d7d97f2ad056251859f258fee509e7e) Change-Id: I4d00d5b9fd3542d93f3651e4a70d2cc5fcbe6bfc Reviewed-on: http://gerrit.openafs.org/7155 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4c6116515f08febccabe5dace3c115593149b99f 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: I6a9d2dadc90340b6abcca118cc6e17942a8ca0f1 Reviewed-on: http://gerrit.openafs.org/7154 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e2673d31333b3a6eeabee976ea04a83175a4f46d Author: Andrew Deason Date: Fri Feb 3 16:06:16 2012 -0600 Rx: Add missing rx_packet.h includes We no longer include rx_packet.h from rx.h, so rx_kcommon.h was not picking up some packet-related definitions. Some files (SOLARIS/rx_knet.c, IRIX/rx_knet.c) were using packet-related defines (e.g. RX_HEADER_SIZE) while just including rx_kcommon.h. Include rx_packet.h in those files to get the relevant definitions. Reviewed-on: http://gerrit.openafs.org/6670 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 3a621a8518f96e15a08448fecdfdb0cbce6a02c2) Change-Id: I8ca3d7dcf034a5aad55f99e5efb3acdf03af0d2c Reviewed-on: http://gerrit.openafs.org/7153 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7584e4ea526ccb05bfd5ac3a72c15c0358a69f55 Author: Ben Kaduk Date: Fri Dec 2 20:24:04 2011 -0500 Remove dead code from rxi_FindIfnet() There is a separate implementation for DARWIN and XBSD above, so having a check for DARWIN here is pointless. Reviewed-on: http://gerrit.openafs.org/6193 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c22aa6c121bfbc71d5d6d4b628ee4585f4e134cf) Change-Id: I5a5f82c709a579641aadfe9f4e1c383bb7e12c17 Reviewed-on: http://gerrit.openafs.org/7152 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2355e2ec7b2aa4710104fe82f89241f6712a9bd5 Author: Jeffrey Altman Date: Tue Apr 10 01:05:14 2012 -0400 Windows: report error on panic If afsd_notifier() is called the service is going to exit(1). Report to the service manager that the service exited with an error as well. Reviewed-on: http://gerrit.openafs.org/7148 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7051672c7118b44e40a59b645f48428aabc9ee8a) Change-Id: If17d91893cf733df5317bd9543b2c0fe73d2d336 Reviewed-on: http://gerrit.openafs.org/7151 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8bd8ce586407c4032cd1d3df186cee17796b956a Author: Jeffrey Altman Date: Mon Apr 9 23:24:07 2012 -0400 Windows: correct afsredir log entries AFSVerifyEntry != AFSValidateEntry Reviewed-on: http://gerrit.openafs.org/7147 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 846cef3685edbdba9f186f595daecb5241551ec1) Change-Id: I9dfd299eda55351a8484b7b353f9fe79782392a2 Reviewed-on: http://gerrit.openafs.org/7150 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bbc85a68b027ae0901a1702873a6d8e1abf94721 Author: Jeffrey Altman Date: Mon Apr 9 18:41:13 2012 -0400 Windows: Refactor AFSValidateEntry Refactor AFSValidateEntry to avoid obtaining the ObjectInformation->Fcb->Resource when it isn't necessary. This will avoid contention and improve performance. The only time that the Fcb->Resource is required is when the object requires verification, the object is a FILE, and the object was successfully evaluated. Even with this reorganization there is a small window of opportunity for a deadlock to occur if a CcPurgeCacheSection() which is called with the Fcb->Resource held triggers a filter driver to issue a CreateFile and in between the two operations an invalidate object is received. Reviewed-on: http://gerrit.openafs.org/7143 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 779c27bf1daaf01c79c0bb7c687781151abb4383) Change-Id: I401167eea36f946f61cb9af6aafaa8f4bcc817a9 Reviewed-on: http://gerrit.openafs.org/7149 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 41c1c91e2e481d205fa11b5815b7e66fd606da62 Author: Jeffrey Altman Date: Fri Apr 6 23:30:11 2012 -0400 Windows: Version 1.7.9 Change-Id: Ib9dda2dab4b61bf6fdee2397e2aa85a935255b5d Reviewed-on: http://gerrit.openafs.org/7114 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 37b4078c2989dc31b50f091a0f9b4abda72bd345 Author: Jeffrey Altman Date: Fri Apr 6 23:29:20 2012 -0400 Windows: 1.7.9 ChangeLog Change-Id: I7c5412f465a8fac0e0dde880a1b097948c1e7c85 Reviewed-on: http://gerrit.openafs.org/7113 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f52fe0d55cef059aaa66e2001458683459c043c Author: Jeffrey Altman Date: Fri Apr 6 22:30:41 2012 -0400 Windows: Disk Full errors instead of Quota Exceeded The AFS Redirector does not support the Windows quota interface therefore return STATUS_DISK_FULL for all over quota conditions. Change-Id: Idd8755b26ab65e423330eeb6cb0e1806dd6306c9 Reviewed-on: http://gerrit.openafs.org/7111 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8648a8c45b593dce8982deec41e3caf48e80dc0c) Reviewed-on: http://gerrit.openafs.org/7112 commit 9cbdd93324a54fd0616da4cb6d39b2488f813f40 Author: Jeffrey Altman Date: Fri Apr 6 22:18:59 2012 -0400 Windows: AFSCheckCellName one level of indirection The parameter 'CellName' is a UNICODE_STRING *. No need to take the pointer of it to pass to AFSDbgLogMsg(). Change-Id: Id49f95058541a1a0ddaa0db9cb2c5ef0e5a32c64 Reviewed-on: http://gerrit.openafs.org/7109 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 85fad9a69f0d3df73ec8285722e788fe49ae9459) Reviewed-on: http://gerrit.openafs.org/7110 commit 4c82175368f9990552677fe896213843862de951 Author: Jeffrey Altman Date: Thu Apr 5 07:38:47 2012 -0400 Windows: CleanACLEnt requires cm_scache write locked Therefore, cm_FindACLCache() must be called with the cm_scache_t write-locked and therefore cm_HaveAccessRights() must obtain a write-lock and not a read-lock on 'aclScp'. Reviewed-on: http://gerrit.openafs.org/7049 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c1ef200a76b334309b0202c70165374305beb8fb) Change-Id: I53fa9575342322fd412229612b0e10dd07fdea54 Reviewed-on: http://gerrit.openafs.org/7064 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 121d0d6b1554a980991392eb0a8a2d2541b5e341 Author: Jeffrey Altman Date: Mon Apr 2 18:10:07 2012 -0400 Windows: Name Array store mount point and volume root Modify the Name Array processing to store both the mount point object and the volume root directory object in the array. This is necessary for proper operation of AFSPopulateNameArrayFromRelatedArray when the DirectoryCB parameter is a mount point object. Modify AFSBackupEntry to remove two entries if a volume root directory entry is being removed. Remove AFSReplaceCurrentElement() as it is no longer used. Reviewed-on: http://gerrit.openafs.org/7021 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3db44bacd4b3ac3b9ed63bcf671b03f7f7eeb8af) Change-Id: I66711639c41515c0b6ae6cd6263d45457fa668d0 Reviewed-on: http://gerrit.openafs.org/7063 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 62d7ce57d57d57e21abf3535c42eb51e0e8248d7 Author: Jeffrey Altman Date: Mon Apr 2 07:10:17 2012 -0400 Windows: do not call time() in a loop When checking for ACL Entry expiration, obtain the current time once per call to cm_FindACLCache() instead of once per ACL entry. Reviewed-on: http://gerrit.openafs.org/7016 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 048b24ae2b8accb33bc92ab9fdc4cdda14bc425b) Change-Id: I9954acea73cae20befa771ce430492c2396e8326 Reviewed-on: http://gerrit.openafs.org/7062 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 658f17df92286ee830df675311f8842846ff0882 Author: Jeffrey Altman Date: Sun Apr 1 01:17:21 2012 -0400 Windows: Add per object per user EACCES caching If a cache manager is told by a file server that the user does not have permission to fetch status for an object, the cache manager must avoid requesting a fetch status a second time for that object for the same user. Doing so risks triggering the rx call abort throttling which can have a significant impact on end user usability of the Explorer Shell and other applications. The cache manager cannot make a decision on whether or not to issue an RXAFS_FetchStatus RPC based upon the type of the object because the type is unknown to the cache manager. A file server will succeed a FetchStatus request when the parent directory ACL grants lookup permission if the object in question is the directory or is a symlink/mountpoint. Only file objects require read/write permissions to obtain status information. The rx call abort throttling is broken is many ways and must be avoided. Call aborts are tracked by call channel and occur whenever ten call aborts are issued on the same call channel in a row regardless of the amount of time that has elapsed. The EACCES cache works by storing EACCES events by the FID and User for which the event occurred, when it occurred and the FID of the parent directory. By definition, the parent FID of a volume root directory is itself. Entries are removed from the cache under the following circumstances: 1. When the parent FID's callback expires or is replaced. 2. When the parent FID's cm_scache object is recycled. 3. When the user's tokens expire or are replaced. Entries are not removed when the FID's cm_scache object is recycled. This patchset also implements correct behavior if the VLF_DFSFILESET flag is set on a volume. Reviewed-on: http://gerrit.openafs.org/6996 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7c5b8346b305911c981620fff70503008e9cf488) Change-Id: Iaba693d2c3d8e4e8734dc600ade7f886211d9ebc Reviewed-on: http://gerrit.openafs.org/7061 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d1fee15c697f0cb47133dd40ff15691cff94cd9 Author: Jeffrey Altman Date: Mon Apr 2 13:41:27 2012 -0400 Windows: Fail recursive path evaluation with access denied Matching the behavior of the AFS SMB server, the afs redirector should return STATUS_ACCESS_DENIED if File ID recursion is detected in the Name Array for any given path. Reviewed-on: http://gerrit.openafs.org/7018 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4c5819e22852afe4e83bdcd05268864ac1953a8c) Change-Id: Ib9c835e552e2aeb3bba402ca8d8ab537d507f91b Reviewed-on: http://gerrit.openafs.org/7060 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 89f707fc32447414ba5373dc7f746b59b6a68266 Author: Jeffrey Altman Date: Thu Apr 5 23:14:18 2012 -0400 Windows: Check Avail Space on extending SetEndOfFile When cm_SetLength() is called with an extending file length, check the available free space in the volume to see if the new length will fit. If not, return CM_ERROR_SPACE. This permits applications to discover that there is insufficient space prior to writing all of the data into the windows page cache at which point it will be too late. There is still the possibility of a race that can result in data loss if two applications are writing into the same volume at the same time and there is insufficient room. Reviewed-on: http://gerrit.openafs.org/7057 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3d024372293a279cf3a6cbdfe75a384ec7c8b200) Change-Id: I88a41bb57cafa495147d4b891c76d174e1d748de Reviewed-on: http://gerrit.openafs.org/7059 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 378e447e23a78a6bd60eb937b6be87d3a24d5988 Author: Jeffrey Altman Date: Thu Apr 5 00:11:11 2012 -0400 Windows: AFSVerifyEntry purge file data on DV change If the data version change is detected during AFSVerifyEntry(), treat it the same as if the AFS_OBJECT_FLAGS_VERIFY_DATA flag had been previous set. Purge the old data from the Windows file cache. Be sure to set the new metadata after the purge so that if the file length was truncated the old data beyond the truncation point will still be purged. Reviewed-on: http://gerrit.openafs.org/7048 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba3ba96976f17cb5e83fae1e0a42fd6564b75719) Change-Id: I27b50904e4dbdfdeb414245e985206b0bbc79f40 Reviewed-on: http://gerrit.openafs.org/7058 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c9f7546c0e8f2962c4d26932a3515391e86942c2 Author: Jeffrey Altman Date: Thu Apr 5 14:40:18 2012 -0400 Windows: Redirector must query volume size when asked The volume size and free space cannot be obtained at volume initialization and then re-used for all FileFsSizeInformation and FileFsFullSizeInformation queries. Doing so prevents Windows from being able to see changes in the available free space. The maximum size of the volume is not the size of the partition and the available space on the partition unless there is no quota applied to the volume. If there is a quota, then the free space is the smaller of the available quota and the available partition space. Add a new ioctl request to permit the redirector to query the current Volume Size Information details. Reviewed-on: http://gerrit.openafs.org/7052 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c19d1b875fab472dc7474c70529ab7fc2f7bf106) Change-Id: I98ea5e21c2b9d0f1041c68e4cfe9156c94b3d639 Reviewed-on: http://gerrit.openafs.org/7056 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9ba711d59119b62535db51b14eb791995f8c2151 Author: Jeffrey Altman Date: Thu Apr 5 17:00:28 2012 -0400 Windows: cm_AddACLCache lock ordering cm_aclLock must be obtained after cm_user_t mx and cm_cellLock. cm_user_t mx must be obtained before cm_cellLock. Reviewed-on: http://gerrit.openafs.org/7051 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7881de8cc17924120e45e498add1adc63fd85e5c) Change-Id: Id1f9ad94cd133f7a95bdafd630991b0cf3b5fdec Reviewed-on: http://gerrit.openafs.org/7055 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fd66b18119191723970a2c987c5911d2b1d10ec1 Author: Jeffrey Altman Date: Thu Apr 5 17:16:15 2012 -0400 rx: fix bad merge 95c38dff3740d7e24971ceb5875c06e7abfce102 An extra CALL_HOLD(call, RX_CALL_REFCOUNT_BEGIN) was added in rx_NewCall(). Revert it. Reviewed-on: http://gerrit.openafs.org/7050 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ea82d1014372383334fd05c01db135da870d3928) Change-Id: I80c58fd66b48fed93480bd73e209301dbc20b52b Reviewed-on: http://gerrit.openafs.org/7053 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 50c367909e538060e7df6125b0a437e67f1cba26 Author: Jeffrey Altman Date: Sun Apr 1 23:09:32 2012 -0400 Windows: Redirector Dir Enumeration Bug An enumerated directory was not validated properly if AFSValidateEntry() was called with PurgeData == FALSE even when a data version change was detected. Now it does. FIXES 130636 Change-Id: Ic5d2fd62b40fb16652fc09d459caf43905566d37 Reviewed-on: http://gerrit.openafs.org/7012 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e53e189c3e99e28d31e0e1d1b52041aadcbd3ffa) Reviewed-on: http://gerrit.openafs.org/7044 Tested-by: BuildBot commit 560e8de9c6cea0d04709e7206d03daf4973e97d2 Author: Jeffrey Altman Date: Tue Apr 3 09:09:42 2012 -0400 Windows: cm_GetNewSCache must return NULL on failure cm_GetNewSCache was leaking a valid cm_scache_t pointer in some failure cases. On failure, explicitly set the return value to NULL. Reviewed-on: http://gerrit.openafs.org/7037 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e1eba145843996ce50eae79356a3f88b92a2ea86) Change-Id: I38621995a5b664cea35ef51e8536186be58d4079 Reviewed-on: http://gerrit.openafs.org/7041 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef0323f4224f3dc024f57835e5e37b9d284e845c Author: Jeffrey Altman Date: Thu Jan 12 09:31:43 2012 -0500 Rx: give grow mtu its own call ref count type Reviewed-on: http://gerrit.openafs.org/6543 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit e3a50ea0d314df4e8caf0e25c57042a5f2a6e008) Change-Id: I5339ba13c199a618db13230fa4212f67784080bf Reviewed-on: http://gerrit.openafs.org/7040 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 398303bed581bfca13e249bad0752bf761555727 Author: Jeffrey Altman Date: Sun Jan 29 13:52:17 2012 -0500 rx: conn->callNumber protected by conn_call_lock The conn->callNumber array should be protected by the conn_call_lock since the conn_call_lock is what protects the binding of calls to connection channels. Reviewed-on: http://gerrit.openafs.org/6629 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman (cherry picked from commit 95c38dff3740d7e24971ceb5875c06e7abfce102) Change-Id: I8aaae06e6f8c500c7855d8e2bde923137e7b73be Reviewed-on: http://gerrit.openafs.org/7039 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0349edb9f4fc617b8bb3f2c504d341518fdf25f7 Author: Jeffrey Altman Date: Fri Jan 20 01:50:01 2012 -0500 Rx: rxi_FreeCall conn_call_lock vs call->lock deadlock The conn->conn_call_lock is held before call->lock in the lock hierarchy which is violated within rxi_FreeCall(). While the deadlock is rare, it is possible and has been experienced on both Windows and Linux. Change the signature of rxi_FreeCall to return 1 if it frees the call and 0 if it does not. Due to the lock hierarchy violation use MUTEX_TRYENTER() to attempt to obtain the conn->conn_call_lock. If the lock cannot be obtained set the call state to dally and return. If the conn_call_lock can be obtained, behave as we did before this patchset. Only increment the callNumber if the original call->state was dally or hold and the conn_call_lock could be obtained. We must not increment the callNumber otherwise. Doing so can result in call numbers being skipped when the conn->call slot is reused. Reviewed-on: http://gerrit.openafs.org/6443 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 33185db16aca40a3bdbcb66caf994924220b5012) Change-Id: I2b0f21dfb549eccd4b8f3b0be0a6b87d181ae726 Reviewed-on: http://gerrit.openafs.org/7038 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3a025008708d01d79397fd7067de72fc61346050 Author: Jeffrey Altman Date: Mon Apr 2 17:32:39 2012 -0400 Windows: Pass name array to AFSRetrieveFileInformation AFSRetrieveFileInformation does not parse the complete path. That information is available in the Ccb->NameArray. If the object on which AFSRetrieveFileInformation is called is a relative symlink containing ".." references, the full contents of the evaluated path is required for context. Pass the Ccb->NameArray so that it is available. Reviewed-on: http://gerrit.openafs.org/7020 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0ca4dc279a49141a63727134898c58f30ad15e8d) Change-Id: I08bbf5fdf72033f2bd16a89073f23799ad2ea436 Reviewed-on: http://gerrit.openafs.org/7036 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e2907dcaef09e9f97252be57908ef75e1aabafb4 Author: Jeffrey Altman Date: Mon Apr 2 13:39:17 2012 -0400 Windows: Use hash when comparing File IDs in redirector AFSIsEqualFid() should use the hash value included in the FileId as part of the comparison algorithm. Reviewed-on: http://gerrit.openafs.org/7017 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 766c62b918dba793f738a075918947b8dad76229) Change-Id: I7e9b38a3c945da1f69b16ba6dbfe16ba2e4d84d9 Reviewed-on: http://gerrit.openafs.org/7035 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bccceb57eab234da1198705d9f6744d528d3a5a4 Author: Jeffrey Altman Date: Mon Apr 2 06:57:53 2012 -0400 Windows FindACLCache must hold scp write locked In the SMB modules, calls to cm_FindACLCache() were not holding the cm_scache_t rwlock writed locked as required. Reviewed-on: http://gerrit.openafs.org/7015 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0896602f6e7c409990fcae40dd54f84260312472) Change-Id: I17890e739bed1e495125b1852b1249bdfd06f37c Reviewed-on: http://gerrit.openafs.org/7034 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2faf0e963f1f939d4466a94f536dfb0ca18367cd Author: Jeffrey Altman Date: Mon Apr 2 06:57:02 2012 -0400 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/7014 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 68a42ed88db3e457b6d5169c2beb8fa7bb144ea3) Change-Id: I2aad1b5c811a00a315580fe5571246ac802c6853 Reviewed-on: http://gerrit.openafs.org/7033 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8f9eebacd5902c038d832c64db2ee9f3c15da738 Author: Jeffrey Altman Date: Sun Apr 1 12:40:36 2012 -0400 Windows: Freelance HaveAccessRights Change the test in cm_HaveAccessRights related to Freelance mode. All objects in the freelance cell and root volume by definition have access rights. Reviewed-on: http://gerrit.openafs.org/7008 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b84496b8593dd9c220022c78d8b9b571c7b78e8d) Change-Id: I9741be99fc643b56180369f2bfad0a46746c013c Reviewed-on: http://gerrit.openafs.org/7032 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d923ea62aa58d7d244d62466c466ccba8af4ea31 Author: Jeffrey Altman Date: Sun Apr 1 12:11:40 2012 -0400 Windows: optimize InitCallback3 processing Do not drop and acquire locks if the cm_scache_t does not have a callback. Reviewed-on: http://gerrit.openafs.org/7007 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9a76279ef154730150594cc560a34eada3ae9fe4) Change-Id: Ibbaac9c807c8cdfb0ac37e7708011325a9757a76 Reviewed-on: http://gerrit.openafs.org/7031 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 077f9425cab1db69b27b1b05f5e67f0388900f2b Author: Jeffrey Altman Date: Fri Mar 30 15:13:55 2012 -0400 Windows: Record callback issued time Save the time at which a callback was issued. This can be used in a later patchset to determine if a callback was issued after a negative access entry for a {fid,user} pair. Reviewed-on: http://gerrit.openafs.org/6995 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8fcdef55f8e422f4762f38374be32993d2b2551e) Change-Id: I26293ea93b48f3953bd79a76e4741f03237232be Reviewed-on: http://gerrit.openafs.org/7030 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 64d57ee68c0537b0ccf8246b3ea5e6a0e6f59414 Author: Jeffrey Altman Date: Fri Mar 30 14:58:11 2012 -0400 Windows: Implement cm_TGTLifeTime() cm_aclent.h defined cm_TGTLifeTime() as a macro that always returned 0x7fffffff. Implement cm_TGTLifeTime() as a function that returns the actual token lifetime. Reviewed-on: http://gerrit.openafs.org/6994 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit fd919b3ae52695b8a83fabc736c8ea82f383a5c9) Change-Id: I3adfb0ec08ee0c5ad807dc9f2cc5a3f322f62f43 Reviewed-on: http://gerrit.openafs.org/7029 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 747fc0d8581f261c9341f649ad7fadd5636fe1df Author: Jeffrey Altman Date: Fri Mar 30 12:24:43 2012 -0400 Windows: add parent FID to cm_GetSCache When a cm_scache_t object is created in 98% of the time, the parent FID is known to the cache manager. Normally the cache manager will obtain the parent info from the AFSFetchStatus structure but if the user credentials do not permit status info to be obtained from the file server the parent info will be unavailable. Having the parent directory FID is useful for debugging but can also be used to check the user's access rights on the parent directory. Reviewed-on: http://gerrit.openafs.org/6993 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cf81cd790f71b7ce83c802df8e7094f93bff63fb) Change-Id: I6f819bfee4999e84fbbb43b30af52c505813824e Reviewed-on: http://gerrit.openafs.org/7028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2e0f44e8828866e93080c19e50e57eb7d6215f94 Author: Jeffrey Altman Date: Mon Apr 2 22:35:41 2012 -0400 viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize The AFSDisk and AFSFetchVolumeStatus structures use signed 32-bit integers for representation partition size and available blocks. RoundInt64ToInt31() should be used instead of RoundInt64ToInt32() when assigning their values. Reviewed-on: http://gerrit.openafs.org/7022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3) Change-Id: I72a71e74d86d6142ecd295ef4837f61ded329e38 Reviewed-on: http://gerrit.openafs.org/7027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d0b44ce961f11a5d13d65ddbc270b4c571f1328 Author: Jeffrey Altman Date: Fri Mar 23 13:41:10 2012 -0400 rx: handle clock reversals for call timeouts If the clock is set backwards, call timeouts will not trigger until the clock regains its original value plus the timeout period. In rxi_CheckCall(), look for a backward clock shift and if one is noticed, fail the call with RX_CALL_TIMEOUT. Reviewed-on: http://gerrit.openafs.org/6943 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 223cbf5a5bc1812f3b2ce86a7b05dc56f517c6f8) Change-Id: Ieeba9cbc21da24705364af7b06ad7bfc35cb9104 Reviewed-on: http://gerrit.openafs.org/7026 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bd5c64193d8b5e9237644f8b45fb4ff5c1286da1 Author: Jeffrey Altman Date: Thu Mar 29 23:49:43 2012 -0400 Windows: avoid deadlock with Trend Micro Trend Micro's anti-virus driver attempts to open the file in response to CcPurgeCacheSection(). While processing AFSSetDispositionInfo() the Fcb->NPFcb->Resource is held which is also required if a status verification is required during the CreateFile operation. That results in a deadlock. Avoid the deadlock by setting the PENDING_DELETE flag prior to calling CcPurgeCacheSection(). Reviewed-on: http://gerrit.openafs.org/6988 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 134943a7a55d73f567d3f336e06783c405347fa7) Change-Id: I30ea9fcd8c0a1266d91bae28c749ee3ba0476ebe Reviewed-on: http://gerrit.openafs.org/6990 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit db7f4a36aa878d16c01ef0e99732032a3fc4bc5c Author: Jeffrey Altman Date: Thu Mar 29 23:39:17 2012 -0400 Windows: Use ulFilter in AFSInvalidateObject ulFilter was assigned appropriate values but it was not passed to AFSFsRtlNotifyFullReportChange as a parameter. Reviewed-on: http://gerrit.openafs.org/6987 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6cb256375bb0aab73cc802e50620f1fcf0f564e4) Change-Id: I48a1d42713489259e24b0d11e1bc5913658ff523 Reviewed-on: http://gerrit.openafs.org/6989 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 78e2332531f10d3475a473b9b1daba7d2a5da697 Author: Jeffrey Altman Date: Tue Mar 27 00:16:30 2012 -0400 Windows: ObjectInformation.ObjectReferenceCount comparison If there is an undercount of the ObjectReferenceCount, consider it the same as if the object count is zero for comparison purposes. Reviewed-on: http://gerrit.openafs.org/6970 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0bc328b9729cb5bfe3085ac01455fe82c9cef7a4) Change-Id: I4c40e61ecf1d505cacbb0fbe78fb39551549f97f Reviewed-on: http://gerrit.openafs.org/6984 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b5a8b1e1b663e6ad1a4cb1e2f77e6280005623d5 Author: Jeffrey Altman Date: Tue Mar 27 14:18:14 2012 -0400 Windows: Add Name Array Processing Trace Subsystem Reviewed-on: http://gerrit.openafs.org/6973 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Tested-by: Jeffrey Altman (cherry picked from commit 05a703a320e549efe7f68e27cfa86e391cf5839d) Change-Id: I877ff217fdb1a579e603f5da79883332cf75f1e0 Reviewed-on: http://gerrit.openafs.org/6983 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ebdd5b2f46236b7eeab3b146aa85c759d08a44d9 Author: Jeffrey Altman Date: Mon Mar 26 11:10:36 2012 -0400 Windows: AFSInvalidateObject can overwrite input param AFSInvalidateObject() must not be called with an AFSObjectInformationCB pointer variable that it is not safe to overwrite as the function sets the input value to NULL if the invalidation is going to be performed asynchronously in a worker thread. In AFSEnumerateDirectory(), the following call took place: AFSInvalidateObject( &pDirNode->ObjectInformation, AFS_INVALIDATE_DATA_VERSION); which requires a worker thread to process. As a result, the ObjectInformation pointer was being set to NULL which detached the AFSObjectInformationCB from the AFSDirectoryCB. That in turn produced an execption in AFSLocateName() which resulted in a resource not being freed that in turn produced a deadlock. Reviewed-on: http://gerrit.openafs.org/6962 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Tested-by: Jeffrey Altman (cherry picked from commit 32ad50bcee9a5b087bea7e0c9c1cfe3d1e58293e) Change-Id: I8a8c2292f18ddb2f25162e86592a3b51e413bebb Reviewed-on: http://gerrit.openafs.org/6982 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e0b43bb475e59201f8da30d8d9f34ba684e632d3 Author: Jeffrey Altman Date: Sun Mar 25 21:29:40 2012 -0400 windows: ObjectInformationCB.ObjectReferenceCount The ObjectInformationCB.ObjectReferenceCount is protected by the VolumeCB->ObjectInfoTree.TreeLock. When the TreeLock is dropped the reference count can change. Hold the TreeLock across both ObjectReferenceCount == 0 tests and the associated tear down or repeat the ObjectReferenceCount == 0 test after the TreeLock is reacquired. Reviewed-on: http://gerrit.openafs.org/6959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f7bea476c7f6e8489372e138dc60ebcdd92c40c1) Change-Id: Ie44c8c8f47d33f87234566565592f0a5afa67ece Reviewed-on: http://gerrit.openafs.org/6981 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5dec6f26695f385a091971359ce2ffeed2bec1fd Author: Jeffrey Altman Date: Mon Mar 26 20:49:03 2012 -0400 Windows: CreateProcessNotify verify changes PsSetCreateProcessNotifyRoutineEx will fail with STATUS_ACCESS_DENIED if the driver does not have the IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY bit set in the image header. Do not include the ParentProcessId in the AFSProceSSDestroy parameter list. It isn't available to use and isn't used for anything in any case. Assign AFSProcessCB blocks to processes that were created before AFSRedirector registered the CreateProcessNotify callback and access the file system. Reviewed-on: http://gerrit.openafs.org/6967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5b4e0e3c2eb161eabbb7a9ea8486315040e9705a) Change-Id: I6d6a4e2f11e234d9001f41a85db921e4a671854d Reviewed-on: http://gerrit.openafs.org/6977 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1daa2f763d5fa4abc1ae6457ff0236ebbb3494d9 Author: Jeffrey Altman Date: Tue Mar 27 00:00:30 2012 -0400 Windows: Fix VNOSERVICE EventLog parameters Add missing volume and cell. Reviewed-on: http://gerrit.openafs.org/6969 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d1d51852be1daf45f92a8cbf5f294892141108f2) Change-Id: I987b45b5521baad163270a1116dbb247c180d365 Reviewed-on: http://gerrit.openafs.org/6976 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f30cc094a6cb78fdfef9b2ee4c12eb194742fe50 Author: Jeffrey Altman Date: Mon Mar 19 22:38:06 2012 -0400 Windows: Assign AuthGroup during Process Create As the process is being created, assign the AuthGroup so that the must up to date information is used to assign AuthGroup inheritance from Impersonation states and to prevent the parent process from being destroyed before the AuthGroup is determined. Reviewed-on: http://gerrit.openafs.org/6927 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a0a1ad06c2dd632e3e471e5f40ff3eda470bf71a) Change-Id: If5698ef49ecc7e359d411d56c73e20143f8c152a Reviewed-on: http://gerrit.openafs.org/6956 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6ab902ef6a56d14d506f7ea004d8240408080f0f Author: Jeffrey Altman Date: Mon Mar 19 21:10:31 2012 -0400 Windows: Refactor AFSProcessSupport Breakup AFSProcessNotify() into AFSProcessCreate() and AFSProcessDestroy(). Correct inconsistencies with ETHREAD vs ThreadId HANDLE. Add AFSProcessNotifyEx() and use PsSetCreateProcessNotifyRoutineEx() to register it on Vista SP1 and above. Reviewed-on: http://gerrit.openafs.org/6926 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a54fefc0449fbccc881c017480cb92878bb460cb) Change-Id: I6104f2d0d789fda7d4ff1a68712e9b5508da7a7e Reviewed-on: http://gerrit.openafs.org/6955 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f4a0bc3c42895ef61f9a8a53f3fca6b59dfdab2c 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: I327a1f1de4f6d13eef290de6a7165c16398dede2 Reviewed-on: http://gerrit.openafs.org/6953 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0616dd70efd70ef2112ee9298cf730df763c4129 Author: Jeffrey Altman Date: Wed Mar 21 10:11:31 2012 -0400 Windows: AFSRedir Debug for STATUS_NOT_A_DIRECTORY Add additional logging to handle the case where the afsd_service returns STATUS_NOT_A_DIRECTORY for eval by id/name. Reviewed-on: http://gerrit.openafs.org/6930 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b695eb272d66269a57cdca2550c00f2b0003ae35) Change-Id: Ia700d3f1529d55db5ce534c1a54cb9e7b1203cd4 Reviewed-on: http://gerrit.openafs.org/6942 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 710cbbab107d35507e04ce590ad8daf9de5bd550 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: I8c8436fcecc2263d177df88719883cf29b021a84 Reviewed-on: http://gerrit.openafs.org/6939 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0d756c0c049e6068612939d028b33a9deb9af72 Author: Jeffrey Altman Date: Fri Mar 16 01:09:42 2012 -0400 Windows: invalidate correct objects during dir verification When processing a directory verification, if a change of data version is detected or if the FileID of a FileName changes, be sure to invalidate and verify the directory entry. Setting the verify flag on the parent after updating the directory entry's metadata does not result in the correct behavior. Reviewed-on: http://gerrit.openafs.org/6914 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 4d98adc83cd09d75c99abd9d29af79f9de5b1d1a) Change-Id: Ic60c506a7279f3ee39347dd6d98ff0dc9a50c904 Reviewed-on: http://gerrit.openafs.org/6920 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cbf0cb233bb87251dbd63885a7a91c74d851c6d4 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. Change-Id: I5a9dfb2818fa17ba6fc1ab6f76ec5cde602c6f16 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) Reviewed-on: http://gerrit.openafs.org/6915 commit 003debd23bf377cac9ec972828dc300d89e1367f Author: Jeffrey Altman Date: Wed Mar 14 23:22:57 2012 -0400 Windows: 1.7.8 (1.7.0800) Version Change-Id: Ice56a2baa4ae4cb732c01844d7effbf76c53fb51 Reviewed-on: http://gerrit.openafs.org/6906 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3785ae2fb95a0019353f30bc8a3ba71e081459fc Author: Jeffrey Altman Date: Wed Mar 14 23:21:29 2012 -0400 Windows: Change log for 1.7.8 Change-Id: Ibed23b401628e171ac5a7697a533072625e30a4d Reviewed-on: http://gerrit.openafs.org/6905 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d80dc5a3905234412bf0c2e2a7b98e86aa4ca482 Author: chas williams - CONTRACTOR Date: Mon Mar 5 11:41:08 2012 -0500 rxgen: fix to use rx accessor routines apparently some uses didnt get converted during the previous work. Reviewed-on: http://gerrit.openafs.org/6874 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4cc3923b1b857368a522be55c55fce4c9b62548a) Change-Id: I016fab1696bedad9ce98f91343912a407961a744 Reviewed-on: http://gerrit.openafs.org/6902 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa9457d9088570c5955063db2dbf4103850b4bac Author: Jeffrey Altman Date: Mon Mar 12 15:53:47 2012 -0400 Windows: Drop resource across AFSCleanupFcb Avoid additional deadlocks involving VolumeCB->ObjectInfoTree.TreeLock. Reviewed-on: http://gerrit.openafs.org/6893 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 317b227a20a99960b313d06a3441822472d638c8) Change-Id: Icdbd9d936d6dc48c8ff3429472ad4444b177ce28 Reviewed-on: http://gerrit.openafs.org/6901 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6bec896cdd216eec47e73ff0598555adf37f17dc Author: Jeffrey Altman Date: Wed Mar 7 06:54:54 2012 -0800 Windows: Wait for memory allocation if necessary The kernel has a limited pool of memory. If there is no memory available to satisfy a request, that request will fail initially with a STATUS_OUT_OF_RESOURCES error which in most cases is exposed to the user-mode application as STATUS_ACCESS_DENIED. This can produce inconsistent results. This patchset introduces an Event object, MemoryAvailableEvent, which is signalled when the redirector deallocates memory. This should in many cases permit requests to succeed where they otherwise would have failed immediately. The WaitingForMemoryCount field tracks the number of threads that are waiting for memory to become available. A subsequent patch could use this value to accelerate the tear down of cached data. To avoid deadlocks, blocking threads will only wait for a maximum of 30 seconds at a time. As long as the redirector continues to free memory, the thread can re-queue itself. However, if a timeout occurs, the allocation request will fail. Reviewed-on: http://gerrit.openafs.org/6886 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6fb1078e08d4077fb0602f97b1a83bcd72f55db8) Change-Id: I6d16591e597866d2e5b9592431bc3ba0d7c8de44 Reviewed-on: http://gerrit.openafs.org/6900 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8bbc671a9f744cd72c998d440ea19b48b357bfe4 Author: Jeffrey Altman Date: Mon Mar 5 23:14:28 2012 -0600 Windows: Correct Data Version change synchronization The data version must be checked and set while the ObjectInformation DirectoryNodeHdr.TreeLock is held exclusive. Otherwise, it is possible for a race to occur. Reviewed-on: http://gerrit.openafs.org/6883 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b7f6d8e3964592543d4706c58c395fbe2f81218b) Change-Id: I1e8b3ffc27a1118bea9276573031603bf4449c5d Reviewed-on: http://gerrit.openafs.org/6899 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6262ad70ff33134ca6091eb99bcb34e3c741583f Author: Jeffrey Altman Date: Fri Mar 2 10:54:38 2012 -0500 Windows: add __try..__except Wrap potential exception locations in __try ... __except so that the exceptions can be caught by us instead of Cc/Mm which use exceptions to signal status. Reviewed-on: http://gerrit.openafs.org/6859 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 88ec2929fddec2ae53a74d3e40cbdeb566aeacc5) Change-Id: I01be8efade28893f9a73796fd6db3500e28c7e2b Reviewed-on: http://gerrit.openafs.org/6867 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 954305cedb70c09d2847af6ef67fd8e2731b1544 Author: Jeffrey Altman Date: Fri Mar 2 10:54:23 2012 -0500 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/6858 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5762d9c3c7d941b856bfa86ce8e1ee6a76f41eda) Change-Id: Iefdbea3bfe44b97b38b82f3a5417420a7f25b65f Reviewed-on: http://gerrit.openafs.org/6866 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 48d638644c8278193c7f95d7a4b6218eb5d3104e Author: Jeffrey Altman Date: Fri Mar 2 10:52:35 2012 -0500 Windows: Avoid deadlock in invalidation path During data version invalidation the AFS redirector must CcPurge any non-dirty extents on a file. This operation can be intercepted by a filter driver which in turn might open the file and close it again before the CcPurge completes. The AFSPerformObjectInvalidate call holds the ExtentsResource shared which can deadlock if AFSClose attempts an extent tear down which requires exclusive access to the ExtentsResource. Reviewed-on: http://gerrit.openafs.org/6856 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fdf1dfc5f92fcd149a7ae0945e4458993b2ad61e) Change-Id: I6eb5300cb7d3a98ffe9eb5301dcc6ef24fdf7a7b Reviewed-on: http://gerrit.openafs.org/6865 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d5ceb1ac269353ffacf3b6ff5215dba27a346429 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: I8439cf1f68dd818036fc9b479a05aa47e4bd6967 Reviewed-on: http://gerrit.openafs.org/6850 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d08de41676cd1c3d0f7c7507d00865d3f2af1f1c Author: Jeffrey Altman Date: Fri Feb 24 12:23:28 2012 -0500 Windows: Fix an ExtentResource trace message This instance is logging a SHARED acquisition not an EXCL one. Reviewed-on: http://gerrit.openafs.org/6792 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0e610fdacb4484d245bf1f727d035812774192ea) Change-Id: I9ea73e28e84bc4346b9f698ad7b5162be7b4b083 Reviewed-on: http://gerrit.openafs.org/6837 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6a9fdfd3c9e23f3954a06590fe31a69bf1e56f6 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: Ic3b9f2349a956ae143c579715a7536f04877574f Reviewed-on: http://gerrit.openafs.org/6836 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a7fa4786fe4422dae6ee1b9d58bcf1c9252b182b Author: Vaibhav Kamra Date: Thu Feb 23 09:58:07 2012 -0800 Windows: Redirector opens must set a valid FsContext A successful open must have FileObject->FsContext set to a structure with a valid/initialized FSRTL_ADVANCED_FCB_HEADER object. Not having this breaks assumptions in the kernel. Patchset edited by Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/6782 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6bb0014be2c3ea5ca411bf349fb3987c5d496c40) Change-Id: Id8e08c5bf0eb3c42e38ccd05ac4171c5f2108117 Reviewed-on: http://gerrit.openafs.org/6835 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cf47f25be2c17831002f89207a636e32ae4446e8 Author: Jeffrey Altman Date: Thu Feb 23 11:13:08 2012 -0800 Windows: remove AFSOpenRedirector from AFSRedirLib The AFSOpenRedirector functionality must exist in the framework, AFSRedir.sys, not the library, AFSRedirLib.sys. Reviewed-on: http://gerrit.openafs.org/6781 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit de93a78b870b40338cfd0f4839fe4ef3b959481b) Change-Id: I9e6504459ed958b0fe698171aef4286275538eb9 Reviewed-on: http://gerrit.openafs.org/6834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2a3ddd5a6a0e5d574ece669586ab5da8048a5d2b Author: Jeffrey Altman Date: Thu Feb 23 06:31:31 2012 -0800 Windows: do not bugcheck in AFSExAllocatePoolWithTag If the Bug Check flag is set, the call to AFSBreakPoint() in AFSExAllocatePoolWithTag() will trigger. There is no need for an explicit bug check test in AFSExAllocatePoolWithTag(). If AFSExAllocatePoolWithTag() returns NULL there is no need to ASSERT() the return value since AFSBreakPoint() would already have been called to signal a debugger. Reviewed-on: http://gerrit.openafs.org/6780 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 315b97ab587247d7750ff4b64275e397ac4b97a7) Change-Id: I1410a9653d072c844bafe32346865ec8b6dd1e1b Reviewed-on: http://gerrit.openafs.org/6833 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 87032d0be0824d13a5e54df85de81da40bdae479 Author: Jeffrey Altman Date: Thu Feb 23 06:28:49 2012 -0800 Windows: Revert "AFSRedir DebugFlags Turn on BugCheck" This reverts commit 209df87d08fb07d9641b81858a0821b9fd95dbcc. Turning on BugCheck by default was a good idea because we needed to track down the cause of exceptions that were otherwise being thrown resulting in resource leaks. However, it is a bad idea because it results in out of memory conditions throwing bug checks that result in a BSOD. Reviewed-on: http://gerrit.openafs.org/6779 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit fe6cc80fdbbd3c66ddc32bb6a8e639753244da70) Change-Id: I84ba1a03f01d1219808ad6fab38a5a6688bcab1a Reviewed-on: http://gerrit.openafs.org/6832 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb44db99538cdde737d6a7462d77daa896598e50 Author: Jeffrey Altman Date: Wed Feb 22 14:28:49 2012 -0800 Windows: version 1.7.7 (1.7.07000) Change-Id: Iaf6b62651184662ced2a87163d19579c46b9c282 Reviewed-on: http://gerrit.openafs.org/6773 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0f9ea1376320f0ab8af8948191576dd09660ad09 Author: Jeffrey Altman Date: Wed Feb 22 14:39:34 2012 -0800 Windows: 1.7.7 Release Notes Change-Id: I99687f35fc78eb13ab6f2b36bb176f5f22049435 Reviewed-on: http://gerrit.openafs.org/6774 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fbc203e4e671987fbdd62f8d705af81313897ac6 Author: Jeffrey Altman Date: Wed Feb 22 14:19:51 2012 -0500 Windows: invalidate data version on link creation notify the redirector that the directory data version has changed when a pioctl is used to create a symlink or mount point. FIXES 130589 Reviewed-on: http://gerrit.openafs.org/6747 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4ed91fe59468ed6c834f968a5b8202e967ea43b5) Change-Id: Ieff313e120d758ef12eea1ddd4d0479fe6940468 Reviewed-on: http://gerrit.openafs.org/6748 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f904d53f80354d9d911fdcead5ddc4c115635478 Author: Jeffrey Altman Date: Mon Feb 20 20:50:53 2012 -0500 Windows: AFSPerformObjectInvalidate hold ExtentsResource shared The AFSPerformObjectInvalidate() was obtaining exclusive access to the Fcb ExtentsResource even though it was not tearing down the extents list. The ExtentsResource could be held shared instead. Doing so will avoid the following deadlock: Thread 1: nt!MmPurgeSection+0x403 nt!CcPurgeCacheSection+0x100 AFSRedirLib!AFSPerformObjectInvalidate+0xd4 AFSRedirLib!AFSWorkerThread+0xa4 nt!PspSystemThreadStartup+0x2e Thread 2: AFSRedirLib!AFSAcquireShared+0x18 AFSRedirLib!AFSMarkDirty+0x68 AFSRedirLib!AFSNonCachedWrite+0x603 AFSRedirLib!AFSCommonWrite+0x5fa AFSRedirLib!AFSWrite+0x20 nt!IofCallDriver+0x45 AFSRedir!AFSWrite+0x57 nt!IofCallDriver+0x45 fltMgr!FltpDispatch+0x6f nt!IofCallDriver+0x45 AMFilter+0x2c6e nt!IofCallDriver+0x45 PMDriver+0x112a nt!IofCallDriver+0x45 OpLoader+0x1cd2 nt!IofCallDriver+0x45 savonaccesscontrol+0x6f15 savonaccessfilter+0x2fa0 nt!IofCallDriver+0x45 nt!IoAsynchronousPageWrite+0xd0 nt!MiMappedPageWriter+0x127 nt!PspSystemThreadStartup+0x2e Thread 1 is attempting to perform a cache purge which cannot complete until Thread 2 is finished but Thread 2 requires the ExtentsResource which is held by Thread 1. Reviewed-on: http://gerrit.openafs.org/6744 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5965c5390bf8264dacf60016929fc8d3aa83a7ea) Change-Id: I1555f6f504fa7f14a9d6cb0389c641a54a7e45fa Reviewed-on: http://gerrit.openafs.org/6746 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ad191770bd56c9a8f81f06f551ee440244664ab Author: Jeffrey Altman Date: Mon Feb 20 01:48:20 2012 -0500 Windows: fsLockCount not accurate Prior to 1.6.2 the file server does not report an accurate value for the lock state. In addition, callbacks are not broken when locks are freed due to lease expiration. Reviewed-on: http://gerrit.openafs.org/6741 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 08d800b896db688cd96d742781e8225c9e58ef57) Change-Id: Ia89c0cb207912a3d197b158c26d967a8c779cd89 Reviewed-on: http://gerrit.openafs.org/6745 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d729634300cb8bcb82292f2b754934f3a0f03251 Author: Jeffrey Altman Date: Sat Feb 18 19:57:25 2012 -0500 Windows: Dereg Lanman and Lsa reg values for afsredir If the machine has been upgraded from an AFS SMB Server to the AFS Redirector, the registry will have leftover configuration for the "AFS" netbios name in the Lsa BackConnectionHostNames value and the LanmanWorkstation ReconnectableServers and ServersWithExtendedSessTimeout values. These values are not useful with the AFS Redirector since \\AFS is owned by afsredir.sys and not the SMB redirector. Remove the "AFS" netbios name from these values when afsd_service.exe has started in redirector mode. Reviewed-on: http://gerrit.openafs.org/6737 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 91d38b93566734734f559a84c38a09e5c7d530c0) Change-Id: I5148e1391c601d4b8f2a954639c1c6fef499a73e Reviewed-on: http://gerrit.openafs.org/6739 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e385576c14a4a5c568cc1cf8d0c499a390803982 Author: Ken Dreyer Date: Sat Feb 11 09:43:30 2012 -0700 doc: replace hostnames with IETF example hostnames There were several different real and made-up hostnames and company names used throughout our documentation examples. The IETF has reserved "example.com" and other "example" TLDs for use in examples (RFC 2606). Replace almost all references to ABC Corporation, DEF Corporation, and State University, as well as "abc.com", "bigcell.com", "def.com", "def.gov", "ghi.com", "ghi.gov", "jkl.com", "mit.edu", "stanford.edu", "state.edu", "stateu.edu", "uncc.edu", and "xyz.com". Standardize on "Example Corporation", "Example Network", "Example Organization" (example.com, example.net, and example.org). The Scout documentation in the Admin Guide contains PNG images that contain the old cell names, so I left those references until the images can be replaced. Reviewed-on: http://gerrit.openafs.org/6697 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1cc8feb6fc7b8d551b343b276e40e023ab1dccbe) Change-Id: I650045c18f3529c13bfcdd2a35c84bcc8a95e67e Reviewed-on: http://gerrit.openafs.org/6736 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d8aa1697dc9d471db38587ea78b16da0d51b8d1 Author: Jeffrey Altman Date: Fri Feb 17 22:21:00 2012 -0500 Windows: Explorer Shell Set Unix Mode bits The Unix Mode bits were not being saved. This patch permits them to be saved. FIXES 130572 (cherry picked from commit f93d92a1d79bdb88d0403b3df9a56753f3de4b64) Change-Id: I1ec198f81babe51b4c817dcb2e2b4fcf8968efe5 Reviewed-on: http://gerrit.openafs.org/6735 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e51214263a9908d8eaa057336a0782a6c3da58fd Author: Jeffrey Altman Date: Fri Feb 17 10:37:34 2012 -0500 Windows: remove unnecessary DirectoryEnumEvent The DirectoryEnumEvent is not required to implement: AFSSetEnumerationEvent AFSClearEnumerationEvent AFSIsEnumerationInProgress The DirectoryEnumCount is modified by interlocked operations and can be used as a marker for when an enumeration is in progress. Reviewed-on: http://gerrit.openafs.org/6725 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 168d730a6f227c9b9dce228314eb75aa76b8cddb) Change-Id: I84b5cec155e67454427b9fdd94bd44fd6985f538 Reviewed-on: http://gerrit.openafs.org/6732 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit de60151ebdccf92dce4d982303c2dcd6c53250d2 Author: Jeffrey Altman Date: Thu Feb 16 23:50:18 2012 -0500 Windows: VolumeCB->ObjectInfoTree.TreeLock Deadlock AFSPrimaryVolumeWorkerThread held the VolumeCB->ObjectInfoTree.TreeLock exclusively across calls to AFSCleanupFcb() which in turn triggers a file extent release to the service which can in turn result in an object invalidation. Processing the invalidation requires shared access to VolumeCB->ObjectInfoTree.TreeLock which results in a deadlock. This patch alters the processing of AFSPrimaryVolumeWorkerThread so that the VolumeCB->ObjectInfoTree.TreeLock is not held across the AFSCleanupFcb() calls. FIXES 130431 Reviewed-on: http://gerrit.openafs.org/6724 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 780e497b32a927e008474a63b0427eca5d5a8877) Change-Id: I55198e24138984fdae8cc87cbf9b0dac49aa9ed8 Reviewed-on: http://gerrit.openafs.org/6731 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2ff1c756c2e089812352fa236953f8438dd7c80f 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: I8784d6dc1160e6b3b6cc86f9ef97d82ca4b7ba02 Reviewed-on: http://gerrit.openafs.org/6730 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d4840a55046008e55173d0c9c4320f7b0502de93 Author: Jeffrey Altman Date: Wed Feb 15 00:06:47 2012 -0500 Windows: disable afsdhook.dll reload by daemon The daemon thread's loading and unloading of afsdhook.dll every second prevents the disk drive from sleeping and forces a search of the PATH. Make the periodic reloading configurable and disable it by default. Reviewed-on: http://gerrit.openafs.org/6715 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f38780b38d6097832b6d49453a0a47044bc06903) Change-Id: Iefede0f47510722cb98a490b547ab9d8dfaee299 Reviewed-on: http://gerrit.openafs.org/6720 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c4a614deccc800afe2446fb22782d7e30022bca4 Author: Jeffrey Altman Date: Tue Feb 14 21:52:28 2012 -0500 Windows: remove install9x rules Reviewed-on: http://gerrit.openafs.org/6712 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcc8244095a9cfb5235b39afc25c8817167e895c) Change-Id: I2a0a1be7d5756b1ba820ff1105794fa99ee1cfad Reviewed-on: http://gerrit.openafs.org/6719 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 41c986db723a2ce2564fa1799adeda96b804be21 Author: Jeffrey Altman Date: Tue Feb 14 16:02:02 2012 -0500 Windows: remove AFS_WIN95_ENV No longer build for Win9x. Remove AFS_WIN95_ENV conditionals. Reviewed-on: http://gerrit.openafs.org/6711 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 32de17264e229fca94742da7b6278536c24fe713) Change-Id: I3df6508291ae8d895bd5a4ec806807751ac9f046 Reviewed-on: http://gerrit.openafs.org/6718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d155be726cfab52f24b9a690a7b7d3c778a99104 Author: Jeffrey Altman Date: Tue Feb 14 15:35:07 2012 -0500 Windows: add KTC_TOKEN_MUTEX_FAIL error code If acquisition of the Global\AFS_KTC_Mutex fails, return a different error code from a pioctl failure since the pioctl was never issued. Reviewed-on: http://gerrit.openafs.org/6710 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9a394780abb782f7a4f8b6095b6faf46b8e819a6) Change-Id: Ic3d574a0ccb4ceaa739b7bc4eafa23f03cb49f18 Reviewed-on: http://gerrit.openafs.org/6717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 40c5ecb1c155b8f87a7c047534076163d404171a Author: Jeffrey Altman Date: Tue Feb 14 12:01:38 2012 -0500 Windows: avoid GetComputerNameW call for all ioctl Cache the value of GetComputerNameW() to avoid repeated calls for each and every redirector ioctl request. Reviewed-on: http://gerrit.openafs.org/6708 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit da17eb6c8619c0f781cd4601c0da1258043aa475) Change-Id: I228873be2ef3eb475a85d4e33a80fc50512903ce Reviewed-on: http://gerrit.openafs.org/6716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c250c37a837825cc541eecd430c79bd578df7c5 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: I4307d7932771d942bea4379ad4512539e2b17fd9 Reviewed-on: http://gerrit.openafs.org/6704 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c90b639fbe6ce21b3dcf04a6038754bb030b7409 Author: Jeffrey Altman Date: Sat Feb 11 12:49:33 2012 -0500 Windows: AFSRemoveFcb() cannot race Modify AFSRemoveFcb to use InterlockedComparePointerExchange to ensure that only one thread can remove and deallocate an AFSFcb structure. Reviewed-on: http://gerrit.openafs.org/6696 Reviewed-by: Peter Scott Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5c4e49062af0e9b81b963d1d6e50c7cc52c68eb9) Change-Id: I4c963381757daab9c27b5d663d0c2bcc073159ab Reviewed-on: http://gerrit.openafs.org/6702 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72e84d077c4419ed3a13a363e4949ebaf0a762db 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: I11e982d3fd0c3a6af7ed7e1c266466d00345f59f Reviewed-on: http://gerrit.openafs.org/6700 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bdadf63a86375fd040123b507882dfab52a09c02 Author: Jeffrey Altman Date: Fri Feb 10 08:56:12 2012 -0500 Windows: Perform rename to self check earlier In AFSSetRenameInfo(), the rename to itself check was performed after the name collision check. Move the check earlier in the routine to ensure that we catch the no-op before any real work is done. Reviewed-on: http://gerrit.openafs.org/6692 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 42aba4391ab3fadca2103e1df1f47445e40c436e) Change-Id: Ib04c969e6e3cb27950f7aaf7df947ab452644dab Reviewed-on: http://gerrit.openafs.org/6695 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit abfb36fa3696d58c97fd8c997062638ceb05c7b4 Author: Jeffrey Altman Date: Tue Feb 7 16:14:27 2012 -0500 Windows: Version 1.7.6 (aka 1.7.0600) Change-Id: I081498b1df05b6cfad12d7c1b5cc990b0d0d6877 Reviewed-on: http://gerrit.openafs.org/6688 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 935e4cefc2aeb08630c445ad65012700b19c0148 Author: Jeffrey Altman Date: Tue Feb 7 16:13:36 2012 -0500 Windows: 1.7.6 change log Change-Id: Ic5e83ef72b76678cb59696d1cc944ab46ec38d4a Reviewed-on: http://gerrit.openafs.org/6687 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ff711a8063be06eacd2552c0dd1527de854b2d14 Author: Jeffrey Altman Date: Tue Feb 7 15:56:12 2012 -0500 Windows: Release Notes corrections Add missing BlockSize registry value Correct AFSRedirector\NetworkProvider registry key description Add note that LanAdapter value is ignored if SMB mode is not in use. Reviewed-on: http://gerrit.openafs.org/6685 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c0ac71d92fda5c1cd451bd453b00983362f47ce7) Change-Id: I47ed0e43543aa5f8d58b8ad08a04064bafa4efc9 Reviewed-on: http://gerrit.openafs.org/6686 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8de1bae4c230ea439c1ca3be4306745c0034a700 Author: Jeffrey Altman Date: Mon Feb 6 12:00:58 2012 -0500 Windows: OpenAFS reparse points are surrogates OpenAFS reparse points represent mount points, symlinks, and dfs referrals. All of which are file system objects that represent another named entity in the system. As a result the reparse tag field must include the Reparse Tag Surrogate bit (0x20000000) set. This permits the IsReparseTagNameSurrogate() macro provided in winnt.h to be used to determine if the reparse point is a surrogate or not. See http://msdn.microsoft.com/en-us/library/windows/desktop/aa365197%28v=vs.85%29.aspx Reviewed-on: http://gerrit.openafs.org/6668 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8bc139b4acdd2c06643abb44d3f5b3bfdcbf639d) Change-Id: I21d577a7f4f512073d3407ddd7d6c8ee1662c7b5 Reviewed-on: http://gerrit.openafs.org/6684 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9d6257b7fafb9cdf627bc62aab68c68229c1b14c Author: Jeffrey Altman Date: Sat Feb 4 17:26:02 2012 -0500 Windows: Avoid race during PIOCtl DirNode allocation Use InterlockedCompareExchangePointer to assign the DirNode to ObjectInfo->Specific.Directory.PIOCtlDirectoryCB. Otherwise, one thread could race with another thread when allocating the pioctl object. Reviewed-on: http://gerrit.openafs.org/6661 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 39d152810de9adfa89acb994506d0b9d368395f2) Change-Id: I5286fb924e64a92c3b0e2144a894fb531cc650d8 Reviewed-on: http://gerrit.openafs.org/6667 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 30391d85374f9f160ce688e08009e944ae7262eb Author: Jeffrey Altman Date: Sat Feb 4 12:48:24 2012 -0500 Windows: Hold Fcb references prior to service call If the Fcb reference count hits 0 while the service is called it is possible that the Fcb can be garbage collected prior to the completion of the call. Reviewed-on: http://gerrit.openafs.org/6660 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b819d3e3abcfedf10a1c91a26f45d0d85e6b93f1) Change-Id: Ie4a281d32c7a8d2cd1ebf2cdda4408717cfad118 Reviewed-on: http://gerrit.openafs.org/6666 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit da7398034d72d5ea5cc6af8c75a0f35feb25ace7 Author: Jeffrey Altman Date: Sun Feb 5 12:58:22 2012 -0500 Windows: Do not build NSIS by default NSIS installers are no longer up to date and do not support 64-bit builds. OpenAFS no longer distributes them for 1.7 and beyond. Stop building them by default. Reviewed-on: http://gerrit.openafs.org/6664 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit deb41441f0671d46de876d30f641f86cca7d256e) Change-Id: I7fc081dd596a198d272089533e4fdffa7f645bc2 Reviewed-on: http://gerrit.openafs.org/6665 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fc82beaac2d838a3aaafdc985687552a68079fb5 Author: Jeffrey Altman Date: Sun Jan 29 10:39:28 2012 -0500 Windows: Increase size of worker thread pools The size of the afs redirector worker thread pools should be made configurable but for now just increase the pool size to be in parity with the default worker pool created by the afsd service. Reviewed-on: http://gerrit.openafs.org/6627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5e08628da2c24b40aeedebe0fef4e6ddd4690904) Change-Id: I68fe74204a33bc6a2b61087e0121bc6a14237f14 Reviewed-on: http://gerrit.openafs.org/6663 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 14a20951e1d35cf7550ad6eb4812df077f475e4e Author: Jeffrey Altman Date: Sun Jan 29 10:37:50 2012 -0500 Windows: Run Workers until empty task queue Do not allow a worker thread to sleep until the task queue is empty. It is better for the running thread to pick up and process a task then to sleep this thread and wait for another one to wake up to perform the work. Reviewed-on: http://gerrit.openafs.org/6626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0f65600b675e641575efaf81a71db990cebbb7d3) Change-Id: I2d43d7deca943bf57ced42c39c43493adfe5cf1e Reviewed-on: http://gerrit.openafs.org/6662 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 15963a449078cc6d9d81af6258a537e69a30c330 Author: Jeffrey Altman Date: Fri Feb 3 11:35:33 2012 -0500 Windows: add buf_InvalidateBuffers Add a utility function that invalidates all buffers for a cm_scache_t object. Reviewed-on: http://gerrit.openafs.org/6651 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 339189c88ba9c6bc7e4ea6434acef0b96da24dae) Change-Id: Icfb15a8d8db0cd963fede8b813384568ebbd900c Reviewed-on: http://gerrit.openafs.org/6659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 625728696fc7af79839ff2506d97966a15e80908 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: I2e3e18564796dd656d846ad58377f20d409a172b Reviewed-on: http://gerrit.openafs.org/6658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 142a0d1b3f141b1bd29f9bb70f33e907fc994a47 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: Icbf032702b8783b8b95088a92a9a95eb664cf0ef Reviewed-on: http://gerrit.openafs.org/6657 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4358b39b7a6f77f1b9d9a71e7acac3bf247fb85d Author: Jeffrey Altman Date: Fri Feb 3 11:16:04 2012 -0500 Windows: update btree debugging code B+Tree key strings were changed to wchars for unicode support, the debugging printf format patterns were not updated to match. Do so now. Reviewed-on: http://gerrit.openafs.org/6648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 09ab91bf9d27258c126411d4c80e5363118b7bba) Change-Id: I0a37d8f91950d34e878da3631e54f395e1ef25cb Reviewed-on: http://gerrit.openafs.org/6656 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 28f164a067d1a9a4869d2e02bc886023b209496a Author: Jeffrey Altman Date: Fri Feb 3 11:14:50 2012 -0500 Windows: Do not open file if shutdown in progress Perform the shutdown check earlier in AFSCommonCreate() to prevent a request from being processed after the service indicates that a shutdown has begun. Reviewed-on: http://gerrit.openafs.org/6647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4224dc5c281ffc2bf8dd34eadb76762304eece75) Change-Id: Ie5cc33a5b8ccd5edeba01fdeb41705be9cfda266 Reviewed-on: http://gerrit.openafs.org/6655 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72fbded300acd01c9024488eca95bc3204f0d154 Author: Jeffrey Altman Date: Tue Jan 31 22:34:30 2012 -0500 Windows: AFSRedir DebugFlags Turn on BugCheck Turn on bug checking by default via the installation. This permits sites to disable the functionality but will allow us to capture more meaningful minidump output. Reviewed-on: http://gerrit.openafs.org/6646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 209df87d08fb07d9641b81858a0821b9fd95dbcc) Change-Id: Ib029cb53a7090cff5cb26c8e9ae19d1706394856 Reviewed-on: http://gerrit.openafs.org/6654 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d5d1a5a9a5e99ff23151a8e0c232f6f7891c0eaf Author: Jeffrey Altman Date: Tue Jan 31 15:51:34 2012 -0500 Windows: Improve AFSNotifyDelete Do not call AFSNotifyDelete after the reference count on the DirEntry->ObjectInformation is given up. Log the Parent FID and file name since that is what are passed to the service to perform a delete. Log the actual FID of the object being deleted and not the address of the FID fields. Reviewed-on: http://gerrit.openafs.org/6645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fe952116f3f0968e6c9f584297bafd3e8dd56903) Change-Id: I57bcef8aa04d2bec261f80f9a49388487872b291 Reviewed-on: http://gerrit.openafs.org/6653 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51a1e752eb46e5a766cf1b1e3884834a567bbde4 Author: Jeffrey Altman Date: Tue Jan 31 15:49:22 2012 -0500 Windows: do not lower case direct volume references Not all volumes are lower case. Do not lowercase the string. Reviewed-on: http://gerrit.openafs.org/6644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9a1d7518b62f43586f4d228f9261adb0fac4f5a4) Change-Id: I94c6fc3715584b524275a8caf0212fdcb83f3733 Reviewed-on: http://gerrit.openafs.org/6652 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3a4652b9290367ade8600330c06180ec47798e40 Author: Jeffrey Altman Date: Sun Jan 29 16:54:53 2012 -0500 Windows: Version 1.7.5 (1.7.0500) Change-Id: I24a3debbac2ea791a0c1120c65180fa291daf242 Reviewed-on: http://gerrit.openafs.org/6635 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 999d3ca5fc7ded96e49db0c96f32c965b3b8f9ed Author: Jeffrey Altman Date: Sun Jan 29 16:53:41 2012 -0500 Windows: change log for 1.7.5 Change-Id: I04b16ee4c171a77d4344661151d75bffeebf4a45 Reviewed-on: http://gerrit.openafs.org/6634 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 31e477d21a30f868f55b62ad81b68a91d92e1025 Author: Jeffrey Altman Date: Sun Jan 29 16:46:22 2012 -0500 man-pages: add fs_getverify and fs_setverify Add man pages for two new Windows only commands fs getverify fs setverify -verify {on, off} Reviewed-on: http://gerrit.openafs.org/6632 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 87049b873b08ddd2246c02cd66099940eae2b1fd) Change-Id: I7ce7cfff6e7dca98439d537c480020dbac5a89f6 Reviewed-on: http://gerrit.openafs.org/6633 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5641870c82b5fba0f25fb6d0d3c472c315b711a2 Author: Jeffrey Altman Date: Sun Jan 29 14:41:06 2012 -0500 Windows: do not panic if afsredir not ready during shutdown Reviewed-on: http://gerrit.openafs.org/6630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7b3f5df6dca09a15d56aae5c431a50529c119db2) Change-Id: I7b54a6c37588dd2efc7f5e92722c1cd730641c4e Reviewed-on: http://gerrit.openafs.org/6631 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1daf027c6eddb41c0c5426a2dee8afaae7aaed55 Author: Jeffrey Altman Date: Sun Jan 29 00:22:03 2012 -0500 Windows: Release Notes for 1.7.5 Release notes updates for 1.7.5. (cherry picked from commit c97cb2ed8b9bad6377f2978c16e22785ea7a5f03) Change-Id: I67a60a9e7acb0b8104fd97acaa9e9f88b3e9378a Reviewed-on: http://gerrit.openafs.org/6625 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ae5374187721acf07ebf3ae7f7f822fa5960219 Author: Jeffrey Altman Date: Fri Jan 20 14:43:06 2012 -0500 Windows: Stop the thundering herd The afs redirector used notification events to wake up worker threads when a task was added to a work queue. Notification events when signalled wake up all threads instead of just one. Instead, use synchronization events to wake up a single thread at a time and restructure the code to permit workers to wake up additional workers if there is additional work to be performed or during library shutdown. Thanks to Peter Scott for his assistance. Reviewed-on: http://gerrit.openafs.org/6595 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit de4d12dd5366bfddb6fde5bb050ce8fbaeb95f1a) Change-Id: I20bc28909d4e62b2d5d75838636f1ed8be7567c1 Reviewed-on: http://gerrit.openafs.org/6622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a37574484755fb839b1eba6d0b5af54e99a26bc6 Author: Jeffrey Altman Date: Wed Jan 25 11:27:39 2012 -0500 Windows: DriveSubstitution handle too small buffer If the buffer passed to DriveSubstitution is too small the resulting file path will end up being truncated. At the very least log the fact that truncation is occurring. In addition return the fact that truncation occurred to the caller. In NPGetUniversalName allocate a 4K buffer on the heap instead of calculating a buffer based on the local name buffer size. The local name buffer size has no relationship with the required buffer size for the expanded unc or device path. FIXES 130548 Reviewed-on: http://gerrit.openafs.org/6618 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1161d5fc3cde5e15cb2d13f01ff225710fc04766) Change-Id: Iaba8f1c91ae88a898a11675cf36557b1fdd27587 Reviewed-on: http://gerrit.openafs.org/6621 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e3c22b517e685bbed8d9321c8a6ade6f31cb3541 Author: Jeffrey Altman Date: Tue Jan 24 17:09:01 2012 -0500 Windows: Invalidate all volumes at library init The afsredirlib.sys library driver is unloaded when the afsd_service stops and is reloaded when the afsd_service restarts. During the shutdown window any objects known to the kernel are preserved by afsredir.sys. When the afsd_service restarts, there are no valid callbacks on any objects so the afsredirlib.sys must invalidate all status info to permit the service to request a callback from the file server on next use. Reviewed-on: http://gerrit.openafs.org/6617 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3d10edc2d49e0e1c7a7a67c538a932347a91504c) Change-Id: Ie9e7bd0679d2a9eb112e0fab2d77a91745e0acda Reviewed-on: http://gerrit.openafs.org/6620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3e46e380e4e83e9d1eab310c833ff1f68e61580 Author: Jeffrey Altman Date: Tue Jan 24 12:52:12 2012 -0500 Windows: Refactor and consolidate afsredir invalidation Invalidation requests were being processed in an inconsistent manner because different rules were being applied to volume root directories and other objects and whether or not the invalidation was a whole volume invalidation or not. This patchset consolidates all invalidation logic for an object in the new AFSInvalidateObject function. AFSInvalidateObject is then called from AFSInvalidateCache and AFSInvalidateVolume as necessary. AFSInvalidateVolume executes AFSInvalidateObject on all objects in the volume object tree. As a result, whole volume invalidations whether triggered by the file server or "fs flushvolume" now work. Reviewed-on: http://gerrit.openafs.org/6616 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e44163a5470c6a9ff766641e4ce1ade6569cbadb) Change-Id: I6ea3c80c4f2ae744d9d2cd65d604522bf45754fa Reviewed-on: http://gerrit.openafs.org/6619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c5a6ea7275f0781dec9579aad39022a310cdf54 Author: Jeffrey Altman Date: Sun Jan 15 11:43:40 2012 -0500 Windows: make lock reader history debug only The lock reader history on osi_rwlock is proving to be too expensive. Only use it for DEBUG builds. Leave the data structures the same so that DEBUG builds can be mixed with a RELEASE build of afsd_service.exe. Reviewed-on: http://gerrit.openafs.org/6559 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9803ae643b070b8c805cf94b4ac3205ba8668b1) Change-Id: I233a3434382109a0fa6dfa3a9d63f41f6178881e Reviewed-on: http://gerrit.openafs.org/6608 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5a4cd17262fb13e24ac762035d3b06663b4a682e Author: Jeffrey Altman Date: Sun Jan 22 18:42:32 2012 -0500 Windows: store data verification mode Over the lifetime of OpenAFS a number of bugs have been discovered that can result in data corruption. This new mode (Windows only) will double check that the data received by the file server does in fact match the data that was written by the cache manager. After a successful StoreData and status merge but before the BIOD is released, a fetchdata is issued to read the data written by the cache manager. If the data fails to match, the StoreData operation is repeated. Data verification mode can be queried with "fs getverify" and set with "fs setverify {on, off}". The default value can be set with the TransarcAFSDaemon\Parameters DWORD "VerifyData" registry value. By default verification is disabled. Reviewed-on: http://gerrit.openafs.org/6601 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dfd0c2acc103cd2881bbfecd923c05012001e12a) Change-Id: Id3f412c66b3d233d0f7129172ef760dedc720631 Reviewed-on: http://gerrit.openafs.org/6607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9f6b1abb41e8d5191b2355b03451e6188ef15b28 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: I3734c9b161426cbe0ebce3342dc2cc97ec6b33fa Reviewed-on: http://gerrit.openafs.org/6606 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 031d4aa6948bd8f9bf17b2913c0084d2663d6dd2 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: If9c45403ec2cad139b984efa5288bf36e7d1c3fc Reviewed-on: http://gerrit.openafs.org/6605 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 31d79c2bb129023c80bba2b302773b4b1da59ef5 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: I7226b4ef2d5cf40aabc9549a807c93e9a6222109 Reviewed-on: http://gerrit.openafs.org/6604 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 55fdacb1ba70243e11b6a127ce1b4106028a801c Author: Jeffrey Altman Date: Fri Jan 20 20:10:51 2012 -0800 Revert "Windows: disable memory extent interface" This reverts commit 503bc56403baf741a4a7056a4077edc43812b9d1 Change-Id: I459f3f68a3d68c94b3228cde0a8e09712e0a022c Reviewed-on: http://gerrit.openafs.org/6602 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3e3cfb7083af9a12f76a8adbdf73e9ad05bda788 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: Ib6fbc22d8720277910112d6e66f926650d023741 Reviewed-on: http://gerrit.openafs.org/6594 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0b238f232c64c1ba1d235e220dacfa292e26dd09 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: If50848582749a5378a12b6961557f263830379c8 Reviewed-on: http://gerrit.openafs.org/6592 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bcd86eb6c0beef452b7489a58f5a31bdd95f82a6 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. Reviewed-on: http://gerrit.openafs.org/6128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c7673f4fad8e8b9390564e3cbfa11d5f1b52ba2f) Change-Id: I41fd850c876c3da36f657cb43e6abd8ed1048b8b Reviewed-on: http://gerrit.openafs.org/6591 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cb60ce929701a02b6e461b31c4165b60b9eb2e97 Author: Peter Scott Date: Wed Jan 18 18:42:19 2012 -0700 Windows Asynchronous purging of file content after a DV change Purge all regions of the file surrounding the extents which are to be purged. If a failure occurs on the purge due to an existing mapping, flag for purge during handle close Change-Id: Id8ef81afaa614ea08e03bbd55ec2cdded0d7139f Reviewed-on: http://gerrit.openafs.org/6573 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f6828bd9f158870002e8eeeb2325a40eb7ca5041) Reviewed-on: http://gerrit.openafs.org/6590 commit bf42eac1f7874abf3092b358a6b4c4320c4a0353 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: Id68d40f6c62c10630af0a5167d7e4d42b2812f77 Reviewed-on: http://gerrit.openafs.org/6589 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 95e505faead455d7e5425f271870009258f64c35 Author: Jeffrey Altman Date: Thu Jan 19 01:21:02 2012 -0500 Windows: Redesign daemon thread queue management The daemon thread worker pool has some very poor properties. The threads spend a significant amount of time polling for ready to process tasks because so frequently a store/fetch data request is accompanied by many other requests for the same FID that would block. Lets try a new approach. Create one queue for each worker thread and assign the tasks to a thread by a hash of the FID. This ensures that all tasks for a single FID are serialized and prevents multiple threads from attempting to perform the same task only to decide that the thread would be forced to block. Reviewed-on: http://gerrit.openafs.org/6575 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 201c954a36fe6ec19f96e4c8e24e6e080c3ba55a) Change-Id: I081917ff8e5ce5179a18ed6fff9f67cc46d19e52 Reviewed-on: http://gerrit.openafs.org/6588 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9205c25456179dd93654a2f8585c11f377b356e4 Author: Jeffrey Altman Date: Tue Jan 17 19:43:54 2012 -0500 Windows: prevent race assigning Fcb in AFSInitFcb() AFSInitFcb() is executed when the ObjectInformation->Fcb pointer is NULL. More than one thread can make that determination at the same time. Use InterlockedCompareExchangePointer() to detect a race and permit cleanup to be performed. Remove the output parameter of AFSInitFcb() to avoid a double assignment. Reviewed-on: http://gerrit.openafs.org/6562 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit afeb3c3a83ed0869e4a70b0725e3f85713330c3a) Change-Id: I7d580c128ab5c5cbe65cdfdbf69d84fe414f16c6 Reviewed-on: http://gerrit.openafs.org/6587 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6082e42964623222709f4ef5d54583d10dfb16ea Author: Jeffrey Altman Date: Sat Jan 14 10:32:51 2012 -0500 Windows: cm_EndCallbackGrantingCall refactoring Refactor cm_EndCallbackGrantingCall to prevent assigning a callback to the cm_scache object in the case where it is going to be discarded. If the race was lost the callback data was already discarded by cm_RevokeCallback. By assigning and then discarding we are forced to issue an additional change notification to the smb client or afs redirector. Not only is this extra work but the afs redirector notification can result in a deadlock with a kernel thread that is waiting for the current thread to complete. modify the function signature to return whether or not a race was lost with a callback revocation. rename 'freeFlag' to 'freeRacingRevokes' since that is what the flag is meant to indicate. create a new 'freeServer' flag to indicate when the server reference should be released. There was a leak of server references when a race occurred. modify all calls to cm_EndCallbackGrantingCall() that provide an AFSCallBack structure on input to check for a lost race. If a race occurs, cm_MergeStatus() should not be performed. Reviewed-on: http://gerrit.openafs.org/6556 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 503d09413add1831dff5db24ee907eec59eda9e2) Change-Id: I6d4ff712fb612e02fc09ecf8cdc8deefafb9ee12 Reviewed-on: http://gerrit.openafs.org/6586 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7893df2c21bd120a67f1afbf6f83b70af11e8824 Author: Jeffrey Altman Date: Sun Jan 15 11:08:23 2012 -0500 Windows: deadlock bet. DirEntry lock + DirectoryNodeHdr.TreeLock The DirectoryNodeHdr.TreeLock must be obtained before the DirEntry->NonPaged->Lock. In AFSLocateNameEntry(), the DirEntry lock is obtained before the TreeLock when processing a symlink object. For that case obtain the TreeLOCK first. Drop it if it is not required. Reviewed-on: http://gerrit.openafs.org/6558 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d9884a480c96d14a3e5a6b08cde5e5003d7a4694) Change-Id: I7d0226457eafb42870988328f91b3f2ec9ed6e2a Reviewed-on: http://gerrit.openafs.org/6585 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 042601a8a2489d6cd5d9c56eff88dab84940e507 Author: Peter Scott Date: Wed Jan 18 12:04:29 2012 -0700 Windows: Correctly mark extents dirty when using non-persistent AFS cache Reviewed-on: http://gerrit.openafs.org/6571 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fa7f36f74adc9a40a6b7c7ac5b5ea528733e0dc) Change-Id: I56dbaf75311d8f19008a451ff2d3aae2c833fed0 Reviewed-on: http://gerrit.openafs.org/6584 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1f98d3b48c3cae49da08872290b5f896d4264d51 Author: Peter Scott Date: Wed Jan 11 06:49:23 2012 -0700 Windows: Performing async work after cache invalidation The code now queues a work item to perform additional work on extent processing after a cache invalidation has occurred. This additional work involves walking the current list of extents and purging/flushing regions of the system cache based upon the current state of the extent. Additional changes to filter which invlidation events result in a queued worker to perform asynchronous work. Reviewed-on: http://gerrit.openafs.org/6528 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3cf5064c91af5efb5e2be80fb59db43b674d467a) Change-Id: I84c7366a6dc23ba5a5b6e8f0354d1221fd037add Reviewed-on: http://gerrit.openafs.org/6583 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fbac699e8ea2cff90a4ce9a5541981fcd90b2abf 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: I8fb51dec8275d6dfd57c28e3dbb5ee69d5624a99 Reviewed-on: http://gerrit.openafs.org/6582 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 589ae8923ac53f8b558462178edbdd33b196c075 Author: Jeffrey Altman Date: Sat Jan 14 10:44:56 2012 -0500 Windows: disable memory extent interface There have been reports that the memory extent interface which is used when NonPersistentCache is active can lead to data corruption. Reviewed-on: http://gerrit.openafs.org/6557 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 20151a869911a98f0938d74ae6096f3308d7ec01) Change-Id: I835e9d85eb0b355a4ecb9de888ac8ef4bf3986a7 Reviewed-on: http://gerrit.openafs.org/6581 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a00da66e3102cad42422182c17e368bade7b251c 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: I64fcb1675c4229011929fab5f96665925c3035ec Reviewed-on: http://gerrit.openafs.org/6580 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1a7e8581624a9e0a8b985040dfd7d98de9817f92 Author: Jeffrey Altman Date: Fri Jan 13 23:58:50 2012 -0500 Windows: AFS_SERVER_FLUSH_DELAY AFS_SERVER_PURGE_DELAY Alter the flush delay to 5 seconds from 30 seconds Alter the purge delay to 300 seconds from 5 seconds Reviewed-on: http://gerrit.openafs.org/6554 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ae2c0df3373bdce129694efaf8d0097bab606da) Change-Id: I36283a08a306aec0dd6110898c56b74865cd018c Reviewed-on: http://gerrit.openafs.org/6579 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 492d5df9a8febbbb11be0cd47c283367c66a637a Author: Jeffrey Altman Date: Fri Jan 13 23:57:10 2012 -0500 Windows: AFSParseName edge cases If the input path is \afs\ behave as if the path is \afs. If the input path is \afs\*\ detect the wildcard and return STATUS_OBJECT_NAME_INVALID. Reviewed-on: http://gerrit.openafs.org/6553 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f549911027417cdb4fbacfc8deaa8bd664d1651f) Change-Id: Ic317c9060f01f4671426a0c4d4ed1705ff1794d2 Reviewed-on: http://gerrit.openafs.org/6578 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4b53bbde380d4f8313dc0c58e31a7dfd32bf2a10 Author: Jeffrey Altman Date: Fri Jan 13 19:32:16 2012 -0500 Windows: afs root is always a directory If the root is opened with the FILE_NON_DIRECTORY_FILE option, fail the request with STATUS_FILE_IS_A_DIRECTORY. Reviewed-on: http://gerrit.openafs.org/6552 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 96b9900d306645bb79d631250e3d740f163a2b40) Change-Id: I6e6a01a90fe66aea9b81ee5fd9f020a1fe9f601d Reviewed-on: http://gerrit.openafs.org/6577 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a77ee2012b01116a3cf6235024f5166b9283e29c 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 Reviewed-on: http://gerrit.openafs.org/6517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 2a31f35936698c504c863702ebb675ac9dfe47e1) Change-Id: Ie4ec52c627425e0b855c8a3b848d0ab87c7939b0 Reviewed-on: http://gerrit.openafs.org/6544 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b50822e5784a934aba3037a4efdb99ca274d11ec 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: I67f9fdfefe92cc6e56a5a66326d748761fa0fb42 Reviewed-on: http://gerrit.openafs.org/6542 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0adf47743aa59ba67d94f24ebb272cab8ac51556 Author: Jeffrey Altman Date: Thu Jan 5 11:52:00 2012 -0500 Windows: Avoid file server rpcs on deleted files If a file has been deleted, do not attempt to issue RPCs to the file server in response to AFS redirector extent processing. All RPCs will fail with VNOVNODE which will in turn trigger invalidation requests to the AFS redirector which can deadlock. Reviewed-on: http://gerrit.openafs.org/6514 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7a25010a6e1719fc056b7367893c24267334978e) Change-Id: Id300ec155118373818850ad55a7ca79dd2c4a502 Reviewed-on: http://gerrit.openafs.org/6541 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit de3b98e7d77e189029c08a6ec6ee92867062f586 Author: Jeffrey Altman Date: Wed Jan 4 12:13:40 2012 -0500 Windows: use local var for interlocked result Save the result of the interlocked operations for use in debug logging. Do not reference the incremented or decremented object in the log messages, it may have changed. Local assignment is provided even in functions that are currently not logging to assist with debugging and as a reminder to use the result variable in future log messages. Reviewed-on: http://gerrit.openafs.org/6508 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cde0539f79b54dc3c4aa496be16b89a5e6a3654c) Change-Id: I73de51aec663abbe60f90c9720d8400b6b8ab3fa Reviewed-on: http://gerrit.openafs.org/6540 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5cd4ff65ca2268f4b4abbd40746757e895a9078d Author: Jeffrey Altman Date: Wed Jan 4 01:10:37 2012 -0500 Windows: AFSParseMountPointTarget buffer overrun When parsing the AFS mount point string do not overrun the buffer if the colon cell/volume separator is not found. Reviewed-on: http://gerrit.openafs.org/6507 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6185532db58692e58fca035a7b89767523d33225) Change-Id: I34cec0e801b403f13eece88dfba3a8b5355e486a Reviewed-on: http://gerrit.openafs.org/6539 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e63bcd896fee77c5a9ddeb2687d2bde9350c6a0c Author: Jeffrey Altman Date: Wed Jan 4 00:02:42 2012 -0500 Windows: Directory Enumeration, DVs, and TreeLocks Hold the TreeLock exclusively across all operations that enumerate, validate, or otherwise manipulate directory tree lists or data versions. Take the data version into account when deciding what to do with directory data. If a directory enumeration takes more than one request to service and the DV has changed from the time the directory snapshop was taken by the service and the enumeration completion, merge in the changes and then mark the directory as requiring verification. If a directory change operation completes (create, rename, remove) and the directory DV has changed by more than one force a full directory verification. Set the directory data version to -1 whenever a directory verification is required. Otherwise, the check to clear the VERIFY flag will only update the metadata for the directory. During a directory verification, if a new entry has been discovered it is added to the directory. Make sure the VALID flag is set so that the entry will not immediately be removed as invalid. Reviewed-on: http://gerrit.openafs.org/6460 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba4f5afc9c68f74587c7a9669571c2c32cb7a13b) Change-Id: I8c5246c3c7bf238c3c3f4c9f40f7daa4c72bff87 Reviewed-on: http://gerrit.openafs.org/6538 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c7b2b3f8c739c49e1c7d3612d3aa3624af6f9eee Author: Jeffrey Altman Date: Wed Jan 4 00:01:09 2012 -0500 Windows: correct log messages in AFSCleanup Reviewed-on: http://gerrit.openafs.org/6506 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9783384af764fae23eb34cb26193cc295ee1a185) Change-Id: I08b76cacb9741539130d89b0dfa05b3bf824ce2b Reviewed-on: http://gerrit.openafs.org/6537 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 169d09de8dbc71819ddb91fda2a1398bf71c94a9 Author: Jeffrey Altman Date: Tue Jan 3 23:58:04 2012 -0500 Windows: Return Dir Data Version from AFSCleanup This patchset returns the directory data version from AFSCleanup(). It does not do anything with it. Reviewed-on: http://gerrit.openafs.org/6505 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit bd09d06c3f5bb81023b438e43c4b9b49d663bb34) Change-Id: I4b3bca914f07f15ad53853bf1c892d2a8ddad933 Reviewed-on: http://gerrit.openafs.org/6536 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 46952ed88db80520b66a35ad800ab1c0acd2fb62 Author: Jeffrey Altman Date: Tue Jan 3 23:43:30 2012 -0500 Windows: reorg open handle counts and Fcb->NPFcb->Resource Reorganize when open handle counts are decremented in order to avoid a race with worker threads performing garbage collection. Reviewed-on: http://gerrit.openafs.org/6504 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d2f9f8fa05b5b07965c8001d7b716da4ba486d83) Change-Id: I5003ba2d3b661c1f41af9160eed476bf1c993415 Reviewed-on: http://gerrit.openafs.org/6535 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b8219d3bf00c9358d30762a95733a9ea3c7f9565 Author: Jeffrey Altman Date: Tue Jan 3 23:39:53 2012 -0500 Windows: Permit renames of open files AFS does not impose a restriction on renames of open files. Failure to permit the rename can cause problems if an anti-malware service opens the file immediately after the application performing the rename does so. Reviewed-on: http://gerrit.openafs.org/6503 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e28d77fc4b3b6e5a93e5518d28c241eb9767d863) Change-Id: I172ac570bf51ce86dd9578718ff34f92170f2dc8 Reviewed-on: http://gerrit.openafs.org/6534 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3fb46f3f6652429ee0b160319442fc10358091d Author: Jeffrey Altman Date: Tue Jan 3 23:36:50 2012 -0500 Windows: Do not prime the service directory cache Performing a directory enumeration is an expensive operation that we should be attempting to avoid. The current directory enumeration and evaluate target requests will use inline bulk status RPCs to the file server which obtain status for 49 items at a time from a single directory. Reviewed-on: http://gerrit.openafs.org/6502 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b92a676517084432c64e1ccb1efff59e7bcbe088) Change-Id: Icee92415f44563d02c1ea212b461d0df007471fb Reviewed-on: http://gerrit.openafs.org/6533 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit df707b59766230df33c081d040e3f684a2de405e Author: Jeffrey Altman Date: Tue Jan 3 23:35:51 2012 -0500 Windows: More specific error values When a mount point, symlink, or dfslink cannot be resolved return STATUS_REPARSE_POINT_NOT_RESOLVED. When an operation fails because the volume is readonly, return STATUS_MEDIA_WRITE_PROTECTED. Reviewed-on: http://gerrit.openafs.org/6501 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6ee54eb3821b70a51cfde8096f2d50d46ead1b8a) Change-Id: Ie9dbe4b68ef0208ae17319c28de194a1c501ecc9 Reviewed-on: http://gerrit.openafs.org/6532 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72f645f6847d78334b1b5ce4b2cf20a35d487575 Author: Jeffrey Altman Date: Tue Jan 3 23:12:34 2012 -0500 Windows: do not flush dirty extents without permission When closing file handles, do not permit dirty extents to be released back to the service if the current handle (Ccb) does not have write permission. The cleanup operation will fail with STATUS_ACCESS_DENIED, the extents will be released and all of the dirty data will be discarded. Reviewed-on: http://gerrit.openafs.org/6500 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit e5a2f955c782ee46d1b24671fd0bac555e11d1a8) Change-Id: Ifd0cc1f76f45a216d359320323942783e3a346c5 Reviewed-on: http://gerrit.openafs.org/6531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7e8ab0d2cb826a54b9397e384ea4debc0ecb7f01 Author: Peter Scott Date: Thu Dec 29 17:23:32 2011 -0700 Windows: Support correct status codes from service When performing object verification, check for status failures corresponding to parent object issues which require a validation of the parent Reviewed-on: http://gerrit.openafs.org/6447 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit af08b745117899d116d4ee14e08e1184369f591f) Change-Id: I353ab7acd126939fc22c34e3ea19cd1191ea0b5a Reviewed-on: http://gerrit.openafs.org/6490 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 29794ad29d9420ec480960c27bfeecbd0c1f6f10 Author: Peter Scott Date: Thu Dec 29 17:30:45 2011 -0700 Windows: Handle invalid node types In the case where the direntry data is invalid, construct an Fcb of type INVALID so that the direntry can be displayed and the objected deleted even if it cannot be evaluated. Reviewed-on: http://gerrit.openafs.org/6445 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 52c3bace5ac4c93883d4913933a58573abded3e9) Change-Id: Icf05af4023cdc1ec38bf642d4fa76adbab59e8a4 Reviewed-on: http://gerrit.openafs.org/6489 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit feeacd5f6b6d6abdb8e3f89afcf77844261b8604 Author: Jeffrey Altman Date: Fri Dec 30 21:45:54 2011 -0500 Windows: AFSFileUpdateResultCB ParentDataVersion Add the parent directory data version to the AFSFileUpdateResultCB structure. Reviewed-on: http://gerrit.openafs.org/6459 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac56cd9e6182742e0b586ea8d833e4c7346e03b8) Change-Id: I79344a710d788cae6f21b7db9ed6a66585fb30bc Reviewed-on: http://gerrit.openafs.org/6488 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fb04de2c928a2f81ab6875b6e4e17cf3b1ffcc17 Author: Jeffrey Altman Date: Fri Dec 30 20:09:06 2011 -0500 Windows: renames that overwrite existing target The Windows client up to this point has never correctly implemented directory renames. For the longest time it assumed that the file server would not replace a pre-existing target. As a result, when the target name was already in use the contents of the directory would end up with the target name existing but its previous file id associated with it. A second problem was that lookups for the source and target names were not performed while the directory (or directories) were exclusively held to ensure that competing changes could not occur. This patchset corrects both issues in cm_Rename() and adjusts the redirector interface to match the new behavior. Reviewed-on: http://gerrit.openafs.org/6457 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 85f4971f850c0110915ba862922c1536ebe506c2) Change-Id: Ie9b5a23114f65d161e1b7fa24b65b57077eff6f6 Reviewed-on: http://gerrit.openafs.org/6487 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 198968075125a362f2cd90ae71e81892767469c1 Author: Jeffrey Altman Date: Fri Dec 30 01:34:51 2011 -0500 Windows: AFSDirEnumResp and AFSDirEnumEntry changes A directory enumeration is not an atomic operation. The redirector reads an enumeration a chunk at a time. During the entire enumeration it is possible that the data version of the directory object has changed due to entries being added or removed. This patchset adds two data version values to the AFSDirEnumResp structure. The first is the snapshot data version which is the dv of the directory object at the time the entry list snapshot was taken. The second is the current data version number of the directory object. If an object has been removed from the directory after the snapshot was taken, attempts to fetch status information for the object will fail with a VNOVNODE (aka CM_ERROR_BADFD aka STATUS_INVALID_HANDLE). The NTStatus field has been added to the AFSDirEnumEntry structure to permit notifying the redirector of such failures. RDR_PopulateCurrentEntry() has been extended with an additional cm_Error parameter that accepts the errorCode field provided by the cm_direnum_entry_t object constructed during the enumeration. Reviewed-on: http://gerrit.openafs.org/6455 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d64983bab047ad6349d2edfe2ffa35b484529889) Change-Id: Ia5907625e172069e24b4b3df3015b9564efbe961 Reviewed-on: http://gerrit.openafs.org/6486 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25c55e614dc7e8e325d97d625253cdfafb1bb29e Author: Jeffrey Altman Date: Fri Dec 30 01:24:27 2011 -0500 Windows: Add AFSFileEvalResultCB In response to AFS_REQUEST_TYPE_EVAL_TARGET_BY_ID and AFS_REQUEST_TYPE_EVAL_TARGET_BY_NAME, return the new AFSFileEvalResultCB instead of a raw AFSDirEnumEntry. AFSFileEvalResultCB includes the data version number of the parent directory at the time the node was evaluated. Reviewed-on: http://gerrit.openafs.org/6454 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f142b615bbac6195aa4e275179f37da490013432) Change-Id: I04e7a45af23c5ddf6e57addc287028d87210c5f1 Reviewed-on: http://gerrit.openafs.org/6485 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5d7dac0be076be03d205b6f293fc2ea2f6aaf513 Author: Jeffrey Altman Date: Fri Dec 30 01:10:08 2011 -0500 Windows: Add AFSFileCleanupResultCB Add AFSFileCleanupResultCB which includes the parent directory data version number. This is necessary because object deletion occurs during the Cleanup processing and the redirector needs to know the resulting data version of the affected directory. Reviewed-on: http://gerrit.openafs.org/6453 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ccd6614c8f92e349e1892fa59f814b615c8816e0) Change-Id: I3f71b7b6c21153dc85bc6944f8217421363d3237 Reviewed-on: http://gerrit.openafs.org/6484 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 44b7f6e6ecb0f47adba613d5410be43c95afa65e Author: Jeffrey Altman Date: Thu Dec 29 18:31:11 2011 -0500 Windows: STATUS_OBJECT_PATH_INVALID == invalid parent directory Modify evaluation of nodes by name and id to consistently return STATUS_OBJECT_PATH_INVALID if the parent FID no longer exists. Reviewed-on: http://gerrit.openafs.org/6446 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9115c437c4113a554f3c3b97c4eaeafea6949600) Change-Id: I138d25e41c115475107e1b98044e4126b183280a Reviewed-on: http://gerrit.openafs.org/6483 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 722c846461737614633c1bfb6732957cbfdaf815 Author: Jeffrey Altman Date: Mon Dec 26 20:46:46 2011 -0500 Windows: Request extents readability Two minor code modifications to make the code easier to read. Reviewed-on: http://gerrit.openafs.org/6433 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e7ecda66eb2054012b4ec153a656ce674d6e70e4) Change-Id: Ic0bef65c01ffe11ab2cdd20f584c39b4d945b19b Reviewed-on: http://gerrit.openafs.org/6482 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8aad60da03e6ea5a423ea63b85184efd15bd5ca0 Author: Jeffrey Altman Date: Mon Dec 26 20:44:36 2011 -0500 Windows: RequestExtents avoid bufWrite if rdr held If the cm_buf_t is held by the redirector the buffer cannot be written back to the file server even if dirty. Therefore, do not check whether or not the cm_buf_t is dirty until after it is known that the buffer is not redirector owned. Reviewed-on: http://gerrit.openafs.org/6432 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 970d6e268011ab4ad8a4857121933514f7768b55) Change-Id: Ib55cf4daef8218a699f19b200c8918208b939e7c Reviewed-on: http://gerrit.openafs.org/6481 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7db630dd2ad01c1155505ca357b43c714f52f49b Author: Jeffrey Altman Date: Sat Dec 31 16:07:00 2011 -0500 Windows: avoid race during Fcb cleanup The worker thread can race with a AFSCleanup() operation and tear down the Fcb before the AFSCleanup() drops the Fcb->NPFcb->Resource. Avoid this race by requiring the worker thread to obtain the resource once before deleting the resource. Reviewed-on: http://gerrit.openafs.org/6462 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2ef57a3ee951660cb69d8656e9293c93b28e0d1e) Change-Id: Id475c8d99e7a7c8cf09fa1e6987cd04ca02d17bc Reviewed-on: http://gerrit.openafs.org/6480 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8fec878646357ae79919ee6de5163bf3af53837e Author: Jeffrey Altman Date: Sat Dec 31 16:04:27 2011 -0500 Windows: avoid deadlock if bulk error during enum If the cache manager has a valid callback at the start of a directory enumeration, the service can begin a bulk status rpc which can fail. The error code from the rpc is never propagated to the caller, therefore the caller loops forever attempting to complete the enumeration with status info. Fix it by returning the error. Reviewed-on: http://gerrit.openafs.org/6461 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e2b42e2cde170102c07937d55db376416cb3965c) Change-Id: I56c59e40401e30e6af3559e149905b81678a0cff Reviewed-on: http://gerrit.openafs.org/6479 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e8687e21d1dee47042456c978f4a32d55ca8346a Author: Jeffrey Altman Date: Fri Dec 30 20:24:49 2011 -0500 Windows: AFSInsertHashEntry can fail If AFSInsertHashEntry() fails, the object information structure that was being inserted is not in the btree. Therefore, ensure that the object does not have the AFS_OBJECT_INSERTED_HASH_TREE or AFS_VOLUME_INSERTED_HASH_TREE flag set (as appropriate). This permits the unreferenced object to be garbage collected. Reviewed-on: http://gerrit.openafs.org/6458 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 36657b8505e3b232158a63b4ecad12fa59548b3a) Change-Id: I650fba32228773300561a642b2607d5e26490312 Reviewed-on: http://gerrit.openafs.org/6478 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2410c02dfd0f4efc82f09f51ef05daedc883c561 Author: Jeffrey Altman Date: Fri Dec 30 12:55:30 2011 -0500 Windows: additional AFSValidateEntry logging Reviewed-on: http://gerrit.openafs.org/6456 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d4eb369e7a5dada7e13585d934a63fa27e0d20ee) Change-Id: I162371150062266cce4a184855a69eb6165c8a65 Reviewed-on: http://gerrit.openafs.org/6477 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 688044b50c9dbe270c3166c65648855b2bfa9761 Author: Jeffrey Altman Date: Thu Dec 29 22:20:38 2011 -0500 Windows: add DV and error status to dir enumerations The cm_BPlusDirEnum family of functions are atomic when generating the directory enumeration but are not atomic with respect to the rest of the system as the enumeration is accessed. Therefore, the data version of the directory at the time the enumeration is created may not be the same as the directory version when the enumeration is fully processed. We therefore store the initial data version in the cm_direnum_t object. When the enumeration is fetching status information for each of the directory entries, it is possible that the fetch status will fail. We therefore store the fetch status error code in the cm_direnum_entry_t object. By doing so, the consumer of the enumeration can make a reasonable decision about the lack of status info. For example, if the resulting error is CM_ERROR_BADFD it is known that the entry has been removed from the directory since the initial enumeration. Reviewed-on: http://gerrit.openafs.org/6452 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ad3c00520b93174808f692ced3e35261030a8c1b) Change-Id: Ic843e33af6e461922850d04a83ad630d4834a695 Reviewed-on: http://gerrit.openafs.org/6476 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9f2780de0c1eb7a9f2f1e6f192e3043679a3ea2b Author: Jeffrey Altman Date: Thu Dec 29 22:18:59 2011 -0500 Windows: protect merge status against dscp == scp If the directory status object is the same as the object for which status info is being merged, the object will refer to itself as its own parent. Do not permit that. Reviewed-on: http://gerrit.openafs.org/6451 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9b42af9326dbf34a7a657a7d4a2ea6d845c845e1) Change-Id: Id6548405ba099f7ffdaad5859e0c9ca748efaaa1 Reviewed-on: http://gerrit.openafs.org/6475 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e723e6f0faf95b973387af6b00a012374838455a Author: Jeffrey Altman Date: Thu Dec 29 19:58:19 2011 -0500 Windows: protect dir ops by CM_SCACHESYNC_STOREDATA CM_SCACHESYNC_STOREDATA is used to ensure that only one directory modifying rpc can be issued to the file server at a time on a single cm_scache_t. However, the local directory modifications were being made after cm_MergeStatus() and cm_SyncOpDone() were called. As a result, serialization of changes against the local directory buffers and b+tree was lost. Reviewed-on: http://gerrit.openafs.org/6450 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 60992d4ffb94a8472ccff3ff7890c34e2572688d) Change-Id: Id37ce6b75535c95e93fc16d976ddbba9428fef97 Reviewed-on: http://gerrit.openafs.org/6474 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 81fabf594df051922c5bea2f07def5a09c17cd64 Author: Jeffrey Altman Date: Thu Dec 29 19:19:04 2011 -0500 Windows: init scache DV=CM_SCACHE_VERSION_BAD zero is a valid DV. CM_SCACHE_VERSION_BAD is not. Reviewed-on: http://gerrit.openafs.org/6449 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit dc06ebad8ba7a58c1561ddd03f0a8a79e610d7c7) Change-Id: Ie2e8446386fb6a9b531f7273dc07a1b589b13c99 Reviewed-on: http://gerrit.openafs.org/6473 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b09bc9ba0a79a1537893a0c43765a01d58013732 Author: Jeffrey Altman Date: Thu Dec 29 12:45:16 2011 -0500 Windows: afsredirlib log messages Improve or correct a number of log messages. Report the correct FID or NT Status value, etc. Reviewed-on: http://gerrit.openafs.org/6442 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 83c52997b7b9e4d91a0263fbd26ec19fb2092d9c) Change-Id: I98d6c6cb0ed3280f9854fdb8e824590251211582 Reviewed-on: http://gerrit.openafs.org/6472 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c5e9aabd392496db072a49d6b80d60969a09d3db Author: Jeffrey Altman Date: Thu Dec 29 12:42:26 2011 -0500 Windows: Symlink resolve failure error If a symlink cannot be resolved, return STATUS_REPARSE_POINT_NOT_RESOLVED instead of STATUS_ACCESS_DENIED. The symlink is after all a reparse point. This results in a more meaningful error being delivered to the end user. Reviewed-on: http://gerrit.openafs.org/6441 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit ea0865e3266884f15a05bb3edd316f5ce8f972ed) Change-Id: I0a78cd70d7e59f8e4f6cfd98a7e35f1e151f82da Reviewed-on: http://gerrit.openafs.org/6471 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72cc8e53dcfcdf6c6ef2d802d0e741e2137a3687 Author: Jeffrey Altman Date: Wed Dec 28 17:08:23 2011 -0500 Windows: Make idle dead timeout very long The idle dead timeout processing must eventually be removed from Rx for initiators. In the meantime, make the timeout period ten times longer than the hard dead timeout. This permits eventual failure when the server doesn't respond in ten minutes but avoids more transient issues. Reviewed-on: http://gerrit.openafs.org/6440 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 07655bc23e2ab7b5d0c808d79b3c7838a01eacfa) Change-Id: I4fe69fc3d94eb20aaad5abd49f46aed0fc42ee8d Reviewed-on: http://gerrit.openafs.org/6470 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ed4078e8d70cdc99323fd427ddbc5c6d97d89843 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: I4be514a23f5dc2f8bb1bd0eb222764577727823e Reviewed-on: http://gerrit.openafs.org/6469 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa085200a5da3164861c8bd92fe223077fec1445 Author: Jeffrey Altman Date: Mon Dec 26 20:59:21 2011 -0500 windows: osi_TSignalForMLs simplify Simplify logic for readability and efficiency. Reviewed-on: http://gerrit.openafs.org/6438 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5d11bd665cd93b736f735d689f703e44f865cefc) Change-Id: Ib31fe2eb9ebcf064e5a330c585db4a5a99ddbf26 Reviewed-on: http://gerrit.openafs.org/6468 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6e84360fc2422e4367c143ab568b4975ac85ab58 Author: Jeffrey Altman Date: Mon Dec 26 20:56:38 2011 -0500 Windows: osisleep do not tamper with queues There is no need to manually remove an entry from a queue before executing osi_QRemoveHT(). osi_QRemoveHT() removes the item from the queue and fixes up the pointers correctly. Manual intervention is a waste of cpu and can be harmful. Reviewed-on: http://gerrit.openafs.org/6437 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit f6f95ac4bfc5e504c1b825fd52b787d12a89e53c) Change-Id: I8e18f6e4ca0b7348009bd2196373420424ddf108 Reviewed-on: http://gerrit.openafs.org/6467 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 90ed9c443c9844e03844650007208bb3698be9ef Author: Jeffrey Altman Date: Mon Dec 26 20:55:22 2011 -0500 Windows: osi_sleepInfo tid type The thread id type is DWORD not size_t for consistency with the rest of the client_osi package. Reviewed-on: http://gerrit.openafs.org/6436 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 4c2190784f1d4bb613cc140b8d189f0ab4ae10fc) Change-Id: I0ebde75b5286d81d3f310cfed92ed873eb1247ee Reviewed-on: http://gerrit.openafs.org/6466 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f9817fa6e92aaf6d2cf353ae6437c93f6e6cc8b6 Author: Jeffrey Altman Date: Mon Dec 26 20:51:33 2011 -0500 Windows: add osi_TWaitExt(), fix osi_TWait() osi_TWait() was adding new locks to the turnstile at the tail which is the end of the queue locks are removed from. This implemented LIFO instead of FIFO when FIFO is the "fair" order to service lock requests. osi_TWaitExt() is added to permit the Reader to Writer upgrade request to use LIFO when more than one reader is present. Reviewed-on: http://gerrit.openafs.org/6435 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3011a8228a04a54e04f5626e9f686840a25f2d5f) Change-Id: I33d8592db2999b80d6f03060b0208b76b7101c30 Reviewed-on: http://gerrit.openafs.org/6465 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 644a9b912c4b0adcb8e0be185938e094747b6242 Author: Jeffrey Altman Date: Mon Dec 26 20:48:24 2011 -0500 Windows: use waiters counter instead of osi_TEmpty The osi_TEmpty() macro examines the values of the turnstile pointers. Instead use the lock's 'waiters' counter to determine if there are waiting threads to signal. Reviewed-on: http://gerrit.openafs.org/6434 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2b6a8d384bd4426a61c72e79c34ffd75a03e612e) Change-Id: I089109d532dbdc0da2bc3ee58d775e8ca7f0a813 Reviewed-on: http://gerrit.openafs.org/6464 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit db3c8f1559c0cba2c1f45edee487e732686cd9a6 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: Ia41c7ddfa1c6cd0d3e3ded2d8be12dfa5bc13cfe Reviewed-on: http://gerrit.openafs.org/6463 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0679bba56868ddbac3ed7eaa5b43064ceec3d55 Author: Peter Scott Date: Fri Dec 23 17:00:57 2011 -0700 Windows: Avoid bottleneck on VolumeLock The VolumeLock resource was obtained during each AFSParseName() and held across a wide range of operations including volume info queries, renames, and extent requests. These operations can take a long time to complete and as long as the VolumeLock was held exclusively there could only be one operation in flight at a time on a given volume. This significantly reduced the parallelism of operations. The VolumeLock was not required in almost all cases. This patchset adjusts the use of the VolumeLock and avoids the bottleneck. Reviewed-on: http://gerrit.openafs.org/6420 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3ca42749357edc97922918d04558deb268fe78f0) Change-Id: I1f1ef64e82ca01169e61ba8ceb6cab113129d2fa Reviewed-on: http://gerrit.openafs.org/6429 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c42f353615de2230250a4f7a4d5f78802f86700 Author: Jeffrey Altman Date: Sat Dec 24 03:15:53 2011 -0500 Windows: avoid race in cm_GetNewSCache The cm_scacheLock is dropped while walking the scache LRU queue. As a result it is possible for the cm_scache_t that is being considered for recycling to be accessed and moved to the head of the queue. Track the prev and next pointers so it is possible to detect if the cm_scache_t that is about to be recycled has been moved. If so, restart the search from the tail. Reviewed-on: http://gerrit.openafs.org/6424 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ff368a7ec70fca0673a21f6b283db13cabcc2286) Change-Id: Ib13ee103cf06b211ca1307e530db379825a9ad62 Reviewed-on: http://gerrit.openafs.org/6428 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1eada9bff005490de3d715729b7b1ff23ce53186 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: I8d0c6570488115d3ea60e757113fbb466b4a772f Reviewed-on: http://gerrit.openafs.org/6427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c154a2f78df790eb563cd90ef0eb3b815f3f61fb Author: Simon Wilkinson Date: Sat Dec 24 17:23:48 2011 +0000 rx: Don't adjust non-existent events If we notice that time has gone backwards (that is, the current time is older than the time of the last event we fired), then we reschedule all pending events. On Windows, immediately after we have resumed from a suspend, this code path can be executed with an empty event tree, causing an exception: FAULTING_IP: afsrpc!adjustTimes+cf [c:\src\openafs\openafs.git\repo\src\rx\rx_event.c @ 213] 00000000`61041847 4c8b4030 mov r8,qword ptr [rax+30h] EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 0000000061041847 (afsrpc!adjustTimes+0x00000000000000cf) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 0000000000000000 Parameter[1]: 0000000000000030 Attempt to read from address 0000000000000030 Resolve this by checking for an empty tree before we attempt to adjust event times. If the tree is empty, we just zero the last event time (so we don't keep running the adjustTimes routine), and continue as normal. Reviewed-on: http://gerrit.openafs.org/6425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5f939c64e575dab937feda819937ce3087a2d2e8) Change-Id: Id765b115745a6d16fce731ed957f150fffe7e1f1 Reviewed-on: http://gerrit.openafs.org/6426 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e9c95bcc49ca1ac3e747698b276c843be4f369ab Author: Jeffrey Altman Date: Wed Dec 21 21:47:56 2011 -0500 Windows: AFSCleanup extent processing 1. Perform a CcFlushCache() any time the file is cached and the Context Control Block indicates that the handle has FILE_WRITE_DATA permission. 2. Perform an AFSFlushExtents() whenever there are dirty extents and the handle has FILE_WRITE_DATA permission. No point flushing the extents if the AuthGroup does not have write permission. Another Ccb must exist that does have write permission. Reviewed-on: http://gerrit.openafs.org/6399 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e18c620aa0e49fde31beaa8327bf02eb87d89e3f) Change-Id: Id090761b8a389d3f4f56654698e7935aa38ec0d3 Reviewed-on: http://gerrit.openafs.org/6409 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 92b8320fd90579e471d18507f7bcb1efb34dc198 Author: Jeffrey Altman Date: Wed Dec 21 21:37:41 2011 -0500 Windows: AFSRetrieveValidAuthGroup FILE_READ_DATA Only an AuthGroup belonging to a Context Control Block that was granted the FILE_READ_DATA permission is capable of reading data from the file server. Reviewed-on: http://gerrit.openafs.org/6398 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 68b10efa7dbabbedbb95928dccac29ed8d4179c4) Change-Id: Ia7d1eb9c4a27ee97d00ec2764a16180e3e85135b Reviewed-on: http://gerrit.openafs.org/6408 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4a7457d9ef2e5482795500f13cf639135f351db5 Author: Jeffrey Altman Date: Wed Dec 21 21:34:14 2011 -0500 Windows: AFSRequestExtentsAsync retry with alt authgroup If AFSRequestExtentsAsync() fails to obtain requested extents due to STATUS_ACCESS_DENIED using the AuthGroup associated with the Context Control Block, try to find an alternate AuthGroup to use to perform the extent request. We have already told Windows what permissions the application has when the file was opened. Windows will perform its own validation checks prior to permitting the data to be accessed or altered. Reviewed-on: http://gerrit.openafs.org/6397 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4fa01ad7fc5434ca5ca42f30407d47c736f8b000) Change-Id: I0a7963c3a7c44497c33403ee7c70260a9ebb49a3 Reviewed-on: http://gerrit.openafs.org/6407 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 282173fc8b9a11f6931064feb110a27e3399f0ea Author: Jeffrey Altman Date: Wed Dec 21 21:17:33 2011 -0500 Windows: Use AuthGroups for extent request error reporting The afs redirector current tracks the most recent extent error in the File Control Block. Prior to this patchset the error was returned to the requesting thread when the process Id matched the most recent Process to issue a request. This approach resulted in a couple of problems. 1. There are multiple threads that can issue an extent request on the same file at the same time representing different processes. Resetting the process Id with each new request could clear the error prior to its receipt. 2. The failure may be due to inappropriate permissions. Permissions are not associated with proceses but with Authentication Groups. This patchset makes several changes: 1. It enables the afsd_service to track the active authgroup as part of the cm_user_t structure and associates that object with the BIOD object to ensure that the active authgroup can be reported to the afs redirector. 2. It modifies the AFSExtentFailureCB structure to include the AuthGroup GUID. 3. It tracks the AuthGroup GUID associated with the extent failure in the non-paged file control block. 4. It converts all tests on Process Id to use AuthGroup instead. 5. It alters the behavior of error delivery such that reported error is only cleared after it has been reported once to a thread using the matching AuthGroup. These changes make the situation better but not perfect as error states can still be lost. However, it avoids the case most often seen in production where two processes (a end user process and an anti-malware process) are fighting over a file and the anti-malware process has no permission to access the file under its own credentials. Reviewed-on: http://gerrit.openafs.org/6396 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b9ca435dcb5433218ecbb37ab41b85dabe0a5912) Change-Id: I3f32ffda5cc7091854488aba66a8549ea7470141 Reviewed-on: http://gerrit.openafs.org/6406 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f531a62da46ff3f11a4a3b3e06ddd0eb06d3406a Author: Jeffrey Altman Date: Wed Dec 21 21:10:45 2011 -0500 Windows: Explicit permission check on extent release When a data extent is released by the afs redirector or the afsd_service performs an extent claw back during a cleanup operation, perform an explicit permission check before attempting to store dirty buffers to the file server. Instead of waiting for the file server to fail the request, fail it immediately. The permission check is performed using the currently active authentication group. Reviewed-on: http://gerrit.openafs.org/6395 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7e26dfd6dc893d14717aad411460fc781acc4001) Change-Id: Ib1a4e3854482f197a97d558a802c69109bec9663 Reviewed-on: http://gerrit.openafs.org/6405 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 633f3ab87c4f4f9d9d119483187d01fed22fff23 Author: Jeffrey Altman Date: Wed Dec 21 21:08:59 2011 -0500 Windows: RDR_CleanupFileEntry restrict extent claw back Only demand that extents be returned by the afs redirector if this cleanup is the last open handle or the redirector has requested that the file be flushed to the file server. Reviewed-on: http://gerrit.openafs.org/6394 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6cd09ca2e699d2f9817b897e7165fac60560adcc) Change-Id: Ia89fb27eeb458b68f13bbb2fcfed17ade918c382 Reviewed-on: http://gerrit.openafs.org/6404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5d96d48f944ca845dae6f26e0cc36cda63fd5f5b Author: Jeffrey Altman Date: Wed Dec 21 21:03:52 2011 -0500 Windows: remove unused AFSRequestExtents() Reviewed-on: http://gerrit.openafs.org/6393 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f6c85f40c06ddb2e527fcd9c39cba779bc82485b) Change-Id: I22befd94571e2e418733e1db4bc911b78ff5cb79 Reviewed-on: http://gerrit.openafs.org/6403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a7f977d9fc0c8f74c73715a8a0cb9f2f258618c5 Author: Jeffrey Altman Date: Wed Dec 21 20:49:59 2011 -0500 Windows: Bad DV invalidate only when new DV not 0 If the current DV is BAD_VERSION and the new DV is 0, do not send an invalidation to the redirector. It only results in wasteful work. If the current DV is BAD_VERSION the object either: 1. was never previously known 2. was recently flushed 3. the cm_scache_t was recycled In all cases, the redirector does not have knowledge of the object since either it didn't exist or a previous invalidation was sent. Reviewed-on: http://gerrit.openafs.org/6392 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7a1c8e57a08dcebce2f3b861a0d7bbabcc5272ba) Change-Id: Icaaa61adf076af43444ec9884cd81da5ed4fa173 Reviewed-on: http://gerrit.openafs.org/6402 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 872acf267312a1af8af886993e9a78061f485a4a Author: Jeffrey Altman Date: Wed Dec 21 20:45:19 2011 -0500 Windows: Define times in terms of AFS_ONE_SECOND The afs redirector defines the macro AFS_ONE_SECOND to indicate the number of 100ns units necessary to indicate one second of time. Use that definition when defining other time values. Also define AFS_ONE_MILLISECOND and AFS_ONE_MICROSECOND. Reviewed-on: http://gerrit.openafs.org/6391 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f417dba69230c6b72882ca614a3a8c5691fe561c) Change-Id: Iacecbccb3b791198338e9d71d2314d4c5c9e6cf1 Reviewed-on: http://gerrit.openafs.org/6401 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 67418ecf80a48662aefe7763601ef200f02b4a38 Author: Jeffrey Altman Date: Sun Dec 18 19:23:45 2011 -0500 Windows: version 1.7.4 Change-Id: I75331de08d274c192dbd84172fd77d00d66d3c18 Reviewed-on: http://gerrit.openafs.org/6381 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 62cb0545e58b52ed2c4667c023e6f27a875b5d8a Author: Jeffrey Altman Date: Sun Dec 18 12:08:01 2011 -0500 Windows: ChangeLog for 1.7.4 Change-Id: Ia68d35422fe8c3526ddf77aec7c0f701c02e2dd1 Reviewed-on: http://gerrit.openafs.org/6380 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91e925277707d0e4951d20cbfdb6b3c90fff95ab Author: Jeffrey Altman Date: Sun Dec 18 18:36:14 2011 -0500 Windows: avoid deadlock during SetRenameInformation The VolumeLock must be held before the Fcb->NPFcb->Resource. Obtain the VolumeLock in AFSSetFileInformation only in the rename case instead of obtaining the VolumeLockin AFSSetRenameInformation. Reviewed-on: http://gerrit.openafs.org/6377 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ad2965bad8e8b2f085d05be661086dc81da52d3) Change-Id: I25f15d4a1de563df6e5ed4ba678e0ce9b0a58323 Reviewed-on: http://gerrit.openafs.org/6379 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f297830f834f2a6d496ce6d7f9c9fa630232473d Author: Jeffrey Altman Date: Sun Dec 18 12:08:24 2011 -0500 Windows: terminate HOSTS/LMHOSTS with newline If the original file did not terminate with a newline, add one before appending the "AFS" entry. FIXES 130210 Reviewed-on: http://gerrit.openafs.org/6375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d8f9141fa98df50ce682364ef5a7958ce422613) Change-Id: I4aa1644436f7a4eb80c0a3ab757e8363b0193f3f Reviewed-on: http://gerrit.openafs.org/6378 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 526918cb2ecea86cea9cd8c78c1983f8cca50b71 Author: Jeffrey Altman Date: Fri Dec 16 00:12:39 2011 -0500 Windows: save fid/type for redirector invalidation Must save the fid/type fields of the cm_scache_t object before recycling in order to invalidate the contents in the redirector. Reviewed-on: http://gerrit.openafs.org/6359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit db9e5775dd26e6362820b7267f8d971f62dfe2ed) Change-Id: Ifdaca37a68f4a159149738f14a47bd800d19ec96 Reviewed-on: http://gerrit.openafs.org/6366 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6f5474dc1acc08c4c792a5c1ca98af4a4f71d96 Author: Peter Scott Date: Wed Dec 14 12:27:54 2011 -0700 Windows: Track AuthGroup in Context Control Block Tracking the AuthGroup in the File Control Block proved to be insufficient to ensure that dirty extents can be stored back to the file server when an anti-virus service opens a file in authgroup without 'write' permission immediate after the application performing a WriteFile() opens it. In this situation the Fcb ends up with the AuthGroup set to the anti-virus value and not the one that belongs to the writing application. Tracking the AuthGroup by Ccb provides the ability to select an AuthGroup from the list of open handles instead of tracking the most recent one. Reviewed-on: http://gerrit.openafs.org/6333 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 92bfaae062c596d678220dcb93f9dc61304d3c5a) Change-Id: I8c3775d7e4ca8c0747309d3f081fb5d01f74b996 Reviewed-on: http://gerrit.openafs.org/6374 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 73e785e7d8ef9549d00e408b34fa5281185f552f Author: Jeffrey Altman Date: Sat Dec 17 12:14:28 2011 -0500 Windows: Tear down extents upon file deletion When processing AFS_INVALIDATE_REMOVED, tear down all extents since they are no longer necessary and return them to the service for recycling. Change-Id: Iec6c0d2c68db16dbf3bd04c51536e13d45f0c1b8 Reviewed-on: http://gerrit.openafs.org/6365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 714ae7f1840757e0575d25c910b0b9fa2499e354) Reviewed-on: http://gerrit.openafs.org/6373 commit 8f448cb6fe838037d7a68f7d70b76bb6de19f4bc Author: Jeffrey Altman Date: Sat Dec 17 12:13:17 2011 -0500 Windows: notify file size change if flushed When processing AFS_INVALIDATE_FLUSHED, notify any listeners that the file size has changed to force a complete refresh. Reviewed-on: http://gerrit.openafs.org/6364 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit c29dc399769c54bbab4af5bd4f828f0d49755860) Change-Id: Idc13f09dd8458881cd1b94e0a3902092116b347c Reviewed-on: http://gerrit.openafs.org/6372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72a6715b379ca9c36ba4d0184528b4abb114db2c Author: Jeffrey Altman Date: Sat Dec 17 12:08:49 2011 -0500 Windows: forget data version only for flushing The AFS redirector was intentionally forgetting the data version number for AFS_INVALIDATE_DATA_VERSION events. The point of that event is to ensure that clean data be purged if the data version in fact changed. Checking the data version for change cannot be performed if the data version is reset to -1. Only when AFS_INVALIDATE_FLUSHED is processed should the data version be reset to ensure that all of the data is purged. Reviewed-on: http://gerrit.openafs.org/6363 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20d986fddf6b21abc58b2f3c24aac425cf5d2bf0) Change-Id: I4c45b5f5b8738d057621059f34faa0670b5f1545 Reviewed-on: http://gerrit.openafs.org/6371 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f2a3371c5f18c69e334814170e640f58cc703fa6 Author: Jeffrey Altman Date: Sat Dec 17 12:07:53 2011 -0500 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/6362 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit ef31f0f6d1f23bcd882740db4d54a9ffea6e0a64) Change-Id: I5255bd95e308a540ced80c622cfedf5e1776ce27 Reviewed-on: http://gerrit.openafs.org/6370 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4632975defcda4a508bbbbaa1510721fa4619ff2 Author: Jeffrey Altman Date: Sat Dec 17 11:57:15 2011 -0500 Windows: AFSSetRenameInfo log message Fix a typo in the log message and change its priority from error to verbose Reviewed-on: http://gerrit.openafs.org/6361 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 20c871cc67f332f77b1b766f15b2659c0fab8e40) Change-Id: Id5f18a6c33619265bbd590acba68a09c8a8f4a71 Reviewed-on: http://gerrit.openafs.org/6369 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 71a45192777562054d1920428e760d872eb2af19 Author: Jeffrey Altman Date: Fri Dec 16 17:24:36 2011 -0500 Windows: return error to system paging requests If an error has been set on a file, return that error to the System process for any outstanding extent requests. Reviewed-on: http://gerrit.openafs.org/6360 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit d142082caed1eba870ffee017193883a0508306e) Change-Id: I9181665a8df899f72bca113da67ec1a388a9723f Reviewed-on: http://gerrit.openafs.org/6368 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit adea911be96b6df5529e5f8f50ef6ed116c4fbbe Author: Jeffrey Altman Date: Fri Dec 16 18:24:50 2011 -0500 Windows: log volume and authgroup for redir open If opening a volume root fails, log the authgroup and volume to make it easier to debug the error. Reviewed-on: http://gerrit.openafs.org/6352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 307856353c3f168105ce82f3f3fa8e4c5efb0b6c) Change-Id: Ib35ea15775cdbd5d6b4ab39d900a2f4d37942f51 Reviewed-on: http://gerrit.openafs.org/6367 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2de29702cd5ac928f3bd88a973eaa100f9bdf0a9 Author: Jeffrey Altman Date: Fri Dec 16 17:22:49 2011 -0500 Windows: move to head of queue no-op if not in queue If the buffer is not in the queue, do nothing. Reviewed-on: http://gerrit.openafs.org/6351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0b2639ff4fd732dfac2c1dc058d6c517cc966737) Change-Id: Iacc2e9ab5c8502b9c5e125513cd25a805edff366 Reviewed-on: http://gerrit.openafs.org/6357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a3376c0765bacc139ba194d2c5bc104d72ba7905 Author: Jeffrey Altman Date: Fri Dec 16 16:15:56 2011 -0500 Windows: Properly convert FID structures Use the FID conversion function in RDR_SetFileStatus(). The FID structures are not the same in afsd_service and the afsredirlib.sys driver. Reviewed-on: http://gerrit.openafs.org/6350 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b63ff1319e0ebecdfbdef7365d49d02543bccce8) Change-Id: I897448870ee5eba1aaf45e066e261e4c3ea0529d Reviewed-on: http://gerrit.openafs.org/6356 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5ad8376c57d677e010fb6fe45afd4266eab109f5 Author: Jeffrey Altman Date: Fri Dec 16 11:43:32 2011 -0500 Windows: propagate directory enumeration failures If a directory is enumerated with an AuthGroup that has no permissions, do not treat the enumeration as successful. Reviewed-on: http://gerrit.openafs.org/6344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b3e6db22a1755b7633b522dfe5cbb61949e06466) Change-Id: I38acef1c143cb3821aca5d9527ddf12aff8f94ad Reviewed-on: http://gerrit.openafs.org/6355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ae13423fab775a6b2bedc890c53d626c4c53b0c1 Author: Peter Scott Date: Thu Dec 15 17:52:54 2011 -0700 Windows Problem with cross-directory rename Not correctly handling cross-directory rename processing Reviewed-on: http://gerrit.openafs.org/6343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f73685c233974403fe63795303cd1659c5bcb2af) Change-Id: Ie3a87bf2767ab966b945e327a9770d16e2de065f Reviewed-on: http://gerrit.openafs.org/6354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec8f5e7682ac322b06d6189763553df1249faae0 Author: Jeffrey Altman Date: Wed Dec 14 12:58:36 2011 -0500 Windows: Update Adv Firewall Rules Do not specify the Service Name property. According to feedback on openafs-info the Service Name blocks the rule from working properly. If the rule already exists, attempt to remove the Service Name filter and update NAT Edge Traversal and Permitted interface rules. Reviewed-on: http://gerrit.openafs.org/6332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d472f94ab1017724e56bcdd29b9ef451a13f182) Change-Id: I81d083321c5ada5451d1a63166d5d9604652fe6c Reviewed-on: http://gerrit.openafs.org/6353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d9441580223afd8dcaf396cde1992bf04bc7e755 Author: Jeffrey Altman Date: Tue Dec 13 23:28:15 2011 -0500 Windows: AFSRDFSProvider stack overrun StringCchXXX functions take the number of characters not the number of bytes. Use StringCbXXXX functions whenever the buffer size is being specified. Check return codes from StringXXXXXX functions and return errors instead of blindly continuing with a truncated string. Allocate a larger buffer for substitution strings since they need to handle the device path plus the target path. FIXES 130392 Reviewed-on: http://gerrit.openafs.org/6248 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit da89855b492d8d06128ed62b219dc968f5b38a9d) Change-Id: I85207bddcf5ba92c7ba6783404837cc1c4fa5f2e Reviewed-on: http://gerrit.openafs.org/6258 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 506032be33efb89a348a0e1c0611c43fa356252c Author: Jeffrey Altman Date: Sat Dec 10 13:28:17 2011 -0500 Windows: memory leak when setting tokens via smb The SID string of the RPC used to set the token sessionKey was being leaked. Be sure to free it when it is no longer required. Reviewed-on: http://gerrit.openafs.org/6244 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f30d70ba5575753302be0a2b08c27a639898d4aa) Change-Id: Id7728420ee32c2144b8c87a5e9e82ea91837b0af Reviewed-on: http://gerrit.openafs.org/6246 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8bc3dfc3d7e2f99edd8c1c293c03ee4813bb061a Author: Jeffrey Altman Date: Fri Dec 9 18:40:42 2011 -0500 Windows: Suspend/Resume for afsd_service The power mgmt events are received in the service. The service can block all requests from the redirector from being processed until it knows that it is safe to process them. The service will receive a SERVICE_CONTROL_APMSUSPEND just before the system goes to sleep. The service has two seconds to respond and it uses that time to attempt to send RXAFS_GiveUpAllCallBacks to all file servers as an rx_multi with no wait. It also marks all servers down and updates the callback expirations to be just after the servers were marked down so that they will be forced to be refreshed when the server is marked up. Upon resume the service receives two events. First, SERVICE_CONTROL_APMRESUMEAUTOMATIC which is used to perform an SMB lan adapter change detection and perform a probe of all down servers. The second, SERVICE_CONTROL_APMRESUMESUSPEND is used to resume SMB listeners, perform a 2nd lan adapter change check (just in case), check the status of all down servers in additional networks have come up, and finally resume processing of redirector requests. With these changes no special logic in the redirector is required. Reviewed-on: http://gerrit.openafs.org/6243 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 41d145b303d61aa6f8f336e4d66748dea860d08f) Change-Id: I8a0d105c790c127320409e89913e399b7a35ffd5 Reviewed-on: http://gerrit.openafs.org/6245 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 60824032b97b7975f68751a38a4535546e781612 Author: Jeffrey Altman Date: Thu Dec 8 10:00:57 2011 -0500 Windows: increase timeout for extent request retries The AFS Redirector requests file data extents from the afsd_service.exe. If it does not receive the requested extent within 10 seconds it issues another request for that extent. Extent processing in the afsd_service is handled by background daemons that process tasks serially from a work queue. When the load on the system is large enough that satisfying the work queue takes longer than 10 seconds, the redirector would retry the request. This would increase the length of the work queue and increase lock contention. Increasing the timeout period for extent retries to two minutes significantly reduces the number of retry attempts while maintaining protection against a lost extent request. Two minutes is selected because that is the rx hard dead call timeout. Reviewed-on: http://gerrit.openafs.org/6237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f238d4854d1f32836228f2d191c8a9d265d4b181) Change-Id: I13003826aee5a2d110e03e6b3293d60fabe7eed8 Reviewed-on: http://gerrit.openafs.org/6239 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d6f03583c41c95d1001d85d0fc93216ead9196b Author: Peter Scott Date: Wed Dec 7 20:29:00 2011 -0500 Windows: include owner/group in Security DACL Include the World (Everyone) SID as the owner and group for all files in AFS. FIXES 130343 Reviewed-on: http://gerrit.openafs.org/6236 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f2c0c51f781495be0d28a75e5d7a786bbe9dddda) Change-Id: If6bdba2387737217ac5cb52b591997a0ebd72f45 Reviewed-on: http://gerrit.openafs.org/6238 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef766c5024646f08eb9808cda7efc4ae9bb33217 Author: Jeffrey Altman Date: Sun Dec 4 14:32:11 2011 -0500 Windows: version 1.7.3 (1.7.0300) Change-Id: Ib55cc7dc17f98eb3d1b7590d10a764b5d581c3e8 Reviewed-on: http://gerrit.openafs.org/6226 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47aa318ed79e3eabb4a3eba8bd6e73b7f7c671ea Author: Jeffrey Altman Date: Sun Dec 4 13:42:08 2011 -0500 Windows: Release Notes Updates Updates for 1.7.3. Grammar improvements. Reformatting. Reviewed-on: http://gerrit.openafs.org/6222 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 942dae0dd02f2e222ace5d003b1c55397a4018ff) Change-Id: Idc2fc530097fcdacbf51f572ffe4836664406a96 Reviewed-on: http://gerrit.openafs.org/6225 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 911e27a33f2284f191b9c5ca40c4b9382ed80b14 Author: Jeffrey Altman Date: Sun Dec 4 14:24:57 2011 -0500 windows: 1.7.3 change log Change-Id: Ia38b4cd92bba1c3ee13007b40a396b2f24a89bb2 Reviewed-on: http://gerrit.openafs.org/6224 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9e6e784634216ab62a962506b8dda00f38d7d96c Author: Simon Wilkinson Date: Sun Nov 20 18:11:53 2011 -0500 rx: Make CALL_RELE and CALL_HOLD lock refcnt mutex The reference count mutex must always be held when calling CALL_RELE or CALL_HOLD. Instead of requiring that the caller obtain, and release the mutex, do so within the HOLD and RELE macros, greatly simplifying calling code. Provide CALL_RELE_R and CALL_HOLD_R as versions of these macros which can be used by callers who already hold the reference count mutex for other purposes. Reviewed-on: http://gerrit.openafs.org/6219 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 57316878e03691f7e320013b21f0c7640877e11e) Change-Id: Ifa63adc280b4499ba1f541fe242612bc33f8e603 Reviewed-on: http://gerrit.openafs.org/6221 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1764b4030c26bd3beb785614af6405bb1a215fdd Author: Simon Wilkinson Date: Sun Nov 20 18:07:41 2011 -0500 rx: Helper function for decrementing conn refcnt The code to lock the reference count mutex, reduce the connection reference count, then unlock the mutex, is duplicated many times throughout rx.c. Replace all of these multiple copies with a single inline function. Reviewed-on: http://gerrit.openafs.org/6218 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit aefb10920740e537aa26d841d16302e6ce8e3d76) Change-Id: I01b5ef952345188b35138b62d0f241c198c3a265 Reviewed-on: http://gerrit.openafs.org/6220 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit afaaecb84fc8006dce922568c2118632fb1b4106 Author: Simon Wilkinson Date: Sun Nov 20 16:31:28 2011 +0000 rx: Hide the rx_packet.h Hide the rx_packet.h, and hence the rx_packet structure from application view. rx_packet.h is currently still installed, and is included directly by RX security classes, to reduce the per-packet overhead there. Reviewed-on: http://gerrit.openafs.org/6182 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 64b00c3a1a87739621f58c777fc3cc54fb15a0af) Change-Id: Icca1e80e898b2f034ed22b6f2a2381bf3b57ae3f Reviewed-on: http://gerrit.openafs.org/6217 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c1db73bf33c67230d810a7d69dfe8c5e5d62ccc Author: Jeffrey Altman Date: Sat Dec 3 21:20:05 2011 -0500 Windows: define MIN and MAX MIN and MAX are used throughout the tree. Windows does not define them. A future patchset should convert the openafs src tree to use min and max. Reviewed-on: http://gerrit.openafs.org/6209 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a57f6434e81539d3f261f0dd57327ae4dcd98caa) Change-Id: Ie106fbf08445ebcb1ce66379125a1c3a19222e58 Reviewed-on: http://gerrit.openafs.org/6216 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 475e526fbaea715e792cf032d54aca2770df8782 Author: Simon Wilkinson Date: Sun Nov 20 14:58:28 2011 +0000 rx: Make the rx_call structure private Hide the rx_call structure for public view. Provide accessors for those elements which are currently accessed by applications. Note that this change as it currently stands removes the visibility of the last sent time, and sequence number information, from the VolMonitor function. Reviewed-on: http://gerrit.openafs.org/6181 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d3eaa39da3693bba708fa2fa951568009e929550) Change-Id: I3e9aa35d8c4759ce9d5f16bb2c9af99f0bf1f477 Reviewed-on: http://gerrit.openafs.org/6215 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0681e7998e360365fbf69c581da213493710730f Author: Simon Wilkinson Date: Tue Nov 15 10:40:44 2011 +0000 rx: Make struct rx_connection private Move the rx_connection structure into a private header file, so that it is only visible from within the rx module. This allows us to use types within the structure that are not visible to everywhere that includes rx.h, as well as being a step towards a more stable ABI for RX. Add accessor functions for all of the connection members which are currently used by external callers, and modify those accessors which were implemented as macros to also be functions. Change all external access to the connection structures to use these new functions. Reviewed-on: http://gerrit.openafs.org/6180 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aa76c8f670012d4591489db374bad48118defa36) Change-Id: I9cd702cf8f9833f1b3368f3f6f8913155963e637 Reviewed-on: http://gerrit.openafs.org/6214 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69c0033ac68ca83107a6a75cc97bc9b15f6040b7 Author: Jeffrey Altman Date: Sat Dec 3 17:49:47 2011 -0500 Windows: apply Nat Pings only to cm_rootUser connections Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser connections and only apply Nat pings to those connections instead of examining the security state of the connection. Reviewed-on: http://gerrit.openafs.org/6208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01f55bbf14210ef3e4f4c0246409af370de3a383) Change-Id: I9bac16d5eda46f32e23e9a845b511b8a8ddc4283 Reviewed-on: http://gerrit.openafs.org/6213 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit efb24564b84dcb133699f0d7155f17e3608df73d Author: Jeffrey Altman Date: Sat Dec 3 17:46:41 2011 -0500 Windows: track cm_rootUser connections Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose of tracking which connections belong to the cm_rootUser. Reviewed-on: http://gerrit.openafs.org/6207 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75) Change-Id: I5af7929dbcf03171734bcbd4c950f5e6e5de81ba Reviewed-on: http://gerrit.openafs.org/6212 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 09f107db9e380230befabdc24663e181484ca5a9 Author: Jeffrey Altman Date: Sat Dec 3 15:45:53 2011 -0500 rx: rx_conn/rx_peer refCount signed Can't trace reference count underflows with rxi_LowConnRefCount and rxi_LowPeerRefCount if they cannot become negative. Reviewed-on: http://gerrit.openafs.org/6205 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f37df60763a306fb70f791f7dcba9cec2ec27c7e) Change-Id: I495dae70eb5b7cad72783a506d9b5e6a894de867 Reviewed-on: http://gerrit.openafs.org/6211 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a8e09db6f6ddf721befea25b66d3da45fbd7d290 Author: Simon Wilkinson Date: Sat Dec 3 21:10:43 2011 +0000 rx: Some kernels have no reschedule function If RXK_TIMEDSLEEP_ENV isn't set, then Unix kernel cache managers call rxevent_Init without a reschedule function. Check for this so we don't end up calling a NULL function in these situations. Reviewed-on: http://gerrit.openafs.org/6206 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5c6640bf0b2b365d4871051db7a1be6075d44666) Change-Id: Ife77ae88370226b26a2e1e6eb5185e64b3e25221 Reviewed-on: http://gerrit.openafs.org/6210 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ca63944603e040d6f26ba69dfafb955d432d5d6 Author: Jeffrey Altman Date: Fri Dec 2 23:38:01 2011 -0500 Windows: npdll connected query returns no usage In response to a NPEnumResources CONNECTED scope query, the usage field is always set to zero. If the CONNECTABLE flag is set, mpr.dll will filter the entry out of the result list. Reviewed-on: http://gerrit.openafs.org/6195 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fb7d852845effce50d896416cf8b4ba3c19d6e1) Change-Id: Ica9fda3cd945d868b8a7d8e015203e3e60763570 Reviewed-on: http://gerrit.openafs.org/6202 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7e9dbdb2b0c051b5f316295ca34ccecf473c123 Author: Simon Wilkinson Date: Sat Dec 3 11:20:57 2011 +0000 Windows: Use roken's min and max roken provides min() and max() macros. Use these, rather than our own MIN() and MAX() Reviewed-on: http://gerrit.openafs.org/6196 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b34a2df4c706838e680bdcd15528862c49b5ba6c) Change-Id: I88ec2249c1fe0beab82aa4ad6f8f1d10579b1b9d Reviewed-on: http://gerrit.openafs.org/6201 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6187b8ad9ca1fdfd153742f168c17c0108f55e88 Author: Simon Wilkinson Date: Sun Nov 20 16:29:55 2011 +0000 rx: Refactor MaxMTU error checking The error checking on the rxMaxMTU parameter was done individually by every server that sets it, using "internal" RX #defines to do so. Instead, do the error checking within the function that actually sets the MTU, reducing both the amount of code duplication, and the amount of RX knowledge held within the servers. Reviewed-on: http://gerrit.openafs.org/6091 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 1c4cd446605706e55e415cec15841acf8b1572e1) Change-Id: I2cebf40ecf088653a90d1b05fc6348ada5a80bd1 Reviewed-on: http://gerrit.openafs.org/6200 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c901201fc4f31de44e4694c59416ed26d46720a Author: Jeffrey Altman Date: Fri Dec 2 18:49:23 2011 -0500 Windows: GetInfoTip really set return to NULL When we are not returning an info-tip string from the shell extension the string output parameter must be set to NULL. Reviewed-on: http://gerrit.openafs.org/6183 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9de84a1e67cb3570dedef4ac4552901210b19e5f) Change-Id: I6cb47f9f89a05599adee9cbe4b55aea7fae65ee1 Reviewed-on: http://gerrit.openafs.org/6192 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc53c36a1d9b5087c2bf60b0e06575e3b31896ef Author: Jeffrey Altman Date: Fri Dec 2 13:41:38 2011 -0500 Windows: memset in RDR_RequestFileExtentsAsync The logic in RDR_RequestFileExtentsAsync() made it possible for memset() to be called multiple times on a buffer that is already known to be up to date. Restructure the code to make things faster. Reviewed-on: http://gerrit.openafs.org/6178 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3fce5b3541d118bc452fe236e557acde57587462) Change-Id: I7dbf4615a8c0b6e0311d19fc88f82b90de4d7f32 Reviewed-on: http://gerrit.openafs.org/6191 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4368712221226a7ce045c2b723779959a3c80e98 Author: Jeffrey Altman Date: Fri Dec 2 13:36:01 2011 -0500 Windows: cm_MergeStatus redirector invalidation The redirector maintains its own cached status information which must be updated when a DV change occurs that is not the result of a redirector initiated data change. If the current old DV is BAD, send a DV change notification. If the DV has changed and request was not initiated by the redirector, send a DV change notification. If the request was initiated by the redirector, send a notification for store and directory operations that result in a DV change greater than the number of active RPCs or any other operation that results in an unexpected DV change such as FetchStatus. Reviewed-on: http://gerrit.openafs.org/6177 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a60594ef54c1458f6778d0b16d870803e1594d41) Change-Id: Iec392ba0be7e2e8a7273fe426af20fafe69a8e38 Reviewed-on: http://gerrit.openafs.org/6190 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ff267ca46d577d146195c91d8465e37302a415cb Author: Jeffrey Altman Date: Fri Dec 2 13:31:15 2011 -0500 Windows: cm_MergeStatus use new DV to purge buffers When deciding whether or not to purge buffers on a DV change it is the new DV that matters not the old DV. If the new DV is 0, there should be no purging because there are no buffers to purge. Reviewed-on: http://gerrit.openafs.org/6176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2a2ae16511bae032025ffcfbbe4e78b2de1f8eff) Change-Id: Ibe466308cc44a0bee929d3eb79041e38a6db76d9 Reviewed-on: http://gerrit.openafs.org/6189 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bf424b05c6895371e07b9b36172e858f3c804af4 Author: Jeffrey Altman Date: Fri Dec 2 13:21:24 2011 -0500 Windows: use interlocked increment on cm_buf_t refcnt For consistency use interlocked increment when setting the cm_buf_t refCnt to 1 even though it is protected by a lock. Reviewed-on: http://gerrit.openafs.org/6175 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6ee14eef3679fbcdecfe6b1d7879309c9360bb61) Change-Id: I99e6e2e1f3b1131be53960b1b1a0ba551a8f723a Reviewed-on: http://gerrit.openafs.org/6188 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 89fd45e672eeed0bfe7aae36d21cdf15719595cd Author: Jeffrey Altman Date: Fri Dec 2 11:21:46 2011 -0500 Windows: buf_GetNewLocked should use cleaned cm_buf buf_GetNewLocked() searches the free buffer list for a buffer that has a 0 refcnt, is not in the chunk that is being populated, is not actively having I/O performed on it and is not dirty. If it comes across a dirty buffer, it calls buf_Clean() with the assumption that buf_CleanAsync() (as it was previously called) was in fact asynchronous and would return immediately. Instead buf_Clean() is synchronous and when it completes the buffer will in most cases be clean. buf_GetNewLocked() should use the newly cleaned buffer if it is still available and not continue the search from the next entry in the free buffer list. Reviewed-on: http://gerrit.openafs.org/6174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 500ffccfd66123c74a0d32c04801e5906f58e58a) Change-Id: Ie1f5fad42a24cec15a9510411cb212312be34624 Reviewed-on: http://gerrit.openafs.org/6187 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 54ece1c90313ac99e2be559f9ce944b8e3d6b51a Author: Jeffrey Altman Date: Fri Dec 2 11:19:13 2011 -0500 Windows: fix buf_Recycle() comment buf_Recycle() does not return with a reference count to the cm_buf_t object held. Correct the comment. Reviewed-on: http://gerrit.openafs.org/6173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dccf17840a53e96b21f8c092910f3e4d7628b71) Change-Id: Id29fca95455be4200748845151da6a0c51b767c9 Reviewed-on: http://gerrit.openafs.org/6186 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb13f1a3fb54eba1982395544dc64de8e2486a5e Author: Jeffrey Altman Date: Fri Dec 2 11:14:11 2011 -0500 Windows: buf_CleanAsync is not async; rename it buf_CleanAsync() calls cm_BufWrite() which stores the dirty buffers synchronously. There is nothing asynchronous about buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked() to buf_CleanLocked(). Update the comments to remove the references to the asynchronous processing which doesn't exist. That is not to say that the call to buf_Clean() in buf_GetNewLocked() should not be asynchronous; it should. There is no such functionality at the moment. One approach would be to modify buf_IncrSyncer to trigger on an event set by buf_GetNewLocked() instead of the call to buf_Clean(). Another approach would be registering a background store event. In any case, that is for another patchset. Reviewed-on: http://gerrit.openafs.org/6172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c712403f192bd9932f3ec1dce5fb23461d3d0349) Change-Id: I4baf6425cd3d7c8b6d2a32ea1fac29431d3a0259 Reviewed-on: http://gerrit.openafs.org/6185 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a3ff374b935e03cc36c82c3813e1302b3edda7f Author: Jeffrey Altman Date: Fri Dec 2 11:11:59 2011 -0500 Windows: convert buf_IncrSyncer to pthreads buf_IncrSyncer() calls rx therefore it should be a pthread thread so as not to count against the 63 native thread count limit. Reviewed-on: http://gerrit.openafs.org/6171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b26161284fef682e570377e70c7ebe5b6e8902fb) Change-Id: I5d4257a682a2a7cacd1aaf237ce1d4cae02633d0 Reviewed-on: http://gerrit.openafs.org/6184 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c5c9af6a129bbcae877a575f3f988327c78bd6a Author: Jeffrey Altman Date: Wed Nov 30 23:29:56 2011 -0500 Windows: invalidate rdr for CM_SCACHE_VERSION_BAD If the cm_scache_t.dataVersion is set to CM_SCACHE_VERSION_BAD, invalidate the redirector notion of status so that we do not leak info to users that do not have permission. If the dataVersion is CM_SCACHE_VERSION_BAD and is updated with real status info, invalidate the redirector so it attempts to read the directory contents. Reviewed-on: http://gerrit.openafs.org/6159 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2aeb041bb0f5de94d553bc3fb6b2d39c82750952) Change-Id: Ieb597c3ea8c82e648563d1be7b8f588caad24eda Reviewed-on: http://gerrit.openafs.org/6170 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7d8f8457838cf75754a77dbe1e784b82bc86f8a Author: Jeffrey Altman Date: Wed Nov 30 23:28:46 2011 -0500 Windows: do not set CM_SCACHEFLAG_EACCES twice correct a merge error. Reviewed-on: http://gerrit.openafs.org/6158 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 79833cbc64c8ccd051060782a381af1ad0cc8d50) Change-Id: I2e45868ea765bc9236a018d8ea5a4cab758089cc Reviewed-on: http://gerrit.openafs.org/6169 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af10833f91902f84a410cf9df1d899640fcbf85d Author: Jeffrey Altman Date: Tue Nov 29 15:02:12 2011 -0500 Windows: AFSRDFSProvider log to file For when logging via OutputDebugString() is insufficient, add a cheap method of logging to a fixed file: c:\temp\AFSRDFSProvider.log. Set AFSRedirector\NetworkProvider "Debug" to 0x2. Reviewed-on: http://gerrit.openafs.org/6142 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0c01c36245c53db93ec6418b2b7ff7f679181765) Change-Id: Ie5b08202ea80f84a0ba4f9ec7a3fe958ba9a4335 Reviewed-on: http://gerrit.openafs.org/6156 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 227ea038da261ecb727a6748c1414af91e5cfb94 Author: Jeffrey Altman Date: Tue Nov 29 15:01:00 2011 -0500 Windows: NPEnumResources no Printer support The AFS Redirector does not support printer shares. If the query is for printers only (or any other query that does not permit disk shares as a response) return no more entries. Reviewed-on: http://gerrit.openafs.org/6141 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ba9129141387e7c24a695a94fb602df368e3917) Change-Id: I09b44507a8244cbbc68cee0d40f4aed73a997a43 Reviewed-on: http://gerrit.openafs.org/6155 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 044f3509524671aee45729caa56f71ef3c991222 Author: Jeffrey Altman Date: Tue Nov 29 14:59:24 2011 -0500 Windows: NPGetConnectionCommon buffer too small If the specified buffer size is too small, say so. Do not attempt to copy data in that won't fit. Do not walk beyond the end of the allocated memory. Reviewed-on: http://gerrit.openafs.org/6140 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 31d80e64683a6e7ce33ab714759e74a18454110d) Change-Id: If4ecbf984866b02ac08645eafa291b4f99f16d8c Reviewed-on: http://gerrit.openafs.org/6154 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 400c9b94a690cd8fc6ac58d1814e9af5379a11ce Author: Jeffrey Altman Date: Tue Nov 29 14:55:55 2011 -0500 Windows: no drive subst for NPCancelConnection NPCancelConnection() must use the results of a Get Connection ioctl to the afs redirector and not the result of Drive Letter Substitution queries via DosQueryDevice(). Rename NPGetConnection() to NPGetConnectionCommon() and add a new parameter to indicate whether drive substitution is ok. Reviewed-on: http://gerrit.openafs.org/6139 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9fa28d7df3034600026aacbfb902a4f92446253b) Change-Id: Ic10023981cafe49b59fd970bedac5b6e444db352 Reviewed-on: http://gerrit.openafs.org/6153 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af8f1147865007efdc5ab49ac4bb0626b9d288a8 Author: Jeffrey Altman Date: Tue Nov 29 14:54:24 2011 -0500 Windows: refactor NPCancelConnection refactor NPCancelConnection to consolidate some conditional blocks to improve readability. Reviewed-on: http://gerrit.openafs.org/6138 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit abfa8f00293780fd751ba8de3ee4ce6cbdb00e90) Change-Id: I4b76f8bde6781b7ac92202cd8c0ac842d35cdc08 Reviewed-on: http://gerrit.openafs.org/6152 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 759eb9c897c4d6d6c6728556b4dc03a09c70a104 Author: Chris Orsi Date: Sat Nov 26 17:26:10 2011 -0500 Windows: Mount Point and Symlink Overlay Icons Reviewed-on: http://gerrit.openafs.org/6137 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d6900a7cd1722648f4107f82d0d74d01f6da1810) Change-Id: I96f73a105564a4232b6e0e0df88298017e656a34 Reviewed-on: http://gerrit.openafs.org/6151 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9d7835f7803bc227d59c8ee2aff828d2b53d4179 Author: Jeffrey Altman Date: Mon Nov 28 18:42:21 2011 -0500 Windows: Wix disable integrated logon by default One of the significant differences between the NSIS and Wix installer packages is that NSIS does not activate integrated logon by default whereas the Wix installer does. Enabling integrated logon without configuring the cell, CellServDB, installing Kerberos v5 and configuring krb5.conf can result in a very long wait at logon. Now that NSIS is no longer being supported and cannot be supported as a native 64-bit installer mechanism we must disable integrated logon by default to prevent more bad end user experiences like @Lotterleben described on Twitter. Reviewed-on: http://gerrit.openafs.org/6132 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit bd7cecb3277b2980a880c68e70a7ca761285347c) Change-Id: Ibf9b8891991dc4f56242ce5506e2e2ed2b0f9e31 Reviewed-on: http://gerrit.openafs.org/6150 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e33c43af8c261ad5364bbe035e39303ccfa18848 Author: Simon Wilkinson Date: Sun Oct 23 21:21:39 2011 +0100 rx: Use a red black tree for the event stack Instead of the current event stack, which uses a sorted linked list, use a red/black tree to maintain the timer stack. This dramatically improves event insertion times, at the expense of some additional implementation complexity. This change also adds reference counting to the rxevent structure. We've always had a race between an event being fired, and that event being simultaneously cancelled by the user thread. Reference counting avoids that race resulting in the structure appearing twice in the free list. Reviewed-on: http://gerrit.openafs.org/5841 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 043c31bf8d81f5aba968f69c613b639e1d0e3ee7) Change-Id: Id3979110abb01c17855e6cd6a7d63dfd55919fb2 Reviewed-on: http://gerrit.openafs.org/6149 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit beac4280f913cf9410ba7eca313bdca64f69cbbd Author: Simon Wilkinson Date: Fri Nov 11 09:33:31 2011 +0000 Unix CM: Build rbtrees in kernel Build the new opr rbtree code in the Unix kernel module Reviewed-on: http://gerrit.openafs.org/5842 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9682775fcb047e4bcd3994d582ada430d28e264) Change-Id: I74312f89d4e02e6dc243f7fbb2266812d51aed39 Reviewed-on: http://gerrit.openafs.org/6148 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4db63088e72a75a128746d8334aae3271e23b4b8 Author: Andrew Deason Date: Tue Nov 29 12:07:49 2011 -0600 udebug: Fix endianness when fudging lastYesHost hostAddr is in NBO, lastYesHost is in HBO. Reviewed-on: http://gerrit.openafs.org/6136 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 073edd3fbdf442249920acea8f3ee90b6346bf23) Change-Id: I23c9590124f0a38364b1f903e398dcd576fab937 Reviewed-on: http://gerrit.openafs.org/6147 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 10a85f50af8c4d6e8396387a33893671a6fc3df8 Author: Jeffrey Altman Date: Mon Nov 28 19:15:33 2011 -0500 Windows: FSync not CleanVnode during Cleanup cm_FSync() is buf_CleanVnode() plus a sync of metadata which is required during last handle close. FIXES 130351 Reviewed-on: http://gerrit.openafs.org/6134 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 82809787d5addcec4a64ce71bb5b7d389ee4623b) Change-Id: Ieab8b688316d25c09f9cdbafe4d6f23aef1b0224 Reviewed-on: http://gerrit.openafs.org/6146 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1da2af863a25b332f8f676fa2c7ece9c1a3d52bb Author: Jeffrey Altman Date: Mon Nov 28 18:45:55 2011 -0500 Windows: Wix cell names can be greater than 120 chars Increase the permitted length in the UI to 255 characters. Reviewed-on: http://gerrit.openafs.org/6133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4f9f33dc55150d991d9eec4ea95d78208f6949) Change-Id: Ib2d3b313269de59b9b31531bcb76587dd0c625ef Reviewed-on: http://gerrit.openafs.org/6145 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da41789b7ce26c95d5158a144a89a2ddc81bfa07 Author: Jeffrey Altman Date: Mon Nov 28 15:13:43 2011 -0500 Windows: cache format version change With the change to the size of the osi_mutex_t and osi_rwlock_t structures the CM_CONFIG_DATA_VERSION must change to force a reconstruction of the cache file. Reviewed-on: http://gerrit.openafs.org/6131 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 006815ca2f4df1ed5236fc377da2647895853b0a) Change-Id: I375758d0c72f8a3c7726a960d3c780d411a25076 Reviewed-on: http://gerrit.openafs.org/6144 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8d3a40be0dba3fb5835ff476d4cf16fd3f81ad99 Author: Jeffrey Altman Date: Sat Nov 26 17:26:50 2011 -0500 Windows: osi_mutex / osi_rwlock changes Reorganize the osi_mutex and osi_rwlock structure so that all counters are 32-bit and pointers are aligned. This requires adding padding fields. Move lock validation checks within the critical section. Include additional assertions checking the ownership state and protecting against under/overflows. Increase the size of the rwlock tid array to support a larger number of simultaneous readers. Reviewed-on: http://gerrit.openafs.org/6130 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a07338f4ccc5062e224405ccda0c9ed41e666f5e) Change-Id: I5bfd2ceaefef5b18fb41a7a84c4ccff07d28ac1f Reviewed-on: http://gerrit.openafs.org/6143 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d5f9d5e1dbf970c2fa8ca910c7127a1ca7d05af Author: Jeffrey Altman Date: Sat Nov 26 10:55:27 2011 -0500 Windows: convert daemons threads to pthreads The daemon threads make calls to Rx and therefore need to be created with the pthread package to prevent the threads from being tracked as 'native' threads by the pthread_thread_shutdown thread which can only track up to 63 native threads. Reviewed-on: http://gerrit.openafs.org/6119 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5d7adc6b67dedf0dc888196812e66b131cf91bbc) Change-Id: Iead37a1c79ba0321c44d3e5ba052c193825ee559 Reviewed-on: http://gerrit.openafs.org/6129 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 98fe9a2bc86089253d5420245130f2fd0dcb0db2 Author: Jeffrey Altman Date: Tue Nov 22 09:31:45 2011 -0500 Windows: add trace logging to Pioctl File Info Query Reviewed-on: http://gerrit.openafs.org/6110 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 53d55cf35327ec08c2f2ed5dea4138cdc2d46de7) Change-Id: Ia8d653927bf299c16176b1218cf711d5ef9c4c95 Reviewed-on: http://gerrit.openafs.org/6115 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c2e384384ab93b413a4500b44573cfaa9554d624 Author: Jeffrey Altman Date: Tue Nov 22 16:36:18 2011 -0500 Windows: _._AFS_IOCTL_._ size is zero When replying to a FileStandardInformation query on the pioctl special file, the size of the file is 0. Failure to return 0 can result in an anti-virus program attempting to read the file via a paging request which will fail. Reviewed-on: http://gerrit.openafs.org/6109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 030157166795628bbfa81e8b4b7ede35dfead8d0) Change-Id: Ib2790df4a760156d0cdf457776dbaf7dd5e2f086 Reviewed-on: http://gerrit.openafs.org/6114 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c9517d47bc5a9d7f8b1bc5b7e48105aeb786b3c Author: Jeffrey Altman Date: Mon Nov 21 21:47:38 2011 -0500 Windows: RDR_InvalidateObject do not hold locks Do not hold any locks when calling the afs redirector. Holding a lock can cause a deadlock. Reviewed-on: http://gerrit.openafs.org/6105 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 039ffe2a036217e7d23c7466c77b69df50a603f7) Change-Id: I8518ff1752bb2a0d9b73d23d9c78e6964512eb25 Reviewed-on: http://gerrit.openafs.org/6113 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9f2ef0caea292928cfaae0d14702be493d0908e Author: Jeffrey Altman Date: Mon Nov 21 13:14:40 2011 -0500 Windows: cm_GetSCache do not release unheld lock if cm_GetNewSCache() fails, an attempt would be made to release cm_scacheLock which is not held. However, it should be noted that cm_GetNewSCache() cannot fail without itself triggering a panic. Reviewed-on: http://gerrit.openafs.org/6103 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d42db13152fb8fa374db6531020da6effca51ab4) Change-Id: I7c125a117591805b62439dad95ba7e597c574bc6 Reviewed-on: http://gerrit.openafs.org/6112 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f33b597dbcd6112a9676b47660a91573ed643da0 Author: Jeffrey Altman Date: Mon Nov 21 08:42:13 2011 -0500 Windows: Use Jenkins' Hash Replace the non-string hash functions with Jenkins' Hash derived hash values. Bump the cache version value because the hash function has changed. Reviewed-on: http://gerrit.openafs.org/6102 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 887791bacf8a1b39a610734e5c27c55f88513750) Change-Id: I5bfde25d408844b8105454d49efebde211b274f7 Reviewed-on: http://gerrit.openafs.org/6111 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da77380f3c3899ebc0d5e39478d2de6a9c8eb07d Author: Michael Meffie Date: Thu Oct 27 17:53:47 2011 -0400 auth: avoid excessive stat of cellservdb The modified time resolution is one second, so only stat the cellservdb file at most only once per second. Reviewed-on: http://gerrit.openafs.org/5743 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af) Change-Id: If7358da6cae712b5cc6773a80bbb5e8206c39fd6 Reviewed-on: http://gerrit.openafs.org/6107 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8b224986ebd5b2805e81103adc4d041527ec1f60 Author: Simon Wilkinson Date: Sun Nov 20 23:40:51 2011 +0000 opr: Add Bob Jenkins's hash functions This imports a small subset of Bob Jenkins lookup3.c hash functions into the opr library. At present we only import the subset of this that deals with aligned arrays of integers, as this addresses our immediate need. It seems likely that if we're interested in a hash function for string arrays (or other arbitrary data), that more recent functions such like SpookyHash (from Bob Jenkins, again) or CityHash (from Google) may be a better solution. The immediate use case for this is removing the use of the '%' operator when indexing speed critical hash tables, as well as ensuring fairer distribution of entries across these tables. A short set of test cases is also provided Reviewed-on: http://gerrit.openafs.org/6095 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20448059f02d07eccf7f81fdb55b80e566acfecc) Change-Id: I53f3a78f416d1893b16498f412d9aaa85db78ad3 Reviewed-on: http://gerrit.openafs.org/6106 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 536cd4c038b61e7ebe0591015230ad56d5545336 Author: Jeffrey Altman Date: Fri Nov 18 12:12:22 2011 -0500 Windows: Version 1.7.2a (1.7.0201) Change-Id: I851e400e18907db5a3fc490838c0b275ced5e2af Reviewed-on: http://gerrit.openafs.org/6077 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4e6e3dcb03a085addb23406b823626d036a554a0 Author: Jeffrey Altman Date: Fri Nov 18 09:54:43 2011 -0500 Windows: RDR_RequestFileExtentsAsync unheld lock commit 55f5f356af2ef884413bd656f100055741ae871b forgot to remove a lock_ReleaseWrite(&scp->rw) in RDR_RequestFileExtentsAsync(). Reviewed-on: http://gerrit.openafs.org/6075 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ce811e34379615f942e9ca73d1ba78bfe742042) Change-Id: Iae6202820f80637909b053b89a7f3ea79fb4ebdf Reviewed-on: http://gerrit.openafs.org/6076 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21c4adde592218daba0ce67b6ca8f71f511ad054 Author: Jeffrey Altman Date: Fri Nov 18 00:39:24 2011 -0500 Windows: must obtain and release an actual lock Reviewed-on: http://gerrit.openafs.org/6072 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac1251ead12434a12fb8e7d6787845f534565039) Change-Id: Ie5b3823e7a1fbb4d384d40d42eae78e79fa84a88 Reviewed-on: http://gerrit.openafs.org/6074 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8b72931b4062b29c17e51ec53621203f67658795 Author: Jeffrey Altman Date: Thu Nov 17 00:30:24 2011 -0500 Windows: non-release only worker threads can release There are two classes of worker threads created by the service and donated to the afsredir as part of the reverse ioctl processing model. Normal workers can process any kind of ioctl and Release Only workers that can only process release extent events. Use a KeWaitForMultipleEvents in the normal worker case to permit processing any type of event. The previous implementation excluded release extent ioctls from the normal workers. Reviewed-on: http://gerrit.openafs.org/6071 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1379fb6de4d2134160fcc95cbbee4bd6048eaeaa) Change-Id: Ifc04af699cdea776e56f5f8a64b5372e79c969a1 Reviewed-on: http://gerrit.openafs.org/6073 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 16c470c62ddbdc596b497882d6c4405e30dc6cd8 Author: Jeffrey Altman Date: Wed Nov 16 14:06:36 2011 -0500 Windows: Version 1.7.2 (1.7.0200) Change-Id: I0172a96f0c68bd4b5e069c333942eb79c7fa38f1 Reviewed-on: http://gerrit.openafs.org/6070 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c53280f2d8a34982c1cbd620e4b5e1986d5d9348 Author: Jeffrey Altman Date: Wed Nov 16 14:01:11 2011 -0500 Windows: 1.7.2 Change Log Change-Id: I976c821e80343f85c5f41a033adb7ee41f285dd5 Reviewed-on: http://gerrit.openafs.org/6069 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ffb98152c7c3329de971799d3bc510e671638283 Author: Jeffrey Altman Date: Wed Nov 16 00:29:34 2011 -0500 auth: initKeys before first error exit path In afsconf_OpenInternal() _afsconf_InitKeys() must be called before the first opportunity to call afsconf_CloseInternal() or a crash can occur if the CellServDB file cannot be parsed. Reviewed-on: http://gerrit.openafs.org/6059 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 833d076e04ac09270a203a9ff449ae2af8bdad7e) Change-Id: Id9a734e896c663f3159de6f38744df98343bf77a Reviewed-on: http://gerrit.openafs.org/6068 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ecc9f50577ad43de20bed850d1e28cddeee734a Author: Jeffrey Altman Date: Wed Nov 16 10:33:41 2011 -0500 Windows: Do not install IBM AFS HLP files The IBM AFS HLP files are so out of date at this point that they are simply confusing. They reference tools and screens that no longer exist and claim the product is "IBM AFS". Incorrect documentation is worse than no documentation. The HLP files cannot be updated since we do not have the sources. HLP file format is no longer supported on Windows Vista or 7. The afs-nt.hlp file will continue to be installed conditionally when afscreds.exe is installed but the shortcut to it in the Start menu is being removed. afscreds.exe is not installed by default. Reviewed-on: http://gerrit.openafs.org/6065 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1c97c04add6639a11e88d412e369771bf6f0f281) Change-Id: Ia3dcda194d8ec7b2253d3c7023c766d61ce567bb Reviewed-on: http://gerrit.openafs.org/6066 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b28e843ee3e3229ae79e4da7d0b01ace133bd0f5 Author: Jeffrey Altman Date: Tue Nov 15 18:35:26 2011 -0500 Windows: buf_CleanAsyncLocked dirty range only buf_CleanAsyncLocked() should not instruct cm_BufWrite() to write a full chunk if the current buffer is the only one that is dirty. cm_BufWrite() will determine if it is appropriate to fill a full chunk when storing. Instructing it to check a full chunk forces it to do more work than necessary. Reviewed-on: http://gerrit.openafs.org/6054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd42e08bf1882a02c3200e1c33a101e644aa046a) Change-Id: I4fadbf00ac2adb3dd1ce78118d4fe5170156d501 Reviewed-on: http://gerrit.openafs.org/6064 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d84937a30952c544ebfc3aef28797407807830aa Author: Jeffrey Altman Date: Tue Nov 15 18:23:46 2011 -0500 Windows: create scache->redirMx to reduce contention Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue* results in a large amount of contention between processing extent requests and releases from the afs redirector and the threads attempting to read from or write data to the file server. There is no reason why the same lock must be used. Allocate a dedicated mutex to protect the queue. By placing the new mutex after the buf_globalLock in the locking hierarchy it permits the lock acquisition logic for extent processing to be simplified further reducing cm_scache_t.rw lock transitions. Reviewed-on: http://gerrit.openafs.org/6053 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 55f5f356af2ef884413bd656f100055741ae871b) Change-Id: Ic52bb0063e764c67f22783b4de2fdfaad90d374a Reviewed-on: http://gerrit.openafs.org/6063 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e88c69dec8aff4bd3fb5d012a99ea0b4f9a31e2d Author: Jeffrey Altman Date: Tue Nov 15 19:03:14 2011 -0500 Windows: Increase default number of daemon threads With the SMB interface there was little benefit to having a large background daemon worker pool since it was so rarely used. Now that the redirector does everything in the background daemon workers, increase the default from 4 to 16 threads. Reviewed-on: http://gerrit.openafs.org/6058 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 042f6c08e3be0af3ef1cc4a0bfc4688c3e2ef7d0) Change-Id: I32705d0787719f0196eac5a5ff1e87bde26e1768 Reviewed-on: http://gerrit.openafs.org/6062 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a2a437f60773913bf011d688c24dd296c73d71c5 Author: Jeffrey Altman Date: Tue Nov 15 19:00:05 2011 -0500 Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b) Change-Id: I790e06790702b19c74e27e92a11112be669286c1 Reviewed-on: http://gerrit.openafs.org/6061 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a30a3b7cb5e6185ccde0a7c4ec7c527842c1dadf Author: Jeffrey Altman Date: Tue Nov 15 18:40:21 2011 -0500 Windows: Fairness for background operations The background daemon worker pool is responsible for processing background Store and Fetch operations. With the SMB interface primary store and fetch operations are performed in the SMB worker thread which makes sense since those operations must be synchronous to the incoming request. With the AFS redirector interface almost all of the work is performed by the background daemon worker pool. It is therefore critical that the workers not get stuck in a state that starves applications. For example, copy of a file that is larger than the cache to \\AFS will result in a background store request for each chunk size of the file. If each worker thread grabs one to process, only one will make progress and the rest will block. If a cleanup operation (aka handle close) occurs the entire file will be flushed to the server synchronously in the redirector worker thread. That thread will cause of the background daemon threads to block. Any subsequent fetch data requests that get queued behind the list of stores will in turn block until they clear. This behavior is not fair. This patchset adds a new test to the cm_BkgDaemon() request selection loop, cm_RequestWillBlock(). If a request will block it is skipped. If there are no requests to process that would not have blocked, the worker will sleep for 25ms instead of the usual 1s. For BkgStore operations, the CM_SCACHEFLAG_DATASTORING flag is used to indicating a blocking state. For BkgFetch and PreFetch operations, the CM_BUF_WRITING and CM_BUF_READING flags on the first cm_buf_t of the range is used to indicate a blocking state. Reviewed-on: http://gerrit.openafs.org/6056 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit c904d9a3889b7dd8c8795feaa9e5e4979f681f53) Change-Id: I2490f2c45b86a17cdd5bf4a86529f87509bc83ad Reviewed-on: http://gerrit.openafs.org/6060 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc6f1c6ef0a16dc351267ad8c3a0129109d300ef Author: Jeffrey Altman Date: Tue Nov 15 09:03:59 2011 -0500 Windows: Create default Security Descriptor A misplaced #endif prevented the allocation of a default security descriptor. This results in STATUS_INSUFFICIENT_RESOURCES errors. FIXES 130284 Reviewed-on: http://gerrit.openafs.org/6048 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a1871449eec8d9fc1152319bc63e29db7f9ae231) Change-Id: I9c1d67368a1b5d770a4c9a981bdb4a24f8ad3c8e Reviewed-on: http://gerrit.openafs.org/6049 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5db5466feff51b6792c8569138514bbbcc4ec6b4 Author: Jeffrey Altman Date: Mon Nov 14 17:49:45 2011 -0500 Windows: interlocked refCount increment in cm_GetSCache Failure to use interlocked operations in cm_GetSCache can result in an under count Change-Id: I370bcb9ac8b40f1c1b7ea3b7647fc76e3a554e2c (cherry picked from commit c4d19e5d4271a31fd29c111fb27d145dc83b83b7) Reviewed-on: http://gerrit.openafs.org/6047 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d887868cc7435e29864ab566de1792f00e046f04 Author: Jeffrey Altman Date: Mon Nov 14 10:23:53 2011 -0500 Windows: netidmgr krb5_cc_get_principal can fail Do not dereference a NULL pointer if krb5_cc_get_principal fails. On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c but that change is after the conversion to the Kerberos Compatibility SDK and cannot be applied to openafs-devel-1_7_x at this time. Change-Id: Iffb31330ea022a4f75728ff2da657029c56d61d8 Reviewed-on: http://gerrit.openafs.org/6018 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b2e58559cf453c80d4b9800dac4bf4adb0ad345b Author: Jeffrey Altman Date: Sun Nov 13 00:40:54 2011 -0500 Windows: missing braces in AFSFSControl Change-Id: I008b03f26bf52a38296e6a009535ea5267fc8f3b Reviewed-on: http://gerrit.openafs.org/6017 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 55910eddee4adf6512ba0d8664e0db188c8c0cc9 Author: Jeffrey Altman Date: Sat Nov 12 18:33:18 2011 -0500 Windows: smb_ReceiveNTCreateX create smb_fid earlier smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now requires the smb_fid_t allocated fid value for use in share mode locking. Move the allocation of the smb_fid earlier in the function and apply necessary cleanup in error paths. Reviewed-on: http://gerrit.openafs.org/6004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839) Change-Id: Ife9d93672681d92da7ca7f89536d4a12bd177084 Reviewed-on: http://gerrit.openafs.org/6015 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e699ac3fa840fdcc2e31060fdcb91924708ce946 Author: Jeffrey Altman Date: Sat Nov 12 17:32:06 2011 -0500 Windows: cm_GetSCache avoid holding cm_scacheLock cm_GetSCache used to hold cm_scacheLock write-locked from start to finish except that it didn't. There were several places where cm_scacheLock was dropped and reacquired due to lock ordering requirements. Unfortunately, this has two problems. First, the function isn't very fast in the most common case since cm_scacheLock is write-locked for the search for an existing FID. Second, there is a race that results when cm_GetNewSCache() drops the cm_scacheLock. To make things faster, use a read-lock for the common case. To avoid the race, if the FID cannot be located, call cm_GetNewSCache() first and then obtain the cell and volume information. Then perform a second lookup for the FID while holding cm_scacheLock write-locked. If we lost the race or there was an error obtaining the cell and volume info, put the new cm_scache_t back onto the end of the LRU queue. Reviewed-on: http://gerrit.openafs.org/6003 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5c59d1b500ae4ba5223184fbfe18837891ea30c3) Change-Id: Ifcaf015b4105487fa3de123636f1d9aacbbb482a Reviewed-on: http://gerrit.openafs.org/6014 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47ffcafc23f8747870d1d349572dce8594ee57c3 Author: Jeffrey Altman Date: Sat Nov 12 17:24:12 2011 -0500 Windows: avoid null ptr in RDR_RequestFileExtentsAsync If the cm_scache_t cannot be obtained, do not dereference it while returning an error to the redirector. Reviewed-on: http://gerrit.openafs.org/6002 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eb3c9f783b9488181c57ef949e3feddcb02d381a) Change-Id: Ide78420779869ed31c3909983f16ead546a333d8 Reviewed-on: http://gerrit.openafs.org/6013 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c8fc90e25476fb439d7abaa2a9041266f45b2fcb Author: Jeffrey Altman Date: Sat Nov 12 13:45:08 2011 -0500 Windows: Track active RPCs per scache_t It has been noticed that multiple RPCs can be active on a cm_scache_t object at the same time. This is especially true of directory objects with the redirector. Track the number of active RPCs and use that number in cm_MergeStatus when deciding whether or not to discard the cached data for the object. Reviewed-on: http://gerrit.openafs.org/6001 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 090f6279c5496f648893606d298c698f376c7ae0) Change-Id: Idc2d97998c274a130bee7666180f35016d575b0b Reviewed-on: http://gerrit.openafs.org/6012 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit dd1eb21a90e43db2650751ca01aab6ee5a32cbd8 Author: Jeffrey Altman Date: Sat Nov 12 13:41:30 2011 -0500 Windows: fix locking hierarchy in service The smb username lock and the daemon global lock can be requested while the scache dirlock is held if there are no free buffers and the service is forced to claw back extents from the redirector. Adjust the locking hierarchy accordingly. Reviewed-on: http://gerrit.openafs.org/6000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f) Change-Id: Ib6ca9a44e626613c44f79fc3a59dcd2adaeb1dc8 Reviewed-on: http://gerrit.openafs.org/6011 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e2ca5877bc6566110e40ef20b40d61e24040e6ad Author: Andrew Deason Date: Wed Nov 2 16:55:49 2011 -0500 afs: Do not use separate array for srvAddrs The array of srvAddr structs we use in afs_LoopServers have indices unrelated to the indices of conns, rxconns, etc. Several places were assuming that addr[i] corresponded to conn[i], which is not necessarily true. So instead, do not use the separate addr array (except when populating the conn and rxconn arrays), and just get the srvAddr structure by going through the relevant conn[i]. Reviewed-on: http://gerrit.openafs.org/5790 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f199ac666195771a02e3ebb040c6e5fe47c58c58) Change-Id: Ib6605ee02964fc8215774d9b45846ac4c07fa636 Reviewed-on: http://gerrit.openafs.org/6010 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9745a9273628fdada422d5ed922388fb624d232 Author: Simon Wilkinson Date: Sat Oct 22 16:37:04 2011 +0100 rx: Turn the rxevent_Cancel macro into a function Turn rxevent_Cancel into a function rather than a macro which modifies its argument as a side effect. rxevent_Cancel now checks whether the event being cancelled is already NULL, as well as NULLifying the event when it is actually cancelled. Update all of the callers to reflect this new API, and so they no longer do unecessary work. Reviewed-on: http://gerrit.openafs.org/5840 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7d569c857234626191514e2780368e1b85a6dae) Change-Id: I0bd60d47eea41d9181e136c3a3cd42b0ade3955c Reviewed-on: http://gerrit.openafs.org/6009 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2b192f51fc05762322ad0b2c938ce0c614cabca9 Author: Simon Wilkinson Date: Sat Oct 22 16:22:36 2011 +0100 rx: New signature for rx event functions For a while now, we've had both new and old-style rx event callback functions. Modify all of our event handlers, and the functions that install them, to use only new style functions, and get rid of the old-style function prototypes. Reviewed-on: http://gerrit.openafs.org/5839 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit be8db58f5a44ce2ee4208de09a5ca1faf6f0f91f) Change-Id: I904c1a49ea3bf18244ea2eb908ca3a7d7394e7ff Reviewed-on: http://gerrit.openafs.org/6008 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91dc31974626e7cb083b821c5ea4dddce8780f36 Author: Simon Wilkinson Date: Sat Oct 22 11:22:51 2011 +0100 opr: Add a red/black tree implementation Add an implementation of red/black trees to our runtime library. This is originally derived from the FreeBSD macro-based rbtree implementation, but is heavily reworked to not use macros, to improve legibility, and to favour speed over structure compactness. A test suite is provided in tests/opr/ Reviewed-on: http://gerrit.openafs.org/5838 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5574ff814f02078b709cbc0a6c94201ca6fe2eca) Change-Id: I1b70886c40db41fbbdc56b2374fb554c772e1b96 Reviewed-on: http://gerrit.openafs.org/6007 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47a5e7bca67f454780928e800a4ce93296f0e8e0 Author: Simon Wilkinson Date: Sat Oct 22 11:10:53 2011 +0100 rx: Add a helper function for delayed acks The code to schedule a new delayed ack event is distributed throughout the RX code. Consolidate this into a single helper function. Change-Id: Id24d5891e6c378aeed375454bf9016572dc8bb8a Reviewed-on: http://gerrit.openafs.org/5837 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6006 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f9f574294535b6c46ceb969274f93fb822682cd Author: Simon Wilkinson Date: Sat Oct 22 09:45:10 2011 +0100 opr: Add opr_containerof Add the opr_containerof macro, which can be used to find the base address of a structure which contains a member whose location is known. This formulation is heavily used throughout OpenAFS to determine the base address of structures containing queue pointers - this provides a central definition, rather than coding it from scratch each time. Reviewed-on: http://gerrit.openafs.org/5836 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a056d24a79242db09963dd0b0c2193c5034b61b) Change-Id: I3e3a7d0b83603edf6d62520cb2245cf0944f930b Reviewed-on: http://gerrit.openafs.org/6005 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f85fa656d90168758a3ef8fe2438371c16bb32f1 Author: Peter Scott Date: Mon Oct 31 17:59:51 2011 -0400 Windows: add braces to case statements A number of case statements did not have braces protecting the block. Add them. Reviewed-on: http://gerrit.openafs.org/5772 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 22f4e2945d3fa5b7802b7321ddaa35ef34b04a45) Change-Id: I1f5527250285886f2c5253e9cae27ebd45e2266f Reviewed-on: http://gerrit.openafs.org/5999 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b641ae2569eba40006a0342f4824e0abf3986965 Author: Jeffrey Altman Date: Sat Nov 5 04:10:42 2011 -0400 Windows: Add Vista/Win7 Firewall Configuration Make use of the INetFwPolicy2 COM interface to configure the Vista/Win7 firewall for all network profile types. Change-Id: I68fd5f89436304e9be1fe7c4279eade7d5f7692e Reviewed-on: http://gerrit.openafs.org/5812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b15b4b15822bee87720bb0d78c2ce54051180339) Reviewed-on: http://gerrit.openafs.org/5998 commit 8e1f9a8bc610cc95fe46b185c5ee9c9b8d81b8c9 Author: Jeffrey Altman Date: Wed Oct 5 03:36:48 2011 -0400 Windows: Enforce Share Access Use file server locks to enforce file share access modes via the afs redirector interface. The approach taken integrates share mode enforcement with the file server lock tracking code in the service. The share mode enforcement mimics that of the SMB Server interface. This patchset includes two functional changes to the previous locking and share mode processing: 1. The cm_scache_t fsLockCount field is used to determine if the desired lock can be granted by the file server. If not, the RXAFS_SetLock() request is skipped and the request is failed locally. 2. cm_CheckNTOpen() now accepts the desired and and share access modes. The share access mode is used to determine if a test lock should be obtained at all. If the share mode is FILE_SHARE_WRITE then no lock is requested. This change permits Microsoft Office applications to offer the user the ability to open the file in read-only mode and notify the user when the document can be opened in read-write mode. Developed with Peter Scott FIXES 130239 Change-Id: Iaa2beda3182f93575574bbe8f505e5008cd0d37f Reviewed-on: http://gerrit.openafs.org/5823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b78b8f64a69481e59e957ebe09315fc5b8b60c17) Reviewed-on: http://gerrit.openafs.org/5997 commit 366844699e21bc7d6a2cb4324a08a72143a90918 Author: Andrew Deason Date: Thu Nov 10 11:58:12 2011 -0600 namei: Remove extraneous rmdir We just unlinked the file, so we know we won't be able to rmdir() the same thing. Give a path one level higher to namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir. Change-Id: I37da76e360fd3967048297789ed8cf4748c14845 Reviewed-on: http://gerrit.openafs.org/5833 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from b41e30a55c8aeb6d7f42d74f9eb090232032057f) Reviewed-on: http://gerrit.openafs.org/5996 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 870a129428fab3ce1349df1ad8810cfeff62325a Author: Andrew Deason Date: Thu Nov 10 11:05:28 2011 -0600 vol: Remove O_EXCL|O_TRUNC combinations A few places were specifying both O_EXCL and O_TRUNC to open(). O_TRUNC does not make any sense with O_EXCL, and doesn't do anything, so remove O_TRUNC from these instances to make the code more clear. Change-Id: I06e2f68eb589da0baee32e523103c2c868c33cc8 Reviewed-on: http://gerrit.openafs.org/5832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4c679e380f697760de777d35fe057229bf2bf762) Reviewed-on: http://gerrit.openafs.org/5995 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f44c554665196b7fe07f83cede5314445a0c3b92 Author: Jeffrey Altman Date: Wed Nov 9 22:52:37 2011 -0500 Windows: FSCTL_SET_REPARSE_POINT not yet implemented Since FSCTL_SET_REPARSE_POINT is not yet implemented return STATUS_INVALID_PARAMETER to all requests that do not fail validity tests. Change-Id: I0a6b5e58fe660bc9e71411ec63e32cf81790ec51 Reviewed-on: http://gerrit.openafs.org/5829 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from f27480aa2f8a26da3bd7634ff7072c1faac0f448) Reviewed-on: http://gerrit.openafs.org/5994 commit 8de04de7e1e24fc0b320adb276c17da3fa36a140 Author: Jeffrey Altman Date: Wed Nov 9 22:47:55 2011 -0500 Windows: FSCTL_SET_REPARSE_POINT error According to MS_FSCC 2.3.54 if the input buffer length is less than the size of a REPARSE_DATA_BUFFER structure, or the input buffer length is greater than 16,384, or a REPARSE_DATA_BUFFER structure has been specified for a third party reparse tag, or the GUID specified for a third party reparse tag does not match the GUID known by the operating system for this reparse point, or the reparse tag is 0 or 1, then the return status shall be STATUS_IO_REPARSE_DATA_INVALID. Change-Id: Ied458e193ebf10144c954a1b29e38454a5323ec4 Reviewed-on: http://gerrit.openafs.org/5828 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 72e5bd1434a6a2238f28f11a149192f44d0b82d1) Reviewed-on: http://gerrit.openafs.org/5993 commit 83e1087a9799416e5e881f2a08b4330ed8cc8c02 Author: Jeffrey Altman Date: Wed Nov 9 22:45:07 2011 -0500 Windows: FSCTL_IS_PATHNAME_VALID return success Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 support the FSCTL_IS_PATHNAME_VALID Request (section 2.3.21) and return STATUS_SUCCESS whenever this request is invoked. We will do the same. Change-Id: I65be2d5fac5a04f93efb835a827b49e9f1ddec06 Reviewed-on: http://gerrit.openafs.org/5827 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 733aa6a63d8f15dcfe31f24ce31b67b746a2934a) Reviewed-on: http://gerrit.openafs.org/5992 commit 9e45f4a2c394d4fc466ee13d7f09ae7911ba5d8f Author: Jeffrey Altman Date: Wed Nov 9 22:42:54 2011 -0500 Windows: these fsctl cmds are not implemented Return STATUS_NOT_IMPLEMENTED since the following FSCTL_ operations are not: FSCTL_LOCK_VOLUME FSCTL_UNLOCK_VOLUME FSCTL_DISMOUNT_VOLUME FSCTL_MARK_VOLUME_DIRTY FSCTL_IS_VOLUME_DIRTY FSCTL_IS_VOLUME_MOUNTED Change-Id: Ie8fab08f5b005b26192e9bb74a4f09ff29b9c64f Reviewed-on: http://gerrit.openafs.org/5826 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 3c6e5681245ad4ee267d7e5ca260b38655633a96) Reviewed-on: http://gerrit.openafs.org/5991 commit 77952f2d7e6cfe7a6883b118a9de7e8a8f8823a1 Author: Jeffrey Altman Date: Wed Nov 9 22:33:11 2011 -0500 Windows: Additional trace logging Add additional trace logging to the redirector to assist with debugging reparse point processing. Change-Id: I2dac6a6ed3a178c59581f3862678d2fed5f10bc7 Reviewed-on: http://gerrit.openafs.org/5825 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ff7d3a19f032c5d4917cc04eeff9cf92733f1fae) Reviewed-on: http://gerrit.openafs.org/5990 commit 00f81bddd788e17e7e3c1811d2140f1d2055333f Author: Jeffrey Altman Date: Wed Nov 9 20:05:05 2011 -0500 Windows: service must set reparse point attribute When populating the directory entry information for the redirector the service must set the reparse point attribute. Change-Id: Ibeaca04d19c59783c04721cad2b5716a3c8c1e2c Reviewed-on: http://gerrit.openafs.org/5824 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b947adbacb5db4ce5e380ea28e1d734fdadd5cdf) Reviewed-on: http://gerrit.openafs.org/5989 commit 673c31abd608acd1f591104fef907a86d2699432 Author: Peter Scott Date: Thu Nov 10 13:34:53 2011 -0700 Windows: Correctly increment PIOCtl DE When performing a directory enumeraiton, correctly increment ref count on the PIOCtl DE structures Change-Id: I95833d45ccaf4a4da1eeb64c92e15400b7b7840e Reviewed-on: http://gerrit.openafs.org/5834 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from d810870ec1a2ad1cb438d776236db3340081fe74) Reviewed-on: http://gerrit.openafs.org/5988 commit 2cfcced5863a7a7a874ed2a568e598443851e21a Author: Peter Scott Date: Thu Nov 10 09:06:53 2011 -0700 Windows: FileNetworkPhysicalNameInfo implementation Handle this File information query Change-Id: I04b0d9a97987b526fb1ff2606aff855f4811a232 Reviewed-on: http://gerrit.openafs.org/5830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 2c0f857bc8d17d8e02f515d510f9530bc47866d4) Reviewed-on: http://gerrit.openafs.org/5987 commit 775cbd0d759d7d3141e1d264a7e50942e4a88780 Author: Jeffrey Altman Date: Sun Oct 30 23:52:00 2011 -0400 Windows: improve store data parallelism The file server will set the rx call status bit (0x1) when the rpc is in process and all of the locks are held. At this point it is not possible for another store data rpc to begin on the vnode prior to the completion of the current rpc. Once this status bit is detected as set, the exclusive store data synchronization on the cm_scache_t can be dropped. This permits the next store data rpc to perform its biod construction. Change-Id: Ibd62a3c289ed11b4f67d5ff1ffff326bcc400044 Reviewed-on: http://gerrit.openafs.org/5741 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from deedf97416e4eaaea79479711ad3c84020fdd1e0) Reviewed-on: http://gerrit.openafs.org/5986 commit 87bb4c90402bbd2f68f9f489217a1d44ce0f11a8 Author: Andrew Deason Date: Wed Nov 9 17:04:09 2011 -0600 volser: Preserve needsSalvaged during restore Some of the routines during a volume restore may set needsSalvaged, if an inconsistency is detected while writing the given volume data. However, after the data is read, we set the volume header information to what was found in the dump stream, ignoring any needsSalvaged that may have been set. To ensure that inconsistent volumes in this situation actually get demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of needsSalvaged in the header, if it was set. Change-Id: Ie4895a8386642a762a523f2a0ac0e2d1b4ac3de7 Reviewed-on: http://gerrit.openafs.org/5822 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9ba891676a15512fa58915662cf599ea73eac430) Reviewed-on: http://gerrit.openafs.org/5985 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ae6d9b2943319b9f44459011f7cfda08e76b6c16 Author: Derrick Brashear Date: Wed Nov 9 10:34:10 2011 -0500 viced: avoid bogus handle in rename because fileptr's handle can be reset during CopyOnWrite we need to SetDirHandle after that call FIXES 130215 Change-Id: I61d21c6026b294e3c7f442786f6ee7f97ab6f5e4 Reviewed-on: http://gerrit.openafs.org/5818 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry-picked from a1669f3e37299c11bf29a458212e03d1bdb22334) Reviewed-on: http://gerrit.openafs.org/5984 Tested-by: Jeffrey Altman commit 7b35b1f29dadeaf5ea27714877c16e4f893037ba Author: Andrew Deason Date: Tue Nov 8 12:52:50 2011 -0600 regen: Fail on failures If something fails, don't ignore the error. Change-Id: Ia679cf8541adce573fa3ee16ae8fafec0cfae790 Reviewed-on: http://gerrit.openafs.org/5817 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6d519cf1234d54630dcfe48f6ecd393e2dfe71dd) Reviewed-on: http://gerrit.openafs.org/5983 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0e65a06262ff231fb782178abebf8a2817ae4908 Author: Andrew Deason Date: Wed Apr 13 13:15:57 2011 -0500 Add "pretty" build option Add the capability to do a "pretty" build, where we output something like " CC /path/to/foo.o" to build foo.o, instead of the entire compiler invocation, similarly to how the Linux kernel build appears. Add the "pretty" building for CC and LD rules. This also prints out some helpful information when a command fails, which can sometimes otherwise be annoying to figure out post-mortem. To enable the pretty building, make with V=0. To output everything that is actually run with V=0, make with 'V=0 Q=' . Note that this does not work with all makes, since not all makes will propagate command-line-specified variables to sub-makes without -e. Non-working makes include /usr/ccs/bin/make on HP-UX and Solaris. However, GNU make will work, as will /usr/xpg4/bin/make on Solaris. Change-Id: Ifb6cf8840c2b99c4d384e195434071ae427c4032 Reviewed-on: http://gerrit.openafs.org/4486 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 49cb0d00909693b85f52d87a26d5df69a829d9d5) Reviewed-on: http://gerrit.openafs.org/5982 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b8725e9543584c25a08ce6227072974c75c8b1b2 Author: Andrew Deason Date: Tue Nov 8 12:29:39 2011 -0600 Specify pattern rules in addition to suffix rules A few makefiles specify an old-style suffix rule, such as: .c.o: $(AFS_CCRULE) $< Not all makes seem to interpret these rules correctly (such as Solaris /usr/xpg4/bin/make). Since it is easy to do so, specify pattern-based rules along with these, like so: %.o: %.c $(AFS_CCRULE) $< Change-Id: I268c0a81b263c89d079976a01b2759ef6b4f2770 Reviewed-on: http://gerrit.openafs.org/5819 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5c64df8628e60f2e4c55aaf3e53fb01c140b42ed) Reviewed-on: http://gerrit.openafs.org/5981 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 97ab635fa5b384848bfbb403428b05463e5adfa1 Author: Andrew Deason Date: Thu Nov 3 13:40:37 2011 -0500 Add setenv/unsetenv to roken Add the replacement setenv and unsetenv functions to roken, for use on (at least) HP-UX and older Solaris. Change-Id: I032e744649300b1fcb89b30f4f36f9117d2b7b99 Reviewed-on: http://gerrit.openafs.org/5801 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 70e8451acd0426024c152073e53bc6606e0189e1) Reviewed-on: http://gerrit.openafs.org/5980 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bd2bedb563187007bea479e7c2fc7e60fadc6edc Author: Derrick Brashear Date: Sun Nov 6 16:28:27 2011 -0500 dafs: avoid null deref getting volume header we don't assign hd before dereferencing. stop dereferencing and just use the queue cursor. Change-Id: Id70be9e9ff59d68219698f11460effafbdd7a587 Reviewed-on: http://gerrit.openafs.org/5814 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from 00beae8c4e3b390637f20584e676cf86c817dadd) Reviewed-on: http://gerrit.openafs.org/5979 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d6b7f3303fe67ca21b1c71041b318993c3512e81 Author: Andrew Deason Date: Thu Nov 3 13:17:33 2011 -0500 salvager: Implement AskDAFS via SYNC flags Instead of probing the DAFS-ness of the fileserver by probing which FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC response header flags, which explicitly state whether or not the endpoint is DAFS. This avoids unnecessary "protocol mismatch" log messages when the endpoint is not DAFS. Change-Id: Ia228fffd75e23130fe37a74cf79b8433c234609a Reviewed-on: http://gerrit.openafs.org/5800 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7fee28bae30c5a65898a2e3fd7149f07e8ca0df6) Reviewed-on: http://gerrit.openafs.org/5978 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2865af40fd636d532ddc844e32e714e2e32026ea Author: Derrick Brashear Date: Fri Nov 4 11:43:01 2011 -0400 ukernel: handle pioctl errors properly in ktc the straight return from call_syscall isn't what we want. munge so e.g. EDOM handling for ktc_GetToken does the right thing. Change-Id: I5b4d1fe503f64e95544b66a3cf3e9c5c43a2cb5e Reviewed-on: http://gerrit.openafs.org/5807 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from b06c700ee40ca70ef08259af819e2a6084137457) Reviewed-on: http://gerrit.openafs.org/5977 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 179c9a59c4ba51d0848c71e55b64d5bd12d6dc39 Author: Andrew Deason Date: Fri Nov 4 16:12:03 2011 -0500 libafsauthent: Remove obsolete HP-UX workaround This workaround is no longer relevant. It is also error-prone and there are far better ways to achieve a similar result, so get rid of it. Change-Id: I24b1edca87d0b0d7e4f2214292b6af2d61218c5c Reviewed-on: http://gerrit.openafs.org/5811 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from c96d3429f2d4ad2ec7ac45a83c1111dc60a0d5c1) Reviewed-on: http://gerrit.openafs.org/5976 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8f1e1b0f1d7fb0df78188af2f7273c900256c2b5 Author: Andrew Deason Date: Fri Nov 4 17:19:28 2011 -0500 volser: Remove debugging log messages While the -log option to volserver is supposed to print additional log information, it shouldn't spam the log with useless data. Remove some of the log lines that are really more "debug" information, so we log the same amount of information as in the 1.4 series. Change-Id: I99273975bfbf484ae395f96a5d13c97e2aeb5c54 Reviewed-on: http://gerrit.openafs.org/5810 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 2a1251c5d0c1b0fd4024d7b3282187a838b551fd) Reviewed-on: http://gerrit.openafs.org/5975 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9a7d0801689de828bf11bb53413df1d46728d777 Author: Simon Wilkinson Date: Thu Nov 3 10:10:23 2011 +0000 Unix CM: Fix dir buffer leak in afs_readdir Resolve a buffer leak in afs_readdir that was visible on all non-Linux platforms (Linux has an independent readdir implementation) Change-Id: I9324c9cc979c51b06f90ad10eae01c36dae40840 Reviewed-on: http://gerrit.openafs.org/5794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry-picked from 025a7aee0b86c7d8a7299c85c88615eb8cd6b07f) Reviewed-on: http://gerrit.openafs.org/5974 Tested-by: Jeffrey Altman commit 60fa75d299d4ac421ecb10311f9127c866a03062 Author: Andrew Deason Date: Fri Nov 4 12:42:33 2011 -0500 DAFS: Deal with exclusive-state volume headers GetVolumeHeader assumes that headers on the LRU are not associated with a volume in an exclusive state. This is known to not be true for some cases when salvage requests are received over FSSYNC, and may be true in other scenarios. It's easy to just skip such headers, so skip them. Change-Id: Ie605f04e6c1a9e9e9ae3e8791179b3a85eab2fca Reviewed-on: http://gerrit.openafs.org/5808 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e) Reviewed-on: http://gerrit.openafs.org/5973 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fb3402c1dcca217240b4a56ceb8ac857ed19c114 Author: Jeffrey Altman Date: Fri Nov 4 09:34:53 2011 -0400 Windows: NPCancelConnection set correct length The RemoteNameLength passed in the IOCTL_AFS_CANCEL_CONNECTION call must not include the trailing NUL. NPGetConnection() returns the size of the buffer used which does include the trailing NUL. Change-Id: I02940d35b2cc3cdfbff91e169c4d8cba60f4e724 Reviewed-on: http://gerrit.openafs.org/5806 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from da00d719a77607d8873067902f5db5bff02d0e99) Reviewed-on: http://gerrit.openafs.org/5972 commit 929b83333bbe09b99eb613b4bf46be1d843d559e Author: Jeffrey Altman Date: Fri Nov 4 08:40:03 2011 -0400 Windows: do not leak resource in AFSQueryDirectory Track whether or not the pFcb->NPFcb->Resource is held so it can be released in all error paths. Change-Id: I2bfa9d3bb5a608ad861f60e1dee81df845080533 Reviewed-on: http://gerrit.openafs.org/5804 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 3acd9b854e05748578f8291200fad8c6650e9b14) Reviewed-on: http://gerrit.openafs.org/5971 commit 7a090d7029a1a99c07f09b9b0cd15303a50b7316 Author: Peter Scott Date: Fri Nov 4 07:31:57 2011 -0600 Windows: Failed to release correct lock For cross-directory renames, the correct parent lock was not being tracked Change-Id: I5337eb8b617d633e7f20e8fe706df8285e472ffa Reviewed-on: http://gerrit.openafs.org/5805 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from f7adbd3d3977a328612c0f527d764566846593da) Reviewed-on: http://gerrit.openafs.org/5970 commit a4d79c402a82799049faeb5b8f8902ef31f2cfba Author: Ken Dreyer Date: Mon Oct 31 08:27:16 2011 -0600 doc: limitations of addsite on different partitions A user on the openafs-info mailing list noted that the Admin Guide is unclear about creating read-only replicas on different partitions on the same fileserver. Clarify the rules here. Change-Id: Idcb944d46fc9f3994b79d8e930cd050830872f6c Reviewed-on: http://gerrit.openafs.org/5745 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from c59c07132ef17589ad3466ded418c1370539b7af) Reviewed-on: http://gerrit.openafs.org/5969 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bee8e4135fda49caf67b0a2983da3e91fcdc999e Author: Heimdal Developers Date: Thu Nov 3 12:37:36 2011 -0500 Import of code from heimdal This commit updates the code imported from heimdal to ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408) Upstream changes are: Jeffrey Altman (2): Windows: fallback to PROV_RNG if no PROV_RSA_FULL roken: posix errnos for windows Love Hornquist Astrand (3): drop __restrict to please old compilers add krb5_is_enctype_weak Don't export tests from library, reported in bug from Tom Payeire New files are: roken/setenv.c roken/unsetenv.c Change-Id: Ib644b61ee61e2528629a2b4d75f2bd329e1eb6c1 Reviewed-on: http://gerrit.openafs.org/5798 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from c0961b8d4103fab37c360461bcde30c56d24f483) Reviewed-on: http://gerrit.openafs.org/5968 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 995f86ec19fb7d972bcf96f7dde0cd4d769ed6f7 Author: Andrew Deason Date: Wed Nov 2 11:35:42 2011 -0500 Solaris: Specify ARCHFLAGS in CFLAGS Various autoconf tests which use the C compiler may yield different results depending on whether or not we are compiling for x86 or amd64 on Solaris (different libraries are available, structures may be different, et al). So, set CFLAGS depending on which arch we are targeting, so the autoconf results are more consistent with the actual compilation during the build. Change-Id: Iaec57276a803a9804e441787195f05f38c2963f2 Reviewed-on: http://gerrit.openafs.org/5786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 5eba97a8960c49aeea957dc94408368e1324eff0) Reviewed-on: http://gerrit.openafs.org/5967 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 172c40ae58fa0c541c3385ce4e13b4410aed8367 Author: Andrew Deason Date: Wed Nov 2 11:32:56 2011 -0500 Do OPENAFS_OSCONF before compiler autoconf tests OPENAFS_OSCONF can set the C compiler we use, as well as changing various compiler flags. These changes can alter autoconf tests, so allow OPENAFS_OSCONF to change these before various autoconf tests are performed which require the C compiler. Change-Id: I5a4145e71159fab1c4873ebb50c930391e5f0391 Reviewed-on: http://gerrit.openafs.org/5785 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 353aa7ef2c172f574998480d6d051b3f4e95ae7b) Reviewed-on: http://gerrit.openafs.org/5966 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b6298275e7d3e69145d2f11dfed5e6eb31a4a8e7 Author: Andrew Deason Date: Wed Nov 2 10:43:54 2011 -0500 Remove -settime/RXAFS_GetTime client support Remove the -settime option from afsd, and any code for making RXAFS_GetTime calls in libafs. Server probes have been replaced by calls to RXAFS_GetCapabilities, and the actual functionality of synchronizing the system clock has been superseded by other systems like NTP. Issue a warning for all code paths that try to enable -settime support. Historical note: the code that this commit is removing contains bugs. Do not simply revert this commit to turn on -settime support again. Change-Id: Iafb2ced1f411888f43b57b0141a9420f8738c349 Reviewed-on: http://gerrit.openafs.org/5787 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 1d9888be486198868983048eeffabdfef5afa94b) Reviewed-on: http://gerrit.openafs.org/5965 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9400197b3f3a7b1d6add2c8020c85fb04c2765a2 Author: Michael Meffie Date: Thu Aug 18 17:04:14 2011 -0400 opr: queue swap Add inline function to pivot two queues. Implementation by Simon Wilkinson. Change-Id: Idea3b8740c32992e91fc0b454c7c30140cc611c5 Reviewed-on: http://gerrit.openafs.org/5742 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9c130285d8f17a5e09bbe0b3c3b886ec3145bae9) Reviewed-on: http://gerrit.openafs.org/5964 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 27ade78fb9b0db8a1858e3eb77b5fadb8520d4b2 Author: Andrew Deason Date: Thu Nov 3 12:33:55 2011 -0500 external: trigger git commit-msg hooks on import When we import commits, the new commit does not have a Change-Id in the commit message. Usually a git commit-msg hook will be installed to automatically insert a Change-Id into the commit message if one does not already exist, so trigger the hook by performing a no-op 'git commit --amend'. Change-Id: Ia43b5b16ee00c9aee8950039b035d27ed6782781 Reviewed-on: http://gerrit.openafs.org/5797 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fbf68f12592419a315f56585f9b8bb3a822bbc9b) Reviewed-on: http://gerrit.openafs.org/5963 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2113b3d3d300a3b1afe6e580208e0f2bcad0b5ad Author: Andrew Deason Date: Thu Nov 3 12:27:22 2011 -0500 external: commit imports with --no-verify Currently, importing external commits with import-external-git.pl may fail if the current repository checks for whitespace errors, and the external commits contain whitespace errors. So run the commit with --no-verify, so we can make the commit before fixing up the whitespace errors immediately afterwards. Change-Id: I0acbf1ca7a9a2fae528e71e81b23d8fd6f496570 Reviewed-on: http://gerrit.openafs.org/5796 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7ef5aeb608a390b6ac88d7e6748c5a1b4a65e0c5) Reviewed-on: http://gerrit.openafs.org/5962 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c45876d847c4a194333af745a5bf5c431e512982 Author: Andrew Deason Date: Thu Nov 3 12:17:07 2011 -0500 Import setenv.c and unsetenv.c from roken Import the roken implementation of setenv and unsetenv, which are required on HP-UX. Change-Id: I0e56dd7368e61235013f6c94b8775170724f1d10 Reviewed-on: http://gerrit.openafs.org/5795 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 95038fde9a23b4550cbba38460f4668ca25b4f85) Reviewed-on: http://gerrit.openafs.org/5961 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c6fff259d03049b51364c3da9a5f3d88e9054fba Author: Peter Scott Date: Wed Nov 2 19:29:00 2011 -0400 Windows: fix deadlock in symlink Attrib retrieval Commit df22620f66f5ce92776177d4d800fc7f4ae4ae99 introduced a deadlock when retrieving file attributes for symlink objects. To correct the deadlock, do not hold the Fcb locks during the AFSRetrieveFileAttributes() call. Change-Id: If6b789781cc3bc14a2f8fdd5ee808fda4f7e8f99 Reviewed-on: http://gerrit.openafs.org/5792 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ed9bf9b55976c78cf24b43580d1752e81fe697b1) Reviewed-on: http://gerrit.openafs.org/5960 commit edb5c4068624e644caf4c075f8f725a66a03eb94 Author: Jeffrey Altman Date: Wed Nov 2 19:27:42 2011 -0400 Windows: always set reparse point attrib for symlink Make sure that we always set the reparse point attribute for symlinks in directory enumerations and attribute queries. Change-Id: Ice4405ce5f47a807680d857831a3bca07b95e697 Reviewed-on: http://gerrit.openafs.org/5793 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from d8f357b9838509c5a5cfa22a85dffcd962804025) Reviewed-on: http://gerrit.openafs.org/5959 commit 001e3b7fe0cc08b2858ce8839435ab39e2b62745 Author: Peter Scott Date: Wed Nov 2 19:25:36 2011 -0400 Windows: remember when a reparse point is opened If the mount point or symlink is opened as a reparse point we must remember that in the Ccb so that later reparse point processing can be implemented properly. For now remember with the CCB_FLAG_MASK_OPENED_REPARSE_POINT flag. Change-Id: I19e6358c47513a3c9283273893b306c2fd854579 Reviewed-on: http://gerrit.openafs.org/5791 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from e39e8bb5b2f08281bc1d91c9209a1a3f1b463af2) Reviewed-on: http://gerrit.openafs.org/5958 commit f06199a09be32f4522899732fe148a6dafd5ac4e Author: Jeffrey Altman Date: Wed Nov 2 10:35:14 2011 -0400 Windows: Mount points are always directories Set the directory file attribute for all mount points since a mount point target is always represented as a directory. Change-Id: I88cf8cefbd01f70dada749779a74d9e636cc0619 Reviewed-on: http://gerrit.openafs.org/5784 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c7e2d8450117a947cb858bfdb4aedd668bd56bfd) Reviewed-on: http://gerrit.openafs.org/5957 commit 1c2ad5c37991f79aabe8907718b0ee75b2acb388 Author: Peter Scott Date: Wed Nov 2 10:23:48 2011 -0400 Windows: Retrieve file attributes on symlinks When a component is a symlink, correctly retrieve file attributes during a query file information request. FIXES 130283 Change-Id: Ia6962510ee4027684290d840ef10ade64c024890 Reviewed-on: http://gerrit.openafs.org/5782 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from df22620f66f5ce92776177d4d800fc7f4ae4ae99) Reviewed-on: http://gerrit.openafs.org/5956 commit 199d5976814ce5002525f438f27449c0e562d824 Author: Peter Scott Date: Wed Nov 2 10:18:09 2011 -0400 Windows: add AFSRetrieveParentPath() Change-Id: I6f18abebc99713a89a374a06d22deeb1588ef949 Reviewed-on: http://gerrit.openafs.org/5783 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from cddb3baa13b1c941533bee5cdf0873ca4563c9c1) Reviewed-on: http://gerrit.openafs.org/5955 commit 51409629361b6ee1d4d814101a1f76bc65101c15 Author: Jonathan A. Kollasch Date: Tue Oct 11 12:56:08 2011 -0500 kdump-build: don't install when it hasn't been built for *bsd* Change-Id: I0d80a0464f64eb376fef976d500647fcc7fb774f Reviewed-on: http://gerrit.openafs.org/5596 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 6fe9a1ea0f22ef31ede5a9a8bb052b4ee71e7be0) Reviewed-on: http://gerrit.openafs.org/5954 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4d25dfc7d433e3fb552abf573adbbfecab837796 Author: Jeffrey Altman Date: Fri Oct 14 08:10:19 2011 -0500 klog.krb5: enforce DES for rxkad 0. Always request a TGT regardless of the state of writeTicketFile. 1. request des-cbc-crc when requesting a ticket for an rxkad service principal 2. check the returned key length to ensure that it matches the permitted length of an rxkad key. If not, generate an error instead of overwriting memory and continuing. FIXES 130278 Change-Id: I219774be6cadc41c2f3e3ff2fd4c882f69808052 Reviewed-on: http://gerrit.openafs.org/5619 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from 3a9a5783cd1fd73902655f0876e2069b42688c94) Reviewed-on: http://gerrit.openafs.org/5953 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0abcadec8680bbde750e6fbe27329416414bce50 Author: Peter Scott Date: Tue Nov 1 08:55:37 2011 -0600 Windows: DE Reference count added during create A reference count is added under lock to a newly created DE to ensure it is not removed through deletion while in flight. Change-Id: I4057a0301752dc30c6b79c4d3af31a74f42cb2ba Reviewed-on: http://gerrit.openafs.org/5775 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 4f4b805ae9107482aa39f2c3c0c4327e8466e2ac) Reviewed-on: http://gerrit.openafs.org/5952 commit be85af45b5217acb219819c2a47b7647102fec34 Author: Peter Scott Date: Mon Oct 31 18:10:07 2011 -0400 Windows: change AFSProcessUserFsRequest default Default the return code for AFSProcessUserFsRequest() to STATUS_INVALID_DEVICE_REQUEST instead of STATUS_INVALID_PARAMETER. Change-Id: Id80996aa0f4ceb3e4fe5c1bc1905a3ce6ad39f7f Reviewed-on: http://gerrit.openafs.org/5774 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 96e313de3e040efffbb9b933b0b2ae15c9fd540c) Reviewed-on: http://gerrit.openafs.org/5951 commit 08129740ed7df57e7e8fdb620579649267454b20 Author: Peter Scott Date: Mon Oct 31 18:07:23 2011 -0400 Windows: correct ordering of reparse point tests Test for whether an object is a reparse point before testing whether the provided buffer is large enough to hold the result if it is. FSCTL_GET_REPARSE_POINT FSCTL_SET_REPARSE_POINT FSCTL_DELETE_REPARSE_POINT Change-Id: Ifb637f90dee41b1d8db8674a3b6436f11b754576 Reviewed-on: http://gerrit.openafs.org/5748 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ee8b6d34fa7d562f94469e2b8098ccc0507d5876) Reviewed-on: http://gerrit.openafs.org/5950 commit aa6cc8e9c9fa98ca43b25e8047729537b67697a9 Author: Peter Scott Date: Mon Oct 31 18:05:31 2011 -0400 Windows: log FSCTL_CSC_INTERNAL requests FSCTL_CSC_INTERNAL requests are not supported and will return STATUS_INVALID_DEVICE_REQUEST. However, log them for easier debugging. FSCTL_CSC_INTERNAL is defined in ntifs.h only for Vista and above. Since afsredir is built for XP and above its value must be conditionally defined by us. Change-Id: I8b89e5fb66ea48567fb617a81dc41f1c5c4617c5 Reviewed-on: http://gerrit.openafs.org/5773 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 94e9fceaa7ec343717b3fdc8610381832f532ebf) Reviewed-on: http://gerrit.openafs.org/5949 commit a3e342da9cec88c63026b2777e91c0ebdd007973 Author: Peter Scott Date: Sat Oct 29 13:55:46 2011 -0400 Windows: Directory Entry Processing Memory corruption was detected due to improper handling of directory entries and the short name b-tree during directory revalidation and tear down. The problem resulted in a BSOD most frequently when roaming profiles were written back to the file server or when multiple clients were actively modifying the contents of a directory simultaneously. This patchset makes a number of changes: . rename processing no longer handles collisions locally. the file server replaces a target atomicly when there is a collision. . directory validation is no longer delayed until a handle is closed . data version numbers are checked for implied invalidation Change-Id: I119511118e7f1492428da81f4dabc936e7a10f64 Reviewed-on: http://gerrit.openafs.org/5736 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from af3dbb34a1ff226ac693c143f8e9d94ced4114c9) Reviewed-on: http://gerrit.openafs.org/5948 commit ad8aabf86e9d7e12897a9f0bfc425d4eb53580ed Author: Peter Scott Date: Sat Oct 29 13:29:55 2011 -0400 Windows: additional trace logging for afsredirlib A large number of addition trace log entries were added to assist in diagnosing problems in the dir entry processing. Change-Id: I8087cb8b72316ef367faa107d02cccf92b7b1ff3 Reviewed-on: http://gerrit.openafs.org/5739 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from dac012a84b1fec9f2a5003e8cf45a7bdb8cb004a) Reviewed-on: http://gerrit.openafs.org/5947 commit f1cc5706f6dceb8dc3e1ed4845b9d06efeeb92ed Author: Peter Scott Date: Sat Oct 29 11:34:07 2011 -0400 Windows: Reimplement AFSGenerateCRC() Replace the home grown CRC generation with a call to RtlHashUnicodeString() which is present on Windows XP and above. Change-Id: I5769fc99fb2485714fdb12d5f8a62dca47791c0c Reviewed-on: http://gerrit.openafs.org/5738 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 15d9654d7242e56a6bab9f8d61afa87b58c1c55f) Reviewed-on: http://gerrit.openafs.org/5946 commit b17fabb7b4a24fa44b64f0436297d284319a0d19 Author: Marc Dionne Date: Sat Oct 29 19:23:07 2011 -0400 Linux: 3.1: update RCU path walking detection in permission i_op The permission() inode operation changed again with kernel 3.1, back to the form it had before 2.6.38. This compiles fine, but is missing the new way of detecting when we get called in RCU path walking mode, resulting in system hangs. Change-Id: If86c2cca9c16aef7731f04832ec524ac30c22b3b Reviewed-on: http://gerrit.openafs.org/5740 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4952df3f0359531e4a660c99c94c51eb0b169f59) Reviewed-on: http://gerrit.openafs.org/5945 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a93cd10b946f17c715cf748de919c697b7887358 Author: Simon Wilkinson Date: Tue Jun 21 18:32:02 2011 +0100 rx: Remove the ADAPT_WINDOW code RX still has the remnants of an old mechanism for doing RTT and congestion window detection. This code is #ifdef'd out using the ADAPT_WINDOW define, but is pretty much unservicable these days, as it collides with the TCP style implementation (with ADAPT_WINDOW enabled, both will attempt to manipulate a connections RTT and window size) As the current TCP-style RTT and window calculation seem to work much better in deployment, and there isn't much hope for us being able to maintain two different congestion mechanisms, just remove ADAPT_WINDOW. It is in git, if we ever want it back (not that I think we ever would). Change-Id: I956aa991eb14617de1cebf36b9ce9e780211aa22 Reviewed-on: http://gerrit.openafs.org/5737 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from d603e2a95252200f02ad8465815c5bac0b23b1e1) Reviewed-on: http://gerrit.openafs.org/5944 commit 132655420c5e195c41afdaac3a5f35606631efe8 Author: Jeffrey Altman Date: Fri Oct 28 17:43:24 2011 -0400 Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of a file to a name that does not exist. Put back the code that makes that possible with a comment. Change-Id: I19dddded27a32b6ffa86d1458b7a1e2253705e97 Reviewed-on: http://gerrit.openafs.org/5735 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 7a426424b7fb45659f6000a564e8c71a9108a33c) Reviewed-on: http://gerrit.openafs.org/5943 commit 18170cef0d3786a3ae87f35ad39552673882ad6b Author: Jeffrey Altman Date: Fri Oct 28 11:36:10 2011 -0400 Windows: out of date version not in current chunk In buf_GetNewLocked(), the comparision to decide whether a cm_buf_t is a member of the current chunk must take the data version into account. If the data version is out of date, it is not part of the current chunk and is an object that can be safely recycled. Change-Id: I2d1699163925c881990b0f647bba1e8dd05d3f4d Reviewed-on: http://gerrit.openafs.org/5734 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb) Reviewed-on: http://gerrit.openafs.org/5942 commit 3c86f4c60f73a4c245c1f72ca53214036ebb6c40 Author: Jeffrey Altman Date: Thu Oct 27 17:57:25 2011 -0400 Windows: only flush buffers on shutdown if running If a service shutdown message is received prior to the service entering the running state, do not attempt to buf_CleanAndReset() because the required data structures and locks are not initialized. Change-Id: I4257cfcd1179a6d118975b6b813213c8aae232ed Reviewed-on: http://gerrit.openafs.org/5733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9743f5729d1a55513e861bb1334599a8e597de6b) Reviewed-on: http://gerrit.openafs.org/5941 commit a79aa81e72d37cda14c853c6406bea0e1ca01298 Author: Jeffrey Altman Date: Tue Oct 25 15:32:11 2011 -0400 Windows: Do not EEXIST exact match during rename AFS Rename operations on the file server will delete a target file if it exists. Do not prevent renames because an exact match of the target name exists in the target directory. Change-Id: I2d7c3283dc6433d1d1276e1406eb383b0f2853ac Reviewed-on: http://gerrit.openafs.org/5731 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9cf7a628c2ff178b2fa236d2c0a41ca9be315036) Reviewed-on: http://gerrit.openafs.org/5940 commit f0bc70d8bd78f6b4679939c1a9aedb4451a4f952 Author: Jeffrey Altman Date: Tue Oct 25 15:42:44 2011 -0400 opr: build on Windows after queue.h move 55efff93fe2762b58dc70cdd20aaf97e39825929 broke Windows. update the NTMakefile in src/util and src/opr to correspond to the move of queue.h. Change-Id: Ie74289712a442d01fdb15315a974f7430c3e8f48 Reviewed-on: http://gerrit.openafs.org/5732 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 8fce3848d94f9717323bbd5dc51a9d18956fa2b5) Reviewed-on: http://gerrit.openafs.org/5939 commit b03c426b363b3cf1200b1819dc000a8322b69c3c Author: Rod Widdowson Date: Sat Oct 22 16:46:26 2011 +0100 Windows: Look for 8.3 name when doing a rename If we are doing a destructive rename we need to find whether the target file exists. This is done in the usual way (case sensitive case insensitive), but the short name is not looked for. This means that the rename of a file to a short name will not supersede correctly; rather the service refuses the rename since the target existed already. This patch looks the target name up in the shortname tree if the target name is short and all else has failed. Change-Id: Ib03a87e58a9f015000fc2bf3a4067b8683032a49 Reviewed-on: http://gerrit.openafs.org/5652 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 241d3d54cebfc661cfaec6d21de091d906df3d08) Reviewed-on: http://gerrit.openafs.org/5938 commit 83baa00bc0414f186bf8e8a250ccd3ff389f0d77 Author: Peter Scott Date: Thu Oct 20 14:39:31 2011 -0400 Windows: New Trace for DirEntry tracking problem Incuded in this patch is additional trace for logging how directory entries are added, modified and deleted throughout the redirector Change-Id: If66c2790d8c8ec65733c20f52da4e98ec964ac82 Reviewed-on: http://gerrit.openafs.org/5640 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 159003395a6183266ad9672f12482b1cba6ba0ff) Reviewed-on: http://gerrit.openafs.org/5937 commit 1fbd30e74d8e6a8fe89c5d8d47f626a6654268ab Author: Jeffrey Altman Date: Mon Oct 17 09:29:37 2011 -0400 Windows: Free work item memory with tag value For consistency throughout the source module, free all work item memory allocations with ExFreePoolWithTag. Change-Id: I96eb3fc9f4cad11133b20354b88c5c71f340bc32 Reviewed-on: http://gerrit.openafs.org/5627 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from f0cc4c5dd0c03e4074fc70583215e590623e2414) Reviewed-on: http://gerrit.openafs.org/5936 commit 9ce178637066fe38b43c55e4b0a4c3acce7ecfbb Author: Jeffrey Altman Date: Mon Oct 17 09:28:11 2011 -0400 Windows: free pointer after last reference This is a superficial change but is being done for readability. If given the choice of freeing memory and then testing the pointer value or vice-versa, test the pointer value first. Change-Id: I84666e0bc2e06641c3d0d4ae16f42db996470f32 Reviewed-on: http://gerrit.openafs.org/5626 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from d5a6a895e3b004666b0d6aaa9fe4313b0a831dbd) Reviewed-on: http://gerrit.openafs.org/5935 commit d6370c5762f06cee690f38ddeff667846474a9ae Author: Jeffrey Altman Date: Mon Oct 17 09:26:13 2011 -0400 Windows: AFSInitPIOCtlDirectoryCB free in try_exit Process all conditional release of allocated memory on failure within the try_exit on failure. Change-Id: I818b75d3a1efae2b1ee8ce77f3606d29862a2446 Reviewed-on: http://gerrit.openafs.org/5625 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from ada5908ca1ed8cfa7bfc42890ac5edc73769ae4c) Reviewed-on: http://gerrit.openafs.org/5934 commit 169f14fdd83b8c83f90be3c7be9bb0a747655329 Author: Jeffrey Altman Date: Tue Oct 25 13:30:19 2011 -0400 Windows: close leak in AFSPrimaryVolumeWorkerThread Prevent a leak of the non-paged pool and a Resource by freeing all allocations within the Specific.Directory.PIOCtlDirectoryCB object. Use AFSExFreePool() instead of ExFreePool() because the objects are allocated from the AFSRedir.sys driver allocator. FIXES 130280 Change-Id: I4385c6ac60dce0949aa32e95e358d81e1434bb4a Reviewed-on: http://gerrit.openafs.org/5730 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 782fba58db1210e998ef9c6a50803262ac256812) Reviewed-on: http://gerrit.openafs.org/5933 commit 18cfa2022bc7d441387a73177a35936bc7cb3777 Author: Jeffrey Altman Date: Mon Oct 24 21:14:59 2011 -0400 Windows: afsredir only wants shortName if not 8.3 When performing a directory enumeration for the afs redirector only specify a shortname if the name is not valid 8.3. Change-Id: I14d30aabafc10d09363fd6101e339b4a9e7407b3 Reviewed-on: http://gerrit.openafs.org/5727 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 61b04b19ad4bf2c62ec4309efeba4f442a54d8f2) Reviewed-on: http://gerrit.openafs.org/5932 commit 33481411251ed913c3f56a6b1202a776cfed561d Author: Jeffrey Altman Date: Thu Oct 20 14:06:47 2011 -0400 Windows: Use SetFlag macro when setting flag Change-Id: I3e4a643e1f3cd257324d4fe58cb779cd0894a25f Reviewed-on: http://gerrit.openafs.org/5642 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 219624206ddee454e6bcbac7da7fe2fe632e39a7) Reviewed-on: http://gerrit.openafs.org/5931 commit 329665578d23ef51fd29f057cc4f58e4ea8be21d Author: Jeffrey Altman Date: Thu Oct 20 14:05:59 2011 -0400 Windows: minor typo in trace output Change-Id: I5dba1a39a68d1de880e2f72ae5377ca1ddc239f5 Reviewed-on: http://gerrit.openafs.org/5641 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from e21a063217f99ac441bb65c7e1f628de2a0fbb68) Reviewed-on: http://gerrit.openafs.org/5930 commit f37198cb79975fd516d505a12834c65f53b92932 Author: Peter Scott Date: Tue Oct 18 10:04:48 2011 -0400 Windows: AFSRemoveCaseInsensitiveDirEntry corrections If there is a fLink but no parentLink for the DirEntry being removed, return the fLink as the new value for *RootNode. This patch set also includes two changes that improve readability but do not alter the behavior. Change-Id: Id44d0d4897b002551039fe2016b529a838d61913 Reviewed-on: http://gerrit.openafs.org/5638 Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 81bfacca545e7394a13baa569a6b7c894fc36bde) Reviewed-on: http://gerrit.openafs.org/5929 commit c024e744d11cb5a168d773e2d7a905746736903d Author: Jeffrey Altman Date: Mon Oct 17 09:22:53 2011 -0400 Windows: AFSEvaluateTargetByName free buffer if no return For consistency with other functions in AFSCommSupport modify AFSEvaluateTargetByName to free the DirEntry on completion if the caller has not provided an out parameter to accept it. Change-Id: I7c59d215ffc37b160b60989a716ac61f609a5b2d Reviewed-on: http://gerrit.openafs.org/5624 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 46a96ee06582178eb88e8ca1c7fbb33fae79b403) Reviewed-on: http://gerrit.openafs.org/5928 commit 8ee098dffece3258bf1119307fc84ef8d3a5013e Author: Jeffrey Altman Date: Mon Oct 17 09:19:33 2011 -0400 Windows: remove unused code block A small bit of dead code in the redirector. Change-Id: Ie3205dfa541d194b39658a555be122e9d0e72cea Reviewed-on: http://gerrit.openafs.org/5623 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from c780a9bc2849e25e3ac84f9f674348b8cdd942ff) Reviewed-on: http://gerrit.openafs.org/5927 commit 2c6378720002f2a19bf4ba72bef072f29c5f4e5b Author: Jeffrey Altman Date: Mon Oct 17 09:10:17 2011 -0400 Windows: re-indent afsredir log message params convert tabs to spaces for consistent indentation make use of braces be consistent Change-Id: I126546be0557f13d934fa5418f5edc3d5dabc94d Reviewed-on: http://gerrit.openafs.org/5621 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from 9c723e7a514ee4f809348ec79e2124cf3a38d895) Reviewed-on: http://gerrit.openafs.org/5926 commit 677899fe0f156dcf5c49d54f58df6b434d8c7b85 Author: Rod Widdowson Date: Sat Oct 22 15:00:03 2011 +0100 Windows: Defer deref of a directoryEntry During the handling of SL_OPEN_TARGET opens (usually associated with a rename) a directory entry was deferenced prior to its contents being used (to set up a seconding inforation field). This change just holds on to the reference until after that processing. Change-Id: I33b5362433e49ee06ff99081341e7ef12d9ac959 Reviewed-on: http://gerrit.openafs.org/5651 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 2a7795aa565dfa4e371f806b799ce6a01a2db6c9) Reviewed-on: http://gerrit.openafs.org/5925 commit 56fa7f47aa2c0b5cd1c6bf0c0a932660e155b5eb Author: Rod Widdowson Date: Fri Oct 21 16:57:02 2011 +0100 Windows: Set new file index correctly during rename Directory entries are required to have a file index which is used during directory enumeration. When inserting into a new directory we have to update this from the target directory. This code fixes a bug whereby it was being set from the source FCB, rather than the target one. On failure we now also reset the value to its old value. Change-Id: Iea938b0012694afd2271d330b99438e47beb260a Reviewed-on: http://gerrit.openafs.org/5646 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 9824a53aea25a150f770e6b37536aa5fd7eb87df) Reviewed-on: http://gerrit.openafs.org/5924 commit 5da7359aac24c841506d2f4b9311f7440343dd35 Author: Jacob Thebault-Spieker Date: Tue Jul 19 15:01:26 2011 -0700 allow cloning of any volume to any volume with same parent ID remove checks to disallow cloning of ro volumes to rw volumes, which allows cloning of any volume within the same parent ID grouping, including allowing destruction of newer version of the volumes. Change-Id: I4c0e0f1a05c0b015aa832326b1c0dd48bc70fd70 Reviewed-on: http://gerrit.openafs.org/5049 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 83c41c69411ece7ac1dd0a7b15d4ee9746edcf23) Reviewed-on: http://gerrit.openafs.org/5923 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1d9dc1820592820bec4b73eeb7418a89d9a0df70 Author: Jacob Thebault-Spieker Date: Tue Jul 19 09:02:49 2011 -0700 remove check for disallowing clones of backup or ro volumes removes the if-statement ensuring that the volume being cloned is not a backup volume, nor a read-only volume. This allows clones from any type of volume to a given volume. Parent volume meta-data is maintained, only the cloneId value changes. Change-Id: If75d797e355d70912e7be56fae0ba3a40890f6cb Reviewed-on: http://gerrit.openafs.org/5046 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4e1a65ba7edec519acc67f0dcf2237a0f26e92aa) Reviewed-on: http://gerrit.openafs.org/5922 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2961e6488a03a83f4d61c800520489552ed87fd4 Author: Michael Meffie Date: Thu Oct 6 08:33:37 2011 -0400 bozo: build notifier sample program Build the smail-notifier sample program. Change-Id: Ifd0df65cefc1eadb3e8fdef44f0398df950ae282 Reviewed-on: http://gerrit.openafs.org/5555 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from ac88af748e25a40d062c888396aab8670ff8426a) Reviewed-on: http://gerrit.openafs.org/5921 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3b31b24267217289edb837baa9f2ec9da58dea08 Author: Michael Meffie Date: Thu Oct 6 07:55:21 2011 -0400 bozo: test program update Add -file option to test program to simulate program crashes. Change-Id: I5c0aedc2687b1eeee6cb5bf923eabb347f8fd072 Reviewed-on: http://gerrit.openafs.org/5533 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from e7302bcc9c4aa6f1e6a1ae8e5b498bcb0540aac9) Reviewed-on: http://gerrit.openafs.org/5920 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a7ed5536e142f62b28094274647e66fed40d14cd Author: Andrew Deason Date: Mon Aug 29 17:41:31 2011 -0500 DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER Currently VRequestSalvage_r takes a flag, VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the specified volume to be freed (via FreeVolumeHeader). This is almost never safe to do, since there may be other users of the specified volume that can be accessing the volume header at the same time. There is also no reason to invalidate the header at the time of the VRequestSalvage_r call, since the header must be invalidated when we detach the volume (other utilities may change header information). So, if there are any problems in the future because we do not invalidate the header at the time of VRequestSalvage_r, it is the fault of the detachment/offlining logic. So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take this opportunity to correctly document the VRequestSalvage_r headers in the VRequestSalvage_r comment, as it was previously missing the VOL_SALVAGE_NO_OFFLINE flag. Change-Id: I5d0451a7326997b38a466ec427c2e12e0cea4ae6 Reviewed-on: http://gerrit.openafs.org/5319 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5) Reviewed-on: http://gerrit.openafs.org/5919 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 5e711345279af397da9022c5072ea298dcbc051a Author: Michael Meffie Date: Thu Oct 13 12:23:35 2011 -0400 DAFS: fssync online requires a partition name argument fssync-debug online silently fails when run without a partition name. Check for the required partition name on the server side and the client side. Report errors back to the client when the server side fails to pre-attach the volume. Change-Id: I0b6b3729acf50656aefb082ae56ea9fb9218f11a Reviewed-on: http://gerrit.openafs.org/5615 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from d171a5e059566cc99c5dd980039dd56233f91a67) Reviewed-on: http://gerrit.openafs.org/5918 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7e74702fadbf90fd56d97fb2adc8099b56ebb4fb Author: Andrew Deason Date: Tue Oct 11 10:51:14 2011 -0500 volser: Remove ExtractVolId volser was using its own function to extract a volume ID from a filename string, and was using atol to do so. The ato* family of functions can have problems with larger volume IDs, not to mention a lack of error checking, so don't use it. Since we already have the function VolumeNumber in the vol package to do the very same thing, just use that instead. Change-Id: I76ed65e4640cc42515091810689cd6e61f684ea0 Reviewed-on: http://gerrit.openafs.org/5594 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry-picked from 87f969f82d12c8200ede3fd30a151e09ab0bf6ad) Reviewed-on: http://gerrit.openafs.org/5917 Tested-by: Jeffrey Altman commit cab590b6a99374084da41bd4035164c0f5b09f5e Author: Andrew Deason Date: Mon Oct 3 13:10:44 2011 -0500 viced: Check for HOSTDELETED in stillborn check h_FindClient_r checks the connection rock for a client object twice. First it sees if we already have a client object, and if we don't, we effectively create one (or find a suitable one). Then we check again, to see if someone else set the rock while we were creating a client structure. Currently, the first check checks if client->host->hostFlags has HOSTDELETED set, but the second check does not. So, if the host associated with the client has been deleted by someone else, currently we will unnecessarily log a "stillborn client" message, and we will continue to use the deleted host. If the host continues to be held by someone, we will run into the same situation repeatedly on future requests until all of the host references go away. To fix this, also ignore HOSTDELETED clients when performing the stillborn race check. Change-Id: Ifbac6d7fafd42ca9fe47360ba3915c1b2b6908c2 Reviewed-on: http://gerrit.openafs.org/5614 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from b5a153fb75bb6642490e9856dc6212244a590301) Reviewed-on: http://gerrit.openafs.org/5916 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit abf127c90aa670b302135b4dbe1dc33dbcb15601 Author: Andrew Deason Date: Thu Oct 13 11:45:58 2011 -0500 vlserver: Log to VLLog by default, not PtLog Change-Id: I5d5cbca19dd27a3c6c1c1d3ff15746fd4528cfc2 Reviewed-on: http://gerrit.openafs.org/5616 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 13a4642458254e6bdbfa6fd8e165c270f567a1aa) Reviewed-on: http://gerrit.openafs.org/5915 Tested-by: Jeffrey Altman commit fcc79659ee34e05ae8edafdea159faeeeda3e66f Author: Andrew Deason Date: Fri Oct 14 11:32:34 2011 -0500 vos offline: Bring volume back online for -busy vos offline is supposed to bring a volume back online from "busy" status before exiting, as volumes should not be in "busy" status for extended periods of time. This was being enforced by required that -sleep be specified; however, -sleep only results in the volume being brought back online if a non-zero sleep time was specified. So, make sure the volume is brought back online if -busy was specified. Change-Id: Iaefd135bd69b3205d14b88c0b35f493d91eb3a0e Reviewed-on: http://gerrit.openafs.org/5620 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d) Reviewed-on: http://gerrit.openafs.org/5914 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aba3f679e89256d9dbad0785068eaea56d4a93c1 Author: Marc Dionne Date: Sat Oct 22 09:32:33 2011 -0400 cache bypass: don't define iovecp for UKERNEL iovecp is defined but not used for UKERNEL. Define it conditionally to avoid gcc warnings and --enable-checking failure. Change-Id: Ic4697ffd329c975e1357f1e19328700a22c4a9da Reviewed-on: http://gerrit.openafs.org/5650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 547d94edd3affb5f377cd1b3db39c46ca0cf5aec) Reviewed-on: http://gerrit.openafs.org/5913 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aadaa1ea7615f6ba27b19771194a5639fb576714 Author: Rod Widdowson Date: Sat Oct 22 14:27:41 2011 +0100 Windows: Remove unused cleanup flag In AFSOpenTargetDirectory the flag bRemoveShare was initialized FALSE and never set TRUE. In teardown after failure some code did listen to the flag, but the operation (IoRemoveShareAccess) was not protected by the FCB mainlock which it should have been. Rather than get the locking correct, just remove the flag entirely. Change-Id: Ib5712af0c572a6ceab3aa1643b4959b394d3860c Reviewed-on: http://gerrit.openafs.org/5649 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from f715ebaee4188300ecee57109512609c7c84cf98) Reviewed-on: http://gerrit.openafs.org/5912 commit 44a99baa658042d29ed82c2eeae910c28383c3b6 Author: Derrick Brashear Date: Sun Oct 23 19:15:16 2011 -0400 bypasscache: allow arbitrary sized iovecs instead of binding outselves to PAGE_SIZE, just fill any size Change-Id: I453acc35ddf41ff54d0da96e44694f13552ba6d4 Reviewed-on: http://gerrit.openafs.org/5658 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 4b817cbb520872e69b01e5675f9037d8948d0ade) Reviewed-on: http://gerrit.openafs.org/5911 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 718b265846da050769a1f2f147533bfb30556a9e Author: Derrick Brashear Date: Thu Oct 6 04:04:36 2011 -0400 bypasscache: do errors correctly do set errors when we bomb out early do not unlock and return early when we happen to do a correct zero length read do set errors the kernel can deal with if we're feeding a page routine Change-Id: I69e53f7a326de780edd8a820aaacb506aef1f25f Reviewed-on: http://gerrit.openafs.org/5554 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 28a159b2bfff7ad450dce612601a0286d4f91df5) Reviewed-on: http://gerrit.openafs.org/5910 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1eebe1e50dd8c3208a895519bff21da5f68553a6 Author: Derrick Brashear Date: Tue Oct 11 15:37:57 2011 -0400 ukernel: get an ip address even when dns and hosts suck gethostname plus gethostbyname being useless make things fun make things less fun Change-Id: Ia3146f54a507ba4d1d54bad3abee63f2190dc5d8 Reviewed-on: http://gerrit.openafs.org/5600 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 6f59c71988d75f76750c46adb11cda7e9189d5f3) Reviewed-on: http://gerrit.openafs.org/5909 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8e031303ce41d89a30a58e728118550cc0fcd7bc Author: Marc Dionne Date: Sun Oct 23 22:45:21 2011 -0400 dir: add missing return in DRead A missing return in the kernel version of DRead causes the code to think that no entry exists for a dir and proceed to allocate a new one, if the entry is the third one in the hash chain. If the existing entry is dirty, its contents are never written back, and the pending changes to the directory are not seen by the client. Change-Id: I9853b02c114225c02c68b8086aa6cf0ee8fd1a13 Reviewed-on: http://gerrit.openafs.org/5666 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7829e7152361c38a22a7ba4c11e4f614e4392d60) Reviewed-on: http://gerrit.openafs.org/5908 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4efc8b46714027315d3ca4d2a481e1d9c33d3b4 Author: Simon Wilkinson Date: Sun Oct 23 17:41:27 2011 +0100 tests: volser doesn't need rxgk yet An rxgk dependency has crept in to the volser tests. Remove it for now. Change-Id: Ic475977b3e5191f267e932943ec6546632f2977d Reviewed-on: http://gerrit.openafs.org/5665 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 2aaa540276f5b5a0c368e44d8fd04b32c4632c3f) Reviewed-on: http://gerrit.openafs.org/5907 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d38f316e4e6b429849e79d33ffe8925379477e11 Author: Simon Wilkinson Date: Sun Oct 23 17:40:20 2011 +0100 tests: Add opr library for ktime test The ktime tests need libopr for the lcstring routines. Add the dependency. Change-Id: Ib366a17cf770e93b109eab890dc61398831080ad Reviewed-on: http://gerrit.openafs.org/5664 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fd5174d918a5d75f64b122c8433a3c431cb8e454) Reviewed-on: http://gerrit.openafs.org/5906 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e4ccc7af0c892ac6de2632993e08a8b0f9450ea1 Author: Simon Wilkinson Date: Sun Oct 23 17:49:08 2011 -0400 roken: Add *progname() to shared library exports Add rk_getprogname and rk_setprogname to the set of shared library exports in libroken Change-Id: I178d2a4d428f889c869da75f9dc4e5da46a650e1 Reviewed-on: http://gerrit.openafs.org/5661 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from d88682e803912451880c3a9c2b07a01abaebe984) Reviewed-on: http://gerrit.openafs.org/5905 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4974db91802f6051922e91817a42fc57e3efbcf Author: Simon Wilkinson Date: Sun Oct 23 21:23:34 2011 +0100 rx: Define afs_kmutex_t for LWP too afs_kmutex_t is used for lock definitions in the kernel, and in pthreaded builds. LWP doesn't have any equivalent, and all structure members using this type have to be protected with RX_ENABLE_LOCKS, which starts to become untidy. Just make afs_kmutex_t an int for LWP, so that we can simplify our headers, at the expense of some additional storage on LWP builds (which are going away at some point, anyway) Change-Id: Idd90fd0c2b0aa94fde1308b49641f83a820dee8b Reviewed-on: http://gerrit.openafs.org/5660 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5743c96bdea2e9aafeeeec3a1b4377d8860ef437) Reviewed-on: http://gerrit.openafs.org/5904 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit dc4e3ac1c1c7123633d0d3a890ed31f2919f89d3 Author: Simon Wilkinson Date: Sun Oct 23 16:38:13 2011 +0100 dir: Don't leak a buffer on a failed Enumerate If, for some reasons, Enumerate encounters a hash object with a NULL buffer pointer, that's no reason to leak the hash object. Make sure that we DRelease it before failing Change-Id: I6a8f3583dd1c9c11f1dbc59dcd36fdd0460bda61 Reviewed-on: http://gerrit.openafs.org/5659 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 3f938315adc08936024eb86678745dd85d2a092d) Reviewed-on: http://gerrit.openafs.org/5903 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 66730cdf8f033a77f644690ae2163e79feffc1a5 Author: Andrew Deason Date: Fri Oct 21 15:05:06 2011 -0500 LINUX: Fix afs_linux_pag_to_groups signature "new" is a struct group_info**, not a struct group_info* Change-Id: I4007c614002cbe3683787f9a77e43798328c5d07 Reviewed-on: http://gerrit.openafs.org/5648 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e) Reviewed-on: http://gerrit.openafs.org/5902 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a3297643410b3759362bb6798c345ba70b6f48f3 Author: Andrew Deason Date: Fri Aug 12 14:50:26 2011 -0500 LINUX: Revert group changes on keyring failure On Linux kernels that support keyrings, when we setpag we try to add the PAG to the session keyring and to the supplemental group list. Currently, if we fail to add the PAG to the keyring (which may happen due to key quotas, or possibly other reasons), we return failure but the group list is still modified with the new PAG in it. Therefore, if the keyring-based approach fails, the new PAG may still be in use, but there are no keyring keys associated with that PAG, so the PAG may never get destroyed. This can cause a large number of PAGs to accumulate over time, causing performance problems. So, change this so that, in the event that keyring installation fails, we revert the group list back to what it was before we touched it. Also mark all unixusers with the new PAG as expired, in case one got created during processing. Thus, the new PAG never gets used. Change-Id: I068158607d19e27db6dbeda84f912c52d4b1919f Reviewed-on: http://gerrit.openafs.org/5238 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from ee2fbffb04bb8b5098354646e262afa90c1b6f59) Reviewed-on: http://gerrit.openafs.org/5901 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 6f730bcdadb7f78a0b44e451b1725a7aa699abaf Author: Andrew Deason Date: Thu Oct 20 16:57:14 2011 -0500 viced: Do not swallow errors on StoreData recovery When we encounter any error in the StoreData fetch/store loop, we reset the disk usage to ensure it remains correct, even in the face of unexpected errors. However, when we do so, we use the errorCode from VAdjustDiskUsage as our return value; if it is 0, we return success, ignoring the error that got us in this code path in the first place. Instead, keep track of a temporary errorCode for the disk usage adjustment, and do not override our return value if there was no error in the disk usage numbers. Change-Id: I1fcd0f52821ac813d57ecac2f743edd4474727b1 Reviewed-on: http://gerrit.openafs.org/5645 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from dd831c09602f1ef16cc7dece84aeff638cce7272) Reviewed-on: http://gerrit.openafs.org/5900 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d26d743c9dc7432fb400b8160ffaebfa1437f787 Author: Simon Wilkinson Date: Sat Oct 22 09:43:41 2011 +0100 opr: Move queue header out of util Move the header which is installed as opr/queues.h out of util/ and into the new, top level, opr/ directory. Similarly move the tests out of the util/ test suite, and into the opr/ tests Change-Id: I56cebc8f2d9f53454e70147e07587580c4e3c4b5 Reviewed-on: http://gerrit.openafs.org/5656 Reviewed-by: Derrick Brashear Tested-by: Simon Wilkinson (cherry-picked from 55efff93fe2762b58dc70cdd20aaf97e39825929) Reviewed-on: http://gerrit.openafs.org/5899 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4743c4b30bfa389e69ef772d8648657f040a919 Author: Simon Wilkinson Date: Mon Oct 10 19:01:26 2011 -0500 dir: Remove double release in FindBlobs When DRead() fails, we DRelease the entrybuf, then break. However, this break takes us to the end of the function, where we promptly DRelease again, causing a double free Change-Id: Ifc2adecb0b05c17abba8f7aed711c4fe6aa1b86c Reviewed-on: http://gerrit.openafs.org/5655 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from ab866c821a705d7911e0ff8ac987249efdc63435) Reviewed-on: http://gerrit.openafs.org/5898 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fbbbe68380b2662a686f6d37ddf2c918bc3d457a Author: Derrick Brashear Date: Wed Oct 12 14:34:55 2011 -0400 afs: don't try GetDownD if nothing to get if we "need" negative slots or caches, don't run. also, don't stay "too full" Change-Id: Idcca18e8db6defda5654015f97cc1fdce27d45cc Reviewed-on: http://gerrit.openafs.org/5612 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 488c7c97854a4bd0ec67bcfe17df93b3fd025f88) Reviewed-on: http://gerrit.openafs.org/5897 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d0ca0866a1bc3b3d9f617f45ae54776ca9eef869 Author: Simon Wilkinson Date: Wed Oct 12 15:26:23 2011 -0400 ukernel: don't define rdwr env on linux We're not vm rdwr env in ukernel. Don't claim we are, otherwise we will never push chunks out to the fileserver when our cache is full Change-Id: I590482eeeb4ad72398cbeadb159b2c6822715794 Reviewed-on: http://gerrit.openafs.org/5613 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 796de9fb43857acccbd51e2af7c8d67eea90fdc5) Reviewed-on: http://gerrit.openafs.org/5896 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d323e80b68279b6a8f8dfec9cc0e9f40b90233ba Author: Derrick Brashear Date: Wed Oct 12 13:09:42 2011 -0400 ukernel: set pthread stacksize to an integer multiple of 8k because some pthread stacks require this to be in units of page size, guess that page sizes will be 4k or 8k, and use the larger as a divisor Change-Id: I3624dbefb0029ad735fcbfb8a1368b5bef7a5590 Reviewed-on: http://gerrit.openafs.org/5606 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear (cherry-picked from 7ae1921b76750ef28258777cf1b233c4917663d7) Reviewed-on: http://gerrit.openafs.org/5895 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ba344bc2b600173e92634e0195a1e12f779e2fc3 Author: Simon Wilkinson Date: Wed Oct 12 13:04:28 2011 -0400 ukernel: add morepackets check in listener Make the listener loop actually check for more packets needed, like kernel, pthreads and lwp. Only checking for new packets every 20 seconds isn't sufficient on today's networks! Change-Id: I72ff1229530bb36470891aae2e5ec65e59463084 Reviewed-on: http://gerrit.openafs.org/5605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from eead07418f13cd87a90770f03ea5118c546d8f1a) Reviewed-on: http://gerrit.openafs.org/5894 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c6a43197f95041dcaef92ee82d8caae8d545637a Author: Derrick Brashear Date: Tue Oct 11 15:21:12 2011 -0400 afs: on uuid init fail, don't leave garbage behind make sure we zero the uuid if we failed Change-Id: I9563bfc2b9b4dcb208578eff0a98489b803e395d Reviewed-on: http://gerrit.openafs.org/5599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb) Reviewed-on: http://gerrit.openafs.org/5893 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 75b3b6c9f1a1930c6a765048ca0bf1497dc38ca5 Author: Derrick Brashear Date: Tue Oct 11 14:32:04 2011 -0400 ukernel: set close-on-exec on our socket if the process we are in execs a child, it doesn't get our socket Change-Id: I240283fa0b67eacd0e5c38a21af1664a6f68e9f1 Reviewed-on: http://gerrit.openafs.org/5598 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 87dcfc872c11fdb13ebf0448abe91150aaa86859) Reviewed-on: http://gerrit.openafs.org/5892 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9e1205f80cd0ef5af8f35d362c281a531098fb4e Author: Andrew Deason Date: Thu Apr 14 15:36:50 2011 -0500 auth: Get correct viceid in legacy GetToken When ktc_GetTokenEx needs to get tokens via the legacy ktc_GetToken interface, it was not extracting the viceid. Make it set the viceid so the caller gets the correct id. Normally this would require parsing the given client name. To reduce the amount of times we store and extract the viced from the "AFS ID %d" string, create a helper GetToken function that can store the viceid directly, without storing it in a string. Change-Id: I8707bdc4d3cd5c6c183b2659a14d5b23a7d48a89 Reviewed-on: http://gerrit.openafs.org/4482 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 735873d51512bc31134856c06345bb7caf9d8144) Reviewed-on: http://gerrit.openafs.org/5891 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 339eccb2c1078c1bd667a9f2834c385ca01ec6e2 Author: Andrew Deason Date: Thu Apr 14 15:05:37 2011 -0500 auth: Force correct evenness on rxkad tokens Rxkad tokens historically have forced odd lifetimes when the given viceid is actually an AFS ID, and even lifetimes when it is not. Force this when the new token-handling functions are used (so the viceid is correctly interpreted by users of the old token format), by creating rxkad tokens with token_importRxkadViceId. Slightly reworked by Simon Wilkinson to provide a generic token destructor function. Change-Id: Ic7f592dee71d05004f639027cd588ccebd5b54f0 Reviewed-on: http://gerrit.openafs.org/4481 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 59b47fba3fa7cf13ef82463c5112851f7bdaf2ec) Reviewed-on: http://gerrit.openafs.org/5890 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 34c886877e7cb07c6134683e6e2595a65497cd74 Author: Simon Wilkinson Date: Mon Oct 10 17:19:13 2011 -0500 docs: Refer to dafs binaries by their real names (Most of) the dafs binaries are called da(something). Update the example in the dafileserver documentation so that we call the binaries by the names that they are actually installed with on the system. Change-Id: Ic0d8c6f1b5c612b1e528f2d02e66012f575c3c3f Reviewed-on: http://gerrit.openafs.org/5654 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from c37a14697df291f641b4fa5a32826054d92210b0) Reviewed-on: http://gerrit.openafs.org/5889 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 64b9c8a6f03aefd242551ea323465ba4a4eda79d Author: Simon Wilkinson Date: Mon Oct 10 22:09:40 2011 +0100 ptserver: Don't check for noauth before rebuilding The ptserver database building scripts would check to see if the server was running from a bosserver with the noauth flag set before performing a database rebuild. This means that you can't start ptserver normally, and then configure the database using pts -localauth, which is the preferred method for configuring new cells. Remove the check for noauth. This is slightly risky, as it means that a corrupt database could be completely erased upon restart. However, we already check that the dbheader (65k) is entirely blank - which will protect us against any single page corruption errors. Change-Id: I7282a30756fe13da2c69f064f36a863cae70d827 Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 7a4498850814ea524f55de0b84d6b0ae0b4834bb) Reviewed-on: http://gerrit.openafs.org/5888 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 55f3f860ffd89af7f998812c25ddb1315e50041b Author: Rod Widdowson Date: Wed Oct 12 11:04:33 2011 +0100 Windows AFSRDR: Log before decrementing refcount The library support package keeps count of the number of times the library code is active. When this goes to zero this means that unload of the library can continue. Although I cannot see it in the code it seems reasonable to assume that at that stage the device object might go away so (and if it doesn't do now it may in the future). This potentially renders it unsafe to do anything after InflightLibraryEvent has been signalled. This patch moves the logging up to above the decrement of the refcount. Change-Id: If20f756d6e655bca6c560c8672a97003f122ba5e Reviewed-on: http://gerrit.openafs.org/5601 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 1b32b4800b1dd8985c1554453354e683a66c9ab5) Reviewed-on: http://gerrit.openafs.org/5887 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 685cca704bd5eaa4bff9fd25067848cbccc0245d Author: Derrick Brashear Date: Tue Oct 11 14:03:29 2011 -0400 ukernel: don't enforce thread lockers in remove vop we enforce locking by pid. when we are ukernel, MyPidXX is stupid. don't bother. Change-Id: I6ed5d52dd04953ae5d7d2d40aa617753986426d1 Reviewed-on: http://gerrit.openafs.org/5597 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from da9044cff966736bc064166a7136c94c0bfc1e5f) Reviewed-on: http://gerrit.openafs.org/5886 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0d786f8a3a2182c76ea004a541dd16914ffb861b Author: Derrick Brashear Date: Mon Oct 10 17:56:20 2011 -0400 ukernel: install our sysincludes to root.perf otherwise, we can't actually include sysincludes from something linking libuafs Change-Id: I77ae1b8a3decee0a32086d6d7b3967514a6d0777 Reviewed-on: http://gerrit.openafs.org/5593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 75179d50eae3258e8baa0a4c9f069fcd11d08260) Reviewed-on: http://gerrit.openafs.org/5885 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4f357e064da26b81a596a152052c0f242b31937a Author: Derrick Brashear Date: Mon Oct 10 16:35:45 2011 -0400 ukernel: add uafs_access we don't have an access vop. add one. Change-Id: Ieb46c411a8300933e8dfb0000290fb821f286ad9 Reviewed-on: http://gerrit.openafs.org/5589 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 3eb60908a1f9b3f2783ec3f7755b242bff3d573d) Reviewed-on: http://gerrit.openafs.org/5884 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2c03ddd2efa4d866c87d0eb1287f3c8f58bd7887 Author: Derrick Brashear Date: Mon Oct 10 16:57:35 2011 -0400 volinfo: fix bad format string we need a format string; currently here we have none, which is no good Change-Id: Idf6a04475f29ec1413d3d27f91b3c20a42e110cc Reviewed-on: http://gerrit.openafs.org/5591 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88) Reviewed-on: http://gerrit.openafs.org/5883 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 404ba73245a102e914539c93730947bdb4c7be2f Author: Hartmut Reuter Date: Wed Oct 5 10:06:05 2011 -0400 vol_split: avoid using stale open directory vnodes we could in case of multiple splits end up using a stale open vnode for a directory; attempt to close and thus force-reopen any fdhandles backing ihandles. Change-Id: I0b12c7e012d86695f7c48549beb2f454c902dff7 Reviewed-on: http://gerrit.openafs.org/5553 Reviewed-by: Hartmut Reuter Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c) Reviewed-on: http://gerrit.openafs.org/5882 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7f9a04656d9e2f45f7288673bc16fb260618826a Author: Michael Meffie Date: Thu Oct 6 06:03:07 2011 -0400 bozo: bosserver man page updates Add the new -pidfiles option to the man page. Add a few other missing options as well. Change-Id: I1068fa1d5d7767020ed35ff11bc4115042f07978 Reviewed-on: http://gerrit.openafs.org/5587 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear <