commit ed0886ca6fd45e3f6d653f62328046195d8f3467 Author: Stephan Wiesand Date: Sat Dec 22 21:28:10 2012 +0100 make openafs 1.6.2pre2 prerelease for 1.6.2 Change-Id: Ic15db559c115f18528e05ced0080e489eadfb0b9 Reviewed-on: http://gerrit.openafs.org/8817 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit aeb42c44bc005b8935650351470020f2e715bcb8 Author: Andrew Deason Date: Wed Dec 19 16:57:20 2012 -0600 ihandle: Avoid FD cache in ih_sync_all If an ihandle is IH_REALLYCLOSE'd immediately before or during the IH_OPEN call in ih_sync_all, ih_sync_all can open a new file handle after the IH_REALLYCLOSE is complete. For a volume that has gone offline, this means that ih_sync_all can hold a file open for a volume that has gone offline, and is possibly being manipulated or deleted by an external program (e.g. the volserver for a clone operation). While the FdHandle_t is open, or after the handle has been closed and returned to the FD cache, another caller in the fileserver could try to open the same file and get back the cached FdHandle_t. If the file has been deleted by the volserver, this means the fileserver is writing to the 'wrong' file, as it has been deleted. This can result in a CopyOnWrite operation causing a file from the clients' point of view to suddenly become empty, or to revert to a previous version. To avoid this, prevent ih_sync_all from interacting with the FD cache entirely, and just open a file descriptor directly from the IHandle_t. This should prevent it from causing any problems with other users of the FD cache. This change is not intended for the master branch. The current intention for the master branch and future versions is to eliminate ih_sync_all entirely. FIXES 131530 Change-Id: I809a0e3ebfe4692eab01671fdf83bf58676453f6 Reviewed-on: http://gerrit.openafs.org/8796 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 140fb74331a6fda552d25bbf56dda5f9c785839a Author: Simon Wilkinson Date: Wed Aug 3 19:08:20 2011 +0100 libafsauthent: Add volser and vldb Add the volser and vldb families of functions to libafsauthent. This allows applications such as perl-AFS which are building pthreaded clients to use a single library, rather than trying to mix LWP and pthreaded code within the same process. Reviewed-on: http://gerrit.openafs.org/5157 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 55beacdc385424770c78cf055e8fd426075506f1) Change-Id: I60a35b3032f071a0a3ef4dc66221f22166942bfd Reviewed-on: http://gerrit.openafs.org/8799 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit c4dbf26d03defa781f54c59b2a8bf1acf98dca26 Author: Marc Dionne Date: Mon Aug 8 16:08:25 2011 -0400 venus depends on libafsauthent Add an explicit dependency on libafsauthent for src/venus, since it is needed to build afsio. This can cause parallel builds to fail. Reviewed-on: http://gerrit.openafs.org/5171 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 784a410d0f1d6b5649c5b4943eb1b945ef7d70e8) Change-Id: I8baf9008e4f59d916242e0a8ac9bda19522f0b0d Reviewed-on: http://gerrit.openafs.org/8800 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 2bcb13eddefdccec2f18f4f30fd431e703a39bfd Author: Simon Wilkinson Date: Fri Dec 21 09:35:28 2012 +0000 tubik: Don't install ubik.h or ubik_int.h Both ubik and tubik try to install ubik.h and ubik_int.h. This leads to a race during which the header file may be missing, which upsets parallel builds. Just don't install them from tubik to solve this issue. This is 1.6 only - a similar fix was done as part of the libtool work on master in 035a2ea4a1a26141508cf3fa5918d40b7be6fc90 Change-Id: I18a7dcb425b2f805656ab8ff8c06b87bcca526c7 Reviewed-on: http://gerrit.openafs.org/8808 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 7d6591870302e935e04db91b934082a49c9009bc Author: Michael Laß Date: Fri Dec 14 17:06:30 2012 +0100 Update configure help msg to match actual defaults The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating the output of ./configure --help. Change the description of linux-kernel-headers and linux-kernel-build to show the correct defaults. Reviewed-on: http://gerrit.openafs.org/8759 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 986a8541518fb03a69cf5ece2055cb9cd50bda60) Change-Id: I2fc463fc3b5793d6125f7367de22631c8e52da21 Reviewed-on: http://gerrit.openafs.org/8805 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit efbcfd81599a0401dc6d95ceb04cc8f5c3f1837b Author: Stephan Wiesand Date: Sat Dec 15 15:36:24 2012 +0100 Linux: Restructure kernel header detection As of kernel 3.7, version.h has moved, and hence utsrelease.h was no longer found. Loop over candidate directories and locations within, and look for the files we're actually after. FIXES 131525 Reviewed-on: http://gerrit.openafs.org/8761 Tested-by: BuildBot Reviewed-by: Michael Laß Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3f9d982ec25aa5f9cf32a1268d6883a9afa70b12) Change-Id: Ia9653405195d4c5f6592960375340553de1267c5 Reviewed-on: http://gerrit.openafs.org/8804 Reviewed-by: Michael Laß Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit bff5e77d97b2f2d26c783632c913451906533aab Author: Derrick Brashear Date: Tue Dec 18 09:04:15 2012 -0500 macos: avoid leaking iocount on synthetic fsevents in certain cases we could leak an iocount. clean up even if our event couldn't be run Reviewed-on: http://gerrit.openafs.org/8777 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit cf150252b688dff0224f32be66d88347d1d94b37) Change-Id: Id8c94bee3663507d31c0e0dc719693d82f90a151 Reviewed-on: http://gerrit.openafs.org/8791 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit f69aaf6914096077108b534aff8fd147cd6a65ae Author: Andrew Deason Date: Thu Dec 13 16:36:20 2012 -0600 LINUX: Avoid infinite d_invalidate loop If a reference is grabbed after we d_invalidate() a dentry, but before we dput() that dentry, the dentry can still be on the alias list for its inode. This will cause us to loop forever, since we'll get the same dentry back from d_find_alias, and d_invalidate() will return success, since it is a no-op. Avoid this by just limiting the number of times we loop. Leaving dentry aliases around is non-critical as long as we clear some each time. This change is not applicable to master, which will get a more robust fix for this issue. This change was discussed during the 19 Dec 2012 release-team meeting. Change-Id: Ief22ae9f8f6de62518604383c421772c25c5dc26 Reviewed-on: http://gerrit.openafs.org/8795 Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 5f7cf5fc22ac3ca62175c69c1a25139dde4b22b0 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 Reviewed-on: http://gerrit.openafs.org/8792 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8c1288ed64714a3e136a644eac1e64466d5dfdbc) Change-Id: I67e20e302d09ebecec8e7856cafe7133333b89f4 Reviewed-on: http://gerrit.openafs.org/8798 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 7fd2d9ba8ba031308710c96c0c726f82e9b0b620 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. Reviewed-on: http://gerrit.openafs.org/8773 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit f9e9d9aebf2f671b099253ec847b0dd32ce5c686) Change-Id: I0cbf8f9a540159b5169e4cdf409dc7e875527d77 Reviewed-on: http://gerrit.openafs.org/8776 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 9b63f04eff7fe5b0b963172fa4b5b8e1522c999e 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. Reviewed-on: http://gerrit.openafs.org/8772 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c23664aff7a78010ba462317087e84f7ae3c8518) Change-Id: I806a3ede5f0fa6794f3ccaf8f2d514b0c8443ec1 Reviewed-on: http://gerrit.openafs.org/8775 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 5cfb72022a2647e04fd2a398b9623311a1716f5a Author: Derrick Brashear Date: Thu Mar 29 10:44:53 2012 -0400 linux: update spec requirements don't require things which don't exist on el5. do require them in el6. require kernel-devel if building modules don't do anything involving the kernel if not building modules if we can figure out that we don't have 2.4 based on the version, avoiding the need to depend on kernel-devel just to build an srpm. Reviewed-on: http://gerrit.openafs.org/6985 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 72f5d88acc752ff447a9e63327c135473326a34d) Change-Id: Ibcc53eb6a742de2101a054070e9b48607d0bce1d Reviewed-on: http://gerrit.openafs.org/8787 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 9cf0b0dcc6b4155aff7ed5bff5aea61e3a21f39c Author: Michael Meffie Date: Fri Aug 17 13:25:17 2012 -0400 LINUX: make d_automount work properly on rhel5 kernels Recent centos/rhel 5 kernels (2.6.18-308.*) started providing the d_automount operation, but renamed the DCACHE_NEED_AUTOMOUNT flag to DMANAGED_AUTOMOUNT. Reviewed-on: http://gerrit.openafs.org/8006 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 5daa08ea263b2a82b4a85abd61d72d4d1f48bbb6) Change-Id: I1ebc2a3cab52ff7294b03e1e82680a99d62013fc Reviewed-on: http://gerrit.openafs.org/8790 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 7ca98751976df92a8f91f5768754ff3c1b4980bf Author: Andrew Deason Date: Wed Aug 29 11:39:01 2012 -0500 LINUX: Use struct vfs_path on RHEL5 Some revisions of the kernel from RHEL5 (2.6.18-308.* and possibly others) renamed 'struct path' to 'struct vfs_path'. So, use 'struct vfs_path' when it exists. This introduces the afs_linux_path_t typedef, which is defined as either a struct path, or struct vfs_path. Reviewed-on: http://gerrit.openafs.org/8019 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 74c1881dff1593f4a8920ba8d8a2400760899fa5) Change-Id: I6eaf17ebe9a35b345c1fd5cebd490f8095a1b22b Reviewed-on: http://gerrit.openafs.org/8789 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 716cca7ed808aee2e639d06d8d5fcdd71de12b2b Author: Andrew Deason Date: Thu Aug 30 08:06:33 2012 -0400 autoconf: add AC_CHECK_LINUX_TYPE macro add a macro which looks for a given type in a given linux kernel header file Reviewed-on: http://gerrit.openafs.org/8021 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit f87d49cd17fbf6aa9465faadac823ed8d0510a16) Change-Id: Idc6cc79d9410149f6faeb867f878724beaa30793 Reviewed-on: http://gerrit.openafs.org/8788 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit cf59993d504e80f94ee1d9a56ee8b5b669810394 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: I59eacb7406e8bec9e5736afe32564a04be7ff72a Reviewed-on: http://gerrit.openafs.org/8786 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit cddc0c46696e25c590d85afcc71c7c018d42f6a3 Author: Derrick Brashear Date: Mon Jul 16 22:32:55 2012 -0400 macos: fix growlagent icon handling the whole of the api used for icon handling when you steal it from a resource fork is deprecated in new macos. fine. we'll just make an app bundle by cheating, move andy into a standalone icns file, install him into the "bundle" and open it the macos way. Reviewed-on: http://gerrit.openafs.org/7786 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3dd230e8595e2b9635d6ec412a145ae3be229b7a) Change-Id: I9a439601058a4c2f32cbe687865a9143d56b92bf Reviewed-on: http://gerrit.openafs.org/8781 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit b64c45535b7d2f7e3fb65dc33d2767cd30633383 Author: Derrick Brashear Date: Tue Jul 17 00:15:56 2012 -0400 macos: native apps need 64 bit support the installer bundle, prefs pane and backgrounder all need to be 64 bit mode since the system uses them as plugins Reviewed-on: http://gerrit.openafs.org/7787 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 50009267bb6deaa431042dc99ac6e5d913b1412a) Change-Id: I7b6f8b011380f1ce8284f5c44656422405490dc7 Reviewed-on: http://gerrit.openafs.org/8780 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 8445c07524a76deaab19ca196c5783a16d0830d9 Author: Derrick Brashear Date: Sun Jul 15 03:03:00 2012 -0400 macos: next version support support things beyond 10.7 Reviewed-on: http://gerrit.openafs.org/7763 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 73ff09513013ae3c6b29b1b7b0a6e76b4fd260f7) Change-Id: I0bbef00747b01b387989398557fb82be93fe28f9 Reviewed-on: http://gerrit.openafs.org/8785 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 64f1ed16c8f7e226ddcebcab2b575939a912108b Author: Derrick Brashear Date: Wed Jul 25 00:17:46 2012 -0400 macos: next version header add header for next macos Reviewed-on: http://gerrit.openafs.org/7868 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3638ef30d0de7d82d919b046ec87986ad09442d3) Change-Id: Ia4ad32e66566c8d822a32ca51fae784293f7ac24 Reviewed-on: http://gerrit.openafs.org/8779 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand 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 commit 191df3d05770781d4a47ff210f9adf2712f8be07 Author: Derrick Brashear Date: Wed Sep 12 07:25:12 2012 -0400 1.6: fix warnings 1.6 only. fix warnings which do not exist on master Change-Id: I33927d1f3f3a45c26991bb9a60eb80bd0e6a9178 Reviewed-on: http://gerrit.openafs.org/8105 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5842f856652051a4386b1e0170f18dca911ca4c6 Author: Marc Dionne Date: Sat Jun 2 20:45:08 2012 -0400 afsd: include sys/resource.h in afsd_kernel.c With a recent glibc update, sys/wait.h no longer includes sys/resource.h unless __USE_SVID, __USE_XOPEN or __USE_XOPEN2K8 are set. Don't rely on the indirect inclusion to get the bits we need; include it directly in afsd_kernel.c. This include used to be there but was dropped when afsd_kernel.c was split off. Reviewed-on: http://gerrit.openafs.org/7522 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc3a32a84facb8114a8c7de87025f972d0281098) Change-Id: Ia5ba6a0e662607e680b4431f146c969b7069bcfd Reviewed-on: http://gerrit.openafs.org/8155 Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e4801972798645ffd042b195cb4d489054b4990 Author: Marc Dionne Date: Tue Sep 11 16:39:55 2012 -0400 tptserver: Disable strict-aliasing warnings Disable the strict-aliasing warnings for a few files that have supergroups related code. This was already done in ptserver but not in tptserver. Change-Id: I8b3c8b5f5b19fd47fed949e7b2568678a5ffffd4 Reviewed-on: http://gerrit.openafs.org/8096 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit f86a38eb0b53297475152b9007c79498d3c8513a Author: Michael Meffie Date: Fri Aug 12 08:25:30 2011 -0400 volser: log host address of caller in extra logging When the volserver is running with extra logging (-log), log the address of the host running vos in addition to the user name. Change-Id: I040be71a84dede255e43c30dd7d8ae56f767f721 Reviewed-on: http://gerrit.openafs.org/5234 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit cbdca2996af06c57cb3ba953c1efb9e316d18f27) Reviewed-on: http://gerrit.openafs.org/8066 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 56f4e2da649b208296fb136ba7a22f5d03b5d7f1 Author: Michael Meffie Date: Thu Aug 2 17:24:02 2012 -0400 libafs: revert init req to use the real uid The commit to use wrappers for creditial structure access inadvertently changed the user id to be the effective uid instead of the real uid, when no PAG is present, on linux. Revert this so setuid programs continue to work. See commit eb8e55bba7740a87e07ef07bb4b789e6d4e36f0d Change-Id: I5d42b8caf90a042192ed39f26e55d70c9531f2e9 Reviewed-on: http://gerrit.openafs.org/7931 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a1e87dcdf972519cd21970f7c78709e40f8e1e9) Reviewed-on: http://gerrit.openafs.org/7990 commit b623d13f0f95084a0502af2cd2ee1849f8f80654 Author: Andrew Deason Date: Thu Mar 22 10:42:38 2012 -0500 afs: Set DWriting when truncating a dcache entry When we truncate a file, we truncate the contents of the relevant dcache entry chunks, and prevent future FetchData operations from fetching data beyond the truncation offset. If we never write anything to that chunk, we never set DWriting, and so on disk it looks like that dcache entry has valid data for the specified DV. However, since the data is truncated, this is not true. If a process holds a file open, truncates it without writing to it, and then the client crashes (or we have trouble contacting the fileserver when we close the file), the dcache entry will appear valid on disk. So the next time we read the dcache entry, we will use the incorrect cache contents as if they were accurate for the specified DV. To avoid this, set DWriting when we truncate a chunk. Normally we only clear DWriting when we actually send data to the fileserver, so to clear DWriting in this case, add an additional line to clear it in afs_StoreAllSegments, after the StoreMini has completed. Reviewed-on: http://gerrit.openafs.org/6937 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b3b267d16eefb993f52f66bf44f3e659c1017e58) Change-Id: I5602db9687f3f005f68200a4208a3c7012933efa Reviewed-on: http://gerrit.openafs.org/7996 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8f0eed22c3eb03e5f376d2152112ae354481ab2c Author: Andrew Deason Date: Thu Mar 22 10:52:47 2012 -0500 afs: Slight adjustments in afs_GetDCache maxGoodSize is only used in one block, so move the decl to that block. Adjust some of the comments to more accurately reflect what's going on. Reviewed-on: http://gerrit.openafs.org/6936 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit d5c13a0f3ce7d9f0a01820ff9c12dfb1cbc12047) Change-Id: I2ba6574b88856d2f506663eafb984a9f3bea4cf8 Reviewed-on: http://gerrit.openafs.org/7995 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f899af247cba9fd9993e89040bff7157fc10de87 Author: Andrew Deason Date: Fri Mar 2 17:22:12 2012 -0600 afs: Do not limit fetches based on vcache length Currently, when we go to the fileserver to fetch some data, we try to make sure that we do not ask for data beyond the end of the file. For example, if our chunk size is 1M, and we need to get the first chunk for a file that is 4 bytes long, we will only ask the fileserver for 4 bytes. This can cause issues when the file is being extended at the same time as when we are trying to read the file. Consider the following example. There is a file named X that has contents "abcd" at dv 1, and we issue a FetchData64 request for X, only requesting 4 bytes. Right before the fileserver gets the FetchData64 request, another client writes the contents "12345" to file X. The client will then fetch the contents "1234" for that file, at dv 2, and store that as the contents of the first chunk for file X. On subsequent reads for file X, applications will now get "1234" as the contents, since the size of the file will be updated to 5, but the cache manager thinks that "1234" is the correct contents for the first chunk of X at dv 2. The cache manager will continue to think so until the cache entry is evicted or invalidated for whatever reason. To avoid this scenario, always request a full chunk of data if we have any data to fetch and the file has not been locally truncated. We can still avoid the fetch at all if it looks like we're fetching beyond end-of-file, since we know that at least at some point that was correct information about the file. If this results in us trying to fetch beyond end-of-file, the fileserver will respond with the correct length anyway. We still need to restrict the fetch request length based on avc->f.truncPos, since the dcache data after avc->f.truncPos needs to stay empty, since we don't track truncated data any other way. If we also avoided this restriction, extending a file via truncation after reducing a file's length via truncation could cause the old file data to appear again, instead of filling the new file range with NULs. Note that on at least Linux, with this fix an application can still read the contents "1234" on the first read in the above example, and "12345" on subsequent reads. This is just due to when we give the VFS updates about file metadata, and could be remedied by updating file metadata immediately from the FetchStatus information from the FetchData64 call. However, just reading the contents "1234" in the above example seems like a somewhat plausible outcome; at the very least, it is an improvement. Reviewed-on: http://gerrit.openafs.org/6882 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e53221d9a82fd8e3d545704abae51cc844bc31a3) Change-Id: I81b5a3a6ff745f3f53988a1a4e5d3df20f5df6d3 Reviewed-on: http://gerrit.openafs.org/7994 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a17223f96ecd6bd0d536375f5d448a06c0690c00 Author: Andrew Deason Date: Fri Mar 2 17:18:25 2012 -0600 afs: Log a message on invalid FetchStatus receipt If we get an invalid AFSFetchStatus structure from a server, log a message to indicate as such. This serves as a warning to urge people to fix their fileservers, and to explain what is doing. Reviewed-on: http://gerrit.openafs.org/6881 Reviewed-by: Alistair Ferguson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 577d5d99fefb62f0b52a568207d2352946b36137) Change-Id: I10dc2dd94d2cd7277e48dfff1accb36e7cab8537 Reviewed-on: http://gerrit.openafs.org/7993 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d8e4c7ffb41ece21db8bc1f19ebc735ba9e090c Author: Andrew Deason Date: Fri Mar 2 17:06:48 2012 -0600 afs: Sanity-check some AFSFetchStatus structures We currently do not do any sanity checking on the AFSFetchStatus structures returned from fileservers. Add some sanity checking for BulkStatus and FetchStatus calls, so we do not screw up our cache if a fileserver gives us bogus data. If we do get an invalid AFSFetchStatus structure, act as if the server gave us a VBUSY error code, so we will retry the request. For OpenAFS fileservers prior to 1.6.1 that yield this situation, VBUSY is likely the error code the fileserver should have responded anyway. Reviewed-on: http://gerrit.openafs.org/6880 Reviewed-by: Alistair Ferguson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5af63fabc553a2fecd4c3080b25fe14483f5bd98) Change-Id: I88922a75ada96d641bfd0078a8e7d6854c4ea699 Reviewed-on: http://gerrit.openafs.org/7992 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 55dbeea07680f11f0b39bd21bb64a87e5e506b9e Author: Andrew Deason Date: Mon Aug 27 14:33:47 2012 -0400 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. Backport of commit 660720d1f54a867e21f78b6ec4c024235e4c37b7 Change-Id: I3372e053d284e10702971769487a7580a6842ef2 Reviewed-on: http://gerrit.openafs.org/8015 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 339f8452e9a01af3fa0d026035561d8fdfc07447 Author: Michael Meffie Date: Mon Apr 23 14:42:24 2012 -0400 libafs: log server errors on hard mount retry Save the last errors seen during a request and log those errors if a hard-mount retry is done. Reviewed-on: http://gerrit.openafs.org/7275 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 94a8ce970d57498583e249ea61725fce1ee53a50) Change-Id: I9aec874fc525c823c095bb3647bd2561854dbab3 Reviewed-on: http://gerrit.openafs.org/8002 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 78d2ac3c0494fbc690a0ec5a0e36c2b2e4998296 Author: Simon Wilkinson Date: Thu Nov 24 17:43:45 2011 +0000 Unix CM: Log reason for marking server up or down When we mark a server up or down also log the error code that says why we did so, for help in debugging connection issues. Reviewed-on: http://gerrit.openafs.org/6116 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 33526acb56c1794838c6a8c02e9b8f5022a04ac1) Change-Id: If0318faf99f2a7582c93f74f3fc210c0c02fbaf7 Reviewed-on: http://gerrit.openafs.org/8001 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 56ed9bd7f65997eb02f844395aca503093a22268 Author: Derrick Brashear Date: Fri May 25 09:40:54 2012 -0400 libafs: initialize free dcache list for memcache reuse the disk cache dcache creation code for memcache, then call it to prime the list Reviewed-on: http://gerrit.openafs.org/7446 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9bb876f6829f137e534b961f7374b310bfa8aa7d) Change-Id: I1c616521a9e518ac7e4e62006b3a327458263cae Reviewed-on: http://gerrit.openafs.org/7944 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a1b1c97e8260c565faacafae68b11e582d91208b Author: Andrew Deason Date: Mon May 21 12:28:58 2012 -0500 afs: Add some comments explaining 'needvalid' Add some comments to try and help explain the meaning of the 'needvalid' parameter to GetDSlot, added in 1a672914ab050811c99b6307c657630ab9b5c8ee. Reviewed-on: http://gerrit.openafs.org/7429 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 6f6c799c4ba4d03c6c381738b2db8aafe741ba5e) Change-Id: If7d37d427f96f3607b6c3aea2487396666e41a03 Reviewed-on: http://gerrit.openafs.org/7943 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 4b68723f2efd2bb3f9f52ddb2fd455c1e977cd60 Author: Andrew Deason Date: Wed Dec 21 17:01:16 2011 -0500 afs: Add afs_WriteDCache sanity checks Writing a non-free non-discarded dcache entry with a zero volume id can easily cause hash table corruption later on, so make sure we don't do that. Also log something if the write itself fails, as this usually indicates an unusual situation involving I/O errors or something. Reviewed-on: http://gerrit.openafs.org/6419 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 79f69f2eb130c1c5cb6cdfa4e7a129f450a58339) Change-Id: I482ad6a1fef3896144855b58c70e73bdf896027f Reviewed-on: http://gerrit.openafs.org/7942 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 9a55866037f3742b0d418fc699424301cf7a27eb Author: Andrew Deason Date: Wed Dec 21 16:05:40 2011 -0500 afs: Cope with afs_GetValidDSlot errors Make callers of afs_GetValidDSlot deal with getting a NULL dcache, which can occur if an error is encountered. Some of these just panic at least for now, since a code path for recovery is complex, but this is at least better than dereferencing a NULL pointer. Reviewed-on: http://gerrit.openafs.org/6418 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9ed26da26f4a5a3fef3bf0a7b6f9dae751ce6659) Change-Id: I79c6fb3ae6279b5da482f95b4d4ed457beeaf1dd Reviewed-on: http://gerrit.openafs.org/7941 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bacb835a60ede55b0cc5598f60021487bd0caf0c Author: Andrew Deason Date: Wed Dec 21 15:04:32 2011 -0500 afs: Do not always ignore errors in afs_GetDSlot Currently afs_UFSGetDSlot will silently swallow any error in reading the specified dslot from disk, and will return a "blank" dcache to the caller. However, many callers of afs_GetDSlot will be asking for a dcache that we know exists, and more importantly, we know is on the global hash table. If a disk error is encountered and we're given a "blank" dcache, we will erroneously believe the dcache entry is not on the hash table, causing corruption of the hash table later on. So instead, modify all callers of afs_GetDSlot to use either afs_GetValidDSlot or afs_GetNewDSlot. Calling afs_GetValidDSlot indicates that the given dentry index is known to be valid, and any error encountered while reading the entry from disk should result in an error (for disk I/O errors we have no control over, this results in a NULL dentry returned; for internal consistency errors we panic). Calling afs_GetNewDSlot indicates that the specified index may not exist or may not be valid, and so returning a "blank" dentry in that case is fine. For memcache, the situation is the same, except any time we go to "disk" it is an (internal) error, since there is no disk. Reviewed-on: http://gerrit.openafs.org/6417 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a672914ab050811c99b6307c657630ab9b5c8ee) Change-Id: Ia30e7de919ccc14708112886e492e60f93fe6639 Reviewed-on: http://gerrit.openafs.org/7940 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 524a97a2be62770a601da31b518226119e8e202f Author: Andrew Deason Date: Wed Dec 21 17:25:29 2011 -0500 afs: Remove second argument to afs_GetDSlot All callers of afs_GetDSlot were passing NULL as the second argument to afs_GetDSlot. So, remove the argument, and behave as if tmpdc was NULL unconditionally. Reviewed-on: http://gerrit.openafs.org/6416 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 12177ba6fffaf8a693dd8c8e9445d5e7725ae743) Change-Id: Ic1ad6d35a7051e83a811692156b0da7207cb57f4 Reviewed-on: http://gerrit.openafs.org/7939 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 67a1e4069d387c4a2835f3f4dbe7d964fb7da32e Author: Chas Williams (CONTRACTOR) Date: Tue Oct 19 14:50:35 2010 -0400 afs: clean afs_osi_Alloc() usage Add asserts for any failures cases not explicitly handled and remove any casting. Reviewed-on: http://gerrit.openafs.org/3012 Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 0e8cce457763b131de48395a9beed889fd529c1f) Change-Id: I23497ea7a75a66c01ba7b1013e01dfaa005c9892 Reviewed-on: http://gerrit.openafs.org/7936 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 85432bf0b44fa2e1f54dc9d1798642d5b8b40b95 Author: Andrew Deason Date: Fri Apr 6 14:56:07 2012 -0500 LINUX: Do not lookup immediately recursive mtpts On Linux, having a mountpoint in a volume root that points to the same volume can cause serious problems. By 'immediately recursive', I mean a situation like the following: fs mkm mtpt vol fs mkm mtpt/mtpt vol If there are multiple dentry aliases for the directory (which is possible if the directory is a mountpoint), an 'rmdir' on the recursive mountpoint can cause the client to deadlock. Since the 'rmdir' code path in Linux locks the parent directory inode to perform the rmdir, and locks the child directory inode after performing a couple of sanity checks. For an immediately recursive mountpoint, these two inodes are the same, and so we will deadlock. Reviewed-on: http://gerrit.openafs.org/7742 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d785abd5ec9302bdc1b3c33368246e573e0cd65d) Change-Id: I531adbf66cf6714e04811356b072b17335980aa3 Reviewed-on: http://gerrit.openafs.org/7952 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dda3ea5f9ddda389955249e17a2e97b2e5ce7f1c Author: Andrew Deason Date: Fri Jul 6 16:37:39 2012 -0500 Linux: Make dir dentry aliases act like symlinks Currently, we try to invalidate other dentries that exist for a particular dir inode when we look up a dentry. This is so we try to avoid duplicate dentries for a directory, which Linux does not like (you cannot have hardlinks to a dir). If we cannot invalidate the other aliases (because they are being used), right now we just return the alias. This can make it very easy to panic the client, due to the sanity checks Linux performs when dong things like 'rmdir'. If we do something like this: mkdir dir1 fs mkm dir1/mtpt vol mkdir dir1/mtpt/dir2 fs mkm dir1/mtpt/dir2/mtpt2 vol cd dir1/mtpt rmdir dir2/mtpt2 For the 'rmdir', we will lookup 'mtpt2'. Since 'mtpt' and 'mtpt2' are mountpoints for the same volume, their dentries point to the same directory inode. So when we lookup 'mtpt2', we will try to invalidate the other dentry, but we cannot do that since it is the cwd. So we return the alias dentry (for 'mtpt'). The Linux VFS layer then does a sanity check for the rmdir operation, checking that the child dentry's parent inode is the same as the inode we're performing the rmdir for. Since the dentry we returned was for 'mtpt', whose parent is 'dir1', and the actual dir we're performing the rmdir for is 'dir2', this sanity check fails and we BUG. To avoid this, make the dentry alias act like a symlink when we encounter an uninvalidateable dentry alias. That is, we allow multiple dentry aliases for a directory, however, when the dentry aliases are actually used, we redirect to a common dentry (via d_automount where possible, and follow_link elsewhere). This means that such mountpoints will behave similarly to symlinks, in that we 'point' to a specific mountpoint dentry. This means that if we have multiple different ways to get to the same volume, and all are accessed at the same time, all but one of those mountpoints will behave like symlinks, pointing to the same mountpoint. So, the '..' entries for each path will all point to the parent dir of one mountpoint, meaning that the '..' entry will be "wrong", but for most cases it will still be correct. In order to try to make the 'target', pointed-to directory consistent, we add a new field to struct vcache: target_link. This points to the dentry we should redirect to, whenever that vcache is referenced. To avoid (possibly not-feasibly-solvable) problems with refcounting, this pointer is not actually a reference to the target dentry, but just serves as a pointer to compare to. FIXES 130273 Reviewed-on: http://gerrit.openafs.org/7741 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit de381aa0d39e88a1ca0c8ccbb2471c5cad5a964c) Change-Id: I68e1f0a3734f56db66e5fee3571597b5eb17eef8 Reviewed-on: http://gerrit.openafs.org/7951 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3127ec4e693d2a3efaf2bba7a000cac69c624452 Author: Andrew Deason Date: Thu Dec 22 15:01:52 2011 -0500 afs: Indicate error from afs_osi_Read/Write better Currently afs_osi_Read and afs_osi_Write just return -1 on any I/O error, even though they know the error code given from the OS VFS. Just return that code instead so the caller can see what the error was; but negate it, so it's clear that it is an error. Reviewed-on: http://gerrit.openafs.org/6412 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b5ca12ac4696c4049be14974f1e946bb55e1c440) Change-Id: Ib5a674af7e0424691887b20d24782a6740d11414 Reviewed-on: http://gerrit.openafs.org/7938 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6a48d79247cc259e3dbdddfd52e5afb4f6a54ac0 Author: Andrew Deason Date: Thu Dec 22 14:50:09 2011 -0500 afs: afs_osi_Read/Write returns negative on error afs_osi_Read and afs_osi_Write need to return negative values on error. EIO is not negative; return -EIO so we don't accidentally return "success" if someone requested to read or write EIO bytes. Reviewed-on: http://gerrit.openafs.org/6411 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 456ee898ae77b201275363f4efc0098c28e195d5) Change-Id: Idd2e6b85d27a914cac0169a6e8fdee49ff262dc0 Reviewed-on: http://gerrit.openafs.org/7937 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f0805fb4da722758a7e7102aeab61f48d27b420 Author: Andrew Deason Date: Mon Apr 9 17:16:42 2012 -0500 vos: Do not try to remove backup volume id 0 Currently we always try to delete a BK volume if we're deleting the RW. If the BK volume id is 0, this is never going to do anything, so don't try to delete it. Reviewed-on: http://gerrit.openafs.org/7140 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 46bdb318c45b4e93a5b297e6fdee2b2acbed4b55) Change-Id: I6d5406d6e39513d3f38e7674fa726b627ca5f1f0 Reviewed-on: http://gerrit.openafs.org/7935 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0910046da6c0f08768d3d7cb983ce843572498d2 Author: Andrew Deason Date: Thu Jul 26 16:40:03 2012 -0500 LINUX: Hold GLOCK for proc traversal The functions that traverse unixuser structures for display via /proc (uu_start et al) call various libafs functions hold and release locks, etc. To do any of that, we need GLOCK. Amongst other issues, we can panic if we try to acquire a contested lock without GLOCK, since we assert glock is held when we sleep for the lock or try to wake other waiters. The same goes for the legacy CellServDB proc file. So, hold and release GLOCK as appropriate. Reviewed-on: http://gerrit.openafs.org/7885 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 5237d3d232f22aaf4f67f3a8727a293f4058a7ae) Change-Id: I5895b4bde32b8efa27abc83cc6b9dab7458d5c75 Reviewed-on: http://gerrit.openafs.org/7914 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 5b497f6bb4dba37f4768b1eae3abbe71e67b4d40 Author: Andrew Deason Date: Thu Jul 26 15:58:45 2012 -0500 LINUX: Fix osi_proc.c formatting osi_proc.c had a few formatting issues: - Several function definitions did not have the function name at the beginning of the line - A few preprocessor directives were not indented - A few areas used a tab character for each indentation level, as opposed to 4 spaces, then 1 tab, as the rest of the tree has - Struct definitions were aligned using tabs, not spaces, causing misalignments when the indentation was fixed Fix these. Reviewed-on: http://gerrit.openafs.org/7884 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 23f2f1232b03ed02f87582c12b4c4e8474bc9b5d) Change-Id: I0c1a595ae0599f522ee3681d33f7b82290778b7f Reviewed-on: http://gerrit.openafs.org/7913 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 90be7b32fd3a18db5fe9c10782500ff50e936236 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: I2880b5a0caf283324290ffd8f9c25194551e58cd Reviewed-on: http://gerrit.openafs.org/7589 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa649b4cbd8750fbb7fa5bb5ffd44fc79c77e40c Author: Andrew Deason Date: Thu Jun 28 18:56:47 2012 -0500 doc: Add fs bypassthreshold man page FIXES 130050 Change-Id: I0ffc7b93ed9dd93765a25efd60fe3430a86366cf Reviewed-on: http://gerrit.openafs.org/7602 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 828ef9c39a14af265796755718c10b63513f952c) Reviewed-on: http://gerrit.openafs.org/7735 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 26de4de491c19e3d855f53cfca08eb28d9a7ca50 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: Id3b4952e8d27479f16c950606cacc19c7e52cc02 Reviewed-on: http://gerrit.openafs.org/7593 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0ef80067255d95d6a46b1a711bf0998ea1488de9 Author: Niklas Jonsson Date: Wed Jun 20 10:03:54 2012 -0400 Auth: increase size of DNS resolver answer buffer This patchset increases the size of the res_search() answer buffer from 1024 octets to 4096 octets. This is not a proper long term solution but will permit sites with longer response lists to make use of SRV and AFSDB records. This patchset only impacts UNIX systems. Windows uses the Win32 DNS resolver which dynamically allocates memory based upon the size of the response. FIXES 130936 Reviewed-on: http://gerrit.openafs.org/7575 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3c16a2b296722f548309b10e6744639608c0861b) Change-Id: Iac7fc7143ff48bd3eb2d3719902dd4549af25b50 Reviewed-on: http://gerrit.openafs.org/7592 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7133b8a5ee6a2257a065b715e597402de04feff 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: I21a8f2b5df84c49bda6b6fced5088cdeb3127017 Reviewed-on: http://gerrit.openafs.org/7591 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fbda6954ab1c4dabdb2b2677b1d186f9588f2041 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: Ie138f8b6e3070d0bc92adae7dae90a26cbd78001 Reviewed-on: http://gerrit.openafs.org/7590 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8540e8b80836d807091642e431c1b76100a84f3b Author: Derrick Brashear Date: Tue Jun 19 15:54:26 2012 -0400 libafs: put connection always in getcapabilities helper if we get a connection, we need to always put it back. here we exited with error before doing so. 1.6 only fix Change-Id: I67abec863c1d60d557277468a681847263d783a1 Reviewed-on: http://gerrit.openafs.org/7570 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear commit 8f7d44dc0fb50e198c9d58ced89dec3f29959420 Author: Derrick Brashear Date: Tue Jun 19 15:11:38 2012 -0400 libafs: put connection in analyze when conn srvr missing we need to putconn in all cases we can in afs_Analyze, but at least one case we didn't. fixed. (cherry picked from commit e2d094595fd76e76e4a5861114202f513d02c2b1) Change-Id: I04e2d0f8b1002b9a6a73b8ff6755157460504da9 Reviewed-on: http://gerrit.openafs.org/7569 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 141432033b205d6de2eac386e8c3e70690325911 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: I762e18e83d4557c8fd4db3601426bcaaa845199a Reviewed-on: http://gerrit.openafs.org/7674 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8612ef45ef29cb76739e2fd14605b2e134a766a7 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: I69f90ca4d764a25720e8625443c0b86751914cca Reviewed-on: http://gerrit.openafs.org/7673 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fee0b7cdca46b4d90c1dd911dc0fdadfa3f774fe 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: Ie29664d105e0f35140fdf3c164da78564f6b5e36 Reviewed-on: http://gerrit.openafs.org/7672 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d7428d0c685238d6584fdf6c3e7b83d008525b7a 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: I7bae4786b6a0cc2115688bd54d1c1128dc0f5df2 Reviewed-on: http://gerrit.openafs.org/7671 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit eeaca85e80b0529af80dea3d8a3df2e1afde918e 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: I58e0fa2ea138a08b45d136abb9fcd43f9f3dc11a Reviewed-on: http://gerrit.openafs.org/7670 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 407e7c90a97143d436ad3a6af6bbfa431c849191 Author: Marc Dionne Date: Sat Jun 2 21:35:53 2012 -0400 Linux 3.5: encode_fh API change The encode_fh export operation now expects two inode arguments instead of a dentry and a "connectable" flag. Use the inode of the dentry we're interested in, and NULL as the parent inode which is the same as passing a 0 flag in the previous API. Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804 Reviewed-on: http://gerrit.openafs.org/7523 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5227148ae17949705487ea673d558ebfe143e635) Reviewed-on: http://gerrit.openafs.org/7579 commit 8de83579f7b374b03068b46f7cb38104f31a966c Author: Marc Dionne Date: Wed Jan 18 11:22:35 2012 -0500 Linux 3.3: use umode_t for mkdir and create inode ops The mkdir and create inode operations have switched to using umode_t instead of int for the file mode. Change-Id: Ib8bbf6eaa6e87d6a9692c45b1a3fe93fcc3eff7a Reviewed-on: http://gerrit.openafs.org/6567 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit beafc7f742ebad021bfcbed73884aecedee4e04b) Reviewed-on: http://gerrit.openafs.org/7577 commit 14d02a1e80868e3c1b96ab771ead2ecca1351a39 Author: Derrick Brashear Date: Tue Jun 12 13:46:46 2012 -0400 aklog: can't assume krb5_524_conv_principal based on convert_creds add probing for krb5_524_conv_principal directly instead of assuming finding a 524 library will find it. current heimdal does not include it. Reviewed-on: http://gerrit.openafs.org/7551 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 6d3390bc16281e6f889bb555abb1182985556287) Change-Id: Icc576d1a711fa771fda393c61a15082ffb94defc Reviewed-on: http://gerrit.openafs.org/7582 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cc63cbbc138f60d6b5964fa859dcd778717b24c2 Author: Marc Dionne Date: Mon May 28 21:43:12 2012 -0400 Linux 3.4: replace end_writeback with clear_inode end_writeback() is renamed to clear_inode(). Add a configure test and cope. Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e Reviewed-on: http://gerrit.openafs.org/7503 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2b33384a4a7b88842281021129ffccc837d91d36) Reviewed-on: http://gerrit.openafs.org/7578 commit 9bd5c20c21344b4078199b578d40b5f460ccd709 Author: Marc Dionne Date: Wed Jul 13 20:56:53 2011 -0400 Linux: remove unused variable endindex is not used, remove it Change-Id: I50a89e3f25828c05fd24f4fc6a1068007a68dbc2 Reviewed-on: http://gerrit.openafs.org/5012 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit a76e65034cf3feadfe2af5a20ddae705fda00aa0) Reviewed-on: http://gerrit.openafs.org/7580 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 93f9c397a22b6fa4ad0bf5b0c497380732b60165 Author: Andrew Deason Date: Fri May 18 17:40:38 2012 -0400 afs: Do not QueueVCB before osi_dnlc_purge* In afs_FlushVCache, when we QueueVCB, we might drop the afs_xvcache lock (as of 76158df491f47de56d1febe1d1d2d17d316c9a74). The vcache may still be on the DNLC, so a lookup while xvcache is dropped can cause someone else to grab a reference to the vcache while it is being flushed. This can cause panics and failed assertions, since someone will have a reference to the flushed vcache, which is effectively freed and many of the structure fields are no longer valid. So instead, do not call QueueVCB until we have purged the vcache from the DNLC. Reviewed-on: http://gerrit.openafs.org/7430 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0e81db38b549d79a3af5fce0f9f8fa48d9e6efeb) Change-Id: Idabad9076c6c36bede3faf459abb940aae5a975c Reviewed-on: http://gerrit.openafs.org/7502 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8c99f6de5d6a7701f6b2b7cd8ba5b9a808d79946 Author: Andrew Deason Date: Mon May 21 17:11:29 2012 -0500 afsd: Avoid dir interpolation for memcache memcache doesn't make use of fullpn_DCacheFile, fullpn_VolInfoFile, etc. Do not even try to generate these strings for memcache, since cacheBaseDir will be NULL, and so this can cause a segfault on some platforms including Solaris. Reviewed-on: http://gerrit.openafs.org/7442 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2e2bc535bd03df86f78b648f78d2d0a95d273fab) Change-Id: I46f2da9b2f0e5f8d004ebd3d799a3c1ac22c3e95 Reviewed-on: http://gerrit.openafs.org/7501 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b2079ef799f45efe2a59f4d20ef482ebf1d2b584 Author: Andrew Deason Date: Mon May 21 18:01:49 2012 -0500 afsd: Avoid printing cacheBaseDir for memcache cacheBaseDir is NULL when memcache is turned on; don't print it. Reviewed-on: http://gerrit.openafs.org/7443 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9eb924f16c6f3bb06d83ed281317f2ba29473202) Change-Id: Ie5dce3a3ae12b2725c90475cd3f6718f9df63134 Reviewed-on: http://gerrit.openafs.org/7500 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 321dda2d285243a45372a8a6eea59529698f15df Author: Mark Vitale Date: Tue May 8 15:03:46 2012 -0400 vos: volume lock not released on convertROtoRW error If an error occurs during convertROtoRW, the volume lock may not be released. Reviewed-on: http://gerrit.openafs.org/7389 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 33eff6597facc01bbcd5266fb83c8a6bfa40dfa8) Change-Id: I0b87fd3b99f178d99f997032c14673def111c1de Reviewed-on: http://gerrit.openafs.org/7499 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2a72c274119ee787d5ce4027d6b5a7dcd1de6960 Author: Mark Vitale Date: Tue May 8 14:45:16 2012 -0400 vos: convertROtoRW does not respect volume lock vos convertROtoRW was not checking the return code from ubik_VL_SetLock(). Reviewed-on: http://gerrit.openafs.org/7388 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 38ebd79bafee3c97323aa603906d1d5f279ec450) Change-Id: I391c5b0d3d385af08eb2aec245f943081c7b84e3 Reviewed-on: http://gerrit.openafs.org/7498 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f07737a27edacceb2a0e59abe9584df6f6f5e00a Author: Mark Vitale Date: Tue May 8 10:01:12 2012 -0400 vos: convertROtoRW may create two RW volumes If the RW volume is listed after the RO convert target in the VLDB, the code failed to detect that an RW is already present and would create a second RW volume. Reviewed-on: http://gerrit.openafs.org/7385 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9a728fd86c7add13e15dfa0d3062fa94cc77c53f) Change-Id: I7e4eaf0ffefedb3c665e28656a75959eb8677071 Reviewed-on: http://gerrit.openafs.org/7497 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit baaba2a334d3a97b7dd208c141c5d4b820310926 Author: Mark Vitale Date: Tue May 8 12:38:38 2012 -0400 vos: convertROtoRW misc error reporting problems Fixes a few inconsistencies and bugs in some error messages. Reviewed-on: http://gerrit.openafs.org/7387 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot (cherry picked from commit e1c6ad7d580041caf35f698c9b2241fb45f02361) Change-Id: Icee86e1750920d50b94e29acc5504bd1a2ea9e6e Reviewed-on: http://gerrit.openafs.org/7496 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 986a31722e5b6f3386392b97148abb9b075bcad2 Author: Derrick Brashear Date: Wed Apr 18 11:57:10 2012 -0400 macos: update AFS prefs pane modify afshelper to just run what it's told instead of offering fixed operations. this avoids having a setuid tool around. in spite of apple's suggestion this is correct, it's actually more dangerous. instead, elevate privilege only to run a small set of commands, then drop. allow unlocking of the prefs pane, but make the menu extra prompt for authentication when needed. deactivate controls in the prefs pane when locked. Reviewed-on: http://gerrit.openafs.org/7196 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0524e0d1915f519a76d62540b695abc16634d4c9) Change-Id: Iba4435829a57e91e45b0beea10a8d6573b62a214 Reviewed-on: http://gerrit.openafs.org/7495 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0efed9d21e9d36f92a0df9a24bd5f3b57185e4c7 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: I03101cec5bfd20555e33f639ce2c08cde873d646 Reviewed-on: http://gerrit.openafs.org/7494 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b6a07c5b10d5b4580c57cc51d3320208f0caa679 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: Ie0daa8631c45eb457c5eb7a1e80a1f70401127d6 Reviewed-on: http://gerrit.openafs.org/7493 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78020ab61e4d2a8753c847ea731a1d31c7200571 Author: Andrew Deason Date: Thu May 3 16:36:03 2012 -0500 vol: Free vol header on attach_volume_header error In attach_volume_header, make sure we free the volume's header if we're returning an error. We take care of the locks and i/o handles in the immediately preceding block, but for an actual error we don't get rid of the header. Do so. Noticed by Tom Keiser. Reviewed-on: http://gerrit.openafs.org/7325 Reviewed-by: Tom Keiser Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ecfd9549fc29cdad8042e830c656caee1363c6cf) Change-Id: I1d49c18f23cd576dfcde114238ea2b41e1356039 Reviewed-on: http://gerrit.openafs.org/7492 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 29102b48c1c7224be8479f23605706e6fb3df65a Author: Andrew Deason Date: Wed May 2 12:07:49 2012 -0500 vol: Pay attention to specialStatus after VAVByVp attach2/VAttachVolumeByVp_r do not alter the yielded error code according to specialStatus. So, pay attention to specialStatus after receiving an error from VAttachVolumeByVp_r, to ensure we respond with the correct error code. Reviewed-on: http://gerrit.openafs.org/7303 Reviewed-by: Tom Keiser Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a81f9237bfa7b2e3a0567a930f3c49234b9a4376) Change-Id: I1d0cb429b9cd875fa43a3af2e8c5d5d96ee12f85 Reviewed-on: http://gerrit.openafs.org/7491 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a45a0eafb1b8e4a92318eaa7a89b645a2af03073 Author: Andrew Deason Date: Wed May 2 11:38:57 2012 -0500 vol: Avoid VBUSY/VRESTARTING trick for offline vop Currently, if GetVolume() finds that the volume we're trying to attach has a vol op that leaves the volume offline, we do the VBUSY/VRESTARTING trick as described in CheckVnode(). This doesn't make any sense for a couple of reasons. For one, VBUSY/VRESTARTING is not the correct error code to return to the client when an offline vol op is in progress and vp->specialStatus is not set everywhere else we yield VOFFLINE. Additionally, this block of code is only hit once for a particular vol op. Once we reach this section, the volume is in UNATTACHED state, and so on the next iteration of GetVolume we will immediately return VOFFLINE (or specialStatus). So the CheckVnode-like situation is not applicable, since we are not returning VBUSY to the same client for 15 minutes; we would return VBUSY once and then return VOFFLINE. Reviewed-on: http://gerrit.openafs.org/7302 Reviewed-by: Tom Keiser Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 21ed79aeaee2d3b2b47436db0491943829ac44a6) Change-Id: I183db2d337c999e9aafd1eba60a80eb5b84264c7 Reviewed-on: http://gerrit.openafs.org/7490 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 596ed7d29dd24e51c45ffef19dc2d05a45c2f29b Author: Andrew Deason Date: Thu May 3 12:40:40 2012 -0500 vos setaddrs: notice unexpected errors Currently 'vos setaddrs' only prints a message and errors out if the VL_RegisterAddrs call fails with certain error codes (VL_MULTIPADDR and RXGEN_OPCODE). But if we get something else like an access error, we should of course print that out, instead of reporting success. Reviewed-on: http://gerrit.openafs.org/7322 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear (cherry picked from commit 663185d62df501fb9d7a18e6ef329e4f53aa8854) Change-Id: I86b8729cd091007b84fb8b7bf19c58d477626686 Reviewed-on: http://gerrit.openafs.org/7489 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fe588efd2df9adb6d393f223a4359cdc46a16185 Author: Andrew Deason Date: Fri Apr 27 12:59:25 2012 -0500 vol: A GOING_OFFLINE volume should yield VOFFLINE Currently, GetVolume treats a volume in the VOL_STATE_GOING_OFFLINE state the same as VOL_STATE_SHUTTING_DOWN, and so returns VNOVOL for a GOING_OFFLINE volume, but these states are very different. GOING_OFFLINE indicates that a volume should soon be in the UNATTACHED state, so we should treat GOING_OFFLINE the same as UNATTACHED for returning errors to the user. For UNATTACHED, we return specialStatus if it's set, or VOFFLINE otherwise; so, just do the same for GOING_OFFLINE. Reviewed-on: http://gerrit.openafs.org/7290 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d10f71d44fddd7ea6e37481cffd7ee1be2a93217) Change-Id: I1f75992da7732596c78041e9eac3b1e3a12082e8 Reviewed-on: http://gerrit.openafs.org/7488 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bb6347a7a5b6ce04438a1d8ede56073a66982690 Author: Derrick Brashear Date: Thu Apr 26 09:24:25 2012 -0400 libafs: don't crash on no addresses in afs_Conn we try to avoid a crash on a missing serverHost; do the same on missing addrs in that host FIXES 130714 Reviewed-on: http://gerrit.openafs.org/7287 Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 868378cc00b9ac7016da3dc457abf3fa2016687c) Change-Id: If8f616002cc67cb865549b8b9ea83a6bd1f9256f Reviewed-on: http://gerrit.openafs.org/7487 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3bbd8eacf421c758b112e02d8fb24ac0419b9331 Author: Derrick Brashear Date: Sun Apr 22 22:45:09 2012 -0400 macos: remove mistyped vnode warning newborn vnodes are corrected if needed; don't worry about it. Reviewed-on: http://gerrit.openafs.org/7270 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit be1f110f3efb41a72278c7abc8a22cbfcfa8d0e3) Change-Id: I82485f348afe9adbd0dc5743a4f15f18b7e04420 Reviewed-on: http://gerrit.openafs.org/7486 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99b15c9379fb6faaefc4f5bc480adf7917f9b1e0 Author: Derrick Brashear Date: Wed Apr 18 11:58:52 2012 -0400 libafs: stop bkg first because background daemons can have dependence on other subsystems, but are not needed for other operations, stop them first. Reviewed-on: http://gerrit.openafs.org/7246 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit e3c93b87b7fa751e9cf4c1356d606b7bb399b06c) Change-Id: I258519a2ad85af53784cf4db381a7f4a8b429dc8 Reviewed-on: http://gerrit.openafs.org/7485 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cfb91f59d72fa8fc22795ed20f9ef2a2e2f5f0fa Author: Derrick Brashear Date: Wed Apr 18 11:58:03 2012 -0400 macos: lock module against unload during shutdown during shutdown, once umount finished, it was possible to unload the module before shutdown completed. fix that. Reviewed-on: http://gerrit.openafs.org/7245 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a08f9baa7620a6643f12f0b847c2bbab41a0b255) Change-Id: I6467b9ead03262a6ec8b0de673d2eeb664df1aef Reviewed-on: http://gerrit.openafs.org/7484 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbf46115ea330c1fcb98f81dc9cd89bab642f0d5 Author: Derrick Brashear Date: Tue Feb 14 21:58:09 2012 -0500 libafs: dont handle outstatus on write error if a write errored, we can't trust the OutStatus we got. don't. Reviewed-on: http://gerrit.openafs.org/6714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 4c8a3cd789a8495d0c0b3f8ff1a7ebb2a20f5336) Change-Id: I69b26330aca2e5fd0d2092b579a0fcf1514acb53 Reviewed-on: http://gerrit.openafs.org/7483 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1219b7617ecfe1d9eb0d7ec22f8e2e714732c51d Author: Derrick Brashear Date: Wed Dec 1 15:22:30 2010 -0500 refactor afs_CheckServers basically, we need the ability to reuse this function, so, let's make it work differently so we can. Reviewed-on: http://gerrit.openafs.org/3403 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8d8a2240a57f9f4a11ee45b60c229d3f8447b86) Change-Id: I2ad9de15cc5471810abfecf0cbc504da7da624b0 Reviewed-on: http://gerrit.openafs.org/6341 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4aec9b18500f0749cac16463ef8a3ce18a61cb81 Author: Edward Z. Yang Date: Sun Nov 20 15:48:33 2011 -0500 Add OpenAFS to the dependencies of remote-fs. Signed-off-by: Edward Z. Yang Reviewed-on: http://gerrit.openafs.org/6093 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3328770612b7205abb92df5b5f4737eb3349c910) Change-Id: I16b7b0ac6e68bf91c48652faab339871f18549a5 Reviewed-on: http://gerrit.openafs.org/7449 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d88edd8dbd54baf3860787eae164167c5f8b8d29 Author: Michael Meffie Date: Fri Sep 30 12:22:27 2011 -0400 bozo: preserve all options over restart On unix, save all the bosserver command-line options and reuse them on bosserver restarts. On Windows, the SCM integrator saves the argument list, just use them. Reviewed-on: http://gerrit.openafs.org/5532 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit db472e730e3989dac1d49b54d7371b54b24cd63c) Change-Id: Ic6a8534f84f31f94e69c18fd970ecd368f7ee39e Reviewed-on: http://gerrit.openafs.org/7395 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a8eb0bfd04c4bc60cc37528b15f5a1e4cbe39b36 Author: Andrew Deason Date: Thu Apr 5 17:55:17 2012 -0500 viced: Do not offline volume on successful IH_DEC If we fail to CoW a file due to ENOSPC, we try to IH_DEC the new file copy, and if IH_DEC fails, we take the volume offline for salvaging. But IH_DEC returns 0 on success, not on error. So take the salvaging path when we get non-zero. Reviewed-on: http://gerrit.openafs.org/7054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 613f14727fbb404fb7fc1cac953dda46b671222e) Change-Id: I207ffc4db59bdbd8b80fa4ffad9210d13d76b68f Reviewed-on: http://gerrit.openafs.org/7394 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60d000794d7f00453817a34af4eac0b8b9f780a8 Author: Andrew Deason Date: Mon May 7 15:49:34 2012 -0500 fs: Report default storebehind when errors exist After 904c9fbe, we no longer print out the default store asynchrony when any of the supplied paths results in a pioctl error. However, if just one (or a few) of the paths supplied results in an error (such as, the path does not exist), this does not prevent us from reporting the default value. Instead, keep track of whether or not we have a valid value, and try to determine the default if we haven't already by the end of StoreBehindCmd, and print it out. Reviewed-on: http://gerrit.openafs.org/7376 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 427f53eea7f9c05e7b1913c91d57777d72bc30b2) Change-Id: I04bebe60fbb275ca44caeed9b8696283c4ded36b Reviewed-on: http://gerrit.openafs.org/7384 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b9c03fa6f8e696c64c90949cce34bb075aa2ae6f Author: Andrew Deason Date: Wed Jun 22 14:39:39 2011 -0500 afs: Use cell for md5 inode numbers When calculating the inode number for a file with md5 inodes, include the cell number in the calculation, in order to reduce collisions between cells. Reviewed-on: http://gerrit.openafs.org/4902 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 42943aead4db2bdf9b8ec01c3917eb1c9ac9eb76) Change-Id: I5cf88ecd30a5813697dbf3b86964d53bb1f3915a Reviewed-on: http://gerrit.openafs.org/7277 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7ea7af6573cd03859b357387a3ee666e2a6ded5 Author: Andrew Deason Date: Wed Jun 22 13:44:38 2011 -0500 afs: Ensure afs_calc_inum yields nonzero ino afs_calc_inum can currently yield an inode of 0 if MD5-based inode numbers are turned on. Some userspace applications (and for some platforms, maybe even the kernel) make certain assumptions about the inode number for a file; in particular for example, 'ls' will not display a file with inode 0 in a normal directory listing. So, read the md5 digest until we get a non-zero result. Fall back to the non-md5 calculation if we still somehow end up with a 0. While this case may at first glance seem to be extremely rare, in practice it can occur, as the current calculation for volume 538313506, vnode 26178 does actually yield a 0. Reviewed-on: http://gerrit.openafs.org/4901 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 39083fe1edab784fcd75eacbdaaf7f6affa14c9f) Change-Id: I3d06a4b5dc76934b24ced883b1985bced35c893a Reviewed-on: http://gerrit.openafs.org/7276 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 07bc098589573927d9f085773c8b06d39c8f8389 Author: Andrew Deason Date: Mon Apr 2 16:16:37 2012 -0500 SOLARIS: Correct misplaced osi_machdep.h #endif Commit 64778fd7bece52360482f9a51f19b34dac1d2678 removed some '#ifdef KERNEL' blocks, but for one block in SOLARIS/osi_machdep.h, the wrong trailing #endif was removed. This effectively makes the last part of the file Solaris 10+ only, and bypasses the header guard. On systems before Solaris 10, this causes us to lose the osi_procname definition, which eventually shows up as an undefined symbol. So, reinstate the original #endif, and remove the correct #endif instead. Reviewed-on: http://gerrit.openafs.org/7042 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a66268f69a2da0dc21957338eebe5c91b279ddda) Change-Id: I0edd54c9984c591d56531e4eb210e8374ed8b608 Reviewed-on: http://gerrit.openafs.org/7045 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit a64864529d1fca2b5a3f4d21ec598982be335368 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. Change-Id: I3834141fce2d54ce8bdfac3dc566074583bb305e Reviewed-on: http://gerrit.openafs.org/7022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3) Reviewed-on: http://gerrit.openafs.org/7023 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c78b25ff5aab3acf159c9dcea6e8b811a9acdbc4 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: I86004a463b118493828c5296b684a019085e59fd Reviewed-on: http://gerrit.openafs.org/6974 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ad5650638291b4141833a2b01f3ed805fa1c9c60 Author: Derrick Brashear Date: Tue Mar 27 12:09:38 2012 -0400 macos: iterate mdfound packagemakers when spaces are present even if we get more than one match, and even if there's a space, work anyway Reviewed-on: http://gerrit.openafs.org/6971 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 745e1bb00350ac481cd0998b1623b6e040fc7312) Change-Id: Ibd4ca5cbd5cee45793735cede8cf488a944add3c Reviewed-on: http://gerrit.openafs.org/6972 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 06dd16f7611ff0863a15dd93af1715d8c8d91c74 Author: Derrick Brashear Date: Mon Mar 26 20:33:26 2012 -0400 macos: find packagemaker instead of assuming path in xcode 4.3, packagemaker is unbundled. make no assumptions about where it can be found; instead, let spotlight tell us Reviewed-on: http://gerrit.openafs.org/6966 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fba35ba4e1d933126c788824f464a78ca1c93bf8) Change-Id: I5d4083fa743ef181d680ffc2934a56d8429a75dc Reviewed-on: http://gerrit.openafs.org/6968 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a742a6d979f43c6c43bccc3c0c9079503956d146 Author: Derrick Brashear Date: Thu Mar 15 11:51:39 2012 -0400 osx: deal with more kerberos damage the number of things which can return success without succeeding is truly sad. Reviewed-on: http://gerrit.openafs.org/6911 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 59b57ff85acbef10bcec9724c42e3bad78538687) Change-Id: I487ece6f991157a95e200f7764027902a2402e7b Reviewed-on: http://gerrit.openafs.org/6965 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d20dd4ddd95a850c0b920b61083f17ba4280595 Author: Andrew Deason Date: Fri Mar 2 14:55:04 2012 -0600 viced: Do not ignore all InlineBulkStatus errors InlineBulkStatus currently returns 0 unconditionally, no matter what errors are encountered. If we encounter an error early enough, from CallPreamble for example, we do not fill in the OutStats nor CallBacks structures at all. Since we return success anyway, this results in the client getting AFSFetchStatus structures full of zeroes (or garbage, before commit 726e1e13ff93e2cc1ac21964dc8d906869e64406). Since current OpenAFS clients do not perform any sanity checks on the information received, this can result in cache corruption of files being seen incorrectly as empty, and, before commit 726e1e, more arbitrary corruption. So instead, return an error if we encounter an error before we iterate over the given FIDs. We still of course do not return an error for any errors encountered during the actual metadata retrieval, as those are reflected in the individual per-fid status structures. Reviewed-on: http://gerrit.openafs.org/6871 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 690a4c144b53fd1f3538d83017ecf581a2bcded5) Change-Id: I364b35cfa865d88ab664e45a5d1fc9c542cffc1a Reviewed-on: http://gerrit.openafs.org/6957 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c381d4b1511a187ce8da9429d79dda4b1869eff6 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: I33fd24db250ef03a60f7f24853715e6f76d297a8 Reviewed-on: http://gerrit.openafs.org/6952 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 97f8a000b9220606f5ebc420710aea33dca444da 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: I2baf441144d24411907760175cc7fa665dc33e41 Reviewed-on: http://gerrit.openafs.org/6940 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d356da74cfbe89a5552ae3c232e422ba4328c76a Author: Marc Dionne Date: Wed Mar 21 22:19:04 2012 -0400 Linux 3.4: Switch to d_make_root If d_make_root is available, use it instead of d_alloc_root. The helper was introduced in 3.3, and d_alloc_root gets removed in 3.4. Reviewed-on: http://gerrit.openafs.org/6931 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f246aa5f84a5233b6525ae43456a8da5b7e92984) Change-Id: I036a3845d72f99c8ba647975593da496c12a53c1 Reviewed-on: http://gerrit.openafs.org/6932 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 55eceee5dbee51eb82b8988ea187fde16b910e82 Author: Andrew Deason Date: Wed Feb 22 15:40:20 2012 -0600 LINUX: Use afs_convert_code in afs_notify_change afs_notify_change currently just returns "-code". This can cause a panic if the error code is negative, since we will return a positive error code, which may get interpreted as a valid pointer value in higher levels. Specifically, if we hit afs_notify_change via something like this code path: do_sys_open -> do_filp_open -> open_namei -> may_open -> do_truncate -> notify_change -> afs_notify_change (via inode->i_op->setattr) the positive error value will be interpreted by do_sys_open as a valid 'struct file' pointer, and will be dereferenced. So pass the return value through afs_convert_code, like all of the other vnode ops, so we ensure we return an error properly. Reviewed-on: http://gerrit.openafs.org/6776 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 634c6f184b17e30ade86c0a838ab55ddddc730d6) Change-Id: I5083f6ce4bea5b3bea551e5d47155453b7ff2328 Reviewed-on: http://gerrit.openafs.org/6918 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit b44bb369dedd979b22d3cdbcc49208620c17daaf Author: Andrew Deason Date: Wed Feb 22 15:36:37 2012 -0600 LINUX: move afs_notify_change to osi_vnodeops.c afs_notify_change is almost always used solely in inode_operations structs, and is more similar to the other per-vnode functions. Put it with the other per-vnode functions for better organization, and so they can use the same static functions. Move the helper functions iattr2vattr and vattr2inode along with it. Reviewed-on: http://gerrit.openafs.org/6775 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 620d4169b73088579e691aec2cfdafc7f44e2fee) Change-Id: If721c0b13518f8a925f39bcfa1dff005ce97a6cb Reviewed-on: http://gerrit.openafs.org/6917 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1f00da1a68e362ae1b308cc3332bc0b859c01fd7 Author: Andrew Deason Date: Wed Mar 7 16:36:57 2012 -0600 afs: Never #define away afsd_dynamic_vcaches Some versions of the Solaris Studio compiler on SPARC (at least 12.2 and possibly others, but not 12.3) get a little confused by code like this: extern int foo; int somefunc(void) { if (0) return foo; return 0; } When optimization is turned off, this results in an undefined symbol reference to 'foo' (which is normal), but the resulting object file lacks a relocation entry for the symbol 'foo', so the symbol remains undefined after linking. In the OpenAFS tree, this occurs in afs_daemons.c which references afs_vcount and afs_cacheStats in this manner due to afsd_dynamic_vcaches being defined as '0' on Solaris. The end result is that the libafs kernel module is not loadable, since it complains about afs_vcount and afs_cacheStats being undefined, even though the symbol definitions are also in the module. While this is a bug in Solaris Studio and has since been fixed, it is simple to work around this so we are usable with more compilers. If we just always declare afsd_dynamic_vcaches as a regular variable, it works around this issue and keeps the code a tiny bit simpler. So, do that. Reviewed-on: http://gerrit.openafs.org/6888 Tested-by: Michael Meffie Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit e5821239cde138f74f73bec1bd9a3880d08ac3df) Change-Id: I42073ebc7d6822f05de89f1c38370dd70e5c7508 Reviewed-on: http://gerrit.openafs.org/6910 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 81375aa2e48bbf437ab258fe76a326a4700bd095 Author: Simon Wilkinson Date: Wed Mar 14 10:56:06 2012 -0400 rx: hold call->lock across RXS_PreparePacket RX Security Classes have a right to assume that when RXS_PreparePacket is called that they have exclusive access to the rx_call structure. Commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 unintentionally failed to acquire the call->lock prior to RXS_PreparePacket being called. Reviewed-on: http://gerrit.openafs.org/6904 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fdcf171a8d2b2153648b6b799096e09eb469beb) Change-Id: I184a3c71418eb78742fbf1bf609daca1aea57f26 Reviewed-on: http://gerrit.openafs.org/6909 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4ea64ceb0b1e45820646a7d310f1172d230bd4bf Author: Jonathan Billings Date: Thu Mar 8 09:23:40 2012 -0500 redhat: Don't replace modified configuration files during rpm update The previous setting for three %config files mentioned in the spec file: %config /etc/sysconfig/openafs %config %{_prefix}/vice/etc/ThisCell %config %{_prefix}/vice/etc/cacheinfo When using an unadorned %config, it's possible that these files will be replaced by the packaged version during a package update. Changing %config to %config(noreplace) means that the packaged file will be installed with the extension .rpmnew if there is already a modified (from the existing package's version) file with the same name on the installed machine. The concern here is that updating an existing system could potentially change the configuration if the person installing doesn't pay close attention. The Rule of Least Surprise indicates that we should try to preserve existing configuration changes whenever possible. Change-Id: Ie132c12a3c5defe9bf6fec9ec0f8bd08f3d98646 Reviewed-on: http://gerrit.openafs.org/6887 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6889 Tested-by: BuildBot commit f73c1a028e1c900af6777d7dad71115851d560f8 Author: Jens Wegener Date: Tue Mar 6 07:28:32 2012 -0600 viced: fix inverted lockCount assignment FIXES 130605 Reviewed-on: http://gerrit.openafs.org/6884 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7dce85e4e5db7420c5c359fdd02a8005a12fb29c) Change-Id: I518c753e04d0e23ef2da39b0773b5c12c2833551 Reviewed-on: http://gerrit.openafs.org/6891 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 90c36a504d292e1c3835362ee90285f60e16894d Author: Jeffrey Altman Date: Sun Mar 4 16:18:22 2012 -0500 Windows: 1.6.1pre4 change log Change-Id: Ie00cd79a113a3729b0318da1856962fc613a2259 Reviewed-on: http://gerrit.openafs.org/6872 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f1c3eb41e31c483d9adf9adb4276a582ccb46b35 Author: Derrick Brashear Date: Sun Mar 4 09:48:07 2012 -0500 macos: don't crash on krb5 damage if we get success but still no client, don't crash Reviewed-on: http://gerrit.openafs.org/6868 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0a3f0608fcf6c14b44484cfa6fe106c568aa1035) Change-Id: I6c3147ab45552d9f393a05de21cc06d2dcabcf38 Reviewed-on: http://gerrit.openafs.org/6870 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 08028745bc88c4a5c55776419342e877a276ae46 Author: Dave Botsch Date: Thu Mar 1 12:43:36 2012 -0500 Fixes dkms.conf for Redhat Enterprise commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e , while fixing dkms.conf for Fedora, broke dkms.conf for RHEL. In RHEL, you get a dkms.conf with too many backslashes in the "mv" line. The dkms.conf should have the mv line reading: mv src/libafs/MODLOAD-*/\$KMODNAME \$DSTKMOD" for Fedora. This change checks if we are building on Fedora, and if so, maintains the extra backslashes. Otherwise, not. modified: src/packaging/RedHat/openafs.spec.in Uses the dist tags as specified at http://fedoraproject.org/wiki/Packaging:DistTag Reviewed-on: http://gerrit.openafs.org/6851 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81a9a33e0bc5455841ba105dab52735c64c7096b) Change-Id: I7b1e09700d9b17e6616be71ab9dd8bc0a760996d Reviewed-on: http://gerrit.openafs.org/6862 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f6d061ac6e19504fe8bccd9bcc720c0479999c3 Author: Jeffrey Altman Date: Thu Mar 1 15:49:12 2012 -0500 unix: always retry RX_CALL_BUSY RX_CALL_BUSY is an indication that the call channel is busy not that the server is down or otherwise cannot respond. Unconditionally retry the RPC and do not alter state. We just want to force the use of a different call channel. Reviewed-on: http://gerrit.openafs.org/6852 Tested-by: BuildBot Reviewed-by: Hartmut Reuter Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 579976cf246bd55dea2dfd3bf8470fd8bb8bde0a) Change-Id: I1ab5ed69dc707f13620d91a01227679c47bb97df Reviewed-on: http://gerrit.openafs.org/6853 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 572b2782e0d61670b4d95ac1ff6d3c0e1466febb 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: Iae19a76dfbcb95c5e3cdea046a97f26feba86b33 Reviewed-on: http://gerrit.openafs.org/6848 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c533e10d2bb5d6f22ee54e2c43af06f13db037d1 Author: Jeffrey Altman Date: Sun Feb 26 14:45:43 2012 -0500 Windows: disable Adv ICF support if not supported OpenAFS 1.6.x does not require the use of SDK 6.0 or above. Therefore the Advanced Internet Connection Firewall support may not be available. In particular, the 32-bit distribution for 1.6.x does not rely on SDK 6.0 or higher. This is a 1.6.x only change. Change-Id: I8ab5bbf4c5d6e4893d5389c04ec020114a3d5683 Reviewed-on: http://gerrit.openafs.org/6841 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72df2820f0957dfae55685802c5ffcf08d0f3ca3 Author: Jeffrey Altman Date: Sun Feb 26 10:52:53 2012 -0500 Windows: ChangeLog for 1.6.1pre3 Change-Id: Ie2264743a69f330718c3ddedfd5dd93b43294a8c Reviewed-on: http://gerrit.openafs.org/6838 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7bcd00051aead840f4d85a21f0ef36b6b9819d0 Author: Jeffrey Altman Date: Tue Jan 17 19:46:30 2012 -0500 Windows: failover and retry for VBUSY When a file server returns the VBUSY error for an RPC the cache manager records the 'srv_busy' state in the cm_serverRef_t structure binding that file server to the active cm_volume_t object. The 'srv_busy' was never cleared which prevents the volume from being accessed. Clear the 'srv_busy' flag whenever cm_Analyze() receives a CM_ERROR_ALLBUSY error which means that all replicas have been tried or whenever the error is not VBUSY or VRESTARTING. FIXES 130537 Reviewed-on: http://gerrit.openafs.org/6563 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9056d09887c84a480e0a9ee3457a9469fbb97064) Change-Id: Ifd8204a3bba83a893188e96f85b1ad3ba078fe49 Reviewed-on: http://gerrit.openafs.org/6831 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 68dc637db6d99a48d7be0556916a8cc084843286 Author: Jeffrey Altman Date: Fri Nov 25 09:28:18 2011 -0500 Windows: improved idle dead time handling RX_CALL_IDLE has been treated the same as RX_CALL_DEAD which is a fatal error that results in the server being marked down. This is not the appropriate behavior for an idle dead timeout error which should not result in servers being marked down. Idle dead timeouts are locally generated and are an indication that the server: a. is severely overloaded and cannot process all incoming requests in a timely fashion. b. has a partition whose underlying disk (or iSCSI, etc) is failing and all I/O requests on that device are blocking. c. has a large number of threads blocking on a single vnode and cannot process requests for other vnodes as a result. d. is malicious. RX_CALL_IDLE is distinct from RX_DEAD_CALL in that idle dead timeout handling should permit failover to replicas when they exist in a timely fashion but in the non-replica case should not be triggered until the hard dead timeout. If the request cannot be retried, it should fail with an I/O error. The client should not retry a request to the same server as a result of an idle dead timeout. In addition, RX_CALL_IDLE indicates that the client has abandoned the call but the server has not. Therefore, the client cannot determine whether or not the RPC will eventually succeed and it must discard any status information it has about the object of the RPC if the RPC could have altered the object state upon success. This patchset splits the RX_CALL_DEAD processing in cm_Analyze() to clarify that only RX_CALL_DEAD errors result in the server being marked down. Since Rx idle dead timeout processing is per connection and idle dead timeouts must differ depending upon whether or not replica sites exist, cm_ConnBy*() are extended to select a connection based upon whether or not replica sites exist. A separate connection object is used for RPCs to replicated objects as compared to RPCs to non-replicated objects (volumes or vldb). For non-replica connections the idle dead timeout is set to the hard dead timeout. For replica connections the idle dead timeout is set to the configured idle dead timeout. Idle dead timeout events and whether or not a retry was triggered are logged to the Windows Event Log. cm_Analyze() is given a new 'storeOp' parameter which is non-zero when the execute RPC could modify the data on the file server. Reviewed-on: http://gerrit.openafs.org/6118 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit f768fb95f3eb3815d6225e074c43341ed2ad5347) Change-Id: If7194292be0fc2350af9f26c397bd3a1e840abdc Reviewed-on: http://gerrit.openafs.org/6830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 778d922cee9a73c7d829b87aacec2513433c6a23 Author: Jeffrey Altman Date: Fri Feb 24 12:21:46 2012 -0500 Windows: cm_UpdateCell never applies to Freelance mode The Freelance.Local.Cell is updated by the registry monitor thread and cm_UpdateCell should be a no-op. Make it so. Reviewed-on: http://gerrit.openafs.org/6791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cfb7f205d8153899c0165594a29d91926a40425d) Change-Id: I2607ea87ebcc849474f4e0a183d7ad4eba121de9 Reviewed-on: http://gerrit.openafs.org/6829 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6084f4ac95613cd02c3cec71b26be4bd19af85d Author: Jeffrey Altman Date: Fri Feb 3 11:21:45 2012 -0500 Windows: fix cm_DirOpDelBuffer assert In cm_DirOpDelBuffer() the data version field for a buffer in cm_dirOp_t.buffers[] can be CM_BUF_VERSION_BAD if the buffer was added to the buffer list but was never fetched from the file server. If the buffer was recycled by buf_Get() an attempt to remove an entry from the directory will be failed as opposed to fetching the buffer from the file server and performing the local removal. Reviewed-on: http://gerrit.openafs.org/6650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 865f2442e682ff71b28a6b21363de8262f9e2bd1) Change-Id: I4d822d9286ca891fc50cf04fdd68272c0af2e38e Reviewed-on: http://gerrit.openafs.org/6828 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0f1de7e8e21c675e5c9f4f58c524b91930dc319 Author: Jeffrey Altman Date: Fri Feb 3 11:17:40 2012 -0500 Windows: buffer DV ranges do not work for directories In cm_MergeStatus, always set cm_scache_t.bufDataVersionLow to the new data version because the cm_dir package does not support version ranges. All modified dir buffers have their dataVersion field set to the current data version value. Failure to update the bufDataVersionLow field can result in B+ Trees being constructed from out of date directory information. Reviewed-on: http://gerrit.openafs.org/6649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25142a9c2db933607507ee20e20216c635465d6d) Change-Id: I9bdad7bed4ce76e0425adff433982b9bf35ac15f Reviewed-on: http://gerrit.openafs.org/6827 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96c2ebd1e84c396348cc7a6ff2a8cd471d182d14 Author: Jeffrey Altman Date: Sun Jan 22 18:38:49 2012 -0500 Windows: VIOC_GETUNIXMODE = smb_IoctlGetUnixMode VIOC_GETUNIXMODE pioctl should execute smb_IoctlGetUnixMode not smb_IoctlSetUnixMode. Reviewed-on: http://gerrit.openafs.org/6600 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1474b4a739c60f96a8d2e38546778ab9572c138d) Change-Id: I248effacd831849f33fe0fd9785d3c00117a2607 Reviewed-on: http://gerrit.openafs.org/6826 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 01c9004cecce0b45b01aaa1dd1c36ff76eb8368b Author: Jeffrey Altman Date: Sun Jan 22 18:37:14 2012 -0500 Windows: fix fs setcrypt help message Options are on, auth, and off. Reviewed-on: http://gerrit.openafs.org/6599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 898930fc3ca81a5e5dde31967c00cdf5f4734ffa) Change-Id: I6ef9294554eeedc9f6963a92b815e118fff87139 Reviewed-on: http://gerrit.openafs.org/6825 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a42fc8d9a57601cd1a7d1e5ac2abc7d544c0dda Author: Jeffrey Altman Date: Sun Jan 22 18:33:43 2012 -0500 Windows; release BIOD after status merge Releasing the BIOD permits the accumulated buffers to be accessed. Releasing the BIOD before the cm_MergeStatus() call creates a window where the buffer data version is larger than the cm_scache data version. Release the BIOD after the status merge. Reviewed-on: http://gerrit.openafs.org/6598 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 111de76ea8dac713247c99ebe2182ae16cc0a3c0) Change-Id: I7c8dd9f3e22e83b82679b9d3a4ee3aa5f45a49aa Reviewed-on: http://gerrit.openafs.org/6824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25b96acb42b197de32f8d02aeb3526fe0517ebad Author: Jeffrey Altman Date: Thu Jan 19 15:25:44 2012 -0500 Windows: cm_buf refcnt must hold buf_globalLock An assertion in buf_Recycle() was being triggered when a cm_buf_t object was supposed to be in the free buffer list but wasn't. buf_Recycle() was racing with another thread. The test for refCount == 0 was performed while holding the buf_globalLock exclusively but the InterlockedDecrement(refCount) in buf_Release() was performed without holding buf_globalLock at all. buf_globalLOck must be held at least as a read lock. Otherwise, the refCount can reach 0 prior to the thread blocking for exclusive access to the buf_globalLock. This provides buf_Recycle() which is holding buf_globalLock the opportunity to race. The solution is to make sure that buf_Release() always holds buf_globalLock as a read lock and then use buf_ReleaseLocked() to perform the actual decrement and test. Reviewed-on: http://gerrit.openafs.org/6576 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 22cba8e9702f3673c335bf834a9ee2c5e5fd9b6e) Change-Id: I82c6480859a85e00e8602421204dac9a9ce588ed Reviewed-on: http://gerrit.openafs.org/6823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e42640ec102838c8de2185e9247ac504b04aea09 Author: Jeffrey Altman Date: Sat Jan 14 10:31:01 2012 -0500 Windows: restrict service to 2 cpus by default Performance drops off considerably when the number of processors increases due to lock contention and the cm_SyncOp wait processing. If the MaxCPUs registry value is not set, limit ourselves to two. Setting MaxCPUs to zero permits use of all CPUs. Reviewed-on: http://gerrit.openafs.org/6555 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69196e41ec9c5a6ce8efd370fb8582f66667bcf7) Change-Id: I0cf2d2eeb3d8f7c708e7c365520f10fcd5f22d83 Reviewed-on: http://gerrit.openafs.org/6822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 361148b688197f636d034a4e512a2af7796e9e2c Author: Jeffrey Altman Date: Tue Jan 3 21:10:32 2012 -0500 Windows: dir buffers out of date - mark them as such if cm_CheckForSingleDirChange() fails, mark the cm_scache_t bufDataVersionLow as the current data version so that old directory buffers are discarded. Reviewed-on: http://gerrit.openafs.org/6498 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e77b6858ee889ec9e4e3fe3bb62c23b1c1f5727f) Change-Id: I8b149d3655c249fc3ea034d179b919f4370f19a2 Reviewed-on: http://gerrit.openafs.org/6821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e942f4cfa0d5d0e17121dd14e30034d6826425f3 Author: Jeffrey Altman Date: Wed Dec 28 17:07:01 2011 -0500 Windows: replace strdup with xdr_alloc in callback processing The CRT allocator cannot be used for memory that will be freed by afsrpc.dll. Use xdr_alloc() instead. Reviewed-on: http://gerrit.openafs.org/6439 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb) Change-Id: Ie2359b4df312d090f0579ecd6d50ee197b51d68a Reviewed-on: http://gerrit.openafs.org/6820 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 97e5b174b30d0987730bf983c5ba3504aea69aa2 Author: Jeffrey Altman Date: Sat Dec 24 15:16:12 2011 -0500 Windows: kauth search for kerberos iv port first Modify src/kauth/user_nt.c to match the service name search order of the Unix code: kerberos4 kerberos-iv kerberos The standard Windows SERVICES file includes "kerberos-iv" as port 750. FIXES 127907 Reviewed-on: http://gerrit.openafs.org/6430 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2cdd59d8f318193d0ef7937910466531caf1c963) Change-Id: I936c35bbd45395f26ad6c523b72398584d1384f9 Reviewed-on: http://gerrit.openafs.org/6819 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b80435a4619c599856b059df0bda63cf8daf232 Author: Jeffrey Altman Date: Sat Dec 24 03:11:04 2011 -0500 Windows: cm_BufWrite() must wait in cm_SyncOp() Now that it is permissible for more than one store data operation to construct BIOD lists in parallel, cm_BufWrite() must be willing to wait in cm_SyncOp(). Otherwise, the daemon threads will spin. Reviewed-on: http://gerrit.openafs.org/6423 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17ce77f843e01ff96f66e05b4b932b0c6187493e) Change-Id: I8ae9d057413252e73774c5209465223fa5a36947 Reviewed-on: http://gerrit.openafs.org/6818 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 611d5564bd1c378a560c09451aa223af2d3cbf57 Author: Jeffrey Altman Date: Sun Dec 18 12:08:24 2011 -0500 Windows: terminate HOSTS/LMHOSTS with newline If the original file did not terminate with a newline, add one before appending the "AFS" entry. FIXES 130210 Reviewed-on: http://gerrit.openafs.org/6375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d8f9141fa98df50ce682364ef5a7958ce422613) Change-Id: I1a95a42b420b4695b52ae0c2e2de46cd97a5294a Reviewed-on: http://gerrit.openafs.org/6817 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c5e47c0809a1c782b08d89028ea372c932e198b Author: Jeffrey Altman Date: Wed Dec 14 12:58:36 2011 -0500 Windows: Update Adv Firewall Rules Do not specify the Service Name property. According to feedback on openafs-info the Service Name blocks the rule from working properly. If the rule already exists, attempt to remove the Service Name filter and update NAT Edge Traversal and Permitted interface rules. Reviewed-on: http://gerrit.openafs.org/6332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d472f94ab1017724e56bcdd29b9ef451a13f182) Change-Id: I8184074adbd4c19426d87d48673402b3c8cd97a3 Reviewed-on: http://gerrit.openafs.org/6816 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 881ba096d2849707c26a7e0bd14d536a79fd5cc1 Author: Jeffrey Altman Date: Sat Dec 10 13:28:17 2011 -0500 Windows: memory leak when setting tokens via smb The SID string of the RPC used to set the token sessionKey was being leaked. Be sure to free it when it is no longer required. Reviewed-on: http://gerrit.openafs.org/6244 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f30d70ba5575753302be0a2b08c27a639898d4aa) Change-Id: I1133b50841919ca5957081c82625c2b1607c34ae Reviewed-on: http://gerrit.openafs.org/6815 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aacc6f18ba5648e2f86276bc8bb88655a37caf4d Author: Jeffrey Altman Date: Sat Dec 3 17:49:47 2011 -0500 Windows: apply Nat Pings only to cm_rootUser connections Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser connections and only apply Nat pings to those connections instead of examining the security state of the connection. Reviewed-on: http://gerrit.openafs.org/6208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01f55bbf14210ef3e4f4c0246409af370de3a383) Change-Id: Id26a955190aace50ca4740b910325474077941e1 Reviewed-on: http://gerrit.openafs.org/6814 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c162907bd09828fe26d84dd9202b81e87d235610 Author: Jeffrey Altman Date: Sat Dec 3 17:46:41 2011 -0500 Windows: track cm_rootUser connections Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose of tracking which connections belong to the cm_rootUser. Reviewed-on: http://gerrit.openafs.org/6207 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75) Change-Id: Ie0014200d9e3ed3832bf875a9788aad1f55f29ec Reviewed-on: http://gerrit.openafs.org/6813 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7193b01dfa750b371de63a4003666773e15a84ae Author: Jeffrey Altman Date: Fri Dec 2 11:19:13 2011 -0500 Windows: fix buf_Recycle() comment buf_Recycle() does not return with a reference count to the cm_buf_t object held. Correct the comment. Reviewed-on: http://gerrit.openafs.org/6173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dccf17840a53e96b21f8c092910f3e4d7628b71) Change-Id: I0890439df967f8b2a87d5079adcd71a646500876 Reviewed-on: http://gerrit.openafs.org/6812 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 13c676b0ab44f4b369d43652c2e509201e5a4a8f Author: Jeffrey Altman Date: Fri Dec 2 11:14:11 2011 -0500 Windows: buf_CleanAsync is not async; rename it buf_CleanAsync() calls cm_BufWrite() which stores the dirty buffers synchronously. There is nothing asynchronous about buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked() to buf_CleanLocked(). Update the comments to remove the references to the asynchronous processing which doesn't exist. That is not to say that the call to buf_Clean() in buf_GetNewLocked() should not be asynchronous; it should. There is no such functionality at the moment. One approach would be to modify buf_IncrSyncer to trigger on an event set by buf_GetNewLocked() instead of the call to buf_Clean(). Another approach would be registering a background store event. In any case, that is for another patchset. Reviewed-on: http://gerrit.openafs.org/6172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c712403f192bd9932f3ec1dce5fb23461d3d0349) Change-Id: Ib8d5bb06b0c4ffa3e53d53e24ca9f970b7cb63b0 Reviewed-on: http://gerrit.openafs.org/6811 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af58b42210a6976c512b746dd59dd63ceb0000e8 Author: Jeffrey Altman Date: Mon Nov 28 18:45:55 2011 -0500 Windows: Wix cell names can be greater than 120 chars Increase the permitted length in the UI to 255 characters. Reviewed-on: http://gerrit.openafs.org/6133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4f9f33dc55150d991d9eec4ea95d78208f6949) Change-Id: Ibf24b85990a054e84724c52e481c19098fe5cbe0 Reviewed-on: http://gerrit.openafs.org/6810 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 256a9f51c024680bc2898d73d72574c63c5cd220 Author: Jeffrey Altman Date: Mon Nov 21 13:14:40 2011 -0500 Windows: cm_GetSCache do not release unheld lock if cm_GetNewSCache() fails, an attempt would be made to release cm_scacheLock which is not held. However, it should be noted that cm_GetNewSCache() cannot fail without itself triggering a panic. Reviewed-on: http://gerrit.openafs.org/6103 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d42db13152fb8fa374db6531020da6effca51ab4) Change-Id: Ibb3aff0a256c6846ac8b9336a50ea021f8a1e2f6 Reviewed-on: http://gerrit.openafs.org/6809 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2866c3f1b941840c54f5d5f05bd85cba9b997f94 Author: Jeffrey Altman Date: Tue Nov 15 18:35:26 2011 -0500 Windows: buf_CleanAsyncLocked dirty range only buf_CleanAsyncLocked() should not instruct cm_BufWrite() to write a full chunk if the current buffer is the only one that is dirty. cm_BufWrite() will determine if it is appropriate to fill a full chunk when storing. Instructing it to check a full chunk forces it to do more work than necessary. Reviewed-on: http://gerrit.openafs.org/6054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd42e08bf1882a02c3200e1c33a101e644aa046a) Change-Id: Ibbd823feb5fe18f0ab0ee54af8c9b8ccb531c8bc Reviewed-on: http://gerrit.openafs.org/6808 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 072397a05ed2115334f57c55460ad0cc68029700 Author: Jeffrey Altman Date: Tue Nov 15 19:00:05 2011 -0500 Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b) Change-Id: I26f7fc9e0c7281ca2118205d7916102c2471bb43 Reviewed-on: http://gerrit.openafs.org/6807 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2c9be3970bbb8ce83904c9db29045ff01942eae2 Author: Jeffrey Altman Date: Sat Nov 12 18:33:18 2011 -0500 Windows: smb_ReceiveNTCreateX create smb_fid earlier smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now requires the smb_fid_t allocated fid value for use in share mode locking. Move the allocation of the smb_fid earlier in the function and apply necessary cleanup in error paths. Reviewed-on: http://gerrit.openafs.org/6004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839) Change-Id: I9399d8f16ee236b4724a0ec825fca1ce72f363ce Reviewed-on: http://gerrit.openafs.org/6806 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78e38ffb2ab56e0f7db732c92087b23842c6e46d Author: Jeffrey Altman Date: Sat Nov 12 13:41:30 2011 -0500 Windows: fix locking hierarchy in service The smb username lock and the daemon global lock can be requested while the scache dirlock is held if there are no free buffers and the service is forced to claw back extents from the redirector. Adjust the locking hierarchy accordingly. Reviewed-on: http://gerrit.openafs.org/6000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f) Change-Id: I74e87494c1360c61812908e3b4fb012829f71cf3 Reviewed-on: http://gerrit.openafs.org/6805 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cdec970530b720feafe3f79c255466bd13d13807 Author: Jeffrey Altman Date: Sat Sep 3 18:17:21 2011 -0400 Windows: log SMB or RDR in use at startup SMB only in 1.6 Reviewed-on: http://gerrit.openafs.org/5338 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b861e17c0bc34ea2042879bc705f5d26a7e0a77f) Change-Id: I67569c2d261a8afbbffbe7777e360139d25c73ca Reviewed-on: http://gerrit.openafs.org/6804 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a9f90d49c5790dbb86a0ebc348288b4f66c8253f Author: Jeffrey Altman Date: Sun Oct 24 00:21:26 2010 -0400 Windows: Add version number to event log start pending message LICENSE MIT Reviewed-on: http://gerrit.openafs.org/3034 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b743b32b8b715edf673833a150f9f3d5a72b0b39) Change-Id: Id7fb16cc9b7d00cb0a880bbdad9dff7bfffff78b Reviewed-on: http://gerrit.openafs.org/6803 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 15f3a7ed4ef9cd47a291cca2ad877d1214c02eaf Author: Jeffrey Altman Date: Sun Aug 28 12:03:53 2011 -0400 Windows: afslogon network provider debug registry value create a new TransarcAFSDaemon\NetworkProvider "Debug" value to be used for activating the network provider debugging. The overlapping use of TransarcAFSDaemon\Parameters "TraceOption" is just too confusing. Permit both methods to be used. Reviewed-on: http://gerrit.openafs.org/5316 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3d4e111dd6c4201476e7447fdfaa27ed630032c5) Change-Id: Ibc8b56d64aa843076b191afa42c4a3e93cf7a26f Reviewed-on: http://gerrit.openafs.org/6802 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91f98123ae7eb1a12b17a0b07d7a2f11066cfbff Author: Jeffrey Altman Date: Fri Aug 26 13:57:15 2011 -0400 Windows: afslogon.dll is not a file system interface Do not return a file system network type that corresponds to a real file system inter since afslogon is in fact not associated with a file system interface. We can't return WNNC_NET_NONE (0) because that prevents NPLogonNotify() from being executed. However, if we return an in use file system value that can confuse the system when the actual file system's network provider is also installed. Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9052974812e33d186613c31e318673f9268467c6) Change-Id: I60bc66440b548c3901914df8193c3999c3388abc Reviewed-on: http://gerrit.openafs.org/6801 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1f5f00810ab9cc48e3bc1a290253373b167f61bf Author: Jeffrey Altman Date: Fri Aug 26 09:36:04 2011 -0400 Windows: torture error reporting When LeaveThread() is called and GetLastError() has already been called, pass the last error value to LeaveThread(). Otherwise, the GetLastError() call in LeaveThread() may return an inaccurrate result. Reviewed-on: http://gerrit.openafs.org/5312 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 209d59a61ba9614a8b9d231d828f74a3e9bdaa27) Change-Id: I8f1b5b6431bad4413e7d81c95835ed852fbba16f Reviewed-on: http://gerrit.openafs.org/6800 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1630cabac0631bc47b21f11eecb376261a02756 Author: Jeffrey Altman Date: Tue Aug 23 16:02:28 2011 -0400 Windows: change buf_Find*() signature to accept cm_fid_t The buf_Find*() functions require a cm_fid_t to match with the cm_buf_t objects not a cm_scache_t. Change the signature so that the cm_scache_t is not required. It should be possible to search for a buffer even if the cm_scache_t is not present in the cache. Reviewed-on: http://gerrit.openafs.org/5304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c23b27a69322f4c9963a532d5cbcb136b23bb20c) Change-Id: Ie4546de582e0ffe9103f1bb01e05cf387265da49 Reviewed-on: http://gerrit.openafs.org/6799 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d3360cbbe6f5538abcac87ad279081aac8046d8a Author: Jeffrey Altman Date: Sun Aug 21 00:37:34 2011 -0400 Windows: do not drop lock unnecessarily do not drop cm_serverLock for a cm_PutServer call since it will only reacquire it. use cm_PutServerNoLock() instead. Reviewed-on: http://gerrit.openafs.org/5302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b804e027f1a9d8dfaad3d348390a83493b53a6c7) Change-Id: Ic9c4f1550636555568e3c67b2bb5f9e772116e9f Reviewed-on: http://gerrit.openafs.org/6798 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 73ce89e84fe31635c02bb20b1abd3e77b4425e97 Author: Jeffrey Altman Date: Sun Aug 21 00:36:44 2011 -0400 Windows: cm_serverLock read required not write Reviewed-on: http://gerrit.openafs.org/5301 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bca64c70467afd00ca02290a4236bc295ec4633c) Change-Id: I9c0c04ce619f2f85ae821621f9468715ba7deefe Reviewed-on: http://gerrit.openafs.org/6797 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3abed6bdbbc08c8362a327fd6ede493a08798cc5 Author: Jeffrey Altman Date: Thu Aug 18 21:57:12 2011 -0400 Windows: be explicit when mapping sharing violation Only one lock acquistion failure should be mapping to CM_ERROR_SHARING_VIOLATION. That is CM_ERROR_LOCK_NOT_GRANTED. Make it clear that is what we are doing. Reviewed-on: http://gerrit.openafs.org/5299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a576ff1e53a539e88b9f3fa6b8132d4f161b0bd4) Change-Id: I558c6989a2a8f4042129e2a60bcd340a7863222c Reviewed-on: http://gerrit.openafs.org/6796 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4078a389959d3aacb805e62edef0891db7e44306 Author: Jeffrey Altman Date: Tue Aug 9 14:26:33 2011 -0400 Windows: avoid duplicate volume update queries If multiple volume update queries have stacked up in cm_UpdateVolumeLocation() and the active query failed, do not re-issued the blocked queries. Instead, prevent new queries for 60 seconds and fail those that blocked during the active query. Reviewed-on: http://gerrit.openafs.org/5296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 21acdd92c8510a9f99243588388a2a1078547533) Change-Id: I7f0bc97ca7c194624ac854558bbed6b93a13ce63 Reviewed-on: http://gerrit.openafs.org/6795 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36120d812be2a86a094135a9c37a460ec67d7035 Author: Jeffrey Altman Date: Thu Aug 4 17:21:59 2011 -0400 Windows: fix condition calls to osi_Log The osi_Log macro is if(foo) osi_AddLog() If osi_Log macros will be conditionally called, the conditonal needs to have bracing. Reviewed-on: http://gerrit.openafs.org/5160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e42d6fd18097d0c8d2e4b455d3c540743d7dbda) Change-Id: Ic8063144a5069736c95a57965a28d6a101749b3e Reviewed-on: http://gerrit.openafs.org/6794 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 344f7fc6087d1ecf0a76be300700b72122d14467 Author: Andrew Deason Date: Thu Feb 23 18:28:21 2012 -0600 Rewrite make_h_tree.pl in shell script The current usage of make_h_tree.pl adds a build requirement of /usr/bin/perl that we did not have prior to commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1. Do the same thing in a bourne shell script instead, so we don't need perl. Note that this is not as generalized as make_h_tree.pl, but it doesn't need to be. Specifically, this does not strip a leading ../ from found include directives (nothing in the tree that includes h/* files uses this), and header filenames containing whitespace almost certainly do not work correctly. The h => sys mapping is also much more hardcoded, but that's all we were using this for anyway. Reviewed-on: http://gerrit.openafs.org/6790 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb03b1380f82a6bdc8a78ad92069da38b4e98c26) Change-Id: If6bfedea0b563dce6135fbf2f4554ee602ee822c Reviewed-on: http://gerrit.openafs.org/6793 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bea2a94610335939d6ef869489ce5bd19d1a11da Author: Andrew Deason Date: Tue Feb 21 15:28:08 2012 -0600 salvager: Do not abort on large volume IDs We have already checked that 'vid' is valid; no need to check if it is negative. Also change vid to be a VolumeId. This is partially cherry-picked from 0884e9d0fddf2be81abf6468209048331efa8a1e. The commit 4d691ae10903e01db4d6b24a4eb02da536cadf7c is comprised of changes from both ce5e263b488f8cb85662031ee08eea448dab2d27 and 0884e9d0fddf2be81abf6468209048331efa8a1e, but it missed a few things from 0884e9d0fddf2be81abf6468209048331efa8a1e. This commit brings in the rest of the changes from 0884e9d0fddf2be81abf6468209048331efa8a1e. Change-Id: I8e001bfe81128b2e2214b3b2fa83e4797374022b Reviewed-on: http://gerrit.openafs.org/6778 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8a0bc72693cf7e735539f10e55b292f59ca0ad6f Author: Derrick Brashear Date: Wed Feb 22 15:57:46 2012 -0500 libafs: retry retriable RPCs instead of abandoning if we get e.g. an idle dead error we should retry retriable actions, namely data stores. in order for writing files to work correctly given how the writeback code is structured it's important that this not interfere with analyze's shouldRetry decision on those RPCs Reviewed-on: http://gerrit.openafs.org/6749 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 75a3dabe66a9fbc232b05e2f744ad5b867e18262) Change-Id: I9c611eeb9a71298e9725268392cdf94074324bf1 Reviewed-on: http://gerrit.openafs.org/6777 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fcdd20e389282607616b23f912a22ff5c352ce70 Author: Derrick Brashear Date: Sun Feb 12 22:45:59 2012 -0500 libafs: ensure one nat ping connection per srvAddr track the natping conn with the srvAddr, ensuring exactly one. Reviewed-on: http://gerrit.openafs.org/6706 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2378895fc66a19a050f302711f2e18dbbf2e3d6f) Change-Id: I5e74ec3f46f9af335653b6910d2c31c788181c5c Reviewed-on: http://gerrit.openafs.org/6772 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 3cc6da964e3705b070f8886686484d6a1eb700c8 Author: Marc Dionne Date: Mon Feb 20 17:56:29 2012 -0500 volser: Remove unused variable tid is now unused - remove it to avoid a warning. Reviewed-on: http://gerrit.openafs.org/6743 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fd19b39b151e3dddd18b4280252ac3e0fdf3964d) Change-Id: Ib402c84689d61baefed3b76138f7fac7c2b36de0 Reviewed-on: http://gerrit.openafs.org/6771 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit a498e1ff26fe01cc0a60474f76ff8fa32e0086ba Author: Andrew Deason Date: Fri Feb 17 17:12:46 2012 -0600 viced: Relax "h_TossStuff_r failed" warnings Currently, h_TossStuff_r bails out and logs a message if we detect that somebody grabbed a reference or locked the host while we tried to h_NBLock_r. The reasoning for this is that it is not legal for anyone to h_Hold_r a host that has HOSTDELETED set (but the error is detectable and recoverable); callers are supposed to check for HOSTDELETED and not hold a host in that case. However, HOSTDELETED may not be set when h_TossStuff_r is called, since we call it if either HOSTDELETED _or_ CLIENTDELETED are set. If CLIENTDELETED is set and HOSTDELETED is not, it's perfectly fine (and necessary) for callers to grab a reference to the host. So, if that's what is going on, don't log a message, since that's normal behavior. Check for HOSTDELETED before we h_NBLock_r, since it is technically possible (and legal) for someone to grab a reference to the host and somehow set HOSTDELETED while we wait for h_NBLock_r to return. Also log the flags when we see this message. Reviewed-on: http://gerrit.openafs.org/6733 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit fe4e52655ce7e5a8e5f6c23cde678fc66c3db490) Change-Id: Ic1b72c808aec158d99f088a3144e86adf969efcc Reviewed-on: http://gerrit.openafs.org/6770 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit d68f9d83429d2195d6b037c03411c855cbbc4695 Author: Andrew Deason Date: Fri Feb 17 16:24:16 2012 -0600 viced: Remove extraneous h_AHTAHT_r in h_GetHost_r We added this address to the host with an addInterfaceAddr_r call just a few lines before, which adds the host to the address hash table. Another call to h_AddHostToAddrHashTable_r is pure overhead and confusing. Reviewed-on: http://gerrit.openafs.org/6729 Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit f52c33ea10de8d1d07a9c4805366283e6ca635dc) Change-Id: Ib97718a42f9997a1fa257533296c62f3d618e1a7 Reviewed-on: http://gerrit.openafs.org/6769 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit dbaaa4c8f9cc1f2d8400b41a43009a0433544e0f Author: Andrew Deason Date: Fri Feb 17 15:46:50 2012 -0600 viced: Set h_GetHost_r probefail if MPAA_r fails Currently, in h_GetHost_r, if we get a connection whose address does not match an extant host, but the reported uuid does, we ProbeUuid the old host. If it fails, we call MultiProbeAlternateAddress_r and set 'probefail'. Later on, if 'probefail' is set, we always add the connection address to the host, and remove the host->host,host->port address from the host. However, this is not always correct. Consider the following situation. We have an existing host that has primary address 1.1.1.1, and also has addresses 1.1.1.2 and 1.1.1.3 on the interface list but not on the hash table. Say that host A stops responding on 1.1.1.1, and a connection comes in from 1.1.1.2. We ProbeUuid 1.1.1.1 and get a failure, so we call MultiProbeAlternateAddress_r. MultiProbeAlternateAddress_r probes via rx_Multi the addresses 1.1.1.2 and 1.1.1.3. Say that 1.1.1.3 responds first, and responds successfully, so MultiProbeAlternateAddress_r sets 1.1.1.3 to be the primary address for the host. After MultiProbeAlternateAddress_r returns, 'probefail' is set. A few lines down, we see that oldHost->host does not match haddr, and 'probefail' is set, so we add 1.1.1.2 to the interface list, and remove 1.1.1.3, and set 1.1.1.2 to be the primary address, even though 1.1.1.3 is the address we most recently 'know' is correct. To fix this, only set 'probefail' if MultiProbeAlternateAddress_r also fails after the failed ProbeUuid call. Conceptually this makes sense, since if MultiProbeAlternateAddress_r succeeds, it found an address that responds successfully to ProbeUuid, and it sets that address to be the primary address. Therefore, after MultiProbeAlternateAddress_r returns success, the situation is the same as if the 'good' address was already the primary address, and the ProbeUuid call succeeded, so 'probefail' should be cleared. Reviewed-on: http://gerrit.openafs.org/6728 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: BuildBot (cherry picked from commit 3c803580bb503c7650f7b138c1b3f2eafd92b985) Change-Id: I6554688447e7e62874e45a00a4c1faf957e29cb6 Reviewed-on: http://gerrit.openafs.org/6768 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit f44fb4f5f87968dac47d9a6c42eea3e41ee8405c Author: Andrew Deason Date: Fri Feb 17 13:14:31 2012 -0600 viced: Correctly update addrs on alt addr probe The functions MultiBreakCallBackAlternateAddress_r and MultiProbeAlternateAddress_r try to find a valid address in a host's interface list of addrs. If they find one, they update host->host and host->port. However, they do so just by changing those fields directly and by calling h_DeleteHostFromAddrHashTable_r and h_AddHostToAddrHashTable_r. This leaves the old host->host, host->port on the interface list, and leaves it marked as 'valid'. Similarly, the new host and port may still be marked as not 'valid'. This can result in the host being on the addr hash table via an address that is not on the host's interface list. After the above situation occurs, we may call removeInterfaceAddr_r(host, host->host, host->port); and then update host->host and host->port, which happens in a variety of places. Since host->host, host->port is not marked as valid in the interface list, it is not removed from the addr hash table, but it is removed from the interface list. Eventually, this can cause the host to be referenced from the addr hash table even after it has been freed. Since this can result in hash table entries pointing to the 'wrong' host, this can result in FileLog messages such as: Sun Feb 5 03:16:35 2012 Removing address that does not belong to host 0xdeadbeefdead (1.2.3.4:7001). And bogus instances of the message: Sun Feb 5 03:16:36 2012 CB: new identity for host 0xdeadbeefdead (1.2.3.4:7001), deleting(1 baadcafe 12345678-9abc-def0-12-34-456789abcdef fedcba98-76543210f-ed-cb-a9876543210f) To fix this, make MultiBreakCallBackAlternateAddress_r and MultiProbeAlternateAddress_r update the address list the same way as all of the code in host.c does; by adding the new address with addInterfaceAddr_r, removing it with removeInterfaceAddr_r, and updating host->host and host->port. Reviewed-on: http://gerrit.openafs.org/6727 Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7a6efc9bfcd955901d19274cc96f9a1b67f54f95) Change-Id: I3bf82f116bc2dd979e1e93cea58a4c74b0a2023d Reviewed-on: http://gerrit.openafs.org/6767 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit b6ec630bdab17f5505288565c52d07bdbe2e91e9 Author: Andrew Deason Date: Thu Feb 16 16:20:16 2012 -0600 viced: Delete dup host before probing old host Currently, when the fileserver gets a new connection from an address not on the addr hash table, we allocate a new host structure and add that host to the addr hash table. If we then find that that host's uuid matches the uuid of an extant host, we do the following: - probe the old host with the uuid, and MultiProbeAlternateAddress_r if the probe fails - mark the duplicate host as HOSTDELETED - manipulate the interface lists Consider, for example, that we have an extant host ('oldHost') with address 1.2.3.4:7001, but with 5.6.7.8:7001 on its alternate interface list. At some point, the 1.2.3.4:7001 interface goes away or becomes unreachable. A new connection comes in from that same host on 5.6.7.8:7001. What will happen is we create a new host for address 5.6.7.8:7001, and then detect the uuid collision. When we try to probe the old address of 1.2.3.4:7001, it will fail, and we will try to MultiProbeAlternateAddress_r. MultiProbeAlternateAddress_r will determine that the alternate address 5.6.7.8:7001 responds successfully to the probe, and it tries to set 5.6.7.8:7001 to be the primary address of 'oldHost', and add 'oldHost' to the addr hash table under 5.6.7.8:7001. But the "new" host from the incoming connection is already hashed on the address hash table under 5.6.7.8:7001, so the h_AddHostToAddrHashTable_r call in MultiProbeAlternateAddress_r fails. Since we later delete the new duplicate host, this results in 5.6.7.8:7001 being the primary address for the host, but that address is not anywhere in the address hash table. This behavior can be seen by the following pair of FileLog messages: Wed Feb 1 11:02:38 2012 CB: ProbeUuid for 0xdeadbeefdead (1.2.3.4:7001) failed -01 Wed Feb 1 11:02:38 2012 h_AddHostToAddrHashTable_r: refusing to hash host beefdead, baadcafe (5.6.7.8:7001) already hashed While those message do not necessarily indicate this problem, this problem will result in those messages. To fix this, mark the duplicate host as HOSTDELETED before we do any probing on 'oldHost'. This way, if MultiProbeAlternateAddress_r tries to add 'oldHost' to the addr hash table under 5.6.7.8:7001, it will be able to do so successfully, since the old duplicate host is deleted. Reviewed-on: http://gerrit.openafs.org/6726 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: BuildBot (cherry picked from commit 9754c4e15fb9073ed9f95d5d4242d311eb65d717) Change-Id: I35d41c91e496086377065f862021a5bb3fd221ef Reviewed-on: http://gerrit.openafs.org/6766 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 8b25f9cc99308ffcd2ee3f4d2bc7d58a85f2b96b Author: Derrick Brashear Date: Tue Dec 13 12:46:36 2011 -0500 vos: allow releases without offline time allow releases using dumps to clones to avoid offline time Reviewed-on: http://gerrit.openafs.org/6254 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 13a4f2b18bb84d05773529a794371d29f64570ab) Change-Id: Iec0f2d882dc2ac9a11ed4ca282cb2424db052803 Reviewed-on: http://gerrit.openafs.org/6765 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit f4e73067cdef990262c69c38ac98761620a63f25 Author: Derrick Brashear Date: Tue Dec 13 12:29:30 2011 -0500 vos: refactor code change vos to remove lots of duplicated code for volume deletes and clones Reviewed-on: http://gerrit.openafs.org/6253 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 8d618dceeefacbeb37c4ef3b1f9a8e80552311aa) Change-Id: I2c26dce796f93c8c993148a94d21dce8608e8c43 Reviewed-on: http://gerrit.openafs.org/6764 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 390d0108b37278772835205e1a9f632d9de8dfb5 Author: Andrew Deason Date: Mon Feb 13 14:11:36 2012 -0600 Rx: Avoid lastBusy/PEER_BUSY discrepancy If an rx call has the RX_CALL_PEER_BUSY flag set, but the call's conn->lastBusy is not set, we can easily cause an rx caller to loop infinitely. rx_NewCall will see that lastBusy for a call channel is not set, and will use that call channel, but rxi_CheckBusy will note that the call appears busy and that there are non-busy call channels on the same conn, and so will return RX_CALL_BUSY. This can currently happen in rxi_ResetCall, since we set RX_CALL_PEER_BUSY on the call again if the call had that flag set when rxi_ResetCall was called. If we are calling rxi_ResetCall with 'newcall' set, the passed in call is unrelated to the new call, since it was obtained from the free list. Thus, the busy-ness of the call should be ignored. Fix this by only paying attention to the incoming RX_CALL_PEER_BUSY flag if 'newcall' is not set. Also prevent this from happening by clearing RX_CALL_PEER_BUSY in rx_NewCall when we select a call and clear lastBusy for that call. Reviewed-on: http://gerrit.openafs.org/6707 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 2a4c6c3b9e1dc30d5599e67e02237a1aeef8a0f0) Change-Id: I60d76469bc3dcf764e67524f39b3c55894e7ce99 Reviewed-on: http://gerrit.openafs.org/6763 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 7a42c8f7ec6e6865a770c9bd7dbafa48947018a8 Author: Derrick Brashear Date: Tue Dec 13 12:00:52 2011 -0500 vol: allow clones of readonly volumes allow writing of data where it's not user data we're changing (e.g. allow a vnode to be marked cloned in the vnode index) Reviewed-on: http://gerrit.openafs.org/6251 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 4b93c42513785d1094c5336b5c9cc4add1b89c5e) Change-Id: I9849897ae69a426026f6d030ca4e50e8cd7066b2 Reviewed-on: http://gerrit.openafs.org/6762 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 27661857721e92f2ff99ebe7f3a72bac6f01fa50 Author: Derrick Brashear Date: Tue Dec 13 11:24:16 2011 -0500 volser: allow clonevol purge id to be new id effectively the same functionality that reclone already uses, but for some reason we artificially limit it out of clone despite the interface being there for it. it used to be there. put it back. Reviewed-on: http://gerrit.openafs.org/6250 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 641c67473615e80cfb8cf1e67636a82e42e5c899) Change-Id: I31df948a21639bd93c573c77207f0f6c9e43deed Reviewed-on: http://gerrit.openafs.org/6761 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 6b66b3b705b78c959b3ae321a8cb06e2fe166086 Author: Derrick Brashear Date: Tue Dec 13 11:22:38 2011 -0500 volser: allow cloning non-rw volumes remove EROFS error which is the only thing preventing a working clone on a non-RW. Reviewed-on: http://gerrit.openafs.org/6249 Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit f1de04f3b35e91923efddca57e744b2138619223) Change-Id: Ieb02a2d2c4d59681f5d6f372c7cd77a181d214dd Reviewed-on: http://gerrit.openafs.org/6760 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit 94e836ede7aba4e6ae6ad7466d2d3c0a2fc69508 Author: Derrick Brashear Date: Mon Feb 13 16:11:19 2012 -0500 libafs: kill rxevent daemon even in upcall mode the switch from rxk listener env to upcall env could leave the event daemon running. fix that. Reviewed-on: http://gerrit.openafs.org/6713 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4d9fbaa8036cc78ae0119330314f6deab159c90) Change-Id: I2e87c692ee2003a24590f700accc30704899db8b Reviewed-on: http://gerrit.openafs.org/6759 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear commit d12024581eb26451df5cdc4d3a53c5d3decc1c8e Author: Ken Dreyer Date: Wed Feb 15 20:12:56 2012 -0700 doc: refer to aklog instead of klog klog (and kaserver) is deprecated. In generic examples, refer to the Kerberos 5 equivalents. Reviewed-on: http://gerrit.openafs.org/6721 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 07d9b18e36fff6fc96c629ac2bebe8bb43f6b9dd) Change-Id: I3e00b5d6acbdae35ac9ea645f094ebe46d391776 Reviewed-on: http://gerrit.openafs.org/6758 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 887cffa07e6097365d6ce425bbf4297b8f2d782d Author: Andrew Deason Date: Wed Feb 8 16:03:29 2012 -0600 RedHat: Fail openafs-client 'stop' on rmmod error Currently, the openafs-client RPM init script ignores any error reported by rmmod. If 'umount /afs' succeeds but rmmod does not, the client may panic the machine if the client is started again (from e.g. running the 'restart' init script method), since afsd will try to initialize AFS with a libafs that has been shut down. So, do not ignore errors from 'rmmod', and instead fail the 'stop' method from the init script if we get an error. Reviewed-on: http://gerrit.openafs.org/6709 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 12e2a3abe7ca640a7cef2630039c06964f779f17) Change-Id: I31256abac839c9011754445efa09960f061fdbb0 Reviewed-on: http://gerrit.openafs.org/6757 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 145ca8e5a724bfc2f30751f866c9dfe60e7fff7f Author: Jeffrey Altman Date: Sat Feb 11 22:14:23 2012 -0500 doc: fix AdminGuide The AdminGuide was broken by e99224f2fe049bc339e87c8b6c195de67dca2f08. Reviewed-on: http://gerrit.openafs.org/6703 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aaab21e7a123ce701a8d5b2144032739fe177d6f) Change-Id: I350186c617b3b39829c9af1ff6a4aa2835abbdc2 Reviewed-on: http://gerrit.openafs.org/6756 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba04fc58586a6ea43213f9808d5c58cc182ddd8b Author: Ken Dreyer Date: Thu Feb 9 17:37:01 2012 -0700 doc: add section on direct volume access Provide examples of the direct volume access syntax, using the fictitious example.com cell. Reviewed-on: http://gerrit.openafs.org/6691 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e99224f2fe049bc339e87c8b6c195de67dca2f08) Change-Id: I5b2ac3b6f255d5918eeea4a63d4c7bb6164961d5 Reviewed-on: http://gerrit.openafs.org/6755 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 26a22e65eabbb077f0d2d0c98017bbec5ce4c533 Author: Andrew Deason Date: Tue Dec 20 17:44:42 2011 -0500 viced: Keep H_LOCK while locking host in h_Alloc_r Currently in h_Alloc_r, we h_Lock_r the host, so we have it locked on return. However, h_Lock_r drops the host glock, which is bad in this situation since we have already added the host to the global hash table, so other threads may see it. This can mean that by the time h_Alloc_r returns, the returned host may have HOSTDELETED set, and/or the addresses associated with the host may be completely different. h_Alloc_r's caller, h_GetHost_r, seems to assume that the host is still associated with the address of the passed-in connection. When this is not true, this can result in the host structure getting into a strange state, such as the primary addr/port may not be hashed. The host may also have HOSTDELETED set, in which case we're not supposed to be dealing with it at all. To avoid these problems, lock host->lock directly in h_Alloc_r, without going through h_Lock_r and dropping H_LOCK. Also do it as one of the first things we do to initialize the host, just to make sure that if anybody else happens to see the host, it is locked by us when they do. Reviewed-on: http://gerrit.openafs.org/6389 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d6f977830c164ee079c68101595c28ff1847f88f) Change-Id: Ib0916f3a92c4a34555ee3fa2880dec10041bf047 Reviewed-on: http://gerrit.openafs.org/6754 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3edb993a8dd92ea7edb0fb13c7d5391604e9cdc1 Author: Marc Dionne Date: Sun Jan 22 09:45:22 2012 -0500 viced: Allow null host for BreakCallBack For replication writes at the remote site, we will want to call this without a host structure. Reviewed-on: http://gerrit.openafs.org/6674 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 01301d0a5323a836efaae30cac325c25f6a7577a) Change-Id: I1fb0dff655515fedd7dfb41139f1fb6c85599377 Reviewed-on: http://gerrit.openafs.org/6753 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c0184656b65ee53f29fa0d4b62ec789de4d96e79 Author: Tom Keiser Date: Wed Feb 1 03:31:23 2012 -0500 com_err: correctly deal with lack of libintl On machines lacking a libintl, _intlize() currently fails to initialize the output error string--leading to tools (e.g., translate_et) returning a null string; make afs_com_err fall back to returning the en/US canonical error text when we don't have any i18n support... Reviewed-on: http://gerrit.openafs.org/6638 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ef63547e955edc60e2d074ef825b091e1c43882e) Change-Id: Id138e48826aa855bd87e47f201ed6840399aa640 Reviewed-on: http://gerrit.openafs.org/6752 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e0e23418bb5569683a3afbba68ae718f060ad00b Author: Christof Hanke Date: Sun Jan 29 18:08:57 2012 +0100 linux: fix probing for noop_fsync Commit 267934d0e6910c8d8166a6e78f93c1bab40857b8 introduced probing code to deal with the renameing of simple_fsync inside the linux-kernel. This test does not take different parameter-lists for noop_fsync or simple_fsync resp. into account. Fix this. Reviewed-on: http://gerrit.openafs.org/6628 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 20e82cecd9008f9b3467c9a323c5c3abf27f3021) Change-Id: I478a1ea15150ca120c8f85e9696d8bdedfc974d1 Reviewed-on: http://gerrit.openafs.org/6751 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4e1813248e233b7cbae6fb8eecd03efe3d86e191 Author: Jeffrey Altman Date: Mon Feb 20 01:40:03 2012 -0500 viced: lockcount only valid if not expired locks are issued on a lease. If the lock is expired, the lock count is zero. Reviewed-on: http://gerrit.openafs.org/6740 Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4603057d99a1501275f14f6d5aba089364785e09) Change-Id: I784bdccae6d5fb01c76590ccd34fb9efa417747e Reviewed-on: http://gerrit.openafs.org/6750 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0329984e299a239186c6e2252f3a1171fc64db72 Author: Andrew Deason Date: Mon Feb 6 13:23:41 2012 -0600 Disable kernel opt by default on Solaris 10 and 11 With newer Solaris Studio (sometime in the 12.* series), cc started adding SSE instructions to optimized x86 code, which is invalid for kernel code and can generate panics. There appears to be no way to turn this off currently (-xvector=%none is non-functional), so default to not optimizing kernel code. Reviewed-on: http://gerrit.openafs.org/6671 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 80592c53cbb0bce782eb39a5e64860786654be9f) Change-Id: If1539dd88d4d28771a7eafcdaff30a75cb230917 Reviewed-on: http://gerrit.openafs.org/6683 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 72d2ef7fa25a09c8f71b57c4969549eff20ce69e Author: Andrew Deason Date: Thu Feb 2 17:35:52 2012 -0600 SOLARIS: Use kcred instead of afs_osi_cred For many vfs ops to the cache, we currently pass &afs_osi_cred for our credentials, which is a mostly zeroed-out credential structure. In some modern versions of Solaris (Solaris 11), at least some parts of this structure need to not be NULL (cr_zone), or we will panic. The Solaris kernel provides a 'kcred' credentials structure for the purpose of using "kernel" credentials for i/o. So just use that instead for Solaris 8 and beyond, since kcred has existed at least since Solaris 8. Reviewed-on: http://gerrit.openafs.org/6669 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dc6beb3ea29a64bcf59807fd451a573aa54e1122) Change-Id: I6fd0ce4a890c2e6d9377cad39f47303aa1687a6b Reviewed-on: http://gerrit.openafs.org/6682 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f0e648bfa30958f47f1e7bbe656ebe0f4556a52a Author: Andrew Deason Date: Thu Dec 22 15:48:49 2011 -0500 afs: Panic on afs_conn refcount imbalance An undercounted afs_conn can easily cause a panic and/or memory corruption later on, since we put an rx_connection reference with each afs_conn reference. Panic as soon as we detect this, as this indicates a serious bug. Reviewed-on: http://gerrit.openafs.org/6413 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8a574ba16a80fc2b8b703ddcfc99486b977e6071) Change-Id: Ibd60dafdf1a800349b73754dae18666fa0edd300 Reviewed-on: http://gerrit.openafs.org/6642 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bd5acb7f79f9b3b1ab03521e0a90a13137863ca3 Author: Michael Meffie Date: Wed Dec 14 12:52:51 2011 -0500 Unix CM: reset blacklist on hard-mount retry Reset black-listed servers on a request when retrying due to a hard-mount retry. When hard-mounts are in effect, a request may retry indefinitely. If all the servers have been black-listed due to a transient error, the request may never complete. Reviewed-on: http://gerrit.openafs.org/6330 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit faa58c9f60a158481bdfee27e175a37c5fcd64aa) Change-Id: I1ecc3fa78c064c46849dec47c77f2fc405f2ee7f Reviewed-on: http://gerrit.openafs.org/6641 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Derrick Brashear commit b49edd57c1040ddfa479d94b202979ae81e0c86f Author: Jonathan Billings Date: Wed Feb 1 16:26:13 2012 +0000 Linux: rpm: Update openafs.spec.in to include changes to installed files Pull up some more of 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149 to handle changes that have made it into 1.6 since the last pullup: * Exclude the aklog_dynamic_auth man page, since it is AIX-only * Add new files that have appeared in the distribution, such as the 'afsio' binary. Reviewed-on: http://gerrit.openafs.org/4814 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149) Change-Id: Ib702f39d930057d92eca4d157fddb633cccf9fae Reviewed-on: http://gerrit.openafs.org/6640 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1bbb4cdb55d3f62e3db281b7424ba22a887aac3f Author: Andrew Deason Date: Thu Nov 10 15:18:41 2011 -0600 SOLARIS: Do not build x86 kernel module on 5.11 Oracle Solaris 11 no longer supports x86 (amd64 is required). If we try to build the x86 module, /usr/include/sys/kobj.h complains that the ISA is unsupported, and refuses to go on. So, just remove MODLOAD32 from the libafs directories to build on sunx86_511. Reviewed-on: http://gerrit.openafs.org/5835 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c6a22d67ff9787ace2249d528eb9db99c5b19427) Change-Id: I00f9f19653a2f98276c236d7e2331bc81f7c4f13 Reviewed-on: http://gerrit.openafs.org/6643 Tested-by: BuildBot Reviewed-by: Jeffrey Altman