commit 58c2a08b73e832330b9ff606bbcf3a30b454454f Author: Stephan Wiesand Date: Mon Dec 10 15:18:23 2012 +0100 make openafs 1.6.2pre1 prerelease for 1.6.2 Change-Id: I22fad3411c09644578c717c06cd7cb6b3469fe57 Reviewed-on: http://gerrit.openafs.org/8738 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 463e0d2049a10e13adad68d4615f9e6c87c5bca5 Author: Simon Wilkinson Date: Sat May 14 08:37:31 2011 +0100 rxperf: -S takes an argument The -S option to rxperf (which permits the maximum number of server threads to be set) takes a parameter. Update the getopt string so that we can give it one. Reviewed-on: http://gerrit.openafs.org/4801 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 80b3648e6d8fd96bdb57d47e56b28b30e42eb303) Change-Id: Ic1a8264d0471e9458ade11af00ed78871b390b34 Reviewed-on: http://gerrit.openafs.org/8423 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit 4c084a67e69d4c863e64bc38d5d6109a328b85da Author: Jeffrey Altman Date: Mon Nov 8 11:07:14 2010 -0500 rxperf: use parallel connections When the number of threads exceeds RX_MAXCALLS allocate additional rx connection objects. Reviewed-on: http://gerrit.openafs.org/3285 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit df682aa34170d285247c5486050db3ee7d3774f0) Change-Id: Ia699fe0230e6dde2bc1f270d766f512f2693c94f Reviewed-on: http://gerrit.openafs.org/8421 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit fb95823877f36500de181387e1f597e1cd253fc8 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. Reviewed-on: http://gerrit.openafs.org/8414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 51021ac306c7b3b355c64c978a029537e3341a25) Change-Id: I8664140cd8e5d159789be94628a726e8c7ee5cb7 Reviewed-on: http://gerrit.openafs.org/8727 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c1ba63df3cd59f378dc3e62b4786a1aedaa3f2a 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. Reviewed-on: http://gerrit.openafs.org/8413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3764cbfbc9f26738b5e6693e8729e79dbb0092c6) Change-Id: Ib546aa45a57bba40de02dc9499dd1ce6c2ef9d73 Reviewed-on: http://gerrit.openafs.org/8726 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4061aa47f1211d7d02fad4fbb88bbd07151039e7 Author: Jeffrey Altman Date: Sat Dec 8 18:39:40 2012 -0500 Windows: cm_RecycleSCache remove from hash table Remove the cm_scache_t object from the hash table during recycling. This step is performed on master and on 1_7_x. Did not get pulled onto 1.6.x previously. Change-Id: I2c50a08b8f0b191bd558ce344cb0ce594e13661c Reviewed-on: http://gerrit.openafs.org/8725 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ad7cfa94e61217ee46b52bdf0704cd2aeca127a9 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: I33f5e73509cc2c6517ae4bf4214011383a341411 Reviewed-on: http://gerrit.openafs.org/8649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c95d1aee53eb5f459e3cfff27bcdd08dbb00095a 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: I7a9377fdd1546f6e555afa4b2f714d8b74b26e87 Reviewed-on: http://gerrit.openafs.org/8648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d23b655e7857a008b36147260972d76f4c5b1795 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: I888e56c8c34bcae58c51ba965fd59e5539e1bab5 Reviewed-on: http://gerrit.openafs.org/8647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 907e2f148f2dbb972675d9f39a752931fd798ec7 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: Ifedf7887c76698ecb32a1c0fa9f4c01e3df74817 Reviewed-on: http://gerrit.openafs.org/8646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6efa862c41e3d4b9644f407a9402fefeb7a166b3 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: I5562dbac4977a5d23407cd62c3deb743e629c48c Reviewed-on: http://gerrit.openafs.org/8645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 39da28383a2a9edc5ab864c188a87645354624b2 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: Iab79c0b2e0c885a0d9180c000f9cc9574fab11dc Reviewed-on: http://gerrit.openafs.org/8644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a30a4dc2114aa2f7c319ecb7d213d658bd371af8 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: Ia15bcbeec4ad3ff411fd599e2d57f1ead4c3be23 Reviewed-on: http://gerrit.openafs.org/8643 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d9b7f6154624b2f7bf675e3c7aa25ef160d83621 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: Ic811e8b13c9ab5c3eef9e36ffb0cc38c896a7e89 Reviewed-on: http://gerrit.openafs.org/8642 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 441e6fc771a9063bcac2b68a094ad7c6cce99f7e 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: Iaa3eb3aae931ee65c991e2786d80a9a62eff76c6 Reviewed-on: http://gerrit.openafs.org/8641 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1cc48eeda92a516d2c30b1d68ede6112500a217e 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: I0fb0f5b7ede676b4513e33fa664e66cafed18e01 Reviewed-on: http://gerrit.openafs.org/8640 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6171f3e2f35db43d2f85951e631e6fc6cb7bef3 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: I0209a82765b31ccc8a93316438ef12864dbc5339 Reviewed-on: http://gerrit.openafs.org/8639 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d5001acddda6864e7c3409f9286bc0bb907090ef 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: Ibacb272fade3aa24beb0b7c9a966b9e769385669 Reviewed-on: http://gerrit.openafs.org/8638 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 431792e5155a598db568261b36b72f3baddba6a2 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: Ie7b4758fe14a0a695d7db1b04fc5039050891908 Reviewed-on: http://gerrit.openafs.org/8637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2498cbbce8eb99c9d72536a37d9da87f5e9b3161 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: I81ba08a273aedb412642c345cd4a2762fcf1edb7 Reviewed-on: http://gerrit.openafs.org/8636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6ed24963f7b52ac57732c4349a6f86864ea33e3b 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: Id34b50e91c54f6f984c67ed18fad58ebe225c635 Reviewed-on: http://gerrit.openafs.org/8609 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 795a22793f454e3a1426c1546d255932f17e16d0 Author: Michael Meffie Date: Thu Apr 19 15:15:04 2012 -0400 configure: solariscc check update Add checks for recent versions of sunstudio for solaris. The installation paths are documented in the release notes of versions 12.1, 12.2, and 12.3. Reviewed-on: http://gerrit.openafs.org/7253 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fbc9599484850f7f9fc41a98d3bd2105001fd802) Change-Id: If63638bb9b88f0024156fc5547540837b665b301 Reviewed-on: http://gerrit.openafs.org/8654 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle Tested-by: BuildBot commit b30ed5d2cae6a8a38a828e3e998595f98b3f52ea Author: Michael Meffie Date: Fri Apr 13 13:01:05 2012 -0400 Build: error if solariscc is not found Fail configure if the solariscc is not found and give the builder a message to cope with non-standard installation paths for sunstudio. Reviewed-on: http://gerrit.openafs.org/7204 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit c11d1c031940f298e96def822024d2857f603268) Change-Id: I123b887a66e8f9bad87144934e9cea62f63f2180 Reviewed-on: http://gerrit.openafs.org/8653 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle Tested-by: BuildBot commit 026f73a0328acb3eda7d4f11a5dba1eeef8d6990 Author: Marc Dionne Date: Wed Dec 5 18:23:34 2012 -0500 cache bypass: fix afs_bypass_copy_page memcpy oops The two memory copy cases were inverted when the code was refactored, causing an oops when cache bypass is enabled. Reviewed-on: http://gerrit.openafs.org/8617 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit 5b2cc290f8e991b152411168cabd1c9e7f31deb4) Change-Id: Ia5eb577046895a2b38a6be5c4794db9a65893530 Reviewed-on: http://gerrit.openafs.org/8715 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 75af57b38fd803f74319271dd6230a00e8ce0da4 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: I151547ec9f90f17ae28397c77337b92ea7919754 Reviewed-on: http://gerrit.openafs.org/8635 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b24b7e0f6823ce273fbd03aad39a72a9d704ec29 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: I95ffc34b9846cba82872aa2d1e308742cddb4727 Reviewed-on: http://gerrit.openafs.org/8634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2b92fe44b837a807ca685a4c1c9047dc37948030 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: I0a58b45890a505ba9ddab24582deaf0c70571a66 Reviewed-on: http://gerrit.openafs.org/8633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bff302b604f46b9ee18c4decbfdb00008d7a570e 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: I40f52324067597e4eb96bfd7ed19f18e154ef8ee Reviewed-on: http://gerrit.openafs.org/8632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b5f45f313e97e2617683a05a2d6f3326fccbd3bd 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: If5031c21b008306f1179cb460b39fc7d3662fbd0 Reviewed-on: http://gerrit.openafs.org/8630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c18559dcd1261972c00dd092b4dc59caff68dd6 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: I35f455ff1068418336c4ac11cf57027f3afe4787 Reviewed-on: http://gerrit.openafs.org/8629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fe623b97e1075080fc9999e803f3022b53a16c30 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: I91610d3de7d176b8d237887a8eae4be77e185f00 Reviewed-on: http://gerrit.openafs.org/8628 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c665f4e1ba84356b9d67c41229947c641df94b1 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: I66d4b001f8f07b75cedb5cce9a80b1639546a45c Reviewed-on: http://gerrit.openafs.org/8627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4408f4d4138656ace85169766dd622fd0a58c00f 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: I201179644168cbc09a194612b2faf5bd3a812796 Reviewed-on: http://gerrit.openafs.org/8626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b1e196e23eeaec028c1ea9efb1292f525baa1f7a 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: Id25d124a3c1f70c6506ebe8a1af6a4bad55f2b7f Reviewed-on: http://gerrit.openafs.org/8625 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 636312c905f7cab469bdec656fa5ab19f71b394b 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: Ibd96cecce936353ef639de3f0dafb32abb7b29af Reviewed-on: http://gerrit.openafs.org/8624 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c568b57c96f31b36e30dc673bf11b032ad2d634a 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: Ib8ce6dc389be92c00e9519efb253be0ca9cec05f Reviewed-on: http://gerrit.openafs.org/8623 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d2614e34652ef9e9ddaa4fc36fd905171e3f9993 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: I3f01144863c25a2081f7ea2890299bb509a10a4a Reviewed-on: http://gerrit.openafs.org/8622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6843414c8ce74d721d9d79b1192cfbe36f617c1 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: I71fdb47e2ff0f1632b6534f890eed185d8b32ea4 Reviewed-on: http://gerrit.openafs.org/8621 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 82ba50932198f4bc7b0770b062a25dd5c31b4bf7 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: I71851a8b82eb28be2338a127f777a3e432945a78 Reviewed-on: http://gerrit.openafs.org/8620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c0968b334e5e157cb2a30ad476fcfc18b811a695 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: I29313f479ae2487a615b065d601ee5d0ef994ccf Reviewed-on: http://gerrit.openafs.org/8619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 76db51bc79ee3ce2ae2078dfc5b17fb762b28385 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: I54f319d5f7f9111c25589204ffb01f682dc97ca9 Reviewed-on: http://gerrit.openafs.org/8618 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 836c696dc38adc0ec03fff638704ea00d5ffd0da 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: Ic732c013d6f77df991e97de7f1c5af88a194e81c Reviewed-on: http://gerrit.openafs.org/8608 Tested-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 14657f6bacb3607dc20d1846202744d2f6e83daf Author: Andrew Deason Date: Fri Nov 16 14:18:32 2012 -0600 afs: Fix VLRU traversal sanity check On non-Linux, the number of vcaches in the VLRU can easily exceed afs_maxvcount, since we allocate new vcaches when we run out. So, assume we only have afs_vcount vcaches on the VLRU, instead of assuming we have at most afs_maxvcount vcaches. Reviewed-on: http://gerrit.openafs.org/8471 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc6dd95016c63d0742698d902aebf73c01162c24) Change-Id: Id4884e45a52813eb33926958b11148a021ca3057 Reviewed-on: http://gerrit.openafs.org/8606 Reviewed-by: Michael Meffie Reviewed-by: Paul Smeddle Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 0776f5dadd9ee38940ccaf1287342884e8b318c8 Author: Marc Dionne Date: Tue Aug 14 19:37:00 2012 -0400 Linux: include kthread.h before afs includes We need to include kthread.h before the afs standard includes to avoid clashing with the printf -> printk mapping. Reviewed-on: http://gerrit.openafs.org/7988 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b6926e43f31a30a95e5883fd4b9e72924b3371d) Change-Id: I0dbb696e3af5172c9a72d183f2acd10107bedcf5 Reviewed-on: http://gerrit.openafs.org/8605 Reviewed-by: Paul Smeddle Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit cd91bbac7647f768107a2e5c9524d7df23f9cddc Author: Tom Keiser Date: Tue Apr 10 16:26:42 2012 -0400 libafs: use kthread_run when available Use the kthread_run interface on linux to create kernel threads. This interface allows all the cpus to schedule afsd threads, instead of just inheriting the cpu affinity of the main afsd thread. Written by Tom Keiser. Reviewed-on: http://gerrit.openafs.org/7915 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b440d8ffcbb0ac58ecaa34a9c60fe27a0fc91026) Change-Id: Id05360309db01ac13b8d887b1ef19596ed86b63a Reviewed-on: http://gerrit.openafs.org/8604 Reviewed-by: Marc Dionne Reviewed-by: Michael Meffie Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 7a6bc371f1c91d89e33cfee9143f5a5a600458dd Author: Andrew Deason Date: Tue Nov 13 22:46:34 2012 -0600 rx: Generate BUSY packets for error call channels Currently, if a call is error'd out but still active, we won't generate BUSY packets if another call comes in on the same channel. This is because we bail out earlier, here, before we get to the BUSY processing. The comments suggest that this is for if we enter an error state while waiting for TQ to clear. So, only do this if our error has changed. Reviewed-on: http://gerrit.openafs.org/8460 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from commit a84c6b0ece1fdee4f462c6ce27fa78c2e0d419f4) Change-Id: I50fda40b3f010f1b9d03f2d3e22ed00381ae0b33 Reviewed-on: http://gerrit.openafs.org/8548 Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit e1baf1af4c43654adb37a1daf6710159ab060844 Author: Michael Meffie Date: Thu Nov 3 17:09:28 2011 -0400 vol: rate-limit volume usage updates Add threshold and time rate-limit parameters for volume usage updates to disk. This reduces the amount of i/o needed for volume usage statistics on very busy fileservers. Set the default to limit updates to one every 5 seconds per volume. Reviewed-on: http://gerrit.openafs.org/5803 Reviewed-by: Derrick Brashear Reviewed-by: Tom Keiser Tested-by: BuildBot (cherry picked from commit 639ca379e47fbe550d090fff9e635ad24e8e34f0) Change-Id: I29b8240515afe5585b3eef000dbf40110fd4620f Reviewed-on: http://gerrit.openafs.org/8582 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit f13eaa0172320387bfa12cca2c6c1abbc1ce72c4 Author: Michael Meffie Date: Thu Aug 30 11:48:34 2012 -0400 bozo: dont lie when binding to any address Do not log the bosserver listening to just the loopback when it is actaully listening on any address. The loopback address is still written to the bosserver.rxbind file in this case to give local scripts an simple way to contact the bosserver. Fixes the log message introduces in commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726 Reviewed-on: http://gerrit.openafs.org/8022 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 03b87dffee1383c3cd5b1fed0ac3116fd8564187) Change-Id: I1646a1fd81440aa23589ab46108c71a67bf5f6ea Reviewed-on: http://gerrit.openafs.org/8584 Tested-by: BuildBot Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit b431a9a8c1b6c62206864352f3cde54efa517d5d Author: Michael Meffie Date: Wed Feb 29 11:08:10 2012 -0500 viced: fix log message in hpr initialize The wrong dir object is used to log an error in hpr initialize. Reviewed-on: http://gerrit.openafs.org/6845 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fc1c58910c5991fa9d132d171d1d976dbfc44a95) Change-Id: I3defc0687184885488f612f913555fc2c9189fac Reviewed-on: http://gerrit.openafs.org/8585 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 68c8f304d05ab77571f3674e00392740fa66988c Author: Marc Dionne Date: Thu Nov 15 17:49:53 2012 -0500 Linux 3.7: remove use of param.h and ioctl.h Header files param.h and ioctl.h have moved as part of the userspace API restructuring of header files. Nothing in those files is currently needed by the source, so just drop the includes. Reviewed-on: http://gerrit.openafs.org/8469 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 007ec3e25e6920d7036f70550bc44adefab0c170) Change-Id: I7caa7ee8e5bfc918d7121a2f1d826102ee03976c Reviewed-on: http://gerrit.openafs.org/8556 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 058c412040dc0e477734c228088a9696fd927de0 Author: Marc Dionne Date: Wed Sep 5 20:25:55 2012 -0400 Linux: drop GLOCK before calling dput Holding the GLOCK when calling dput can result in a deadlock when the kernel calls back into afs_dentry_iput. It should be safe to drop the lock here. Reviewed-on: http://gerrit.openafs.org/8046 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0dac4de8eee84a43ef06c56dfc867c2a1b9a9f0c) Change-Id: Ide1dfc73ebc5fa207c19be1c16db9910cf66bea3 Reviewed-on: http://gerrit.openafs.org/8561 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit bbc6ee905850a8288e89b256ff432836388592cc Author: Marc Dionne Date: Thu Nov 15 20:58:03 2012 -0500 Linux 3.7: key instantiate API change Adapt to the new parameters for the instantiate key operation. Reviewed-on: http://gerrit.openafs.org/8470 Tested-by: BuildBot Reviewed-by: Hans-Werner Paulsen Reviewed-by: Derrick Brashear (cherry picked from commit aeb2763b741a218ad6fd93adc6157a6a31f27e13) Change-Id: I9ff22683aaf6e1002bdb2bc7666fbc0d8d597d20 Reviewed-on: http://gerrit.openafs.org/8560 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit c21fded67cf3f0c7d5305931ac45ae5ab5fa836a Author: Marc Dionne Date: Wed Nov 14 22:12:13 2012 -0500 Linux: change test for new putname API Replace the existing test with a more robust one that checks for the existence of the new filename structure. Since older kernels are expected to fail this test, we'll get the correct result even if there is unrelated failure, for instance a missing/different header file. Reviewed-on: http://gerrit.openafs.org/8466 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2bafb2f99d85804459acb8994d4057be809f8729) Change-Id: I88536425612e39b2f7d4d09c51ce896bc8cf6d4f Reviewed-on: http://gerrit.openafs.org/8559 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Hans-Werner Paulsen Tested-by: Hans-Werner Paulsen Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit d7926d1701e2f21a30ccee5775cd62bd51a0271d Author: Michael Meffie Date: Wed Aug 1 11:42:34 2012 -0400 bozo: avoid canceling the sigkill timer for hung processes A sigkill signal is sent to fileserver processes when a timeout is exceeded for shutting down processes for the fs/dafs bnode. (Currently 30 minutes for the fileserver, 1 minute for the other server processes.) If the bnode goal is set to run before this timeout expires, the timer is incorrectly stopped, and a wedged process is never killed. Fix this by not canceling the timer when a fs/dafs process has been signaled to shutdown, regardless of the current goal. Reviewed-on: http://gerrit.openafs.org/7920 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 09f5a1e6053e6db3df581543875512d8cff259ae) Change-Id: I0d5fabed13e597d2571033468688457c38b49283 Reviewed-on: http://gerrit.openafs.org/8583 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Paul Smeddle commit a77ef357cb34d6a67c8ae3a8016be3f34bb46b9d 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: I2df1937f4098dde59a7fed344e1c975fdf0cdf1b Reviewed-on: http://gerrit.openafs.org/8551 Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 0b3b4e5d0430f8e00825d1b4359d2995ce3a6214 Author: Andrew Deason Date: Tue Nov 13 18:27:11 2012 -0600 afs: Handle VNOSERVICE as a timeout For whatever reason, the fileserver uses VNOSERVICE to indicate that an Rx call was killed due to an idledead timeout. It is not used for any volume errors, so treat it like the idle dead error codes. Reviewed-on: http://gerrit.openafs.org/8462 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 22da9ec896f651f066317a85268620a7d3ac46fa) Change-Id: I58fc7aaba65683f987387ff406bd575018b46d6b Reviewed-on: http://gerrit.openafs.org/8550 Reviewed-by: Ken Dreyer Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit fa646213829e018e96f792960ce433293afd583c Author: Andrew Deason Date: Tue Nov 13 18:15:21 2012 -0600 afs: Slight restructuring in afs_Analyze We test for acode < 0 && acode != VRESTARTING, but then immediately test for specific values for acode. Move this conditional down, and remove a level of indentation for the next couple of acode checks. This commit should introduce no functional change. Reviewed-on: http://gerrit.openafs.org/8461 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit db57dfd3798f09e77b5c49bed304cacc0c448f91) Change-Id: Idd836a5acba775c82f360ea1082ba50cc32914af Reviewed-on: http://gerrit.openafs.org/8549 Tested-by: BuildBot Reviewed-by: Hans-Werner Paulsen Tested-by: Hans-Werner Paulsen Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Paul Smeddle commit 68c72b661f85a3562297cba42d2f599fc347207a Author: Andrew Deason Date: Tue Jul 31 14:40:41 2012 -0400 LINUX: Always hold afs_xuser for unixuser read We were failing to hold the afs_xuser lock when we entered our unixuser traversal for the first time (when the given position is 0). This means we can release the lock without acquiring it, causing all kinds of weird behavior. Just always grab afs_xuser on entry. We could possibly do some tricks to avoid grabbing this lock until after we've printed the column headers, but it does not seem worth it. Reviewed-on: http://gerrit.openafs.org/7916 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 351d3b8a19314027b30cdc499ef48c95ba7903b6) Change-Id: I75e137e588fcbf973a5d564db3a077c4ec4f50e1 Reviewed-on: http://gerrit.openafs.org/8547 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit a9b0f975f67a50f33fa45dd49d395e718129865e Author: Andrew Deason Date: Tue Oct 23 15:47:06 2012 -0500 ptserver: Avoid inet_ntoa The ptserver uses inet_ntoa in a few places, such as for calculating host CPS. This isn't safe in pthreaded environments, so use afs_inet_ntoa_r instead. Reviewed-on: http://gerrit.openafs.org/8287 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 527f2ba00c1247ae7e8d6f355572c8635331bc0c) Change-Id: I3740a294bd93b000842ccd791f2a11cef5092a9a Reviewed-on: http://gerrit.openafs.org/8546 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 3ce1c5394fd96dde5cfb4ad16b90489324bf51a6 Author: Andrew Deason Date: Wed Oct 31 15:55:35 2012 -0500 afs: Never use GetNewDSlot after init Currently there are two ways to get a dcache via a slot number: afs_GetNewDSot and afs_GetValidDSlot. afs_GetValidDSlot assumes that the given slot number refers to a dcache entry that is valid on disk; with afs_GetNewDSlot, the given slot may not be valid, and if it is not, an empty 'template' dcache is returned. afs_GetNewDSlot is useful for initializing cache files, since if a given dcache slot exists on disk and contains valid data, we use the dcache like normal. If it does not already exist or does not contain valid data, we fill in the missing data after afs_GetNewDSlot returns. However, for all other uses, afs_GetNewDSlot is incorrect, and causes various serious problems. After we have initialized our dcache entries, any attempt to read a dcache by slot number should succeed, since the number of dcache entries never changes after we are started, and we initialized all of them during client startup. Some code outside of afs_InitCacheFile was still using afs_GetNewDSlot; code that reads in a dslot from the free or discard list. In these cases, if there is any error reading the dcache slot from disk, we will be given a dcache that has some of its fields not filled in properly. Notably, we assume that the entry is not on the global hash table (we set tdc->f.fid.Fid.Volume to 0), and the tdc->f.inode field is not initialized at all, leaving it set to whatever was in memory for that tdc before we tried to read the slot from disk. This can cause cache corruption, since tdc->f.inode can point to the inoder for a different existing cache file, so writing to that dcache modifies the data for another cached file. To avoid this, modify the non-afs_InitCacheFile callers of afs_GetNewDSlot to avoid afs_GetNewDSlot. Since these callers read from the free/discard list, the contents of the dcache entries are not valid (the cell, volume, dv, etc are not valid), though they must exist on disk (we have a valid inode number for them). So, create a new function, afs_GetUnusedDSlot, to get a dcache that must exist on disk, but does not represent any valid data. Use this for callers that must get a dslot from the free/discard list. Add some comments to try and help explain what is going on. Reviewed-on: http://gerrit.openafs.org/8370 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 20b0c65a289e2b55fb6922c8f60e873f1f4c6f97) Change-Id: I0ed66c155ea5574fd88c288bdf9feb98161e5c45 Reviewed-on: http://gerrit.openafs.org/8545 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 972cedc2e745f9be0e199183f692d91e17100d8a Author: Andrew Deason Date: Wed Oct 31 15:02:09 2012 -0500 afs: Log slot for GetDSlot read errors When we log that a disk read error occurred during GetDSlot, log which slot we were trying to read for convenience. Reviewed-on: http://gerrit.openafs.org/8368 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b5d9e29e89c2a63c857c47f1fb9accae90b0a3aa) Change-Id: I0d5fffd3ef3af5d788db082e10c401afc0dd440a Reviewed-on: http://gerrit.openafs.org/8544 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 94e3c06e46fc9cd3f4e68dac6d0a1797bf728fd2 Author: Andrew Deason Date: Wed Nov 21 10:39:51 2012 -0600 LINUX: Dir follow_link should set LAST_BIND For our faux-symlink directory follow_link operation, we leave the given nameidata struct with an invalid 'last' component. That is, nd->last is not changed or set to anything meaningful. Usually the callers of our follow_link op do not care about the last component of the nameidata. However, at least one caller does: the caller near the do_link label in open_namei(). This is called during processing for O_CREAT operations on symlinks, and since our directories look like symlinks, it gets called. It tries to use nd->last to look up the last component of the dereferenced path (so it can try to create it, as necessary), but since our nd->last is not set, this will not work. Specifically, our nd->last.name is not pointing into the names cache, so the subsequent putname/__putname on it will corrupt the names cache. However, even if this were not a problem, the actual contents of the last component do not seem meaningful so this would probably result in incorrect behavior anyway. To avoid all of this, set nd->last_type to LAST_BIND, so any callers know that the last component of the given nd is not valid, and we are pointing directly to the target component with a dentry. Reviewed-on: http://gerrit.openafs.org/8489 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit bd57c7d64844ca26d80f2b29db470dacd134fc56) Change-Id: I4defb55064a4452e437b8a6c3e600887b4749fff Reviewed-on: http://gerrit.openafs.org/8543 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit ed8af9f7d05c641716e7e281d0c00d06b22b3d27 Author: Andrew Deason Date: Wed Nov 14 18:29:35 2012 -0600 afs: Do not skip flushing pages for dv-0 files If the dv for a file is 0, we know the file is empty. Currently we skip flushing pages for such files, presumably the idea being there is no data in the file, so there should be no pages to flush. However, Linux seems to keep empty pages around for empty files. So, a future read can result in the application reading a page full of zeroes, unless we flush the page here. While this has only been found to happen on Linux 2.6.22 and later (and distribution-specific backports, like RHEL 2.6.18-128), other platforms could in theory also choose to do this. It would be difficult to find out when another platform started to behave like this, so just remove this skip for everyone so we never have to deal with this again. Replace this code with a comment with a quick explanation, in case anyone tries to add a similar optimization here in the future. Thanks to Richard Brittain. Reviewed-on: http://gerrit.openafs.org/8465 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ad4e634051e18fa5bd07016b6405e53e236c2f45) Change-Id: I76aed81e0d8acdbf13bc952ac8557b051d2869bf Reviewed-on: http://gerrit.openafs.org/8484 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit b2d17370ab68d818bdc8d04cb6d752c1be55f207 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: I02d09772df1ef32800736fd798f2f5f4b2997a86 Reviewed-on: http://gerrit.openafs.org/8532 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7472866c71fddd7f7954b683b2b147bfd671cf7f Author: Michael Meffie Date: Tue Oct 30 10:22:40 2012 -0400 vol: allow non-dafs volume utils to attach with V_READONLY again Allow non-fileserver, non-dafs, programs to attach volumes with the V_READONLY mode again. This was lost during the code changes for dafs. The caller sends a fssync request to the fileserver, which updates the on-disk contents of the volume headers, before the caller reads the volume headers, allowing the caller to have the most recent info about the volume. The fileserver still has the volume in use. Later in the attachment process, the inUse check is skipped for the case of a non-fileserver process which is attaching the volume using the V_READONLY mode, otherwise the attachment would incorrectly mark the volume as needing to be salvaged. Note: The mode checks in VMustCheckOutVolume() are correct. We must checkout the volume when attaching with the V_READONLY mode. This fix updates the VShouldCheckInUse(), in which an additional exception was added to cover the case for V_READONLY mode from a non- fileserver process. Note: A check is added in the dafs version of attach to avoid overwriting the inUse field when a volume utility is attaching a volume in V_READONLY mode. Currently, V_READONLY is not used by dafs, but this was done to avoid future errors. Reviewed-on: http://gerrit.openafs.org/8339 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0eaa0d1baa8b8fe115301f188ce32176acc7b065) Change-Id: I584027e2104fd4928b16b591a2ab9e2613e49ec7 Reviewed-on: http://gerrit.openafs.org/8458 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason commit aecc87faf7f0975197abaf0b015a6b74a2ba95a1 Author: Michael Meffie Date: Tue Oct 30 10:41:12 2012 -0400 fix stale volume info from vos examine (non-dafs) A volume examine on a non-dafs volume server/fileserver can show old information, including old volume update time, for up to about 20 minutes. The non-dafs volume server reads the volume information from the volume headers, which are updated by the fileserver only periodically to avoid excessive i/o. Before dafs, when the volume server performed a volume examine, the volume server would send a fssync command to the fileserver with the request FSYNC_NEEDVOLUME and mode V_READONLY. The fileserver writes the current memory contents to disk on this fssync command. The volume server would then attach the volume, reading the current volume data. The dafs volume/fileserver avoids this extra i/o by using a new set of fssync commands to retrieve the volume information from the fileserver. However, the non-dafs volume server does not use the new fssync commands and reads the volume headers from disk. Revert the volume attachment processing for the non-dafs volume server to request the volume with the V_READONLY mode. This causes the fileserver to update the volume headers, allowing the volume server to read the up to date volume header data. Sadly, this adds another dafs ifdef to the already twisty maze of passages that all look alike. This changes the volserver to use the V_READONLY attachment mode only for the case of getting a single volume, as that what was done in 1.4.x. Reviewed-on: http://gerrit.openafs.org/8327 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bcb077a00fb575e7beb92739646054ea67ca0b79) Change-Id: I5b5982efd5ee3aea13515add83b71d424dbd3a60 Reviewed-on: http://gerrit.openafs.org/8459 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason commit 85794b6561b132477aa74134ccce58c6eaa27f70 Author: Ben Kaduk Date: Wed Nov 7 10:08:33 2012 -0500 Catch up to FreeBSD non-MPSAFE deorbit All filesystems must have their own locking now. We have been MPSAFE for quite some time, but the preprocessor macro "MPSAFE" has been removed and we must catch up in order to compile. The MNTK_MPSAFE macro has not yet been removed, but it is toothless now, so we can preemptively stop using it. Reviewed-on: http://gerrit.openafs.org/8366 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f749f17fe1a2bc56a8129f5579e5cf5009f12d95) Change-Id: I35ad1c63bf3b1c91035bcdd29d7cfcb5603dfd12 Reviewed-on: http://gerrit.openafs.org/8374 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 90a29d82443ed2d5d95e22a8c6ba3bab2e73229a Author: Garrett Wollman Date: Fri Aug 12 00:39:54 2011 -0400 FBSD: coalesce three assignments to the same variable Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5233 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e3148c6bfad25fdcb86b7248bd6b05432502d4ce) Change-Id: I549bbeb4397d357257497179cd459f6034f93113 Reviewed-on: http://gerrit.openafs.org/8373 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 21ae26a93d0b9a3cd81c1b13af8bd3f82ae0d0cc 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: I1e01005a34e5d373b6810052d94fac8d96f40e4f Reviewed-on: http://gerrit.openafs.org/8371 Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 598e58ba6f2fe485a55233ec78811553f7dca5fe Author: Derrick Brashear Date: Thu Nov 1 14:15:27 2012 -0400 configure: check for poll() if we have code which uses HAVE_POLL, check for poll(). Reviewed-on: http://gerrit.openafs.org/8357 Reviewed-by: Chaskiel Grundman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7fe30bd28e62ad0ed717c24e8eccf5e563b9cd68) Change-Id: I99a25d20d0d98e516d72f885feef2a4d15ca01fb Reviewed-on: http://gerrit.openafs.org/8367 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a73795479fb5d413f8766aede662d021df0848dd Author: Ben Kaduk Date: Thu Sep 13 17:28:17 2012 -0400 FreeBSD major version numbers are multi-character Do not assume that there is only a single character before the dot. Reviewed-on: http://gerrit.openafs.org/8106 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c4c51444ebd35fe0ceccde23512707ae693210ee) Change-Id: I4b9016af301c4e9393e87fa59d6fa9d19dcd9843 Reviewed-on: http://gerrit.openafs.org/8342 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2a478d422fc3d0c0ee047702682bad6ce2bcf028 Author: Ben Kaduk Date: Wed Jun 27 22:04:24 2012 -0400 Patch up FreeBSD-10 support The auto-guessing code for sysnames produces *_fbsd_100, so we can't just claim that we'll be *_fbsd_1000 for kicks. Revert back to the old behavior so as to be less disruptive. Reviewed-on: http://gerrit.openafs.org/7595 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 44ca4aa90ef101fb13b3b5327ca19381b5464fb3) Change-Id: I302b9f36913b6cd86f65b7263c85d91745330ae6 Reviewed-on: http://gerrit.openafs.org/8341 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b395e5183d124725ef614669f69ac739a863fa35 Author: Ben Kaduk Date: Fri Jun 22 21:33:50 2012 -0400 Catch up on fbsd releases Pull in the changes needed to even have a chance at supporting FreeBSD 8.3, 8.4, 9-stable, and 10-current. Conditionals for changed interfaces in a follow-up commit. Reviewed-on: http://gerrit.openafs.org/7581 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 58e7d52d0066a9f237971f39e7acdde02761172a) [Edited param.*.h files to add AFS_64BIT_ENV for 1.6.x] Change-Id: I3218a84a024011af573d64821a2599b1330b3f71 Reviewed-on: http://gerrit.openafs.org/8340 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ca94c83c4a7b9c4482635cf49253b56255c95bf7 Author: Marc Dionne Date: Sat Oct 20 17:59:01 2012 +0100 Linux: Rework handling of names in the lookup functions Rework the name lookup functions in the kernel to deal more cleanly with the change of API for kernel 3.7 Reviewed-on: http://gerrit.openafs.org/8278 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit eca04c7e52d1e777cde423cdf673d7bf579c342b) Change-Id: I967c80fac754fbee1836b84dfb50dd5fdcba35f0 Reviewed-on: http://gerrit.openafs.org/8338 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cf3325236c785ec1c0212376b90479908feaf05a Author: Marc Dionne Date: Fri Oct 19 18:31:53 2012 +0100 Linux: fix afs_putname wrapper for pre-3.7 kernels Make the compatibility function use the right type for pre-3.7 kernels. Reviewed-on: http://gerrit.openafs.org/8276 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 115850076c09625e37d75da6dc29a68b0a2d638e) Change-Id: I820340058a6cdecbd438fdc13ed3d54a439340e0 Reviewed-on: http://gerrit.openafs.org/8337 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5aae6e0c183cf6dccf7dcf6511217b300d0f3767 Author: Marc Dionne Date: Mon Oct 15 12:26:09 2012 -0400 Linux 3.7: putname is no longer exported putname is unexported in kernel 3.7. Add a compatibility inline afs_putname function and open code it if necessary. Reviewed-on: http://gerrit.openafs.org/8237 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fa3116567e2998af73eb116751032713850c9459) Change-Id: Icf0e249f87bfe80a262e5599ab9958355ed9a90f Reviewed-on: http://gerrit.openafs.org/8336 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4c4075ade0d46087638bd8cc96aa9fac005e62f3 Author: Andrew Deason Date: Thu May 5 11:37:12 2011 -0500 libafs: Correct afs_LoopServers flags AFS_LS_DOWN was actually checking up servers, and AFS_LS_UP was checking down servers. Fix the handling of the 'adown' flag so we do the right thing. 1.6-only: Note that this does not contain the change to afs_FlushVCBs, since 1.6 does not contain change cee2c677, which introduced the relevant afs_FlushVCBs afs_LoopServers call. Reviewed-on: http://gerrit.openafs.org/4624 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 1f48bc7a30d5df88a1e5f539ee22df3952533a88) Change-Id: Ibf56812134800a047642455a528dae488c52bcf9 Reviewed-on: http://gerrit.openafs.org/8309 Tested-by: BuildBot Reviewed-by: Andrew Deason commit 2aab481dfa6416ff562d1a78e4cffda3acf1ec93 Author: Marc Dionne Date: Fri Oct 12 16:31:24 2012 -0400 libafs: Fix second pass in ShakeLooseVCaches Commit 3105c7ff introduced a two phase process for reclaiming vcache entries. First go through the list and do what's possible without sleeping (skipping aliased dentries on Linux), then do a second pass only if necessary, allowing sleeping. Unfortunately the test for the end of the VLRU scan is incorrect and can never trigger, so this second pass was effectively disabled and any code that is conditional on defersleep=1 was never exercised. The code to start the second scan also has issues. Fix the end of VLRU test, and also correctly set the variables needed to restart the scan. Change-Id: I8034cd3b79aab4f2976ab2559c13c102126480d7 Reviewed-on: http://gerrit.openafs.org/8234 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7828d50a82384e6d0fb0ad5b5a702f768029581) Reviewed-on: http://gerrit.openafs.org/8247 commit 0506af9c058e22e3475f7e152c022571c0823253 Author: Marc Dionne Date: Fri Oct 12 16:25:43 2012 -0400 Linux: osi_vcache: Fix loop for the hlist case An hlist is not circular, and the end is marked by a NULL next pointer. Reviewed-on: http://gerrit.openafs.org/8233 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 78ae01fb9837d79e7bbdb2918872ab106d4c7e98) Change-Id: I7e4e3ed2515dd8c2ec765d8acbb97eba189d6aeb Reviewed-on: http://gerrit.openafs.org/8239 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 780e4c462bf35dfbcfc3d3c002568e425272e2ee Author: Derrick Brashear Date: Tue Sep 18 14:46:37 2012 -0400 libuafs: enable 64 bit mode on linux already safe and being used on other platforms; might as well here too. Reviewed-on: http://gerrit.openafs.org/8139 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 71a5f2965d6a6ff3113e7d2f9cab7d687b502793) Change-Id: I61673c179617377020aa95aa8d8d659f240f04e7 Reviewed-on: http://gerrit.openafs.org/8238 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4c24ac8f8a4e3939cbc5b5f6d5fb5032fdba50d9 Author: Michael Meffie Date: Sat Jul 28 13:17:55 2012 -0400 vlserver: use the logging function to log Use the logging function to log instead of printf. Change-Id: I377474881830152c93122bd3112e355ab5fd56ad Reviewed-on: http://gerrit.openafs.org/7895 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit beb8f07496f59a19621bb0db14b401107888de35) Change-Id: I246610abc3a6c2e164e0f368bc75a671f5f52e4d Reviewed-on: http://gerrit.openafs.org/8208 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0720095b09db766ef24cad9a74298a088c9defcc Author: Michael Meffie Date: Wed Jul 4 17:54:02 2012 -0400 vlserver: fix logging of ip addresses Remove the spurious dates surrounding IP addresess in the VLLog. Instead of multiple calls to the logging function for a given log line, format a string containing the addresses and call the log function once. Changes the log output from, ... The following fileserver is being registered in the VLDB: ... [Tue Jul 4 14:11:43 2012 192.168.10.128Tue Jul 4 14:11:43 2012 ] ... It will create a new entry in the VLDB. to, ... The following fileserver is being registered in the VLDB: ... [192.168.10.128] ... It will create a new entry in the VLDB. Reviewed-on: http://gerrit.openafs.org/7750 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 65a5e3ce92c47a87c3dca54cec456ae0337c78ef) Change-Id: I106556cda1046e6e8c971787ed8d056da70b77b9 Reviewed-on: http://gerrit.openafs.org/8207 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4071a3ec0ee21f16d3427b2233f010cbb768fb7f Author: Michael Meffie Date: Wed Aug 15 17:19:07 2012 -0400 vldb_check: fix cross-linked mh entries When run with -fix, consolidate server numbers in vl entries which point to the same multi-homed entry. Use the lowest server number from the set of server numbers which point to the same multi-homed entry. Remove unreferenced address entries which are duplicate multi-homed indexes. Two passes of vldb_check -fix may be required; first to fix the vl entry server numbers; then to remove the duplicate address entries. Reviewed-on: http://gerrit.openafs.org/7999 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 911f751d1edfb18ddd5f6a699746ba14730d553d) Change-Id: Iec977e25344ce1d5f93e3f107cc1b7ebc81d2c26 Reviewed-on: http://gerrit.openafs.org/8212 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aa10a191f85c003614da615c4dd23db991f7ff13 Author: Michael Meffie Date: Thu Jun 28 17:12:24 2012 -0400 vldb_check: remove unreferenced mh entries with -fix When running vldb_check with -fix, clear any mh extent entries which are set but are not referenced by an address entry in the IpMappedAddr table. These unreferenced entries already generated a warning. This commit adds the feature to clear the unreferenced mh entries using vldb_check -fix option. Reviewed-on: http://gerrit.openafs.org/7616 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fdd3b0fb1f8e6948c651d7f1822d17a78668e5ff) Change-Id: I79c79b3499fce448ebf662246de9f623b1565995 Reviewed-on: http://gerrit.openafs.org/8211 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c84b0c197825d69ab9602e23121763b2ab80972f Author: Michael Meffie Date: Fri Jun 29 18:10:31 2012 -0400 vldb_check: warn about cross-linked mh entries Warn if an mh extent entry is referenced by more than one server number in the IpMappedAddr table. The serveraddr table is used to determine which server numbers have IP addresses. If, for some reason, multiple server numbers reference the same mh entry, currently, the correct serveraddr value is calculated only for the lowest server number in the set of server numbers which reference the same mh entry. Handle this case, and warn about the duplicated values in the IpMappedAddr table. Warn about IpMappedAddr entries which reference non-existent mh blocks. Reviewed-on: http://gerrit.openafs.org/7615 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08e803bce3375bb69a01715b026d844b7a8e0ab3) Change-Id: I1d2a2d09ed468a247b4da6c07b5ecb4224a80c05 Reviewed-on: http://gerrit.openafs.org/8210 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2d750f7dce2d8be405a3bdff97f3f3f28fcac73b Author: Michael Meffie Date: Tue Jun 26 15:09:07 2012 -0400 vldb_check: off by one host address table error Fix several off-by-one errors when traversing the IpMappedAddr table in vldb_check. The last index (254) was not checked in several places. Reviewed-on: http://gerrit.openafs.org/7614 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a27a8a66c2c27a62afa566679ef9cf424e758d9f) Change-Id: I5fd5b452cafe641765247bdf11ef1a1b08cc1529 Reviewed-on: http://gerrit.openafs.org/8209 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9eb532ff9cc029533089a79473d3e154b28a7ea9 Author: Mark Vitale Date: Mon Aug 27 15:11:32 2012 -0400 vos: convertROtoRW - prevent VLDB corruption vos convertROtoRW incorrectly marks the first VLDB entry as the new RW if the converted RO is not in the VLDB. Correct this by creating a new valid RW site in the VLDB entry. Change-Id: I683ac10db90c2c41717c11c0d86eadc81a935e52 Reviewed-on: http://gerrit.openafs.org/8037 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f258e7dddeb4331d2cf4649541c1a3adfa7a416a) Reviewed-on: http://gerrit.openafs.org/8216 Reviewed-by: Derrick Brashear commit 38ad78ae0d8f014295bb1256bb3c10ed7936537e Author: Mark Vitale Date: Tue Sep 4 09:06:44 2012 -0400 vos: convertROtoRW incorrect warning when RO not in VLDB vos convertROtoRW will issue an incorrect warning about a partition mismatch if the RO to convert is not in the VLDB. Only check the partition if the RO is in the VLDB. Change-Id: Ib2726bc5bf6697898ad26dc1d817143da3286ba3 Reviewed-on: http://gerrit.openafs.org/8036 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b650106e301ecefe2f5c8f4a34081af1f5f74901) Reviewed-on: http://gerrit.openafs.org/8215 Reviewed-by: Derrick Brashear commit a8ea5b8f74b14ab3f1a16a50e7d8d077b5115e10 Author: Mark Vitale Date: Mon Aug 20 17:39:06 2012 -0400 vos: convertROtoRW susceptible to VLDB changes during override prompt vos convertROtoRW obtains a VLDB entry, then peforms some setup logic (including a possible user prompt) before obtaining a volume lock. This exposes the code to possible time-of-check/time-of-use issues. After obtaining the volume lock, get a second copy of the VLDB entry and compare it to the first copy; if it has changed, fail the conversion with an error message asking the user to re-issue the vos convertROtoRW command. Change-Id: I9c1a634cea2e22188869d54b00b7831aed12b1cd Reviewed-on: http://gerrit.openafs.org/8008 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3c489db55811dfe3fdf5e555bf229989e5b58aa6) Reviewed-on: http://gerrit.openafs.org/8214 Reviewed-by: Derrick Brashear commit 361d391af98abb2517b73a2b040d5fc8995c3713 Author: Mark Vitale Date: Thu Aug 2 18:37:05 2012 -0400 vos: convertROtoRW may create 2nd RW on a fileserver If an RW is already present on disk on the target server (any partition), 'vos convertROtoRW' will still convert the RO, creating a second RW on the server. Detect this and refuse to convert the RO by returning EXDEV (invalid cross-device link). Change-Id: Ide15a7c39f2a975fd8597e497094b6a67b448e4f Reviewed-on: http://gerrit.openafs.org/7934 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0c77c0acabe0a0588ab0a9efab0124ee1e15ef6a) Reviewed-on: http://gerrit.openafs.org/8213 Reviewed-by: Derrick Brashear commit 097ec223d3f2dc9d345cdbce24967de4b0c92204 Author: Andrew Deason Date: Tue Sep 25 11:16:35 2012 -0500 RedHat: Avoid the DKMS escaping silliness Depending on the version of DKMS, the current MAKE[0] variable in the dkms.conf needs different numbers of backslashes. Commit 81a9a33e tried to address this by changing the contents of dkms.conf depending on whether or not we were on Fedora. However, the change occurred in DKMS 2.2, so if someone running RHEL tries to use a newer DKMS, this will fail. So instead of trying to guess at the level of escaping we need, just avoid needing to escape anything with backslashes. We can quote the heredoc marker to avoid variable expansion inside the heredoc, we can use a case statement instead of using backticks and local variables and such, and we can use single quotes for the outer MAKE assignment. With this, we should not need any backslashes when writing dkms.conf, so we should work with any DKMS version. Reviewed-on: http://gerrit.openafs.org/8156 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 72f1f345ece09b1fbd113af17c9e8e25ec9dffa5) Change-Id: Icbaa1fde7ea222b639a7e5a740f6b18a4a87c74a Reviewed-on: http://gerrit.openafs.org/8172 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2e7f249e3fa165874a449d9deeb8515481e7375b Author: Andrew Deason Date: Tue Aug 21 17:03:30 2012 -0500 LINUX: Avoid symlink-y resolution limits Implementing the d_automount or follow_link function pointers for our directories means that we can hit symlink resolution limits during lookup, since we look like a "symlink". We can hit these limits pretty easily if there are just too many directories in the lookup path. Our pseudo-symlink directories cannot contribute to an infinite resolution loop, since our destination is always an actual directory, not a symlink that will result in more redirection. So, decrement the total_link_count counter when our d_automount or follow_link code is reached, so we do not contribute to hitting the max resolution limit. Note that this is not related to recursive symlink lookup (link_count) but only to the iterative symlink limit (total_link_count). Our lookups are not recursive here, and we are not causing more recursive lookups like a normal text-based symlink would do. Reviewed-on: http://gerrit.openafs.org/8009 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 238b88624a8fef39557d397cc336c88bd8efc5b1) Change-Id: Iec6e3fac25ab86ef5f10f359344908398bef8828 Reviewed-on: http://gerrit.openafs.org/8194 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6c22f2e1de91fa3080221df22fdcd05064b57307 Author: Marc Dionne Date: Tue Aug 14 18:26:24 2012 -0400 Linux 3.6: lookup inode operation API change The nameidata argument is replaced with an unsigned int flags argument. Reviewed-on: http://gerrit.openafs.org/7987 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ec48dca871ef98adb69792a34047c6be5818f1b2) Change-Id: Ic8be26141ede6e1c4062872c79a846efb0045bda Reviewed-on: http://gerrit.openafs.org/8084 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4ab59d7ee924a6be1d553f75a67b0b253cc85e88 Author: Marc Dionne Date: Tue Aug 14 18:08:51 2012 -0400 Linux 3.6: revalidate dentry op API change The nameidata argument is dropped, replaced by an unsigned flags value. The configure test is very specific; kernels with the older API with a signed int flags value should fall through. Reviewed-on: http://gerrit.openafs.org/7986 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7413cd09a53f89882a46fd100bf6c501348f2188) Change-Id: Ie68d70dcf414d24e7e980c8a8f35b83550d2da7c Reviewed-on: http://gerrit.openafs.org/8083 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5210d97865d974d5e14f68eec6a58b292d6b7893 Author: Marc Dionne Date: Tue Aug 14 17:28:50 2012 -0400 Linux 3.6: create inode operation API change The nameidata argument is dropped and a flag is added. Reviewed-on: http://gerrit.openafs.org/7985 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 020e32779c103817ca89caa51259fb53bc3dde79) Change-Id: Iae2a0301a1c4acb6835eb0bdca6ae22b143b2cda Reviewed-on: http://gerrit.openafs.org/8082 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aecd183acb34a0a9b850fb69eed472d2c9a27612 Author: Marc Dionne Date: Tue Aug 14 17:11:08 2012 -0400 Linux: fix variable used to test for the iop create API Use correct variable when testing for the create API to use. This is just for looks - there is no effect since mkdir and create were changed in the same kernel release. Reviewed-on: http://gerrit.openafs.org/7984 Reviewed-by: Alistair Ferguson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c633a92a1bc7881f18ee641082ff2efe7da1a8cb) Change-Id: Ib23fe9a34bc07227614c149b0f16d3b0a067501b Reviewed-on: http://gerrit.openafs.org/8081 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b5a66fb391b47848f023042e96c87a1b7d49b888 Author: Marc Dionne Date: Mon Aug 13 21:55:25 2012 -0400 Linux 3.6: d_alias and i_dentry are now hlists The d_alias pointer is now the head of an hlist. This means the iterator is a different macro and has no "reverse" version since hlists have no direct pointer to the list tail. inode->i_dentry gets the same treatment. Adjust where we use it. Reviewed-on: http://gerrit.openafs.org/7983 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6bea047fb404bde828c6358ae06f7941aa2bc959) Change-Id: I7e7b87e5f5c240f3f0ff25fa723c857ab9d0108c Reviewed-on: http://gerrit.openafs.org/8080 Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Tested-by: BuildBot commit 1bba9760b26bdb1ef1e17f9d1e15be9d565828cc Author: Marc Dionne Date: Mon Aug 13 21:36:15 2012 -0400 Linux 3.6: dentry_open API change dentry_open now takes a path argument that combines the dentry and the vfsmount pointers. Add a configure test and a new compat inline function to keep things cleaner in the main source file. Reviewed-on: http://gerrit.openafs.org/7982 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8766a65e97eb90cb6c97ccd35181c441ece14f8a) Change-Id: I2c0f59ad9aa6e544a2a613e902933d463f22a5b6 Reviewed-on: http://gerrit.openafs.org/8079 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 76ab286feb1570efa9763e076020fc43fb0a95fa Author: Marc Dionne Date: Tue Aug 14 16:34:42 2012 -0400 Linux 3.6: kmap_atomic API change kmap_atomic no longer requires a KM_TYPE argument. Test for this and adjust the affected code. Reviewed-on: http://gerrit.openafs.org/7981 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 049c485b4a39ba510035788b4959d839ef668c55) Change-Id: Iac8be7901da4b277864b1b6cc987cf5087992789 Reviewed-on: http://gerrit.openafs.org/8078 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Ken Dreyer Tested-by: BuildBot commit 54db9af1a87c03d6f00ab70565c9d1f733813fc2 Author: Marc Dionne Date: Mon Aug 13 20:32:08 2012 -0400 Linux: bypass: consolidate copy_page macros into a single function The copy_page(s) macros are very similar; combine them into a single function that can be used for all cases. This will make it easier to add some pre-processor logic around the kmap_atomic calls to adapt to Linux API changes. Reviewed-on: http://gerrit.openafs.org/7980 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0a8256a26fafb490b454f2a857b0c15d859572c5) Change-Id: I6835a024428b26a8cd8d073f6304d0d0b3042b24 Reviewed-on: http://gerrit.openafs.org/8077 Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Tested-by: BuildBot