commit 5f5b02a57102af1a85fb9bdaaec31b6094d0c9c4 Author: Michael Meffie Date: Wed Jul 17 23:10:42 2013 +0100 ubik: Fix encryption selection in ugen Make sure that we encrypt when requested to by the application Change-Id: If4c2ba2257bf060d3e9169ccdbcae54f54dfe5d7 commit 0e41558190a5190dee3037c08e8df31e61e5134e Author: Simon Wilkinson Date: Tue Jul 16 19:37:00 2013 +0100 Make OpenAFS 1.6.5 Change-Id: I693297ef6e20358966930cb29116d45b9151811f commit 9e1c24a583634e6102091388dedc47745efce78a Author: Ben Kaduk Date: Sat Jul 13 10:49:27 2013 +0100 Add support for deriving DES keys to klog.krb5 (cherry picked from commit e79102e7918ce5196e870a806879135743ec3abb) Change-Id: Ia7ebfdd10dcfd6cd164b10275016147630748bac commit 4b7553600a7659d117df0bde7b1c1dfde031deb8 Author: Andrew Deason Date: Wed Jul 10 12:52:28 2013 -0500 Reload rxkad.keytab on CellServDB modification Make the reloading of rxkad.keytab keys occur in the same way that KeyFile keys are reloaded. That is, we only try to reload them if the CellServDB mtime has changed. This is intended to have exactly the same reloading behavior as KeyFile reloads. I would have triggered this from afsconf_Check, but that approach has annoyances. (Calling ticket5_keytab functions directly from cellconfig pulls in libkrb5 dependencies for everything that uses cellconfig, and we'd have to trigger an afsconf_Check call by calling some other cellconfig function.) 9102f49a3bdc67ed74e254349eb55b529472f45c commit d2024c158e3a879305ff17cf726d3958f20677f4 Author: Andrew Deason Date: Mon Jun 10 17:49:12 2013 -0500 Avoid calling afsconf_GetLatestKey directly Don't call afsconf_GetLatestKey to determine whether we can print our own local tokens, since we may have keytab 'local' keys, but no DES keys. Just try to construct them and see if it fails, using afsconf_PickClientSecObj or afsconf_ClientAuth{,Secure} as appropriate. commit d4788f6e283b79a1b974dda1e8fae213efd34930 Author: Andrew Deason Date: Mon Jun 10 17:15:27 2013 -0500 auth: Do not always fallback to noauth Make afsconf_PickClientSecObj error out if we can't construct localauth tokens (unless the caller explicitly requested rxnull fallback). afsconf_ClientAuth{,Secure} still falls back, as always. commit 95d57c74476c5a02ce6d9ca913dcbf88ac5c1143 Author: Ben Kaduk Date: Tue May 14 19:37:59 2013 -0400 Clean up akimpersonate and use for server-to-server Since a6d7cacfd, aklog has been able to print a krb5 ticket to itself for an arbitrary client principal, allowing a user with access to the cell's krb5 key to get tokens as an arbitrary user. Now that it is possible to use native krb5 tickets with non-DES enctypes for authentication, and akimpersonate is available from libauth, use printed native krb5 tickets for server-to-server communication (as well as the -localauth versions of the client utilities). Remove the early call to afsconf_GetLatestKey() in afsconf_PickClientSecObj() so that we do not end up picking an old DES key before we try to find a better key to use. Before doing so, refactor the akimpersonate code to be more usable and readable, and eliminate some dead code. For example, we always printed addressless tickets, so that code could be removed. Other code had excessive stack usage for a library routine, which is eliminated. Use a start time of 0 instead of 300 so that the printed ticket will always be detected as infinite-lifetime. In order to ensure usability on all platforms (in particular Solaris), provide a couple more compat shims to implement routines which are not always available from the krb5 library, in particular encode_krb5_ticket and encode_krb5_enc_tkt_part. Thanks to Andrew Deason for implementing these compatability routines. UKERNEL doesn't need this stuff. commit 15b77552b22e3ff3e7478008673775a45047f600 Author: Alexander Chernyakhovsky Date: Tue May 14 18:12:08 2013 -0400 Move akimpersonate to libauth Give it its own source file and header, install the header at depinstall time, and have aklog get the akimpersonate functionality from libauth. Keep the linux box copyright from aklog_main.c (but strip the trailing whitespace), as that block was added with the akimpersonate code. Remove all calls to afs_com_err() as is fitting for library code, to let it build. Do not bother removing curly braces which are no longer needed; a future cleanup commit will catch that. commit 1c7fa1405940a136a992d65023cc690b1111ab3e Author: Chaskiel Grundman Date: Sun Mar 17 21:58:47 2013 -0400 Derive DES/fcrypt session key from other key types If a kerberos 5 ticket has a session key with a non-DES enctype, use the NIST SP800-108 KDF in counter mode with HMAC_MD5 as the PRF to construct a DES key to be used by rxkad. To satisfy the requirements of the KDF, DES3 keys are first compressed into a 168 bit form by reversing the RFC3961 random-to-key algorithm Change-Id: I4dc8e83a641f9892b31c109fb9025251de3dcb27 commit 33eecea7db14d06c59e1081b970d4caf0af773ca Author: Chaskiel Grundman Date: Sun Feb 10 13:27:03 2013 -0500 Integrate keytab-based decryption into afsconf_BuildServerSecurityObjects Now all servers can have it. authcon.o grows a krb5 dependency and needs to get KRB5_CPPFLAGS. Change-Id: I95fecb3f88c19b3d5193ea8200fa20c86ec08ad7 commit 14db1a40e5be3b7325951d002885bbf288d570c1 Author: Chaskiel Grundman Date: Sat Feb 9 12:42:20 2013 -0500 New optional rxkad functionality for decypting krb5 tokens An additional, optional mechanism for decrypting krb5-format tokens is provided that uses the krb5 api with a key from a keytab instead of using libdes and the AFS KeyFile. The AIX compat stub for krb5_c_decrypt is contributed by Andrew Deason. Change-Id: I97c08122c60482b84d602d6fa6482f1d5deef142 commit 5e0cbc930508a697331bad07cc201c1e1985ff84 Author: Chaskiel Grundman Date: Sat Feb 9 12:01:37 2013 -0500 Add rxkad server hook function to decrypt more types of tokens Allow tokens to be encrypted with algorithms other than DES. The security object owner must provide an implementation by calling rxkad_SetAltDecryptProc. Make sure plainsiz is initialized before calling the alternate decrypt proc. commit dc8b3d0c3ca680933cffa0aafe04fed821ea52ca Author: Stephan Wiesand Date: Tue Jun 18 15:50:03 2013 +0200 make openafs 1.6.4 The wrong commit was tagged for the 1.6.3 release by accident. Update the version strings to 1.6.4, and adapt the release notes. Change-Id: I0c4f8e796a1017aebaaf6c219fd12e1547ad9319 Reviewed-on: http://gerrit.openafs.org/9983 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74bd4b6e9fed92b188b91f7cf05438d7f1db53a7 Author: Stephan Wiesand Date: Sun Jun 16 21:15:53 2013 +0200 make openafs 1.6.3 update version strings for 1.6.3, finalize release notes Change-Id: I2f3e3dee0b1ea9e2fce522ad72e9018825b4103b Reviewed-on: http://gerrit.openafs.org/9976 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear commit f1702d57bcad2843f08341aaa46519a095d970ce Author: Stephan Wiesand Date: Thu May 30 16:52:26 2013 +0200 Update release notes for 1.6.3 As of pre3, we'll support Linux 3.10 clients (at least up to rc3). Change-Id: I81b783ad563e4a7735638bde2aa77d11ea1ec83c Reviewed-on: http://gerrit.openafs.org/9959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 6e92b66271df340917c4243404b5b85df7505e94 Author: Stephan Wiesand Date: Thu May 30 15:54:59 2013 +0200 make 1.6.3pre3 prerelease for OpenAFS 1.6.3 Change-Id: I92e3df57e9c8d55759c317cc8d7743c23c349399 Reviewed-on: http://gerrit.openafs.org/9958 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d5fcb35aea8a15bb8de760d2e27ef5734cfff16a Author: Marc Dionne Date: Mon May 6 20:20:07 2013 -0400 Linux 3.10: Replace create_proc_entry() with proc_create() Add an afs_proc_create() compat function that uses the appropriate kernel function based on a configure test. Reviewed-on: http://gerrit.openafs.org/9854 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 9b24013426e03a501fcaa6334ba5a9b48a8da3d1) Change-Id: I976ef345b1638434026e852e577e1f4474171e3d Reviewed-on: http://gerrit.openafs.org/9948 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 2bbd762c57003a9340d52edd517bc7540b1b2d8d Author: Marc Dionne Date: Wed May 15 15:19:22 2013 -0400 Linux 3.10: Include linux/aio.h directly This file needs bits from linux/aio.h, but gets them indirectly from the inclusion of aio.h by sched.h. That gets removed for Linux 3.10. Since this header is not of general interest elsewhere, just include it directly here. Reviewed-on: http://gerrit.openafs.org/9912 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot (cherry picked from commit fca4252621b80c5126e1ae3d84a54da5ebc677ba) Change-Id: I7da471ee033087592b9ec3f10331baf0135cc201 Reviewed-on: http://gerrit.openafs.org/9947 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand commit b9984671c567ec82e128f64a1f3612348f2b156c Author: Stephan Wiesand Date: Wed May 15 19:36:14 2013 +0200 make 1.6.3pre2 prerelease for OpenAFS 1.6.3 Change-Id: Ie6148239feae53bdaca9409c6b75714a25968c00 Reviewed-on: http://gerrit.openafs.org/9909 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 4d59d59dc04e25cc59da19a71a0400116d10e0fc Author: Stephan Wiesand Date: Wed May 15 19:46:56 2013 +0200 Update release notes for 1.6.3 We merged another change, helping Linux 3.6+ clients. Mention it. Change-Id: I71d2ee7f2b6fc591d767f37436d0e154809e0786 Reviewed-on: http://gerrit.openafs.org/9910 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit af2dda555adfa71bc6a84e04f72523273aca6c16 Author: Antoine Verheijen Date: Mon Apr 8 20:29:58 2013 -0600 OpenBSD 5.3: Replace use of copyinstr for setting mount point name. As a result of a realignment of kernel memory in OpenBSD 5.3, the copyinstr() routine no longer works for copying the mount point name into the internal mount table structure. It also fails silently, so it's not noticed until someone looks at the mount table and discovers that the mount point name for AFS is missing. This patch replaces the use of copyinstr() with strlcpy() for copying the mount point name in OpenBSD 5.3. Note that this is consistent with how other similar device support has addressed the same issue in OpenBSD 5.3. Reviewed-on: http://gerrit.openafs.org/9752 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b39461fc67d4f258d31e0a13b5d8dcb3c5fae49f) Change-Id: I5e9a3d0871360e0e3b19cdb2b4a609baeed050f8 Reviewed-on: http://gerrit.openafs.org/9908 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit a71cc5511c115c1b6cb4a6a2997a846bab6e19e2 Author: Anders Kaseorg Date: Tue May 7 00:27:33 2013 -0400 Linux: osi_TryEvictVCache: Don’t skip the first dentry if D_ALIAS_IS_HLIST An hlist doesn’t begin with a sentinel like a list does, so the old code would skip the first dentry or crash with a NULL dereference if there wasn’t one. Use the kernel’s list_for_each_entry or hlist_for_each_entry macros instead of trying to do it manually. Should fix a crash observed by Alex Chernyakhovsky on kernel 3.6 and newer. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/9857 Reviewed-by: Alex Chernyakhovsky Tested-by: Alex Chernyakhovsky Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Jeffrey Altman (cherry picked from commit ad6e31d5fea221bf5eefcd35a416667bc7c1f9be) Change-Id: Id8b31246067b5a718af91c8c206d5abd5210c558 Reviewed-on: http://gerrit.openafs.org/9898 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand commit 3afe8cd715859ec4e758e6b43c82851893dc706e Author: Stephan Wiesand Date: Tue May 7 18:45:53 2013 +0200 make openafs 1.6.3pre1 prerelease for 1.6.3 Change-Id: I8eb600cdc0ed55d15e928a9f165f68d3ff924f82 Reviewed-on: http://gerrit.openafs.org/9858 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit c0457a046d14c6df8253c9ab33f948da6d1893f7 Author: Stephan Wiesand Date: Tue May 7 20:46:47 2013 +0200 Preliminary release notes for 1.6.3 Change-Id: Ie4a6a984cfd9b819b0a3170acce7817998307157 Reviewed-on: http://gerrit.openafs.org/9859 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit b8a7861ed01fb01ef90c491a5bf1fcda79d3ce36 Author: chas williams - CONTRACTOR Date: Mon Sep 5 09:26:32 2011 -0400 ppc64_linux26: build binaries as 64-bit by default lwp doesnt work since ucontext/setjmp are incomplete when running 32-bit binaries with the 64-bit kernel. Reviewed-on: http://gerrit.openafs.org/5365 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 39b788eeafe27d21ae6b4fd3cfeb59ce5dc70077) Change-Id: Ic4fd5c1a861db8e96dd58a79d7fb2ea73ab4f0d6 Reviewed-on: http://gerrit.openafs.org/9605 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Stephan Wiesand commit 9be556d2c1c15ffc1561a6f03d2381430ba1c21c Author: Andrew Deason Date: Thu Mar 28 13:03:40 2013 -0500 afsio: Pass KRB5_LDFLAGS along with KRB5_LIBS We need this in case e.g. the krb5 library we're using is in an alternate location, so we can pass -L. aklog already does this, so do it for afsio, too. This is a 1.6-only change. On master, this problem went away when the krb5 ldflags/cflags/etc were standardized in commit 6f9443e702745d1e371eb72ad7fcba5cac47f3db. Thanks to Måns Nilsson for reporting this. Change-Id: I79aeb1f4de123b7550b64c1890a2773a44ff8d1e Reviewed-on: http://gerrit.openafs.org/9692 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c18835330e9bec04672baf78eb1ff7fce47c4263 Author: Ken Dreyer Date: Tue Apr 30 21:59:32 2013 -0600 doc: quote list items in POD Recent versions of Pod::Simple complain if we use integers or other special characters in an =item list. We have a couple bulleted lists that happen to have integers or other special characters as the list values. Quote the items with C<> so that Pod::Simple can correctly parse them again. Reviewed-on: http://gerrit.openafs.org/9838 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 32d823c52f212fb79816708418ad7d958eb32a01) Change-Id: Ie3e5c792d64f1d2e973e3a5f68b8466986cde0d7 Reviewed-on: http://gerrit.openafs.org/9842 Tested-by: BuildBot Reviewed-by: Jason Edgecombe Tested-by: Jason Edgecombe Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 753d3380f30f7277b88365fe1994072ae75a8be7 Author: Andrew Deason Date: Tue Apr 30 14:37:54 2013 -0500 afs: Do not invalidate all dcaches on startup Commit 20b0c65a289e2b55fb6922c8f60e873f1f4c6f97 changed afs_UFSGetDSlot to always treat a dslot entry as invalid if 'datavalid' was 0. This was to force the invalidation of the given dslot if we were reading in a dslot from the free or discard list, since the data in that dslot is not valid. However, 'datavalid' is also 0 when we read in dcache entries from disk on startup. So, this means that we invalidated all cache entries when the client started up, effectively making our persistent cache worthless. Fix this by only forcing this invalidation when we are reading from a free or discarded dcache, and not during the initial cache scan. That is, when 'indexvalid' is 1, and 'datavalid' is 0. The parameters for these Get*DSlot variants should maybe be changed to be a little more clear, but for now, this is a targeted fix for this specific issue. FIXES 131655 Reviewed-on: http://gerrit.openafs.org/9833 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 479c34614f33859131258e330e7a3f8494e0bc80) Change-Id: I72b7ad41658c51b81aa9844327372724a0f3151e Reviewed-on: http://gerrit.openafs.org/9837 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit be2cc944febb262ae0168bf5fe9411b6ef611469 Author: Andrew Deason Date: Fri Mar 29 13:40:41 2013 -0500 Make ihandle sync behavior runtime-configurable The actual behavior of FDH_SYNC has changed a bit over the years, and some people want one behavior, and some want another. Make it possible to make this choice at runtime with the new -sync option, instead of making this decision by running with different patches. Note that FDH_SYNC is not a macro anymore, nor is it an inline function. While it could be a macro, it would look a bit complex, and there are some oddities with trying to use vol_io_params inside the FDH_SYNC expansion (vol_io_params is not declared for LWP, for example). And having it be an inline function causes problems with some odd linking dependencies. For example, vlib.a contains volume.o, but does not contain a definition for DFlushVolume (dir/buffer.c), which is referenced in volume.o. 'vos' uses vlib.a, but does not bring in anything that defines DFlushVolume. Currently this appears to not cause a problem because 'vos' uses nothing from volume.o, so the dependencies of volume.o don't matter. Adding an inline FDH_SYNC for platforms that don't support 'static inline' would add a dependency to volume.o (via vol_io_params), which causes an error for the lack of a DFlushVolume. Those are possibly just some problems, and may not be all. So instead, make it so we don't have to deal with that and just have a normal function. While FDH_SYNC may be called in a performance-critical section, the overhead of a real function call is nowhere near the delay of an actual fsync(), so presumably any overhead doesn't matter. Reviewed-on: http://gerrit.openafs.org/9694 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eb5190eb4a7cd95166866a89e0a8f3a69bbc6e8f) Change-Id: I7a6c99d00eff3400423440db91a350053ed099ea Reviewed-on: http://gerrit.openafs.org/9695 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit d99de7f2e869c9dcf2873f0c62d7fbe54f7afe43 Author: Andrew Deason Date: Wed Apr 17 18:04:58 2013 -0500 LINUX: Sometimes let dentry_open handle refcounts When Linux changed dentry_open to use a 'path' argument, they also changed it so dentry_open handles incrementing the relevant ref counts. So now, sometimes we need to inc the dentry and vfsmount refcounts ourselves, and sometimes we need to leave them alone. To accommodate this, change afs_dentry_open to also handle refcounting itself, and 'get' the given dentry and vfsmount if necessary. Also note that currently, afs_linux_raw_open can call afs_dentry_open twice in the case of an error, but it does not dget(dp). This means that dp could be undercounted, since dentry_open on older kernels will dec the refcount on the given dentry in the case of an error. This change should also fix this so dp is not undercounted in that case. FIXES 131613 Reviewed-on: http://gerrit.openafs.org/9801 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Andrew Deason (cherry picked from commit e31240732cbe449fedea5095037ac08d1d513fa9) Change-Id: I082063d324d99c3d02ed372a1c20462f13bb4a26 Reviewed-on: http://gerrit.openafs.org/9803 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Stephan Wiesand commit d572281d5db2896362e9addf8a8157c618e3a776 Author: Andrew Deason Date: Wed Apr 17 01:27:47 2013 -0500 LINUX: Avoid duplicate mntget in afs_dentry_open Our caller already got a ref to 'mnt'; getting another one here will overcount refs on 'mnt'. This can make it impossible to unmount the filesystem the cache resides on (even after the client is stopped), since it's ref count will be very high. FIXES 131613 Reviewed-on: http://gerrit.openafs.org/9790 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit e019429d4548348c6ab8674305d985feee040476) Change-Id: If88e108bb3e67602cf9e6bbe7646f9862228b684 Reviewed-on: http://gerrit.openafs.org/9792 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 323d961862033496d5d3d5838c02a21eafdb8352 Author: Antoine Verheijen Date: Tue Jan 22 19:24:25 2013 -0700 OpenBSD: Add config headers for new(er) OS versions. The OS-specific config header files have not kept up with the newer releases of OpenBSD. This patch corrects that by adding header files for OpenBSD versions from 4.9 to 5.3 (the newest version currently under development). Reviewed-on: http://gerrit.openafs.org/8927 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 20a54b02521b40b07e4ec87df55a1e9a2549c881) Change-Id: I9ee66dbba300d5a68bc294a14dd9463441143371 Reviewed-on: http://gerrit.openafs.org/9661 Reviewed-by: Simon Wilkinson Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 1243f1c034af37079501c5d546a613c406bc32d5 Author: Andrew Deason Date: Tue Nov 20 15:00:15 2012 -0600 ubik: Do not count votes from error'd connections If the given connection has a connection-wide error on it, the vote we got from that site is probably not valid, and we could easily be interpreting an error code as a vote time. So instead, treat the host as if we got a network error from it. Reviewed-on: http://gerrit.openafs.org/8487 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 23092acce5d2d71a5ad6402119973c7c2c2f5e89) Change-Id: Id320b33bb6662d7867ae1f4a8d0a29808f16b59d Reviewed-on: http://gerrit.openafs.org/8947 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit a369628d2c0a2f91a894ea5781166a18329b896d Author: Andrew Deason Date: Tue Nov 20 14:18:47 2012 -0600 ubik: Try to detect VOTE_Beacon errors Currently the way ubik dbsites vote for each other is via the "return value" of the Beacon VOTE RPC. Since this is really an Rx abort, this can easily collide with actual errors on the wire, such as rxkad errors. Try to detect these by detecting vote times that are very different than the current timestamp (more than an hour in the future or past), and treat it like a network error. If we do not do this, a single site reporting an error can cause us to never reach quorum, since we calculate our sync site expiration based on the oldest 'yes' vote, which for most known Rx aborts will be far in the past. Reviewed-on: http://gerrit.openafs.org/8486 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4d4668b1618a2bd5b94ed4620464787f42d11cab) Change-Id: Iaca12506a35e924631754b638f99cb12faa84479 Reviewed-on: http://gerrit.openafs.org/8946 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 538fdd3860927a90dfd4ade9d9daa2de8113e37b Author: Jeffrey Altman Date: Thu Mar 14 23:27:25 2013 -0400 vol: remove duplicate stmp declaration Patchset 38cf31463e3f3c675de727c1e793e117a90e6d20 added a definition of afs_ino_str_t stmp which should have replaced the b64_string_t stmp declaration that was already present. Thanks to Jason Madar for noticing. FIXES 131620 Reviewed-on: http://gerrit.openafs.org/9608 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dd903ce729c24c9d1ed78b227a261b2549482461) Change-Id: Ia0a43f64183b47b6df30495673907d176d95799a Reviewed-on: http://gerrit.openafs.org/9771 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 44e97c45f3700ead06db25e1027ca0314647c932 Author: Andrew Deason Date: Wed Apr 3 16:39:07 2013 -0500 vos: Restore some VNOVOL error messages Many places in vos/vsprocs have code to delete a volume. Commit f4e73067cdef990262c69c38ac98761620a63f25 tried to refactor them by consolidating the common "delete" code into DoVolDelete. However, not all of the removed code had exactly the same behavior, and some of these variants were not handled by DoVolDelete. One such variation is that DoVolDelete always printed an error message if the target volume did not exist. But for some call sites this condition is not an error, and prior to the refactoring they did not print such an error message. Commit 1092cbe34fc8519826b3fa0565505b7bd81bc922 tried to correct this by suppressing the error message if the target volume does not exist. However, this means that all DoVolDelete calls do not print such an error, where some should and some should not print an error. This means that in some edge cases when we encounter an unexpected VNOVOL error, we now skip printing the specific error we got and instead go right to cleanup/recovery/exit. For a few other cases, we used to print an error and continue (because it is a non-fatal error or a warning), but now we print nothing when we encounter a VNOVOL error. Fix this by specifically printing an error for the VNOVOL error for DoVolDelete call sites that used to print such an error. Do this for all such sites except ones where we obviously print an error immediately afterwards anyway. This is just a quick targeted fix. A future more robust fix should involve altering DoVolDelete to handle all of the different behaviors expected by its various callers. Reviewed-on: http://gerrit.openafs.org/9704 Reviewed-by: Mark Vitale Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0a063815cc27ed065bcc9e4a91fb3a7b280818bb) Change-Id: Ia333b2257b9fdc39f7bcc9ba8ed3c98254d2e76a Reviewed-on: http://gerrit.openafs.org/9770 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit ddaef4378de7af439de1d574155506f659ca8c56 Author: Mark Vitale Date: Thu Mar 7 09:34:55 2013 -0500 vos: noise messages when attempting to delete non-existent volume With vos refactor commit f4e73067cdef990262c69c38ac98761620a63f25, some formerly conditional volume deletes are now unconditional. This regresses 'vos move' output with harmless "error" messages when AFSVolTransCreate() returns VNOVOL: "Failed to start transaction on " "Volume not attached, does not exist, or not online" Modify DoVolDelete() to return early (and silently) with VNOVOL in this case, allowing the caller to handle this appropriately. Reviewed-on: http://gerrit.openafs.org/9596 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 1092cbe34fc8519826b3fa0565505b7bd81bc922) Change-Id: I77e701378a999c8ad9413bfefcace0ee06aecb07 Reviewed-on: http://gerrit.openafs.org/9597 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 1c811f9fddf336317099e7ec73e28131acf65be8 Author: Marc Dionne Date: Sat Dec 22 07:54:54 2012 -0500 Rework set_header_word macros Rework the set_header_word macros so that all compilers are happy: - the use of offsetof() is avoided, as it has an issue on IRIX when the result is not constant - the assignment within the macro is explicitely sequenced before the function call to avoid a gcc sequence-point warning Reviewed-on: http://gerrit.openafs.org/8816 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 7f96084969d3082842a9575ee8ff7da8c52a0796) Change-Id: Iefdf7f6dbb60ffc569b67b3c89893fb43527eb02 Reviewed-on: http://gerrit.openafs.org/8818 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e8307ef10c5653ffa597b58384686141adba58f7 Author: Derrick Brashear Date: Tue Jul 17 15:34:07 2012 -0400 macos: get more packets if requested analogous to eead07418f13cd87a90770f03ea5118c546d8f1a for ukernel, this is for macos' upcall procedure Reviewed-on: http://gerrit.openafs.org/7788 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 33a761ebd11e33b5e111e67204218e8f67bef431) Change-Id: I1b59c802717393758370c376f95569467dc61049 Reviewed-on: http://gerrit.openafs.org/9747 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0508bdf0be69e93895df2f2d4bd26a06faf21c7b Author: Andrew Deason Date: Tue Dec 18 18:49:49 2012 -0600 viced: Sanity check file link count during CoW A few ihandle bugs in the past have caused the CopyOnWrite code to open cached file handles for files which have been deleted. When we CoW, both of the files we're dealing with had better actually be on disk, so bail out and flag an error if either of them appear unlinked. FIXES 131530 Reviewed-on: http://gerrit.openafs.org/8839 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 752514bd1c8eaae487d25116dc59853552f77d12) Change-Id: I2aa70145b12e9babd1a1eb881bf7f48151c20f6c Reviewed-on: http://gerrit.openafs.org/9508 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 5e05f22798cce04ab1c76f979eeeb578f1e72f97 Author: Andrew Deason Date: Fri Dec 21 12:30:24 2012 -0600 ihandle: Add FDH_ISUNLINKED Add the FDH_ISUNLINKED functionality to ihandle. This lets the caller know if the file for the underlying file descriptor has been deleted out from under us. This is useful for sanity checks in some callers. Reviewed-on: http://gerrit.openafs.org/8838 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9cf9a0e978ece2b0afb8ba5947455f307a424cab) Change-Id: If5cde825a2e7413c47409c69f15507d6df1934c3 Reviewed-on: http://gerrit.openafs.org/9507 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit e2f29a79a7c6e385bac8cace970a5d0053b17edb Author: Andrew Deason Date: Fri Dec 14 15:05:53 2012 -0600 volser: Check vnode length on dump Commit aadf69eabb1962496fa93745ab560a5b48cacd61 adds length checks on vnodes during fileserver read/write operations. Do the same thing when we dump volume data from the volserver, to ensure that we don't transmit incorrect data e.g. to other RO sites when releasing. FIXES 131530 Reviewed-on: http://gerrit.openafs.org/8836 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eb938bd18d9806f3529b7a2cbccdce5340c0e39f) Change-Id: Ia49e7310f2e143d4eed965a5090e687be55864e4 Reviewed-on: http://gerrit.openafs.org/9505 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit c40eb13d019203aa73e3ba3b25d6a8dcc950ff05 Author: Andrew Deason Date: Fri Dec 28 16:49:20 2012 -0500 afs: Add a little more info on SLVC loop panic If we panic due to a perceived infinite loop, log a little more info about our loop iterations. Reviewed-on: http://gerrit.openafs.org/8850 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 2f087dc434f62cfa7888434427eaac6803b563ab) Change-Id: Ie4a02a40fafa88f8b54b05b8a0926f258ae7cf7a Reviewed-on: http://gerrit.openafs.org/9509 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 96389a9996eeb8b6e03b2ddadacefae1ceb1cb44 Author: Andrew Deason Date: Wed Nov 28 15:12:12 2012 -0600 afs: Apply VLRU safety check for Linux too This invariant should apply to all platforms, not just those with dynamic vcaches. Since this prevents an infinite loop if the list os corrupt or something, having this around everywhere seems useful. So, drop the check for afsd_dynamic_vcaches. Reviewed-on: http://gerrit.openafs.org/8555 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 696db8667d12b1c5639515840f69c9a46d2b866d) Change-Id: I81e4c7c7678a9f4a3e02952e243735d59b3af35c Reviewed-on: http://gerrit.openafs.org/9502 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ef562f58195a75cb8c9e7437ced6f1f40387f8ec Author: Michael Meffie Date: Sat Mar 3 10:05:01 2012 -0500 viced: fix log message for MapName_r Do not log a code of zero if the name plus instance length exceeds the max pr name buffer. Reviewed-on: http://gerrit.openafs.org/6861 Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: Derrick Brashear (cherry picked from commit ef6ae1e7eda56e1d6ff7b9ade25b290c855e5780) Change-Id: If644670ed522eaba575e7246084f106231649991 Reviewed-on: http://gerrit.openafs.org/9474 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 1e8f1c7727d77e469ed83d51f314e6e66e4ea518 Author: Andrew Deason Date: Thu Jul 8 11:25:19 2010 -0500 viced: Ignore client loopback alternate addresses When we receive interface information from a client to determine its alternate IP addresses, ignore any addresses that look like loopback. Reviewed-on: http://gerrit.openafs.org/2368 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Alistair Ferguson Tested-by: Jeffrey Altman (cherry picked from commit 2a6ddae62e4fac5eecdf4634746e7294405393d6) Change-Id: Idcdaabd3aad62f0e84efbaf1d8523338bc683924 Reviewed-on: http://gerrit.openafs.org/9466 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit d4d6ece9e1791dcc3717407df71878bc61a3d5f9 Author: Andrew Deason Date: Tue Feb 21 18:03:24 2012 -0600 salvager: Remove PrintVolumeSummary Nothing uses this function; remove it. Reviewed-on: http://gerrit.openafs.org/6785 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d426e613b9a4802c3b404903f7122f6fd0046aba) Change-Id: Ibca098550a073013228c4907fbbeab7f3c0333ae Reviewed-on: http://gerrit.openafs.org/9460 Reviewed-by: Stephan Wiesand Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a0f0be1295440c36a24de4c892ef298f571b92c6 Author: Andrew Deason Date: Tue Nov 29 12:07:49 2011 -0600 udebug: Fix endianness when fudging lastYesHost hostAddr is in NBO, lastYesHost is in HBO. Reviewed-on: http://gerrit.openafs.org/6136 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 073edd3fbdf442249920acea8f3ee90b6346bf23) Change-Id: Iea4f7799c8f5500010448d6104cc9f701663d826 Reviewed-on: http://gerrit.openafs.org/9437 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 2f0a1ed60eabc8863439f30c46618ad797ac73b9 Author: Simon Wilkinson Date: Fri Aug 20 13:17:53 2010 +0100 Configure: Tidy up AC_CHECK_FUNCS Move all of our AC_CHECK_FUNCS calls into a single, ordered, list so that it's easier to see what's being checked for and what's not. Reviewed-on: http://gerrit.openafs.org/2598 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3fc5863f062c14c346bcc50c82b8d15971750e55) Change-Id: I167b42d84c9ddbb8b35aee6b4ced3c7a809e72dc Reviewed-on: http://gerrit.openafs.org/9423 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e46f2cdb540d6a9648aaebe8158f44b6e18df1d8 Author: Simon Wilkinson Date: Mon Jan 3 10:40:56 2011 +0000 autoconf: Tidy up header includes Tidy up our list of header includes so it's easier to see what we're testing for. The list is now one-per-line, in alphabetically sorted order. Note that this won't affect our use of the default include set, as autoconf will already have tested for all of those before it starts this CHECK_HEADERS run. Reviewed-on: http://gerrit.openafs.org/3612 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c8fc94fb86255a2c5cbd1613b33e32ec3a4d3b21) Change-Id: I0b507dcd9578d1c041731f7f7923f27e33fc89df Reviewed-on: http://gerrit.openafs.org/9411 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 65ae1315891e4c4802b82bdeceea40d20865a648 Author: Simon Wilkinson Date: Wed Apr 3 07:09:03 2013 -0400 fix garbage counters in supergroup prdb_check This is a backport of one hunk of commit 9efc255ab8de7ad90c7d599fea7bd1956bfd48c2, where a calloc fixes an incorrectly sized memset. The original memset clears the size of the pointer, not the sizeof the structure. Change-Id: I40250e0346345fe9b4b43d14e76ea5fb23c8c04b Reviewed-on: http://gerrit.openafs.org/9701 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 703849934244f67bfbae1bb83169a5f32a4eab9d Author: Andrew Deason Date: Tue Mar 26 13:27:33 2013 -0500 aklog: Only try to use krb5-weak.conf if it exists The logic we use for using krb5-weak.conf to allow 'weak crypto' requires us to know where the default krb5.conf is. The default krb5.conf local can vary significantly depending on the platform, and we don't have a good way of figuring out what it is, so we guess. We may guess wrong. To limit the cases where we guess wrong, only try to do this workaround if the krb5-weak.conf file actually exists. Reviewed-on: http://gerrit.openafs.org/9667 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 95240a5a5030a1053ce9966b54037eda2d37140b) Change-Id: I02313b2cc37da05adc0529e685abf6a8546bb3de Reviewed-on: http://gerrit.openafs.org/9687 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3789e98f8850188c9b5e169e98ba54bf388ae52c Author: Andrew Deason Date: Tue Mar 26 13:14:30 2013 -0500 aklog: Search for /etc/krb5/krb5.conf aklog tweaks the KRB5_CONFIG environment var when performing one of our 'weak crypto' workarounds. We assume that the default krb5.conf is /etc/krb5.conf, but for Solaris 11 libkrb5, krb5.conf is in /etc/krb5/krb5.conf. Although this file could be anywhere, try /etc/krb5/krb5.conf too, so we at least work on stock Solaris. Reviewed-on: http://gerrit.openafs.org/9666 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit cd1ffc1073d6f9a191e07cb72e8d0b4ec8cd6347) Change-Id: I8eeb406107592bac6da415d25b688d936a385a87 Reviewed-on: http://gerrit.openafs.org/9686 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 710b40e388dcff8d3b64476a02fdc13b60e31ced Author: Andrew Deason Date: Wed Dec 21 22:00:12 2011 -0500 afsd: Parse cacheinfo during argument parsing Currently we parse cacheinfo in afsd_run, when the client is initialized and started. Parsing cacheinfo can change afsd_cacheMountDir, however, which may be of interest to afsd.o users; in particular, libuafs exposes this via uafs_MountDir(). This means that if a mount dir is not explicitly specified in the libcmd arguments to afsd, a libuafs-using program will see the mountpoint as the empty string if it is queried after afsd_parse but before afsd_run. For afsd.fuse, this causes the cryptic error message: fuse: bad mount point `': No such file or directory since the mountpoint is the empty string if it is not specified explicitly on the command line. To fix this, move cacheinfo parsing to effectively near the end of afsd_parse, so the mountpoint is calculated in afsd_parse(). Reviewed-on: http://gerrit.openafs.org/6400 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit af218dee6c517f4636a18c681bff6f1212a7d9c0) Change-Id: Ibd087f52c9a6f1d98614f4fdbbc5b92ea0806506 Reviewed-on: http://gerrit.openafs.org/9453 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit e64921531a0f100c269c659d6500a8b358e23f87 Author: Derrick Brashear Date: Mon Dec 20 16:36:42 2010 -0500 LWP: don't copy pid to a null pointer In LWP_CreateProcess we take a pid. if it's null, don't crash. Reviewed-on: http://gerrit.openafs.org/3556 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5d218831f3186d0d1dc7d3b00dd4a3b6a4a8757c) Change-Id: I96c0e2a8858fa929f0de22a774050aa63a200101 Reviewed-on: http://gerrit.openafs.org/9414 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 7c2cc74e4dd0ab0dbe674bb55104a7ce148d858a Author: Marc Dionne Date: Thu Jan 24 21:38:28 2013 -0500 Linux: crset should use passed credentials When copying credentials in crset, take the passed credentials as the source instead of the current process credentials. This doesn't cause any problems currently since crset always gets called with the current credentials. Reviewed-on: http://gerrit.openafs.org/8980 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3b733db8bf2bc3a1366554ae97814cc722437149) Change-Id: I4d0000a139d16fafe480f7ebccc6759da7dea6bb Reviewed-on: http://gerrit.openafs.org/9333 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 01ee0551ba5f3d874a9d012b7b362813bb4212f1 Author: Simon Wilkinson Date: Wed Feb 27 10:34:59 2013 +0000 ubik: Avoid unlinking garbage If SDISK_SendFail fails before the pathname to the temporary file has been constructed, then the failure handler will unlink stack garbage, with variable results. Initialise the string, and check to see if it has contents before calling unlink Reviewed-on: http://gerrit.openafs.org/9299 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 44e806431bec3149a78127f5d1003e84e3a0b072) Change-Id: I366de3ce15a5e1ea855eb45110ff7acf1748c377 Reviewed-on: http://gerrit.openafs.org/9538 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Tested-by: BuildBot commit 67f5f38ec3145d6f53433975dc26e64499c05992 Author: Marc Dionne Date: Sat Jan 29 12:48:02 2011 -0500 ubik: cleanup DB lock usage in SDISK_SendFile Some failure paths can return from SDISK_SendFile with the database lock still held. Other failure paths will cause setlabel to be called without holding the lock. Rework the failure paths so we always release the DB lock before returning, and always hold it when calling setlabel. Reviewed-on: http://gerrit.openafs.org/4151 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ad63745f357e377c613881fa3470b85d4d36fe36) Change-Id: I99cb359f108f604be75f19250fb697eb95b81947 Reviewed-on: http://gerrit.openafs.org/9418 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 42233dd65b7bf5c6cc31b10a0de728bc0c3495b0 Author: Rainer Toebbicke Date: Wed Sep 19 12:13:15 2012 -0400 butc: clean xbsa shutdown on control C when we catch a control-c, do a clean shutdown Reviewed-on: http://gerrit.openafs.org/8141 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit aea3c71e59ec30e84ca4e7383fd3b566ce94bbb6) Change-Id: I89665c29a522909e126214abaec008a18acb59d7 Reviewed-on: http://gerrit.openafs.org/9495 Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit d5daffef48b133d6a663d3072c75b201a3e7508d Author: Andrew Deason Date: Fri Dec 21 11:11:00 2012 +0000 ihandle: Indent ifdef maze According to the mesoamerican long count calendar, ifdef ladders will destroy the world in 2012. Reviewed-on: http://gerrit.openafs.org/8837 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a04071e7940b26dc2a29ac3f0952b10321e7b786) Change-Id: I1db449283c709cba48cc887757c9109cfc4bd253 Reviewed-on: http://gerrit.openafs.org/9506 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3336b6b5ef04773ce0cbe7c91acb48373581483e Author: Andrew Deason Date: Fri May 18 17:55:09 2012 -0400 afs: Do not avoid DNLC if fakestat is set Currently in afs_lookup we avoid putting an entry in the DNLC if 'force_eval' is unset, in order to avoid populating the DNLC with mountpoint symlinks (we want the target of the mountpoint to be in there instead, the root dir). However, if -fakestat or -fakestat-all are enabled, 'force_eval' is always false, since we only set it to true under certain circumstances when evaluating mountpoints. To fix this, populate the dnlc for non-mountpoints, even if force_eval is unset. Reviewed-on: http://gerrit.openafs.org/7431 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 35d5be2adf2456e26aa6b10935352dc19eb6b3f2) Change-Id: I32f859c4478432de65025f35ae0c484ff7fa1bf0 Reviewed-on: http://gerrit.openafs.org/9494 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 099dca0adc65a54af3a37409c4b512600950dc13 Author: Andrew Deason Date: Mon Jun 18 17:01:24 2012 -0500 cacheout: Perform authenticated RXAFS_FlushCPS Fileservers may now require RXAFS_FlushCPS calls to be made with administrator tokens. So, try to make the call with admin tokens, and provide the usual -noauth and -localauth options. Reviewed-on: http://gerrit.openafs.org/7573 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit cb64dea75a114f6ebcba174be4e71c7fb5f85658) Change-Id: I0d8e38d3cc1b0e55f63cfa0e50fd9cd4cebc8c30 Reviewed-on: http://gerrit.openafs.org/9486 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit fcab44631cb5f3bac63eedfc25703aedff336c70 Author: Andrew Deason Date: Fri Dec 28 13:16:49 2012 -0500 viced: initInterfaceAddr_r regardless of ICBS code Currently we only call initInterfaceAddr_r for a host if a call to RXAFS_InitCallBackState3 succeeds. However, this leaves the host without a host->interface structure, which indicates that the host does not support UUIDs, and is represented by just a single host,port pair. But this is not correct; the host probably does have the relevant UUID associated with it, but it is just not responding. So, with the current code, we create a uuid-less host structure for a host that probably has a uuid; that host structure will probably never be used, and will just get deleted later. So instead, always call initInterfaceAdd_r. Do it before the ICBS call, so the host will be findable via UUID as early as possible. If the ICBS call fails, the host will be marked as 'down' later on. Reviewed-on: http://gerrit.openafs.org/8847 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f2f7ba50ed61a6187814d633327a8cacda0f656f) Change-Id: I4847ec0350346d44883b5c5912867555292cf3db Reviewed-on: http://gerrit.openafs.org/9380 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 71bd2680b536ef0f5ed4dc9a08fbc475ed8dfe2d Author: Andrew Deason Date: Wed Aug 29 14:14:39 2012 -0500 LINUX: Detect non-vectorized aio functions In kernels before 027445c3, the functions generic_file_aio_read and generic_file_aio_write, as well as the fs operations aio_read and aio_write, do not deal with iovecs but rather just use a single buffer. Detect this, so our aio_read and aio_write implementations have the correct signatures. This removes several warnings on such kernels. Reviewed-on: http://gerrit.openafs.org/8020 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e5ba359f64b5d8d874a31a50694398c17f27cfa1) Change-Id: I8d8ee81c2bcff2dc85c2ff3e70452a0af5639921 Reviewed-on: http://gerrit.openafs.org/9493 Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 1d38a73cb31e44fdbd71f8d90635514936ec1b28 Author: Marc Dionne Date: Fri Apr 22 15:23:27 2011 -0400 Linux: cleanup aio support Code that called directly into the aio operations (ex: readv/writev) would bypass the AFS specific operations found in afs_linux_read and afs_linux_write. Rework the handlers: - For newer kernels with aio, let the kernel use its default read and write operations, and define the aio_read and aio_write operations, with the AFS specific bits, calling into generic_file_aio_read/write. The kernels default read/write operations are just wrappers around the aio versions. - For older kernels, leave things as is, pointing read and write to afs_linux_read/write Reviewed-on: http://gerrit.openafs.org/4563 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a8c46e5010c0b4e41ad66458b8723e32f99b427d) Change-Id: I3c20064cc911aabfce576178c22fcdc1a99b8125 Reviewed-on: http://gerrit.openafs.org/9492 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 70a77f25e449a1772fb3a17ec5bc1b3ecda13cd1 Author: Andrew Deason Date: Thu May 31 16:08:00 2012 -0500 vol-salvage: Indent some ifdefs Reviewed-on: http://gerrit.openafs.org/7513 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 80359f562a459ef1dba2cdf53ee486578b50752d) Change-Id: I36fdd58895928fc82f9542e3c0d2ec1db7551e42 Reviewed-on: http://gerrit.openafs.org/9479 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 33c642ae948fced53b457f1394fa97be4c1469f2 Author: Thorsten Alteholz Date: Sun Feb 3 11:58:25 2013 +0100 Beautify ubik_print() After lots of intermediate steps a call to ubik_print(), ubik_vprint() and ubik_dprint*() ends in vFSLog() which adds a timestamp to the output. So any call to ubik_print(), that does not contain a \n at the end, makes a mess of the logfile. The least invasive change will simply add this newline at the end of any ubik_print() call. This also prevents long lines in the log, which might appear on multi-homed hosts with lots of interfaces. FIXES 1446 Reviewed-on: http://gerrit.openafs.org/9059 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit dc32caae7768c486e610c4e56c6a78e9c918d975) Change-Id: I05892d6d9c47517208e21a3ab00bad2f30d58ba9 Reviewed-on: http://gerrit.openafs.org/9522 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 0f1a9764b04278994c43afb4482dfafe233eff3c Author: Michael Meffie Date: Mon Dec 13 14:53:50 2010 -0500 xstat: print collection values in debug mode Print the values of the integers returned in the collection data when the -debug option is given to xstat_fs_test and xstat_cm_test test programs. This allows us to at least see what the unformatted values are when there is a mismatch in timeval sizes between the host and client (aka the 32/64 bit xstat bug). This change could break scripts which call the xstat test programs with the debug option. New debug output are prepended with 'debug:' to be easily ignored. Reviewed-on: http://gerrit.openafs.org/2878 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 13aeb1dcaee5ad4e95477464860963788c5d1469) Change-Id: Ief2f9346fad92e86aa2a214f1a462a10560c6e64 Reviewed-on: http://gerrit.openafs.org/9567 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit ebca99d0b193cd3a720e26fa59b629b70f3dc929 Author: Simon Wilkinson Date: Wed Jul 13 13:53:08 2011 +0100 libafs: Fix statistics for PrefetchFromTape pioctl The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give it a slot of its own. 1.6-only: Also give a slot for the master-only PSetTokens2, so xstat data will be more consistent across versions. Reviewed-on: http://gerrit.openafs.org/4989 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e9a49c58aa1a6c910b01fe995739d0852c75dd4) Change-Id: I718585a6ff6fcb39469bd6a007e6ebd2b59ef4fa Reviewed-on: http://gerrit.openafs.org/9468 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 0671e93abcf927d48f935283682e6761a933d558 Author: Marc Dionne Date: Tue Mar 5 20:54:50 2013 -0500 Linux 3.9: hlist iterator change hlist iterators have been reworked to not require a temporary node parameter. Reviewed-on: http://gerrit.openafs.org/9403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 9cfd7f768ca350d3b750e89e7ddb186bdad6f726) Change-Id: I47df8894467f4bb1c60cf239ec0ce0a4d6ca29aa Reviewed-on: http://gerrit.openafs.org/9639 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit ef07580783ad7a7fa70bb41c27225d429865cdaa Author: Karl Ramm Date: Sun Dec 4 13:56:29 2011 -0500 Print "waiting for job termination" at most once. This message is useless, annoying, and is the UI equivalent of littering... but it does explain why your backup command is just sitting there. Reviewed-on: http://gerrit.openafs.org/6223 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6d6d52e18f3bd537331de6021a0fcc2e96fc48db) Change-Id: Ide51c7ef7c40426f34a5f1cb6c23395b0d93886a Reviewed-on: http://gerrit.openafs.org/9438 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 64d4d13c4491a6f27f2cd63dc85a629d44a4b71a Author: Andrew Deason Date: Tue Apr 3 18:13:17 2012 -0500 xstat_cm_test: Print all call info stats For CM xstat collecton 0 (function call statistics), there are many more stats given to us on the wire than we currently print. Change this so we print out everything in the afs_CMCallStats struct. Reviewed-on: http://gerrit.openafs.org/7047 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1a458e8e72455e480ccf4c0e3fd926dd9af9beea) Change-Id: Ib263a26829bc538009f605ebb502895628e66fc2 Reviewed-on: http://gerrit.openafs.org/9469 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3b26eb76a37fb858672d2bb59589086d230d7959 Author: Andrew Deason Date: Fri Dec 28 12:58:33 2012 -0500 viced: Avoid dangling uuid hash table entry Currently we add a given host to the uuid hash table, then call RXAFS_InitCallBackState3, and then only initialize the host->interface structure if the ICBS3 call succeeded. If the ICBS3 call fails, we have added a host to the uuid hash table, but the host structure does not contain that uuid. If the host is then deleted, we will not remove the host from the uuid hash table (since host->interface is NULL), and so the uuid hash table entry will still point to the freed host. If that host is then later looked up via that uuid, we can reference a freed host, which can cause all kinds of undefined behavior. So instead, add the host to the uuid hash table at the same time that we initialize the host->interface structure, inside initInterfaceAddr_r. FIXES 131277 Reviewed-on: http://gerrit.openafs.org/8846 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7b642173c7cd7b6b7130214c1a940501736abbf0) Change-Id: I838b55244a9745dd07b7d633cb3091414162b0d5 Reviewed-on: http://gerrit.openafs.org/8868 Tested-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7c964a259f62eca8044016477ebb8b11d84108b3 Author: Andrew Deason Date: Fri May 4 17:23:42 2012 -0500 Call rx_SetNoJumbo earlier For ubik server processes, rx_SetNoJumbo needs to be called before ubik initialization for it to effect the communication between dbservers; otherwise, full database transfers may result in Rx jumbograms on the wire regardless of the jumbo/nojumbo setting. Move the call to rx_SetNoJumbo to before ubik initialization to avoid this. Also move the call to rx_SetNoJumbo to immediately after rx_Init* for all server processes, for consistency. Move similar calls to rx_SetMaxMTU for the same reason. Reviewed-on: http://gerrit.openafs.org/7350 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0debf2d2274db1ea862bfdc2ef767372f1fa77e3) Change-Id: Iacb1afa853281e856bbb70f39c6ac9a81f210d0d Reviewed-on: http://gerrit.openafs.org/9121 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit 88c6a183de3e99ce386e8ee4f47b449e7c53c2e9 Author: Derrick Brashear Date: Thu Mar 7 06:53:16 2013 -0500 afscp: null-terminate root.cell dir if needed in dynroot mode instead of doing a check for something which will never be true, and then terminating, just terminate if it's not already null-terminated. Reviewed-on: http://gerrit.openafs.org/9439 Tested-by: BuildBot Reviewed-by: Chaskiel Grundman Reviewed-by: Derrick Brashear (cherry picked from commit ceac74a6baad79155adaa692639b1d9f403525b6) Change-Id: I14d3de25bca5b1ba1878048aac1973518f8c2359 Reviewed-on: http://gerrit.openafs.org/9583 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0b211ebe718977fe96ea1a62fbcdd8211396fddd Author: Marc Dionne Date: Mon Feb 11 18:49:21 2013 -0500 Linux: Add missing semi-colon Add a missing semi-colon in the error case when missing symbols are detected. The effect is strictly cosmetic - a few additional error messages would follow the "undefined symbols" error. Reviewed-on: http://gerrit.openafs.org/9095 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 50879d5727c183982a40bd242d6039ed470d835d) Change-Id: If2c1be51969131794cb2ea30f96490fce95b0103 Reviewed-on: http://gerrit.openafs.org/9365 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit cff3b5ddd1b92d769138ed97addb54602de3f540 Author: Marc Dionne Date: Sun Jan 27 20:52:39 2013 -0500 Linux: Detect undefined symbols in kernel modules Undefined symbols in the kernel modules are not currently detected at build time. As a result, buildbot may indicate success while the resulting kernel modules are unusable. In the kernel build process, modpost warns about missing symbols but does not return an error in the case of external modules. Detect these warnings and cause the libafs build to fail. Reviewed-on: http://gerrit.openafs.org/8981 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit dbdee60a83d72d38a04a0eeb2a5324cf497e57e3) Change-Id: I1986dfd3c195be13b4014014b42eb745f9daf1f8 Reviewed-on: http://gerrit.openafs.org/9364 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit d16fac9dfb55cc70bc9f868ee58db9ba143108e9 Author: Andrew Deason Date: Sun Feb 17 19:34:06 2013 -0600 rx: Assert call error for RXS_PreparePacket error If we've received an error from the underlying security class, we must not try to send the given packet, or we risk security issues. We currently achieve this by setting an error on the connection. It is slightly indirect in how this yields an error on this specific call, and so it may not be immediately clear, but doing so is critical. If somehow the call does not have an error by the end of this, we cannot proceed as this is an error condition we do not handle. So, assert. Reviewed-on: http://gerrit.openafs.org/9122 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 85f2a66ceafd7a13f51d0352c62b5d69f4620edb) Change-Id: Iae523e6f18dd73749a6be5c3d10e132e5c14a70c Reviewed-on: http://gerrit.openafs.org/9280 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Simon Wilkinson Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 997a9980e33ae92abdaa81d07d0857d41dd6e9ae Author: Andrew Deason Date: Mon Jan 14 12:45:04 2013 -0600 rx: Honor RXS_PreparePacket errors rxi_PrepareSendPacket calls RXS_PreparePacket to allow the security class to modify the given packet appropriately (to be undone by CheckPacket on the other endpoint). However, currently rxi_PrepareSendPacket ignores all errors generated by RXS_PreparePacket, and processing continues as if there was no error. For rxkad, an error often results in the given packet being untouched. This means that the security checksum is not calculated, and thus not populated in the packet, and for encrypted connections means that the packet contents are not encrypted. This occurs for any error generated by the security class PreparePacket routine. For rxkad, the most common error is probably RXKADEXPIRED, though some other internal errors are possible as well. This behavior has a few effects for rxkad: 1. When any error is generated by PreparePacket, the other endpoint generally bails out with the error RXKADSEALEDINCON, since the security checksum of the packet is 0, which does not match what the checksum should be. This results in error messages like 'rxk: sealed data inconsistent'. This can be very confusing if the actual error is, say, just that the given credentials have expired. 2. For connections requiring encryption (rxkad_crypt), an error from PreparePacket means that the packet payload is sent in the clear. This can happen for about a window size's worth of packets. 3. If a client ignores errors/inconsistencies with the checksum and encryption, etc, they can keep reading data for the call forever, even after their credentials have expired. To fix this, make an error from RXS_PreparePacket cause a connection error for the given connection, and immediately send a connection abort. No further error checking should be necessary for the callers of rxi_PrepareSendPacket, since they already check for call/conn errors before sending any actual packets. Reviewed-on: http://gerrit.openafs.org/8909 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 03d3dacae16847352af754ac13c854ca0df0c08c) Change-Id: I5d0f421d22ca2e4d723df2d698088b6bbdc85f7b Reviewed-on: http://gerrit.openafs.org/9279 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit b230e176d8e66090afb9225bf4d68c26006b5f5f Author: Dan van der Ster Date: Fri Dec 14 11:08:44 2012 +0100 rxperf: print achieved transfer rate Prints the client transfer rate in appropriate units (kbit/s, Mbit/s, or Gbit/s). Reviewed-on: http://gerrit.openafs.org/8758 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 07d83cd473146a0db9c2ed521b6fa6ba607b0d40) Change-Id: Ia17b315e79313407e5479cd3710ac454d56ee7dd Reviewed-on: http://gerrit.openafs.org/9682 Tested-by: BuildBot Reviewed-by: Dan van der Ster Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 2e8317d2018e89418abbe541e3ac9c5e5bb524c8 Author: Andrew Deason Date: Wed Dec 14 14:16:16 2011 -0600 viced: Yell when we GetSomeSpace_r A GetSomeSpace_r call indicates we don't have enough callbacks configured. For many people, this can happen without the administrator realizing anything is wrong, since we never give any indication that something is amiss, unless the administrator checks the xstat statistics. Since this can indicate a serious performance problem, yell in the log when this happens. Only do it once, so we don't spam the log. Reviewed-on: http://gerrit.openafs.org/6334 Reviewed-by: Michael Meffie Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit da3f8d86dd216a90bc400367b7b95e9a427f99e8) Change-Id: I63ec14c6f635c57249023e0fc34b15838cee2eb3 Reviewed-on: http://gerrit.openafs.org/9386 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 30ec61f2ee8c3c0651580e596489963ae27bd9a3 Author: Ken Dreyer Date: Mon Sep 10 11:20:26 2012 -0600 add a simple backport policy to README.GIT This will clarify where patches should go, and who can do backports. Reviewed-on: http://gerrit.openafs.org/8075 Reviewed-by: Andrew Deason Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8662592caedbcf8e065312fe142731faabe1eb77) Change-Id: I1d2c452dd17c8ae63eebfd8d800659c9de0fc327 Reviewed-on: http://gerrit.openafs.org/9684 Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 0d76f5b07fd975bfb3a1fd0d1167f2c8dc061839 Author: Stephan Wiesand Date: Thu Mar 14 10:35:30 2013 +0100 Update NEWS for 1.6.2.1 Reviewed-on: http://gerrit.openafs.org/9602 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman Reviewed-by: Paul Smeddle Reviewed-by: Derrick Brashear (cherry picked from commit 5123deebdcbf634151b236bf7ff7ac7ca099b11e) Change-Id: I2d357e3fb385fcaa0e3da056e41ef8704007da6b Reviewed-on: http://gerrit.openafs.org/9664 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 4f1018433734f03131f7f9a231892021de162f78 Author: Stephan Wiesand Date: Thu Mar 14 10:16:30 2013 +0100 Make NEWS match the 1.6.2 Release Notes Reviewed-on: http://gerrit.openafs.org/9601 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit b74728590ce14f9b6c3235f0b51f8865caa9427d) Change-Id: I61acc90efd22e9577aa0447b93b3f81c6339da27 Reviewed-on: http://gerrit.openafs.org/9663 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 8fb50638f5f71cac2e3e1e4956c55cd8d1de5863 Author: Simon Wilkinson Date: Thu Feb 28 17:05:29 2013 +0000 Unix CM: Update AFS_STATS_NUM_FS_RPC_OPS There are actually 30 elements in the AFS_STATS_FS array. When the ResidencyRpcs counter was added, the total number of operations wasn't updated. Fix this so that it is correct, although this still remains rather fragile. Reviewed-on: http://gerrit.openafs.org/9313 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2c8e4f839fc253abb8051bbf89d36e94a2200590) Change-Id: Id6094e6e5007984cb080281f6a085eba958d6367 Reviewed-on: http://gerrit.openafs.org/9540 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ae7ea148390fb2b41bfa7437e97ea55a099abb5f Author: Simon Wilkinson Date: Fri Feb 22 16:54:17 2013 +0000 Unix CM: Fix byte accounting for storebehind In the current version of CacheStoreDCaches, the stored variable is maintained within the for loop that iterates over the chunk list. This means that it is reset to 0 each time we handle a new chunk. However, this means that our progress is no longer accurately tracked, as (bytes - stored) no longer gives the number of bytes which remain to be transfered. In fact, as stored is zeroed with each loop iteration, (bytes - stored) == bytes. This means that store behind is no longer activated according to the users settings. Prior to commit 334114ac58b0039ae90d7e29fa2f019fe068bd79, the stored variable was maintained within the outer, function, scope. Just move it back there to restore the previous behaviour. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9237 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5acb1a0f323a6692cca66ee3aa4c7e5f1a0f24f2) Change-Id: I22c60b07ba9518d5714c65b1952a35214f690433 Reviewed-on: http://gerrit.openafs.org/9530 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit e7be9bf929560a1f033b2513915781920884954d Author: Andrew Deason Date: Mon Nov 5 23:47:06 2012 -0600 afs_open: Deal with afs_GetDCache returning NULL afs_open was assuming afs_GetDCache always returned non-NULL. Make it deal with a NULL return. Reviewed-on: http://gerrit.openafs.org/8408 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 595a614d76d84be602c07d519738556b7f9ebf2a) Change-Id: Iba54fd03a63be485490db33ff48e5642f55df52d Reviewed-on: http://gerrit.openafs.org/9500 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2f78e92f2f152526749e0f19211cb1231ad3e6c3 Author: Christof Hanke Date: Wed Aug 22 16:39:13 2012 +0200 fileserver: add volume number to error-messages in physio. If things go wrong in ReallyRead() or ReallyWrite(), the admin would like to know which volume to salvage. Reviewed-on: http://gerrit.openafs.org/8010 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 185699e631ec3548bb6d1e68302d4a652632d3e6) Change-Id: I0bc7fa31db17fc438e4c9852d685984747fb9b74 Reviewed-on: http://gerrit.openafs.org/9491 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 1240f6dbb8de27174b58c56f99f9bd221c4de171 Author: Michael Meffie Date: Mon Apr 9 15:49:50 2012 -0400 libafs: log error code when marking server down Log the error code when marking the server down due to server/networks issues. Reviewed-on: http://gerrit.openafs.org/7138 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f0b039fc4761bb0151c7ee69110926ef16e264c7) Change-Id: Ib66457a75006858b9523fa44c164859e8c8fae6f Reviewed-on: http://gerrit.openafs.org/9473 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3f19ea5ffc3c56a342f8eb7f9c8b73eeca4d8aa6 Author: Andrew Deason Date: Thu Nov 10 11:05:28 2011 -0600 vol: Remove O_EXCL|O_TRUNC combinations A few places were specifying both O_EXCL and O_TRUNC to open(). O_TRUNC does not make any sense with O_EXCL, and doesn't do anything, so remove O_TRUNC from these instances to make the code more clear. Reviewed-on: http://gerrit.openafs.org/5832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4c679e380f697760de777d35fe057229bf2bf762) Change-Id: Iae79f552d17d626bbf2a7c9428bc9c7bbf91fae9 Reviewed-on: http://gerrit.openafs.org/9433 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8f33982b230f87dac3856bea998015251ce2beec Author: Anders Kaseorg Date: Tue Mar 5 02:34:02 2013 -0500 afsd: afsd.fuse needs MT_LIBS This fixes a build failure on Ubuntu raring as of binutils 2.23.1-0ubuntu8, which pulled in a bugfix that makes --no-copy-dt-needed-entries stricter: http://sourceware.org/git/?p=binutils.git;a=commit;h=63f3bee644cc30f1e6d049ca54d307a7c63b8186 make[3]: Entering directory `/…/src/afsd' gcc -O -I/…/src/config -I/…/include -I. -I. -D_LARGEFILE64_SOURCE -I/…/src/afs -I/…/src/afs/UKERNEL -I/…/src/rx/UKERNEL -DUKERNEL -D_FILE_OFFSET_BITS=64 -I/usr/include/fuse -o afsd.fuse afsd_fuse.o /…/lib/libuafs.a /…/lib/libdes.a /…/lib/libafsutil.a /…/lib/libcmd.a /…/lib/libafsutil.a -lresolv -lfuse /usr/bin/ld.bfd.real: /…/lib/libuafs.a(afs_usrops.o): undefined reference to symbol 'pthread_setspecific@GLIBC_2.2.5' /usr/bin/ld.bfd.real: note: 'pthread_setspecific@GLIBC_2.2.5' is defined in DSO /lib/x86_64-linux-gnu/libpthread.so.0 so try adding it to the linker command line /lib/x86_64-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status make[3]: *** [afsd.fuse] Error 1 make[3]: Leaving directory `/…/src/afsd' This is roughly a partial cherry-pick of commit f6d7a4b426f55db366113bbdda4da71570310410 (which doesn’t apply on 1.6.x), although this particular build failure had already been fixed on master as a side effect of commit 98f86cfc53fc987fdaed2f5bb733b5b5d21bfda9. Change-Id: I89467f00bbf511ec63c464b656d342c5fd2ce557 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/9387 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit bf732d3e7a44bd8df5071714d0537024dc9d2517 Author: Jeff Blaine Date: Wed May 18 23:49:52 2011 -0400 Added -dryrun Added missing information about -dryrun option Reviewed-on: http://gerrit.openafs.org/4680 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 97070b425d4c6e4fa4944160c0e7a6965ebb8e75) Change-Id: I185f0d76a6c95dcffa01713798a06672e6f9bfa3 Reviewed-on: http://gerrit.openafs.org/9623 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit f5f50b9f31aa4eb86f53a085b01f13955434c80a Author: Simon Wilkinson Date: Fri Feb 22 10:23:43 2013 +0000 viced: Allow GetCapabilities to return an error At the moment, the GetCapabilities RPC handler ignors errors from CallPreamble or CallPostamble. Instead of silently swallowing these, and potentially reutnring a bogus capabilities structure, make it possible for the RPC to return failure to the caller. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9241 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit ea0441520138d2129b5c6b2bd16c7640a8680146) Change-Id: Ic3828198e43403506f991455f09924387b483879 Reviewed-on: http://gerrit.openafs.org/9534 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 5f983ae0b97fee5bd56bb939a5dc5a4fc78b44bc Author: Ben Kaduk Date: Fri Jan 11 13:03:02 2013 -0500 Catch up to FreeBSD KPI for vfs_cmount Almost a year ago, mckusick changed the VFS KPI/KBI for the cmount VFS operation, making the flags argument a 64-bit quantity. Introduce appropriate conditionals for our prototype of afs_cmount for the change on the 10.x and 9.x branches. Reviewed-on: http://gerrit.openafs.org/8907 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 13111d25408cf6765d1b67bc3767614c8963cfde) Change-Id: I6e74760422f57336203d562dc4ee39ed2af0df84 Reviewed-on: http://gerrit.openafs.org/9406 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 1e515eb4c5436e387db6a9a72b97080500115f73 Author: Simon Wilkinson Date: Fri Feb 15 16:05:33 2013 +0000 rxgen: Fix NULL pointer dereference Avoid a NULL pointer dereference if strchr doesn't find any occurence of '*' in the string. Whilst we handle the not found case when inserting a mid string terminator, we don't handle it when restoring the string to its previous value. Reviewed-on: http://gerrit.openafs.org/9158 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0d28f8c0cec91d68023795e6ba9c769d60869f9e) Change-Id: I6eb3ec5647153e588c5a80025da2bf2c921469b3 Reviewed-on: http://gerrit.openafs.org/9525 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit e33bdad36bb96a2477f1511d82b597113919a11a Author: Simon Wilkinson Date: Fri Feb 22 10:20:58 2013 +0000 viced: Catch GetCellInfo failure If GetCellInfo returns a non-zero result, catch the error, rather than just carrying on regardless. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 1d1ba5f74102ae703ef657aa19150729edfe6ab2) Change-Id: I205b32a3e38faeae8e06bad3dc615ba01f0626d8 Reviewed-on: http://gerrit.openafs.org/9533 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 86c3a3b7ea14e06bd89eaccab51da12a9b7ed2a3 Author: Simon Wilkinson Date: Thu Feb 21 19:34:47 2013 +0000 Unix CM: Catch ICL initialisation failures If afs_icl_CreateLog fails, don't still call afS_icl_CreateSet. If afs_icl_CreateSetWithFlags fails, don't ignore its error code. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9203 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3bbff16c6d34c905fab8fcb792c8606ea356e2a8) Change-Id: I4835a6cbdc802bc08f5ae83fa10f9c93357cf736 Reviewed-on: http://gerrit.openafs.org/9532 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8bd21b891f862a8754cf32cc6d85707cdfdb52fd Author: Simon Wilkinson Date: Fri Feb 22 09:51:24 2013 +0000 kauth: Don't ignore GetExtendedCellInfo failures Don't ignore a failure from afsconf_GetExtendedCellInfo, as it will leave buffers that we later read uninitialised. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9180 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 5cefa0247fe4f22f769e366a207fb177ee8fb94f) Change-Id: I613a371f1f0ab1a739966e81965661d6cbff8e5e Reviewed-on: http://gerrit.openafs.org/9531 Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: BuildBot commit fff7c2fe29b5187a0c36441521d92c6513cdec88 Author: Ben Kaduk Date: Tue Feb 19 15:24:04 2013 -0500 FreeBSD version compatibility for 1.6.x This is a direct commit, not a cherry-pick, as the libafs build is different for master and the 1.6 branch. Instead of needing to always play catch-up, reverse the sense of the conditional and specifically exclude the FreeBSD 5.x and 6.x versions so that new versions will automatically be in the right conditional. Change-Id: Ifa1d4004faab8a7d6a94ca8d5aeff90e4c51b88e Reviewed-on: http://gerrit.openafs.org/9143 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 977a7b060d1fcf289ad74d7d59edbb8b22ebfedd Author: Andrew Deason Date: Mon Sep 24 14:20:07 2012 -0500 doc: Fix Solaris 11 kernel module path For Solaris 11, the module goes in drv, not fs. Reviewed-on: http://gerrit.openafs.org/8152 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit a7278eb5620507cd70086582cf539b4024b46194) Change-Id: Idb5f864132f436f9a6cc619d1c672c9ceec3ff67 Reviewed-on: http://gerrit.openafs.org/9566 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3a51648fb500680934498730f3ed9b2bbd24b745 Author: Michael Meffie Date: Fri Sep 21 15:58:29 2012 -0400 doc: solaris x86 kernel module path Add instructions for solaris x86 kernel module installation. Reviewed-on: http://gerrit.openafs.org/8143 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 5ef5cf48f3d2ba52cf5ed428728215b5b5f8d0b2) Change-Id: I7bec3361b5f9e47c8b3cfbfbe27e012288ec9780 Reviewed-on: http://gerrit.openafs.org/9565 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 392b1c6b4c10e18e608f04513ba7b82220f74cc1 Author: Michael Meffie Date: Tue Apr 10 16:07:37 2012 -0400 doc: distributed files are under dest Add the dest path component in the quick start guide instructions for copying files from a binary OpenAFS distribution file. Reviewed-on: http://gerrit.openafs.org/7187 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc770a5007ae16aa5477bf1748f3e0666f665781) Change-Id: I54c96f35ce4f9c60a25fee012306ecb210972287 Reviewed-on: http://gerrit.openafs.org/9564 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 73fa4ef44dd763da0f4ba067a0b53892934a0922 Author: Michael Meffie Date: Fri May 20 13:53:48 2011 -0400 doc: document volinfo -filenames option Add the namei -filenames option to the volinfo man page. Note this option as implemented implies the -vnode flag, but for consistency with the other fields that modify the default mode output, it is documented to be accompany the -vnode flag. Reviewed-on: http://gerrit.openafs.org/4690 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit e3fb2740ba20e78fdc93308b6a2843454a6d269c) Change-Id: I1ef65090d5449f600ef03171436a27c142e69fbb Reviewed-on: http://gerrit.openafs.org/9563 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 7f5856342961540f46b9012cda12b144d5256274 Author: Simon Wilkinson Date: Sun Feb 24 12:53:59 2013 +0000 budb: Store dumper information correctly Change f498c18a6f7300eb89ca3b9d9b85c4d461fa8474 attempted to fix a problem with using an inappropriate function to copy the ktc_principal value 'principal' into the d.dumper structure element. Originally the code read: principal_hton(&principal, &d.dumper) which copies the 'host' principal principal into the 'net' structure d.dumper. However, this was changed to principal = d.dumper Which populates 'principal' with whatever garbage is in the d.dumper structure. Fix this so that the assignment is done the right way around. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9252 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit dce2d8206ecd35c96e75cc0662432c2a4f9c3d7a) Change-Id: Ib3851649293bddedf465739acc9bd7ad327c80e0 Reviewed-on: http://gerrit.openafs.org/9537 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2b14a3b290b7f459edb426fa70b18c14e369596e Author: Simon Wilkinson Date: Sun Feb 24 10:43:52 2013 +0000 budb: Fail if afsconf_GetExtendedCellInfo does Rather than silently ignoring the failure of afsconf_GetExtendedCellInfo, and then using garbage cell configuration, just fail to start if afsconf can't parse the config directory. Reviewed-on: http://gerrit.openafs.org/9247 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 3fbdc609dc025cfcaac6949485d6fb072bf34764) Change-Id: I40f0aefda1bc44ce92a7733ec644002229c32079 Reviewed-on: http://gerrit.openafs.org/9536 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 489bb387a35f14ae94ba73ec395f51c5bdfd0b7a Author: Simon Wilkinson Date: Sun Feb 24 10:39:53 2013 +0000 butc: Catch failures to start keep alive thread If we can't start the keep alive thread, in either the LWP or pthread versions of a code, report an error and exit instead of carrying on regardless. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9245 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e4862e284832420e9dbf5a6f437f6f7c8801f7dd) Change-Id: I55453557b592bb1814877d291b1604907ab2e8d6 Reviewed-on: http://gerrit.openafs.org/9535 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2327f5fd3a250c14f5367f93a975573a04e04655 Author: Simon Wilkinson Date: Thu Feb 21 22:10:38 2013 +0000 Unix CM: Fix bogus character in license string A stray $ had crept into the license string in afs_dcache.c. Fix it. Reviewed-on: http://gerrit.openafs.org/9233 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 983d67616b670c5d57c8c67578fdb52f2bb3ddbd) Change-Id: I21d31dc9e50e6be253cc7e7878e1079567f10220 Reviewed-on: http://gerrit.openafs.org/9529 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 9b3f4d8be8b7b9c7760abf982b9ed12bc457b66e Author: Simon Wilkinson Date: Tue Feb 19 15:43:29 2013 +0000 ptserver: Don't ignore ubik_Write failures If we can't write to the ubik database, then that's a bad thing. Don't ignore it. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/9176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 860c34ba938602387f78c10c2f548fb8a523a9cd) Change-Id: Id379d94844e6cc520829b4ef6015d0a004fdbc42 Reviewed-on: http://gerrit.openafs.org/9526 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 85fade41f2fca7eefa1efff770d6173aef4d9158 Author: Michael Meffie Date: Sat Jan 5 13:37:51 2013 -0500 correct whitespace errors in readme files Fix the trailing whitespace and leading spaces before tabs in the readme files. Reviewed-on: http://gerrit.openafs.org/8877 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman (cherry picked from commit 8a17568fb4fd3f77a3b9d043bbe49e992bca8266) Change-Id: I60fb4d05cf79f4998e8652026dc3f1f636bcd6a4 Reviewed-on: http://gerrit.openafs.org/9518 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 6751327f6f7ba1389c6caf1207abe78e9cdb0d70 Author: Nickolai Zeldovich Date: Sat Jan 5 23:44:55 2013 -0500 ubik/udebug.c: check array index before dereferencing Avoid out-of-bounds array accesses by first checking that the index is in-bounds, and then dereferencing; not the other way around. Reviewed-on: http://gerrit.openafs.org/8879 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 0e83cde60e6e91fbe20ffac0f0a77afe8497d950) Change-Id: I7a5018011939d43b702c63a272d53a2018df7d33 Reviewed-on: http://gerrit.openafs.org/9513 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit dc8952ff29584a8bbc7be66a53f6c4fffd3178f3 Author: Jeffrey Altman Date: Tue Jul 3 15:58:01 2012 -0400 viced: RXAFS_GetVolumeStatus remove access check The AFS file server had always performed a PRSFS_READ permission check on the volume's root directory (1.1) vnode before responding succesfully to the client. A successful response contains the following volume state information: Message of the day (if any) Offline message (if any) Online flag InService flag Blessed flag NeedsSalvage flag Type MinQuota MaxQuota BlocksInUse PartBlocksAvail PartMaxBlocks All of this information is publicly available to anonymous users via other services so it is odd that it is hidden from anonymous cache managers. As sites begin to tighten the ACLs on volumes due to privacy and security concerns this READ permission check is begin to cause problems for Windows clients that rely upon the quota and block counts to determine whether or not it is likely to be safe to perform an extending write. In many environments volumes are being configured such that the root directory is 'l' for all and only the subdirectories provide for 'ridw'. Under these situations the user is able to read/write the data but cannot determine how much free space is available. Since all of the data returned by RXAFS_GetVolumeStatus is publicly available, the patchset removes the access check entirely. Reviewed-on: http://gerrit.openafs.org/7705 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a) Change-Id: I94886f2325ee46995dd886bbf2d359f6d3af76fe Reviewed-on: http://gerrit.openafs.org/9489 Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: BuildBot commit 35108215d98ef78c9bf54cb66597c53f3d03164f Author: Simon Wilkinson Date: Fri Feb 15 22:34:36 2013 +0000 libadmin: Don't try to release garbage connection In bos_ServerOpen, initalise the contents of bos_server structure to 0 using calloc, so that if we jump to the error handling stuff before they are assigned real values we don't end up trying to release garbage. Reviewed-on: http://gerrit.openafs.org/9163 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 17154a3c0afa88f7bb25e2b642fc13ee69c2b7db) Change-Id: Iaa6e5166cb29799feb82ca29ef3e78ceea82d6e2 Reviewed-on: http://gerrit.openafs.org/9524 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0671633b59ac8fd1d2fe54c65a516aa518fbca83 Author: Andrew Deason Date: Mon May 21 18:15:58 2012 -0500 afsd: Report fakestat correctly A fakestat value of 1 is for -fakestat-all, and 2 is for -fakestat, not the other way around. Reviewed-on: http://gerrit.openafs.org/7445 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 47e12584804b287051552900c94c99a3c84daa92) Change-Id: I8b0872430c771741962afcfd9854cbe5fcdc42e8 Reviewed-on: http://gerrit.openafs.org/9478 Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: BuildBot commit c1bc649cefc37aa4fb2546b648ba917a4fb1b897 Author: Mark Vitale Date: Thu Feb 14 10:51:34 2013 -0500 salvager: incorrect comment The comment for the code handling the -showsuid option was incorrect. Reviewed-on: http://gerrit.openafs.org/9109 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 4051c5e96e921b69ac2a6e7bcb805cbc0a8f7993) Change-Id: Id19e063c9540e362b4d9478a0fce606084d470e6 Reviewed-on: http://gerrit.openafs.org/9523 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit f8d05579128f953b870cd3f4d9a0ffbe9d7287dd Author: Thorsten Alteholz Date: Wed Jan 30 20:11:04 2013 +0100 fix some typos in bos_setrestricted the real name of the command is: 'bos setrestricted' it is sufficient to name 'bos install' only once Reviewed-on: http://gerrit.openafs.org/8990 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 69f634503482f899e4d422b16100636905c72ea8) Change-Id: I7ab452cb2cf5e836341f7fc66dacd317cf65ed58 Reviewed-on: http://gerrit.openafs.org/9521 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 69ef35ac1417ddba2d292bc22df9f54305ba9da1 Author: Chas Williams (CONTRACTOR) Date: Wed Jan 16 21:16:31 2013 -0500 LINUX: fix array indexing issue in memory statistics The comma is a sequence point and i gets incremented and then used. This results in writing past the end of the array by one (and failing to initialize the first element as well). Potential fix for RT ticket 131566. Reviewed-on: http://gerrit.openafs.org/8914 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 04ddecc1f2827463edf22857f9b19910ccc25e98) Change-Id: I09a96fcb5ffc9a58f0930f76e4ee5f65628ba5c8 Reviewed-on: http://gerrit.openafs.org/9520 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d0418efd8edc60979ee7983b81437b5a467732e9 Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:59 2013 -0500 libadmin/vos/vosutils.c: mask out sign-extension Right-shifting a signed int by 24 bits can produce a value outside of 0..0xff due to sign-extension. As a result, in AddressMatch(), the first bPattern!=255 check can never succeed. Fix by masking with 255 before comparison. Reviewed-on: http://gerrit.openafs.org/8884 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 8e8e3c26b87d78b92d96ba91d58ee59d774ebcb5) Change-Id: Ifee303905d004936e96f6be1e6a9188d7b70978c Reviewed-on: http://gerrit.openafs.org/9517 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bfe9b6a8d384739cfe98fcc54bdb55a894cc9d0c Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:46 2013 -0500 lwp/iomgr.c: avoid off-by-one out-of-bounds access Avoid accessing sigDelivered[NSIG] and sigEvents[NSIG], which are out-of-bounds by one. Reviewed-on: http://gerrit.openafs.org/8883 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit bd850e5b980d34236ee98d16b9717860b63af306) Change-Id: I859c654b8d35484aeeb029432c69848846335fb8 Reviewed-on: http://gerrit.openafs.org/9516 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit bba18139f27169bd9040c43db29955399a419695 Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:33 2013 -0500 butm/file_tm.c: check for null pointer before dereferencing Move the null pointer check to before the pointer is dereferenced. Reviewed-on: http://gerrit.openafs.org/8882 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 4d6967e0b0a0628deb1dd9d210de84779d41f856) Change-Id: Ib6c9308170b1242ea207f5380275d51b1514028d Reviewed-on: http://gerrit.openafs.org/9515 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8a6b943b3f057f5e7995d9687ddc9574f3e55ddc Author: Nickolai Zeldovich Date: Sat Jan 5 23:45:11 2013 -0500 src/tests/pathname.c: properly check strdup() return value Fix the check for strdup() running out of memory. Reviewed-on: http://gerrit.openafs.org/8880 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit d9cc9c9dee9ad0213ddd39174e81d01b9707937b) Change-Id: I56dc0dd7ced4df5be636a03db819169b5413e56b Reviewed-on: http://gerrit.openafs.org/9514 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0e367d2eb72e1ea80c04378d837468e0cbaf1a7e Author: Nickolai Zeldovich Date: Sat Jan 5 23:44:33 2013 -0500 volser/vol_split.c: do not dereference known-NULL pointer Avoid dereferencing a pointer that we just checked is NULL when printing an error message. Reviewed-on: http://gerrit.openafs.org/8878 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5c5515a5c3b34f9a115b29378e123c779c138f51) Change-Id: I73de73f8cd9be9d106285f45e86e030909293521 Reviewed-on: http://gerrit.openafs.org/9512 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ff77c3a190b0271381d9f79e260f806befbafeee Author: Simon Wilkinson Date: Fri Mar 30 19:31:10 2012 +0100 vol: Call memset with the correct size Call memset with the size of the structure we're initialising to 0, and not the size of the pointer to that structure. Caught by clang's new warnings. Reviewed-on: http://gerrit.openafs.org/7083 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 408afc5690fc8ac3b6942983765ab36e63d2534d) Change-Id: I25fd235ffd7478295bf205b232ecc5816f962d3f Reviewed-on: http://gerrit.openafs.org/9472 Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit 1eb75c9bc7cba880936f4cb9a35399051314897c Author: Michael Meffie Date: Tue Nov 20 08:49:39 2012 -0500 tools: example sysvmq audit reader A user contributed sysvmq audit log example reader. Shows how to read the sysvmq audit log using core only perl modules. Reviewed-on: http://gerrit.openafs.org/8485 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7c8373c8c27abdfa316c6526aa14654caed3e7f8) Change-Id: Ib2eb66763e6ada884f33f14fbe950759fc9c3c43 Reviewed-on: http://gerrit.openafs.org/9501 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 0c6b8c13ce38de628bddc9e17232b4900c661091 Author: Marc Dionne Date: Fri Sep 21 20:08:58 2012 -0400 bozo: fix typo in help text Fix a typo for "interface" in the help text for bosserver. Reviewed-on: http://gerrit.openafs.org/8144 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie (cherry picked from commit 58c089e642198a210462b3bf508056b56667f879) Change-Id: I90fff6c691ae59ff467a641cb025cedc17a3bb4c Reviewed-on: http://gerrit.openafs.org/9498 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit a3f495b66431773d44a04be14b09d71cb3921d82 Author: Andrew Deason Date: Tue Sep 11 18:46:42 2012 -0500 rx: Save errno in LWP rxi_Sendmsg Much of this code examines errno or WSAGetLastError to determine what to do. However, some other operations between the actual sendmsg call and code that examines errno may modify errno. So, save the value of errno to ensure errno reflects the actual error we got from sendmsg; this also slightly simplifies some of the logic. Reviewed-on: http://gerrit.openafs.org/8110 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 347908cd0031c558c266ec412aa49200ae2b3204) Change-Id: Ia0134acb2ae5f9e47fb82f36bd0889987803d897 Reviewed-on: http://gerrit.openafs.org/9496 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 72ce52692f388587cbccc29180e0bd3f47d70cc8 Author: Andrew Deason Date: Wed Jun 20 16:28:51 2012 -0500 vos: Avoid creating volume with the same RO/BK ids If we specified an RW id of 5, an RO id of 6, and no BK id, this code would assign the BK id to RW+1, or 6. This gives the RO and BK volumes the same volume id, which is a mistake. Choose a different id instead. Reviewed-on: http://gerrit.openafs.org/7603 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 234bedae6ef506ec1ff53854a22548e892db3f11) Change-Id: I332fed5b8cac23a847a8890188f899cff909f130 Reviewed-on: http://gerrit.openafs.org/9488 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d87fdb50db5c306973f4f379e82d992d18244c34 Author: Marc Dionne Date: Thu Sep 22 19:09:52 2011 -0400 viced: fix incorrect error message The error message was obviously copied from another location in the code (after the pr_Initialize call) and is misleading. Adapt it for vl_Initialize failure. Reviewed-on: http://gerrit.openafs.org/5490 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a020c572d372f2e86807dc4c75ec50ff14ef2fba) Change-Id: I067ceb0e5e2281508647065f11e48d4a07033c99 Reviewed-on: http://gerrit.openafs.org/9432 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2fa8aebb40c8884994ed6089a4b38cc73930cc79 Author: Marc Dionne Date: Tue Sep 13 19:32:37 2011 -0400 vos: print correct command name in diagnostics for changeloc Fix the label in the diagnostics message, it prints "addsite" instead of "changeloc" when an error occurs during vos changeloc Reviewed-on: http://gerrit.openafs.org/5414 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1de4561529bdb92b6647a634d9f2c2714e1758e5) Change-Id: If87fd2a1ed0d4c2975479b5167f6e867db62437a Reviewed-on: http://gerrit.openafs.org/9431 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit ab07b2f8b279570177169364aeb6842dc4614fd2 Author: Simon Wilkinson Date: Thu Feb 28 10:22:43 2013 +0000 ptuser: Clear return value from pr_ListMembers Make sure that lnames is zero'd on entry to pr_ListMembers, so that an early error return doesn't also return garbage. Reviewed-on: http://gerrit.openafs.org/9309 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit bc70828f0713891597cf0042bc3e204f3d923271) Change-Id: If99abc35f49ac1d436fbb82c1f9dbf97590e95c5 Reviewed-on: http://gerrit.openafs.org/9379 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 81aee1540534350bc33826bf207c7ee1df147f63 Author: Simon Wilkinson Date: Thu Feb 28 13:45:00 2013 +0000 Unix CM: Don't overflow ICL logs array When checking whether a user supplied index into the ICL logs array is out of bounds, we need to check whether it is greater or equal to the maxmimum number of elements. Otherwise we can access one more than the number of elements in the array. Caught by coverity (#985567) Reviewed-on: http://gerrit.openafs.org/9311 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ff8bae8938532d95f792258d2c520705e095e7af) Change-Id: I5dba0d22d4589cb7d1f0a4fe57623646d300ab61 Reviewed-on: http://gerrit.openafs.org/9378 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit d8c76c472a4d85c8d30de6ea4f02e4b3aeb07945 Author: Simon Wilkinson Date: Fri Mar 1 10:54:07 2013 +0000 Unix CM: Fix stray semicolon Commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85 introduced a stray semicolon in the osidnlc code. Fix it. Caught by coverity (#989030) Reviewed-on: http://gerrit.openafs.org/9321 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 59def405ba9404954debd35da539346b1ccd4096) Change-Id: I35256e7b0aec95b3341db9cd1e99387b1050fab4 Reviewed-on: http://gerrit.openafs.org/9377 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 0c1815b37a27a609892a553005da2305a5779a1e Author: Simon Wilkinson Date: Thu Feb 28 15:26:15 2013 +0000 Unix CM: Fix hash table overflow in dnlc code In GetMeAnEntry, we can end up overflowing the nameHash array by one element if the stars are particularly badly aligned. nameptr is a static across function calls, so nameptr and j are not equal. If nameptr is increment to NHSIZE in the same loop iteration as j reaches NHSIZE + 2, the loop will terminate. We'll then lookup nameHash[NHSIZE], which is 1 element passed the end of the array. Add an if statement which loops nameptr outside the loop (in the same way as the if statement in the loop) Caught by coverity (#985568) Reviewed-on: http://gerrit.openafs.org/9312 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85) Change-Id: Ic19d72e6c012cb06e98c3c970162995e77da4b68 Reviewed-on: http://gerrit.openafs.org/9376 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 393043f6dbfdd684b14281fbe568c14c0e11a15c Author: Simon Wilkinson Date: Fri Mar 1 11:22:26 2013 +0000 kauth: Don't overflow cellinfo hostAddrs array The hostaddrs array has MAXHOSTSPERCELL (8) available elements. The ubik connections list has MAXSERVERS (20) elements - when copying from the ubik list into the cellinfo hostaddrs list, be careful not to overflow it. Caught by coverity (#985577) Reviewed-on: http://gerrit.openafs.org/9323 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 30e25c74376dd8aa24018116015e57c47c1dfaf9) Change-Id: I6bf03fada98cf6f5442a7d6a1e52e18cc91aad59 Reviewed-on: http://gerrit.openafs.org/9375 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit d3dca0b7dd7874dee01065e04eccd68a63fc1493 Author: Simon Wilkinson Date: Fri Mar 1 11:31:31 2013 +0000 unlog: Don't overflow cells array cells has a maximum size of MAXCELLS. Doing cells[MAXCELLS] overflows that array. Clamp our maximum number of cells at one below this to avoid the overflow. Caught by coverity (#98551) Reviewed-on: http://gerrit.openafs.org/9324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit ff7fd58b49a41bf85df492b9f470004d4433800e) Change-Id: If6c0caed4b4fedf571c4c6c6b8466bfaaff67975 Reviewed-on: http://gerrit.openafs.org/9374 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 9fc38b1bcdfd7c16fc84f88314d7b9ec0f084b18 Author: Simon Wilkinson Date: Fri Mar 1 11:47:03 2013 +0000 ubik: Don't overflow server's addr array We're checking to see if we've overflowed the array _after_ we've looked up an element within it - so on the final iteration, we always read past the end of the array. Fix this by swapping the order of the tests in the for statemen Caught by coverity (#985590) Reviewed-on: http://gerrit.openafs.org/9326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a4ae9a4c3cc1fa5ca2b813174040dce36284a4b9) Conflicts: src/ubik/recovery.c Change-Id: Ic09177a1e85492e181e51d554ddb25df2ca2dfbd Reviewed-on: http://gerrit.openafs.org/9373 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 486ba708442aa7296503dc44f2c2662ed784725f Author: Simon Wilkinson Date: Fri Mar 1 12:01:19 2013 +0000 util: Fix overflows in address parsing The extractAddr function (which turns a dotted quad into an IP address), has a number of overflows when one or more elements of the quad are more than 31 characters in length. The array allocated for each portion is 32 bytes long, but we only stop writing into the array when the indexing pointer reaches 32, which doesn't leave us with space for the trailing NULL. Rework this so we always allow space for the NULL, and use a #define for the array length to make it more clear whats going on. Caught by coverity (#985591, #985592, #985593, #985594) Reviewed-on: http://gerrit.openafs.org/9327 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 28a441ebd8323437bf762a790b4ec5e6301e4bec) Change-Id: I9506fd8b468c957f0c9f8dc2d58baf5bc6bc2e19 Reviewed-on: http://gerrit.openafs.org/9372 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit c73b6b61f62e966d8ca962d943b99b26fd441e26 Author: Simon Wilkinson Date: Fri Mar 1 12:12:07 2013 +0000 up: Fix improper use of readlink readlink returns a non-NUL terminated string. If the string must be terminated, we need to have space in the buffer for it. So, the buffer passed to readlink must be 1 less than the real length of the buffer. Caught by coverity (#985597, #985610) Reviewed-on: http://gerrit.openafs.org/9329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 80875f8aa1540bf032073a4843566bbe6b1fe301) Change-Id: I1dd039bfceaff7891c9145cf4799469b2de2f23a Reviewed-on: http://gerrit.openafs.org/9371 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 77249c3a549865565b15456cd511a690f127d163 Author: Simon Wilkinson Date: Tue Feb 26 12:38:59 2013 +0000 volser: Catch EOFs when reading dumps When reading a standard tag, make sure and catch an EOF error from iod_getc. Otherwise we'll end up trying to parse 0xFF as a tag length. Caught by coverity (#985603) Reviewed-on: http://gerrit.openafs.org/9275 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit cc703d9562455c74767fcd6d2055339109fa9243) Change-Id: I29957f7b656bb2cdd19601d90990d7bacd82e98c Reviewed-on: http://gerrit.openafs.org/9361 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 4e9e404dea8f0d07714f8ba668735ac0999d7934 Author: Simon Wilkinson Date: Wed Feb 20 14:54:55 2013 +0000 volser: Make it clear what's copied from partList XVolListPartitions uses partList to maintain a list of partition IDs - it does not use the partFlags field. Make it clear when we populate the partEntries field that we are only copying the partition list. Caught by coverity (#986030) Reviewed-on: http://gerrit.openafs.org/9262 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00601179625ffb71461bbcc46629791895cf4793) Change-Id: I878011efe4baae897e5d4f875c8e02378da38587 Reviewed-on: http://gerrit.openafs.org/9360 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 3073ca05ecef5a2c832e92a072e5b430fb40cef9 Author: Simon Wilkinson Date: Tue Feb 26 12:17:29 2013 +0000 viced: Don't write out garbage when extending file When we extend a file, we write a single byte of data to it - tlen is used as a source for this single byte. However, in the current code, tlen is used uninitialised. Set it to 0, so we don't write a byte of stack garbage. Caught by coverity (#986015) Reviewed-on: http://gerrit.openafs.org/9271 Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot (cherry picked from commit e191cb889c941848fe09f04c24d969111e6dc494) Change-Id: I517b5772241314a0854094655e25f3f75eba90d1 Reviewed-on: http://gerrit.openafs.org/9358 Tested-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 19e427070fd14447658777cc572aab75f8fdc949 Author: Simon Wilkinson Date: Tue Feb 26 12:21:59 2013 +0000 ubik: Zero header before writing to disk The ubik disk header contains a padding field, which is never zeroed before being written out to disk. This means that there is a shorts worth of stack garbage in every ubik label! Just zero the whole structure with memset before we populate it. Caught by coverity (#986011) Reviewed-on: http://gerrit.openafs.org/9272 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d8fa251a14e9469fb6ec722d100b6a8557248694) Change-Id: I1d3baf4ced6583f22458155edcc16344acc5757e Reviewed-on: http://gerrit.openafs.org/9357 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 36e1707ffbda22808cf5af23460dd05c38a6a87a Author: Michael Meffie Date: Mon Dec 10 12:01:38 2012 -0500 doc: dynamic mount requires dynroot and fakestat Document that dynamic mount (/afs/.:mount) requires dynroot and fakestat on non-linux unix. Reviewed-on: http://gerrit.openafs.org/8739 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer (cherry picked from commit 7dbb35a89f42743ff0a29bc9822b94141a2a8323) Change-Id: Ia77835cd1830c7bc5dde573f2e890341aa06bc21 Reviewed-on: http://gerrit.openafs.org/9519 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: BuildBot commit af1888ff142763fc7ec8d10b9bc24e49669c1178 Author: Antoine Verheijen Date: Mon Jan 21 02:30:58 2013 -0700 OpenBSD: Replace "vnodeop_desc" with "vops" in kernel module. In OpenBSD 4.9, the vnode operations vector in the "vnode" struct was changed from using a "vnodeop_desc" struct to a new "vops" struct. This patch makes the appropriate changes to the OpenBSD kernel module support to accommodate the change. Reviewed-on: http://gerrit.openafs.org/8928 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit bb42c02ce56aec29e3860bec47e47157d0406f20) Change-Id: I768358758763a362c92351211bda6d8a7eab6a26 Reviewed-on: http://gerrit.openafs.org/9595 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0ba3e7521c9b091b81f75ccb2fe06dcfc3743f43 Author: Michael Meffie Date: Sat Jan 5 10:40:42 2013 -0500 spelling corrections in readme files Fix spelling errors in readme files. Reviewed-on: http://gerrit.openafs.org/8876 Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 4042667388406e540c8a6546031d514793ffc8c4) Change-Id: Idd64293533af373c2b467049442231bb85b6d7db Reviewed-on: http://gerrit.openafs.org/9511 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 93bfb96b3a62bad5805d7fab93e61cee6b7f1e27 Author: Michael Laß Date: Sat Dec 22 22:54:20 2012 +0100 Remove AFSLore from wiki URLs The URL of the openafs wiki doesn't contain "AFSLore" anymore. Although these old URLs still work, replace them to point users to the correct address in the first place. Also be consistent and always use a trailing /. Reviewed-on: http://gerrit.openafs.org/8819 Reviewed-by: Ken Dreyer Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit df4d971ec1a014826929dfeac017fb24d37ac38a) Change-Id: I99027c23c3a2e5604f927f51961298b5ec27d1c1 Reviewed-on: http://gerrit.openafs.org/9504 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Michael Laß Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit c629ab8faef2cde90219f56542a0a72c42e206e8 Author: Jeff Blaine Date: Sun Jun 5 16:38:53 2011 -0400 Remove completed tasks from todo list, add info about git/gerrit preference Removed completed tasks (fstrace subcommand help in-binary and issue with -noexecute vs. -dryrun in vos delentry) from todo list. Added info about git/gerrit preference for documentation help, but patches still allowed to the openafs-doc list. Reviewed-on: http://gerrit.openafs.org/4803 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8f186c0f7a48059ca561422d58073e22934ea2dc) Change-Id: Iec6e3db185e816f6c1b587cc74cc5ca5a2c93282 Reviewed-on: http://gerrit.openafs.org/9503 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit d76971a08a8a0fb92cbd1b5951bd8798eda3873c Author: Andrew Deason Date: Wed Nov 10 15:21:07 2010 -0600 afscp: Always show fetch/store errors When we get an error from a fetch or store operation, show what the error was, instead of just saying "some network error occured". Reviewed-on: http://gerrit.openafs.org/3290 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8078c4dcf2dd5a922225f0e37babf1b357b5e72d) Change-Id: Icfdce08149e16749097bd6be326312dec6292d34 Reviewed-on: http://gerrit.openafs.org/9415 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 2cf573da487b43e50cfc283fdd03374279d153c3 Author: Andrew Deason Date: Sun Nov 21 21:40:28 2010 -0500 afsd: Remove unused definitions Remove some #defines for s_host and similar things. They are not used anywhere, and they can cause warnings for e.g. s_host being redefined. Reviewed-on: http://gerrit.openafs.org/3364 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit be6fb658fe717469470bcd28c46bee1901c4d96c) Change-Id: I9ca3c81dde7321928c96a80ae46ff9b736c1040e Reviewed-on: http://gerrit.openafs.org/9413 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 96385ddaee0cc31c0ea7e5e9a900a7e58891f82c Author: Ben Kaduk Date: Tue Feb 19 13:06:36 2013 -0500 butc: do not use stack garbage for secobj The butc only ever handles connections over rxnull anyway, so just specify an array of security objects of length one. Reviewed-on: http://gerrit.openafs.org/9140 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 252a5b65c30636bf5f62a49a79e5777004ecd17d) Change-Id: I0b5c112f56553b7ee0ea4e40a9c65f2fe45f8297 Reviewed-on: http://gerrit.openafs.org/9404 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit ecb50e7989f7f197f69873780d71f0ea22a1e7bd Author: Derrick Brashear Date: Mon Feb 25 14:56:37 2013 -0500 afsutil: fix prototype the prototype for afs_config_get_string was broken. fix it. 1.6 fix only; on master, hcrypto provides this Change-Id: Id7f877c197e44437fe41cb89630ce6e1bf2d6e3d Reviewed-on: http://gerrit.openafs.org/9362 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit 8f5c475895542ce119c346bd4a6926f8bf05ccf8 Author: Andrew Deason Date: Thu Mar 7 13:52:25 2013 -0600 tbudb depends on libafsauthent budb_server in src/tbudb requires libafsauthent to build. So, make tbudb depend on libafsauthent. This is a 1.6-only change. On master, tbudb no longer uses libafsauthent. Change-Id: I0737f455323589c28a78d680c6c09fcbcb99d302 Reviewed-on: http://gerrit.openafs.org/9456 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand commit 07b2f0e218f2a2fca4eaef19f364e74c16a48e92 Author: Ben Kaduk Date: Wed Mar 6 13:51:15 2013 -0500 Only have one build rule for budb_errs.c This commit squashes two cherry-picks from master together, as the first one broke the build with pthreaded ubik enabled. The first commit: Author: Simon Wilkinson Date: Mon Feb 21 00:29:33 2011 +0000 budb: Only have one build rule for budb_errs.c budb had two build rules that could produce budb_errs.c, but only one of them also produced budb_client.h. This led to problems with parallel makes, as depending on which rule fired first, budb_client.h might, or might not, exist. Rework all of this so that it's cleaner. Instead of producing two copies of the error table, just make budb_client.h a static file, and include the dynamically generated budb_errs.h from it. This reduces code duplication, and means that we have to run compile_et one less time. Reviewed-on: http://gerrit.openafs.org/4027 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 0d0b5048a5b68d4079b13609775f9234183d1947) The second commit: Author: Andrew Deason Date: Mon Feb 21 13:49:59 2011 -0600 Fix budb build rules for tbudb and WINNT Commit 0d0b5048a5b68d4079b13609775f9234183d1947 only fixed the budb Makefile.in. Make the analagous changes to tbudb/Makefile.in and NTMakefile. Reviewed-on: http://gerrit.openafs.org/4029 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 61453d8f33f6508f8464ffba0657aefb6c7eae3b) Change-Id: I7d35c7557bcd82ba50742f2594bd4bb78cf0e5a5 Reviewed-on: http://gerrit.openafs.org/9405 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 2a474f0284301151ea7342c658b08e17a7afed42 Author: Simon Wilkinson Date: Thu May 19 18:56:27 2011 +0100 vlserver: Use correct memsets in vlentry convertor The various vlentry_to_ conversion functions have obviously been copy and pasted from each other. However, the size of the structure which is being zeroed has not been updated when we are zeroing different structures. Fix this, so that we always clear all of the structure that we are filling. Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66 Reviewed-on: http://gerrit.openafs.org/4773 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 90507fcb104313154679f89ac22c1947c713a65d) Reviewed-on: http://gerrit.openafs.org/9019 Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Reviewed-by: Jeffrey Altman commit 0c4110146d98c73c833d866f202a874784651a64 Author: Stephan Wiesand Date: Thu Mar 14 10:00:14 2013 +0100 make 1.6.2.1 Update configure version strings for 1.6.2.1. Note that macos kext can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha, b beta, f final candidate so we have no way to represent 1.6.2.1. Switch to 1.6.3 dev 1 for macos. Change-Id: I98f4371b8c020ba9ba6a98046690968bbae05744 Reviewed-on: http://gerrit.openafs.org/9600 Tested-by: Stephan Wiesand Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 449672fe9c6c2a9bbf4143cf66c3d737cfa22b8d Author: Chas Williams (CONTRACTOR) Date: Tue Jan 29 22:54:00 2013 -0500 LINUX: ifconfig's output has changed net-tools in Fedora 18 has changed 'inet addr' to just 'inet' (possibly to more closely match the ip command). Reviewed-on: http://gerrit.openafs.org/8987 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear (cherry picked from commit 7d8b636d9493f3c470c1bbffb4a566060b21d98b) Change-Id: Iac819b281a26bbd508805541c80e6f1f281a19f9 Reviewed-on: http://gerrit.openafs.org/9363 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand commit b0a10607f90c4097206bc38cb9bd16e842dbda10 Author: Marc Dionne Date: Fri Jan 18 22:40:03 2013 -0500 Linux: setpag() may replace credentials For recent Linux. setpag() may replace the current process' cred structure with a new one. This is not a problem for most callers, but in the case of processing a SetTokens2 pioctl with the setpag option, the new credentials should be used to determine the target for the token. Reviewed-on: http://gerrit.openafs.org/8924 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b61eac783e8c092cd4ba9f53a2b5ca7d43e08b1b) Change-Id: I66b5f171318964ff40fe78be24e75519183c3a82 Reviewed-on: http://gerrit.openafs.org/8948 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand commit bf9bcd09e6a54eb40e47c7a6cdc060be43be9495 Author: Marc Dionne Date: Wed Jan 9 21:22:27 2013 -0500 Linux 3.8: vmtruncate removal vmtruncate had been deprecated for a while and has now been removed. Do things the new way based on truncate_setsize. Reviewed-on: http://gerrit.openafs.org/8906 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d0479bbaf43900d6733c3f7517926ee9813c9610) Change-Id: Iafc64e19544dec9fcaefad5ad274eac4133f4083 Reviewed-on: http://gerrit.openafs.org/8942 Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 314fcfa35917de0f688374137f0ffa040ea3660d Author: Marc Dionne Date: Wed Jan 9 19:26:54 2013 -0500 Linux 3.8: session_keyring changes The session_keyring is now attached directly to the cred structure and the thread_group_cred structure (cred->tgcred) no longer exists. Adapt code that makes use of tgcred, and use the standard rcu based mechanism to update session_keyring. Reviewed-on: http://gerrit.openafs.org/8905 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c6d27e322a8d3b352554650473a048235a9c763a) Change-Id: If0998ee777ab0d196e19162499eb3ee60c5ff85d Reviewed-on: http://gerrit.openafs.org/8941 Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 5a21be491adc6acd3cc01990910c5675393be953 Author: Andrew Deason Date: Wed Aug 29 11:34:06 2012 -0500 LINUX: Indent osi_machdep.h maze This one isn't so bad, actually, but it still benefits from some indentation. Reviewed-on: http://gerrit.openafs.org/8018 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 579048cb1ec24b09a869928ceb521c8db4201a43) Change-Id: I91bddcafe4141c5e6789b01cc4be1a879b6464d1 Reviewed-on: http://gerrit.openafs.org/9330 Tested-by: BuildBot Reviewed-by: Ken Dreyer Reviewed-by: Derrick Brashear commit 94d5bf11bd5ab0e0df1070cc72426b2bced63b78 Author: Derrick Brashear Date: Tue Feb 12 15:28:24 2013 -0500 make openafs 1.6.2 update version strings for 1.6.2 Change-Id: I60a765f899f09366b6b380b49dc14c191203af15 commit d1855f8e04b43c9e06cf5b8d48e51f7816cf7342 Author: Nickolai Zeldovich Date: Tue Feb 12 15:08:38 2013 -0500 Fix scanf buffer overflows Fix potential buffer overflows caused by misuse of the scanf function in the fileserver and ptserver. Also fix similar issues in the client side fs command and libadmin library. Change-Id: Ia6a46981c50537da1673507c2bc777f96e43f95a commit 6f9c5fd90969bd082076378e011e4e573513e9c5 Author: Andrew Deason Date: Fri Jun 29 12:36:36 2012 -0500 Remove empty Makefile continuation lines HP-UX make gets confused by constructs like: FOO = bar \ BAZ = quux Where a line continuation is followed by an empty line. So, get rid of all of these in the tree. Not all of them matter, but removing all of them makes it easier to find these, and catch them in the future. Reviewed-on: http://gerrit.openafs.org/7611 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Jeffrey Altman (cherry picked from commit 79f68de80e56179cfc5158fdcb51c34cfa864802) Change-Id: Icf379b9d7557746c2c47134b1314a38ec13134cc Reviewed-on: http://gerrit.openafs.org/8991 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Paul Smeddle commit c11e7db935665bcdca2ce26165ebc6f7112c5509 Author: Ken Dreyer Date: Wed Dec 12 10:37:47 2012 -0700 NEWS updates for 1.6.2 Add an entry for 1.6.2 with "in progress" instead of a date to hold the release notes for 1.6.2pre4 rather than creating separate entries for each release candidate. Users who track the release candidates can refer to the public announcements, and this will be cleaner when reading history later on. Reviewed-on: http://gerrit.openafs.org/8750 Reviewed-by: Ken Dreyer Tested-by: Ken Dreyer (cherry picked from commit 265a4b542b717c14e810202078c3ce83e4d851f5) Change-Id: I68d4e6983097a97caac660f740ea8a01f1a95caa Reviewed-on: http://gerrit.openafs.org/8988 Reviewed-by: Ken Dreyer Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 38afe3e041b5a55243641a63c46199a6ebcf45a7 Author: Stephan Wiesand Date: Wed Jan 30 18:46:45 2013 +0100 make openafs 1.6.2pre4 prerelease for 1.6.2 Change-Id: I012e498c5a2a46c0f712f453de03c98b0a5a5187 Reviewed-on: http://gerrit.openafs.org/8989 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit bd3fab65f6545b322f433d7832f6fcaf2d2e0b63 Author: Stephan Wiesand Date: Mon Jan 28 15:53:36 2013 +0100 CellServDB update 28 Jan 2013 Reviewed-on: http://gerrit.openafs.org/8982 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 35ee4abecd2ed77eaa49e9748e4034ad9ad37edc) Change-Id: Idb8b868ddf927b5daf39f25925fff928e599bd14 Reviewed-on: http://gerrit.openafs.org/8985 Reviewed-by: Derrick Brashear Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit a15c40636d2f24f166e94e51643633b21ac13342 Author: Andrew Deason Date: Fri Jan 18 14:27:16 2013 -0600 SOLARIS: Use vn_renamepath as early as possible Commit 6c509601 uses the vn_renamepath when we are building on Solaris 11. However, some recent patch level of Solaris 10 (more recent than stock 10u10) has the same problem fixed by that commit, where vn_setpath takes an additional argument. So instead, just test for the existence of vn_renamepath itself, so we also use it on Solaris 10 when we can. Thanks to Rich Sudlow for reporting this. Reviewed-on: http://gerrit.openafs.org/8920 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1b63689b99b49d902dd5a3286b14dcccee88b4a2) Change-Id: I035c76dba51571fa82fd8932302e7f26b4954333 Reviewed-on: http://gerrit.openafs.org/8984 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit f55084e5496781dd6dec96ca0882a5ce2de22b4f Author: Jonathan A. Kollasch Date: Tue Feb 7 15:23:23 2012 -0600 libafsauthent, tvolser: fix objdir build Reviewed-on: http://gerrit.openafs.org/6689 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb0d056c69489d76a5aad216277bf81ac3420aea) Change-Id: I30b1e5876e9a91b3caaf9d097fd3a886fabe7e7e Reviewed-on: http://gerrit.openafs.org/8945 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit d9ce43be3e7e98641a1b33678d2ec516948e1968 Author: Andrew Deason Date: Tue Jan 22 15:41:38 2013 -0600 aklog: Fix allow_weak_crypto warning It's _crypto, not _enctypes. The user will just be more confused than before if we tell them to do the wrong thing. Reviewed-on: http://gerrit.openafs.org/8938 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot (cherry picked from commit f6f145c90fbc236c350ddaa4d18b359be581496f) Change-Id: I17978b15f140729760ce84f1a7af913eac97d836 Reviewed-on: http://gerrit.openafs.org/8940 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Paul Smeddle commit 0399446de37748aee51af8395203aba6b9712ada Author: Derrick Brashear Date: Tue Jan 22 15:00:29 2013 -0500 darwin: don't process incoming packets during rx shutdown we have a chicken and egg problem because the kpi doesn't let us kill the upcall before we close a socket. a more correct fix (on master) uses atomics, but for 1.6 this is a minimally-invasive fix, macos only and strictly better than before. FIXES 131577 Change-Id: I6003679f709284ae28f51bf5de8deff873346819 Reviewed-on: http://gerrit.openafs.org/8937 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit 5b6a1a619d073c895b938032f5f1b37fcfa7040f Author: Derrick Brashear Date: Mon Jul 16 15:16:53 2012 -0400 macos: future-proof MakefileProto.DARWIN.in if new cases show up which match the current ones, they just work. darwin60 and older were already killed from the tree, kill here also Reviewed-on: http://gerrit.openafs.org/7782 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e6aa586a996e32b3def4b8108815730fcfbf1463) Change-Id: I66bb6eb54856a37d3ff14cf455d90c482443a00e Reviewed-on: http://gerrit.openafs.org/8912 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle commit a167ef4a212f04dd105186f1bccf12bdaa0eea47 Author: Stephan Wiesand Date: Thu Jan 10 17:10:32 2013 +0100 make openafs 1.6.2pre3 prerelease for 1.6.2 Change-Id: I1df309f98b003f6ef88289e4219e24ef00dfbf13 Reviewed-on: http://gerrit.openafs.org/8899 Reviewed-by: Stephan Wiesand Reviewed-by: Paul Smeddle Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 42257f27e69b7ff3f4c0d72a916423280dfd93e0 Author: Andrew Deason Date: Tue Jan 8 17:50:57 2013 -0600 SOLARIS: Avoid open count cleanup for Solaris 11 The comments in here no longer apply to Solaris, as of OpenSolaris commit 11736:63a134e1f09c by Donghai Qiao (4492533 Filesystems may need VOP_CLOSE() for executables following a VOP_OPEN()). This means that this workaround should no longer be necessary for any Solaris 11 release, any illumos release, and anything else based off of OpenSolaris. So, stop doing it. Thanks to Frank Batschulat for pointing this out, and providing all of the details. Reviewed-on: http://gerrit.openafs.org/8895 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08a4b05c27964dd06d7922c134dc2dccc062b379) Change-Id: Ic689ac75fd618945ae7a6e101f29c3610d414603 Reviewed-on: http://gerrit.openafs.org/8897 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 3697dc8506c25a9b108644a94419efa9f12f5f5d Author: Andrew Deason Date: Tue Jan 8 17:41:21 2013 -0600 SOLARIS: Use vn_renamepath when available In Solaris 11.1, the signature of vn_setpath changes; it gains an extra boolean_t argument called 'force'. Instead of trying to adapt to it, call vn_renamepath() instead, which will do the correct thing and call vn_setpath &co for us. vn_renamepath has existed since Solaris 10 Update 8, and is in all releases of Solaris 11. Only call it in Solaris 11, since it makes the ifdefs easier, and there are no problems with calling vn_setpath on Solaris 10. Thanks to Frank Batschulat for all of the relevant information. Reviewed-on: http://gerrit.openafs.org/8894 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6c50960174f35d75fd50956e248318a9c826fca1) Change-Id: Ifdc5bb7785b791d36dc1523421badd29d8df2faa Reviewed-on: http://gerrit.openafs.org/8896 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 9754a288e7439413ae71f1d1e89e387224494dc8 Author: Andrew Deason Date: Fri Jan 4 14:18:40 2013 -0500 SOLARIS: Look for ncurses in ncurses/ncurses.h Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there. Without this, on Solaris 11.1 we will detect libncurses automatically (because it lives in /usr/lib), but not ncurses.h (since it is in ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h, but will try to link to libncurses, which, as you might guess, fails with various undefined symbols. Reviewed-on: http://gerrit.openafs.org/8874 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81dd4878e7a71b5acfd7a6e6f9be26cd6ab28972) Change-Id: I139296ae267ec057fc5ee11634d19ba36c8f8d6c Reviewed-on: http://gerrit.openafs.org/8890 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 5be413b079dfceae7b6881913c14a67561907db7 Author: Andrew Deason Date: Fri Jan 4 13:47:35 2013 -0500 SOLARIS: Avoid areq and auid conflict On new Solaris (11.1), nfs/auth.h #defines areq and auid to access some elements inside the nfsauth_arg structure more easily. We have a lot of functions that use those names as parameters, so the compiler throws an error (since we have a decl like "struct vrequest *areq_u.areq"). We cannot avoid including that header, since we need some NFS-related headers for the NFS xlator, and they pull in nfs/auth.h unconditionally. So, work around this by undefining areq and auid afterwards. Reviewed-on: http://gerrit.openafs.org/8873 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 936c2b02bf6fbeb3844c539665392ae89eb652fe) Change-Id: I54da96a48d163b6aa57bb8525ff4c80f10d70fa1 Reviewed-on: http://gerrit.openafs.org/8889 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 39dc50198e2cf61295e452d52536135a941d73d8 Author: Russ Allbery Date: Thu Jan 3 13:57:02 2013 -0800 Ensure MIN/MAX are defined in userspace builds of rx The include of was removed from rx_packet.h on Linux 2.6 and later to fix kernel builds with 3.7, which doesn't have that header in kernel space. However, while kernel space always provides MIN/MAX defines, userspace relied on the header. On at least powerpc, no other include chain includes sys/param.h, so MIN/MAX were left undefined. Fix this by only skipping the include of on Linux if building in kernel mode. Reviewed-on: http://gerrit.openafs.org/8870 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fe2bae1c83a6d050e0afb88bad8fe02beae343e7) Change-Id: I4b2b123c493ab35cbeff309db7ff58354afc170b Reviewed-on: http://gerrit.openafs.org/8872 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit cf605455b3167f534efdf60931f80cfbf6beec64 Author: Russ Allbery Date: Thu Jan 3 09:13:26 2013 -0800 Fix spelling error (retreive for retrieve) in strings Caught by Lintian analysis of the compiled binaries. Reviewed-on: http://gerrit.openafs.org/8865 Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 2e5ef04e24c89e846af7aae7da57a0b0f5e200c3) Change-Id: Ied16661878edf39fb723e56c2ed997015e566b6e Reviewed-on: http://gerrit.openafs.org/8869 Tested-by: BuildBot Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 075893f250beaf3bb22cebc5fb1f936557cce50c Author: Andrew Deason Date: Fri Dec 28 16:39:15 2012 -0500 afs: Avoid unnecessary panic in ShakeLooseVCaches afs_vcount can change as we traverse the loop. If we successfully evict something from the cache, afs_vcount goes down, but our loop variable 'i' stays incremented. For example, if afs_vcount was 100 at the start of the loop and we kicked out 50 things, by the time we traverse the entire VLRU, we could have iterated over the loop 100 times, but afs_vcount would still be just at 50. So, remember what afs_vcount was at the start of the loop, and use that for our loop limit. Note that vcaches cannot be added to the VLRU during the execution of this loop, since we're just kicking stuff out. And nobody else can modify the VLRU but us, since we're holding afs_xvcache, and if we drop afs_xvcache, we restart the whole eviction process. The bug here was introduced by commit bc6dd950, but usually did not affect Linux until commit 696db866. FIXES 131553 Reviewed-on: http://gerrit.openafs.org/8849 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 1cee097b5bf44b0d8273712f0074b541f0f3f96e) Change-Id: I1bdbe41980e03522905217e55f745a96fb2bdc2d Reviewed-on: http://gerrit.openafs.org/8867 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 2e50eb38bfeda46bdafeada36140bebe06d29c9c Author: Andrew Deason Date: Fri Dec 28 16:36:42 2012 -0500 afs: Consolidate ShakeLooseVCaches retry init Don't duplicate the initialization code in effectively three separate places. Just goto the top of the loop again. This should incur no functional change; it's just reorganization. Reviewed-on: http://gerrit.openafs.org/8848 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 36959b50e513d4e9d4d2be93965eec2537943de5) Change-Id: If1277fd4f1cc4adb03695688bcc54ae65715f1a8 Reviewed-on: http://gerrit.openafs.org/8866 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit fa0c841d2b8fdf8bb77fac871358995271bedfda Author: Hans-Werner Paulsen Date: Fri Dec 21 09:04:19 2012 +0059 Do not call afs_MarinerLog when afs_mariner is not set When mariner log is not set up (afs_mariner=0), do not call afs_MarinerLog, otherwise a osi_NetSend() to hostaddress=0 is tried, which will give you ICMP messages in the socket error queue. Do not call afs_AddMarinerName, when afs_mariner is not set. (cherry picked from commit 41f8d6b9239d8ee1ca786c0485bea4251c96b9e5) Change-Id: Id9584b07a0d3726fdd2176ac04945f976255e2d4 Reviewed-on: http://gerrit.openafs.org/8801 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle Reviewed-by: Stephan Wiesand commit 7507bc7375d9cf908c1cc17ff821c41be84bf930 Author: Simon Wilkinson Date: Fri Apr 6 23:56:30 2012 +0100 shlibafsauthent: Add a load more objects The perl-AFS module needs to link against a pthreaded, PIC, library that contains all of the routines that it provides perl shims for. At the moment, libafsrpc_pic and libafsauthent_pic are the only such libraries that OpenAFS provides. Add all of the necessary objects to libafsauthent_pic such that the 2.6.2 version of perl-AFS can build with a minimal set of patches. Minimise the damage by only making these available through the static version of the libafsauthent_pic library. Reviewed-on: http://gerrit.openafs.org/7070 Tested-by: BuildBot Reviewed-by: Jeffrey Altman This is a 1.6 version of this change, which adds some additional symbols and objects to cater for differences between master and 1.6 The changes aren't relevant to master, as the whole shared library situation there is now completely different. Change-Id: Iad596cd92bc883e47c5d261886db61e9c7482112 Reviewed-on: http://gerrit.openafs.org/8811 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Stephan Wiesand Reviewed-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle commit 65568d6d5938489deb986d1365c8a7bd2029be27 Author: Simon Wilkinson Date: Fri Dec 21 13:09:22 2012 +0000 shlibafsrpc: More exports to support perl-AFS 2.6.3 Add some additional exports for perl-AFS 2.6.3 This patch isn't applicable on master, as our whole shared library infrastructure there has changed. Change-Id: Ie1f399c9fcb1638501533a45ff9a17f95bc98afc Reviewed-on: http://gerrit.openafs.org/8810 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle commit 88c9f12fc6096af44204deb8003ff654afe0b348 Author: Simon Wilkinson Date: Thu Apr 5 15:43:23 2012 -0400 shlibafsrpc: Add additional XDR functions Export the afs_xdr_pointer and afs_xdr_u_char functions so that shlibafsauthent can make use of them. Reviewed-on: http://gerrit.openafs.org/7065 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00992c66972aeab96cca9781b02a780ab49dce23) Change-Id: I48ef13427c53e8fe3ceca00eb5d9d35c2c4327d7 Reviewed-on: http://gerrit.openafs.org/8809 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Reviewed-by: Paul Smeddle 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 commit b9faf2ecb1fa7fc6045c46d472569674fa53e5cb Author: Derrick Brashear Date: Mon Jan 23 14:39:05 2012 -0500 make openafs 1.6.1pre2 prerelease for 1.6.1 Change-Id: I3dbef9e4d360314cd4c789268d7b0d5c5011f6fc Reviewed-on: http://gerrit.openafs.org/6614 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 88afb6b0b1bb6c9bf817af462742bd7e14cacf86 Author: Derrick Brashear Date: Thu Jan 5 17:19:45 2012 -0500 viced: disable rx keepalives during disk io when we are going to hit the backend storage, disable keepalives. the net effect of this is that no idle dead time is needed; instead, the normal dead time will result in a connection with no activity simply dying naturally if i/o blocks forever. it's important that keepalives be enabled during callback breaks, so that is done. (cherry picked from commit 05f3a0d1e0359f604cc6162708f3f381eabcd1d7) Reviewed-on: http://gerrit.openafs.org/6515 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Change-Id: If2ee7f3ad7f2dc835dd350bb9558fde0aa179240 Reviewed-on: http://gerrit.openafs.org/6613 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b872544d0fa3a812d5f95b8cc720b6f1e5677c8 Author: Jeffrey Altman Date: Mon Nov 28 12:58:02 2011 -0500 rx: RX_CALL_IDLE and RX_CALL_BUSY Allocate new Rx error codes for Idle and Busy calls but do not send these errors on the wire. They are only intended for local use. RX_CALL_IDLE is an indication to an application that requests it that the rx peer is maintaining an open call channel but has not sent any actual data for the length of the registered idle dead timeout. RX_CALL_BUSY is an indication to an application that requests it that the rx peer believes the selected call channel is in use by a pre-existing call. When either RX_CALL_IDLE or RX_CALL_BUSY are assigned as the call error and an abort must be sent to the rx peer, the errors are translated to RX_CALL_TIMEOUT. This is necessary because it is not possible to add new Rx error values in a method that is safe for peers that are not expecting them. This patchset also documents which Rx errors defined in rx.h are used on the wire and which are not. The Unix and Windows cache managers are updated to build with these new error codes. eviewed-on: http://gerrit.openafs.org/6128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c7673f4fad8e8b9390564e3cbfa11d5f1b52ba2f) Change-Id: I4c7d6733ddae03bda5a31fe4486ada090dcfd0b3 Reviewed-on: http://gerrit.openafs.org/6612 Reviewed-by: Derrick Brashear commit afce83a96799220f661e090fb5fcc7fe42f75797 Author: Andrew Deason Date: Mon Mar 7 11:08:26 2011 -0600 RX: Avoid timing out non-kernel busy channels When we encounter a "busy" call channel (indicated by receiving RX_PACKET_TYPE_BUSY packets), we can error out a call with RX_CALL_TIMEOUT to try and get the application code to retry the call. However, many RX applications are not aware of this, and will just fail with an error upon receiving a single busy packet. So instead, make this behavior optional, and only do it if the application tells us what specific error it expects to receive when a busy call channel is detected. Enable this behavior for the Unix cache manager, as it can cope with receiving an RX_CALL_TIMEOUT error in this scenario. (cherry picked from commit eddcee3ad518dff9fbfda790640c5bfd2e97ef5a) Reviewed-on: http://gerrit.openafs.org/4159 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I3938e79ab009f14f5421a4a45e2a099276c49f24 Reviewed-on: http://gerrit.openafs.org/6611 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 05fb2529771d8f2230d384de1974b41c5ac57175 Author: Derrick Brashear Date: Thu Jan 12 16:48:54 2012 -0500 libafs: add replicated connection pool keep pool of connections to use for replicated volumes, so we can have a separate idle time setting (cherry picked from commit cd1f72649650404581cfcdcf3beeeaf2bb960bd6) Reviewed-on: http://gerrit.openafs.org/6546 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I056ba28d11313c9925df63869e0c55a1a4f132da Reviewed-on: http://gerrit.openafs.org/6610 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 428400fb831f7b4673973a0d2842ff536b7952c0 Author: Andrew Deason Date: Fri Jan 13 13:43:16 2012 -0500 vol: remove SYNC fatal_error processing Currently SYNC clients will "disable" themselves on certain error patterns. For example, if the server end closes its file descriptor too many times, or takes too long and then closes the fd, the SYNC client will return an error and set fatal_error. On any subsequent SYNC requests, the request will immediately fail without contacting the server, often making SYNC client programs effectively useless until they are restarted. There isn't really any reason to cause future requests to fail. Transient problems in the fileserver can easily make this situation possible (e.g. a fileserver can crash but still take several minutes to close the SYNC fd while the core is written to disk), and so while we may return an error for a specific problematic request, future requests may be fine. So, just remove everything related to fatal_error, so future SYNC requests can continue to be attempted. Adjust some log messages to reflect the new behavior. Reviewed-on: http://gerrit.openafs.org/6548 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 40bf6dee2409197f7494c3d09bf2dea7c248d185) Change-Id: I0f7a1792afd1ace3beabe238107d0a5069ccbb44 Reviewed-on: http://gerrit.openafs.org/6609 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 339438c8473110bebdd31b23706e2e387560723f Author: Marc Dionne Date: Tue Jan 17 20:19:54 2012 -0500 rx: Correctly test for end of call queue The intention of this condition is to check if the current call being considered is the last one on the queue, but the test is incorrect. A null next pointer indicates a removed item, not the end of the queue. Use the queue_IsLast macro instead to correctly determine that this is the last item in the queue and that a call has to be selected, either the current one or a previously seen good choice. This can cause calls to get permanently stuck in the call queue and never get assigned to a thread, even when all threads are idle. Reviewed-on: http://gerrit.openafs.org/6564 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 6ad3d646e62801cb81a3c9efeac320daa44936e1) Change-Id: Ic9d0ff51c79115960ebb4634fc35a5e9da21c380 Reviewed-on: http://gerrit.openafs.org/6570 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 39f051191189857c79b1f4c23eb509ce94d6271e Author: Marc Dionne Date: Wed Jan 18 10:25:03 2012 -0500 Linux: use standard macro for set_nlink configure test A generic macro exists to test for functions in the kernel, use it for set_nlink. Reviewed-on: http://gerrit.openafs.org/6566 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 64bd0b728ca95ba7bb4f1fdd909386fde3ce81e1) Change-Id: I93d169bec8f476d5e692f7f5a7fe31002af7ce1e Reviewed-on: http://gerrit.openafs.org/6569 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e6ddb2a18857e1e1509d910e46c4b6959e2df789 Author: Andrew Deason Date: Wed Jan 11 10:00:35 2012 -0500 vol: Fix VCreateVolume special inode cleanup In order to dec the relevant special inodes, we need to know the parent vol id in addition to the vol id itself. Use the appropriate volume IDs when IH_DEC'ing special inodes after we fail to create the volume, so we don't leave behind special inodes. (cherry picked from commit 627cfb1d4e7b32b4342c59b162a36ba9beb8a066) Reviewed-on: http://gerrit.openafs.org/6529 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I9f40f170cd6a0fffe2e17fc199af99e087066902 Reviewed-on: http://gerrit.openafs.org/6550 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60efe6b9330d98000bd9105d63815703db0d95a7 Author: Andrew Deason Date: Wed Jan 11 10:28:56 2012 -0500 DAFS: Fix SYNC_FAILED VScheduleSalvage_r log SYNC_FAILED is not an unknown protocol code, so stop saying it is. Reviewed-on: http://gerrit.openafs.org/6530 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fda2fe8538e00baddcd7fcf2c669162634b9d14e) Change-Id: Ibd70b9f95031baf4955d503d7eb8b5f3a50febf7 Reviewed-on: http://gerrit.openafs.org/6549 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5a9fa5d08753056dc24241e3e768852ed6f71f35 Author: Derrick Brashear Date: Fri Jan 6 06:53:46 2012 -0500 rx: add and export a public keepalive toggle make enabling and disabling keepalives a public function. export the function (cherry picked from commit 2a31f35936698c504c863702ebb675ac9dfe47e1) Reviewed-on: http://gerrit.openafs.org/6517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Change-Id: If7bd2b72980dd92771614a6d73a04441222a8314 Reviewed-on: http://gerrit.openafs.org/6522 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 946fee039b82a0f9bbae0c13206dcd43285456c0 Author: Derrick Brashear Date: Fri Jan 6 06:33:22 2012 -0500 afs: put back conn if not using in checkserver loop we get a conn, check it for eligibility, and if not, just abandon it. "oops" (cherry picked from commit 26fc0cda94c24a1c5f0bef109bca920456c25265) Change-Id: I8e4f762b5170f07d6abc3508e88f001ca147c3a7 Reviewed-on: http://gerrit.openafs.org/6521 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 873ac9cc9412d4e2a8631ea27c80c67ba6de9f51 Author: Andrew Deason Date: Sun Jan 8 11:31:39 2012 -0500 Make libjafs buildable again libjafs is surprisingly close to being buildable. Fix a few misc things which have bitrotted over the years so it is possible to actually build: - Add -I$SRC/config to the cflags, so we can include afsconfig.h - Remove references to the nonexistant rxkstats.o - Do not link with UAFS' AFS_component_version_number.o, since this gives us duplicate version number symbols - Include afs_vosAdmin.h in Group.c, to satisfy some missing symbols Reviewed-on: http://gerrit.openafs.org/6524 Reviewed-by: Steven Jenkins Tested-by: Steven Jenkins Reviewed-by: Derrick Brashear (cherry picked from commit 967d7201ee5c27db6d75d5efafcad9458e2b5167) Change-Id: I0cb510e3f115c2c35f06cf9cbddaf31835704eea Reviewed-on: http://gerrit.openafs.org/6527 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 57a45a64bb5b97c68de2d786b5803def24315f51 Author: Marc Dionne Date: Fri Jan 6 17:22:35 2012 -0500 libuafs: only rebuild h directory when needed A few changes to allow a "make all ; sudo make install ; make all..." workflow to work without manually removing files in between. Make the rebuilding of the h directory dependent on the source files scanned to build it. This prevents it from being rebuilt for every "make install". While we're here, use -f when removing linktest for the clean target. This allows "make clean" to remove it without prompting when the user doesn't have write access to the file, as is the case when make install rebuilds it as root. Reviewed-on: http://gerrit.openafs.org/6519 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 2caf0778ddeb6eeb854360cac20c6b3f0894f3eb) Change-Id: Id4ccad953669538072b834a6aa49b8beaeeeed35 Reviewed-on: http://gerrit.openafs.org/6526 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3d4c44b61d035f9249a341d29cd93948f3ea3ec3 Author: Derrick Brashear Date: Wed Jan 4 15:04:41 2012 -0500 afs: discard cached state when we are unsure of validity in the event we got a network error, we don't know if the server completed (or will complete) our operation. we can assume nothing. a more complicated version of this could attempt to verify that the state is what we expect it to be, but in extended callbacks universe this is potentially easier to solve anyway. for now, return the error to the caller, and mark the vcache unstat'd. (cherry picked from commit c2fc7e0f66621fc97f5b4dc389d379260638315c) Change-Id: Ic38cf16e47664e6f36ad614735b42d3f4e5a6ce2 Reviewed-on: http://gerrit.openafs.org/6520 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6479bb29d494077f31d0ddc3d165164b302b2e3f Author: Andrew Deason Date: Fri Nov 18 10:25:08 2011 -0600 DAFS: Atomically re-hash vnode in VGetFreeVnode_r VGetFreeVnode_r pulls a vnode off of the vnode LRU, and removes the vnode from the vnode hash table. In DAFS, we may drop the volume glock immediately afterwards in order to close the ihandle for the old vnode structure. While we have the glock dropped, another thread may try to VLookupVnode for the new vnode we are creating, find that it is not hashed, and call VGetFreeVnode_r itself. This can result in two threads having two separate copies of the same vnode, which bypasses any mutual exclusion ensured by per-vnode locks, since they will lock their own version of the vnode. This can result in a variety of different problems where two threads try to write to the same vnode at the same time. One example is calling CopyOnWrite on the same file in parallel, which can cause link undercounts, writes to the wrong vnode tag, and other CoW-related errors. To prevent all this, make VGetFreeVnode_r atomically remove the old vnode structure from the relevant hashes, and add it to the new hashes before dropping the glock. This ensures that any other thread trying to load the same vnode will see the new vnode in the hash table, though it will not yet be valid until the vnode is loaded. Note that this only solves this race for DAFS. For non-DAFS, the vol glock is held over the ihandle close, so this race does not exist. The comments around the callers of VGetFreeVnode_r indicate that similar extant races exist here for non-DAFS, but they are unsolvable without significant DAFS-like changes to the vnode package. Reviewed-on: http://gerrit.openafs.org/6385 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8e15e16c9e6a5768f31976cc21b48d5bb10617b7) Change-Id: I915d18c4252b698f39fdf65793311a39381096b4 Reviewed-on: http://gerrit.openafs.org/6495 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 70fe8ec10943e0ef56b60880064b30ed7804071d Author: Andrew Deason Date: Mon Dec 26 21:22:08 2011 -0500 afs: Grab a reference to setp in afs_icl_Event4 We can drop GLOCK in several places in afs_icl_Event4 and the afs_icl_AppendRecord callee. To ensure that the given afs_icl_set does not get freed while we have GLOCK dropped, grab a reference to the set. Thanks to Ryan C. Underwood for reporting an issue triggered by this. Reviewed-on: http://gerrit.openafs.org/6431 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7461fa11939556d3b6f3ea38da7ff65607805579) Change-Id: I7a33cf96d2031dd1798f7598918396eb8fbde611 Reviewed-on: http://gerrit.openafs.org/6494 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa6aeb61066b9b67fd9418f49cdacba9d074538e Author: Michael Meffie Date: Fri Aug 12 14:29:48 2011 -0400 xstat: cm xstat time values are 32 bit The kernel space cm xstat time structures are implemented as 32 bit values in memory and on the wire. Define the client side xstat userspace structures as 32 bit time values as well to avoid size mismatches on systems with native 64 bit time values. Reviewed-on: http://gerrit.openafs.org/5237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 130144850c6d05bc69e06257a5d7219eb98697d8) Change-Id: I8726efdd7123e9a1e0e4536bf2766c441964475d Reviewed-on: http://gerrit.openafs.org/6386 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c137d248809e7f48471d0315e25a43545f5c08d2 Author: Derrick Brashear Date: Tue Jan 3 15:57:14 2012 -0500 afs: increase idledead time it's actually important this be more than the rx call dead time so timing out server callbacks to clients don't result in us idle deading a call to the server when callbacks need to be broken FIXES 130327 Reviewed-on: http://gerrit.openafs.org/6497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0f4da13137612a9b0c0c3b57aa939d6661fb67f8) Change-Id: I181d89c36175be93ed59226b401d48903fb5f584 Reviewed-on: http://gerrit.openafs.org/6518 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit babc991c0196a1c04e94fca934d2de63f37c6144 Author: Geoffrey Thomas Date: Sat Dec 31 19:51:29 2011 -0500 linux: fsync on a directory should return 0, not EINVAL Directory writes are synchronous, so this is fine. There's a mostly-convenient function in fs/libfs.c that returns 0 that we can use to do what we want ("mostly" because it was renamed in 2.6.35). FIXES 130425 Reviewed-on: http://gerrit.openafs.org/6491 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 267934d0e6910c8d8166a6e78f93c1bab40857b8) Change-Id: Iaeb8a699673b6144c186b470f6d877fb54f1e319 Reviewed-on: http://gerrit.openafs.org/6493 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 31b0156bbf2369e4388243d2c2a09cd00e6041a6 Author: Geoffrey Thomas Date: Sun Dec 11 05:06:24 2011 -0500 rpm: Don't attempt to restart on upgrade when using systemd systemd is actually rather capable of leaving the OpenAFS client in an incredibly broken state, thanks to its willingness to track services and kill their processes. We should not attempt to restart the client on upgrade, whether a normal upgrade or a migration from SysV initscripts. In the former case, it's fine (and correct) for the old AFS to keep running; in the latter case, the unit file is capable of correctly shutting down an initscript-launched client. The same is true for the OpenAFS server. This brings the packaging in line with the SysV initscript code in the specfile, which does not attempt to restart the service, as well as with e.g. Debian's packaging, which uses --no-restart-on-upgrade. While we're here, clean up a redundant BuildRequires on systemd-units. Reviewed-on: http://gerrit.openafs.org/6247 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dee93ff1d114da711df345e06b5e1a682c877315) Change-Id: I4ecf3b2f307a81549e0bd568ab5e4585a2ef1f2d Reviewed-on: http://gerrit.openafs.org/6492 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3e6c1df2f60e1349f34c81ea54e1622fb6f5dd9d Author: Andrew Deason Date: Wed Jun 8 22:50:27 2011 -0500 libafs: memset dirHeader->hashTable Clear dirHeader->hashTable via memset instead of via a loop. This is more efficient, and avoids the loop getting optimized into an unusable _memset call on recent versions of Solaris Studio when building for the kernel. Thanks to Jeff Blaine for reporting the issue with Solaris Studio. Reviewed-on: http://gerrit.openafs.org/4829 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f091ace32e3045da396d577055dafd67888ff7ea) Change-Id: Ia098730c3e83429ce4f886b1427159d13eff4c4e Reviewed-on: http://gerrit.openafs.org/6414 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit eb4bee410a7d9c098dac8cdfa9695ff77983fa87 Author: Andrew Deason Date: Mon Dec 19 17:11:31 2011 -0500 Include afsconfig.h before anything else afsconfig.h can define various preprocessor symbols that can affect how system headers behave. For example, the presence of the _POSIX_PTHREAD_SEMANTICS symbol changes the number of arguments to getpwnam_r on at least Solaris 8. So, we must include afsconfig.h before including anything else, to ensure consistency. FIXES 130413 Reviewed-on: http://gerrit.openafs.org/6387 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 37f537a21db6d560dd16a53ff5e0d2f0456d4c48) Change-Id: I64970fd06af9a13d91acaf03b80a2baf224754ff Reviewed-on: http://gerrit.openafs.org/6388 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6908f7d93a6d8d24ad574054eb8f2aa722894e3c Author: Andrew Deason Date: Sun Dec 18 15:20:42 2011 -0600 aklog: Add replacement setenv/unsetenv aklog makes use of the setenv and unsetenv functions, which do not exist (at least) on HP-UX earlier than around 11i v3, and do not exist on Solaris earlier than Solaris 10. Add replacement functions for setenv and unsetenv when they are not present. Note that these implementations are copied from libroken, and setenv was modified to not use asprintf. This is 1.6-specific. On the master branch, libroken takes care of these for us. On the master branch, setenv and unsetenv from libroken were added in 70e8451acd0426024c152073e53bc6606e0189e1. Change-Id: I35546f1add7f4f87c6ffc484059057825887499f Reviewed-on: http://gerrit.openafs.org/6376 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 965b0139e6e8e3180a90fc7509f9f16da5f79d93 Author: Derrick Brashear Date: Fri Nov 4 16:29:17 2011 -0400 make openafs 1.6.1pre1 prerelease for 1.6.1 Change-Id: Ia54b5c304791ebfc33b7043af9ea3688442e4b81 Reviewed-on: http://gerrit.openafs.org/5809 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f8818eb569d1da05a157f31bbcc927e028372a33 Author: Andrew Deason Date: Wed Dec 14 14:42:08 2011 -0600 afs: Clear VHardMount on ResetVolumeInfo afs_Analyze sets VHardMount on a volume struct when a hard-mount scenario is encountered, and clears it after sleeping. However, if the volume struct has VRecheck set, or if it's not in memory, afs_Analyze cannot retrieve the volume struct in order to clear VHardMount again. For the VRecheck case, this can results in VHardMount never getting cleared, and so hard-mount messages for the volume seem to disappear. So, clear VHardMount when we set VRecheck so this does not occur. For the case where the volume struct is not in memory, this is not a problem, since when we allocate a volume struct again, the VHardMount state will not be retained. Reviewed-on: http://gerrit.openafs.org/6335 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit f469be407789e696c0b9e9a431b4879798a00e2a) Change-Id: If13769445f20336dfba9755f3af0a1499ce16a6d Reviewed-on: http://gerrit.openafs.org/6348 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09fe35b1f3adfd08aa74377d291a4acd638d247b Author: Andrew Deason Date: Wed Jul 20 16:50:52 2011 -0500 libafs: Rate-limit hard-mount waiting messages Limit how often we log "hard-mount waiting for XXX" messages. Without this, it is possible for a client with hard-mounts enabled to spam the kernel log rather excessively (in extreme cases this can even panic the machine on at least some Linux). To keep things simple, just log approximately one message per volume per hard-mount interval. Reviewed-on: http://gerrit.openafs.org/5060 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 530b5ecac51cc7ce61ccddd50868c632c4a47298) Change-Id: I566aa3d411ff100ccc6afa9a5273fb84e6172dd0 Reviewed-on: http://gerrit.openafs.org/6347 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7ebaf1aa6ad316417e1980465f90a91629c1eae6 Author: Andrew Deason Date: Wed Jul 20 15:33:41 2011 -0500 libafs: Remove unused volume "states" flags VResort and VMoreReps are not referenced anywhere in the tree, so remove their definitions. Reviewed-on: http://gerrit.openafs.org/5059 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 6cae7c554e917a26b197167e177bd3eb22bce71a) Change-Id: I0a282dac3a9e31bff4ff37c61275cc7c08456cad Reviewed-on: http://gerrit.openafs.org/6346 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8ca56700a8c3835bc735f34e8e82476e7a4c0792 Author: Andrew Deason Date: Wed May 4 12:34:20 2011 -0500 libafs: Avoid using changing unixuser ticket data PSetTokens was afs_osi_Alloc'ing after afs_osi_Free'ing the previous token data. This can sleep, causing tu->stp to be pointing to garbage while we wait to alloc. Additionally, rxkad_NewClientSecurityObject can sleep while waiting to alloc memory, and so the given tu->stp pointer given to it by afs_ConnBySA may be invalid by the time it actually uses the data. To fix this, we could implement unixuser locking to ensure mutual exclusion of these events. However, this implements a more conservative change for the 1.4 and 1.6 branches. In PSetTokens we alloc the new memory before we change anything, and in afs_ConnBySA we make copies of the ticket data before giving it to rxkad. With these changes, the glock gives us enough serialization to avoid issues with tu->stp changing underneath us. This change is specific to 1.4 and 1.6. On the master branch, this issue is fixed by implementing unixuser locks in change Idd66d72f716b7e7dc08faa31ae43e9a23639bae3. Reviewed-on: http://gerrit.openafs.org/4649 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1465946bb6863430bf0efebd024d394549a8775f) Change-Id: Icab5176bf685c408447f0f32ad65c5b003299d3d Reviewed-on: http://gerrit.openafs.org/6345 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit ef65c2e0822c99591afa2ec08d4c38673bf8c6cc Author: Andrew Deason Date: Mon Apr 25 13:58:34 2011 -0500 pam: Fix password torching const-ness In some code branches, the PAM code "torches" a password by zeroing it. However, it does this through a const pointer which we otherwise know is not actually const. Make sure we get better type checking by doing this through a non-const pointer. Reviewed-on: http://gerrit.openafs.org/4554 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5cd4282758317b24d2f63408ab4c62551bbebc03) Change-Id: I94b22a31884dc9b184ec094e5cca4b6b0098cb15 Reviewed-on: http://gerrit.openafs.org/6295 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit fe2d1b6615a43ad6ba3e0df50e3643b7a9476131 Author: Marc Dionne Date: Sat Apr 16 11:22:54 2011 -0400 pam: Clear up PAM_CONST related warnings on Linux Commit 78d1f8d8 expanded the use of PAM_CONST and introduced many new warnings on Linux where pam expects "const" arguments. This clears up the warnings by doing the following: - Cast "user" to char * when kalling ka* functions - Change the signature of pam_afs_prompt and pam_afs_printf to use PAM_CONST - Use a separate non-const password pointer for pam_afs_prompt Reviewed-on: http://gerrit.openafs.org/4487 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3ea39166d64d2e66cddef015734c2f91548423af) Change-Id: I16179a1c8b9d0e53c90b54733d1c5130f1d23153 Reviewed-on: http://gerrit.openafs.org/6293 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 71d5f66e8679e4c9c67cfe41411b696f5f72733b Author: Stephan Wiesand Date: Sun Apr 17 23:37:36 2011 +0100 make afsdump_scan get ACLs right This makes afsdump_scan get the ACLs right on little endian systems. It also corrects and slightly beautifies some output (indentation, cut&paste error for negative ACL label). Reviewed-on: http://gerrit.openafs.org/4494 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1105d63ddf5a32b9381ff47e8101c3f141366fa6) Change-Id: Iec0fa5bc9673bdce616611f422d74e55b0aa90f1 Reviewed-on: http://gerrit.openafs.org/6292 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4bdded24ec69ed08336fbba041b9a449ce5b01be Author: Andrew Deason Date: Mon Sep 19 11:05:59 2011 -0400 ntohs ubik header size The 'size' field in the ubik header is only 16-bits wide, so we should be using ntohs to read it, not ntohl. The database checking utilities for the prdb and kadb were still using ntohl (vldb was fixed by 591f9b6de9ab3dc5c17ad41af0241527f7f04b31). Reviewed-on: http://gerrit.openafs.org/5466 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e69714739f64475d71633fd4cb3523bc1ae143bb) Change-Id: Id4f677cddcedba3008d349bcf9740168129f8496 Reviewed-on: http://gerrit.openafs.org/6314 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1aaf64bac4e37811b40f7f75d524e4e7de8f82e5 Author: Michael Meffie Date: Fri Sep 16 11:23:18 2011 -0400 solaris: libafs depends on fs/ufs The solaris afs module depends on symbols exported by fs/ufs. Set this dependency in the afs module so the kernel loader will automatically load the fs/ufs driver if is not already loaded, such on zfs only systems. Reviewed-on: http://gerrit.openafs.org/5456 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0cb10104f5af73614e6b7673d3711ddbc3f3a866) Change-Id: Ifcb5e2725bbd2de44218109aac9c20439dadf41e Reviewed-on: http://gerrit.openafs.org/6315 Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 49da70a86e836d4307aae7b5682d8bf6f49ed63e Author: Derrick Brashear Date: Tue Dec 13 12:19:48 2011 -0500 vos: fix code to not triple-negate !!! is !. just write it that way. Reviewed-on: http://gerrit.openafs.org/6252 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 44045af35a6ae44880655115685e0755d6a0c828) Change-Id: I646387f30c178ad512decd507925408183f83894 Reviewed-on: http://gerrit.openafs.org/6329 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e9def7311e36284b83e1a9a015cfb841fa0b2511 Author: Michael Meffie Date: Mon Nov 21 19:12:56 2011 -0500 vol: log error reason on header read failure Log the error reason instead of just VSALVAGE when ReadHeader() fails. Reviewed-on: http://gerrit.openafs.org/6108 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 0d0a8288c1cdd05bbf5717ac45638cf6760ee7a8) Change-Id: Ie49c9ee3ea23873f8d71c80fda45b763bcd8e466 Reviewed-on: http://gerrit.openafs.org/6328 Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 759a0e07cbf16a6789db5479217d8c981dde0b3f Author: Derrick Brashear Date: Tue Dec 13 23:49:38 2011 -0500 libafs: disable mtu discovery we need to rework this to use lack of soft acks instead of this method, which is too fragile Reviewed-on: http://gerrit.openafs.org/6256 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4d76b19b600aad461ee1231eeadb9b7a27b7f117) Change-Id: Iba3f3d9d475959f99759db9e81c05c300aa6cd02 Reviewed-on: http://gerrit.openafs.org/6327 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3eb9ce53de4536144484900cfa811ded5080ec0b Author: Derrick Brashear Date: Tue Dec 13 23:20:01 2011 -0500 libafs: only do pings for default conn with root uid instead of doing it for potentially every unauth user, just do it for root. Reviewed-on: http://gerrit.openafs.org/6255 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 78885611ac8aa6602a4a1f42379c9d78ef226100) Change-Id: Id54f6608b8807289242d094f48e394f0341782da Reviewed-on: http://gerrit.openafs.org/6326 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4b251f18a7af2868e2353131a3dbc6d73065e9f4 Author: Andrew Deason Date: Fri Dec 2 14:36:59 2011 -0600 salvager: Create link table with volume group id The link table needs to be created with the VG id or RW vol id, not the non-RW vol id. Unlike other special inodes, this goes for both the 'parent' and 'volume' volume ids, not just the 'parent' id, since there is only one link table per VG. Without this, the salvager can generate invalid linktable special inodes if it encounters a VG with no inodes for the RW vol. Reviewed-on: http://gerrit.openafs.org/6179 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ae227049fca2519e1f5ae1e8b68efbff10ebb665) Change-Id: Ia8089cae6cb5ab97ef9d4ea306f3c48bead59914 Reviewed-on: http://gerrit.openafs.org/6325 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 903e78e1a27ecc309246f7130112d4e145bb047f Author: Andrew Deason Date: Wed Nov 30 17:41:53 2011 -0600 DAFS: Ensure logging on attach2 errors The attach2 error path transitions a volume to VOL_STATE_ERROR, in case whatever got us to that error path did not already put the volume in an appropriate state. Log when we do this, to make sure we do not end up with a volume in VOL_STATE_ERROR state silently. Reviewed-on: http://gerrit.openafs.org/6168 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 53230846a202a50f6c3a61b38d62ccba8876f89d) Change-Id: I4dbe5c6f8be8820620e7a68c7f42b426211dbb82 Reviewed-on: http://gerrit.openafs.org/6324 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4868585c2e7bf2aeddef025aa3378ed4cf8efcfd Author: Andrew Deason Date: Wed Nov 30 17:35:56 2011 -0600 DAFS: Avoid unnecessary preattach on FSYNC_VOL_ON FSYNC_VOL_ON/FSYNC_VOL_ATTACH can be called to "online" a volume that was actually kept online for the duration of the volume operation. Avoid calling VPreAttachVolumeByVp_r for such a volume if it's already attached, in order to avoid an unnecessary log message and to save a tiny bit of processing. Reviewed-on: http://gerrit.openafs.org/6167 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5d2d00a47cf53054bd18d7404be26bea34cba6f) Change-Id: I2a7f4b214176570e787978dbe0aa2eb8dc57730f Reviewed-on: http://gerrit.openafs.org/6323 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c5f26e035b09c3bd8352f7b435b6ab3470e047c8 Author: Andrew Deason Date: Wed Nov 30 17:21:32 2011 -0600 DAFS: Log more for VPreAttachVolumeByVp odd states When we encounter "odd" states in VPreAttachVolumeByVp_r, say what the actual state we encountered was, along with the attach flags, so we have a better idea of what's going on. Reviewed-on: http://gerrit.openafs.org/6166 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4fd8347e842af61681c1718e456500b92c5b6ea9) Change-Id: If1c6fdba7b097a4bfb9e8e3e972ee56dee43bf2d Reviewed-on: http://gerrit.openafs.org/6322 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3669fd56d39075104fc683cd0627e044ac3d32d5 Author: Andrew Deason Date: Wed Nov 30 17:08:57 2011 -0600 DAFS: Ensure GetVolume errors on ERROR volumes In GetVolume, after we call VAttachVolumeByVp_r, there is no explicit check to see if vp is in VOL_STATE_ERROR state. Make sure we don't try to use such a volume, or blindly transition the volume away from that state. Reviewed-on: http://gerrit.openafs.org/6165 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f59312c0aee1a5376b29262efc6e6ea71264305a) Change-Id: Ibdd5cb5c475409918cdad1e73e2d7ed4ef57bd13 Reviewed-on: http://gerrit.openafs.org/6321 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 012e9e26b8877b00c32c401d1ee7b980dc494849 Author: Andrew Deason Date: Wed Nov 30 14:36:06 2011 -0600 DAFS: Do not transition to ERROR on trivial errors attach2 can result in many different errors; some indicate that the volume is in an inconsistent state, but many others just indicate that the volume cannot be attached for benign reasons (such as VNOVOL if the volume doesn't exist, or VOFFLINE if the volume is being used by a volume utility). Currently, for DAFS, attach2 transitions the relevant volume to the VOL_STATE_ERROR state for almost all errors encountered, even the benign ones. Instead, skip the error state transition for error handling paths that do not reflect a "broken" volume. Reviewed-on: http://gerrit.openafs.org/6164 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5fc2365f5dff7f193781093ecb886b4c7391d5a3) Change-Id: Ia3d732781c98fcda4db7b41cd744db860781594f Reviewed-on: http://gerrit.openafs.org/6320 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8b75b8c44cd46bf88ff66620bb92113a7dd9620f Author: Andrew Deason Date: Thu Dec 1 11:20:41 2011 -0600 SOLARIS: Define BSD_COMP for non-UKERNEL on 5.11 We were defining BSD_COMP twice for UKERNEL. Move one of the #define's up to the !UKERNEL section. Reviewed-on: http://gerrit.openafs.org/6162 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0ee7fcc0a49494ad66778012b7808f80ee3af8d3) Change-Id: I683e1be2141c0cecac3f60ac4928d3e84a96bef8 Reviewed-on: http://gerrit.openafs.org/6319 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 240149f529b54c8586d9e20f145f7c4e9b99603c Author: Andrew Deason Date: Tue Nov 15 11:53:12 2011 -0600 vlserver: Avoid atoi for vol ids Reviewed-on: http://gerrit.openafs.org/6050 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d113c0eb8ac4717cafd7747a78c5aa3b649b8e68) Change-Id: If965a7442262048048be9eca3e643c01d7b5c277 Reviewed-on: http://gerrit.openafs.org/6318 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8cc7308aaa9467d8847fb53f2c0e42a29828fd14 Author: Marc Dionne Date: Sat Oct 22 09:32:33 2011 -0400 cache bypass: don't define iovecp for UKERNEL iovecp is defined but not used for UKERNEL. Define it conditionally to avoid gcc warnings and --enable-checking failure. Reviewed-on: http://gerrit.openafs.org/5650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 547d94edd3affb5f377cd1b3db39c46ca0cf5aec) Change-Id: I700b82173b5c2435a716aaf10541e1583f2655f5 Reviewed-on: http://gerrit.openafs.org/6316 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e07057bbde8e8c84cb78bc4f3bb22025b06735cd Author: Derrick Brashear Date: Thu Sep 15 13:48:31 2011 -0400 rx: arrange for Finalize to really stop running calls previously rxi_ServerProc would happily error a call once rx_tranquil was set, but keep calling ExecuteRequest. Reorder code so kernel shutdown attempts are processed first; then arrange if we are tranquil to not process the call further. Issue discovered by Chaskiel Grundman. Reviewed-on: http://gerrit.openafs.org/5447 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6196abf3c864f8cc6ab1efc6e5625a5cc68158bd) Change-Id: I00fad117ee8386fc29cd2423aa9fb7d89af55160 Reviewed-on: http://gerrit.openafs.org/6313 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f10ee6b52252c8e2663da0ec8786b88e570d3f32 Author: Todd Lewis Date: Sun Sep 11 12:42:47 2011 +0100 RPM: Fix dkms support on Fedora 15 Newer dkms no longer uses or supplies a $kernelver_array variable; instead it uses $kernelver. The attached patch uses both, one of which will be empty, so the test will do the Right Thing regardless of your dkms version. Further, the "mv" command at the end of the MAKE[0]= line needs lots of back-slashes on each of its parms. We need three to make it all the way to the final dkms.conf file -- so that's six -- plus one more to escape the '$'; that's seven in all. In case there's any question (and with all the back-slashes involved, there should be) about the intent here, the whole point of this patch is to make the final dkms.conf MAKE[0]= line look like this (module line breaks: MAKE[0]="KMODNAME=openafs.ko; DSTKMOD=\".\"; [ \"\`echo \"${kernelver_array[0]}${kernelver[0]}\" | sed -e 's/^\([0-9]*\.[0-9]*\)\..*/\1/'\`\" = \"2.4\" ] && KMODNAME=\"libafs-*\" && DSTKMOD=openafs.o; ./configure --with-linux-kernel-headers=${kernel_source_dir} --with-linux-kernel-packaging; make; mv src/libafs/MODLOAD-*/\\\$KMODNAME \\\$DSTKMOD" This is what was required to get "dkms build ..." to work on Fedora 15, and as near as I can tell it shouldn't break 2.4 or other builds. FIXES 130211 Reviewed-on: http://gerrit.openafs.org/5393 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e) Change-Id: I47b0e24a0cbbd8402d5dd902e7e2af59ca1c30b7 Reviewed-on: http://gerrit.openafs.org/6312 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 44597ff4ce39001c7d19f8497f4fc0786d19d660 Author: Derrick Brashear Date: Fri Sep 2 13:35:24 2011 -0400 aklog: strlen(NULL) doesn't work strlen(filepath) when !filepath isnt going to work very well. i believe this to be the intent of the author of the original patch. Reviewed-on: http://gerrit.openafs.org/5328 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit c3e82ee98bf66058636f11d7a98d3bebe3bac955) Change-Id: I89911d2da314059db633c00c69c9c9ec2050bb86 Reviewed-on: http://gerrit.openafs.org/6311 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 05f3dcdbbfc8abf3eda113b940072d6667d223d3 Author: Andrew Deason Date: Mon Aug 29 13:07:01 2011 -0500 ihandle: OPEN fdPs are not counted in ihP refcount Just add a comment explaining that an OPEN FdHandle_t does not count against the ref count for its parent IHandle_t. Recently I've seen some confusion about this when discussing ihandle internals, and this should make this abundantly clear. Reviewed-on: http://gerrit.openafs.org/5317 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0f4dfaed6b25ae4282298cc2ba4908ce9f36f043) Change-Id: Icd0d5b368ccc679967e14b2460f47c814598c797 Reviewed-on: http://gerrit.openafs.org/6310 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b18653de7ae90491c2e75f4a98410581655d776c Author: Derrick Brashear Date: Tue Aug 23 00:20:37 2011 -0400 xserver lock order violation individual volume locks are pretty far down, well after afs_xserver. afs_SetupVolume (with tv->lock)-> InstallUVolumeEntry-> afs_GetServer. Install*Volume is careful to protect against recursing into the volume lock via ResetVolumeInfo. Unfortunately, GetServer acquires xserver, and then if it needs to call GetCapabilities, it drops and reacquires xserver. turns out the volume locks weren't protecting much. they also aren't grabbed before xvolume is dropped. fine, so, restructure to do all the work, then merge the result. Reviewed-on: http://gerrit.openafs.org/5303 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 16dff61e148ce6893a68dda6e05e84f96fa753ac) Change-Id: I7ca73fe9cf76e9a47cdccfc6cf0e9188fce9f5a6 Reviewed-on: http://gerrit.openafs.org/6309 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f2bf60ed4f1323cd6f74f2f01114f7e4f714db53 Author: Derrick Brashear Date: Mon Aug 22 14:56:03 2011 -0400 xvcb lock order violation afs_FlushVCBs(1) = xvcb, xserver (in that order) afs_GetServer = xserver, xsrvAddr, (call afs_RemoveSrvAddr which calls afs_FlushServer, which gets xvcb) "nope". do a little dance to get xvcb, searching for a struct server to reuse again if we had to block. if you're curious: Lock afs_xserver status: (reader_waitingwriter_waiting, write_locked(pid:1589 at:36), 3 waiters) Lock afs_xvcb status: (none_waiting, write_locked(pid:0 at:273)) Lock afs_xsrvAddr status: (none_waiting, write_locked(pid:1589 at:116)) Reviewed-on: http://gerrit.openafs.org/5294 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 12fa5b859b857aaf0ab6975ebac0d4867d0ae0ff) Change-Id: Ifee367fef4da44bcfd92cea6d26612977d6653a1 Reviewed-on: http://gerrit.openafs.org/6308 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7c442bdb290abb30f7a39183cca9b20b088bb73e Author: Derrick Brashear Date: Wed Aug 24 20:40:38 2011 -0400 aklog: work around lion kerberos disaster fine, so, instead of needing weak crypto enabled, use krb5 config paths trick and ship a config to deal. Reviewed-on: http://gerrit.openafs.org/5310 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 33bb5218ba8d6c5b5c5c4839fd31824ca90c062b) Change-Id: I91a8a02638cadf6f55814763b16cc50d3c7334c5 Reviewed-on: http://gerrit.openafs.org/6307 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a951c459f7f5a3838be2d07ea08999f0e555f6c5 Author: Andrew Deason Date: Wed Aug 24 12:30:00 2011 -0500 ihandle: Actually assert active fdPs are not AVAIL FdHandle_t's that are on the linked list for an associated IHandle_t should not be in the state FD_HANDLE_AVAIL. For the non-PIO case, we assert that this is the case in ih_open (since we assert that if the FdHandle_t is not in INUSE state, then it must be in OPEN state). However, for the PIO case, we were just skipping over any FdHandle_t's that were in the AVAIL state. These should never exist while on that linked list, so assert for the PIO case, as well. In the absence of bugs, there is no functional change here, but it perhaps makes the ih_open loop easier to understand. Reviewed-on: http://gerrit.openafs.org/5307 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 6d79cfb36165c33dd1fd9c4d7ca8436d9a78f7ff) Change-Id: If9e74f6120b007368128aead8787d715a1b1f093 Reviewed-on: http://gerrit.openafs.org/6306 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2e0c077c8faebc261e73cb03a1e37007c161bf0e Author: Matt Benjamin Date: Wed Aug 24 16:23:37 2011 -0400 LINUX vcache lock ordering in afs_linux_readdir Normalize shared and exclusive lock operations. Take the lock exclusive immediately, since the code assumes a write lock if the vcache state is in flux or the entry is being fetched, releasing -write- rather than shared, since we do not hold a shared lock. Reviewed-on: http://gerrit.openafs.org/5309 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit fa97579a08cdf23fcff3c50a5845d72a785feeaf) Change-Id: I282913fead10791751ebaf3c7c6b33e3fbd9a1f7 Reviewed-on: http://gerrit.openafs.org/6305 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e7e1d685f579ec5d83ac713835d173b99b9b072f Author: Garrett Wollman Date: Sat Aug 6 23:36:14 2011 -0400 butc: initialize startTime before it is used In some unusual error situations, startTime may be used uninitialized. Move the initialization up above the first such error condition. (None of the intervening code can take measurably long to execute so this should not make any difference in the non-error case.) Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5165 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 34cc26a1b11bc8cf8f91996a019ac4b7d21dccd8) Change-Id: I70e08b61fbc33857da88224a0577330a0d68d9a7 Reviewed-on: http://gerrit.openafs.org/6304 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0ea8851076d9255c537b42bc2ecc5a1f241d260d Author: Andrew Deason Date: Wed Jun 8 13:19:59 2011 -0500 afsd: Fail gracefully on mtab open failure On Linux and IRIX, fail gracefully when we fail to open /etc/mtab, instead of segfaulting. Move strdup'ing cacheMountDir until after opening /etc/mtab, to simplify the error handling. Reviewed-on: http://gerrit.openafs.org/4825 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b1f0bb472e237f5a6f88449db44f030c08a5a324) Change-Id: Id12f6190eac15593dd32fd46db354e169d19dc2f Reviewed-on: http://gerrit.openafs.org/6303 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5fb00398ef02bf453195a0bc50f5df95788557c7 Author: Simon Wilkinson Date: Tue May 31 08:28:51 2011 +0100 vos: Don't leak/overflow bulkaddrs The vos listaddrs command repeatedly reuses a bulkaddrs array. It zeros it once (without freeing the allocated memory), and then repeatedly uses it without zeroing in a loop. This means that the XDR library assumes that a sufficiently large block is already allocated, doesn't reallocate for the incoming data, or check limits. This means that if the first call to VL_GetAddrsU returns a set of addresses smaller than subsequent calls, we'll write past the end of the array, causing memory corruption. Fix this by freeing the arrays correctly with each pass of the call. Reviewed-on: http://gerrit.openafs.org/4756 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b6add117ad210665a811213fe17a30fabbda3a3c) Change-Id: Ic3ae8f506e87d18fdc121ff21221f61c359e38aa Reviewed-on: http://gerrit.openafs.org/6302 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 81d44944794748ff3211158d3a1c0c9746100b8e Author: Michael Meffie Date: Fri May 20 14:44:39 2011 -0400 volinfo: fix size totals when saving inodes Fix the volume size calculation when volinfo is invoked with both -sizeOnly and -saveinodes at the same time. Reviewed-on: http://gerrit.openafs.org/4691 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ababc1ba4412ae94b29f8ba0832eac087a024af2) Change-Id: I371a983078c12e09474051ba71f63cdeb57c3631 Reviewed-on: http://gerrit.openafs.org/6301 Reviewed-by: Michael Meffie Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b9c7f07cb2b8c34e0af97a2b6969848a1cbf75a4 Author: Andrew Deason Date: Mon May 16 13:45:49 2011 -0500 libafs: Always use anonymous VL connections afs_NewVolumeByName was using the areq given by the caller for afs_SetupVolume, which may represent authenticated credentials. Give afs_SetupVolume &treq instead, which will be anonymous, so we don't have to deal with rxkad for VL lookups. Reviewed-on: http://gerrit.openafs.org/4666 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4a82c0cc4167b729108813965bd39bf86ea15e6b) Change-Id: Ic10e85b925176719c6c5dc708a1d1a315409d295 Reviewed-on: http://gerrit.openafs.org/6300 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9d4f34bd084eaae203e061e6896c423e1c4c9f38 Author: Andrew Deason Date: Mon May 16 15:16:30 2011 -0500 viced: Don't VTakeOffline_r without glock We don't have the volume glock, so don't call _r functions. Reviewed-on: http://gerrit.openafs.org/4669 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ef0ac2fbb026385f2306189230c2cff8706dff06) Change-Id: I3d7c2ca8a514d50c01d4830640e806cefac32af1 Reviewed-on: http://gerrit.openafs.org/6299 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a5521b6b70ab197259bd048c1d39eaef962f383c Author: Andrew Deason Date: Mon May 16 15:02:14 2011 -0500 viced: Check vnode length on Rename and Link Commit 2578555d7e08131bf2fe4cdd0aa4b32567a76eb2 added vnode length checks when we create or remove vnodes, but not during Rename and Link operations (when vnodes are neither created nor destroyed). Add the check in Rename and Link. Reviewed-on: http://gerrit.openafs.org/4668 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6df5547a7b93af74bc49ec8d4678aafd646dda1b) Change-Id: I795407a143a56f26c0679b929763ebdc9c633e7a Reviewed-on: http://gerrit.openafs.org/6298 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 580a9a5b84fc4f69087201e3fe7f94a5f97bf75c Author: Andrew Deason Date: Wed Apr 27 15:36:44 2011 -0500 viced: Do not try to reuse deleted client When h_FindClient_r encounters a deleted client structure, it does not try to find a different client structure to use. Force it to use a new client structure by setting client to NULL when it detects a deleted client. This arguably reverts part of 4e55e30f5b2c149b350b6d6875793adf722fdc21, but the code paths in h_FindClient_r are very different now, so that commit is probably not too relevant. Reviewed-on: http://gerrit.openafs.org/4582 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b2c6a850738437256626e0dfe743a09224879ad4) Change-Id: I5e3a12ee79847a915edeec732946b43270a35697 Reviewed-on: http://gerrit.openafs.org/6296 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1a3668c1bdc2e5944b88b314956430994f1668e5 Author: Andrew Deason Date: Mon Apr 25 13:53:52 2011 -0500 pam: Password is const in setcred afs_setcred.c gets the "password" pointer from pam_get_data, which always gives a const pointer (unlike pam_get_item used in afs_auth.c &c, which sometimes gives a const or not-const pointer, depending on the PAM implementation). So, declare password const, to get better type checking. Reviewed-on: http://gerrit.openafs.org/4553 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 94a9b2afd82b6729ddceb7ef736ddeb039e0ae1b) Change-Id: I3171babfbdf29e7aa543a17f7dd543deedc9b30c Reviewed-on: http://gerrit.openafs.org/6294 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e068045157d83312587d16c1600d8c7a0a93e2f9 Author: Andrew Deason Date: Wed Apr 13 10:52:50 2011 -0500 pam: Use PAM_CONST more often Some callers of pam_get_item et al were just casting their argument to a const void **. Some PAM implementations (Linux) want a const void**, but others (Solaris) do not. Use the PAM_CONST symbol already defined by autoconf to declare or cast the relevant variable const or not as appropriate. Reviewed-on: http://gerrit.openafs.org/4470 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 78d1f8d88334f711eaaf6555d3a962a504d3e80e) Change-Id: I831fa52c238a6cf7ef211e8198815c4420ae7dce Reviewed-on: http://gerrit.openafs.org/6291 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5bef5346c23583ece8308163d85522d15f714475 Author: Andrew Deason Date: Wed Apr 13 11:10:52 2011 -0500 pam: Check for null upwd from getpwnam_r The POSIX getpwnam_r can yield a NULL struct passwd pointer even when the returned error code is 0 (in particular, when the requested entry is not found). Just add a check for a null upwd to make sure we don't dereference a NULL pointer. Reviewed-on: http://gerrit.openafs.org/4469 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fbb4c6115b9af9c52ee06fa9c979a3f4195ad342) Change-Id: I9a8bccba7b6ecbce393ea149270e5c61ebadd05c Reviewed-on: http://gerrit.openafs.org/6290 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 307a791f9595ede26f815e6a01925d25c958dab8 Author: Andrew Deason Date: Wed Apr 13 11:08:09 2011 -0500 pam: Use POSIX getpwnam_r on Solaris _POSIX_PTHREAD_SEMANTICS is now always defined for Solaris, which means we get a POSIX-conforming getpwnam_r, which takes 5 arguments. So, add Solaris to the list of platforms that use a POSIX getpwnam_r. Reviewed-on: http://gerrit.openafs.org/4468 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7d4fbd36a120b16caaddcd9d1c7f550cb14aae5) Change-Id: I2ce885da5018b250052852cb70c70eaecd521cc5 Reviewed-on: http://gerrit.openafs.org/6289 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit c785ce1f8f001ec1a6794cdf25c8d490d8f2faa4 Author: Derrick Brashear Date: Fri Apr 15 08:02:22 2011 -0400 kernel upcall rx env should shut down event daemon also shut down event daemon in upcall environment Reviewed-on: http://gerrit.openafs.org/4473 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f4776f0a4d51472ee6f2406174b074c03213f7da) Change-Id: I7b362e0e0d1ac5f028718b522e56101f2bed297e Reviewed-on: http://gerrit.openafs.org/6288 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit eb70cf7096b724a9249ca6412657d3152ac2d87b Author: Andrew Deason Date: Fri Apr 8 13:00:15 2011 -0500 DAFS: Request salvage on detach for volser When the volserver notices that a volume needs salvaging, mark V_needsSalvaged. So when we VDetachVolume the volume, we can then just request the salvage in the volume package. Fix the VolClone salvaging code to do this as well, instead of using the vol-private VRequestSalvage_r interface. Reviewed-on: http://gerrit.openafs.org/4452 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit de0c72bf7c7d284f4d15d99c79b39e0c97f1a122) Change-Id: Id6f86368386a5e113a00aa0a496649d69875d283 Reviewed-on: http://gerrit.openafs.org/6286 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 29d4935b074a7f8d46dbe23835321365af2229de Author: Andrew Deason Date: Thu Apr 7 12:36:19 2011 -0500 volser: Avoid assert on ViceCreateRoot failure If IH_CREATE fails in ViceCreateRoot, it may just be due to an on-disk inconsistency. So, don't assert, but just return an error and detach the volume. Reviewed-on: http://gerrit.openafs.org/4444 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 399655e3df3bf30d7878dec70402fc0021cae752) Change-Id: Icbc934bfe59f6468771f37e5721341dae49ba460 Reviewed-on: http://gerrit.openafs.org/6285 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8e0c333c59533b5fd5484d11d6203087b6865eb3 Author: Andrew Deason Date: Thu Apr 7 13:51:14 2011 -0500 DAFS: Do not give back vol to viced after salvage If we VRequestSalvage_r a volume successfully, and we are not the fileserver, we will tell the fileserver to salvage a volume. So, we do not need to give back the volume afterwards, since telling the fileserver that a volume needs a salvage effectively gives it back (so the salvager can take it). So, clear needsPutBack so we don't try to also give back the volume, and avoid the fileserver yelling at us for trying to give back a volume that is checked out by someone else (or is not checked out at all). Reviewed-on: http://gerrit.openafs.org/4445 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 316b0421a27a4a76298f60ecd62b1236c971e512) Change-Id: I432abb4d65a738e0e1936a7ff2fff2eccf45834a Reviewed-on: http://gerrit.openafs.org/6284 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 96ee498f82153285eb463623bb37ec7d625c10af Author: Andrew Deason Date: Wed Apr 6 16:56:22 2011 -0500 afsd: Trim trailing slashes on Linux mntent When we write a mount entry on Linux when mounting /afs, trim trailing slashes on the mount path. Otherwise, the umount utility can get slightly confused, and leave the /afs mount entry in /etc/mtab after it's been unmounted. For full correctness we should probably completely canonicalize the path like the mount utility does, but it's unlikely that anyone will provide significantly weird paths for cacheMountDir, so don't bother. Reviewed-on: http://gerrit.openafs.org/4442 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 325443e6178f9dcdba7326bdb675447ac72bd540) Change-Id: I9832fad8a43278c5eb618e4148c71f8a9ef81e87 Reviewed-on: http://gerrit.openafs.org/6283 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a9ee7f8f821f73ba0a1dd6a8fd8ed4abc8ef9040 Author: Marc Dionne Date: Tue Apr 5 21:30:20 2011 -0400 ubik: don't rely on timeout value after select() The value of timeout after a select() call should be considered undefined; relying on its value is not portable. Since IOMGR_Select doesn't modify the timeout it is given, the intention of the code seems to be to wait for gradually increasing timeout values, starting at 50ms. At least under Linux, the timeout gets set to 0 by select() if it waited for the full specified time, resulting in a much shorter maximum possible wait period. Initialize the timeout value for each loop according to the existing logic, to get consistent behaviour between the lwp and pthreaded code. Reviewed-on: http://gerrit.openafs.org/4441 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 0b510fe30afb34202342364e96bd9030052e1567) Change-Id: I24eb4d4b1f758f33e3517671cb576ff23e641fb3 Reviewed-on: http://gerrit.openafs.org/6282 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 346c3571be944ad9a1823d9582a98d97385f633c Author: Simon Wilkinson Date: Mon Apr 4 11:02:17 2011 +0100 Irix: Supress some more warnings in kernel builds Suppress the following warnings in kernel builds: *) The function "blah" was declared but never referenced (1174) *) The indicated trailing comma is non-standard (1201) *) The parameter "blah" was never referenced (3201) *) implicit conversion of a 64-bit integral type to a smaller integral type (3968) Reviewed-on: http://gerrit.openafs.org/4419 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 353857e7685c9acfcf7474fabe57c928c70c778f) Change-Id: I4a5b85ffc56a801e19a181f8d2661eba9c975dcc Reviewed-on: http://gerrit.openafs.org/6281 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 855615dc32d42d1577b3b27f00be43995610db07 Author: Marc Dionne Date: Sat Apr 2 09:03:55 2011 -0400 fsprobe: Fix usage message Fix the usage message to display the correct command name. Reviewed-on: http://gerrit.openafs.org/4398 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a0389f5592c25afb19befb5bf62833a0b0bc59cc) Change-Id: I6105eff9f4cfae56d85df40589bd4b175aa760d0 Reviewed-on: http://gerrit.openafs.org/6280 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 538e6bdab3e1f70f612a96beaf89db0b3cc86938 Author: Marc Dionne Date: Sat Apr 2 08:40:15 2011 -0400 fsprobe: call RXAFS_GetTime directly Call RXAFS_GetTime directly instead of using ubik_Call which is not prototyped and has logic that we don't need/want here since we're targeting a specific server. Reviewed-on: http://gerrit.openafs.org/4397 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ef105dcc4932da804750dea0c922d5814fc5bf15) Change-Id: If4e430a55d36725f2cf8e5bf04a036062480cfac Reviewed-on: http://gerrit.openafs.org/6279 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3262f111028093ed31da3fe9e3ed7efcc0e8b769 Author: Simon Wilkinson Date: Fri Apr 1 16:37:32 2011 +0100 Linux: Fix USE_UCONTEXT detection On Linux, afs/param.h determines whether to use the ucontext() function based on the glibc version. However, the glibc version macros aren't available until a C library header has been included. There have been a couple of attempts to fix this. The first included afs_sysnames.h before the C library check, but this wasn't sufficient to pull in a header for all builds. The second included stdio.h before including afs/param.h in process.c. Whilst the second approach works, it has the drawback that it breaks our convention that afsconfig.h and afs/param.h must always be the first includes in a file. More seriously, it means that the behaviour of afs/param.h is different depending on where it appears in the include order - which is especially dangerous for 3rd party user. So, this patch tries to resolve all of this by explicitly including features.h before doing the glibc version checks. The only danger I can see here is that Linux platforms without glibc may lack a features.h, but I suspect we have trouble building on such platforms in any case. Reviewed-on: http://gerrit.openafs.org/4389 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f5f0ce525a63264098cd0625769d642fe6f106ba) Change-Id: Ia94487f35ad0fc3143faafd2fa12a6c71d40f116 Reviewed-on: http://gerrit.openafs.org/6278 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 8c74ddc6c7658acdc827069a64e9b7a05cfe1bf5 Author: Jeffrey Altman Date: Sat Mar 5 14:29:38 2011 -0500 vol: remove warning on use of DFlushVolume Include the afs/dir.h header on Windows to avoid warnings caused by the missing prototype. Reviewed-on: http://gerrit.openafs.org/4148 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d69da816c6e961ef5e22df289ad5667cd8568b4c) Change-Id: I1f128f676a6d099b2d9534e28c6302de78b0ff2d Reviewed-on: http://gerrit.openafs.org/6273 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a86d857adbf9b517c58a2770f93f7f1767f5e01 Author: Andrew Deason Date: Mon Nov 22 22:23:02 2010 -0500 vol: Move VOL_CV_TIMEDWAIT to volume_inline.h Some platforms will give errors for the vol package glock not being defined in VOL_CV_TIMEDWAIT, since some utilities include volume.h (with pthreaded ubik enabled) but do not have the vol glock. This isn't a problem for the other CV_WAIT (et al) macros, since, being macros, they are not expanded if never referenced. Since VOL_CV_TIMEDWAIT is a static inline function, however, and at least some platforms try to compile/link it even if it's not referenced. So, move it to volume_inline.h, which is only used by the volume package itself, where we will have the vol glock. Reviewed-on: http://gerrit.openafs.org/3363 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit e4059c1b812410bd96481cc60c86c67f8733b66f) Change-Id: Ic1d6286bb148f202b8da010edf48fff93a5a48fb Reviewed-on: http://gerrit.openafs.org/6268 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit cd69fb1401bc7d9803fb26c7b5e9256efa0167d4 Author: Andrew Deason Date: Tue Mar 29 12:28:46 2011 -0500 vol: Add timeouts to SYNC server select() calls Normally *SYNC server processes wait indefinitely for activity to occur on one of the SYNC sockets. On some Linux kernels, there exists a race condition where data can come in on a socket, but the select() call continues to wait. To ensure that we do not hang forever in such a scenario, add a timeout to the select() call, which will ensure we notice the new data within 10 seconds. Raise the timeout on non-Linux to reduce impact elsewhere. The Linux kernel bug is tracked in , though that bug report may not represent all affected kernels. Reviewed-on: http://gerrit.openafs.org/4377 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 920a00e075b679f59e31b9fcbe7f5db15e345a95) Change-Id: Iae4035bc952b66f88843d51ff341b0576f15163d Reviewed-on: http://gerrit.openafs.org/6276 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d69d96588ba1068b9ace1156f00e6c26a145e089 Author: Andrew Deason Date: Wed Mar 23 15:19:03 2011 -0500 namei: Log ListViceInodes write failures If we fail to write to the inodeFile given by ListViceInodes, we should log the failure. Otherwise, no indication is given as to what failed, when a salvage gathers the inode list. Reviewed-on: http://gerrit.openafs.org/4294 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 22149d82d465f5defbe329b3f9b3c5040a6293e9) Change-Id: I7fb56f0af99bb040e64cf54bf05e01306a609326 Reviewed-on: http://gerrit.openafs.org/6275 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36b6dca36572953f2718c163e1ebbbf52a6e0dbe Author: Derrick Brashear Date: Mon Mar 14 23:36:45 2011 -0400 macos: dont want bind 8 compat on leopard we removed it for i386, kill it for ppc also. Reviewed-on: http://gerrit.openafs.org/4229 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 4a72ebfe324874dd405d18561baf5eaacb007950) Change-Id: I9e625f79c047b61fc3675e6732eaa7d2dd34214f Reviewed-on: http://gerrit.openafs.org/6274 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4190a3aad98457e317c14dcf455ed1b62e129042 Author: Andrew Deason Date: Mon Jan 10 12:11:22 2011 -0600 LINUX: afs_linux_put_link is void The put_link callback doesn't return a value, so declare it as such. Reviewed-on: http://gerrit.openafs.org/3636 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 336256c7a0e7d54495a070895c9d8c2057168839) Change-Id: I5985316ea37f572039267ea117dfeae55ea96bc0 Reviewed-on: http://gerrit.openafs.org/6271 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1c329c8f1ea9fc8ef4b360b019c601c1136e41b Author: Derrick Brashear Date: Thu Dec 23 13:20:42 2010 -0500 DAFS: listvol + unsalvagable volumes = intolerable delay a non- inService volume (or more) plus vos listvol equals pain. return Salvaging instead of waiting for it in the listvol case. Reviewed-on: http://gerrit.openafs.org/3588 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit affc978be7ba3c36c9b7a6a94fb5e907beebed99) Change-Id: If871ce0cdd3593250f22d74de184f92b046b5f6e Reviewed-on: http://gerrit.openafs.org/6270 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 64e79bd6b88147f95d99ee8240d50995658b8340 Author: Andrew Deason Date: Fri Dec 3 17:20:54 2010 -0600 LINUX: Reduce stack depth on recursive symlink res Instead of calling vfs_follow_link inside afs_linux_follow_link ourselves, we can just resolve the next step of the symlink resolution and set the result in nd_set_link(), freeing the string in .put_link(). For kernels without a usable symlink text cache, this reduces call depth when resolving a path containing many symlinks by two frames per layer of indirection, allowing for more deeply-nested symlink paths to be usable. Reviewed-on: http://gerrit.openafs.org/3433 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 2ce159fbf474b96ecd2a4224751d4655230bba51) Change-Id: Idb91c2bb1a10b60d125dccbc98731ace63d4add8 Reviewed-on: http://gerrit.openafs.org/6269 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 303b6fd682abaa0affd15a4ddd7d5b6b11f620bc Author: Felix Frank Date: Sat Nov 13 00:10:31 2010 +0100 rxgen: add *TranslateOpcode functions to XDR code Administrative commands and server binaries can benefit from the ability to translate RPC OpCode numbers to proper function names. For this purpose, rxgen now emits the function char *PKGTranslateOpCode(int) where PKG is replaced by the respective package prefix. The function is generated in the exact same way that ExecuteRequest is. This way, the right optimization (array storage vs. generated case statement) according to the respective sparseness of OpCodes in the different RX packages is maintained. Reviewed-on: http://gerrit.openafs.org/3305 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 5c77a6ca2460c3e79125a614037824db35480905) Change-Id: I23d7af2dd07e02255783de0523fce58dbe46d31e Reviewed-on: http://gerrit.openafs.org/6267 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d23bbae9df78ecd98d0af2580cefe8c5bdd12c4 Author: Andrew Deason Date: Fri Oct 29 11:14:49 2010 -0500 vol: Add interfaces for registering RX calls Add VGetVolumeWithCall and VPutVolumeWithCall, to associate RX calls with volume heavyweight references. Also add the interrupt_rxcall field to the volume package options structure. This also adds the VIsGoingOffline function, so a caller can tell when a volume is going offline. Reviewed-on: http://gerrit.openafs.org/3215 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 33409b2c849d7fae3b10b3202bb15e338ae5b982) Change-Id: Ib50a17b3479453bbbaef571711ede7115b17318e Reviewed-on: http://gerrit.openafs.org/6265 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c57b5a419292d16e662f5ab6c5422b8475e8d139 Author: Andrew Deason Date: Wed Oct 27 17:34:40 2010 -0500 vol: Add VGetVolumeTimed Replace the VGetVolumeNoWait interface with the more general VGetVolumeTimed interface, which allows for waiting for offlining volume for arbitrary amounts of time (instead of just "waiting forever" or "not waiting at all"). Also add VOL_CV_TIMEDWAIT and VTimedWaitStateChange_r as necessary to implement this. Reviewed-on: http://gerrit.openafs.org/3214 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit db6ee95864a8fc5f33b7e95c19c8ff5058d37e92) Change-Id: I6c7b3a0b9fe174ebffeb03153dda1c4705d7dac5 Reviewed-on: http://gerrit.openafs.org/6264 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 59797ad4fedbf5499141bc01a3f1829730bffea2 Author: Simon Wilkinson Date: Sat Sep 11 12:51:52 2010 +0100 rx: Call rxgen_consts.h by its proper name rxgen_consts.h is actually in the afs/ directory. Include it from their, rather than requiring that every user have $(TOP_INCDIR)/afs in their search path. Reviewed-on: http://gerrit.openafs.org/2750 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 34df5da39871ae5231048a416f191784c5c2d127) Change-Id: I915cf9d975efbb7c73c1e57750227421362648c8 Reviewed-on: http://gerrit.openafs.org/6263 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d4fbfcd4380d3b9997d941efc568074a841a907 Author: Andrew Deason Date: Fri Sep 10 11:17:40 2010 -0500 udebug: Always show tidCounter If the queried site doesn't have an active write transaction, currently udebug doesn't show the tidCounter. The tidCounter can still be useful to know (especially since some sites will become buggy when tidCounter rolls over), so always show it. This adds the "The last trans I handled was" message to udebug. Reviewed-on: http://gerrit.openafs.org/2730 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 51806bd21af5bcc70c27cda5787ae853fa3f495e) Change-Id: I861804c4381a75626c5259a4896642f0e4064b7d Reviewed-on: http://gerrit.openafs.org/6262 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a8674bee13aafb508c1c03fa17db13526ecd075f Author: Ken Dreyer Date: Mon Oct 31 08:27:16 2011 -0600 doc: limitations of addsite on different partitions A user on the openafs-info mailing list noted that the Admin Guide is unclear about creating read-only replicas on different partitions on the same fileserver. Clarify the rules here. Reviewed-on: http://gerrit.openafs.org/5745 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit c59c07132ef17589ad3466ded418c1370539b7af) Change-Id: I68898c21e2c1aa7d6828b475dff4c1cb6d14327c Reviewed-on: http://gerrit.openafs.org/6317 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6dc27f1e25879262bbef6eb25dc81f22e5069865 Author: Andrew Deason Date: Thu May 20 15:22:11 2010 -0500 ubik: add interface for reading during write locks Add ubik_BeginTransReadAnyWrite, which allows for reading from the database, even while there is a conflicting ubik write lock. Reads are still blocked while the local database is updating due to a write transaction commit. Reviewed-on: http://gerrit.openafs.org/2592 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fd7f7469bdbde24320c3ac8b4f7015d495b47bff) Change-Id: I46cf35beeea6dc997976ea2c33e45c1a5f4904df Reviewed-on: http://gerrit.openafs.org/6261 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 355a5dd65b2f3954833e060d83ceeb6db661c576 Author: Andrew Deason Date: Tue Jun 22 14:36:42 2010 -0500 ubik: Fix buffers for reading-during-writes If we are reading while a write transaction is in progress, we can encounter a buffer that is dirty if we're on the same site as the writer. Ignore these buffers for readers, since they contain uncommitted changes. Then, when the writer commits, invalidate the resultant duplicate buffer, if one exists. Reviewed-on: http://gerrit.openafs.org/2231 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 570236dd55e79e8886b45f19cef59ec3fa9d53f6) Change-Id: If83e077b99a77339377a36f1d1bac9182ef26e4f Reviewed-on: http://gerrit.openafs.org/6260 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a4a5e8baf50f9e550bfa7ba0b8f7229a7f7fa7a2 Author: Andrew Deason Date: Tue Jun 22 13:24:27 2010 -0500 ubik: Abstract buffer matching and pass trans ptrs Abstract the code for matching buffers in DRead, and pass around ubik_trans pointers instead of ubik_dbase pointers. This changes no behavior, but makes changing ubik buffer code a bit easier. Reviewed-on: http://gerrit.openafs.org/2230 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5c7297a6c76777aec6209aa191b067ddc73b1a87) Change-Id: I6cc673d965b5e06361fff8ea259ba552446e3213 Reviewed-on: http://gerrit.openafs.org/6259 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7c37f71c287e99aa256dd1a40833f1bb1d10b629 Author: Derrick Brashear Date: Fri Apr 1 12:17:13 2011 -0400 macos: no more startupitems if we're upgrading, a "cruft" startupitems script should just be nuked. FIXES 129601 Reviewed-on: http://gerrit.openafs.org/4387 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 841c8022e3978fffe1357f339d948e93c9db9d52) Change-Id: Ibe2dde067df1fe22da1bb09039d07ebbc178af08 Reviewed-on: http://gerrit.openafs.org/6277 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f66b4e59b89e1bcd42634f214c30f06c0caf6b7b Author: Ken Dreyer Date: Mon Apr 11 17:24:41 2011 -0400 fix manpage for udebug -servers The proper option to udebug is "-server", not "-servers". Fix the manpage to line up with the binary. Reviewed-on: http://gerrit.openafs.org/4457 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5ded9afa1764016977a17ef9346dc979bf70ca0) Change-Id: I66bea4923717a6b7df5fbefa1dd93d469d96be3c Reviewed-on: http://gerrit.openafs.org/6287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9433b1b651ded596a897d81a4276e925dea3bb5e Author: Andrew Deason Date: Fri Apr 15 14:18:57 2011 -0500 doc: Add aklog_dynamic_auth manpage Add a manpage for the aklog_dynamic_auth LAM module. Reviewed-on: http://gerrit.openafs.org/4485 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 24ddd06a0dc19ad7c0b2a2847d41a5ea69665b15) Change-Id: Ib5f7463b75ee8d58ecc6b725f629fd7600c64792 Reviewed-on: http://gerrit.openafs.org/6297 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 62815307269a63dfc13fbdc5faa1933620d6ab6e Author: Jeffrey Altman Date: Sun Dec 4 23:15:13 2011 -0500 afs: prevent nat pings on destroyed connections If the connection is no longer in use, reset the nat keep alive timer to 0 seconds. Reviewed-on: http://gerrit.openafs.org/6230 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7a93c827f353e2ad695d8019ab789b02a3596f2e) Change-Id: I019bdce7a8f9f0123786b46d0563f42f7b26c14b Reviewed-on: http://gerrit.openafs.org/6232 Tested-by: BuildBot Tested-by: Stephan Wiesand Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 196895f58b086110db3f020e36fb029e14fc619b Author: Ben Kaduk Date: Sat Dec 3 14:37:09 2011 -0500 FBSD: switch afsi_SetServerIPRank implementation Upstream has removed the ia_net{,mask} elements from struct in_ifaddr, so we can no longer use them directly. Switch to passing an rx_ifaddr_t (i.e. struct ifaddr*) in instead, as that uses a slightly different codepath which still works for our purposes. We compile the kernel module with -Werror, so storing a pointer (memcpy return value) in an int is forbidden, hence the conditional declaration of 't'. Reviewed-on: http://gerrit.openafs.org/6203 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1ef8dc3dfbddcbe5610c276afc627c9fcfe30a65) Change-Id: Icb338331c879dc4cbd69ae565b115de000e8d3d0 Reviewed-on: http://gerrit.openafs.org/6235 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2ad4d31d40683e6e603b117043e154f0db97c3c8 Author: Ben Kaduk Date: Sun Nov 13 13:12:50 2011 -0500 FBSD: cleanup dvp locking for ISDOTDOT This is a more correct version of c2ed2577f9c16df3088158fb593d7aab6e8690d0, which was reverted since it caused build issues on some versions and kernel panics on others. We do want to always unlock dvp before calling over the network in the ISDOTDOT case, but be sure to use the proper spelling for this operation (as the syntax has changed between FreeBSD versions). This requires not unlocking dvp right after the afs_lookup() call if it succeeds, letting us just lock the "child" vp (which is actually the parent starting from '/') first, and then re-lock dvp. The error case of afs_lookup() was already handled correctly in this logic, which is to say that it was incorrect before this change, attempting to recursively lock dvp which causes a panic. Reviewed-on: http://gerrit.openafs.org/6127 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8e14168c9c77850ce0603d56f8aa280f73cb3114) Change-Id: I2d929875a9b008f0aa0b64bce7971932691d9956 Reviewed-on: http://gerrit.openafs.org/6234 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c515e30b2b9b74feb15c58c298c41c435493626a Author: Ben Kaduk Date: Sun Oct 23 11:22:07 2011 -0400 FBSD: typo fix Gerrit/5572 added conditionals on __FreeBSD_version >= 900044, which is (approximately) when a bunch of kernel API renames happened. (There has since been a dedicated version bump to 900045 a month or two post-facto, but 900044 should be fine for now.) However, 900044 is not 90004. Reviewed-on: http://gerrit.openafs.org/5657 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ca8ba7e7a41e61cc943b34196872b72a190432e3) Change-Id: Ibacd6d037590df0696b8dab8107d36bca470785a Reviewed-on: http://gerrit.openafs.org/6233 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e05bc3b5cd50354bcade3c38c0ec97713b148c8 Author: Derrick Brashear Date: Wed Nov 30 16:20:23 2011 -0500 remove CopyOnWrite2 and unused vars unused static functions make grumpy compilers grumpy. (cherry picked from commit 7a6cf450babea4e706392cb8ad83586fa7f8e558) Change-Id: Ib40be2b9458ca799ba2b808ed86a627c40cf6ec4 Reviewed-on: http://gerrit.openafs.org/6161 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c73b66447cb84cf1f07775b9f93b745050e4972c Author: Derrick Brashear Date: Sun Nov 27 11:23:29 2011 -0500 viced: disable accelerated copyonwrite don't do multistage CoW FIXES 130295 (cherry picked from commit 97540f78aa333feefe9f567ee71695c1d6451f5c) Change-Id: I1cd9d54ec9202aa4a11828cd443622413f195687 Reviewed-on: http://gerrit.openafs.org/6160 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8160e462821d718df0bd00f1642dbc1bc9bc7a8 Author: Simon Wilkinson Date: Wed Nov 23 16:30:55 2011 +0000 Unix CM: Fix PutVolume in afs_BlackListOnce It isn't safe to keep accessing a structure once we have Put our reference to it. Reviewed-on: http://gerrit.openafs.org/6117 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2373547a86c12f72261072971b8d47e6b7cdd4e6) Change-Id: I013b5d6ecf7705745ab16c8736f32ca7750b933b Reviewed-on: http://gerrit.openafs.org/6124 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d52f1a5038b66ca5dc82d71541701ebb794cbc0b Author: Andrew Deason Date: Tue Nov 15 13:18:48 2011 -0600 afs: Leave cellnum alone for explicit mtpt cell When a mountpoint is given an explicit cell, don't alter cellnum. Cellnum represents the cell for the parent, and is used for determining whether or not we're crossing a cell boundary. Previously, this code forced the mount point to always be treated as foreign (for a mountpoint prefixed with a cell name), or to always be treated as local (for a mountpoint prefixed with a cell number). Reviewed-on: http://gerrit.openafs.org/6051 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e14dec55e6600edb60ce5184b4ab1f646c68947b) Change-Id: I8d2b378a95533aabd65e7121000ce34238d728b7 Reviewed-on: http://gerrit.openafs.org/6123 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9865698ee0d81d371b8846a1145a46f691de8388 Author: Derrick Brashear Date: Sun Nov 6 16:28:27 2011 -0500 dafs: avoid null deref getting volume header we don't assign hd before dereferencing. stop dereferencing and just use the queue cursor. Reviewed-on: http://gerrit.openafs.org/5814 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 00beae8c4e3b390637f20584e676cf86c817dadd) Change-Id: Iec2dbbf84e4f08f02998c9e998d2ea899ce48a5d Reviewed-on: http://gerrit.openafs.org/6122 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fbf2f3cbabe04f5420dd0ec5ed87b7139e2d7673 Author: Edward Z. Yang Date: Sat Nov 26 19:32:51 2011 -0500 Linux: 3: Update specfile to know about 3.* kernels. Update spec file to be consistent with acinclude.m4 with regards to sysnames. We don't bother updating the code inside the legacy kernel build section, as it doesn't get triggered for 3.* kernels (it should probably get cleaned up at some point.) Also, fix a bug in error message printing of unrecognized kernel. Signed-off-by: Edward Z. Yang Reviewed-on: http://gerrit.openafs.org/6120 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0f9214164ad56bfe74d0f2cec8775a312f5128dd) Change-Id: Ie414751cf01c44a73bf9eaef67c593cced2680d9 Reviewed-on: http://gerrit.openafs.org/6121 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 032736bc052d3fb1a1d4f033a47e844d7f4ea05a Author: Marc Dionne Date: Mon Nov 21 21:27:06 2011 -0500 Linux: make sure backing_dev_info is zeroed The afs backing_dev_info structure is allocated dynamically without zeroing out the contents. In particular there's no guarantee that congested_fn is NULL, causing spurious oopses when bdi_congested in the kernel tries to call it. (adapted from commit 8e97cf6f215d5575c63d86eaec59031399f4beda) Change-Id: I83755b6bb5ec2fada7e077c00d3d8edf8af1cae4 Reviewed-on: http://gerrit.openafs.org/6104 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 364fad6fa5bcaaac938f31eb67b1e1d0190cba7e Author: Marc Dionne Date: Fri Sep 2 17:56:58 2011 -0400 Linux: 3.1: adapt to fsync changes The fsync file operation gets new arguments to specify a range. Add a configure test to check for the API change. The inode lock is also pushed down into the operation, so we need to take it ourselves to keep the original behaviour. Reviewed-on: http://gerrit.openafs.org/5332 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit cbaefa266d433af3b9a082a360e23a42f161d80f) Change-Id: Idb6770204b014c62a8611548509240f8b5f950bc Reviewed-on: http://gerrit.openafs.org/6098 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 737a2802e9207fb53f598ef88c0ce1f9ad27a348 Author: Anders Kaseorg Date: Sun Nov 20 19:00:00 2011 -0500 Linux: 3.2: Use set_nlink to update i_nlink As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent direct modification. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/6096 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f1dd2d696fb9ab71b4192b156042e0c63019c58a) Change-Id: I685aa6e8638e8fe864f1a6a7e428dfb6839ebcea Reviewed-on: http://gerrit.openafs.org/6099 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7f55b45ed708204c09b144fd8d1e3b71d08fcb66 Author: Marc Dionne Date: Sat Sep 3 14:10:50 2011 -0400 Linux: d_delete now takes a const argument The d_delete dentry operation now takes a const argument. Test for this and define our function accordingly to avoid warnings. Reviewed-on: http://gerrit.openafs.org/5335 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit def00ae8ba774f4d7290c29208484dda756dc0e0) Change-Id: I128a721587f4963849652cb389472a550d81d267 Reviewed-on: http://gerrit.openafs.org/6097 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef492dc1e1a1809a910fbf07140b26c4924957c5 Author: Derrick Brashear Date: Sat Nov 5 11:24:43 2011 -0400 redhat: make rpms build on pre-f15 again we don't have systemd everywhere. don't assume it Reviewed-on: http://gerrit.openafs.org/5813 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 47b010d1e1d0e8bdbbcad73d5aedc19719d5d96a) Change-Id: I200ca2306b0e6a22cdcb0515641977b2ea6d21a0 Reviewed-on: http://gerrit.openafs.org/6090 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 76de794826980a33ae44a27bda47a2e4c3962204 Author: Edward Z. Yang Date: Mon Oct 17 23:16:15 2011 -0400 linux: Update Packaging to build OpenAFS services for Fedora's systemd Fedora 15 now uses systemd (see http://fedoraproject.org/wiki/Systemd) for the OS init system. While it currently has backwards compatibility with older SysV-style init scripts, future versions of Fedora may no longer support it, and OS startup tends to be faster with the systemd service units. Also, systemd runs all the service's processes within a linux kernel cgroup. (see http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt) This change includes an openafs-client.service and openafs-server.service unit files for the client and server packages respectively. Client - Loading the openafs module was moved into /etc/sysconfig/modules/openafs-client.modules. This causes the OS to load the module on boot. This is the preferred way for modules to be loaded with Fedora. (See http://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/sec-Persistent_Module_Loading.html for more details) - The CellServDB file is generated with sed rather than cat. This change was made because Systemd doesn't execute as a shell script, but rather executes processes directly. Rather than invoking a shell to concatenate the CellServDB.* files, they're written to the CellServDB file using a sed oneliner. - Do all of the proper kernel module loading and unloading. Server - Since systemd uses cgroups, when the service is shut down, all processes in the openafs-server.service cgroup will be terminated. The other changes are standard as per: http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd Original version by Jonathan Billings . Signed-off-by: Edward Z. Yang Reviewed-on: http://gerrit.openafs.org/5637 Reviewed-by: Derrick Brashear Reviewed-by: Alex Chernyakhovsky Tested-by: BuildBot (cherry picked from commit 286ffa0d7c4d594ff107b70f9e930271c027a79e) Change-Id: I653b211ef24fb9010f0a8ff0ad70c11703a64e82 Reviewed-on: http://gerrit.openafs.org/6089 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f129142dde2a2637b2e638ca0cca372a45188923 Author: Marc Dionne Date: Sat Oct 29 19:23:07 2011 -0400 Linux: 3.1: update RCU path walking detection in permission i_op The permission() inode operation changed again with kernel 3.1, back to the form it had before 2.6.38. This compiles fine, but is missing the new way of detecting when we get called in RCU path walking mode, resulting in system hangs. Reviewed-on: http://gerrit.openafs.org/5740 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4952df3f0359531e4a660c99c94c51eb0b169f59) Change-Id: Ibd497309e6699fb585cf70e618373e800b73cbb8 Reviewed-on: http://gerrit.openafs.org/6088 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8150bbbf0dbc6732860214180735ba509902f417 Author: Jeffrey Altman Date: Fri Oct 14 08:10:19 2011 -0500 klog.krb5: enforce DES for rxkad 0. Always request a TGT regardless of the state of writeTicketFile. 1. request des-cbc-crc when requesting a ticket for an rxkad service principal 2. check the returned key length to ensure that it matches the permitted length of an rxkad key. If not, generate an error instead of overwriting memory and continuing. FIXES 130278 Reviewed-on: http://gerrit.openafs.org/5619 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3a9a5783cd1fd73902655f0876e2069b42688c94) Change-Id: Ia162cb9fc1d67a38cde26e52b9077f5634a62c84 Reviewed-on: http://gerrit.openafs.org/6087 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1132b23e2fe62ffca875bd9bcacee621d292cea4 Author: Andrew Deason Date: Wed Nov 2 11:35:42 2011 -0500 Solaris: Specify ARCHFLAGS in CFLAGS Various autoconf tests which use the C compiler may yield different results depending on whether or not we are compiling for x86 or amd64 on Solaris (different libraries are available, structures may be different, et al). So, set CFLAGS depending on which arch we are targeting, so the autoconf results are more consistent with the actual compilation during the build. Reviewed-on: http://gerrit.openafs.org/5786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5eba97a8960c49aeea957dc94408368e1324eff0) Change-Id: Idd0f7d2220ae9762af60e96d087e7eb7ee8c0e63 Reviewed-on: http://gerrit.openafs.org/6086 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 191bdc72581926bd0212b658e356196d69b97d9a Author: Andrew Deason Date: Fri Nov 4 12:42:33 2011 -0500 DAFS: Deal with exclusive-state volume headers GetVolumeHeader assumes that headers on the LRU are not associated with a volume in an exclusive state. This is known to not be true for some cases when salvage requests are received over FSSYNC, and may be true in other scenarios. It's easy to just skip such headers, so skip them. Reviewed-on: http://gerrit.openafs.org/5808 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e) Change-Id: I0eda511071114b01cd8984d30858b0aa9157727a Reviewed-on: http://gerrit.openafs.org/6085 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 455e900d6c8aa4a6ebca2f94f6c4954cde65dbab Author: Derrick Brashear Date: Fri Nov 4 11:43:01 2011 -0400 ukernel: handle pioctl errors properly in ktc the straight return from call_syscall isn't what we want. munge so e.g. EDOM handling for ktc_GetToken does the right thing. Reviewed-on: http://gerrit.openafs.org/5807 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b06c700ee40ca70ef08259af819e2a6084137457) Change-Id: I8929615940cb4f025bdd04139399f0ceb82955c9 Reviewed-on: http://gerrit.openafs.org/6084 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a81666efdb1b7727bcd24b21a3e9d5926e6be839 Author: Andrew Deason Date: Thu Nov 3 13:17:33 2011 -0500 salvager: Implement AskDAFS via SYNC flags Instead of probing the DAFS-ness of the fileserver by probing which FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC response header flags, which explicitly state whether or not the endpoint is DAFS. This avoids unnecessary "protocol mismatch" log messages when the endpoint is not DAFS. Reviewed-on: http://gerrit.openafs.org/5800 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7fee28bae30c5a65898a2e3fd7149f07e8ca0df6) Change-Id: I0643b0e61795f39b63783c937e88c4a74c3c8312 Reviewed-on: http://gerrit.openafs.org/6083 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d173bead9866b07d4f8b25f57abdae7fd09bc99f Author: Andrew Deason Date: Tue Nov 8 12:52:50 2011 -0600 regen: Fail on failures If something fails, don't ignore the error. Reviewed-on: http://gerrit.openafs.org/5817 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6d519cf1234d54630dcfe48f6ecd393e2dfe71dd) Change-Id: I5e5ac4d843b9dafce7b7f3acadfcdb0901aed214 Reviewed-on: http://gerrit.openafs.org/6082 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f718feb826926a67f428b482a580d03c788dfabf Author: Derrick Brashear Date: Wed Nov 9 10:34:10 2011 -0500 viced: avoid bogus handle in rename because fileptr's handle can be reset during CopyOnWrite we need to SetDirHandle after that call FIXES 130215 Reviewed-on: http://gerrit.openafs.org/5818 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit a1669f3e37299c11bf29a458212e03d1bdb22334) Change-Id: I57e084102048916b04e45aa32792dc91193e43d8 Reviewed-on: http://gerrit.openafs.org/6081 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d741616a8e8d1daf60b117f2be8f7768b3fd882 Author: Andrew Deason Date: Wed Nov 9 17:04:09 2011 -0600 volser: Preserve needsSalvaged during restore Some of the routines during a volume restore may set needsSalvaged, if an inconsistency is detected while writing the given volume data. However, after the data is read, we set the volume header information to what was found in the dump stream, ignoring any needsSalvaged that may have been set. To ensure that inconsistent volumes in this situation actually get demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of needsSalvaged in the header, if it was set. Reviewed-on: http://gerrit.openafs.org/5822 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9ba891676a15512fa58915662cf599ea73eac430) Change-Id: Iece9f5b03f0454b7f833e4f3e86da4478b4441fe Reviewed-on: http://gerrit.openafs.org/6080 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 34637cbc700df627550840aed81b7a42fe241bc8 Author: Andrew Deason Date: Thu Nov 10 11:58:12 2011 -0600 namei: Remove extraneous rmdir We just unlinked the file, so we know we won't be able to rmdir() the same thing. Give a path one level higher to namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir. Reviewed-on: http://gerrit.openafs.org/5833 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b41e30a55c8aeb6d7f42d74f9eb090232032057f) Change-Id: Ibd14490e2d85bd78522472203ad57120237bff22 Reviewed-on: http://gerrit.openafs.org/6079 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0e753b2949cc5127b75713b2e0d7dd3acd96a047 Author: Jeffrey Altman Date: Fri Nov 11 11:00:47 2011 -0500 namei: tweak getlinkbyte error handling in the event of a pread error, add the same error exit path trigger that we have elsewhere Reviewed-on: http://gerrit.openafs.org/5843 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 51f71e533b20cd875eec8adda71edea044a606da) Change-Id: I05623d392e7e3446b7b41dcc1778c6aca986bca1 Reviewed-on: http://gerrit.openafs.org/6078 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c25f3fd56c927cfa2b81ed2b54a7cf6f1fc3999b Author: Jeffrey Altman Date: Sat Nov 12 13:45:08 2011 -0500 Windows: Track active RPCs per scache_t It has been noticed that multiple RPCs can be active on a cm_scache_t object at the same time. This is especially true of directory objects with the redirector. Track the number of active RPCs and use that number in cm_MergeStatus when deciding whether or not to discard the cached data for the object. Reviewed-on: http://gerrit.openafs.org/6001 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 090f6279c5496f648893606d298c698f376c7ae0) Change-Id: Ic40b73ae44c47ad6077fcbbe41bf0d783ab776fc Reviewed-on: http://gerrit.openafs.org/6045 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8844858564a3e5dbe2436908f4feb6d4f930dac4 Author: Jeffrey Altman Date: Sat Nov 5 04:10:42 2011 -0400 Windows: Add Vista/Win7 Firewall Configuration Make use of the INetFwPolicy2 COM interface to configure the Vista/Win7 firewall for all network profile types. Reviewed-on: http://gerrit.openafs.org/5812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b15b4b15822bee87720bb0d78c2ce54051180339) Change-Id: I3022b2480c7c7273e819d0a10c092f22f4af3800 Reviewed-on: http://gerrit.openafs.org/6044 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 10410504e7e5a1b3b850131372a7d5e5e572e4d3 Author: Jeffrey Altman Date: Fri Oct 28 17:43:24 2011 -0400 Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of a file to a name that does not exist. Put back the code that makes that possible with a comment. Reviewed-on: http://gerrit.openafs.org/5735 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7a426424b7fb45659f6000a564e8c71a9108a33c) Change-Id: Ia82ddc46b303cb80380c342d44db437c490b8508 Reviewed-on: http://gerrit.openafs.org/6043 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 92f5218bce982e26d26e72ccc4598f2af0da7899 Author: Jeffrey Altman Date: Fri Oct 28 11:36:10 2011 -0400 Windows: out of date version not in current chunk In buf_GetNewLocked(), the comparision to decide whether a cm_buf_t is a member of the current chunk must take the data version into account. If the data version is out of date, it is not part of the current chunk and is an object that can be safely recycled. Reviewed-on: http://gerrit.openafs.org/5734 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb) Change-Id: I626562d2189182b434f8da0f4f0a6213c5b695fe Reviewed-on: http://gerrit.openafs.org/6042 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d27d549d02f628a1c4b88bcf8d1f8d5878174b58 Author: Jeffrey Altman Date: Thu Oct 27 17:57:25 2011 -0400 Windows: only flush buffers on shutdown if running If a service shutdown message is received prior to the service entering the running state, do not attempt to buf_CleanAndReset() because the required data structures and locks are not initialized. Reviewed-on: http://gerrit.openafs.org/5733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9743f5729d1a55513e861bb1334599a8e597de6b) Change-Id: I2bda1c4a538c83595f2d60ad4661c7e6865c5fc3 Reviewed-on: http://gerrit.openafs.org/6041 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 879d84fe79244612ab4587f69e3162e08f346179 Author: Jeffrey Altman Date: Tue Oct 25 15:32:11 2011 -0400 Windows: Do not EEXIST exact match during rename AFS Rename operations on the file server will delete a target file if it exists. Do not prevent renames because an exact match of the target name exists in the target directory. Reviewed-on: http://gerrit.openafs.org/5731 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9cf7a628c2ff178b2fa236d2c0a41ca9be315036) Change-Id: I02c32fab18053e1a37811089812f402d351a6666 Reviewed-on: http://gerrit.openafs.org/6040 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8f532e80419eae34ea72ee05ba6ef39fdd43b605 Author: Jeffrey Altman Date: Wed Sep 14 17:46:32 2011 -0400 Windows: validate buffer hash tables in cm_MergeStatus Reviewed-on: http://gerrit.openafs.org/5425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cf57eb294f28084cbb138b1a06bc813e14e6d0ec) Change-Id: Ia685aebdc443113b4ddb968155f306cc53680af9 Reviewed-on: http://gerrit.openafs.org/6039 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1222d29ef7cccd657cf5eda1e56efd7c951a378f Author: Jeffrey Altman Date: Sun Aug 21 00:38:24 2011 -0400 Windows: record history of read lock threads Maintance an array of up to 32 reader threads that have acquired a rwlock. Use it for debugging when things go bad. Reviewed-on: http://gerrit.openafs.org/5411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c9d655b9a6edf02fd92455961445f239f4667821) Change-Id: Icab5ffc36e4c6245b7d0699596eca66a66bc9538 Reviewed-on: http://gerrit.openafs.org/6038 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d698501d3446230e46fcfb646a3430424044daa Author: Jeffrey Altman Date: Fri Sep 9 12:47:52 2011 -0400 Windows: ignore SYNCHRONIZE privilege in cm_CheckNTOpen SYNCHRONIZE has not meaning for AFS so just ignore it. Do not deny an open request because it is set. Reviewed-on: http://gerrit.openafs.org/5410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 793fdd3360982c48bf60eefbd9c56b4a3c1e09f0) Change-Id: Ice8758dcbd0b355c9fdfb5af293b6d670ec8c1e4 Reviewed-on: http://gerrit.openafs.org/6037 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 828fc8fff7dbc032a3de2ca6b1f2608a87dc1130 Author: Jeffrey Altman Date: Sun Sep 4 14:58:23 2011 -0400 Windows: permit offline volume check to be disabled Setting the registry value to 0 can now be used as a method of disabling the offline volume check. Reviewed-on: http://gerrit.openafs.org/5370 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 19a5b5e67c65f0a9109b0fb5410b5ba74ad85b41) Change-Id: I50dfa3c5387ba8a1cbdd3ca80f9e8dc03e92c404 Reviewed-on: http://gerrit.openafs.org/6036 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 060cc61ffb6e5999dba7523bf96b9fe7b9983ea1 Author: Jeffrey Altman Date: Tue Sep 6 11:57:18 2011 -0400 Windows: add clean rule to src/afs/NTMakefile Reviewed-on: http://gerrit.openafs.org/5368 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4ec6fd003084b02c299466bcaeac3850be10f79c) Change-Id: I0cadd04598e78f9b8a5c0774e0636af153a5030c Reviewed-on: http://gerrit.openafs.org/6035 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 81d0b5ca5cb291ab00810ce8898733c1b424446f Author: Jeffrey Altman Date: Wed Sep 7 13:33:36 2011 -0400 Windows: correct comments in cm_BkgStore Reviewed-on: http://gerrit.openafs.org/5369 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b6e5493437b942d5550247761dac3311c6d73a86) Change-Id: I73c2fcab9ccff73e4419d3edf3ffc7395230e6e5 Reviewed-on: http://gerrit.openafs.org/6034 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit aab0703b292374dc21d2de6f13c54a3f67ad3308 Author: Jeffrey Altman Date: Mon Dec 14 13:33:02 2009 -0500 Windows: remove CM_BUF_CMBKGFETCH flag The processing of the CM_BUF_CMBKGFETCH flag adds more overhead than it prevents. Get rid of it. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/5359 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b6f23864ffa380923f50d424063ad0804e407f4a) Change-Id: I423aa105bad99c70942d6b967a1dde70216fb096 Reviewed-on: http://gerrit.openafs.org/6033 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit be4987fac067fd72166e46cfc883a89af06a2b27 Author: Jeffrey Altman Date: Mon Sep 5 10:11:09 2011 -0400 Windows: use lock conversion in cm_EndDirOp Instead of dropping the lock for read and reacquiring for write use lock_ConvertRToW() which will make the change atomicly if it is possible or place the thread into the wait list if not. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/5360 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 33af0f92e9b8a50c5a6dd17a9065c0ef58597c28) Change-Id: Id92298fa848becb4131139579fd31b0c5f98a4ad Reviewed-on: http://gerrit.openafs.org/6032 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 395a06460f962eb5efbb3f75821956180366ee57 Author: Jeffrey Altman Date: Fri Sep 2 13:54:01 2011 -0400 Windows: cm_SymLink export created cm_scache_t Permit the caller to request the cm_scache_t that represents the created symlink or mount point object. Reviewed-on: http://gerrit.openafs.org/5355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9b0cb614387403ff433cf39f84c13b626b1b9bdc) Change-Id: I170059255e3bbc7e3ccbd59b66d7d8b11005a94f Reviewed-on: http://gerrit.openafs.org/6031 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d64f269c9e00b96581855329f61a7967d62785c Author: Jeffrey Altman Date: Sat Sep 3 21:07:13 2011 -0400 Windows: correct cm_buf use of Head/Tail queues The buffer free list least recently used queue has both head and tail points. Use the proper versions of the queue mgmt functions and do not handle edge cases as special cases. Reviewed-on: http://gerrit.openafs.org/5354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 537592f6bbda0c659c25ae7068f50504e2a5e116) Change-Id: I0d5afaf59895f34ced739f4626a351fe41186008 Reviewed-on: http://gerrit.openafs.org/6030 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ad9d96fe752741ad0ce59efab523f0de356ce4e Author: Jeffrey Altman Date: Sat Sep 3 20:22:19 2011 -0400 Windows: remove dead code from cm_scache.c Reviewed-on: http://gerrit.openafs.org/5353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1e23761b7fadc260b32bebb0343a9b5b1de37cf4) Change-Id: Ifd8cf9ec7b517da80b22853e0f90034586560e0d Reviewed-on: http://gerrit.openafs.org/6029 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 32539f57236880bcba726888cf781086fbc2c56e Author: Jeffrey Altman Date: Sat Sep 3 20:06:21 2011 -0400 Windows: add logging to smb_IoctlRead Reviewed-on: http://gerrit.openafs.org/5350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69463ac0cb367202485aac9977f8b4c47fb067f2) Change-Id: I1f72db5148d2f596f4b0b58cb6788a244fd4fa44 Reviewed-on: http://gerrit.openafs.org/6028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c6c113b1a1c8bb8ff52c79092a88eb4d3820ba69 Author: Jeffrey Altman Date: Sat Sep 3 20:03:28 2011 -0400 Windows: remove potential data loss warning with cast Reviewed-on: http://gerrit.openafs.org/5349 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2588dd12478afb96a72f0cd788233ecf2145830f) Change-Id: I02a87c4980c6ebe6ef671f90e2c6000ab2eeb60e Reviewed-on: http://gerrit.openafs.org/6027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1c8b16087e770d97ef46e1dff89eee6f2db5385f Author: Jeffrey Altman Date: Sat Sep 3 19:14:11 2011 -0400 windows: pass cm_req_t through background ops add cm_req_t object to background daemon operations in order to permit request source to be propagated to the background daemon. pass a cm_req_t into buf_SetDirty(). Reviewed-on: http://gerrit.openafs.org/5348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 722843e2df533e8fcf245f2a3b10ef686992deb2) Change-Id: I2fbc78cf765c534fc6fc673695634fcf946dca0b Reviewed-on: http://gerrit.openafs.org/6026 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25f27ed384e529ea546905a82b2f413615244425 Author: Jeffrey Altman Date: Sat Sep 3 19:03:05 2011 -0400 Windows: correct log message in buf_Sync() Reviewed-on: http://gerrit.openafs.org/5347 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20772897654b58da6f7d4cd0bd2caf169abddd50) Change-Id: I676a919701c4edfbc130a04c94f4092676a1d53c Reviewed-on: http://gerrit.openafs.org/6025 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 02d3c98d74e49385c7ef26245e05739fe6c47df7 Author: Jeffrey Altman Date: Thu Sep 1 09:51:06 2011 -0400 Windows: buf_SetDirty do nothing if length is zero Reviewed-on: http://gerrit.openafs.org/5358 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dcc4766377b99c60db60328c21a3990db132268) Change-Id: I30dc0f218df56e6e38fe6ce3736a5450b7036e51 Reviewed-on: http://gerrit.openafs.org/6024 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d979ea950c4c042772e90166bca6233179d647e9 Author: Jeffrey Altman Date: Fri Sep 2 23:51:59 2011 -0400 Windows: remove MULTIHOMED ifdef All builds include the MULTIHOMED functionality. Get rid of the #ifdef MULTIHOMED. Reviewed-on: http://gerrit.openafs.org/5333 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2271d481d33b2b2ad56dcd4fc9fbdd726fc1967b) Change-Id: Ia11e4bfdc83737720e5274bad3d01232f0f2dbbe Reviewed-on: http://gerrit.openafs.org/6023 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6d96df8d5fae0d4eb816415334ab2e2b4512a8cb Author: Jeffrey Altman Date: Fri Sep 2 18:36:13 2011 -0400 Windows: missing ! in update volume location The check to see if the volume name is numeric or not was missing a ! in order to perform the correct test. Add it. Reviewed-on: http://gerrit.openafs.org/5331 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8127e9332be8cadda001f05c6036d4c87e04cb4a) Change-Id: I9760845b597c1653a78ab3e496166e5df03b7575 Reviewed-on: http://gerrit.openafs.org/6022 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1649a820a068ce7d74479a9bea98edfe6f0d2bfd Author: Jeffrey Altman Date: Fri Sep 2 18:32:40 2011 -0400 Windows: improve handling of volume rename The windows cache manager tracks volumes by volume group. Up to this point all volume location updates have been performed by the volume name. What if the volume name was altered? In this case the volume location information for the in use volume ids will fail until a mount point to the new name is queried. Before marking the volume group as non-existent attempt to perform a lookup using either the volume id for the readwrite or readonly volume. Reviewed-on: http://gerrit.openafs.org/5330 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit f37b6dfaf050ec0270979c8310fb471c16b66cd3) Change-Id: I33771780a4ace4aa5b4613bef4590d5efaf15922 Reviewed-on: http://gerrit.openafs.org/6021 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9d27d4707c51602d9a9a204f677f039513056967 Author: Jeffrey Altman Date: Fri Sep 2 18:28:31 2011 -0400 Windows: refactor volume location updates Break out the VL_GetEntryByName RPC calls into support functions so we can reduce the amount of duplicated code. Reviewed-on: http://gerrit.openafs.org/5329 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9563dd68fc1fb4b86016106aaacd33732d4cf6ed) Change-Id: I7fc8b9ac2902c0909b39c446468307fba30b2a51 Reviewed-on: http://gerrit.openafs.org/6020 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5345695a87d0d48c58a2b65d1391be0256a19baf Author: Jeffrey Altman Date: Mon Nov 14 10:23:53 2011 -0500 Windows: netidmgr krb5_cc_get_principal can fail Do not dereference a NULL pointer if krb5_cc_get_principal fails. On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c but that change is after the conversion to the Kerberos Compatibility SDK and cannot be applied to openafs-stable-1_6_x. Change-Id: I646011dd3171fd1aa6f40f349329f8261546b809 Reviewed-on: http://gerrit.openafs.org/6019 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0de4f7ca6a1dd4232bfdac21985db995289d26ee Author: Andrew Deason Date: Fri Nov 4 17:19:28 2011 -0500 volser: Remove debugging log messages While the -log option to volserver is supposed to print additional log information, it shouldn't spam the log with useless data. Remove some of the log lines that are really more "debug" information, so we log the same amount of information as in the 1.4 series. Reviewed-on: http://gerrit.openafs.org/5810 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 2a1251c5d0c1b0fd4024d7b3282187a838b551fd) Change-Id: I1af47fa1910a98a6175f1f000d0432af1e1126e8 Reviewed-on: http://gerrit.openafs.org/5831 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4ff4ec8ac94a75385d919f9031abaec31aca9b26 Author: Simon Wilkinson Date: Wed Oct 12 09:47:14 2011 -0400 rx: Don't clear the receive queue when out of packets We can end up discarding a receive queue that's been soft acked, effectively taking back soft acks we sent. Whilst the RX documentation says that a client can drop soft acked packets at will, our RX implementation assumes that if the final packet in a call has been soft acked, we won't clear the queue. If a client clears the queue in this situation, the call will hang. What *should* happen is that we should take necessary locks, confirm that we have not soft-acked all of the packets in a flow, and then discard, or, if we're just going to discard, error the call. Reviewed-on: http://gerrit.openafs.org/5603 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from f722a75fe21963d64217375f1f7bbb0eb14befb4) Change-Id: Ie2f14a0ed7b6d258a7f456387df44ac95fd1748c Reviewed-on: http://gerrit.openafs.org/5820 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7b1f8cf3780b6a90dedd82c41e27be016486ac74 Author: Andrew Deason Date: Wed Nov 2 10:28:35 2011 -0500 afs: Only use actual connections for GetTime calls The for() loop that makes an RXAFS_GetTime call in afs_CheckServers was iterating over conns and rxconns from 0 to j. However, 'j' here is just the size of the allocated array, whereas 'nconns' is the number of structures in the array actually initialized. So, just go up to nconns to avoid using unitialized connections and Rx connections. This is a 1.6-only change. On master, the -settime code has been completely removed in change Id291f5f88b1ad84594706f2a1a02a933dddd0cb9. Issue reported by Sebastian Hanigk. Change-Id: Iec782a4464899b5a7e49e193b04f79e31c6b37f2 Reviewed-on: http://gerrit.openafs.org/5788 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1faea6e59980cdcc3656283f20bfc90e1d62cf50 Author: Adam Megacz Date: Fri Mar 23 12:14:41 2007 -0700 make bozo honor -rxbind correctly Bozo needs to call rxInitHost() rather than rxInit() when -rxbind is present. This patch causes it to read NetInfo/NetRestrict earlier in the startup process so it can make that decision. FIXES 57286 Reviewed-on: http://gerrit.openafs.org/4729 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 6260c4ae51e7a2807596ddf1bd49620f98eed94c) Change-Id: If873686f7a7742f82fd5fadf43c6f44379448c29 Reviewed-on: http://gerrit.openafs.org/5771 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3519bdd1cb5f6c4ffc3e0a81c3cd973be8946339 Author: Andrew Deason Date: Wed Apr 13 12:39:19 2011 -0500 Suppress cmp component version error messages When we use cmp to determine whether to replace AFS_component_version_number.c, suppress stderr in addition to stdout, to slightly reduce output during the build. Reviewed-on: http://gerrit.openafs.org/4471 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 21578144e08d46eeec9a2944e92e8d0d7a6dba57) Change-Id: Ie06f293e3750abb7514ee3795c1af41a26f46642 Reviewed-on: http://gerrit.openafs.org/5770 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4f1421187ef4f50e0aecf91ab174685d0cc96f96 Author: Andrew Deason Date: Tue Mar 15 14:24:01 2011 -0500 viced: Check vnode length on dir ops The commit aadf69eabb1962496fa93745ab560a5b48cacd61 added checks on vnode length whenever we read or write from a vnode. Add the same check on directory vnodes when we modify the directory (whenever entries are added or deleted). Reviewed-on: http://gerrit.openafs.org/4233 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2578555d7e08131bf2fe4cdd0aa4b32567a76eb2) Change-Id: I105f0dc7b480f7328205ae02929f6ca187aa962a Reviewed-on: http://gerrit.openafs.org/5769 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f01f6a9caeaf014262bb00bbe9bb51bad7179b6e Author: Andrew Deason Date: Thu Mar 3 16:02:47 2011 -0600 viced: Check vnode length on read and write When reading or writing a file vnode, check that the length of the vnode in the vnode index matches the size of the on-disk file containing the data for the file. If it does not match, take the volume offline (and for DAFS, demand-salvage it). Reviewed-on: http://gerrit.openafs.org/4121 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit aadf69eabb1962496fa93745ab560a5b48cacd61) Change-Id: I324dc79a24fc8c199825ffefcc1dd2b0097942a1 Reviewed-on: http://gerrit.openafs.org/5768 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 650223868cae563749fc7bfe4edb8746790fc435 Author: Andrew Deason Date: Wed Mar 16 11:48:08 2011 -0500 DAFS: DFlushVolume outside of vol glock DFlushVolume may traverse a long list of directory objects, and can even hit the disk, so we should drop the glock for it. This should be safe in DAFS, since we already transition the volume to an exclusive state before doing this, and DFlushVolume only deals with structures internal to the directory package and maintains its own locking. Reviewed-on: http://gerrit.openafs.org/4242 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a18175f479437f3a4fe68460538927630070cd13) Change-Id: I355c53c6f224c5471da70827f30511986abeac27 Reviewed-on: http://gerrit.openafs.org/5767 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c096127f73348a470e0e478b31c3fe132304b009 Author: Andrew Deason Date: Fri Apr 1 13:43:13 2011 -0500 afs: Retry unlock after afs_StoreAllSegments HandleFlock calls afs_StoreAllSegments when unlocking an exclusive flock lock. This can drop the write lock on avc, so we must effectively retry the entire lock operation again, since the world may have changed while we were waiting to reacquire the lock on avc. So, retry once all of the lock checks up to that point, to ensure that a lock on the file actually still exists. FIXES 125446 Reviewed-on: http://gerrit.openafs.org/4393 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 601fcf1d7f7c88cfc0ffd877c5458340b3e59098) Change-Id: Ibd215d586485d8f18f77665f5f85e6bee579e35e Reviewed-on: http://gerrit.openafs.org/5766 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 741bea05a3a5d170d47ca9df590f84ab02a7baad Author: Andrew Deason Date: Fri Apr 1 16:43:24 2011 -0500 afs: Avoid memory leak on recursive write flock When a process requests an exclusive lock on a file on which it already holds an exclusive lock, we basically form a no-op. However, HandleFlock was allocating a new SimpleLocks and attaching it to avc->slocks, without freeing the old SimpleLocks structure. Since we don't need to do anything if we already hold an exclusive lock, just break out of the loop right away when we detect that scenario. Thus we avoid adding a new structure to avc->slocks, and we avoid a memory leak. Reviewed-on: http://gerrit.openafs.org/4395 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ba9ae1ed7c269d7c080b5ce99b3b4bb2fe0a2a6f) Change-Id: I9e45a51e02774c555c6d5cb5ba9d0407b8442215 Reviewed-on: http://gerrit.openafs.org/5765 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09159b5cc353fa901d130ed5353043579cb4cb1b Author: Jeffrey Altman Date: Tue Mar 8 11:04:07 2011 -0500 vol: avoid MAXINT redefinition warning in vnode.c Reviewed-on: http://gerrit.openafs.org/4179 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b1d51d2a6030fb8aabdae1fedb6846dc7ef9fbca) Change-Id: I8ea833cca442c67468982da31ed1b6fe04508a34 Reviewed-on: http://gerrit.openafs.org/5764 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5c2e87190c9d36898831a400d9146ac533a8d844 Author: Andrew Deason Date: Thu Mar 24 10:22:52 2011 -0500 DAFS: Correct FSYNC_VOL_QUERY_VOP checks Check that the given partition matches the vp partition, and ensure the vp is not in an exclusive state when we check the state. Otherwise, we may return pending vol ops for a volume on a different partition, or we may incorrectly return that there is no pending vol op when in fact the volume does not exist at all. Reviewed-on: http://gerrit.openafs.org/4308 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8234cc254406173a7ada9fb1b4a63ca8aa626bca) Change-Id: I912c1d0b34fbbaae9ce4bd8edf6e3dd7f718be00 Reviewed-on: http://gerrit.openafs.org/5763 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 66a63e16473f178c69ba4ae6e495fbca5cd2a424 Author: Andrew Deason Date: Wed Mar 23 17:25:03 2011 -0500 salvager: Give back volumes when exiting early Sometimes the salvager exits a bit earlier than normal. For instance, when no applicable inodes are found for a volume group, or if the -inodes command line option was given. In these cases, we have already checked out singleVolumeNumber from the fileserver (if we're salvaging a single VG), so we need to give it back. So, give it back in those instances. Reviewed-on: http://gerrit.openafs.org/4297 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 637f5b642aaee3a6f4642fd0ba15e2a9eec6c496) Change-Id: Ib40ffb84fa6c40cfd692c561b913decb97268403 Reviewed-on: http://gerrit.openafs.org/5762 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 65050695a903dc12cc392d7b326cdbedfa1bf681 Author: Andrew Deason Date: Wed Mar 23 16:46:47 2011 -0500 DAFS: Do not record vol ops for DELETED vols When a volume is VOL_STATE_DELETED, it effectively does not exist, so there is little point in recording a vp->pending_vol_op structure for it. Just let callers checkout the volume as they would a nonexistent volume: without recording anything about the operation. This just reduces some edge cases and confusing debugging info, so we don't have to worry about cleaning up pending_vol_op structures for nonexistent volumes. Reviewed-on: http://gerrit.openafs.org/4296 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit dba991728ba5a90af316928348053189dac80398) Change-Id: Ica0c53e62ed885710210c7e1344e12b382302572 Reviewed-on: http://gerrit.openafs.org/5761 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1da664f520afbc81505f692e470e8efed46dab36 Author: Andrew Deason Date: Wed Mar 23 16:12:20 2011 -0500 salvager: Do not AskOnline nonexistent volumes If singleVolumeNumber is not in our volume summary list, then the singleVolumeNumber volume does not exist. So, don't try to bring it back online. Still do try to make sure we don't have the volume checked out, though, so issue an AskDelete, so ensure that it's not checked out and that the fileserver does not think it exists. Change AskDelete so we don't care if we tried to delete a volume that the fileserver thinks already doesn't exist. Change the FSYNC_VOL_DONE handler so it does not complain about already-deleted volumes. Reviewed-on: http://gerrit.openafs.org/4295 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f2c1f2ee48663d00701e7cee52b99151e36b9534) Change-Id: I708c173ae6cbd3f40cc09f6fc3229a6f038baf3f Reviewed-on: http://gerrit.openafs.org/5760 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d35b9f645396577f22b033730420149453394fdc Author: Andrew Deason Date: Tue Mar 22 16:18:17 2011 -0500 Fix ihandle.c indents ihandle.c had some blocks that were not indented. Indent them. Reviewed-on: http://gerrit.openafs.org/4273 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 9ac85bb2fd91baa4c3077d091f395f57e933018a) Change-Id: I83604d19759a183fa10989596734a405515ac19c Reviewed-on: http://gerrit.openafs.org/5759 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5823fda443115d3aae966d09141f5de4199f5741 Author: Andrew Deason Date: Thu Mar 10 17:59:39 2011 -0600 vol: Handle large volume IDs in VLockFile VLockVolumeByIdNB currently cannot handle volume IDs larger than 2^31-1. Fix this by using struct flock64, F_SETLKW64, and F_SETLK64 in the VLockFile functions where possible. Thanks to Simon Wilkinson for pointing out F_SETLK64. Reviewed-on: http://gerrit.openafs.org/4198 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 85edec7105dd653ed1d8046b69b8262281e97bba) Change-Id: Iee09a8bc4a0aabbd12fe156940fa61d6947642e8 Reviewed-on: http://gerrit.openafs.org/5758 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0a61a148e6243339b6b6afeea986f109d9037b31 Author: Andrew Deason Date: Wed Mar 2 14:13:25 2011 -0600 vol-salvage: Fix AskOnline error message Reviewed-on: http://gerrit.openafs.org/4116 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 22365ab37ac823b6734f4fc0ad79f10b6ee14390) Change-Id: I7cf852d563b72c40b183b728143b59e8e4b8da7b Reviewed-on: http://gerrit.openafs.org/5757 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 83e29ccc89a0c9a234e913b8216709bf5b541c7d Author: Andrew Deason Date: Wed Mar 2 13:12:25 2011 -0600 Give a default reason in *sync-debug If no -reason is given for fssync-debug calls, we currently just transmit garbage to the fileserver or salvageserver. Instead, give a default (the *_WHATEVER constant), so we do something consistent. Reviewed-on: http://gerrit.openafs.org/4115 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7f31a11d110085ae528d4555d34744c0832008b0) Change-Id: I27aefea0e891444e006e5d4b5ed43ed9cd492242 Reviewed-on: http://gerrit.openafs.org/5756 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ffd4a867a3f339853631fc6dd708222961493e6 Author: Andrew Deason Date: Thu Feb 3 15:40:48 2011 -0600 ConvertROtoRW: Use old copyDate for creationDate When we convert an RO volume to an RW, currently we just copy the copyDate and creationDate from the RO metadata into the RW. But the copyDate and creationDate fields have different meanings for RW and RO volumes: for ROs, the creationDate is merely the last time the data was updated from the RW during a release operation. So, if the copyDate is older than the creationDate, use the copyDate as the new RW creationDate instead. This will probably not match the creationDate of the original RW, but it will be closer to it, and it will more accurately represent the conceptual "created time" of the new RW. Doing this can avoid forcing an unnecessary full dump on a subsequent release of the resultant RW volume, since the creationDate is more accurate. Reviewed-on: http://gerrit.openafs.org/3891 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f47487db051ba6b51ae12daf7edc09ecfd3c38cd) Change-Id: I54516a20ebb87d9c482cbc4840e0d236e7c54f8a Reviewed-on: http://gerrit.openafs.org/5755 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f6168a849cbb5bde34cec11e02df54481fc5d3ca Author: Andrew Deason Date: Thu Aug 12 14:38:55 2010 -0500 libafs: Set tvcp->callback before BulkStatus When we call InlineBulkStatus or BulkStatus, we currently do not touch tvcp->callback for any of the vcaches before making the call. This can cause us to not notice an InitCallBackState issued by the fileserver before the BulkStatus call returns, since the InitCallBackState handler looks at tvcp->callback to determine what vcaches to clear callbacks for. In turn, this can cause us to think we have a callback agreement with the fileserver on one of the BulkStatus'd files, when the fileserver does not actually have such a callback agreement. So, set tvcp->callback to the server we are contacting, so if we get an InitCallBackState call from that fileserver, the CBulkFetching state will be cleared, and we will correctly discard the callback information for that vcache. Reviewed-on: http://gerrit.openafs.org/2548 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 37817796c4890683a7e41ed0f3a2fa6a53e1edc7) Change-Id: I85c89eff061af799a7d8f612bee9b2f182312e6f Reviewed-on: http://gerrit.openafs.org/5754 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 651dd6d25e307f08ab63080b0afdba4762ad2bb5 Author: Andrew Deason Date: Wed Nov 24 10:03:19 2010 -0500 ubik: Log a message when we replay the trans log It can be helpful to know that an interrupted transaction was replayed on startup, and this should be rare. So log a message when that happens, indicating what db version we replayed to. Reviewed-on: http://gerrit.openafs.org/3385 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d29550a438a60dd918938f484c7b75e25478abd9) Change-Id: Ic3c8ec68febae8b61b6d04ef4d063178dffe8d0e Reviewed-on: http://gerrit.openafs.org/5753 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 237e8e199006c9627db8bb686f453e91882e2bd0 Author: Andrew Deason Date: Wed Nov 24 09:36:05 2010 -0500 ubik: Replay the transaction log label correctly Commit eec0d94f519b3e27f255b9b7a637df043951424e fixed the transaction replay log code to correctly identify valid transaction logs on little-endian systems, but missed ntohl'ing the database label read in a LOGEND opcode. Fix that, so the database is labelled correctly when replayed from a transaction log. And while we're here, actually pass a struct ubik_version* to adbase->setlabel, to make it a little more clear what's happening. Reviewed-on: http://gerrit.openafs.org/3384 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1e8598b334b4354a3998b1e5fe189f3f33957048) Change-Id: I832eff8641c339a103170f50238bbb669412bda0 Reviewed-on: http://gerrit.openafs.org/5752 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4c80871a16d6022c3d3e5edc0504208ddad49cc8 Author: Andrew Deason Date: Wed Sep 1 15:10:56 2010 -0500 ubik: Record the last write tid in writeTidCounter ubik is currently tracking writeTidCounter for write transactions separately from regular transactions (assigned from tidCounter). Specifically, tidCounter is incremented twice for each transaction, but writeTidCounter is incremented twice only for write transactions. As a result, writeTidCounter and tidCounter tend to drift far apart. This is a problem, since the tid for DISK_* calls uses the transaction id of the current transaction (based on tidCounter), and VOTE_Beacon uses writeTidCounter for its transaction id. So, in effect, the tid in VOTE_Beacon is completely bogus and unrelated to the transaction id of the actual current write transaction. This can cause valid write transactions to become invalidated when tidCounter becomes negative, since VOTE_Beacon will send a positive tid, and if there is a current in-flight write transaction with a negative tid, SVOTE_Beacon will deem the transactions inequal and will abort the write transaction. So instead, record the transaction id counter for the last write transaction in writeTidCounter. This way, when we call VOTE_Beacon, we will use the correct transaction id counter for the current write transaction, and SVOTE_Beacon on the remote site will not invalidate the transaction. Reviewed-on: http://gerrit.openafs.org/2647 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a0cc81c0894193db11860d8fe40380c7198741a9) Change-Id: Iabff9bd68db088c30c7e44ad71b7d34bcfaaf207 Reviewed-on: http://gerrit.openafs.org/5751 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b9830adf8b2b98dabed8a23e400529f36e91c222 Author: Andrew Deason Date: Wed Sep 8 14:32:35 2010 -0500 DAFS: raise vhashsize limit Raise the maximum specifiable vhashsize to 28 (from 14). Specifying a vhashsize over 14 can be reasonable if you expect to have a few million volumes on a fileserver. Reviewed-on: http://gerrit.openafs.org/2725 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b2d067a913d3c2e5dbfe756b7752ade308f967c1) Change-Id: I2e2d7ca4986af417c3298c3cfff8f087d795bc53 Reviewed-on: http://gerrit.openafs.org/5750 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0548587958317c6ebd73081e36e511102442ea0f Author: Andrew Deason Date: Thu Sep 2 12:56:28 2010 -0500 DAFS: Do not ignore out-of-range -vhashsize If the specified -vhashsize is out of the 6-14 range, do not just ignore it. Instead, note the error and quit. Reviewed-on: http://gerrit.openafs.org/2649 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 575bdaf56e8f5503513bec113653fbbe525ae228) Change-Id: Ie0ebfcf1b5c88816ef58eab109fb05de4c7fad1e Reviewed-on: http://gerrit.openafs.org/5749 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ffa86554af738fb49a17889870616ad113b70374 Author: Simon Wilkinson Date: Sun Apr 17 21:30:39 2011 +0100 Tidy up uio_t meaning On IRIX, uio_t is typedef'd to "struct uio". On Darwin, uio_t is typedef'd to "struct uio *". Reduce the confusion by just not using "uio_t" in places where it isn't being defined for us, and avoiding it completely in cross-platform code. Reviewed-on: http://gerrit.openafs.org/4748 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ca465e432d67b067fc3854781b8702aaff577cc7) Change-Id: Id37d11e72d196f5008e9843d4f04c492a4017e72 Reviewed-on: http://gerrit.openafs.org/5779 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 66d1ace117bc0e1ae40c746e5b80d2894bd9e4a9 Author: Andrew Deason Date: Tue Mar 8 16:59:32 2011 -0600 SOLARIS: Perform daemon syscalls as kernel threads Add AFS_SUN5_ENV to the list of platforms where AFS_DAEMONOP_ENV is defined. Implement the necessary functionality so we spawn kernel threads when a daemon syscall is called. Remove the rxk_Listener wrapper, since it will be called in a separate thread via the afs_DaemonOp interface. Reviewed-on: http://gerrit.openafs.org/4189 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e261238470ed28ee7c1068d914de171b34033e09) Change-Id: I6b3eb829dec3ec4338dbe8f2363ced2bdcd7dc9a Reviewed-on: http://gerrit.openafs.org/5778 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 942ec73fa66171cdeb8966ded83e140238c4f8cd Author: Andrew Deason Date: Tue Mar 8 15:37:17 2011 -0600 libafs: Consolidate afs_DaemonOp code Create the AFS_DAEMONOP_ENV define to simplify the logic of when we perform afs_DaemonOp-y code paths. Also create the daemonOp_common function, to perform common pre-fork operations that are common between platforms. Reviewed-on: http://gerrit.openafs.org/4188 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6143bb27d20380e689346b4e66c077e5d4cd6061) Change-Id: I8878b5b55871c1974b19c2af64636ea536841bff Reviewed-on: http://gerrit.openafs.org/5777 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f618b050d4507753df38a573e9f7ef5823f2d8aa Author: Andrew Deason Date: Tue Mar 8 14:59:44 2011 -0600 libafs: Indent afs_call.c ifdef maze Reviewed-on: http://gerrit.openafs.org/4187 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 05241a59a1ce88d2f25d75127124971c55e1f677) Change-Id: I3ef7aeb5e111f9365a10d86a440ad31c4fe76902 Reviewed-on: http://gerrit.openafs.org/5776 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ab9bdaf1108277d2ea6ae268b316699b4f292c30 Author: Ben Kaduk Date: Sat Oct 8 17:16:26 2011 -0400 FBSD: deal with kernel API rename Upstream decided to rename the kernel functions that implement syscalls to have a sys_prefix (including afs3_syscall!). We use a couple of them, so we need to conditionalize accordingly. Unfortunately, __FreeBSD_version was not bumped with the change, so we use something close to it and hope it's close enough. Reviewed-on: http://gerrit.openafs.org/5572 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4a1d319177ea0e58c9046c3c173bb7d2877d1bc3) Change-Id: I01d943398a3c15009f72f668720bfe6bc8eac63d Reviewed-on: http://gerrit.openafs.org/5639 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 793f219e7b4d2fc401b0427723167e50fd6a9fb8 Author: Derrick Brashear Date: Tue Oct 11 15:37:57 2011 -0400 ukernel: get an ip address even when dns and hosts suck gethostname plus gethostbyname being useless make things fun make things less fun (cherry picked from commit 6f59c71988d75f76750c46adb11cda7e9189d5f3) Change-Id: Id7d9181b2d87f7a87a08991b96da664f4297604b Reviewed-on: http://gerrit.openafs.org/5726 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2d817e49d6aeb10acd93a9f73badcbed54fd3878 Author: Jacob Thebault-Spieker Date: Tue Jul 19 15:01:26 2011 -0700 allow cloning of any volume to any volume with same parent ID remove checks to disallow cloning of ro volumes to rw volumes, which allows cloning of any volume within the same parent ID grouping, including allowing destruction of newer version of the volumes. Reviewed-on: http://gerrit.openafs.org/5049 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 83c41c69411ece7ac1dd0a7b15d4ee9746edcf23) Change-Id: Idc2575538811d278fb65be46cfc0cd4d24d90f5d Reviewed-on: http://gerrit.openafs.org/5725 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit da78610b266a04bee6674339300495a7ad21f015 Author: Jacob Thebault-Spieker Date: Tue Jul 19 09:02:49 2011 -0700 remove check for disallowing clones of backup or ro volumes removes the if-statement ensuring that the volume being cloned is not a backup volume, nor a read-only volume. This allows clones from any type of volume to a given volume. Parent volume meta-data is maintained, only the cloneId value changes. Reviewed-on: http://gerrit.openafs.org/5046 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e1a65ba7edec519acc67f0dcf2237a0f26e92aa) Change-Id: Ibda6a8a12804fc35890c99ada6d711e25a50a6c8 Reviewed-on: http://gerrit.openafs.org/5724 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 068f201c3fa1a4e1d807b063a338b94e0514fe44 Author: Michael Meffie Date: Thu Oct 6 07:55:21 2011 -0400 bozo: test program update Add -file option to test program to simulate program crashes. Reviewed-on: http://gerrit.openafs.org/5533 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e7302bcc9c4aa6f1e6a1ae8e5b498bcb0540aac9) Change-Id: I0cf394c881da7c01f75a7926700f896a905e8172 Reviewed-on: http://gerrit.openafs.org/5723 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 465e613b5d73380374eb69a226f4227e976e1f5c Author: Andrew Deason Date: Mon Aug 29 17:41:31 2011 -0500 DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER Currently VRequestSalvage_r takes a flag, VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the specified volume to be freed (via FreeVolumeHeader). This is almost never safe to do, since there may be other users of the specified volume that can be accessing the volume header at the same time. There is also no reason to invalidate the header at the time of the VRequestSalvage_r call, since the header must be invalidated when we detach the volume (other utilities may change header information). So, if there are any problems in the future because we do not invalidate the header at the time of VRequestSalvage_r, it is the fault of the detachment/offlining logic. So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take this opportunity to correctly document the VRequestSalvage_r headers in the VRequestSalvage_r comment, as it was previously missing the VOL_SALVAGE_NO_OFFLINE flag. Reviewed-on: http://gerrit.openafs.org/5319 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5) Change-Id: Ib991ecefea2115a3c4308ed3c261af7433c9b858 Reviewed-on: http://gerrit.openafs.org/5722 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 850ca0e1441d12f9dbc0545d97ab3d74318cff88 Author: Michael Meffie Date: Thu Oct 13 12:23:35 2011 -0400 DAFS: fssync online requires a partition name argument fssync-debug online silently fails when run without a partition name. Check for the required partition name on the server side and the client side. Report errors back to the client when the server side fails to pre-attach the volume. Reviewed-on: http://gerrit.openafs.org/5615 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d171a5e059566cc99c5dd980039dd56233f91a67) Change-Id: Id8776c71cd1712ecb779c76565cfb9e685e54a19 Reviewed-on: http://gerrit.openafs.org/5721 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 080e4a736ba95d4dcb4167a1a8f8accab8a928b0 Author: Andrew Deason Date: Tue Oct 11 10:51:14 2011 -0500 volser: Remove ExtractVolId volser was using its own function to extract a volume ID from a filename string, and was using atol to do so. The ato* family of functions can have problems with larger volume IDs, not to mention a lack of error checking, so don't use it. Since we already have the function VolumeNumber in the vol package to do the very same thing, just use that instead. Reviewed-on: http://gerrit.openafs.org/5594 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 87f969f82d12c8200ede3fd30a151e09ab0bf6ad) Change-Id: I4f047c4141493e151db0a6b5ec21bee3af35e040 Reviewed-on: http://gerrit.openafs.org/5720 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bcccac5ccb89a9b4368bcef293913bcf98b8446c Author: Andrew Deason Date: Mon Oct 3 13:10:44 2011 -0500 viced: Check for HOSTDELETED in stillborn check h_FindClient_r checks the connection rock for a client object twice. First it sees if we already have a client object, and if we don't, we effectively create one (or find a suitable one). Then we check again, to see if someone else set the rock while we were creating a client structure. Currently, the first check checks if client->host->hostFlags has HOSTDELETED set, but the second check does not. So, if the host associated with the client has been deleted by someone else, currently we will unnecessarily log a "stillborn client" message, and we will continue to use the deleted host. If the host continues to be held by someone, we will run into the same situation repeatedly on future requests until all of the host references go away. To fix this, also ignore HOSTDELETED clients when performing the stillborn race check. Reviewed-on: http://gerrit.openafs.org/5614 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b5a153fb75bb6642490e9856dc6212244a590301) Change-Id: I3fb0b01c2ef14cd077cd4db9476ed6e90c7d3c2a Reviewed-on: http://gerrit.openafs.org/5719 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b33db8c7dee9ecf397d943fbc56cdf70dda5198e Author: Andrew Deason Date: Fri Oct 14 11:32:34 2011 -0500 vos offline: Bring volume back online for -busy vos offline is supposed to bring a volume back online from "busy" status before exiting, as volumes should not be in "busy" status for extended periods of time. This was being enforced by required that -sleep be specified; however, -sleep only results in the volume being brought back online if a non-zero sleep time was specified. So, make sure the volume is brought back online if -busy was specified. Reviewed-on: http://gerrit.openafs.org/5620 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d) Change-Id: I64aa6f297b787ca666959ff4f35d17aced6e41a7 Reviewed-on: http://gerrit.openafs.org/5718 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1bee1365cdcc45bfb5a562acf86fb1169f14d0d0 Author: Derrick Brashear Date: Sun Oct 23 19:15:16 2011 -0400 bypasscache: allow arbitrary sized iovecs instead of binding outselves to PAGE_SIZE, just fill any size Reviewed-on: http://gerrit.openafs.org/5658 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 4b817cbb520872e69b01e5675f9037d8948d0ade) Change-Id: I350f4e7e0936be50960c80d115a44afe750a48fa Reviewed-on: http://gerrit.openafs.org/5717 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d7ed88fce430fc004daefe46eda0817a353e8580 Author: Derrick Brashear Date: Thu Oct 6 04:04:36 2011 -0400 bypasscache: do errors correctly do set errors when we bomb out early do not unlock and return early when we happen to do a correct zero length read do set errors the kernel can deal with if we're feeding a page routine Reviewed-on: http://gerrit.openafs.org/5554 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 28a159b2bfff7ad450dce612601a0286d4f91df5) Change-Id: I4f2e1b50a3c0856a08281e0ffbfaa7cbb71db2c4 Reviewed-on: http://gerrit.openafs.org/5716 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5391ef073266a3110692792933e206574136d583 Author: Simon Wilkinson Date: Sun Oct 23 19:07:33 2011 -0400 rpm: Turn on debugging Now that we build with a blank CFLAGS line, we need to make sure and actually turn on debugging in the build system, so that our debuginfo files are vaguely useful Reviewed-on: http://gerrit.openafs.org/5662 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1de23d1fe5d64c8f5e8f24579c0926fabdaace92) Change-Id: I9384b9632efb5e7a9054b49c6b6f2f4cfc9c9376 Reviewed-on: http://gerrit.openafs.org/5715 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 660b35f5117993c1ab0d3d0afa3fb4a26fb54346 Author: Simon Wilkinson Date: Wed Oct 12 09:50:18 2011 -0400 rx: ackall handling If we ACKALL a stream, then we're sending a hard ACK for all of the packets in the stream. We shouldn't send that hard ACK, and then a load of soft ACKs for packets that don't actually exist. Reviewed-on: http://gerrit.openafs.org/5604 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a9924ba433f81bfbfc2c0e726f2be06d460e4d56) Change-Id: Ibba1d5448f2ba9315b6b9bc3e893d16d8bcdbc3c Reviewed-on: http://gerrit.openafs.org/5714 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f26f90640ea7362d74d3cdfb4f470c4d86f505ef Author: Andrew Deason Date: Fri Oct 21 15:05:06 2011 -0500 LINUX: Fix afs_linux_pag_to_groups signature "new" is a struct group_info**, not a struct group_info* Reviewed-on: http://gerrit.openafs.org/5648 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e) Change-Id: I6a3f31284f74af8cdeeeecd920bec26f955dc0da Reviewed-on: http://gerrit.openafs.org/5713 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d6c5cde26e35498e7eb7cde02b30ed94d26b37e6 Author: Andrew Deason Date: Fri Aug 12 14:50:26 2011 -0500 LINUX: Revert group changes on keyring failure On Linux kernels that support keyrings, when we setpag we try to add the PAG to the session keyring and to the supplemental group list. Currently, if we fail to add the PAG to the keyring (which may happen due to key quotas, or possibly other reasons), we return failure but the group list is still modified with the new PAG in it. Therefore, if the keyring-based approach fails, the new PAG may still be in use, but there are no keyring keys associated with that PAG, so the PAG may never get destroyed. This can cause a large number of PAGs to accumulate over time, causing performance problems. So, change this so that, in the event that keyring installation fails, we revert the group list back to what it was before we touched it. Also mark all unixusers with the new PAG as expired, in case one got created during processing. Thus, the new PAG never gets used. Reviewed-on: http://gerrit.openafs.org/5238 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit ee2fbffb04bb8b5098354646e262afa90c1b6f59) Change-Id: Ie954ce2b1bc502cc1abe2fa1eecc18b31d066038 Reviewed-on: http://gerrit.openafs.org/5712 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d1711efd73b8dea177672eeb477a23d4a83b95b7 Author: Andrew Deason Date: Thu Oct 20 16:57:14 2011 -0500 viced: Do not swallow errors on StoreData recovery When we encounter any error in the StoreData fetch/store loop, we reset the disk usage to ensure it remains correct, even in the face of unexpected errors. However, when we do so, we use the errorCode from VAdjustDiskUsage as our return value; if it is 0, we return success, ignoring the error that got us in this code path in the first place. Instead, keep track of a temporary errorCode for the disk usage adjustment, and do not override our return value if there was no error in the disk usage numbers. Reviewed-on: http://gerrit.openafs.org/5645 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit dd831c09602f1ef16cc7dece84aeff638cce7272) Change-Id: I154e6cbc96ee4e32bee2da77441547c1dce8b42c Reviewed-on: http://gerrit.openafs.org/5711 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a4333a6bc1971a8f31a117998cdbf48c2ef99b7e Author: Simon Wilkinson Date: Wed Oct 12 09:44:37 2011 -0400 linux: makesrpm should cope with releases with letters don't just deal with numbered releases. Reviewed-on: http://gerrit.openafs.org/5602 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 69f54d474827548375c0bd39a87ac7ec376b6d9b) Change-Id: I3e433fe4b7f1b2dbedcfc70215ba114de16900c4 Reviewed-on: http://gerrit.openafs.org/5710 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85fb3f2d3fb16319668d634b6a15f3b07ba73aa5 Author: Derrick Brashear Date: Wed Oct 12 14:34:55 2011 -0400 afs: don't try GetDownD if nothing to get if we "need" negative slots or caches, don't run. also, don't stay "too full" Reviewed-on: http://gerrit.openafs.org/5612 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 488c7c97854a4bd0ec67bcfe17df93b3fd025f88) Change-Id: I1bdd37ce5659ce770f0fbb23bcb9174858b5eeed Reviewed-on: http://gerrit.openafs.org/5709 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cee07e0612febb9b7e7f199720ca9a2e575874bf Author: Simon Wilkinson Date: Wed Oct 12 15:26:23 2011 -0400 ukernel: don't define rdwr env on linux We're not vm rdwr env in ukernel. Don't claim we are, otherwise we will never push chunks out to the fileserver when our cache is full Reviewed-on: http://gerrit.openafs.org/5613 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 796de9fb43857acccbd51e2af7c8d67eea90fdc5) Change-Id: I0256c7bdd8a19a191a5d9981525ee288e614fef0 Reviewed-on: http://gerrit.openafs.org/5708 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f84b2b5692f94473ad5acb03e9ea36fbba153dea Author: Derrick Brashear Date: Wed Oct 12 13:09:42 2011 -0400 ukernel: set pthread stacksize to an integer multiple of 8k because some pthread stacks require this to be in units of page size, guess that page sizes will be 4k or 8k, and use the larger as a divisor Reviewed-on: http://gerrit.openafs.org/5606 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear (cherry picked from commit 7ae1921b76750ef28258777cf1b233c4917663d7) Change-Id: I273ee935db4cf6c17ca50eedab8cfd577d21a599 Reviewed-on: http://gerrit.openafs.org/5707 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 399a0fc8510bbbe65a4df98ff7620766955dd3af Author: Simon Wilkinson Date: Wed Oct 12 13:04:28 2011 -0400 ukernel: add morepackets check in listener Make the listener loop actually check for more packets needed, like kernel, pthreads and lwp. Only checking for new packets every 20 seconds isn't sufficient on today's networks! Reviewed-on: http://gerrit.openafs.org/5605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit eead07418f13cd87a90770f03ea5118c546d8f1a) Change-Id: I84156d5f1c228e4b3987c17a72ef7c71f0339d4a Reviewed-on: http://gerrit.openafs.org/5706 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 112fc56ed5b15c386727bea4d8e345f23984558b Author: Derrick Brashear Date: Tue Oct 11 15:21:12 2011 -0400 afs: on uuid init fail, don't leave garbage behind make sure we zero the uuid if we failed Reviewed-on: http://gerrit.openafs.org/5599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb) Change-Id: I20313628c4ac26fc67a2adc909e39bf53742314b Reviewed-on: http://gerrit.openafs.org/5705 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9549e1bafd62419f2b92f36a7f9719e2152fb42e Author: Derrick Brashear Date: Tue Oct 11 14:32:04 2011 -0400 ukernel: set close-on-exec on our socket if the process we are in execs a child, it doesn't get our socket Reviewed-on: http://gerrit.openafs.org/5598 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 87dcfc872c11fdb13ebf0448abe91150aaa86859) Change-Id: I7e94e5192783c57aa77afc1b583cccda77ec7653 Reviewed-on: http://gerrit.openafs.org/5704 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95e07206a55d5a44a894b8be6586ad745697d8d8 Author: Simon Wilkinson Date: Mon Oct 10 17:19:13 2011 -0500 docs: Refer to dafs binaries by their real names (Most of) the dafs binaries are called da(something). Update the example in the dafileserver documentation so that we call the binaries by the names that they are actually installed with on the system. Reviewed-on: http://gerrit.openafs.org/5654 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit c37a14697df291f641b4fa5a32826054d92210b0) Change-Id: I001a0e2c94a7c52d91b2ebf257d097ce7400eb3a Reviewed-on: http://gerrit.openafs.org/5703 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9472bcb33ddbab25d7925c74a164376dc34a9661 Author: Simon Wilkinson Date: Mon Oct 10 22:09:40 2011 +0100 ptserver: Don't check for noauth before rebuilding The ptserver database building scripts would check to see if the server was running from a bosserver with the noauth flag set before performing a database rebuild. This means that you can't start ptserver normally, and then configure the database using pts -localauth, which is the preferred method for configuring new cells. Remove the check for noauth. This is slightly risky, as it means that a corrupt database could be completely erased upon restart. However, we already check that the dbheader (65k) is entirely blank - which will protect us against any single page corruption errors. Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 7a4498850814ea524f55de0b84d6b0ae0b4834bb) Change-Id: I95acbc980537d08a5a06541a75ec5af1ca5bbdd1 Reviewed-on: http://gerrit.openafs.org/5702 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 121e5ca39367b44cab6a80aaece4559625aa428c Author: Derrick Brashear Date: Tue Oct 11 14:03:29 2011 -0400 ukernel: don't enforce thread lockers in remove vop we enforce locking by pid. when we are ukernel, MyPidXX is stupid. don't bother. Reviewed-on: http://gerrit.openafs.org/5597 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit da9044cff966736bc064166a7136c94c0bfc1e5f) Change-Id: I84ec39a8fd6367a0a832eb5c9d8a9727454b8948 Reviewed-on: http://gerrit.openafs.org/5701 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b4fabcd4de64d9b271b5cb01fc59fcab8bd0791e Author: Derrick Brashear Date: Mon Oct 10 17:56:20 2011 -0400 ukernel: install our sysincludes to root.perf otherwise, we can't actually include sysincludes from something linking libuafs Reviewed-on: http://gerrit.openafs.org/5593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 75179d50eae3258e8baa0a4c9f069fcd11d08260) Change-Id: I9d0712766539af2f9a4ec2b291960a373e13b7e7 Reviewed-on: http://gerrit.openafs.org/5700 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c829702f7843b3f85b092313229287ef08c5085d Author: Derrick Brashear Date: Mon Oct 10 16:35:45 2011 -0400 ukernel: add uafs_access we don't have an access vop. add one. Reviewed-on: http://gerrit.openafs.org/5589 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3eb60908a1f9b3f2783ec3f7755b242bff3d573d) Change-Id: If45a7286b31e20e4e37119e5555f49ef69c8bb97 Reviewed-on: http://gerrit.openafs.org/5699 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3a66ddc59c349bd044f436a3d7a8979c6f322611 Author: Derrick Brashear Date: Wed Sep 21 15:02:40 2011 -0400 bypasscache for ukernel simple (read) bypasscache for ukernel. does not bother trying any buffercache stuff. Reviewed-on: http://gerrit.openafs.org/5484 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d1cf14d54e380014851fb850b65263a66a8a4443) Change-Id: Ia66dcdfad42fe95b3456430eeb8b12c161c185a5 Reviewed-on: http://gerrit.openafs.org/5561 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fc14f8545a8a6fc5bc3233f51705890b782f3d40 Author: Hartmut Reuter Date: Wed Oct 5 10:06:05 2011 -0400 vol_split: avoid using stale open directory vnodes we could in case of multiple splits end up using a stale open vnode for a directory; attempt to close and thus force-reopen any fdhandles backing ihandles. Reviewed-on: http://gerrit.openafs.org/5553 Reviewed-by: Hartmut Reuter Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c) Change-Id: I4894b21ac3ee114f57192261220c002a2e213ae9 Reviewed-on: http://gerrit.openafs.org/5698 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 84befb7f70bd7d9dc7b27930e35a87601d626133 Author: Michael Meffie Date: Thu Oct 6 06:03:07 2011 -0400 bozo: bosserver man page updates Add the new -pidfiles option to the man page. Add a few other missing options as well. Reviewed-on: http://gerrit.openafs.org/5587 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 26253df896a7709847cda041db1dc187f1dbf83e) Change-Id: Iac3a96bfc825143a7b8c7b4e359f35d72bbb2d4c Reviewed-on: http://gerrit.openafs.org/5611 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit a826900040039c03c56c0ac797ee4bc23c1742a5 Author: Derrick Brashear Date: Mon Oct 10 16:44:05 2011 -0400 bypasscache: don't define uio_t for ukernel we shouldn't need this Change-Id: I2141622a70dd9f78676633dce2e0ea11cba6a508 Reviewed-on: http://gerrit.openafs.org/5590 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 91354efe2618b5831a5ff8c1da6be23fc44c52b3 Author: Andrew Deason Date: Fri Oct 7 04:04:03 2011 -0400 RedHat: Add xstat_*_test commands to RPMs Install the xstat_*_test commands in the 'openafs' RPM. Reviewed-on: http://gerrit.openafs.org/5557 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d84c91788e0f61a9b2837f9b6ba2492072df33da) Change-Id: I85e94b7616a64e03482b8dc8cb55c589541a6581 Reviewed-on: http://gerrit.openafs.org/5560 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f94a7ac9774506ae284d90266627d8ad2cbbd2cc Author: Michael Meffie Date: Fri Oct 7 05:50:37 2011 -0400 doc: fileserver synopsis typo Fix a fileserver synopsis typo noticed during Derrick's EACK2011 debugging session. Reviewed-on: http://gerrit.openafs.org/5558 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f2cba414c1390d5ed46b6c57f5682bfbcf53774e) Change-Id: I8765cb2e5b3e0c64611a02dd59b4a8f9a2dac5eb Reviewed-on: http://gerrit.openafs.org/5559 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 366c4ad3da28f17c6f680945a88ea5ca866732aa Author: Andrew Deason Date: Wed Sep 28 15:02:48 2011 -0500 vol: Only check "logging" on vice partitions We don't care about non-vicepX partitions, so move part of the UFS "logging" check into VCheckPartition. This API should probably redone so the "am I a vicepX partition" check is done completely separately, but for now, this will do. Reviewed-on: http://gerrit.openafs.org/5514 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Tested-by: BuildBot (cherry picked from commit 82481c6f4464ad978ea56c687205bdfcd3eebffd) Change-Id: I5cbd7d6eb2db5bbbb8f47e5fed262466ae2ddd1e Reviewed-on: http://gerrit.openafs.org/5548 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 45fb811afc05f6d9ab780b984b647db6c1341241 Author: Rod Widdowson Date: Thu Sep 29 15:34:48 2011 +0100 FSSYNC-Client: Consistent use of partition name Over time the FSSYNC code has collected examples where the partition path is passed rather than the partition name. In Unix this is the same (/vicepX), but on windows the path is the DOS device (C:). This checkin changes FSSYNC client code to always use the partition name. This checkin does not address FSSYNC server or SALVSYNC. Reviewed-on: http://gerrit.openafs.org/5521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit b4f96eb78d9403799b97a39b9659070cf1114cd1) Change-Id: I84d3dd586c735e9a6e2f598317873ba554a10ece Reviewed-on: http://gerrit.openafs.org/5547 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 69a28651099e3c3ff9582c3dee04db1db47ac3f7 Author: Andrew Deason Date: Thu Sep 29 14:49:53 2011 -0500 DAFS: Do not serialize state for invalid hosts When we serialize host information for DAFS during shutdown, we have no guarantee that the host is in a valid state when we look at it. This can result in a host being saved to disk when we are waiting for the host to respond to an RPC, and so the information about the host is invalid. For example, we can save a host that has the HWHO_INPROGRESS flag set, and when it is restored later, this can cause odd behavior since the flag is set but no thread is actually waiting for the host to respond. So instead, during state serialization, try to determine if a host may be in an invalid state, and simply skip the host if it may. Reviewed-on: http://gerrit.openafs.org/5528 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5c6bd04211d587efde4b0915a62273aafb2d306b) Change-Id: I9bf8cfec80ff9e626777375e94743ac621b52cb3 Reviewed-on: http://gerrit.openafs.org/5546 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9378144f94425df4abbe818ae93b3eb06c49b43c Author: Andrew Deason Date: Thu Sep 29 16:04:54 2011 -0500 DAFS: Skip hosts with invalid flags on restore Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have valid state, since those flags indicate that the fileserver was in the middle of identifying the host when the host struct was serialized. Skip entries from the on-disk host data that have such invalid flags set when restoring state, so we do not load invalid data. Reviewed-on: http://gerrit.openafs.org/5527 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6e7b31ef0a69b8ea39e8acc474a7aab48f828d3d) Change-Id: Ifa69ec30bda8f9ba162954d39f9b60d9fc630289 Reviewed-on: http://gerrit.openafs.org/5545 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 855d3fbcde486640ba60fcce283cebb4bbdafe98 Author: Jeffrey Altman Date: Fri Oct 7 18:45:08 2011 -0400 Do not call krb5_get_error_message with NULL context MIT's krb5_get_error_message() ignores the context and can be called with a NULL context. Heimdal's version does not. Derived from http://gerrit.openafs.org/5508 aka commit 9dd9cfa0e1536e0e75628c84605b3d5b8486d69c The 1.6 branch is sufficiently different from master. Change-Id: Ie325705a78b155a04a6a9d44800037b72f5b045c Reviewed-on: http://gerrit.openafs.org/5569 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74a08db14306bf5a7666951c09a6b8866e94e087 Author: Jeffrey Altman Date: Tue Oct 4 17:29:26 2011 -0400 Windows: char* is not a Unicode string Do not treat the output of NetbiosName() as a wide_t when it is a char*. Reviewed-on: http://gerrit.openafs.org/5549 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e02cb72be034ddad019d2ee70e8009ee762d9ed) Change-Id: I03523441c3520f316232956d22d0f0a7203e4f36 Reviewed-on: http://gerrit.openafs.org/5568 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b84e83a47f57186ab31886c74760f2c9019868d4 Author: Jeffrey Altman Date: Thu Sep 29 09:35:51 2011 -0400 Fix typo in windows release notes Reported by Jeff Blaine. FIXES 132233 Reviewed-on: http://gerrit.openafs.org/5519 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fd66404d9deeb292e1eadb23f5e0f287f9bf8f9) Change-Id: I8dc67108d02a21ce87bfdcbf03bb827644794366 Reviewed-on: http://gerrit.openafs.org/5567 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c9187a12787da491dc4b0ee8132eba5545db58c Author: Jeffrey Altman Date: Mon Sep 19 10:35:11 2011 -0400 Fix input size computation in SetSPrefs pioctl Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained a small typo that prevents the SetSPrefs pioctl processing from functioning in all cases. fs setserverprefs continues to work for non-DB preference lists because fs.c pokeServers() attempts to try the old SetSPrefs33 pioctl in the non-DB server case. Reviewed-on: http://gerrit.openafs.org/5465 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 552d59186b135af55eeaa6136a9cbb8965dd2f04) Change-Id: I2226334c558bdc4d24e17d32751154f99f2a53a6 Reviewed-on: http://gerrit.openafs.org/5566 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit be937e205a40f1eea6691f77b9da750729e177f3 Author: Jeffrey Altman Date: Thu Sep 15 01:29:57 2011 -0400 Windows: build loopback installer for current DDKs Modify the build rule for the loopback installer to permit it to build with the latest DDKs. Reviewed-on: http://gerrit.openafs.org/5435 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b418d381be8c778ebeb93dd75bdc068dc4ed4871) Change-Id: Ia12842875de3b333bdcb28c426056ad5856b423e Reviewed-on: http://gerrit.openafs.org/5565 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c63f22c4c78679188ac1f5b8b4ad1fb5c9fb373b Author: Jeffrey Altman Date: Thu Sep 15 01:26:00 2011 -0400 Windows: no SOCKLEN_T before WDK 6.0 Reviewed-on: http://gerrit.openafs.org/5433 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3f3fedecd08834439c462725e04eb04c690c07ee) Change-Id: I6e867c9d36d7c7f5248e6af7fe6004f1c7905e63 Reviewed-on: http://gerrit.openafs.org/5564 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d1249ff41af03acc58d12709d6910313979cd43 Author: Andrew Deason Date: Thu Sep 29 15:22:35 2011 -0500 DAFS: Add explicit 'valid' field for index maps The CB, FE, and host serialization structures were just using the relevant indices to determine whether or not an entry mapping and old index to a new index was populated with actual data. For host structures, this really isn't sufficient, since our index can be 0, and the structure is calloc'd, so the index in the structure could also be 0. Add a flag explicitly stating whether or not the structure has been filled in, to make this unambiguous. Reviewed-on: http://gerrit.openafs.org/5526 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d54a9994d362ce3f287fe786839ec72f6d94806c) Change-Id: I0bd3e50dec4e686acc3e9cda3eef7b7909266f27 Reviewed-on: http://gerrit.openafs.org/5544 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit accf7824d2528894e791088326128dee85bc6a31 Author: Derrick Brashear Date: Wed Sep 28 10:23:19 2011 -0400 ukernel: output dataversion in stat struct if possible we already have this data; if we can output it, do so. Reviewed-on: http://gerrit.openafs.org/5510 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 955bab670d0aed714fc940b5be7e2b75896a63d0) Change-Id: I9ce28fcb20cee8f15f71cd734b9da0ad85c12c3f Reviewed-on: http://gerrit.openafs.org/5541 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f1ee0582b63918560de368697e03b564c862a565 Author: Derrick Brashear Date: Wed Sep 28 10:11:16 2011 -0400 ukernel: make web enhancements the default none of the web enhancements break base functionality, and they are strictly more functionality; just turn them on everywhere Reviewed-on: http://gerrit.openafs.org/5509 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 80943970b8cfcdf3fc630b25804aebaea228bd73) Change-Id: I3d8dedcb84bda70bc3183afcb09ca619c5390476 Reviewed-on: http://gerrit.openafs.org/5540 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3c37cbdff1f290839d79315e596586fa128401c3 Author: Michael Meffie Date: Thu Sep 22 09:13:18 2011 -0400 bozo: report bosserver -rxbind address Create a file on bosserver startup called bosserver.rxbind in the server local directory which contains an address local scripts may use to contact the bosserver. When bosserver is started with the -rxbind option, write the address selected from the intersection of the interfaces, NetInfo, and NetRestrict configuration to the bosserver.rxbind file, otherwise write the loopback address 127.0.0.1. Update the RedHat init script to use the new bosserver.rxbind file. Reviewed-on: http://gerrit.openafs.org/5488 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726) Change-Id: I44f6f28d750aa0e463093655a64df8099b8d2cd4 Reviewed-on: http://gerrit.openafs.org/5539 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 786c0088b7fe6a78a198de927a2e653fd2e66175 Author: Michael Meffie Date: Mon Sep 26 11:59:55 2011 -0400 bozo: fix overrun from -rxbind on restart Fix buffer overrun in bosctlsrv introduced by commit 544ff1b295a57b50afefa6146094434db7608355 Reviewed-on: http://gerrit.openafs.org/5504 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 48e326372d89b0d778420f268dbe59236758eba8) Change-Id: Ic1226d7d093e3d0ab364aa72d676110a6c382dc2 Reviewed-on: http://gerrit.openafs.org/5538 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f008d3d5f64eea9a9459641fd91bfff79236d0b4 Author: Michael Meffie Date: Tue Nov 23 20:21:50 2010 -0500 bozo: bosserver -pidfiles option Add an option to bosserver to create pidfiles for long running processes for simple, fs, and dafs bnode types, as well as the bosserver process. The pidfiles are located in the server local directory by default, or in the path specifed by the -pidfiles command-line option. Reviewed-on: http://gerrit.openafs.org/5497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bdf86d245fd55c5c7ac7ea81e3d6b6bafdbe1783) Change-Id: Id76530b81e2e92c76a015510d04dc8d5e5fd75ce Reviewed-on: http://gerrit.openafs.org/5537 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1aa1446b7a1b75b503fab968cee92ca73319f82b Author: Michael Meffie Date: Thu Sep 22 11:28:17 2011 -0400 bozo: pass -rxbind on restart Pass the -rxbind on restarts when bosserver is initially started with the -rxbind option. Reviewed-on: http://gerrit.openafs.org/5487 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 544ff1b295a57b50afefa6146094434db7608355) Change-Id: I042cce8043bb0797b5c654118c2254f93903a4fa Reviewed-on: http://gerrit.openafs.org/5536 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dda39417e94e4463dd0fa49dddd918bc3a8765a6 Author: Marc Dionne Date: Wed Sep 21 20:31:33 2011 -0400 fs: fix setserverprefs where long is larger than afs_int32 Make the fscanf and scanf format specifiers match the type of the target variable. This prevents trying to store a long int into an afs_int32 variable which may be smaller, and overwriting neighbouring data on the stack. The effect on a 64-bit Linux system was that the high bits of "rank" would overwrite the first 4 bytes of the scanned host name, causing setserverprefs to fail with: : couldn't resolve name. Reviewed-on: http://gerrit.openafs.org/5486 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 649d3a0957eef0c607a63b47f11bd4a0ca8655ca) Change-Id: I5869423a8512e6e5d64162b17a69106355ca3639 Reviewed-on: http://gerrit.openafs.org/5535 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a16c594a127e9789215c1404c6cfa161dc090b07 Author: Marc Dionne Date: Wed Sep 28 21:15:32 2011 -0400 rx: add post RPC procedure capability Add the ability to specify a procedure that will be called after the end of each RPC for a service. This is similar to the existing afterProc, except that it gets called after the RPC has ended (after EndCall). rx_SetPostProc and rx_GetPostProc are provided to set and retrieve a postProc for a specified service. Reviewed-on: http://gerrit.openafs.org/5529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5587bbfc0bc70de234e5655faf7676cf2b9b9715) Change-Id: I1f0a5007b0cf0723ef3ade6a14e72aece2d3cb0f Reviewed-on: http://gerrit.openafs.org/5543 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6c31367a0d04f89b0056614ec5e9e1baf742bdce Author: Marc Dionne Date: Wed Sep 28 18:39:55 2011 -0400 viced: remove duplicate declaration viced_uclient_key is declared twice, remove one of the declarations. Reviewed-on: http://gerrit.openafs.org/5515 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 11a6fc948983c0a9f1fb41c58b9559750763440b) Change-Id: Ie05ca3af9d1e6c08272335b09cb3c7a80879fc66 Reviewed-on: http://gerrit.openafs.org/5542 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1cf667e0df61651538bef9b7b89f1ec98acfe6c3 Author: Andrew Deason Date: Thu Sep 29 12:04:07 2011 -0500 afs: Remove afs1_readdir The function afs1_readdir is not referenced anywhere. Remove it, as it currently causes compilation errors (a typo with the origOffset/orginOffset variable name). This is a 1.6-only change. afs1_readdir was removed on master as a part of commit 0284e65f97861e888d95576f22a93cd681813c39. Change-Id: I7bd3f73867abb53df0cd2a96180b7cd5f19de3e6 Reviewed-on: http://gerrit.openafs.org/5522 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4af0a7aa716f5750e9894a71553575f06b15eae0 Author: Derrick Brashear Date: Tue Sep 13 15:27:37 2011 -0400 volser: dont double-stat vnodes when dumping we get the size, then we get it again. no clue why. let's just not. Reviewed-on: http://gerrit.openafs.org/5398 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6c18c8844f3be6e006c7f59b3cc36f5b1688e04f) Change-Id: I743432161a80799e11875cdbcb09b1b15d681d77 Reviewed-on: http://gerrit.openafs.org/5413 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b26ed0b20c0c5ff2b06314d28f0df3f1357dd8f9 Author: Michael Meffie Date: Tue Sep 20 16:21:50 2011 -0400 salvager: fix filesystem path truncation Fix filesystem path truncation for vice partitions beyond /vicepz. Commit 3d7388b7 moved the filesystem path to a fixed size buffer, however the path of the filesystem to be salvaged is truncated for partitions with two character ids (e.g. /vicepaa), in which case the salvager will salvager the wrong partition, or abort if the truncated path is not present. (cherry picked from commit 1e487f6026fb559638fab256362dbda9d4b4a8b1) Change-Id: I1f69b580e4db59f9e8dc245348ede176fc1d23c1 Reviewed-on: http://gerrit.openafs.org/5474 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 313bd38a3a8b64e631fd72944b763c25cdb3275b Author: Jonathan A. Kollasch Date: Fri Sep 23 00:06:35 2011 +0000 afsio: fix build outside of srcdir Change-Id: I4bab36fe3e3958b3b676bab852192eb1c4cd14fc Reviewed-on: http://gerrit.openafs.org/5492 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1fd3ddfedbef0bad28a569e048ea830d788d5184 Author: Derrick Brashear Date: Wed Sep 21 12:55:39 2011 -0400 afscp: enable debugging support in the volume portion readd the missing code when we are compiled for debug Reviewed-on: http://gerrit.openafs.org/5483 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c208b13fa024295c9064364520ef790b093e292c) Change-Id: I2b9466872b82e5ff8262b44a4bc767f11dc79216 Reviewed-on: http://gerrit.openafs.org/5485 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 38b0b3d9c9bed880c450235989d7bb55884925b1 Author: Derrick Brashear Date: Wed Sep 21 02:03:30 2011 -0400 afscp: allow listing of bare root.cell dirs in dynroot mode don't assume that /afs/cell.name (as opposed to /afs/cell.name/) is bogus. if there's text, at least try Reviewed-on: http://gerrit.openafs.org/5480 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit fb1d7491fbe2e90300b23284f213cac2bdcd56ac) Change-Id: I249b9a92b8931f0ac6feafdb9a0576bc83064c6f Reviewed-on: http://gerrit.openafs.org/5482 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 83cd580daa099146edb8a0703a1b9075c7798633 Author: Derrick Brashear Date: Tue Sep 20 23:26:25 2011 -0400 afscp: add confdir override allow an alternate config dir Reviewed-on: http://gerrit.openafs.org/5476 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 97004b7b0970bfc2744df49d540521a41177cac8) Change-Id: I6e0ac4b3a457dafe27ea380bf25ca2d7c8f7361b Reviewed-on: http://gerrit.openafs.org/5481 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 00f2b2b35978b6d689b025d78c995a4888d9e246 Author: Terry Long Date: Tue Sep 20 19:27:35 2011 -0400 Fix AFSPreference compile error on Mac OS 10.7 Lion llvm/clang complains about main returning void instead of int. Fixed main to return int in DARWIN/AFSPreference/afshlp.m. Change-Id: Ic251cc3d21357ad5493b53ac7b802c648a728f76 (cherry picked from commit 76e0b97eaa64088b8d8381a80b6ada0a080f0cbd) Reviewed-on: http://gerrit.openafs.org/5472 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 02bb6cd628eca68aa081b389666d4ff004fabd08 Author: Derrick Brashear Date: Fri Jun 10 18:33:30 2011 -0400 rxkad ticket5 function rewriting avoid conflicting with heimdal in environments where we might need bits of their asn1 library also Reviewed-on: http://gerrit.openafs.org/4834 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit a00b11221b559aee9a3412b78757173abeabaf77) Change-Id: I127b34f8575bf3ff156d6a724cb2fa2312cc2154 Reviewed-on: http://gerrit.openafs.org/5478 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a2725f197f3094441666df13746632dc4436b8fa Author: Derrick Brashear Date: Tue Sep 20 23:52:57 2011 -0400 darwin armv6 and armv7 support simply compile lwp process assembler for both arm arches. Reviewed-on: http://gerrit.openafs.org/4832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a3f27333c5521fdc52314bf510943c602b3cd1a0) Change-Id: Iabb3490d20a441b0bb535e444b0930f5533723b1 Reviewed-on: http://gerrit.openafs.org/5477 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2c01980d4eadf848e82f738a59c375be4f57abe3 Author: Jonathan A. Kollasch Date: Thu Apr 21 10:20:55 2011 -0500 Fix build of user-space on nbsd50 and greater Reviewed-on: http://gerrit.openafs.org/4509 Tested-by: BuildBot Tested-by: Jonathan A. Kollasch Reviewed-by: Derrick Brashear (cherry picked from commit da3ee813960d90ea83851c47fbd59eb3012c7904) Change-Id: If5d8b7e2edd3a8b6ff3cec97800900011fb6ea90 Reviewed-on: http://gerrit.openafs.org/5423 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7c1bba0052576bd3be51961856144644f88e8be6 Author: Jeffrey Altman Date: Wed Sep 14 22:41:20 2011 -0400 Windows: mountpoints always have a trailing dot when expanding a cell alias to a full cell name the trailing dot was forgotten when putting the mountpoint string back together. Reviewed-on: http://gerrit.openafs.org/5427 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17be9b775c0be234879eeda66707581e23a18d08) Change-Id: I2e3fbfb922614d9888e9e6957bff66bbb407abfa Reviewed-on: http://gerrit.openafs.org/5429 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e9bdb26f5a430ebe2042a13afba36d75d66dffbd Author: Jeffrey Altman Date: Wed Sep 14 22:39:52 2011 -0400 Windows: minor cm_ioctl corrections remove unused variable fix a comment to reference correct function name remove debugging windows event log entry that doesn't belong in production code Reviewed-on: http://gerrit.openafs.org/5426 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d355b4d6fce477e275ac34eb04b3d0f5504dd6fb) Change-Id: I0fe583c65e6352b9f33786df5a836c4df52301cf Reviewed-on: http://gerrit.openafs.org/5428 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e909c5158b5b8ad9c77dee9ebd915fba436460f8 Author: Jonathan A. Kollasch Date: Thu Apr 21 08:24:15 2011 +0000 Add nbsd60 param files and autoconf logic Reviewed-on: http://gerrit.openafs.org/4512 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9fd238ea056b6883dd1caf6e8e724ad3ddabeb3a) Conflicts: src/cf/osconf.m4 Change-Id: Ibac29f9b80624800db7c2829153fb9b2aeb44d6c Reviewed-on: http://gerrit.openafs.org/5422 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 557c553a6d228010c3a684fe68328aa2fc4aaf1b Author: Jonathan A. Kollasch Date: Wed Apr 20 10:00:34 2011 +0000 Allocate system type ID numbers for i386_nbsd60 and amd64_nbsd60 Reviewed-on: http://gerrit.openafs.org/4506 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8588f4a9ccca164b566a4f855345f3d529f4125f) Change-Id: I3f3245c33e7c1ed2c263fce6b799860f58a0e9bb Reviewed-on: http://gerrit.openafs.org/5421 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 680c960f48c8f71901d100acd7fd607fee1aa63b Author: Jonathan A. Kollasch Date: Wed Apr 20 09:53:52 2011 +0000 Make whitespace consistent in NetBSD system type ID number section Reviewed-on: http://gerrit.openafs.org/4505 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 507c481a0a3bcb3ab1341f0c2b1ef00797160708) Change-Id: I21d9b385400d1a72ba627e0b67f418056aeba070 Reviewed-on: http://gerrit.openafs.org/5420 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 294c433061c021cf55e72b0c6b18f5f2b359a7f5 Author: Derrick Brashear Date: Tue Sep 13 16:17:18 2011 -0400 darwin: minimal afsbackgrounder ticket fix avoid the "default" API since it's broken. this will at least prompt for tickets. Reviewed-on: http://gerrit.openafs.org/5408 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 11b6f9f0034a3934ffcf1dea8b1bfd915e7522ed) Change-Id: I80a50febaa8b367c40abfed18a08dae4b1d846c4 Reviewed-on: http://gerrit.openafs.org/5409 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d7c25b2995875df8c6abd3c1992ceb4aac3575f6 Author: Derrick Brashear Date: Thu Sep 8 10:44:38 2011 -0400 rx: avoid nat ping during shutdown shutdown_rx, unlike rx_Finalize, kills the socket before the conns. since we call osi_NetSend directly, we lose. just do a simple check for rxinit_status, and exit immediately before sending if rx is not up. Reviewed-on: http://gerrit.openafs.org/5377 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8d939c08f60b44c83ed8db8892b93563ddea0e15) Change-Id: Ic22dc3b6e6c6d330eeabddead7ed8f0a0da73b57 Reviewed-on: http://gerrit.openafs.org/5407 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 675e32abe0a91f937ca0fb86591ccb6668057b60 Author: Derrick Brashear Date: Tue Sep 13 14:44:32 2011 -0400 afscp: add decl for roken function strnlen needs to be declared if we provide it Change-Id: I31183b1c98e6e30ba166ea05c49132872f66029a Reviewed-on: http://gerrit.openafs.org/5406 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f4dd94edf7384dee912a09354f500d08421f94d4 Author: Andrew Deason Date: Wed Aug 24 12:48:19 2011 -0500 ihandle: Fix IH_REALLYCLOSE for positional I/O Currently, ih_fdclose (which is called by IH_REALLYCLOSE), goes through every FD_HANDLE_OPEN FdHandle_t and closes it. If it finds handles that are FD_HANDLE_INUSE, it skips those and sets a flag on the parent IHandle_t. For non-positional I/O, any future opens cannot use these _INUSE handles, since _INUSE handles cannot be reused, and the handle will be actually closed when it is FDH_CLOSE'd. For positional I/O, the situation is different. Multiple threads can use the same _INUSE FdHandle_t, and so there is nothing currently stopping a thread from IH_OPEN'ing an ihandle that has been IH_REALLYCLOSE'd, and getting back an FdHandle_t that existed before the IH_REALLYCLOSE was issued. This is important, since IH_REALLYCLOSE is used on files that are deleted, and future IH_OPENs for the same inode must not use the cached file descriptor. Getting this wrong can cause data loss, since it can cause us to read from or write to a file descriptor referring to a deleted file, when we instead should open a new copy of that file. To fix this, we create a new FdHandle_t state called FD_HANDLE_CLOSING, which is set in IH_REALLYCLOSE if we encounter an FD_HANDLE_INUSE FdHandle_t. In IH_OPEN, we always skip FD_HANDLE_CLOSING handles, so we can never get back a cached file descriptor from before an IH_REALLYCLOSE call. Reviewed-on: http://gerrit.openafs.org/5308 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 597de25969ebdeaafb7390984b5ce2c8782fd557) Change-Id: I4ac2e4d10ce20f8575b35385e324b637dffd0671 Reviewed-on: http://gerrit.openafs.org/5404 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 026d9fb3b74ce49d3cfef47659bb05fc2ec77e51 Author: Russ Allbery Date: Tue Aug 23 12:50:55 2011 -0700 Generate stub header files for h/*.h files included in libuafs Previously, the libuafs build created a symlink from h to /usr/include/sys so that files included under h/* by kernel source files could be found in the normal system header location. However, this assumption about the system header location is no longer valid. Debian and Ubuntu systems with multiarch have arch-specific include paths so that the same host can be used to build 32-bit and 64-bit binaries with different system headers, and those include paths are automatically searched by the compiler. This means some standard headers are no longer found directly in /usr/include/sys but are instead found in /usr/include//sys. Using a stripped-down version of similar code for building the kernel module on Linux, create an h directory containing stub header files that just include the relevant system header file instead. This allows the compiler to implement its normal internal header search algorithm. Also remove all the other symlinks, such as sys, netinet, etc., that just pointed to the same directories under /usr/include. We can assume the normal compiler search algorithm will find these headers without requiring this assistance. Reviewed-on: http://gerrit.openafs.org/5305 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1) Change-Id: I4360eede894846a52c54c29486fa774bde3def5e Reviewed-on: http://gerrit.openafs.org/5397 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 27b01dd436f9d6862eeb6633817ea8b9f4ec4a02 Author: Derrick Brashear Date: Fri Apr 15 13:45:57 2011 -0400 libafscp: add lock support add support for locking as well as for tracking callbacks so a lock break can be detected Reviewed-on: http://gerrit.openafs.org/4476 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f4ae9ef6531cb629e0bac2233d97cf8a0f3a698b) Change-Id: I2011486d6d604dbebf9f91afd7eebd50b5438e16 Reviewed-on: http://gerrit.openafs.org/5384 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9f00179e207b5eb298d529a488786ef13947ae08 Author: Simon Wilkinson Date: Wed Jul 13 14:03:59 2011 +0100 afsio: Remove unused 'code' value main always return 0, so don't bother getting an exit value back from cmd_Dispatch that we have no intention of doing anything with. Reviewed-on: http://gerrit.openafs.org/4997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 8df379696ca6303cd2e4cd3eed34e4552725853b) Change-Id: I6b01cf20bb2e08b73985ce069e24c196060cd711 Reviewed-on: http://gerrit.openafs.org/5390 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1b77512fc919baa281c19fb0bd59cceadacd102d Author: Chaz Chandler Date: Tue Apr 26 16:49:39 2011 -0400 afsio: remove unnecessary reference to malloc.h Fixes breakage on freebsd for missing malloc.h, reported by GAWollman, and, since roken.h already includes stdlib.h to pull in malloc, is no longer necessary Reviewed-on: http://gerrit.openafs.org/4578 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 675bd1007de6594321c03d6f92261f909120643f) Change-Id: I9706a4d05044740fc6bb700fc5f1ef92923ce4bf Reviewed-on: http://gerrit.openafs.org/5389 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 48f9ce6e3a7406eec1a9a6dc481743ad41284103 Author: Andrew Deason Date: Tue Apr 26 14:44:46 2011 -0500 Build libafscp when we lack kerberos Currently, venus fails to build without kerberos, since the dependencies for afsio always include afscp.h, which does not exist when we do not build libafscp. To fix this the easy way, and since libafscp is still very useful without kerberos, allow libafscp to build without kerberos support (which limits it to anonymous connections only). Reviewed-on: http://gerrit.openafs.org/4577 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 64c92b24447aa1a86a4557d6bab3a72b38640fce) Change-Id: I32ad1e26ab4f45647a69c0641e3027006e28bc2e Reviewed-on: http://gerrit.openafs.org/5385 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e475ca5410dcb79b26c9c5e79ccdb9d9f2357a86 Author: Chaz Chandler Date: Tue Jul 20 10:25:20 2010 -0400 afsio: rewrite using libafscp afsio is a utility for file transfer to and from AFS file space without the help of the AFS client/cache manager. Using libafscp, this (partially rewritten) version of afsio is able to accomplish (1) authenticated access to an AFS path or FID (an existing KerberosV ticket is required), (2) fall back on unauthenticated ("anonymous") access if authentication (token acquisition) fails, and (3) work independtly of the AFS cache manager (afsd need not be running, though CellServDB and ThisCell are currently required). issues: 1) libvldbint and libafsint are not compiled pthreaded. we link in what we need. this should be changed when we are all-pthreaded. 2) venus is not a pthreaded-directory otherwise. same deal: in an all-pthreaded universe, undo the bodge that we do here. 3) venus is not an all-krb5 directory either. slight ick. Reviewed-on: http://gerrit.openafs.org/4381 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 94d44d59e3d18f1d450e495a55fdd927e7584948) Change-Id: Ibe140c58970f1b4f2f9e7f016e55d770f8cdcc09 Reviewed-on: http://gerrit.openafs.org/5383 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ac301978a0eede1bfad56d164c1aa514db0e3098 Author: Christof Hanke Date: Wed Jun 1 11:48:46 2011 +0200 libafscp: fix install/dest in sep. Objectdir When compiling libafscp in separate objdir, make dest and make install fail, because of wrong pathes. Fix it. Reviewed-on: http://gerrit.openafs.org/4761 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6af6a6a7cb497d4e255bed7ccf07a5db06d16b91) Change-Id: I6aab1c62cc5f341628d4fdfe9aeac1293e37cf10 Reviewed-on: http://gerrit.openafs.org/5388 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8e3cb5ddcab7d3c6cfc274851da3e9835e1e9d0b Author: Derrick Brashear Date: Thu May 12 10:59:53 2011 -0400 afscp: tellmeaboutyourself stub wants host byte order we get network byte order addresses from rx_getAllAddr; swap back to host order. Reviewed-on: http://gerrit.openafs.org/4644 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e4dc78845cec721013be4170231936ef371afe2f) Change-Id: I9c80d61fc73af936cc87c87033a121cf4593a4c9 Reviewed-on: http://gerrit.openafs.org/5387 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a5b466e93108d5434459c24df756cfc04bbcd8d Author: Jeffrey Altman Date: Wed May 4 14:41:03 2011 -0400 afscp: use closesocket when closing sockets close() is not portable to platforms where a socket is not a file descriptor. Reviewed-on: http://gerrit.openafs.org/4620 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit cb6cd6484edc0e026fe15e11fe86b9dcf106568d) Change-Id: I8131c788fdcceee330f66bb8b47f76324b1735b1 Reviewed-on: http://gerrit.openafs.org/5386 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 512211265fe24a291fe50a696f52c0370612759e Author: Derrick Brashear Date: Fri Apr 15 13:36:04 2011 -0400 libafscp: fix kerberos bits get the correct afs principal. this entire blob will go away and be replaced by rxgk token getting, but deal for now. Reviewed-on: http://gerrit.openafs.org/4475 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 03edae9cc562524c04e06734d12d87b9a7a4622c) Change-Id: I8fd6e99faff18f310954cbb2bac3dc36d9362a36 Reviewed-on: http://gerrit.openafs.org/5382 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 59dceb56aa299bc41e8af88c397eb3fbc4a2a78f Author: Derrick Brashear Date: Fri Apr 15 13:34:14 2011 -0400 libafscp fixes fix callback package in libafscp to track addresses correctly (use correct byte order) Reviewed-on: http://gerrit.openafs.org/4474 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 25a46780fc0e9f64010cc06826e5753567c16647) Change-Id: I71fed5388074b3ca33c374e57a921ff3f4f2e410 Reviewed-on: http://gerrit.openafs.org/5381 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 25e726c03df3ac50d41a075154eb2550868b6cd0 Author: Derrick Brashear Date: Mon Apr 4 13:43:44 2011 -0400 afscp: build for windows attempt windows support for afscp Reviewed-on: http://gerrit.openafs.org/4424 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d5349810730ff16c68280745398c136ddbdb2b8d) Change-Id: I568ddc0d257a8ac106426f9ecd4ab44c42ce160c Reviewed-on: http://gerrit.openafs.org/5380 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b55f479608d01e7733e0c78003323674fd66df12 Author: Chaz Chandler Date: Sat Jul 3 15:02:30 2010 -0400 libafscp: code cleanup This patch is intended to bring libafscp into accordance with the current OpenAFS coding standards while also fixing a few small issues. Apologies in advance for the numerous whitespace changes. Reviewed-on: http://gerrit.openafs.org/4380 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 53377153eca062ae6252dc8c71e7f6cb16214076) Change-Id: Ia1fbe4489b89d6b8c13f296243784233dcc6d158 Reviewed-on: http://gerrit.openafs.org/5379 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d7b2a676d7c863546ccab2b1c4e92ddea276b4ef Author: Chaskiel Grundman Date: Fri Jul 2 14:08:23 2010 -0400 libafscp: a library for "clientless" operations libafscp provides the ability to accomplish many of the functions of an AFS client without a running afsd cache manager. It is being introduced into the OpenAFS source tree in order to improve the capabilities of several utilities but may have additional benefits for testing clients and servers and for use on platforms which do not have afsd support. Reviewed-on: http://gerrit.openafs.org/2371 Reviewed-by: Chaz Chandler Tested-by: Chaz Chandler Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 08b7ca67a781ec93ae71677dd165133d9679a9bc) Change-Id: I007528fa01c9f20f29a5e7e5665e0865c71fe431 Reviewed-on: http://gerrit.openafs.org/5378 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 698f6e0301112184f9ac5872b1bf9e2e138eec47 Author: Derrick Brashear Date: Thu Aug 11 10:39:11 2011 -0400 macos: update 32 bit kernel build flags this is what the current xcode uses. do the same. (cherry picked from commit 85f917d0762dfb0c22cddf4b0cab3bf76efa0f62) Change-Id: I18c0dbbd53231c24e5b88e69231174c6ae74d234 Reviewed-on: http://gerrit.openafs.org/5327 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit beb17de11f7735719ce4e2326a53580519239df6 Author: Jeffrey Altman Date: Mon Aug 29 23:10:16 2011 -0400 Windows: version 1.6.0002 (aka 1.6.0b) Change-Id: I826c76f075f07d57defbcceb71366a65920ea4cd Reviewed-on: http://gerrit.openafs.org/5321 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7b8b968c7ddc7214aaaaa426c7b6fab8e617729b Author: Jeffrey Altman Date: Tue Aug 30 09:49:11 2011 -0400 Windows: correct CheckOfflineVolumeState logic Do not blindly set the return 'online' state to TRUE if the state has not in fact changed. Do not blindly clear the 'alldown' flag without checking the actual 'down' state of the file server. Reviewed-on: http://gerrit.openafs.org/5323 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8d4f65c3021b3416d290a1d5f1e8e61d14a936c7) Change-Id: I96cd543480dd87f0998e36fd43deebd2142db1a0 Reviewed-on: http://gerrit.openafs.org/5324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 118242f874e28201f6e081fb5cb27816c6e4c2b6 Author: Jeffrey Altman Date: Sun Aug 28 12:02:14 2011 -0400 Windows: afslogon NPLogonNotify exit on KTC_NOCM If the service has started but is not responding to pioctls, permit the NPLogonNotify() routine to exit. Reviewed-on: http://gerrit.openafs.org/5315 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 971a103cd088ddbaf227d562fc64f8c728bbc235) Change-Id: I9cba8296271609220de2d0a7ecbb7721e4672077 Reviewed-on: http://gerrit.openafs.org/5320 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 706ee28ddd6fbc7e44d34beeab2cf9195d540716 Author: Jeffrey Altman Date: Wed Aug 24 00:11:44 2011 -0400 Windows: version 1.6.0001 (aka 1.6.0a) Change-Id: I819742abf74cfc90b55c99b7b99f554ef8cc2b7b Reviewed-on: http://gerrit.openafs.org/5306 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1d4bc784854e5980711e6cc72b06c7ab5f203e17 Author: Jeffrey Altman Date: Mon Aug 22 09:00:47 2011 -0400 Windows: avoid cm_serverLock refcount leak Reviewed-on: http://gerrit.openafs.org/5293 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit add66023a05bf9a380eef34bd4fcc80d343fffad) Change-Id: I021a7c77c5351914c9450bd7b28c2b6142f18567 Reviewed-on: http://gerrit.openafs.org/5295 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0cd0b9d87ff2afede9c25e87b9376c07516fbaff Author: Russ Allbery Date: Mon Aug 15 20:20:31 2011 -0700 Add NEWS entries for the 1.6.0 final release The date will be slightly off from when it will be officially announced, but it should be close enough. Reviewed-on: http://gerrit.openafs.org/5287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 361cf11db36db2fc94c7e4961061423fb13e4cf8) Change-Id: I9e12ab8f0a749de3de1e9843705a294f913a5165 Reviewed-on: http://gerrit.openafs.org/5289 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a72ffe01a51fabfa3d3e241181973d1c9cbe6f9 Author: Simon Wilkinson Date: Mon Aug 15 10:25:27 2011 +0100 rpm: Update CellServDB The commit (a5d66d05fa0308d505de8bde59442e29be9d04f8) which updated our in-tree copies of the CellServDB for the 14th August release failed to update the copy that's referenced from the rpm spec file. Update the filename used here so that rpms also get to have an up to date CellServDB Reviewed-on: http://gerrit.openafs.org/5285 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b88c0482f445e11d82804fba08e42944b7253200) Change-Id: I910a3e065576216ffb9d55847f5c2d9bfb174c4c Reviewed-on: http://gerrit.openafs.org/5288 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c7a37b4cf6a0237b940c05edca310a1591f9bab4 Author: Derrick Brashear Date: Sat Aug 13 22:21:02 2011 -0400 make openafs 1.6.0 update version strings for 1.6.0 Change-Id: Icbab545cc4f99356135a829cc995c5eaaa83dd61 Reviewed-on: http://gerrit.openafs.org/5265 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5bf54a3976c155e6f506359b9d00f67603e72289 Author: Derrick Brashear Date: Mon Aug 15 12:17:06 2011 -0400 macos: fix race in afs_root same race on PutVCache in afs_root as we had on other platforms, for instance FreeBSD. use a local variable instead to avoid the race. additionally, make sure we end up with the root flagged VROOT. Reviewed-on: http://gerrit.openafs.org/5278 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit ad6e19331e4f3ec6566dc224f1e1c943a69c62bb) Change-Id: I74d957ac47e10e7a3ddbcd0cadcd6a69deb7df99 Reviewed-on: http://gerrit.openafs.org/5286 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32239db8ec887a57d76f97096c04289e6c36e731 Author: Jeffrey Altman Date: Mon Aug 15 00:23:57 2011 -0400 Windows: Save Wix config at start if possible Save the current configuration at the start of the install process so the user can be presented with a dialog prior to installation asking whether the existing or saved configuration should be used or whether a new configuration should be created. Reviewed-on: http://gerrit.openafs.org/5281 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 020b415be8fa357cded6eb4c50454aaa5b0722bf) Change-Id: I49abfa6d6e7b929e3880686f7dc7bad4175adcba Reviewed-on: http://gerrit.openafs.org/5284 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f763920f3647fb5cac6d5028bf97bb7fcc511f04 Author: Jeffrey Altman Date: Mon Aug 15 00:37:31 2011 -0400 Windows: add assertions to cm_scache.c Reviewed-on: http://gerrit.openafs.org/5280 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1a0b99e654831fe28794f8e0cec2ab94f07ec965) Change-Id: I5bcce8d961157ebb85049871bd15404d7a5ed94e Reviewed-on: http://gerrit.openafs.org/5283 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 392ed2ae9883dd1f32284b7a244e8b8eec8debfc Author: Jeffrey Altman Date: Mon Aug 15 00:34:00 2011 -0400 Windows: cm_ShutdownSCache corrections Obtain cm_scache.dirlock, cm_scache.rw and cm_scacheLock in the correct order. Do not release cm_scache.rw when it is not held. Since the cm_scacheLock is being dropped, preserve the value of scp->allNextp prior to dropping the lock. Reviewed-on: http://gerrit.openafs.org/5279 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c58ae34f72d25434cd59228806ca59a6ff39a903) Change-Id: I65f3c4be5436031cdd99d912b0277b54d4033bf6 Reviewed-on: http://gerrit.openafs.org/5282 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e970f3a577325422460af6e79f57e34b17fe22df Author: Jeffrey Altman Date: Sun Aug 14 21:41:47 2011 -0400 Windows: More interlocked ops for cm_cell flags Reviewed-on: http://gerrit.openafs.org/5274 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 73b91bf0c0a86e55d6879573aeadd99a137ebf3b) Change-Id: I0d79599b22c50523f975d51de4fe2a9eb07c1fdb Reviewed-on: http://gerrit.openafs.org/5276 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 41ae78c2a9b4d04748d80698b0ee9778194e0f2f Author: Jeffrey Altman Date: Sun Aug 14 21:41:19 2011 -0400 Windows: Interlocked ops for cm_user flags Reviewed-on: http://gerrit.openafs.org/5273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f75214282795b23c433b2512b00d24b3e6166b76) Change-Id: I092a0d74919b1d8ecf62fbb57c5b957f16184a05 Reviewed-on: http://gerrit.openafs.org/5275 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e1be9ceaff313b4b70e431bb6d88b57a45447def Author: GCO Public CellServDB Date: Sun Aug 14 18:43:08 2011 -0400 CellServDB update 14 Aug 2011 Reviewed-on: http://gerrit.openafs.org/5270 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a5d66d05fa0308d505de8bde59442e29be9d04f8) Change-Id: I511bd54512c30dced28d8a0bc79424a5b82d91cb Reviewed-on: http://gerrit.openafs.org/5271 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ee422deb20a54eeedbb0be954a846e6bdc5954bc Author: Jeffrey Altman Date: Sun Aug 14 18:15:24 2011 -0400 Windows: cm_FindServerByUuid correct lock acquisition Obtain cm_serverLock when 'locked' is FALSE instead of when TRUE. Reviewed-on: http://gerrit.openafs.org/5268 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b97383c1e68a0b94baa8d05b2ab2531f96e7b63c) Change-Id: I1fb188fa493554dce366cbc4b84a32528486829d Reviewed-on: http://gerrit.openafs.org/5269 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c4e3b49fd7581d3229974e8c5f7cb13203a99cd9 Author: Jeffrey Altman Date: Sun Aug 14 00:14:10 2011 -0400 Windows: prevent cm_server races Use interlocked operations to modified the flags field. Close a race in cm_NewServer() which can result in multiple cm_server objecs being created for the same addr/port/type tuple. Reviewed-on: http://gerrit.openafs.org/5266 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c20010850e2b43a0b9a6d74357ea6111dbf3409e) Change-Id: If13f23a921f598db097b391348513a3300d3b10c Reviewed-on: http://gerrit.openafs.org/5267 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c31e02622bf0d85d1d46cc8c3e2a3dccce4aa3ae Author: Jeffrey Altman Date: Sat Aug 13 14:35:53 2011 -0400 Windows: Insert Server Reference List changes When inserting a new cm_serverRef_t object into a server list perform the following operations: 1. take advantage of the fact that the cm_serverLock is held exclusively to purge the list of any deleted entries that could not be removed previously. 2. check to ensure that the item that is being added does not already exist in the list. If it does, discard it. Reviewed-on: http://gerrit.openafs.org/5258 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 5b40c5f5294964fc09df2c8332ab63cd2d729264) Change-Id: I94398476267dda82e82306a87aa0bba6aa41da00 Reviewed-on: http://gerrit.openafs.org/5264 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9a9bc597c0994063dd2cf75ea653c41bee7290ff Author: Jeffrey Altman Date: Fri Aug 12 19:02:48 2011 -0400 Windows: Fix cm_serverRef ref counts Use Interlocked operations consistently Simplify cm_ServerInsertList(). It no longer increments the refCount on the serverRef object. Instead it leaves the refCount as is. Its the caller's responsibility to add a reference if required. Add reference counts and hold locks in places where the volume server list was used unprotected. Reviewed-on: http://gerrit.openafs.org/5248 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8f446c7463c9183d59a30343682e31ad9f85b307) Change-Id: I0ed8ea1551527e0d62e57967da6816415a3b36b5 Reviewed-on: http://gerrit.openafs.org/5254 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8729eb3984a99d1c2994dbbde3df97cb5f51ae3e Author: Garrett Wollman Date: Sat Aug 13 18:51:02 2011 -0400 libafs: don't call afs_PutDCache(NULL) in afs_GetDownD() It's possible for an eviction candidate to be omitted by the small for loop (around line 670), leaving its reference in victimDCs set to NULL. In the big for loop that follows, don't call afs_PutDCache() when we hit one. Found-by: clang static analyzer with help from AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5260 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 10d27341808be41b29fbcc09b8bd7523c3b7a541) Change-Id: I4ff3ab9a57c1c48be0f7533ab3adb1e4b6ababf9 Reviewed-on: http://gerrit.openafs.org/5263 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6fb10a85b1e7d0d80984c33d9e93e42115704f36 Author: Jeffrey Altman Date: Fri Aug 12 19:01:56 2011 -0400 Windows: remove unused variables in fs.c Reviewed-on: http://gerrit.openafs.org/5247 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 578db3bbecf218e3ab80f4896b7cde4d3975daaa) Change-Id: I8c334239a888d88422ca65d3372228417d60657a Reviewed-on: http://gerrit.openafs.org/5253 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e32e873b89e2d7f73e17fbc7d1f89501ad5afc2c Author: Simon Wilkinson Date: Fri Apr 15 19:40:45 2011 +0100 dir: Protect against circular hash chains The dir package didn't protect against circular hash chains when performing directory lookups. A corrupt directory could therefore cause a client or a fileserver to go into an endless loop if that directory contained a loop in its hash chain pointers. Fix this by exiting the lookup if the hash chain has more elements than the total number of entries in a directory. This maximum number of entries is taken as being (number of entries per page) * (max number of pages), which is considerably more than the real maximum value. (cherry picked from commit bb25bdfcb059fc54a57fd4733ce3184e231ca88d) Change-Id: I7290dbaad66bccfe3b03a843184464f0681f9429 Reviewed-on: http://gerrit.openafs.org/5250 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a1e2aeb3f060c15313b271bfc66b7797c8cadf1f Author: Simon Wilkinson Date: Sat Jul 16 23:30:59 2011 +0100 libafs/dir: Verify directory pathnames Provide a new routine, GetVerifiedBlob() which will ensure that the pathname contained within a directory blob is correctly terminated before returning it to the caller. For the purposes of this function, correct termination is defined as having a terminating \0 character within the same directory page as the blob itself. (cherry picked from commit d1946ffe9be0031a2daf907f5e96cf0ee7f5e15e) Change-Id: I69b9465f02417babf9b1d5179197278fac64f192 Reviewed-on: http://gerrit.openafs.org/5249 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8c2711baff2403ed13131e13c244879fd39a9a0c Author: Derrick Brashear Date: Fri Aug 12 16:54:03 2011 -0400 aklog: attempt to warn about needed weak crypto switch for Lion Lion's Kerberos is rather unfortunate. deal with the multitude of missing functionalities by hardcoding this case here. Reviewed-on: http://gerrit.openafs.org/5240 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 145a8490c761a0ebf7b3a1cc3017bbe8635f8014) Change-Id: I0efe2ee18e36f0531de8261e5f032df7de3d7333 Reviewed-on: http://gerrit.openafs.org/5252 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1754f341b0f2e0233ba8940ccfb4e666f0084a6 Author: Derrick Brashear Date: Fri Aug 12 18:25:24 2011 -0400 redhat: update dkms config make the dkms config properly name the version. remove no-longer-needed disconnected option for configure FIXES 130170 Reviewed-on: http://gerrit.openafs.org/5246 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ef3ef1992115e6b61a7859fa2295726af0fb9318) Change-Id: If0bfb3fdf4d8499dfe14435739317f335a4c164e Reviewed-on: http://gerrit.openafs.org/5251 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5abed0aa67092cc488a8f8a343282188f00297e0 Author: Andrew Deason Date: Thu May 5 11:18:08 2011 -0500 libafs: Get rx conn ref with afs conn ref When we get a reference to an afs_conn with afs_Conn and its variants, we assume we can use the tc->id rx connection without holding any locks. However, if tc->forceConnectFS gets set, the tc->id connection can be destroyed and recreated out from under us. So, to avoid using a possibly freed rx connection, grab a reference to the rx connection at the same time as we grab a reference to the afs conn. And also put back the same reference with afs_PutConn. (cherry picked from commit 03f0c656c1734b9be4debdf19b8f10771ff4420a) Reviewed-on: http://gerrit.openafs.org/4625 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: If19a267e23941e3305f4f13cd91a0935d214f1b1 Reviewed-on: http://gerrit.openafs.org/5232 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d215fa3b57acaeac54d88f078bf210e3fd7b0866 Author: Derrick Brashear Date: Fri Aug 12 18:12:33 2011 -0400 1.6.0 release notes add release notes for 1.6.0 Change-Id: Ie1f7c025b45d333c5bd7d17981a7d36e2992107e Reviewed-on: http://gerrit.openafs.org/5245 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d4952d2f41c04509817a5f39ceff4a152d65c52 Author: Jeffrey Altman Date: Fri Aug 12 16:30:26 2011 -0400 Windows: ChangeLog for 1.6.0 (final) Reviewed-on: http://gerrit.openafs.org/5239 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6f725c441529ccd1616adeda19c7c0b43dcfd9cb) Change-Id: I40e3c8ccb6b490fe02b22995f1e2341c0e3048ba Reviewed-on: http://gerrit.openafs.org/5244 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bf236c0f8a2bb7aa10c776fc90b4fd00e6ada823 Author: Andrew Deason Date: Fri Jul 22 16:09:52 2011 -0500 libafs: Avoid duplicate afs_Analyze in bulk stat In afs_DoBulkStat, we can call afs_Analyze multiple times for the same set of connection objects. Since afs_Analyze puts its reference to the given afs_conn and rx_connection structures, calling it more than once can cause the reference counts on those objects to be lower than they should be. Instead of making another afs_Analyze call, just alter the error code inside the normal do/while afs_Analyze loop, so the 'loop' afs_Analyze call gets the appropriate error code from the first bulk stat'd entry. (cherry picked from commit ef28bc08c18e750f6100535665d5258a317a0a2b) Reviewed-on: http://gerrit.openafs.org/5086 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I8bb484aade39830a56cb967a3e3167e63777e333 Reviewed-on: http://gerrit.openafs.org/5127 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9b090b9f776835a4d23202e5dbcbca70ff9087df Author: Derrick Brashear Date: Fri Aug 12 17:24:55 2011 -0400 doc: add old release notes pull in old release notes Change-Id: I2865c1e7a6490bf11e77d63d2acd7f2bdf99b150 Reviewed-on: http://gerrit.openafs.org/5243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f0b590bcc084e7e3873a2236ffba13b8c62151cb Author: Jeffrey Altman Date: Wed Aug 10 16:40:35 2011 -0400 Windows: Interlocked operations for cm_buf cm_buf flags and qFlags Separate flags and qFlags in the cm_buf structure to improve performance. Reviewed-on: http://gerrit.openafs.org/5197 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ab34058120ebcc218e4061ea3ac3c8eeca6d83e) Change-Id: I8cbc806833af630fb56c8ef388fe3a21df1f5478 Reviewed-on: http://gerrit.openafs.org/5218 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b4466997b44c21e2b139c560815b1f9289863f11 Author: Jeffrey Altman Date: Tue Aug 9 17:25:50 2011 -0400 Windows: implement InterlockedAnd/Or for X86 Debug Reviewed-on: http://gerrit.openafs.org/5191 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ec1295d11b5e75fa942fe8c3a0f16309c5486ed4) Change-Id: Icd6b76abec2c9a677b5e344ef36587bfbe696a43 Reviewed-on: http://gerrit.openafs.org/5212 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 730021e079dc3654bdb6996e43f19c55132254f4 Author: Jeffrey Altman Date: Wed Aug 10 11:42:59 2011 -0400 Windows: Interlocked for cm_buf cmFlags Reviewed-on: http://gerrit.openafs.org/5196 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4876a416d2e59e87f9da8834db1ea4770f2c618c) Change-Id: I7416e0be7f0de82eddc366dbdb77e94ceabab797 Reviewed-on: http://gerrit.openafs.org/5217 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3fde0ae7608959a4fc9de6294cacef30f1d32012 Author: Jeffrey Altman Date: Wed Aug 10 12:02:20 2011 -0400 Windows: fix tptserver director creation Reviewed-on: http://gerrit.openafs.org/5195 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8661c9b6710322195b00de6ae03b3172712104aa) Change-Id: Ie762b896e68028053a8746181f2086af57e02d0d Reviewed-on: http://gerrit.openafs.org/5216 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cd465d19ac1f9583cd3519c916502e2e960355e6 Author: Jeffrey Altman Date: Wed Aug 10 11:41:21 2011 -0400 Windows: Interlocked ops for cm_volume Use Interlocked operations for protection of cm_volume flags and qFlags as well as cm_vol_state flags. Reviewed-on: http://gerrit.openafs.org/5194 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cbd075a36000d0b54b64eb7d9736587b27a08e9e) Change-Id: Ib2b11cbadcbdbc244866d6bf90ab4d55ef589819 Reviewed-on: http://gerrit.openafs.org/5215 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d6092bab7a9e4a07d1a96040b7ec70da47fd5b79 Author: Jeffrey Altman Date: Wed Aug 10 11:40:35 2011 -0400 Windows: Interlocked ops for cm_scache Use Interlocked operations for cm_scache flags and mask field changes. Reviewed-on: http://gerrit.openafs.org/5193 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 75297d4439bb30ddd9968805aecf2cc2812bfdf0) Change-Id: Ic10b726eb5791c7c8d3eb7c3ad529522f627f73c Reviewed-on: http://gerrit.openafs.org/5214 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c99d8b7aa34dff9e44647969b3c352aa61350324 Author: Jeffrey Altman Date: Wed Aug 10 11:37:51 2011 -0400 Windows: Interlocked ops for cm_cell Use Interlocked operations for cm_cell flag updates. Reviewed-on: http://gerrit.openafs.org/5192 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit deb8c893c2bd78b2871ccf1ff733539534a2890e) Change-Id: I3d0a31e9f809aa91009a8cb1256937ab9646818a Reviewed-on: http://gerrit.openafs.org/5213 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74f9ffb8bcee66b3d9075ae7d9f1466878f70468 Author: Jeffrey Altman Date: Sun Aug 7 14:11:17 2011 -0400 Windows: make osi_Log macro safe for if..else wrap the osi_Log macro's internal if statement with a do {...} while(0) block in order to ensure that it is safe for use in if..else controls without bracing. Reviewed-on: http://gerrit.openafs.org/5189 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6691ff6daceb7960dc925983a2b9129877e67c9a) Change-Id: I954ea5a567bbfd77b02d3e8634a64f877668280e Reviewed-on: http://gerrit.openafs.org/5211 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2d2ad3cf0f0f095e014a4a25053ffe27918aeb15 Author: Jeffrey Altman Date: Thu Aug 4 17:25:01 2011 -0400 Windows: adjust scache LRU postion upon deletion If the object represented by a scache object is deleted, update the LRU position of the scache object to make it the first object in the LRU queue to be recycled. This preserves the cached objects for those that might prove useful in the future. Reviewed-on: http://gerrit.openafs.org/5161 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c5126838590eaf15e0df569c31b2a1bc12b3e0af) Change-Id: Icf60ad3127c295e4fca0e99e338ba4c62cd9e392 Reviewed-on: http://gerrit.openafs.org/5210 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f56ed3253554b55987d5c59d370e4ed3377bc10 Author: Jeffrey Altman Date: Thu Aug 4 17:15:16 2011 -0400 Windows: LockOrderValidation memory usage optimization Instead of using malloc() and free() to allocation lock reference structures, cache allocated objects in a free list. This reduces memory fragmentation. Reviewed-on: http://gerrit.openafs.org/5159 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17e50a4b98de057a699681261ba126a5ac12a0cc) Change-Id: Ifc8d7b6a92e32557575e24cec7513f890439ce67 Reviewed-on: http://gerrit.openafs.org/5209 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b631ff9b93737d0452b024421c236379fc92b8c8 Author: Jeffrey Altman Date: Thu Aug 4 17:08:45 2011 -0400 Windows: after dir enum adjust dir scache LRU During a directory enumeration the directory scache object is reference counted so it can't be recycled. However, if there are more directory entries than the maximum number of cached scache objects the directory scache object will end up being the next object to be recycled after the refcount is dropped. Since the directory is clearly a hot object, before dropping the reference, adjust the scache LRU position so that it is the last object to be recycled. Fix the variable name for the directory scache to be 'dscp' for consistency. Reviewed-on: http://gerrit.openafs.org/5158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2bce3b50ef4fd9b9bdd03daf6e8332710f541922) Change-Id: Ie4400d769a7ac2d0bfed3ccebe02760619bb76b2 Reviewed-on: http://gerrit.openafs.org/5208 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 758c5867bafcce658c79cf193b061ce7b77f5523 Author: Jeffrey Altman Date: Tue Aug 2 18:24:56 2011 -0400 Windows: use %p to print cm_scache_t pointers Reviewed-on: http://gerrit.openafs.org/5152 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4111ee2374d030e1f3bb1fa3530f2877f2576d07) Change-Id: If4ff7b219cce5c631666e0843123f6c7d8dbcec6 Reviewed-on: http://gerrit.openafs.org/5207 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99b4d146fb0cf4f3d2449531d7484361028ec5bb Author: Will Maier Date: Sun Jul 31 14:24:12 2011 +0100 RedHat: Return status values from client init The init script provided with OpenAFS always returns 0 when the status subcommand is called, even if the service is not running. For example: $ sudo service afs status; echo $? afsd is stopped 0 This change makes sure the init script exits with the value returned by the status function from /etc/init.d/functions. With this patch, the afs init script behaves as expected when used, for example, in a Chef service resource: $ sudo service afs status; echo $? afsd is stopped 3 Reviewed-on: http://gerrit.openafs.org/5123 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 6b83ba621b520174dc4679c220888619dc0b44a0) Change-Id: I4103875caba88d61c3edf480f3a7e0b24227a319 Reviewed-on: http://gerrit.openafs.org/5231 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b51cadd464887b8607b61d9ee6493bb344474840 Author: Andrew Deason Date: Fri Jul 29 16:44:11 2011 -0500 SOLARIS: Do not release NULL root vp on unmount When we unmount, and afs_globalVp is NULL (e.g. because root.afs was unavailable when the client was started), we will panic the machine if we try to release it. So, if afs_globalVp is NULL when we hit our unmount handler, don't touch it. Reported by Andy Cobaugh. Reviewed-on: http://gerrit.openafs.org/5117 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b621a2986099488426a026818532a9600db9aeba) Change-Id: Iaa5db97e9fc87d1eb083d20a9fc6a49cbb5a066b Reviewed-on: http://gerrit.openafs.org/5230 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0e38a8fd8043f34da12741f6272a380d9a7b9dcf Author: Derrick Brashear Date: Mon Aug 1 10:58:28 2011 -0400 vos: spell "vldb" correctly i'm not even going to ask. Reviewed-on: http://gerrit.openafs.org/5125 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit d54c9b05d003bf861fd51e904b631e5425a079d6) Change-Id: I0188a58363657a0ccf48afef79bf63ff4c4b4f9d Reviewed-on: http://gerrit.openafs.org/5229 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 55af68293e3d49be631723460539c4a5447e6477 Author: Simon Wilkinson Date: Wed Aug 3 18:45:01 2011 +0100 volser doesn't depend on tviced, but on vlserver Nothing within the volser/ directory depends on tviced, so remove the unecessary dependency. Add an explicit dependency on vlserver, so that libvldb is available to us. This is required to get rid of some potential circular loops when we start including volser objects in libafsauthent Reviewed-on: http://gerrit.openafs.org/5156 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 400c72561e7622716a46a38affd2f5a7842519eb) Change-Id: I0ff6463cc63093f1c82ed74523256cbdb7fc75c8 Reviewed-on: http://gerrit.openafs.org/5228 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3fd135d48b76b2e54329b75e53a67cac1abb29d4 Author: Garrett Wollman Date: Sat Aug 6 23:15:14 2011 -0400 vos: don't free stack garbage on error If wantExtendedInfo is true, then pntr is used uninitialized. In the other case, UV_ListVolumes will have set it to NULL before doing anything (even if it returns an error), so this free() is dead anyway. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5164 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 619b420903c99e48618db0d2f12085111573f279) Change-Id: Icd76d3ac160ccb04b05445552a9e6d04f053efbb Reviewed-on: http://gerrit.openafs.org/5227 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 09565faea51e624306a2ddcbbb898888db987a12 Author: Garrett Wollman Date: Sat Aug 6 23:49:10 2011 -0400 butc: avoid testing stack garbage; remove dead initializer "code" is unconditionally set early in saveDbToTape() so there's no need to initialize it. On the other hand, dumpEntry.id is used before dumpEntry is initialized, so set it to what appears to be the expected value before any non-local exits could cause it to be inspected. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5166 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c92f04af6094ce04b1541a1b23b254d3c1421290) Change-Id: If99aaf327749550623ef5abc3dd077f5291bc899 Reviewed-on: http://gerrit.openafs.org/5226 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4aacd49270900f9a882a6265beec4b126df61d8b Author: Derrick Brashear Date: Mon Aug 1 16:38:46 2011 -0400 rx: avoid nat ping until connection is attached drop nat pings on connections we haven't talked on yet Reviewed-on: http://gerrit.openafs.org/5130 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 496fb87372555f6acddd4fd88b03c94c85f48511) Change-Id: Id64a771f9cb50191a665f5ccb98ec66d991f47bb Reviewed-on: http://gerrit.openafs.org/5225 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f648519f2e7008d81a29113d6ce23158dcd37bcf Author: Garrett Wollman Date: Sat Aug 6 23:55:50 2011 -0400 butc: avoid freeing uninitialized pointer in writeDbDump() In error conditions, charList could be freed before it is initialized. Move the initialization up to before the error checks. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5167 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 43834bff1a2b1af348ff69d538a884bf1070b90c) Change-Id: I05d1602b3f59b521d7daa3fd23f6609bf14c460e Reviewed-on: http://gerrit.openafs.org/5224 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b8f95c1535538ddd4631a9b8d7286df030accc5a Author: Garrett Wollman Date: Sun Aug 7 00:35:36 2011 -0400 afsd: look in the right place for -splitcache argument The argument to -splitcache is in as->parms[34], not [30]. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5169 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 90ea68979c6740583747d0af500ed4a034eba651) Change-Id: Iff8072cf8c7b5d9a5d7486fc9778f079fab1426c Reviewed-on: http://gerrit.openafs.org/5223 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 32dcb109e35b96b2de81812d2ca613a47827811f Author: Garrett Wollman Date: Mon Aug 8 23:26:38 2011 -0400 bos: don't dereference a null pointer when printing an error message The parameter we are interested in is at MRAFS_OFFSET + 17, not MRAFS_OFFSET + 13. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5178 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit bf4b2fd3e26dcf2a0db704815e05d77a558d38c6) Change-Id: I92db9e5ec10054cef4421ab1b2fd0f60baaf07ca Reviewed-on: http://gerrit.openafs.org/5222 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 30ed969917a034f5ada832ad72deb812f3228ac5 Author: Simon Wilkinson Date: Wed Aug 3 19:07:14 2011 +0100 tbudb depends on tubik ... ... so say so in the Makefile (cherry picked from commit 88725587e97d717086801b2522e4625e5fdeb3a8) Reviewed-on: http://gerrit.openafs.org/5155 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ibe759403533cd4b2d538cf1cd905c6268a341f0f Reviewed-on: http://gerrit.openafs.org/5235 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f0367e2168b3ba1012f723ab13fa231fa4f61ff0 Author: Derrick Brashear Date: Thu Aug 11 10:43:16 2011 -0400 macos: axe static vfs_fsentry for whatever reason, lion 32 bit doesn't like it when this is static. fine, so it's not static now. Reviewed-on: http://gerrit.openafs.org/5206 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit d18ff03b59cf26423795f735decdcaf13097c446) Change-Id: I3949fcb69e14c00e0ade2826345be489426d7a04 Reviewed-on: http://gerrit.openafs.org/5220 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a2dacced44c8fdae74dd2c7faec94156ec8f8c4a Author: Derrick Brashear Date: Thu Aug 11 11:11:01 2011 -0400 viced: avoid aborting on host table exhaustion if we exhaust the host table, instead of aborting, return VBUSY at the client, to defer until hopefully hosts are freed. Reviewed-on: http://gerrit.openafs.org/5181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a3b4cd3c7325c7878ec7b47008f0eec8bfcb1175) Change-Id: Ic761e487ef0cfe402103bf06bd051958b07641b9 Reviewed-on: http://gerrit.openafs.org/5219 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a607422134c790ca7f35c688d2e8f1878a2c0015 Author: Jonathan Billings Date: Thu Aug 11 13:48:48 2011 +0100 rpm: Set executable bits on installed libraries Set the executable bits on the libraries installed in libdir. This change is important because it causes 'rpmbuild' to generate Provide tag metadata for the libraries in the package, which is necessary now that some binaries in other packages have generated Requires tags for libraries packaged in the base package. 'rpmbuild' will not generate the Provides tag if the libraries lack executable permission. This change is part of 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149 on master (the rest of that change isn't applicable to the 1.6 branch) Change-Id: Ie95d0d5e16745cfbf0d2a733a9421f94a89216ff Reviewed-on: http://gerrit.openafs.org/5204 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 592b0419bdf3c1af5ecc8f10685e4a2e5df3976d Author: Andy Cobaugh Date: Fri Jul 15 12:06:12 2011 -0400 rpm: remove postinstall message from openafs-client Printing out information on how to configure cacheinfo and ThisCell is a bit noisy, and pam_afs.so is probably not what most people want to use nowadays. Reviewed-on: http://gerrit.openafs.org/5026 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot (cherry picked from commit 30cd8dafa73d90a943f00af05e4841699bc18534) Change-Id: Ib6b7448b5e123a593d595b73f8102d82d1ae2535 Reviewed-on: http://gerrit.openafs.org/5203 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7f3f28adb7ff1ba6de9aa7195a094ff5d0666ca5 Author: Simon Wilkinson Date: Tue Jul 12 01:45:10 2011 +0100 rpms: Fix handling of x86 architectures Once upon a time, our specfile would assume that if you were building for i386 you were building userspace, and that i586 or i686 implied doing a kernel only build. This is no longer the case, and now everything on modern Fedora is built for i686, so we should adapt the spec file for this. Reviewed-on: http://gerrit.openafs.org/4970 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 84a3c4714fce3c1722802963e1fcc4d7dad8cc55) Change-Id: I16c2a4a6586e63be967b5fb019ede10a24c6cde4 Reviewed-on: http://gerrit.openafs.org/5202 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3f70a7dccc8ec420872afda840e93423c0ac575a Author: Simon Wilkinson Date: Mon Jul 11 20:21:17 2011 +0100 rpms: Fix our %version handling When we're doing version requirements in -devel package Requires: lines, we should be using %{version}-%{release}, not just %{version} FIXES 130137 Reviewed-on: http://gerrit.openafs.org/4969 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 15c073887b905adaef301863ed87c49f9d77b394) Change-Id: I047f535b023a01468a3ad169d1742002abb59123 Reviewed-on: http://gerrit.openafs.org/5201 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 24471095dc768f13c4b246f1ff04c5793c93a1c3 Author: Garrett Wollman Date: Mon Aug 8 21:18:15 2011 -0400 kdb: don't dereference a null pointer on corrupt database When iterating through the database, kdb would dereference a null pointer if it encountered an error retrieving the value or if the value was not the right length, in code that was clearly cut-and-pasted from the other branch of an "if" statement where a specific entry was requested on the command line. Print the name of the entry with the problem as was apparently intended. Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5174 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit ae6a3929489035ddcd17785abab8900cebd22eb3) Change-Id: I5c79189f82a636b923c074d3c69cb3b6fef732aa Reviewed-on: http://gerrit.openafs.org/5188 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4952c8212a1dd3d996eb4577b0390f21b2ee4cb7 Author: Garrett Wollman Date: Wed Aug 10 00:18:28 2011 -0400 FBSD: catch up with the disappearance of VOP_GETVOBJECT The vnode operation VOP_GETVOBJECT disappeared in FreeBSD 6.0, an embarrassingly long time ago. Six years ago, a kluge was added to emulate its behavior, but it did not correctly emulate the return value of the old VOP implementation. As a result, osi_VM_StoreAllSegments() could never actually do anything. Since we don't support FreeBSD before 8.0, remove all references to VOP_GETVOBJECT and examine vp->v_object directly instead. This has the result that osi_VM_StoreAllSegments() will actually do something now, which may not be desirable. (Previously, if somehow the vnode had no associated VM object, it would crash, and otherwise it would do nothing at all.) Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5183 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7d0cd1393ff5c69cba2f14fc76aa8f7ca588ccc3) Change-Id: I57198967ad022f50af073ac43643f3a55b0801ef Reviewed-on: http://gerrit.openafs.org/5187 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 362414f7aa04ec15dde4441479cac54be43c75f5 Author: Derrick Brashear Date: Wed Aug 10 09:39:23 2011 -0400 macos: reset next vcache pointer after reacquiring xvcache dropping the xvcache lock means that things can change out from under us. in case they do, reset the next vcache pointer before looping Reviewed-on: http://gerrit.openafs.org/5184 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8607d8d250fb41fcf4e60a09917f971c4d6104a) Change-Id: I2ad487e348f84cd7ced884c920230e3371fce902 Reviewed-on: http://gerrit.openafs.org/5186 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba3a5a7de2da13a02f4502f90d23ccc00bb7a69d Author: Jeffrey Altman Date: Mon Aug 1 21:40:25 2011 -0400 Windows: add missing dafs man pages to wix installer dafileserver.html dasalvager.html davolserver.html Reviewed-on: http://gerrit.openafs.org/5149 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from fec4e6bc595014f34c38707c0015c1f76edd770e) Change-Id: Ied99d695c59242903d39249c1d1bb25058d40a24 Reviewed-on: http://gerrit.openafs.org/5151 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d3ff190e148a0407bc82122f40003f6060dfab9e Author: Jeffrey Altman Date: Mon Aug 1 11:05:51 2011 -0400 Windows: conditionalize mappings of error values Visual Studio 10 adds a large number of additional POSIX C99 error values to errno.h. Wrap each mapping with #ifndef to ensure that we do not redefine the C runtime errno.h definition. Reviewed-on: http://gerrit.openafs.org/5129 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from f631a11f5e9ab50e62b3aaebbff9ef200ac799fe) Change-Id: I528547f95ebbe83390924844d21a9e850dc5967d Reviewed-on: http://gerrit.openafs.org/5148 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 19cd276d0969853de86c0067980353eeb7309eef Author: Jeffrey Altman Date: Mon Aug 1 11:00:55 2011 -0400 Windows: unified afs errors must use nt mapping On Windows, error.h does not provide a complete list of POSIX C99 error values. OpenAFS fills in the gaps with a private error mapping table afs/errmap_nt.h (src/util/errmap_nt.h). If errmap_nt.h is not included prior to processing unified_afs.h, values such as ELOOP will be mapped to EIO instead of the unique value defined by errmap_nt.h. Reviewed-on: http://gerrit.openafs.org/5128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 71e64b6f21817872676e74a8c67c0f0bcfb23391) Change-Id: If6582d7242418c15eb007471199a6dfcc6732e3b Reviewed-on: http://gerrit.openafs.org/5147 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a36705f48889821ff38c6f8fc72c5ccb980e14ac Author: Jeffrey Altman Date: Fri Jul 29 18:09:53 2011 -0400 Windows: Do not execute tasks on deleted files If a cm_BkgDaemon thread finds a queued request whose cm_scache_t has the CM_SCACHEFLAG_DELETED flag set, do not execute the request and fail it immediately with CM_ERROR_BADFD. Any attempt to execute the request will fail with VNOVNODE from the file server. Reviewed-on: http://gerrit.openafs.org/5120 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from afc3ded56795d30e4e0f38d11f8302568943c49b) Change-Id: I92610c215d7d44ceb1894bb3ab7784534a66e452 Reviewed-on: http://gerrit.openafs.org/5146 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cf11acc2fd82170f891042ad945f94ec7ea8bb6b Author: Jeffrey Altman Date: Thu Jul 7 17:51:58 2011 -0400 Windows: cm_BkgDaemon should not do cm_SyncOp's job cm_SyncOp is designed to synchronize operations among multiple threads. The background daemon threads should not filter requests based upon cm_SyncOp states. Doing so is racy and does not produce better performance. Reviewed-on: http://gerrit.openafs.org/5119 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 7e3615208d9e1b03d8eba4fb802744b2b81f8868) Change-Id: I2293643bf708c3e87093005d95c7d1203c6f680a Reviewed-on: http://gerrit.openafs.org/5145 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9d44937928dbd20418f6b9b4fb0fd697f6348ddc Author: Jeffrey Altman Date: Fri Jul 29 18:07:42 2011 -0400 Windows: Do not release locks on deleted files If the cm_scache_t flags include CM_SCACHEFLAG_DELETED, do not bother releasing an outstanding file lock to the file server. The lock went away when the file was deleted. Any attempt to release will fail with VNOVNODE which is translated locally into CM_ERROR_BADFD. If a RXAFS_ReleaseLock RPC fails with VNOVNODE, treat it as success. Reviewed-on: http://gerrit.openafs.org/5118 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from fa11f71f040b2e6856047c53fdd902109e5c6e52) Change-Id: I4b70abab200ea50b419e215f4b3f3b4d3d7ab484 Reviewed-on: http://gerrit.openafs.org/5144 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cbd458b09b3862cba1f133a89c50e382a8127b16 Author: Jeffrey Altman Date: Thu Jul 28 15:05:28 2011 -0400 Windows: permit perl command to be explicitly set Add PERL variable to the build system. If not specified externally the variable will be set to 'perl'. However, ActiveState Perl should be used and not Cygwin Perl. The build environment should indicate that by specifying a PERL setting. SET PERL=c:\perl64\bin\perl.exe or similar. Reviewed-on: http://gerrit.openafs.org/5115 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 4138a778fe821493c726826ffc4715f5f46222d9) Change-Id: Ifd5ba10176ba1a7d6fda7506a0a4c250ad1945f6 Reviewed-on: http://gerrit.openafs.org/5143 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit af292a7dbc5d9eae3fd0b0f69a6adf4401368a2b Author: Jeffrey Altman Date: Thu Jul 28 15:02:14 2011 -0400 man: add missing pod files to Windows makefile Several of the demand attach pod files were not being processed on Windows. Reviewed-on: http://gerrit.openafs.org/5114 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 4a24a59d52266fcbbf92041ce3a74a455e84a25c) Change-Id: I84663e5313d1845761ba7fe7043448ba000c9ec5 Reviewed-on: http://gerrit.openafs.org/5142 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cd516507a6df28a8830c798d2d499ca11c217b0c Author: Jeffrey Altman Date: Thu Jul 28 14:59:05 2011 -0400 merge-pod changes for cygwin and MSWin32 perl On Windows, the git repository is checked out as CR-LF. Tell perl to open the pod file with cr-lf as the end of line. On Windows, the input file names are of the form podX\foo.pod.in. Cygwin perl cannot parse the directory for the file name unless the path separator is converted from \ to /. Reviewed-on: http://gerrit.openafs.org/5113 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 0b6247c27fcc0b8a2f307ccc545eea777a07f999) Change-Id: Ifc4a649ee2b59115632f8d27a00b2bdb794822d1 Reviewed-on: http://gerrit.openafs.org/5141 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2efb653cf2ee17856875ea32586b3afa23c4c67d Author: Jeffrey Altman Date: Tue Jul 26 17:37:37 2011 -0400 Windows: add debugging to afskfw More debugging output added when a debugger is present. Reviewed-on: http://gerrit.openafs.org/5112 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from b61bd99bce68055dc0dd53b82d1d5318c25d9051) Change-Id: If3aaa87f648f6fd1ae21d19d05522d48928dc4ff Reviewed-on: http://gerrit.openafs.org/5140 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ad854ce900ad34e7ab686ed2ab47e33cdc422f5e Author: Jeffrey Altman Date: Tue Jul 26 17:36:25 2011 -0400 Windows: afskfw remove TRUE conditional Simply the code by removing an if(1) conditional. Reviewed-on: http://gerrit.openafs.org/5111 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 7c59ec8f816120c738b1da83f7db9349d912f573) Change-Id: I332b82b24c97810074e87521c8727b5827d7b54b Reviewed-on: http://gerrit.openafs.org/5139 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c4afc3f125e6df05220da59dbc26a74e9c82aa5e Author: Jeffrey Altman Date: Tue Jul 26 17:34:52 2011 -0400 Windows: KFW_AFS_get_cred userrealm The userrealm string in KFW_AFS_get_cred() should not include the '@' symbol from the user principal. Including the '@' produces an invalid realm name. Reviewed-on: http://gerrit.openafs.org/5110 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from 214e9a6052b1dab2a0c4383632640936c3e518c6) Change-Id: I24007935b35ac2a603486fc40a79f94b9b90fa8e Reviewed-on: http://gerrit.openafs.org/5138 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f1ee02d073f7b9257d73b7b1a042daa44e54641c Author: Jeffrey Altman Date: Tue Jul 26 17:32:28 2011 -0400 Windows: afslogon start service if not started If the service is configured for auto start but has yet to start, kick it off just in case. Reviewed-on: http://gerrit.openafs.org/5109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from a063ecdc78cf888df2459b32b0082d4767948563) Change-Id: I8395230328385eb8d554cc85d2e659a3b7cacfb7 Reviewed-on: http://gerrit.openafs.org/5137 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit eec4c8fbf8659858cac977991aba562a79bbf00c Author: Jeffrey Altman Date: Tue Jul 26 17:03:56 2011 -0400 Windows: improve afskfw error message output Add KTC and PT error messages to those that can be translated within afskfw.lib. This improves the error logging for afslogon.dll, afscreds.exe, and afssrvadm.exe Reviewed-on: http://gerrit.openafs.org/5108 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 549737f1e7d52256f053c86116b56c3211b084b6) Change-Id: I4eb6f23e035b0774dffce8779d680b16ea607d2e Reviewed-on: http://gerrit.openafs.org/5136 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f7cbd71eb6e0696c2cb89e9af78e057ce53ec255 Author: Jeffrey Altman Date: Wed Jul 20 18:31:17 2011 -0400 Windows: do not leak space allocation smb_ReceiveNTTranCreate leaks a cm_GetSpace allocation on error. Don't do that. Reviewed-on: http://gerrit.openafs.org/5062 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from c61f5208f553ed1674d1ae51d6e0f16fcdbba47b) Change-Id: Id706189bd0aafb0b55c58f28fff80ba841a8ef48 Reviewed-on: http://gerrit.openafs.org/5135 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cd52a9a711b25703953c7b10b04532a165c34042 Author: Jeffrey Altman Date: Wed Jul 20 18:32:35 2011 -0400 Windows: smb_ReceiveNTTranCreate path not found if the directory object cannot be found in the tree, return CM_ERROR_PATHNOTFOUND instead of crashing. Reviewed-on: http://gerrit.openafs.org/5061 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 9c2d3180aa760d2a406bb68dd84e73f7d1ec7019) Change-Id: I3150f9d5ee1e1d548b29161086ebcea21b2351cb Reviewed-on: http://gerrit.openafs.org/5134 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 545479dea3e9fc0f3d2b3537aa148c2caf02589a Author: Jeffrey Altman Date: Wed Jul 20 14:18:25 2011 -0400 Windows: cm_daemonCheckOfflineVol fix When computing whether or not to perform an offline volume check it is critical that the 'lastBusyVolCheck' variable be assigned the current time instead of 'lastVolCheck'. By setting the wrong variable a new offline volume check is performed every 10 seconds which is undesireable. Reviewed-on: http://gerrit.openafs.org/5054 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from 0783b8f3821f59004146b4c34a53189ada178d70) Change-Id: I18617371d20798a923c5712188a229633ff43519 Reviewed-on: http://gerrit.openafs.org/5133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0fdeada154476b6a140d8548aa8f44f1d1efeb90 Author: Jeffrey Altman Date: Wed Jul 20 14:12:42 2011 -0400 Windows: Add shutdown event log message Add an explicit message that the shutdown sequence is complete. This is necessary because during a Windows OS shutdown, the service is frequently killed prior to the memory mapped file is fully released. Reviewed-on: http://gerrit.openafs.org/5053 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from e91f16ebb704a431f9731bb39bf9b5621b7f6ad0) Change-Id: I80685fae2b581171c580b039ae029ca69bea467c Reviewed-on: http://gerrit.openafs.org/5132 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e474c0809700896a7edf38b75a8df8ced623a2b1 Author: Jeffrey Altman Date: Wed Jul 20 14:04:57 2011 -0400 Window: breakout CM error codes into separate header Reviewed-on: http://gerrit.openafs.org/5052 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from a1af69182b12bedd8a413d38cef9a4691286da46) Change-Id: I82adf60bef97575d47b65561fdc2b097f8ac610a Reviewed-on: http://gerrit.openafs.org/5131 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fcba74d4776af6b21652fee2de628bd1acdd1c02 Author: Derrick Brashear Date: Mon Aug 1 09:58:27 2011 -0400 macos: fix vnode finalization erroneously pushed a bad version of this. fix it now. Reviewed-on: http://gerrit.openafs.org/5124 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5ebef72c0299560716f3bc8d59122aedd61cc399) Change-Id: I10aa962b158616d7d9e9207fd0307900abda0cee Reviewed-on: http://gerrit.openafs.org/5126 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ed89a0b0e7980d2c42bb64c59c71f6d7ca2d1e33 Author: Derrick Brashear Date: Tue Jul 26 00:52:18 2011 -0400 macos: don't attempt finalize fixup on root vnode because of how the root fid is created we can end up being dumb. turns out we never want to bypass doing the full pass for root anyway so just force fixup to not happen. Reviewed-on: http://gerrit.openafs.org/5095 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f8ff2591f73401e6d9b6def7630f428569e2f3a6) Change-Id: I2196196d7373400f2d7f6d0654047273157df1ee Reviewed-on: http://gerrit.openafs.org/5097 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3f35f178101e268612f46ecf8253868275ca1cae Author: Derrick Brashear Date: Fri Jul 22 15:39:49 2011 -0400 aklog: check ccache errors in get_user_realm if there's an error finding the specified ccache, don't bother continuing. Reviewed-on: http://gerrit.openafs.org/5069 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 09d1d8575ce96ef945a4fd8a99a0347f4e258c1e) Change-Id: I4b18cae14a9b620ea62d62eebc0b62f83f67a84a Reviewed-on: http://gerrit.openafs.org/5072 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3e1c4c79a1c4f7762432a5816a50f84e0bf89348 Author: Derrick Brashear Date: Fri Jul 22 14:24:08 2011 -0400 macos: avoid KLRenewInitialTickets crash in Lion the shimmed heimdal in Lion crashes on this call now. the shim also exports diddly squat. fine, we pick over what IS exported and use only calls available to us. should be exactly as functional as before. Reviewed-on: http://gerrit.openafs.org/5065 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 62cccc4547bd816dfffb2c1a4431c3c674d302f8) Change-Id: I44ec9305c3f8e07cb68b2614b237b62e29a66516 Reviewed-on: http://gerrit.openafs.org/5071 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bc8b5d430cd8fea7d7aad9af1f3e7958f372bfce Author: Derrick Brashear Date: Thu Jul 21 20:30:00 2011 -0400 macos: krb5_524 is uselessly stubbed from MITKerberosShim-44: dummy(krb5_524_conv_principal, 0); dummy(krb5_524_convert_creds, 0); this basically logs and returns success. not helpful. so let's just not call them. Reviewed-on: http://gerrit.openafs.org/5066 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ee950e7ecf578bd225eec29b182f108450c5bfaf) Change-Id: Idc2fa790d97b75971c29eec98bb96e799356dc4a Reviewed-on: http://gerrit.openafs.org/5070 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 98c2c2baa02c0aeeda1a1823504cd81ab9833ed2 Author: Derrick Brashear Date: Wed Jul 20 14:55:32 2011 -0400 redhat: support epel yum configs in mockbuild epel's mock is useful in terms of config, but we need to allow use of it. do so here. add centos6 at the same time. Reviewed-on: http://gerrit.openafs.org/5056 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 45f0cbf83aed2bd534e9b43822c033ef6b4a9b1b) Change-Id: Ic46bcbcc8045773d8ce248fe2dea93b27d24ecf2 Reviewed-on: http://gerrit.openafs.org/5067 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4786eb20cfcff3965479cfc730d8d18fee5c3c01 Author: Ken Dreyer Date: Thu Jul 7 08:55:51 2011 -0400 Red Hat: update build script for newer Fedora versions Remove old Fedora versions and add the currently-supported ones. Reviewed-on: http://gerrit.openafs.org/4925 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 8bface302c14698a14b7b988e1a7714e84415c04) Change-Id: I130c7289e06ede351adf8ace92fcdbac900b7819 Reviewed-on: http://gerrit.openafs.org/5068 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cd03087df0f7781497dc7dc3958dcf75a753f49f Author: Russ Allbery Date: Mon Jul 18 17:13:15 2011 -0700 Add additional NEWS entries for 1.6.0pre5 through 1.6.0pre7 Taken from the release notes. Do a bit of minor combining of related issues since NEWS presents these all as changes in 1.6.0. Reviewed-on: http://gerrit.openafs.org/5044 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e06931172eec5a683490040f5564b294d263dac4) Change-Id: I0fbd566258eec2f5d2664acf40289c4d6c544ee7 Reviewed-on: http://gerrit.openafs.org/5045 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7a47d55d0471e69821fc8be31d1e2a1d8cabdebf Author: Ben Kaduk Date: Thu Jul 14 15:49:40 2011 -0400 Install afszcm.cat for i386_fbsd make dest Because we missed it in gerrit/4815. Reviewed-on: http://gerrit.openafs.org/5022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b6d05986f0c79bdf54169fc7b209b137c0e63a39) Change-Id: Ia72180e49d1fb0a92911cb5158d8eb368d4c2a40 Reviewed-on: http://gerrit.openafs.org/5024 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0b69d7234ae380df302872f6c010b92a51b40649 Author: Derrick Brashear Date: Thu Jul 14 11:49:04 2011 -0400 Revert "windows: include cmp_Cmd_Ref_3_en_US component" This reverts commit 96f7d4d3e6ba75d40e7b47acb728a8dbef8c1a01. Not until we have man3 in 1.6 do we need this. Change-Id: If8490d6f66a220fe08995c011fee04d57d8e9adc Reviewed-on: http://gerrit.openafs.org/5019 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f205ea7c1a69bf5b2c73168581292ef70f820c5d Author: Derrick Brashear Date: Wed Jul 13 19:26:22 2011 -0400 make 1.6.0pre7 update versions for 1.6.0pre7 Change-Id: I0efa0e544638de8f6f9d617d02072144f6fdd1ed Reviewed-on: http://gerrit.openafs.org/5011 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74fe7f6acf1b82d2b6bafd0c321d396621a6f7ce Author: Jeffrey Altman Date: Fri Jul 8 09:49:51 2011 -0400 Windows: ChangeLog for 1.5.9907 Reviewed-on: http://gerrit.openafs.org/4954 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 30d68e6934810e3cfc67518d36cb8be26d6542b8) Change-Id: I899f89d277d816bf429e90c09bf69f1703fd82e1 Reviewed-on: http://gerrit.openafs.org/5010 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 60b385e87958a43b9bdc98ba40c85cb89f4c1b66 Author: Simon Wilkinson Date: Wed Jul 13 11:53:57 2011 +0100 Add make dist and make srpm targets Add targets to generate distribution tarballs, and srpms, from a tree. These will generate packages for whatever the current HEAD of the tree is - if the HEAD is a release tag, then the packages will be named for that release, if the HEAD is between releases, then git describe will be used to create an appropriate version identifier. The tarballs are generated from the current git repository contents, anything not checked in will not be included. Reviewed-on: http://gerrit.openafs.org/4984 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f775c0fb6f9191dcf5d226bfddbf82f52cd1116c) Change-Id: I03b4f02d979bbc851e043e5979a54d00f9c52439 Reviewed-on: http://gerrit.openafs.org/5009 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7fe2d2c18eb6303248cdfd7974becf9d5277374e Author: Simon Wilkinson Date: Tue Jul 12 17:58:16 2011 +0100 rpms: Use git version information Use the git version information when building RPMS, rather than hard coding it into configure.ac. (cherry picked from commit 6a27e228bac196abada96f34ca9cd57f32e31f5c) Reviewed-on: http://gerrit.openafs.org/4983 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ibfe38e924eb53e279aaeff77882957a32ebb279b Reviewed-on: http://gerrit.openafs.org/5008 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ccd770e8a38d59619f1972672ac9392e92cfcc7b Author: Simon Wilkinson Date: Wed Jul 13 14:35:48 2011 +0100 vol: Initialise list before error exit when cloning The inode list wasn't being initialised before the first call into the error handler. This makes it possible that we end up trying to discard items from an uninitialised list, with all the chaos that would cause. Fix things so that this list is correctly set up. Reviewed-on: http://gerrit.openafs.org/5001 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit beda3b239a13903d4bcd9a5d91d5ff562962cb5a) Change-Id: I3e3c4b8565e373f74bb95416e4c9b101d02fd78f Reviewed-on: http://gerrit.openafs.org/5007 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a508d96354ddb58182046d54be35fcb7eca14a48 Author: Derrick Brashear Date: Wed Jul 13 22:47:57 2011 -0400 volser: remove pragma requiring ultranew gcc this won't fly with the gcc in the field most places. move along. (cherry picked from commit XXX) Change-Id: I7ca987e05502c0ffc75f826b40200467bf0abfbb Reviewed-on: http://gerrit.openafs.org/5015 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4843369f20d437a01f43a6a94ec58fb0a4b7ff3e Author: Simon Wilkinson Date: Wed Jul 13 14:33:57 2011 +0100 volser: Actually return errors from ListOneVolume The return code from GetVolInfo was being thrown away, and success returned to the caller, regardless of the success of this function. As GetVolInfo's exit codes aren't suitable for sending over the wire, just return ENODEV if this function returns failure. (cherry picked from commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f) Reviewed-on: http://gerrit.openafs.org/5000 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I72e82d014ea2320a095bb4a3281449d250a52d3b Reviewed-on: http://gerrit.openafs.org/5006 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 5452fa62c98b08b5ec3a85d2b7c08585294d4906 Author: Jeffrey Altman Date: Wed Jul 13 08:15:04 2011 -0400 Windows: not safe to dereference before locking Throughout cm_server.c, input parameters to functions that are protected by cm_serverLock are dereferenced by assignment during variable initialization prior to the cm_serverLock being obtained. As a result there is a race which can result in either list corruption or dereferencing freed memory. Reviewed-on: http://gerrit.openafs.org/4985 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 130155ff3c48f2da2433b359588346b4438d24a2) Change-Id: I02e83faa889bb55b025253bbd1c51a389434eee4 Reviewed-on: http://gerrit.openafs.org/5014 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 00d8cbfe5563b5363ceaa4c65f52d3104f596004 Author: Derrick Brashear Date: Wed Jul 13 09:55:21 2011 -0400 Revert "rx: prevent connection channel assignment race" This reverts commit 3620b51779846175b51f82d677838c7cb4dc181d. Change-Id: Idf8d95fe8fec0bdd94e9f9fc1c30695fb52604fa Reviewed-on: http://gerrit.openafs.org/4986 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 1ad38526a600f5199cf3df5bbced3ac1c9d8e9ca Author: Derrick Brashear Date: Tue Jul 12 13:46:53 2011 -0400 macos: note additional vfs features currently we have inode numbers which do not change. note it. additionally, we support large files. note it. Reviewed-on: http://gerrit.openafs.org/4973 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4470d849ec731c97dd2fb02dc6cbfe777949b510) Change-Id: Iee356a8424efe3c79745bf1bf5a1553c988d9d12 Reviewed-on: http://gerrit.openafs.org/4982 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8ecd684a33817e94c9671238565a755e5818e753 Author: Jeffrey Altman Date: Sun Jul 10 03:43:45 2011 +0100 rx: prevent connection channel assignment race When rx was converted to use pthreads, the code that allocates a call to a connection channel in rxi_ReceivePacket() was not made thread safe. The code prior to this patchset permitted a race in the server connection case. The rx_connection channel assignment in rxi_ReceivePacket() and the call destruction in rxi_FreeCall() and rxi_DestroyConnectionNoLock() did not consistently protect the rx_connection channel array using the conn_call_lock. This race could result in rxi_ReceivePacket() operating on a rx_call which was disconnected from the previously assigned rx_connection. In addition, the code in rxi_ReceivePacket() that was intended to protect the allocation of a call using rxi_NewCall() to the connection channel array was racy with itself. This patchset consistently applies the conn_call_lock to protect the allocation / deallocation of calls to the connection channel array and in the process simplifies the logic in rxi_ReceivePacket() as it is no longer necessary to protect against a null call pointer since the race can no longer be lost. (cherry picked from commit 99b43273c0203881ea3d2d50f0abf000cdc0b03e) Reviewed-on: http://gerrit.openafs.org/4963 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I90ad0dc1f67df2bcaca1da0bb459e730541876cb Reviewed-on: http://gerrit.openafs.org/4981 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d344bfd855c0522437328da630de1301ecc51ee Author: Antoine Verheijen Date: Fri Jul 8 11:13:59 2011 -0600 OpenBSD: Add header for On OpenBSD, the header requires the TAILQ_* macros which are defined in . The latter is not automatically included by . This patch makes sure that it is available by putting it into the OpenBSD-specific param.h files (so as not to impact any other OS). Reviewed-on: http://gerrit.openafs.org/4956 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3559e5c8edd90ffb17e8f3b722ff014654bae336) Change-Id: I75103e0fb327fec91ae00647598450a30cc2cf23 Reviewed-on: http://gerrit.openafs.org/4980 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 918e8c6098a5726f6713cc3ac2a1fc759e1ea36d Author: Ken Dreyer Date: Thu Jul 7 10:39:10 2011 -0400 Red Hat: use repoquery to find kernels in build script Remove the custom yum Python code in favor of repoquery. Reviewed-on: http://gerrit.openafs.org/4926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1accef4e77c8cad518d728d15fbd194bebd49f33) Change-Id: Ie68a006852d1564fa2da226a006a4e137d7cd5ed Reviewed-on: http://gerrit.openafs.org/4979 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 15e3089f89ae5ef3b1cb59074ed335a984918bd7 Author: Jeffrey Altman Date: Mon Jul 11 23:49:58 2011 +0100 Windows: always open dscp in smb_ReceiveNTTranCreate There were two code paths in smb_ReceiveNTTranCreate that included asserts in case the directory cm_scache_t object had not been evaluated. RT129299 contains a report that at least one of them had been tripped in production. There is no reason to avoid evaluating the directory scp. It must exist in the cache and obtaining a reference in all cases simplifies the logic of this overly complex function. FIXES 129299 Reviewed-on: http://gerrit.openafs.org/4967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 27af8b4b537236d8c678465d034721dd220641c8) Change-Id: Id4abbc179fc1410b3d45bfc9c69814f683ebcb57 Reviewed-on: http://gerrit.openafs.org/4977 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c90d67f02452ed1811a93c3f82b002d7d2a18737 Author: Michael Meffie Date: Tue Jul 12 08:15:31 2011 -0400 salvager: check namei linktable header magic Recreate the namei linktable file if the header magic is bad. Reviewed-on: http://gerrit.openafs.org/4968 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 82e772bed034ea278e7a7a1b4422d75cc14576dd) Change-Id: I7c8b25da015e028f0a642bbfcf7d0d28bbcc16dd Reviewed-on: http://gerrit.openafs.org/4976 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 96f7d4d3e6ba75d40e7b47acb728a8dbef8c1a01 Author: Jeffrey Altman Date: Sat Jul 9 15:29:05 2011 +0100 windows: include cmp_Cmd_Ref_3_en_US component when building installers actually include the html 3 man pages Reviewed-on: http://gerrit.openafs.org/4961 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 88b4e2e52799cfa5999cbc22873407ec8b77766a) Change-Id: I40aacc81c43ec2d142886c9ce11a684c910c37b2 Reviewed-on: http://gerrit.openafs.org/4962 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c49b446ca51f7cef1ae0f04ec475eca6efe367da Author: Jeffrey Altman Date: Fri Jul 8 15:27:22 2011 -0400 Windows: out of order lock smb v3 locking Do not obtain the smb_rctLock after holding the cm_scache_t->rw lock. At most one hold is required in case of lock failure. Obtain it as the start of processing and drop it at the end if not required. Reviewed-on: http://gerrit.openafs.org/4955 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit da6c97678f530ca76334613e229337a75f94e297) Change-Id: I6b530366c74fd45ba585fd7af4615a1dc96ac055 Reviewed-on: http://gerrit.openafs.org/4960 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 188c7508f5c57418a758f82edb602813feedccbb Author: Jeffrey Altman Date: Wed Jul 6 18:37:02 2011 -0400 Windows: Improve logging for StoreMini and cm_BufWrite Add trace logging to cm_StoreMini which never had it before. Improve the logging of cm_BufWrite by adding the trucPos value which is the new length of the file that is being reported to the file server. Remove cm_buf_t data references when cm_BufWrite is performing operations using rx_Writev and iovec structures. Reviewed-on: http://gerrit.openafs.org/4924 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 21854e03eb6fe70a70ea5fecde5c4ef8074e28c9) Change-Id: I3bd5d7d834ddfa11044cf3f44af108f0554096b6 Reviewed-on: http://gerrit.openafs.org/4953 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4973720540a280c2f804c01a1e335dea6e18179e Author: Jeffrey Altman Date: Wed Jul 6 18:34:05 2011 -0400 Windows: Refactor cm_Unlock*() to avoid code duplication cm_Unlock() and cm_UnlockByKey() duplicate a significant amount of code. Refactor it into a new static function, cm_IntUnlock() which handles the process of downgrading or releasing a file server lock depending upon the lock state of the cm_scache_t object. Reviewed-on: http://gerrit.openafs.org/4923 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1ac219f537f75ac5835f750d4c9e5f4dc684c2de) Change-Id: I4dc2a37557e3370f711f6a11743f39df6344676b Reviewed-on: http://gerrit.openafs.org/4952 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 31811fba7fe060da18efe19f885bb1dec5bcbd44 Author: Jeffrey Altman Date: Wed Jul 6 18:19:31 2011 -0400 Windows: Do not probe new servers from cm_UpdateVolumeLocation cm_NewServer() can result in a call to cm_UpdateVolumeLocation() if a server probe is performed. In order to avoid recursive calls to cm_UpdateVolumeLocation() do not probe new servers from within cm_UpdateVolumeLocation(). Reviewed-on: http://gerrit.openafs.org/4922 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1a56229910a67cc782959beb45f56d244d6b3c4f) Change-Id: Iaf41b1c6c1aa84791a02451533be0e66aaf85fd1 Reviewed-on: http://gerrit.openafs.org/4951 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit baaf9beb35fc5edaaf524a172a755e70d50ef140 Author: Andrew Deason Date: Fri Jul 1 16:58:06 2011 -0500 vol: Don't always FDH_REALLYCLOSE on linktable ops If we dec a linktable entry or get a free tag from the link table, there is no reason to FDH_REALLYCLOSE the linktable fd handle. FDH_REALLYCLOSE is the same as FDH_CLOSE, except that it tells the ihandle package that the file handle will not be used again soon. If we dec a linktable entry or get a free tag, there is no reason to think that, so just FDH_CLOSE the handle instead. Reviewed-on: http://gerrit.openafs.org/4903 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 78e39417af6d2b87f0cbda0b5d3bb3e4859dc0ba) Change-Id: I28f5abee59265403362f3f1472a9fa21a52597c0 Reviewed-on: http://gerrit.openafs.org/4949 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9a2890c4a4b3bf359bd759ef26139d20045b87eb Author: Andrew Deason Date: Fri Jul 1 14:25:05 2011 -0500 DAFS: Do not clear salv state on fssync salvage When a volume is put into an error state via the FSYNC_VOL_FORCE_ERROR command, we clear the salvage state informaton on it, since we're forcing it offline and thus inaccessible. However, if we are forcing it to an error state because the volume needs salvaging, we just salvage it. In this case, do not clear the salvage state, since we need to know if we've already requested or scheduled a salvage so we can correctly keep track of the number of salvages performed. Reviewed-on: http://gerrit.openafs.org/4900 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1ecac71e50e75ce5a45e297d57c480e850975af7) Change-Id: I313f4c4093f3b4f5ee501ef7537d05b557946a70 Reviewed-on: http://gerrit.openafs.org/4948 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 954442e207d8a05d2f26992ff966b56f7af41e1e Author: Andrew Deason Date: Wed Jun 29 13:51:22 2011 -0500 SOLARIS: Granular multiPage detection Currently, a struct vcache has a multiPage counter, indicating how many afs_getpage requests are in-flight for that vcache that involve retrieving multiple pages. Any dcache associated with such vcaches are then avoided when choosing dcache entries to evict from the cache, since we may deadlock when trying to evict a dcache entry from one of the earlier afs_GetOnePage calls in a particular afs_getpage request. This behavior can cause the client to become unusable if the cache becomes full, and the only items in the cache are dcache entries in a file that has an in-flight multi-page afs_getpage request. Since, in that case, we cannot kick out any entries from the cache, and so we wait forever to wait for the cache utilization to go down. To prevent this from occurring, record exactly which ranges in the file have in-flight multi-page afs_getpage requests, and just avoid dcache entries in those ranges. This way afs_GetDownD can evict dcache entries in the same file, but still avoid entries that would cause a deadlock. Also add some comments explaining this situation a bit more. Change-Id: Idd39fd4811ea03aa7eee62f85f1a0c74c9c5e402 Reviewed-on: http://gerrit.openafs.org/4896 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 31a001f60e5fe729b315f679d1d43b367bd74ea5) Reviewed-on: http://gerrit.openafs.org/4927 Tested-by: Derrick Brashear commit 42f8c24972976bc9bad46d3d97251be2a43ed458 Author: Jeffrey Altman Date: Thu Sep 30 10:48:58 2010 -0400 Revert "Rx: When call receive is done, send ack all packet" This reverts commit 3cd3715e608b801b4848399e42cb47464e6e3cc3, which replaces an ack with an ackall; ackall processing does not actually mark all packets acked when it is received, so it is insufficient. Reviewed-on: http://gerrit.openafs.org/4837 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 358099b21c5c888c02bf3754702ae623378c507d) Change-Id: I7accb0e176c6143d87bb7809ead7ced63b9d86dd Reviewed-on: http://gerrit.openafs.org/4946 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eb2d0d9d48f2f1e372ad438ad6ed0cb6516dbcc8 Author: Andrew Deason Date: Tue Jun 21 16:25:14 2011 -0500 DAFS: Do not attach a specialStatus'd vol If we encounter a preattached volume during GetVolume, we currently ignore vp->specialStatus before trying to attach. However, we will generally always fail to attach due to a conflicting vol op, but even if we don't, GetVolume always returns an error later on if vp->specialStatus is set. So, same some processing and attempted attachments by bailing out sooner if vp->specialStatus is set. Reviewed-on: http://gerrit.openafs.org/4874 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f5349051abebd15fc2f2d77ff5b6dc81e09bdf47) Change-Id: I3593a50b5867c671fe462abd40b50dcbbd2c5204 Reviewed-on: http://gerrit.openafs.org/4945 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d55f70792e98e01b3540cdcfad6751a05bf9e645 Author: Andrew Deason Date: Tue Jun 21 18:08:21 2011 -0500 salvager: Clear summary in RecordHeader Not every field in the summary header in RecordHeader is set, leaving some used uninitialized when we copy to the given volumeSummaryp (like 'deleted'). Zero out the header before we do anything. Reviewed-on: http://gerrit.openafs.org/4876 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 926ce3d35018050bdbe8e00011884954d6b0fd80) Change-Id: Ia617153da8762394659b7c7816e6f3d24af6c4d2 Reviewed-on: http://gerrit.openafs.org/4944 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae81606a284e2144f32bd55cbdba104c00d54d93 Author: Andrew Deason Date: Tue Jun 21 17:51:32 2011 -0500 Build a separate copy of vlib for dasalvager Currently dasalvager links to vlib.a. But vlib.a is built without any DAFS defines, and so the size of a struct DiskPartition64 is different (since dasalvager is built with AFS_DEMAND_ATTACH_UTIL). Build our own copies of the volume package files instead, with AFS_DEMAND_ATTACH_UTIL defined. (cherry picked from commit f2d067b4e48500004236b181dd5a25454f352daf) Reviewed-on: http://gerrit.openafs.org/4875 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: Id65a30ced198853bc6c376153671def71dd600d1 Reviewed-on: http://gerrit.openafs.org/4943 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8265c8652e00d0a0b579bd48efeff4d60872e17f Author: Andrew Deason Date: Tue Jun 21 14:58:42 2011 -0500 vol: Do not overwrite specialStatus in attach2 attach2 wants to set specialStatus to VBUSY in certain conditions (such as, it discovers a conflicting vol op where VVolOpSetVBusy_r is true). However, specialStatus may already be set to something else, like VMOVED if the volume is being moved off of the server. This can happen if the volserver has checked out and FSYNC_VOL_MOVE'd a preattached volume but hasn't deleted or checked the volume back in yet. So, if specialStatus is already set, don't touch it, so we don't start reporting VBUSY errors to clients when we should be reporting VMOVED, or some other error code previously set. Reviewed-on: http://gerrit.openafs.org/4873 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 25688bc2e7e8da83b4bf22d7cdc3e0214eadc455) Change-Id: I4316be912a5a30856914059984f45782bece0cdd Reviewed-on: http://gerrit.openafs.org/4942 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45b4d17f7b38031afbb434c08ed46e4a26df9ba0 Author: Simon Wilkinson Date: Sat Jun 18 15:50:08 2011 +0100 rx: Exit fast restart on non-duplicate ACK The current code only exits fast restart when we receive an ACK packet that contains no missing chunks at all. On a network that is dropping a reasonable chunk of its packets, this means that we spend most of the call in fast recovery. (I originally found this by running with the intentionally drop packets feature set to 10%) TCP's fast retransmit behaviour is that we stay in fast recovery until we receive our first non-duplicate acknowledgement. In TCP that means an acknowledgement that moves the window. In RX, it is an acknowledgment that ACKs a new packet. Reviewed-on: http://gerrit.openafs.org/4869 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 6b833f575743d4a826750bb6913cd53232a8867f) Change-Id: I51b4de1146df032ff6e1273d8c832bded770e177 Reviewed-on: http://gerrit.openafs.org/4941 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4a4dab852e67c6a9bc720f5d5a5ecb815a70ca83 Author: Simon Wilkinson Date: Sat Jun 18 13:17:07 2011 +0100 rx: Don't limit the # of packets sent in recovery The RX transmit engine limits the number of packets sent whilst in loss recovery to one per invocation of the transmit engine. As the engine cannot be called by the application thread whilst in recovery, this means that we end up being limited to one packet per ACK received, which means that despite a growing congestion window we'll only send one packet per RTT (in effect, a congenstion window of 1). This will remain the case until we exit recovery, and all of a sudden can send a large number of packets. If this is larger than the current capacity of the network, we'll probably end straight back in recovery again. Let the congestion window do its job, by removing this arbitrary limit. Reviewed-on: http://gerrit.openafs.org/4868 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 91b351e88bdb56bfdfc2f5f16f64bb7522796581) Change-Id: I673980bdee6d1316cb363f12d32c96fb2577cb27 Reviewed-on: http://gerrit.openafs.org/4940 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c4e359b69a9f5e8a21cc06f7338595404d290cd2 Author: Simon Wilkinson Date: Sat Jun 18 13:01:35 2011 +0100 rx: Don't wait for TQ busy when entering recovery Two different threads can cause a call to enter recovery. The event thread will move a call into recovery as a result of a timeout, or the listener thread will move it there following a fast retransmit. In both of these cases, recovery looks different. In the case of a timeout, we enter slow start, starting as if we were begininning transmission for the first time. Following fast retransmit, we enter fast recovery, with different starting parameters than those coming from slow start. As a reslt, the current behaviour, where either call sitting in FAST_RECOVERY_WAIT causes the other to simply return is inappropriate. Further investigation indiciates that FAST_RECOVER_WAIT is actually uncessary. There is no harm caused to a thread which is currently blocked on the network in the middle of a transmit, in adjusting the window size underneath it. As both of these states collapse the window, that thread will simply cease sending earlier. So, simplify the code, and remove the potential race between event and listener by removing the FAST_RECOVER_WAIT state. Reviewed-on: http://gerrit.openafs.org/4867 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 0b9c9e9973e8d32cdfe1fc884fb2c310cedc0404) Change-Id: I47525eb4cf0bb6d049094c7f98f8cc79be9ef51e Reviewed-on: http://gerrit.openafs.org/4939 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 99e38c5d4011793f367eb23030340c4caa15e60f Author: Simon Wilkinson Date: Sat Jun 18 12:43:44 2011 +0100 rx: Enter loss recovery when we retransmit Since I mistakenly wrote commit 36e2d13b, RX hasn't entered congestion avoidance when a loss event occurs. This is bad, because on todays networks the majority of packet losses are due to some form of congestion. Now that the timeout code has been restructured, the chances of entering the retransmit routine in error are much much smaller, so this code needs to be restored. This change reverts 36e2d13b55085c996d38b30d003296c602ef8ee3. However, the original RX code has the problem that it assumes that all forms of fast recovery are the same - in particular, that the call settings that result from entering fast recovery due to a fast retransmit are identical to those resulting from a timeout. This is not the case, and this will be fixed in a later change. Reviewed-on: http://gerrit.openafs.org/4866 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit e8c4fc4f37912a5d30694caef45d27374e9201e7) Change-Id: I5ee6aa255a0b923f445dde2f1e9f0abf98dbe623 Reviewed-on: http://gerrit.openafs.org/4938 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1adddaf9643a3572de22e73e95f2a6c29b4636d5 Author: Simon Wilkinson Date: Sat Jun 18 11:58:57 2011 +0100 rx: Add Karn-style backoffs to RX retransmits When we retransmit a packet, we may be doing so because the RTT of the connection has grown dramatically larger than earlier within the call. However, RX doesn't permit all ACKs to retransmitted packets to be counted within the RTT calculation. So, adopt the same approach as Karn developed for TCP, and as described in detail in RFC2988. When a retransmit event occurs, backoff the connection RTT by doubling its value, and hold at this doubled value until either another retransmit occurs (in which case we back off again, up to a predetermined ceiling), or we receive an ACK packet which we can use within the RTT calculation, in which case we drop back down to the newly measured value. This change replaces the per-packet backoff strategy originally implemented in RX (which, whilst allowing resent packets more chance of arriving, doesn't help with computing a correct RTT). Reviewed-on: http://gerrit.openafs.org/4865 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 0118fb5387e656e515d78d48497a48f1e04a1152) Change-Id: I697eac14f9b4be5c8726f0386e516cb49995f665 Reviewed-on: http://gerrit.openafs.org/4937 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8cc356cb64831a9aa860f53ec8ad4c20951af934 Author: Simon Wilkinson Date: Sat Jun 18 11:48:45 2011 +0100 rx: Make clock_Add correctly add to itself With the existing clock_Add code, the following: struct clock a = {2, 800000}; clock_Add(&a, &a); gives a clock value of {6, 600000}, rather than the expected {5, 60000}. This is because the ordering of instructions leads it to double count the carry on the seconds field. Reorder the instructions so that the carry is correctly applied. Reviewed-on: http://gerrit.openafs.org/4864 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 784babbea1247660f39463403233589a74c6e73b) Change-Id: I1e97e9734d04f898dabad59a88afc929d8888e90 Reviewed-on: http://gerrit.openafs.org/4936 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1b28e72a4335c15cebf3f422a20b29a7049d7a4a Author: Simon Wilkinson Date: Sat Jun 18 11:35:30 2011 +0100 rx: Remove resending logic into its own function Create a new function, rxi_Resend, which is the entry point to running the transmit queue as a result of a resend event. This concentrates all of the resend logic into one place, removes the need for rxi_StartUnlocked, and means that rxi_Start's arguments don't need to match those of an event handler. (cherry picked from commit 280c80152522f32cf34deae96696b1db8aaaa9bb) Reviewed-on: http://gerrit.openafs.org/4863 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Ia8b28be53d7c37fbfd877364930d7dc4a4d52e37 Reviewed-on: http://gerrit.openafs.org/4935 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b62c76954383b2b1f6e8d55f0abcfa6ad97f8980 Author: Simon Wilkinson Date: Mon Oct 25 10:14:12 2010 +0100 rx: Don't let timeouts force fast recovery The current RX implementation goes into fast recovery whenever a timeout occurs. This is incredibly wasteful, particularly on fast connections. So, remove this in favour of TCP style behaviour. (cherry picked from commit 36e2d13b55085c996d38b30d003296c602ef8ee3) Reviewed-on: http://gerrit.openafs.org/3138 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I5b5b154d78183621c160537172d7c0a3789114e6 Reviewed-on: http://gerrit.openafs.org/4934 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ab4ddaf5583aeacac6be0761b1d52ed1287936b Author: Derrick Brashear Date: Thu Jul 7 16:56:28 2011 -0400 rx: complete fix for starting rexmit timers 1.6-only change. the pullup of e7066a9c30047e787d72f02dd1c28e5e473e494b (as dab406baf28c19710b4a451ae2516dfa1ebeee29) missed this because the code in 1.6 was structured differently at the time. Change-Id: I38e9db1dcc681ae4eecc0f3abd634052b9f93ca0 Reviewed-on: http://gerrit.openafs.org/4933 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 42b252945288024088a7f791f51a1c3a95adbf74 Author: Simon Wilkinson Date: Sat Nov 6 15:18:14 2010 -0400 RX: rxi_PrepareSendPacket drops call lock; WaitforTQ required Since rxi_PrepareSendPacket drops the call->lock during processing the caller must perform a rxi_WaitforTQ prior to manipulating the transmit queue. Reviewed-on: http://gerrit.openafs.org/3279 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit cb7a5ce44470112d3ba5e341322bb9e7d029e101) Change-Id: I17a863d46f65fca904a22abccb849c8a8c0997ee Reviewed-on: http://gerrit.openafs.org/4932 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aaec3e262bd05017e57ded42309e19e9c200967c Author: Simon Wilkinson Date: Mon Oct 25 09:16:09 2010 +0100 rx: Fix resend accounting rxi_Start flagged itself as 'resending' whenever it flushed the transmit queue due to a resend event. However, it would flush the entire transmit queue at this point, rather than only transmitting packets that require a resend. When running with large window sizes this results an a large number of packets erroneously being marked as resent. Instead, let SendXmitList decide whether a packet is being retransmitted by using the presence of a serial number. This takes advantage of the fact that a retransmitted packet must be the only entry in a packet list - we just flag the packet list, instead of having to maintain counters for each individual packet. (cherry picked from commit e84193ca2a9cef5a13403d291435eb5ad47f5b41) Reviewed-on: http://gerrit.openafs.org/3135 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I1c8da9639b9739bf88a925b7af98c25b3eaeda8c Reviewed-on: http://gerrit.openafs.org/4931 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef78554c5d07dd13b83be5d706483094e907b207 Author: Simon Wilkinson Date: Fri Nov 5 00:23:23 2010 +0000 rx: Don't maintain maxSerial There were no users within the code of the rx connection maxSerial element, and maintaining it required locking on a critical path. So, get rid of it. Reviewed-on: http://gerrit.openafs.org/4797 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6a22a2f4b7aa0d960cea17b419003986f6184d58) Change-Id: I465e73b7cc7c57b384cd2652bbc8825a898b8bbc Reviewed-on: http://gerrit.openafs.org/4930 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a88e9a249e7fb2a3334ada72d0cc9f263afc6d60 Author: Jeffrey Altman Date: Tue Oct 12 10:53:43 2010 -0400 Rx: Consolidate wait for tq busy and make its use uniform rxi_WaitforTQBusy() is now used wherever a wait for the transmit queue is required. It returns either when the transmit queue is no longer busy or when the call enters an error state. Having made this change it is clear that call->currentPacket is not always validated when the call->lock is reacquired which may be true when rxi_WaitforTQBusy() is called. (cherry picked from commit e45abc6cc20236b9e91c23cb6f8e90f51b6a4a99) Reviewed-on: http://gerrit.openafs.org/2966 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Change-Id: I3492d351581549872b8332a626dae344757c6a6e Reviewed-on: http://gerrit.openafs.org/4929 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ae15c93f0dc2c73908676687f5f1a82abd1b2c64 Author: Jeff Blaine Date: Tue Jun 28 22:58:29 2011 -0400 Change wiki ref to wiki.openafs.org from stanford.edu Change wiki ref to wiki.openafs.org from stanford.edu Reviewed-on: http://gerrit.openafs.org/4897 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4e3c3be697bb99ee4846c99550cd2b52929cdca) Change-Id: I7d1da2d26eb8cb9f1f7c231ec70b8f9486c0d146 Reviewed-on: http://gerrit.openafs.org/4947 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7716cf6d253b67e342c6b055497c2076622cd12 Author: Simon Wilkinson Date: Sat Jun 18 10:46:53 2011 +0100 rx: Change the way that the RTT timer is applied RX maintains a retryTime for every packet that it has transmitted, which is held as the time that that packet was sent, plus the smoothed RTT of the connection. If a packet is in the queue with a retryTime older than the current time, then it is resent at the first opportunity. In some circumstances, this first opportunity will be as a result of the resend event timer expiring, in others it will happen as part of a normal queue run. There are a number of problems with this approach on congested networks. Firstly, on a network with a large window size, which is in "normal" flow, it means that we will never actually perform fast retransmit as the timeout for this packet will have expired before we have received any further ACKs. This is because, on a network with a relatively stable RTT the ACK for packet n+1, n+2, or n+3 cannot arrive before the expected time of arrival of the ACK for packet n. As we retry immediately this expected time of arrival has passed, we never have the opportunity of using these later ACKs to learn that packet n is lost. Secondly, the fact that we may resend packets from a "normal" queue run, rather than as a result of a resend event, means that there is no clear entry point for resends. As resends should be assumed to be a result of network congestion, and result in both the call throttling back, and the RTT being increased, this lack of a clean entry point makes things tricky. As a solution, this patch changes the way in which retransmit times are applied to use the algorithm described in RFC2988. *) Whenever we send a new packet, we start a timer for the current call rto value if one isn't already running. *) Whenever we receive an ACK that acknowledges new data, and we have packets that are sent but not yet acknowledged, we restart the retransmit timer using the current rto value. This alogrithm solves the first problem, as it means that if the connection is still flowing, we will continue to receive ACKs, and we can enter fast retransmit. In implementation terms, we longer track a retryTime per packet, and instead simply record if a packet has been sent or not. Packets which have been sent may only be resent as a result of a resend timer expiring, or of entering fast retransmit, so solving the second issue. (cherry picked from commit a80a88e8ba7ac5e2afc5188add482f4e5323128e) Reviewed-on: http://gerrit.openafs.org/4862 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot Change-Id: I023c9b52b104f8930f8d0dd628612cec2226fee0 Reviewed-on: http://gerrit.openafs.org/4918 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 80ba47c54e4aed4cd4b4407c800984b537526fc4 Author: Simon Wilkinson Date: Mon Oct 25 09:06:53 2010 +0100 rx: Use a structure for the xmit list Switch to using a structure to hold the xmit list so that it's a little bit clearer what the rxi_SendXmitList function is actually doing (cherry picked from commit ad3b5997c6da17927312f4618d8bb4f7fc542a64) Reviewed-on: http://gerrit.openafs.org/3134 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: I6534f5c40e890af916752bf2647a14f9c386e004 Reviewed-on: http://gerrit.openafs.org/4917 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e8801635a41f83bc6bb438a2f33807d7ffeb6430 Author: Simon Wilkinson Date: Fri Jun 17 22:06:54 2011 +0100 rx: Compute smoothed RTT per call, not per peer. RX uses the TCP RTT smoothing algorithm as described in RFC2988. However, the TCP algorithm is designed to accept samples from a single connection, accepting a new sample once per RTT. RFC2988 suggests that "when multiple samples are taken per RTT the [ alogrithm ] may keep an inadequate RTT history." In RX's implementation, we use a single instance of this alogrithm per peer, and input all of the samples from all of the active calls and connections into this same instance. This leads to us taking a significantly (potentially many magnitudes) larger number of samples per RTT, and rapidly losing the RTT history. With RX's implementation, short lived network events may easily bias the RTT, and cause large numbers of packets to time out. This change fixes this by moving the RTT calculation onto a per call basis. We still update the peer with our caclulated value, so that new calls may be created with an RTT corresponding to the current value for the connection, rather than having to start high and converge downwards. (cherry picked from commit 39484c6e57cf993a713b4a989d1c0c227e6f496c) Reviewed-on: http://gerrit.openafs.org/4861 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I5b33323ceed7231bd70e43284d83dfe1db144188 Reviewed-on: http://gerrit.openafs.org/4916 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit db22ac6d19f88e0ad5aec88ee58b236f3bcc3fbc Author: Simon Wilkinson Date: Sun Jun 5 11:04:12 2011 +0100 rx: Reorganise transmit queue walk The transmit queue is stored in the order that we transmitted the packets (by sequence number). This means that we can do all of the ACK processing by just doing a single walk of this queue, rather than having to walk the queue multiple times, once for each type of ACK. This clarifies the queue processing, and should reduce the amount of time that we spending iterating large transmit queues. (cherry picked from commit fe7d38f3205bd879e961f5849ed64df5b495388a) Reviewed-on: http://gerrit.openafs.org/4796 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Change-Id: I85dd1d1706227599a48c7f75ca1947af0b5184bf Reviewed-on: http://gerrit.openafs.org/4915 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 25ae5591f92bdd022712bc4729620dc384272fcd Author: Jeffrey Altman Date: Sun Jun 5 18:41:24 2011 -0400 rx: Add RX_CALL_ACKALL_SENT flag and rxi_SendAck processing 3cd3715e608b801b4848399e42cb47464e6e3cc3 modified rxi_ReceiveDataPacket to send an ACKALL whenever RX_CALL_RECEIVE_DONE is set on the call. This produced the potential for a race with ACKs that set the firstPacket value to 'rnext' when the receive queue for the call has yet to be emptied. From the perspective of receiver the ACK was already processed and does not require a response since the previously received ACKALL acknowledged the delivery of all data packets to the application. When sending ACKs after ACKALL it is therefore required that firstPacket be set to the sequence number after the last unprocessed packet in the receive queue. Thanks to Simon Wilkinson for his extensive assistance in identifying the problem and the development of this patchset. Reviewed-on: http://gerrit.openafs.org/4798 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit cd326b2f54c3397468807c32ce0834f73c9d5d1b) Change-Id: Ic4fa021eb33462ddf759ce0d7a8845edf1ecbed5 Reviewed-on: http://gerrit.openafs.org/4914 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 587cc8652bab48da7282f49bedf2eff8ea1cc88e Author: Jeffrey Altman Date: Sun Jun 5 16:02:46 2011 -0400 rx: do not rxi_AckAll for one data packet call rxi_ReceiveDataPacket() calls rxi_AckAll() when the call reaches the RX_CALL_RECEIVE_DONE state to permit the caller to empty the transmit queue. That reduces the memory consumption of the caller and avoids unnecessary retransmits which the call is in process. If the call data consists of a single packet it is possible that Ping ACK packets sent as part of connection establishment could race with the ACKALL and be delivered out of order. If the Ping ACK is delivered second, it will be ignored by the peer forcing a two second delay in connection establishment. To avoid the race do not send an ACKALL for a single packet call. Reviewed-on: http://gerrit.openafs.org/4799 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ff30293624a7e31d585b9e8f2e1a439cf87b6524) Change-Id: Ic64917c40aa29f9e99c434ab2f9ba2e4abc38883 Reviewed-on: http://gerrit.openafs.org/4913 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8103a9a0e92d937c187515db5a0d57fff5a50df0 Author: Simon Wilkinson Date: Sat May 14 08:55:50 2011 +0100 rx: Reverse the consumption order of idle queue Currently, the rx server thread idle queue is used in an LRU manner. This means that we round robin requests between all of the threads configured on a given system, which means that we end up thrashing CPU caches on machines whose workload doesn't require that all of the configured threads be used. Change this so that we always use the most recently idle thread. This isn't as "fair" to all of our waiting threads, but should mean that we scale better on SMP machines, as a thread that is recently idle is likely to have been recently scheduled. Performance numbers to follow ... Reviewed-on: http://gerrit.openafs.org/4871 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5614305853f0f87a2418a6fb7ca472a8ef966084) Change-Id: I6b961a470adfe053ecd85af05821e42898fd7847 Reviewed-on: http://gerrit.openafs.org/4912 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbd4ef0161c20de025cadba98bcc78f63b76de2c Author: Simon Wilkinson Date: Fri Jun 17 20:35:59 2011 +0100 rx: Remove incorrect backoff code The ACK packet handling routine contains code which causes the RTT to backoff if the selective ACK response indicates that there is a missing packet. The comment justifies this code as being in line with Phil Karn's work on TCP. However, the TCP behaviour is that we backoff when we enter resend. Both TCP and RX have difficulty computing RTTs for resent packets due to the ambiguous ACK problem. Whilst RX is slightly better than TCP in this regard, we can't always tell whether an ACK refers to the original, or resent packet, so resent packets are unable to contribute to the RTT. This means that if the RTT ends up too low for the connection, and we start resending every packet, the RTT will never grow to account for this, as we never feed it any packet samples. Karn's solution to this was to backoff (double) the RTT value when we resend a packet, and then to not drop it back down until we receive an ACK that we can count. This means that we will always get a new sample for the connection, and the RTT will grow again. The original author confirms that the current behaviour in RX is incorrect, so simply remove it with this patchset. Reviewed-on: http://gerrit.openafs.org/4860 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit b65944973a24e9365dc1ff118ded4c3a1e25f782) Change-Id: I4d2766d98883dad4f27ff4c52e2a03a49733f89f Reviewed-on: http://gerrit.openafs.org/4911 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d5d9e67a9f6c9d3cc13ebca1829f6c348f26cfd5 Author: Simon Wilkinson Date: Fri Jun 17 19:38:29 2011 +0100 rx: Account for delayed ACKS when computing RTO RX currently only soft ACKs every second packet, therefore a soft ACK may be delayed by a period of time (currently 100ms, although RX did expose this as a public variable in earlier versions). RTT values are computed using only non-delayed ACKs, so the timeout is a smoothed average of the exact time taken to send and directly ACK a packet. Therefore, if the peer ends up using a delayed ACK for the packet, using just the RTT will cause that packet to be timed out. A while ago, this was dealt with by padding the calculated RTT with an additional 350ms. This was then removed, and changed to a 350ms minimum value. When this caused large numbers of spurious resends, the padding was restored, but with a 20ms default value. As noted above, 20ms is too low, as we may wait for up to 100ms before sending an ACK. This patch changes minPeerTimeout so that it does what it says on the tin - sets a minimum value below which the peer timout may not fall. It then adds to either this value, or the calculated one, 200ms of padding. This makes our padding identical to TCPs, and allows some future leway as to the softAckDelay value. Reviewed-on: http://gerrit.openafs.org/4859 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 699330682f3cb001bf1bfbeaffd806600ccf69e8) Change-Id: Ibe06f46c9ac846fb0381c467242e5c3b439c8907 Reviewed-on: http://gerrit.openafs.org/4910 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f1174887c3bda7d1d5fa4a305e27db493fa15720 Author: Simon Wilkinson Date: Fri Jun 17 19:12:09 2011 +0100 rx: Make rx_softAckDelay & rx_lastAckDelay private The values of these two parameters directly affect the modifiers that are needed in the peer's RTT calculations, and so can not arbitrarily be changed by applications. lastAckDelay has been 400ms since the first OpenAFS release, and that value is used as a modifier when computing the timeout of the last packet. It is likely that any change which made this value longer than 400ms would have detrimental effects on deployed clients softAckDelay has been 100ms for a similar time period. We have chopped and changed the value of minPeerTimeout, so it is unclear what the maximal value for this parameter is. For much of OpenAFS's life, minPeerTimeout was a 350ms padding value, which suggests that copying TCP, and setting the maximal value at 200ms would be a safe option. For now, however, leave it at 100ms to avoid unexpected side effects. hardAckDelay is not addressed by this patch set, as all ACK packets sent from the application thread are marked as delayed, and so currently have no part in computing RTT times. It is likely, however, that any changes to the hard ACK timeout should be very carefully considered. Reviewed-on: http://gerrit.openafs.org/4858 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit c0cfbc40c8ef3de65f144560918cbd2a5bf187ec) Change-Id: I7976d8d11007c0f597ede707db7cbb617956bd29 Reviewed-on: http://gerrit.openafs.org/4909 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 4e31c66cb4888ab83fe5170386015067385a9dc6 Author: Jeff Blaine Date: Fri Jun 17 20:35:17 2011 -0400 Documented vos restore -creation and -lastupdate Culled info from commit 21592fe6 by Kris Hees. These allow one to specify how to set the creation date and last update date at volume restore. Reviewed-on: http://gerrit.openafs.org/4852 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 800a5642a0b9ff514519b4af30b4d0dadd471480) Change-Id: Ib0d71a34242cdc42753518a454479bccaac0094a Reviewed-on: http://gerrit.openafs.org/4908 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2b70e2508e7c7d6568685a6549f28233b15367f6 Author: Anders Kaseorg Date: Tue Jun 14 15:24:42 2011 -0400 Treat Linux 3 as Linux 2.6 Linux 3.0 is just a rebranded Linux 2.6.40, so we can use the same sysname and the same code. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4843 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot (cherry picked from commit 34bdd979fc487843c26f15655b94eac7c8f98fee) Change-Id: Ibbedc447ea4b2dfa61f06a4b0b87a5bc884f711a Reviewed-on: http://gerrit.openafs.org/4907 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 2b2b647e3299c2dfeb30d2986290e1121d6cb5f3 Author: Jeffrey Altman Date: Mon Jun 27 09:31:54 2011 -0400 Windows: MergeStatus before SyncOpDone cm_SyncOp/cm_SyncOpDone is used to synchronize the RPC processing to ensure that calls which are in conflict cannot occur at the same time but also to ensure that the ordering of operations is consistent. cm_MergeStatus() was in many cases executed after cm_SyncOpDone() removed the synchronization barrier which in turn permitted status information to be applied out of order. Side effects could have included data loss due to client side file truncation. More commonly two StoreData RPCs would have their status information applied out of order forcing the cache manager to invalidate all of the cached data for the file. Reviewed-on: http://gerrit.openafs.org/4891 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 51fa590e704c77c0e9ba873ecb854448885030a5) Change-Id: Ic50241081e52b70bf7b6bd7d92df205f7184f7c8 Reviewed-on: http://gerrit.openafs.org/4895 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6a9324ad733385d39594c770227809333248251b Author: Jeffrey Altman Date: Thu Jun 23 17:51:22 2011 -0400 Windows: TRANS2_FIND_FIRST2 for _._AFS_IOCTL_._ smb_T2SearchDirSingle() must not fail directory search requests for the _._AFS_IOCTL_._ file. Although this file does not actually exist, it is successfully processed by CreateFile operations. Therefore, an explicit search for it should return a valid answer. Reviewed-on: http://gerrit.openafs.org/4884 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9f77a2d6b3d571a928261563763913c8c6ee2938) Change-Id: Iab58557350fa099c903b0c2b555e5cc2027daafc Reviewed-on: http://gerrit.openafs.org/4894 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ded3b45fb00a636fbf5bc8292fa6ed29b27bca4f Author: Jeffrey Altman Date: Thu Jun 23 23:49:32 2011 -0400 Windows: Fix SMB_COM_NEGOTIATE for MS11-043 MS11-043 adds response validation for SMB_COM_NEGOTIATE messages received by the SMB Redirector. OpenAFS failed to properly specify a Challenge and DomainName in the response when the security mode is SMB_AUTH_NONE (or share with password). This patchset corrects smb_ReceiveNegotiate() so that it adheres to the protocol specification. FIXES 130033 Reviewed-on: http://gerrit.openafs.org/4886 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 7532b05221caf2c382d9e8c9ca5af4a284566920) Change-Id: I67eb2b293228cacb4df20ac072beaf03f2111c55 Reviewed-on: http://gerrit.openafs.org/4893 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2265aee592554c0caa270d5988fd7db3e84c212d Author: Jeffrey Altman Date: Wed Jun 8 02:22:41 2011 -0400 Windows: shell extension is multithreaded Since the shell extension is multithreaded and it is possible for more than one thread to be executing in the gui2fs.cpp module at a time, it is not safe to use a single static 'space' buffer by more than one thread at a time. Move the buffer into the stack of each function that uses it so that we have thread safety. Reviewed-on: http://gerrit.openafs.org/4819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 418a70feedb5574d28c3fbe513333b0fb102a3ca) Change-Id: I467c2b8cd00b6b248b3c50270da470cebd4b6a5f Reviewed-on: http://gerrit.openafs.org/4892 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c7cad7d1aef1ba202d6e62cfde2a85ae0395304 Author: Ben Kaduk Date: Fri Jun 17 02:44:46 2011 -0400 FBSD: do not install kdump Since it's just an empty file, installing it is rather silly. Reviewed-on: http://gerrit.openafs.org/4849 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 327f516477b3dbf6ed6302c706bbb2bf41ae7907) Change-Id: I904095a9143c0aedc0e96d64793200eca7649934 Reviewed-on: http://gerrit.openafs.org/4853 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ddb9b2257e956e981331c5f1fff55487ce8768c5 Author: Ben Kaduk Date: Tue Mar 29 22:26:50 2011 -0400 Unbreak make dest for FBSD It turns out that we do need an afs.rc.fbsd that is set up for transarc paths in this directory. To get it to work properly will require the user to symlink to it from a dir that gets checked by rcorder, but them's the breaks. Reviewed-on: http://gerrit.openafs.org/4378 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 0b69fd6d5631482a786c2223a7dec0b2c9a07f92) Change-Id: Ifd921019898954414a6d107702786c546d661bd4 Reviewed-on: http://gerrit.openafs.org/4855 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bbf5cd2bd30ea25b82804436cc09e67fb239e8ac Author: Ken Dreyer Date: Wed Jun 15 14:21:27 2011 -0400 Enable -afsdb in the Red Hat packages. Reviewed-on: http://gerrit.openafs.org/4844 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0a318b5bb9d0f5940eeffa092f6adae025d560de) Change-Id: I08e117bf25137099b7d550f4ec397ee987ef4ab0 Reviewed-on: http://gerrit.openafs.org/4856 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ec0527e8ca664de233a711f92e998b94672b352a Author: Ben Kaduk Date: Fri Jun 17 02:22:34 2011 -0400 FBSD: do not FlushAllVCaches In normal operation, any AFS vcache with associated data will have an associated vnode, which will be on the list of vnodes associated with the /afs mountpoint. We already call FreeBSD's vflush() in our afs_unmount, which walks the list of vnodes associated with the mountpoint and calls vgonel() on them, which calls VOP_CLOSE and VOP_RECLAIM on the vnode. Our implementation of VOP_RECLAIM already calls FlushVCache, so in normal operation, FlushAllVCaches() will be a no-op. However, in the presence of bugs, it is actively harmful, causing panics. For example, if a vnode has been reclaimed but FlushVCache failed (which we cannot report back since the VFS will panic in this case), and we attempt to flush it again, the associated vnode has already been cleaned up and we will panic. Likewise if our list of vcaches becomes corrupt and has a vcache with bad or missing vnode for some other reason, we will panic. Since there is no gain in normal operation and abnormal operation is more likely to panic than save data, skip the extra flush. Reviewed-on: http://gerrit.openafs.org/4847 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 03a54723eaf23b2aad0d026ba5f1a8e7343b3763) Change-Id: I866fb196f8368362bcd673ffb4908ab21a46c544 Reviewed-on: http://gerrit.openafs.org/4854 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2322d8238a2382d0c84dc1382d7a4370c8096a9b Author: Ben Kaduk Date: Tue Jun 7 11:30:18 2011 -0400 Also install afszcm.cat for i386_fbsd The change gerrit/4760 enabled the use of gencat to actually build this file, but failed to also change installation logic, so it was sitting unused in the build tree. Fix this, and install the file. This allows us to remove a shell case statement which had formerly been needed to enforce this restriction. Reviewed-on: http://gerrit.openafs.org/4815 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 445a8b5461c66160552136214a1d8d97de15967e) Change-Id: Ic39fecb824be58a8890c665dedcd1eff2b4f9bdc Reviewed-on: http://gerrit.openafs.org/4848 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f9930accfd196d212ceba895762ee9673faf4066 Author: Chas Williams (CONTRACTOR) Date: Thu Jun 2 19:00:47 2011 -0400 doc: let configure find the XML tools if possible configure should attempt to find the XML tools we need to process the documentation. if it can't, it should provide a safe default. still allow the user to override via command line. Reviewed-on: http://gerrit.openafs.org/4766 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit cc2bc3e17ff5f7a10c515e309f8fec47a6fa14b6) Change-Id: I4773affa193b5210da6416dd8b4321bd3f471429 Reviewed-on: http://gerrit.openafs.org/4794 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3aad0fa57e04fe0c97b4995b544e31f0951da62a Author: Jeff Blaine Date: Fri May 27 15:49:52 2011 -0400 kvno invocation correction, language cleanup, afs/cell principal preferred Properly show kvno command syntax, add information about preferring 'afs/cell' for the principal over 'afs', and changed "noted this down" to "made note of" Reviewed-on: http://gerrit.openafs.org/4740 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 07f461e8e35147af605ebc86c139b31d2db0bb28) Change-Id: If37ab2164a13c6f4b745aaf221337ba56eede043 Reviewed-on: http://gerrit.openafs.org/4793 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d68c66eb6e8d0df2612485f8c72e155513b6cc36 Author: Simon Wilkinson Date: Tue May 31 08:31:55 2011 +0100 vos: print_addrs never receives multi-homed addrs The magic address that tells the vlserver that a host is multi-homed, and to look up the multi-homed address structure is an internal implementation feature, which shouldn't be exposed to clients. print_addrs is only ever called with the results of VL_GetAddrsU, which has already converted any multi-homed pointers, so it doesn't need the logic to handle them itself. Reviewed-on: http://gerrit.openafs.org/4757 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 23e433f10414d771937cbea5510b6006b6a7b063) Change-Id: I24df764211d99d84b116d1031b05de61b38c3397 Reviewed-on: http://gerrit.openafs.org/4792 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7d84b8a69e10b48227ac72192b22fca4615292cc Author: Michael Meffie Date: Thu Sep 23 21:18:36 2010 -0400 xstat: cope with different size timeval structures In xstat_fs_test and afsmonitor, try to display the xstat data from the fileserver even if the fileserver has differently sized timeval structures, or different word ordering, as the xstat client program. Reviewed-on: http://gerrit.openafs.org/2986 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit c0a55111d726b26d07661957a65e4d59f155d5e6) Change-Id: I3bef968538c90d6e261142c60a817b4b9e2ad228 Reviewed-on: http://gerrit.openafs.org/4791 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 46842f03d96d586e69b9ed5f70d6f4c220d3a93c Author: Jonathan Billings Date: Wed Jun 1 11:05:11 2011 -0400 linux: rpm: Fix SELinux attributes on /afs when installing openafs-client package Since the directory /afs isn't included in the package manifest, but rather created in a script in the openafs-client package, it never gets the appropriate SELinux attributes that are required to mount a volume (mnt_t). This change fixes the problem by running '/sbin/restorecon' (if it is an executable that exists) on the /afs directory after the openafs-client package is installed, right after the directory is created. Reviewed-on: http://gerrit.openafs.org/4763 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit b3232b2cb44a3df02a37efd852ecfef2f3a9e5cc) Change-Id: I5944c16f558f2651250d122f547fbfd71519c1d1 Reviewed-on: http://gerrit.openafs.org/4786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit aa7de1a4d3a985a6bef911186ffa249b075efc42 Author: Ben Kaduk Date: Tue May 31 15:25:35 2011 -0400 Enable gencat for i386_fbsd_* The machines certainly have a /usr/bin/gencat, and I see nothing in history to indicate a reason for this prevention. Allow the 32-bit machines to build afszcm.cat and make packaging more uniform between architectures. Reviewed-on: http://gerrit.openafs.org/4760 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 55a41d00057106913ce2aba50772a56bc994a9a4) Change-Id: Icd3b85c99e8a41407355f94e561042c13ca15293 Reviewed-on: http://gerrit.openafs.org/4785 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 5dac29b0fd07e22d2e145912588858c81f202061 Author: Andrew Deason Date: Thu Mar 17 16:32:00 2011 -0500 libafs: Do not osi_FlushPages for dirs Directory contents are never mapped or stored in pages, so dealing with page invalidation on directories is just overhead. So make osi_FlushPages a no-op when we're given a directory, which can avoid a lot of locks and other processing (particularly when we are called in afs_getattr in BOZONLOCK_ENV). Reviewed-on: http://gerrit.openafs.org/4259 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a6f18413edceed1b0d532005eb62cb1886e7a6f3) Change-Id: I48dafa5fb442cfc92fb673f2b26e1034fc44c0c7 Reviewed-on: http://gerrit.openafs.org/4730 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7640d15c914d40ba42b753afcfc419ef12e39557 Author: Christof Hanke Date: Thu May 26 07:46:32 2011 +0200 linux: add read_descriptor_t configure test and ifdef With linux 2.6.8 the struct read_descriptor_t changed. Add a configure-test and respective ifdef to deal with that. Reviewed-on: http://gerrit.openafs.org/4719 Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 7133266bafbf238ef921690c40846f3ea2d2fc8b) Change-Id: Ifdc7c1d3c4162452c1576942b7bfe37ea5014a77 Reviewed-on: http://gerrit.openafs.org/4726 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 061eb50e3d5b5cce37245a4314aad079ef96ca80 Author: Christof Hanke Date: Wed May 25 22:16:59 2011 +0200 autoconf: add test for typedef'd structs AC_CHECK_LINUX_STRUCT does not work for structs which are typedef'd. The gcc will complain with "error: storage size of ‘_test’ isn’t known" and fail the test. Thus the new test-macro AC_CHECK_LINUX_TYPED_STRUCT. Reviewed-on: http://gerrit.openafs.org/4718 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit baf7656f666e0d47047c545561345e7803b8a141) Change-Id: I7feca884d7796ccd3a490d6b81e745c644d9c8f1 Reviewed-on: http://gerrit.openafs.org/4725 Reviewed-by: Christof Hanke Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0adfb78e70d6afb3eb55ca0c73017a35023f279f Author: Ben Kaduk Date: Thu May 26 01:11:14 2011 -0400 FBSD: VIMAGE support Starting in FreeBSD 8.0, there is support for multiple virtual network stacks (generally to be exposed to separate jail(8) environments). It is enabled as a kernel configuration option, so our builds against GENERIC have not failed, but we fail to build when options VIMAGE is present. Fix our variable references accordingly. Submitted-by: Hiroki Sato of freebsd.org Reviewed-on: http://gerrit.openafs.org/4721 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 9703b023cc0f5088eab5135acf7417e90ebbb2cd) Change-Id: I058ed4fd637f205701e5aab4d88d65386097f9c0 Reviewed-on: http://gerrit.openafs.org/4724 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85ac4e77b2fd6a4de4ec0224f1f1a3025433cbec Author: Derrick Brashear Date: Wed May 25 17:05:53 2011 -0400 viced: note parms file deprecation /vice/file/parms is unsupported and will be removed later. 1.6 only change. master version will remove it. Change-Id: Id41ca57c1331fb59b87f7f6a06281b640a8c9879 Reviewed-on: http://gerrit.openafs.org/4720 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit aa99a3a5f731b90334a45d726264d6d3e0318393 Author: Derrick Brashear Date: Wed May 25 15:31:40 2011 -0400 macos: disable bulkstat 1.6 only change. there's still an issue where potentially multiple contexts reference a vnode which needs to be finalized; the fixup is successful but there's no hint to other threads to reref before proceeding (no actual troublesome access while waiting for the fixup as the vnode will not have actually been CStatd yet) Change-Id: Ib72f69b74c94b7cac74a9a01a54a8872e32f9717 Reviewed-on: http://gerrit.openafs.org/4717 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 756621e29e684b24e1021e0926040ff1dcdcfa49 Author: Derrick Brashear Date: Tue May 24 14:36:04 2011 -0400 des: generated files should not require objects needed in libdes 1.6 only change, since DES is dead. don't require the same misc.o in both libdes and when generating generated files to making, as make dependencies then throw away valid input. Change-Id: Icf6a211e66d7390ac73fa1effb89a0c4a131666f Reviewed-on: http://gerrit.openafs.org/4713 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 025d270d9996c728f10528c6c5c89ededcd7c1a1 Author: Jeffrey Altman Date: Mon May 23 13:26:20 2011 -0400 Windows: ChangeLog for 1.5.9906 (1.6.0pre6) Reviewed-on: http://gerrit.openafs.org/4706 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from ba76149a57f0cfd92672580b7047a557f159ee52) Change-Id: Id400d48bf5e8699558133b4b7812a2703a4508e5 Reviewed-on: http://gerrit.openafs.org/4707 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 37c5c707511e632a39a5e69e03f9ec7ae17d6ede Author: Antoine Verheijen Date: Tue May 17 09:40:15 2011 -0600 Replace uintptr_t type cast with uintptrsz in afs_vcache.c A recent change (commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0) to afs_vcache.c contains a call to afs_warn() whose second parameter contains a "(uintptr_t)" type cast as part of a double type cast. This presents an issue on some systems, such as OpenBSD, where this object type is defined in a header that is not presently included. This change modifies that type cast to instead use the AFS-internal "(uintptrsz)" type which should provide the same effect. Note that an earlier version of this patch attempted to remove the "offending" type cast as redundant but it was pointed out that some systems require this kind of cascading type cast when casting pointers to integers to deal with possible size issues. Reviewed-on: http://gerrit.openafs.org/4671 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b3004fbd5007d400a4cd3fb2a5b1c52d98618aab) Change-Id: I3c7452d1f09dc7fdbcffe9b047e4ec682ac6ea03 Reviewed-on: http://gerrit.openafs.org/4705 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit af5878cb79e32280dbaebcb16cd0998720b2d856 Author: Derrick Brashear Date: Sun May 22 11:40:46 2011 -0400 make 1.6.0pre6 update for 1.6.0pre6 the various build strings Change-Id: Ic5deaa84f28cc39e955a0fcb1472a849d9feb4a3 Reviewed-on: http://gerrit.openafs.org/4703 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 23db3f30b82d803bf0af5a1ac66841cfa519690e Author: Andrew Deason Date: Tue May 10 14:16:06 2011 -0500 libafs: Flush vcaches in afs_shutdown Currently, a few platforms (linux, linux24, solaris, irix) flush all vcaches during shutdown. However, they do this before calling afs_shutdown(), resulting in afs_FlushVCache queueing VCBs and possibly trying to give the callbacks back to the server. Instead of this, perform the flushes in afs_shutdown itself, so we do this after we try to give up all callbacks to all servers, and we do this while afs_shuttingdown is set, so we don't try to queue VCBs. This also consolidates some of the duplicated code to flush all vcaches, and now does this for all platforms. Reviewed-on: http://gerrit.openafs.org/4641 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0) Change-Id: I90afacbdd7ef0f52de4589001ec9bb8ffd292782 Reviewed-on: http://gerrit.openafs.org/4702 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dae4336c1848479609bd173dee757a3d4eb65354 Author: Derrick Brashear Date: Wed Mar 30 09:46:43 2011 -0400 xdr symbol fallout changes to xdr make xdr_vector and xdr_reference missing from libuafs. fix it. (cherry picked from commit 6bdba897f49b8358d3592588a78d9b59757a9c13) Change-Id: I6ed0e035ff928f3cf93fdc42c7ee0f31096de978 Reviewed-on: http://gerrit.openafs.org/4379 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4704 commit b6ed780e28ac2b5b398d4392985622fa37e26e4b Author: Ken Dreyer Date: Mon May 16 19:53:43 2011 -0400 doc: -afsdb uses SRV records afsd's -afsdb option now uses DNS SRV records (RFC 5864). Update the manpages to reflect this. Reviewed-on: http://gerrit.openafs.org/4670 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 884d0b058cea4ad6c9338fc7842ea0c619cb263d) Change-Id: Ibcdb7c0564d9ac56fa9e50123950e7f758761111 Reviewed-on: http://gerrit.openafs.org/4701 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 45f444376cf446a0e21795ea627413666f634011 Author: Derrick Brashear Date: Fri May 20 14:13:01 2011 -0400 macos: bulkstat redux simplify the logic which can require sleeps in various vcache resolution paths. instead of the two-pass system we had before, just guess using the even/odd hack what type a vnode will be. if a vnode turns out to be a link and thus we are wrong, we do a fixup later. other callers who "race" with bulkstat (which is a supported feature, otherwise you'd have to block callbacks) will also call through a fixup to get the correct backing vnode type. this is necessary as the KPI doesn't let us change the type of a vnode after it's been created. side effect: eliminate many of the ugly cases where we had been sleeping waiting for a vnode to be finalized even before bulkstat. Reviewed-on: http://gerrit.openafs.org/4677 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 04087af8494b90f664ac5f274d5db4c12063f238) Change-Id: I7a9c3e4f94496aa1a553ad54f6d43a0d0e6ccd5a Reviewed-on: http://gerrit.openafs.org/4699 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit faac1f8920ad783ddd7886f000611bf474cfe837 Author: Derrick Brashear Date: Fri May 20 14:10:49 2011 -0400 dynroot: mark vnode types on dynroot vnodes when we create a vnode using a dynroot fid, we weren't bothering to update the type from the default (typically VREG); most dynroot vnodes are actually VDIR... Reviewed-on: http://gerrit.openafs.org/4686 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0cf06f620213fa62abc16bf717779a1333ce12a0) Change-Id: Ic0392216ca5da072022baa1388380f658d324df2 Reviewed-on: http://gerrit.openafs.org/4698 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 7cae02dc6dae05aa50cae5e034b3d0fd6fdaa807 Author: Michael Meffie Date: Wed May 18 13:42:27 2011 -0400 volinfo: fix -filenames option check Fix the logic for checking the presense of the volinfo -filenames option. The original patch inadvertently added the -filenames check as an if-else cause to the -orphaned flag check, which prevents filenames from being printed when listing orphaned vnodes. Reviewed-on: http://gerrit.openafs.org/4689 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 33cb8a53fdc8907dafed2e77cc1da539d17397c5) Change-Id: Ic538976a697317fd3458c8a619f14dd100c4cdab Reviewed-on: http://gerrit.openafs.org/4697 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit efc9605e03c8e17450aa0afdd329cd7ae5a549f9 Author: Andrew Deason Date: Thu May 19 17:02:35 2011 -0500 SOLARIS: Reset syscalls on mod_install failure If our call to mod_install fails for any reason (for example, if the afs entry is missing from /etc/name_to_sysnum), we may still have set the sysent structures for setgroups and ioctl to point at libafs code. So calls to those syscalls will cause a panic, since the code they point to is no longer loaded. To avoid this, just reset the sysent entries back to what they were if we fail to load, just like we do when unloading the module. Reviewed-on: http://gerrit.openafs.org/4685 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ca425b7d49a2bf4c079aa38c0abf68596eca0b30) Change-Id: Ifb2cd9848b5468c950b600052308370b7c8c2af9 Reviewed-on: http://gerrit.openafs.org/4687 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0d02d71908a624406e730a334dd9e0ec5f2dbad8 Author: Chas Williams (CONTRACTOR) Date: Wed Mar 16 10:32:48 2011 -0400 rx: always use/protect the xdr routines in the kernel This clears up some warnings about duplicate symbols with Solaris 11 since the Solaris kernel already has these routines. Since we never use stock kernel version of the xdr routines perhaps we should always use/protect our version of the symbols. Reviewed-on: http://gerrit.openafs.org/4252 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 8336d31ac5092a16cfb206707e69c19f07f99241) Change-Id: Iebf4470f5ddfc591f52f51d1d080bd58d11683a8 Reviewed-on: http://gerrit.openafs.org/4682 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c7eb1f9eacf54aa8224ab7f2b8369c739a45726c Author: Jeffrey Altman Date: Wed May 18 13:51:53 2011 -0400 auth: failback to afs3-vlserver for afs3-prserver If the DNS SRV lookup is for afs3-prserver or afs3-kaserver, fallback to a lookup for afs3-vlserver since those services are traditionally hosted on the same machine as the vlserver. FIXES 129887 Reviewed-on: http://gerrit.openafs.org/4676 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 19f4fa2b4870828269e0751a4874d9ce67a1bb3a) Change-Id: I9d0e2f0ca9d4ddc5ebf9defb44c62f6bf00955d6 Reviewed-on: http://gerrit.openafs.org/4681 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 07758d536d423d9f6a8b1343e8c96dcd95422d5e Author: Jeffrey Altman Date: Sun May 15 21:56:17 2011 -0400 Windows: lock protected fields must be 32-bit It is not safe to protect two 16-bit fields in a structure with different locks. Switch to using 32-bit fields. Increment the cm-memmap version number since the data structure sizes changed and the cache file must be invalidated. Change-Id: If363654c4d0dd8efd225c9ff19b99bb4f4b7b70e Reviewed-on: http://gerrit.openafs.org/4675 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2910dca6489954c01fecbc21807310fb6584c45e Author: Jeffrey Altman Date: Sun May 15 21:53:56 2011 -0400 Windows: add lock assertions to cm_buf.c add lock assertions to cm_buf.c in hopes of detecting why periodic buf_scacheHashTable corruption is being detected. Change-Id: Ib93ac7d449c7f2cb065219981f16ba319a9273b1 Reviewed-on: http://gerrit.openafs.org/4659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4674 commit 9bb37d675bbdaa76eed441252ff17ab5e79be484 Author: Jeffrey Altman Date: Sun May 15 21:51:14 2011 -0400 Windows: test return from krb5_cc_start_seq_get If krb5_cc_start_get fails when using Heimdal, the cursor is invalid and it is not safe to pass it into subsequent functions. Change-Id: I2218d8824af0e35392457b960f11bef970072638 Reviewed-on: http://gerrit.openafs.org/4658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4673 commit 1c063d12aa8ae49bb21620e11da954ef9cf8e32a Author: Andy Cobaugh Date: Wed May 11 17:02:40 2011 -0400 rpm: Really undefine %dist rpmbuild --eval '%undefine dist' wasn't sticking on redhat 5.x. I think the correct way to undefine this is to --define 'dist %undefined' Some redhat 5.x installs have %dist defined depending on what else has been installed. Reviewed-on: http://gerrit.openafs.org/4643 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 0b983054f88d69ca4c0cda07e94103f216bd881d) Change-Id: I41828880a10097059ae0297ae191fa2a96e804d2 Reviewed-on: http://gerrit.openafs.org/4665 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d3e83e86abd0bb6f70e50f208c63bcc248c6673 Author: Marc Dionne Date: Sat May 14 20:57:12 2011 -0400 Linux: fix reading files larger than the chunk size Commit 2571b6285d5da8ef62ab38c3a938258ddd7bac4e fixed an issue with the use of tmpfs as a disk cache and ftruncate() on files in AFS. But it introduced a problem reading larger files as reported in RT ticket 129880. What should be compared against the current cache file size is the offset into the current chunk, not the overall offset for the whole file. FIXES: 129880 Reviewed-on: http://gerrit.openafs.org/4656 Reviewed-by: Russ Allbery Tested-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8ee33373c1ef24572476d8189a3f6f7505bfc83a) Change-Id: I0349d744a9e16b6448a621fe6f4078b1eb1fa9d2 Reviewed-on: http://gerrit.openafs.org/4664 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit adfe378df858aef951b0a30b640e46ad1feefb2d Author: Andrew Deason Date: Tue May 10 12:54:53 2011 -0500 libafs: Do not write-lock afs_xserver on ICBS Our RXAFSCB_InitCallBackState* handler currently write-locks afs_xserver when it clears the SCAPS_KNOWN flag for the relevant server. However, the afs_xserver lock is for protecting the global list and hash table of server structures, and is not necessary to acquire in order to modify the flags of an individual server struct. For instance, CkSrv_GetCaps does not acquire any locks to modify the server flags. Taking this lock conflicts with a read lock on afs_xserver acquired by afs_FlushVCBs when it traverses the list of server structures. afs_FlushVCBs may contact a server that then calls InitCallBackState on us, causing a deadlock if ICBS waits for the afs_xserver lock. So, avoid locking afs_xserver in this case, to avoid that deadlock. Reviewed-on: http://gerrit.openafs.org/4639 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit ae638fa383b8270fe2461a2ad91b9101c74f3593) Change-Id: I095c74f51f1ddb74ebaecda221ca45a4f6ad09c8 Reviewed-on: http://gerrit.openafs.org/4663 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 699c407bfbf0fad2667b231a1e73cdf1a0aec7b0 Author: Andrew Deason Date: Fri May 6 13:12:17 2011 -0500 dasalvager: unlink fsstate.dat when standalone If the DAFS salvager is running in a standalone mode, unlink the fileserver's fsstate.dat file if any volumes change. Otherwise, volume data could have changed and the fileserver will retain callback promises for the data in those volumes until it tries to attach the volume. This way, callbacks are broken via callback state reinitialization. A better solution is to record which volumes have changed, and the fileserver can break callbacks for them on startup. But this at least eliminates a regression from non-DAFS behavior. Reviewed-on: http://gerrit.openafs.org/4638 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 38efda16a2c5c9e74b5a23b5bdd2818a3353eec2) Change-Id: Ic931ce8118e8d76d799ce7e731451a6a4bf3c241 Reviewed-on: http://gerrit.openafs.org/4662 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 99149b9837ae09d1621111075e3bf8f5bac9b6c2 Author: Andrew Deason Date: Thu May 5 17:13:21 2011 -0500 libafs: Put back GetCapabilities user reference afs_GetCapabilities gets a user reference for the conn for the GetCapabilities call. Put the ref back so we don't leak refs. Reviewed-on: http://gerrit.openafs.org/4626 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 010fc998a51a0aae2499b128ee8c671885a84e13) Change-Id: Ia505de8e5ec7ded14f2e2e40ac8bd3ef0b91c2fc Reviewed-on: http://gerrit.openafs.org/4637 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit 5c52f277108e2b97a14aba6539849f71bd554cd0 Author: Marc Dionne Date: Sat May 14 13:19:52 2011 -0400 Linux: fix permission op test for certain compilers Some compilers complain that _inode is used uninitialised here. Since this test requires -Werror, it causes the test to fail and our permission op to be used in RCU mode, leading to lockups. Initialise it to make the compilers happy. Fixes a lockup seen on kernels 2.6.38+ on Gentoo and Debian. Reviewed-on: http://gerrit.openafs.org/4654 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 050945e949135c1b98ed353fc05fcf9b8c1587bd) Change-Id: Icc4e65946c8d04bd519c95b969dec1d2359dce51 Reviewed-on: http://gerrit.openafs.org/4655 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0c350f8bfe563f3b1b0fe9977c6c472c530b83f5 Author: Jeffrey Altman Date: Mon May 9 10:46:46 2011 -0400 Windows: always try afs/cell@USER-REALM first In the KFW_AFS library, always try afs/cell@USER-REALM first, even when KFW_AFS_klog() is called with an explicit realm mapping for the cell. An afs service principal from the user's realm is always preferred. No cross realm and if the realm is AD, the ability to avoid the inclusion of a PAC. Change-Id: Ie1a963f3826e10b3f37acf5829532046fe42e88e Reviewed-on: http://gerrit.openafs.org/4633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4635 commit efc227efe96ec30d3c977994ea8dbb53847cab61 Author: Jeffrey Altman Date: Mon May 9 10:45:33 2011 -0400 Windows: support dotted names in aklog Do not reject dotted principal names if the registry configuration states that they should be accepted. Change-Id: I68a3054e77236ff307cc45b6563f34ec6605113a Reviewed-on: http://gerrit.openafs.org/4632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4634 Reviewed-by: Derrick Brashear commit acecbcb53867a4d9bf83e2b6a4e933b02723bfd2 Author: Jeffrey Altman Date: Fri May 6 09:49:52 2011 -0400 Windows: replace CYGWIN envvar with CYGWINDIR The environment variable CYGWIN (starting with cygwin 1.7.1) is now used by CYGWIN to set configuration parameters for the cygwin runtime library. OpenAFS used it to indicate the location of the Cygwin install directory. Since there is a conflict, rename CYGWIN to CYGWINDIR. Change-Id: I32cd79eba33fc80e15308010fafdaecb527d23f0 Reviewed-on: http://gerrit.openafs.org/4629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4630 Tested-by: Jeffrey Altman commit 8238c68dcf8750e279f253123546481731b67854 Author: Jeffrey Altman Date: Thu May 5 20:36:38 2011 -0400 Windows: change log for 1.5.9905 Change-Id: I68135149ca84a18b802a45e53c227b34e67a41a2 Reviewed-on: http://gerrit.openafs.org/4627 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4628 commit 8a13c93eded251fefc3564ecb85378225d6e390e Author: Derrick Brashear Date: Tue May 3 08:47:31 2011 -0400 make 1.6.0pre5 update bits needed for pre5 Change-Id: Iec57e2a69ea02c25b1c71b3d7ac4beb6eafc69c1 Reviewed-on: http://gerrit.openafs.org/4618 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dd408a153adaca8795c2ae4ea88d0dadd067ca22 Author: Jonathan A. Kollasch Date: Mon May 2 21:06:34 2011 +0000 NetBSD: DEBUG can not typically be defined Like IRIX 6.5, some NetBSD kernel structures change size in the presence of the DEBUG preprocessor symbol. Reviewed-on: http://gerrit.openafs.org/4605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 48633351c597278d4c8efd5a80163f0637c85aaf) Change-Id: I15771316dc657474d8b906df26f927fdbefe384c Reviewed-on: http://gerrit.openafs.org/4617 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 045e72c2b80c49b089d9f1b9cb84bfdad55dd678 Author: Jonathan A. Kollasch Date: Mon May 2 20:03:50 2011 +0000 NetBSD: translate timeval structure format in clock_GetTime() Reviewed-on: http://gerrit.openafs.org/4604 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 350786b3e092150a91bb4542263f648d683e3b7c) Change-Id: I819abb0b3207517f4a560e10896db211006f1980 Reviewed-on: http://gerrit.openafs.org/4616 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a1959864eebf29dbebfff71b9659646d036fcba3 Author: Derrick Brashear Date: Fri Apr 29 03:59:19 2011 -0400 avoid downward vcache pressure when entries are free we try to keep VCACHE_FREE entries free. if there's already that many free, do nothing. Reviewed-on: http://gerrit.openafs.org/4595 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit fd545c51fe34b1452f09d4fbf6458f5b1557e895) Change-Id: Ia19b748596eadc75c6487d5fe854d2c7c4a4595a Reviewed-on: http://gerrit.openafs.org/4615 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 39090b5044101df54f9966063f5d89cc12a59f6d Author: Simon Wilkinson Date: Tue May 3 10:03:22 2011 +0100 Fix com_err renaming The pull up of 352c3e366c2e0a8de4550547192276e62afd2cc1 to the 1.6 branch missed replacing occurences of com_err with afscom_err in the sgistuff and pam directories. Fix this so that Irix builds again. Change-Id: I38ab02859a7cb2ebd60e455e6db4dc2c47710766 Reviewed-on: http://gerrit.openafs.org/4614 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit e69ee66caf1aa4131e2516d990c3d766a6d060d5 Author: Andrew Deason Date: Tue Feb 15 12:04:32 2011 -0600 libafs: Drop xvcache for AllocCBR Normally when we AllocCBR, we are holding xvcache write-locked, since it is called from FlushVCache. Before a309e274632993c5aeec04c6e090f5ac95837a40, when AllocCBR needs to flush CBRs due to a lack of space, we hit the net, giving up callbacks on fileservers. This can cause a problem if one of those fileservers needs to contact us in order to complete that request, since the callback service thread may be waiting for xvcache, causing a deadlock (that is eventually broken by network timeouts). To avoid this, drop xvcache if AllocCBR looks like it does not have sufficient space. Fix all callers of afs_FlushVCache to handle the case where we sleep, since with this change, afs_FlushVCache can sleep on all platforms. This partially reverts a309e274632993c5aeec04c6e090f5ac95837a40, as it contains an alternative method of avoiding the xvcache lock in this situation. This commit restores much of the code path to be much more similar to how it used to be, except that it allows for dropping xvcache for AllocCBR. This should make any change to our prior behavior smaller/simpler, and thus safer and more consistent with existing clients. This reintroduces the hard limit to how much space we allocate for CBRs, although the part of a309e274632993c5aeec04c6e090f5ac95837a40 that raised this limit is retained. Reviewed-on: http://gerrit.openafs.org/3958 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 76158df491f47de56d1febe1d1d2d17d316c9a74) Change-Id: I6d2d7512682b93e6524f8f60bb8e15818d888e00 Reviewed-on: http://gerrit.openafs.org/4603 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 126333cff710983faeb4185b0470013d66b16717 Author: Andrew Deason Date: Thu Apr 28 11:48:18 2011 -0500 libafs: Use vcount, not maxvcount to trim vcaches Every five minutes we afs_ShakeLooseVCaches to try and return the number of vcaches in use down to the originally configured -stat level (when we are using dynamic vcaches). We should calculate how many vcaches to flush based on the number of currently active vcaches (afs_vcount), not the peak number (afs_maxvcount). Otherwise, once we exceed the configured -stat level, we will always keep trying to flush numerous vcaches, even if we barely have any vcaches in use. Reviewed-on: http://gerrit.openafs.org/4584 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2a2206bfe16815a6625fee4d37520e9676d88ab4) Change-Id: I80cfbf31ba81d7cf23013c0efcea0b8ac8c341db Reviewed-on: http://gerrit.openafs.org/4602 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2571b6285d5da8ef62ab38c3a938258ddd7bac4e Author: Simon Wilkinson Date: Mon Apr 25 14:18:39 2011 -0400 Linux: Don't read pages beyond the cache eof If we attempt to read past the end of the current cache file (for example, when we're extending the file with ftruncate), don't force the backend filesystem to populate that page with non-existent data. This will hopefully fix a bus error when using tmpfs as a backing cache. FIXES 128452 Reviewed-on: http://gerrit.openafs.org/4562 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 79d5b5cce65b10134004c4cb2b7b34ac509cba6a) Change-Id: Id9956be824a4c4d8db7deb65403f4d9740758e42 Reviewed-on: http://gerrit.openafs.org/4600 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f451b4a98d79b84a37a059282d7855636981f265 Author: Andrew Deason Date: Wed Apr 27 16:24:46 2011 -0500 viced: Improve deleted client log messages Change the information logged related to deleted clients to be a little more useful. In particular this includes adding the client and host refcounts, to help see if the cause is a reference count leak. Reviewed-on: http://gerrit.openafs.org/4583 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 047cc473037efa62fa7698878e055ca4665e85ef) Change-Id: I3bfcf49587f826129979b81de95b92cb2b332790 Reviewed-on: http://gerrit.openafs.org/4593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit cfd5d1461e6fa28ab277575991d5f8eda3e46ce0 Author: Andrew Deason Date: Wed Apr 27 14:23:43 2011 -0500 viced: Avoid ref leak on origin callback break When breaking a callback, sometimes we send a callback to the host that performed the callback-inducing operation. When we do this, currently BreakCallBack gives the origin host structure to MultiBreakCallBack_r, which avoids releasing that host after the callback is broken. However, BreakCallBack obtains a reference to every host to which it delivers a callback, even if it is the origin host, so a reference is leaked. Fix this by not ever passing a host to MultiBreakCallBack_r, and just have MultiBreakCallBack_r release a reference for every host to which it delivers a callback break. FIXES 129376 Reviewed-on: http://gerrit.openafs.org/4581 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit af175ce2c7a4785ef1992d096adfdb27daa86ee4) Change-Id: Ifd59c8ce93939f7b23e9f64bd7c0e527d3a2fa52 Reviewed-on: http://gerrit.openafs.org/4592 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b1ce3765d3427caa96c9cb33ec772212531b5031 Author: Andrew Deason Date: Wed Apr 27 13:51:23 2011 -0500 viced: Transfer host ref in h_FindClient_r In h_FindClient_r, we can change which client structure we're dealing with if we find a different client struct in the Rx conn-specific data. We adjust the refcounts for the client structures themselves, but not the associated hosts. While the host structures should be the same most of the time, we are not guaranteed that, so adjust their refcounts as well. Reviewed-on: http://gerrit.openafs.org/4580 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9a4e3ade396583d412a85c4e03238d18d5c533ee) Change-Id: I9ec5ed707ef6b726c358fcaa46d81b9ea1a17ce7 Reviewed-on: http://gerrit.openafs.org/4591 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8b7a1e017a5e16137c00f66701913044bb8ef05 Author: Andrew Deason Date: Sat Apr 23 16:52:30 2011 -0500 viced: Release all hosts in h_Enumerate* h_Enumerate and h_Enumerate_r were not releasing all of the holds they obtained when the callback function caused the enumeration to bail early. Correct them so all host holds are released. Reviewed-on: http://gerrit.openafs.org/4530 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 211e906c86be9ad9cba324e776d56093579b6653) Change-Id: Iceb1e2961e9bbb11640c6fccdeb8713a9657df99 Reviewed-on: http://gerrit.openafs.org/4534 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c294038d986d61ef2d35816d96ed86786aed03bc Author: Andrew Deason Date: Sat Apr 23 16:44:41 2011 -0500 viced: Print a warning when using a deleted client We should never get a deleted client back from GetClient. Log a message if we do, to explain why access may suddenly appear to fail, and assist in determining why. Note that we still try to service the request, since the accessing user may still have enough access to do whatever was requested. Reviewed-on: http://gerrit.openafs.org/4529 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b07814e037d19dc9868dd202e82d69b96fbdcae) Change-Id: I0b1d9fe46e5b83b93b59ff6facc2421db9136c12 Reviewed-on: http://gerrit.openafs.org/4533 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a62adf29e05dc52debd7bd5ed065ee40893921b8 Author: Andrew Deason Date: Sat Apr 23 16:32:10 2011 -0500 viced: Force valid host enumeration flags Make sure that the callback functions for h_Enumerate and h_Enumerate_r give us back valid flags values by aborting if they return an invalid value. Reviewed-on: http://gerrit.openafs.org/4528 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 484b5b4cf4f88a9ddd04cdbe870d9c2959ef266c) Change-Id: Ia1b7537d7988203bd8c0bbc619c04f5b3f9387a1 Reviewed-on: http://gerrit.openafs.org/4532 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 842e77607f3834001855790086011a5902593b0f Author: Andrew Deason Date: Thu Apr 28 13:55:09 2011 -0500 doc: Fix 'vos endtrans' copyright SNA owns this, not me. Reviewed-on: http://gerrit.openafs.org/4586 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit c7212aaaf155f60e28bf592a13e5a50c960e5017) Change-Id: Ib260b89ced9616d31242237048a900616ca9820b Reviewed-on: http://gerrit.openafs.org/4601 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dd8b624cf73c98d8edab2b253d40b4c2589d44d0 Author: Jeffrey Altman Date: Sun May 1 00:11:13 2011 -0400 Windows: Fix caching of non-existing vols In cm_UpdateVolumeLocation() the conditional that would trigger the immediate return of CM_ERROR_NOSUCHVOLUME was backwards which prevented the caching from working. cm_CheckOfflineVolumes() is called by the daemon thread to reset the status of offline volumes. Non-existing volumes are by definition offline and cannot be brought online. Therefore, the cm_CheckOfflineVolumes() function should skip volumes with the CM_VOLUMEFLAG_NOEXIST flag set. Change-Id: I65534b78842b4887d2fde67162a9d854437001ed Reviewed-on: http://gerrit.openafs.org/4597 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4598 Reviewed-by: Derrick Brashear commit 61414ab7a8adb3854dcd08aeaf5c642aea8477eb Author: Ben Kaduk Date: Sat Dec 18 23:52:43 2010 -0500 Rename libcom_err to libafscom_err We no longer provide a compatible libcom_err, and in fact we renamed the symbols in our libcom_err several years ago to reflect this fact. When we build on a system where KRB5_LIBS includes -lkrb5 -lcom_err , the new Unix build system will pick up our libcom_err (as $(AFS_LDFLAGS) is the first argument in AFS_LDRULE and pulls in a linker search path for our libcom_err) which does not provide all the needed symbols for libkrb5. Fully rename our libcom_err away to avoid these conflicts. FIXES 128640 Reviewed-on: http://gerrit.openafs.org/3547 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 352c3e366c2e0a8de4550547192276e62afd2cc1) Change-Id: I3aa116d280fe1b0efdfda79787f53fbee336a4e3 Reviewed-on: http://gerrit.openafs.org/4572 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0ca30d92a1b2445562bee05098121351990f215c Author: Derrick Brashear Date: Tue Apr 26 10:46:41 2011 -0400 macos: further next version support try to optimize out things which will be missing Reviewed-on: http://gerrit.openafs.org/4569 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit a33f77b6e11214326f5e752de171602c0e9efe86) Change-Id: Ie20120aad8cb477d532594b9462aca3cf993aabb Reviewed-on: http://gerrit.openafs.org/4571 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6357b745863976955963246eed32e53d7962354b Author: Derrick Brashear Date: Mon Apr 25 22:23:40 2011 -0400 IRIX: set vfs pointer when creating new vcaches add missing call to set our vfsp on irix. Reviewed-on: http://gerrit.openafs.org/4561 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7d72a8c5c4b9df417c9337c01e8a7f26d8f6280b) Change-Id: If0cccaa47f1110eca347734bfbaedc0456e53b21 Reviewed-on: http://gerrit.openafs.org/4579 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7494fa49b29199d282b11b91cd6be8907210e1d7 Author: Marc Dionne Date: Wed Mar 30 18:32:04 2011 -0400 Linux: Fix fallout from path_lookup commit Fix a few issues with the recent commit to deal withg the removal of path_lookup, spotted on RHEL 5: - the configure tests needs fs.h to be included before namei.h, to get the definition of struct inode - we need to avoid the use of struct path unless its needed; on older kernels the structure doesn't exist (cherry-picked from commit f2e91cc3fe61956e7661eae9da82ddf746e63824) Change-Id: I752976dd5a68dd4212ad2c0088f799bd6a44ffc6 Reviewed-on: http://gerrit.openafs.org/4382 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4570 commit 5c2288d5eb46350bb7635e87d3ace8c7562b5148 Author: Andrew Deason Date: Sat Apr 23 16:25:00 2011 -0500 viced: Fix host enumeration flags Do not give uninitialized flags values to h_Enumerate callback functions. In fact, do not give a flags value to h_Enumerate or h_Enumerate_r callback functions at all, since they are not actually used. Fix host enumeration callback functions to just return 0 or the relevant flags, instead of basing the return value off of the given flags value. Update MultiBreakVolumeCallBack_r to use the correct return values, since it currently tries to use the old meanings of the host enumeration return values. FIXES 129376 (cherry picked from commit 5b9d427141f0a6fd0e83de9564e70ef2cfebf656) Change-Id: Icae627318cd523fa225beb8b53449f61532c4a90 Reviewed-on: http://gerrit.openafs.org/4531 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ac0797822c976b2b3c239ffcbcd7713897743eaa Author: Jeffrey Altman Date: Mon Apr 25 21:41:17 2011 -0400 Windows: afskfw return error if krb5 not loaded If the Kerberos v5 library cannot be loaded (pkrb5_init_context equal to NULL) return a reasonable error code instead of returning success and doing nothing. Change-Id: I90c106ff6bb4463c3d55d5ac1bbf225464c80c0d Reviewed-on: http://gerrit.openafs.org/4560 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4568 commit 6c1c8477f97b79404dd4a057c39df57215cffb4f Author: Jeffrey Altman Date: Mon Apr 25 21:40:28 2011 -0400 Windows: build afskfw.c without leashw32.dll remove our dependency on mit kfw leashw32.dll Change-Id: Ibb5bc58dc6bf250d50ae8bd884a08449a356b6e2 Reviewed-on: http://gerrit.openafs.org/4559 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4567 commit 50808ed7003c666f72d26ea2100fd17784744a34 Author: Jeffrey Altman Date: Mon Apr 25 21:29:46 2011 -0400 Windows: avoid preprocessor symbols redefinitions In afskfw.h avoid preprocessor symbol redefinitions when RD_AP_TIME or INTK_BADPW are already defined. Change-Id: If123c7a7564c5dbe509ad107f2c856e96e562d33 Reviewed-on: http://gerrit.openafs.org/4558 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4566 commit 1b577bb643d8d68183bb6396ccb4b7722b8bee4d Author: Jeffrey Altman Date: Mon Apr 25 21:24:32 2011 -0400 Windows: NPLogonNotify provide password in all cases When calling KFW_AFS_get_cred() from NPLogonNotify() always provide the user password. Do not count on a credential cache existing from a previous call. Change-Id: I24c51395f22c07b11107c03dc749a7c2eff694f7 Reviewed-on: http://gerrit.openafs.org/4557 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/4565 commit 89196a625e11cc1c717ab1154693e1439086134f Author: Jeffrey Altman Date: Mon Apr 25 21:23:34 2011 -0400 windows: improved logging from NPLogonNotify Improve the detail and formatting of the windows event log entries. Change-Id: I28350202b954765c570582540fac180bd1f68206 Reviewed-on: http://gerrit.openafs.org/4556 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4564 commit d0edfe441bac4b802b2957bfb331ad04417a2acb Author: Andrew Deason Date: Fri Apr 15 11:18:37 2011 -0500 AIX51: Fix PAGs On AIX 5.1 and later, we set a process' PAG by using the AIX PAG mechanism (and not by group ids), but we were determining what PAG a process was in by the group list. Instead use the PAG identifier. This effectively reverts 277c37f48c8126ba9cb986ffc7361fcb98e2bbf2, but it puts the kcred_getpag call in a different place that makes more sense in the current PAG code organization. Change-Id: Ifbc2602cfa9f32bf5d9b53b71fc67fe0761394ea Reviewed-on: http://gerrit.openafs.org/4479 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4503 commit b6a4792b84bae661128dfa245cba541a7b9837d9 Author: Simon Wilkinson Date: Thu Apr 21 16:07:05 2011 +0100 Linux: Restrict # of cbrs we allocate at once With commit a309e274632993c5aeec04c6e090f5ac95837a40, we changed the number of CBRs that we allocate in a chunk from 300 to 1024. However, this change takes the amount of memory requried to allocate a chunk of CBRs above PAGE_SIZE on Linux. This changes the allocator that we use from kmalloc to vmalloc. Whilst we can, and do, prevent kmalloc from flushing filesystem pages when we invoke it, we don't have a similar level of control over vmalloc. 1.6 only: limit it back to 300 elsewhere. In one reported case, clients deadlock whilst attempting to allocate this memory, in a call stack that looks something like: afs_Daemon -> afs_ShakeLooseVCaches -> osi_TryEvictVCache -> afs_FlushVCache -> afs_QueueVCB -> afs_AllocCBR -> osi_linux_alloc -> ... -> __vmalloc_node -> ... -> try_to_free_pages This is probably because we end up deadlocking in the writeback invoked by try_to_free_pages, likely due to locks which are held by ShakeLooseVCaches. As a quick fix for the problem, make sure that the memory we allocate always fits within a page, so we always use kmalloc for it. FIXES 129751 Reviewed-on: http://gerrit.openafs.org/4510 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 3cb97cdaa867b0d9fef84c683251a0a8f59a1519) Change-Id: I28a480788271eac1b69fb9704bed5c286be2c4c5 Reviewed-on: http://gerrit.openafs.org/4555 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 270861f67f09e6f22ec5c54105f287b23fa9d9ae Author: Jeffrey Altman Date: Mon Apr 25 07:58:49 2011 -0400 Windows: remove trailing whitespace remove trailing whitespace from NTMakefile *.h *.c *.cpp *.idl *.def *.txt *.htm Change-Id: Ia1e44d8e15c1e4e076cc6d9bda42ffeaef943f76 Reviewed-on: http://gerrit.openafs.org/4548 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ebf5329e8ca1b3c0b581f436b28f6affe2c7c454) Reviewed-on: http://gerrit.openafs.org/4549 commit 41f48eb4e15817992c536939efeff594d6206559 Author: Simon Wilkinson Date: Thu Apr 21 18:18:54 2011 +0100 Darwin CM: afs_IsDynrootFid takes a fid ... ... not a vcache. Reviewed-on: http://gerrit.openafs.org/4511 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b178496063be6d95f301ae13c3e655c8fe94febc) Change-Id: If77fd99c5b96b243e1a5aee10f93c75fcca3cc94 Reviewed-on: http://gerrit.openafs.org/4552 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 082a217cfae58dd1a7a04d12de0f2b5339d2e74a Author: Simon Wilkinson Date: Mon Apr 25 13:56:38 2011 +0100 Windows: Remove duplicate file The 'Streamfiles.txt' file had been committed with both that name, and an all lower case name. This makes git very sad on systems with case insensitive filenames. Change-Id: Ifc61e8b2366d8a191279f6ccbe394e55ffe15fef Reviewed-on: http://gerrit.openafs.org/4550 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce256d586468911d5501f667c53247a837378c06) Reviewed-on: http://gerrit.openafs.org/4551 commit 3cbd777eff4145388b6f238b5ca2e14d8ab182a5 Author: Jeffrey Altman Date: Tue Apr 19 13:17:56 2011 -0400 Windows: change thyper to offset and fix error In cm_ReadMountPoint and cm_HandleLink the variable 'thyper' represets the 'offset' at which cm_GetData should fetch data. Rename 'thyper' to 'offset' and fix a coding error caused by misinterpreting the variable purpose. Change-Id: Icdd2493e356803b4b2bd00c7349d8d882283d29b Reviewed-on: http://gerrit.openafs.org/4501 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4523 commit 314bc2e0082edea04ffb6908e2479be904b21b8e Author: Jeffrey Altman Date: Tue Apr 19 00:12:49 2011 -0400 Windows: avoid race when writing mountPointString cm_GetData() drops the cm_scache_t rw lock which permits other threads to access the data while it is in an inconsistent state. Avoid the race by using a stack allocated temporary buffer to receive the data from cm_GetData(). Only copy the data into the mountPointStringp buffer under the rwlock. Change-Id: Id5ab3c5ed7c76551d53fedea96eeded59c2c699d Reviewed-on: http://gerrit.openafs.org/4498 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4522 Tested-by: BuildBot commit 2d6f45161c65f3eaf2ca7f05ebbeb335e2e72fad Author: Andrew Deason Date: Thu Apr 21 14:24:45 2011 -0500 aklog: Return token when performing 524 conversion We weren't actually returning a token and username from rxkad_get_converted_token. Do so. This is a 1.6-specific change. This issue was fixed on master when aklog was changed to use the new SetTokenEx family of pioctls in commit 53837416cbed3ba4d11f63015e1f13800519f2ed. Change-Id: I7395034c5225ca62b562ea39bd01762c74090b03 Reviewed-on: http://gerrit.openafs.org/4518 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 0d1a063072575bd44378b09b01e9e2fffe5a032e Author: Jeffrey Altman Date: Tue Apr 12 11:48:27 2011 -0400 asetkey: permit des-cbc-md5 and des-cbc-md4 keys A DES key is a DES key. Permit importing CRC, MD5 and MD4 when using non-MIT keytab support. Add a special error message that specifies what principal name, kvno, and enctype were being searched for when the error is KRB5_KT_NOTFOUND. Change-Id: Ie04e86fc5516064a67d7804cc47f2e27a30ea7ea Reviewed-on: http://gerrit.openafs.org/4459 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a26f4b188172ed157b4ddf9006e46186702b5b56 Author: Andrew Deason Date: Tue Apr 12 16:30:55 2011 -0500 libafs: Do not specify an Rx busy channel error Do not specify an error for Rx busy channels in libafs, so we do not get notified of busy channel notifications. The current code just specifies RX_CALL_TIMEOUT for the busy channel error, which has problems (in particular, for RXAFS calls that are not wrapped in an afs_Analyze loop). So, disable this behavior. This is a 1.6-specific change. The master branch will instead get fixes for this functionality, and it will get turned on in 1.6 again as appropriate. Change-Id: I0ed292a61ba4c8d0e59017b3dfaadc88d17591e6 Reviewed-on: http://gerrit.openafs.org/4460 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a90ef45858e30b6319b15150c9b4f70ececb212d Author: Antoine Verheijen Date: Mon Mar 28 10:05:40 2011 -0600 OpenBSD: Complete implementation of afs_osi_TimedSleep The OpenBSD version of afs_osi_TimedSleep() is missing the required afs_event structure and afs_getevent routine. This update adds them (by borrowing a copy of the code from the FreeBSD implementation). Reviewed-on: http://gerrit.openafs.org/4373 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a4b8823950d0d7f3806fe9e7aed22502b72a79e4) Change-Id: I1886cbb995a6c3e6ef3d4cc73895215d6293fe15 Reviewed-on: http://gerrit.openafs.org/4388 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a8aa6f4221309f44f49cdd00acce88122f1753f6 Author: Marc Dionne Date: Sun Mar 27 10:59:55 2011 -0400 Linux: 2.6.39: replace path_lookup with kern_path path_lookup is no longer available, use kern_path instead. Reviewed-on: http://gerrit.openafs.org/4360 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7d162266c4958b22cc45d65e3f204a96c218e5f6) Change-Id: I1c2aba273d1d597346ecb92f75caed6b6d624454 Reviewed-on: http://gerrit.openafs.org/4371 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1e322b883e036fe0bd5468fe60a0431545fe2376 Author: Marc Dionne Date: Sun Mar 27 11:20:17 2011 -0400 Linux: 2.6.39: deal with BKL removal For 2.6 kernels the OpenAFS code is already BKL free, but the corresponding header file smp_lock.h is still included in various places. This header no longer exists, so remove all occurrences outside of LINUX24. Reviewed-on: http://gerrit.openafs.org/4361 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9376293634393597ac7db88593100937621f6c3f) Change-Id: I8e7e244b2e45a7a3af0505531757b8a54a0b3d29 Reviewed-on: http://gerrit.openafs.org/4370 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 35009a884611d543aff36a0758171798efea5168 Author: Jeffrey Altman Date: Sat Mar 26 13:05:26 2011 -0400 Windows: change log for 1.5.9904 (1.6.0pre4) Reviewed-on: http://gerrit.openafs.org/4347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 620ec4382fbf79908c62e4ce1e451b8743e457ac) Change-Id: Id226e7534ca5d7fee623d3b3a24edac76b354685 Reviewed-on: http://gerrit.openafs.org/4372 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 39a861f0cf10313323219409a2a7095f0fffd9e0 Author: Andrew Deason Date: Fri Mar 25 16:37:30 2011 -0500 SOLARIS: Correct ioctl syscall error handling Do not use the return code from ioctl for errno. Ioctl itself will set the errno and return value correctly, so don't mess with them. Reviewed-on: http://gerrit.openafs.org/4345 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 99ed22fb02a3b44c03327a1fdd5ef56e211724b6) Change-Id: Ie7ba95f14a2c34f11b358b482bd58bdacba6bed6 Reviewed-on: http://gerrit.openafs.org/4369 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8f7ae330d6491dae015c52ae1a3cf0e2333a349b Author: Andrew Deason Date: Fri Mar 25 15:54:01 2011 -0500 viced: REALLYCLOSE origfdP after CoW In StoreData_RXStyle, we save a pointer to the original FdHandle_t if we need to CopyOnWrite the target vnode, for the purposes of possibly copying additional data later on. After the CopyOnWrite call, this points to an inode that is not in the current volume, and is thus less likely to be accessed. In CopyOnWrite itself, the original file handle is FDH_REALLYCLOSE'd because of this, so the handle does not remain in the cache. Do the same in StoreData_RXStyle, so origfdP is always FDH_REALLYCLOSE'd after we have called CopyOnWrite. Reviewed-on: http://gerrit.openafs.org/4344 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 55781a831954cb1e7253a12e0f9b581b586c3603) Change-Id: I184a7e0b0ac05361c491821bc6a3756db3e24221 Reviewed-on: http://gerrit.openafs.org/4352 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3133fb26ed6730a735c09129a7097fa56630f07e Author: Ben Kaduk Date: Fri Dec 17 01:16:30 2010 -0500 new files for FreeBSD packaging at 1.6.0pre3 Packaging for use with FreeBSD's Ports Collection. The directory layout is flattened, and a couple of files that do not make sense here are not included. The afsd rc script lives in packaging/ as it is not runnable in its committed form, it requires variable substitution that occurs at install-time from the Ports Collection. Reviewed-on: http://gerrit.openafs.org/4351 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7b4da89c8ed266959ec8d3ae4f6627b096206dee) Change-Id: I0051b9d609736fc172a7c3fefd23cb910b4543e6 Reviewed-on: http://gerrit.openafs.org/4355 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit db18dd847694d95f53c3eeec8d444fc911e503f3 Author: Ben Kaduk Date: Sun Nov 21 23:32:37 2010 -0500 Remove outdated rc file for afsd on FBSD The semantics of rc scripts have changed drastically since this was written. It will need to be rewritten from scratch; the new version will live in src/packaging/FreeBSD as afsd.in, as it is included with the port packaging in that form. Reviewed-on: http://gerrit.openafs.org/4350 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit dce071acef1119aceca7eb80a66c035fb03e9259) Change-Id: I17bd69033e51bc5c59d70f982f8deb04fd18d5b4 Reviewed-on: http://gerrit.openafs.org/4354 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84b37573013cf466dd195d748cc316e66dc39031 Author: Ben Kaduk Date: Sat Nov 6 00:30:12 2010 -0400 Remove stale FreeBSD packaging We no longer use the Transaarc paths, and the rc environment and packaging methods are quite different now. Reviewed-on: http://gerrit.openafs.org/4349 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit f901c0f5258c14f5d04d9b64ca5b472c468f60bd) Change-Id: I764eb311082fbaf2b6b918f9023b53f0f3f67872 Reviewed-on: http://gerrit.openafs.org/4353 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7cfdf1ae21676bc83478057b4296160003bdbf7b Author: Andrew Deason Date: Thu Mar 24 17:57:32 2011 -0500 salvager: Stop asking for DAFSness on SYNC_FAILED Break out of the loop so we stop asking the same thing repeatedly. Reviewed-on: http://gerrit.openafs.org/4315 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c5be1f72875bcb083a9ddef4621efecf62aa880e) Change-Id: Ia90d4d439d054b95d8ea686ab853fb2067e19d38 Reviewed-on: http://gerrit.openafs.org/4337 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 89c6f7382fb1bde29d1bd2ced4e14d48494cab41 Author: Andrew Deason Date: Wed Mar 23 17:38:35 2011 -0500 DAFS: Allow the volumeSalvager to checkout volumes Reviewed-on: http://gerrit.openafs.org/4298 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ad0afb57b9172bb7cfa0853b5f34259c0958d248) Change-Id: I1eac22970f5665c7bdb2138ae380b59263836d99 Reviewed-on: http://gerrit.openafs.org/4336 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3734da6e022687ac16906f5954c30e20fa9d7c94 Author: Derrick Brashear Date: Thu Mar 24 16:11:17 2011 -0400 add AFS_DEMAND_ATTACH_UTIL use this for non-pthreads "support code" e.g. salvager. Reviewed-on: http://gerrit.openafs.org/4312 Reviewed-by: Andrew Deason Tested-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 04bcfa2821c9deba151f562bb78452276d8d7443) Change-Id: If956be50059ac128b5880131f961342c2661e5b7 Reviewed-on: http://gerrit.openafs.org/4335 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 696fbd86b6f3a864439d72a2b3a55052e2e251cb Author: Jeffrey Altman Date: Fri Mar 25 08:58:20 2011 -0400 Windows: trailing dot not part of volume name When dynamically adding new cell mount points to the Freelance directory do not include a trailing dot when specifying the root.cell volume name. Change-Id: I23e47791b412f8f6260ca921daaf0200b19f4179 Reviewed-on: http://gerrit.openafs.org/4334 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e7099ec0aeedf8119a274419064d2903bd790cd4 Author: Jeffrey Altman Date: Wed Mar 16 02:17:38 2011 -0400 Windows: avoid recursive cm_CheckOfflineVolume Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used to prevent cm_Analyze() from performing recursive cm_CheckOfflineVolume operations that will exhaust the stack. Reviewed-on: http://gerrit.openafs.org/4240 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 11ad1e467f9708f12fe09228cbb827b8f4e1225b) Change-Id: I3385d7b5a90e77ba8d6c87b9f29f39b62c17bb23 Reviewed-on: http://gerrit.openafs.org/4314 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 713893a2052cdc0ea35c323eabbd6becd387c453 Author: Andrew Deason Date: Wed Mar 23 11:07:03 2011 -0500 DAFS: Do not VDeregisterVolOp_r while exclusive We should wait for a volume to transition out of an exclusive state before calling VDeregisterVolOp_r on a volume, since some code may be examining the vol op outside of VOL_LOCK in an exclusive state. We should be doing this anyway before performing volume state checks, since we may be trying to e.g. attach the volume at the same time. Reviewed-on: http://gerrit.openafs.org/4287 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4ebebd0c3f89b65e93f0da6d53665271e6d2a61) Change-Id: I55f07806a4e089577252ddb527a86142b10f797d Reviewed-on: http://gerrit.openafs.org/4306 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ec8456884f5eeaaa5da6bacc35a40568cbe37085 Author: Russ Allbery Date: Thu Mar 24 12:56:56 2011 -0700 Correctly document the AFS client setuid defaults AFS no longer honors setuid status by default. Update the admin guide documentation appropriately and add a warning recommending against enabling setuid status given the limitations of the current AFS protocol. Reformat this section of the admin guide to make it easier to maintain. Reviewed-on: http://gerrit.openafs.org/4311 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7b00c17b49fe6a54f99f3c23bfc307a4b10d88e2) Change-Id: I0dd638c37a116f39f93f08cc41c400f43a685940 Reviewed-on: http://gerrit.openafs.org/4313 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 0263a96a987032bf8a04ce47bc3c70afebd87125 Author: Russ Allbery Date: Tue Mar 22 02:04:46 2011 -0700 Update NEWS for 1.6.0pre3 release Add additional NEWS entries from the 1.6.0pre3 release notes. Reviewed-on: http://gerrit.openafs.org/4270 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4e8b729d8f216e9f033e95194740ff4cb566688) Change-Id: Ic64819d6182c57e081e0e0d85c3629a3f7c11ed3 Reviewed-on: http://gerrit.openafs.org/4310 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit dfde656b6a1f0831ac537586aa0746b46ea93b88 Author: Russ Allbery Date: Mon Feb 14 12:36:18 2011 -0800 Update 1.6 NEWS entry based on 1.6.0pre2 release notes Reviewed-on: http://gerrit.openafs.org/3950 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f378dcf785967374309523a02ea06d6d1a3ff148) Change-Id: Ic5625c6eb32238b177716c0f87ea6e62521a9de8 Reviewed-on: http://gerrit.openafs.org/4309 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit eb276810213418c7f8b00b63e92fc465ecd22ec2 Author: Simon Wilkinson Date: Wed Mar 23 15:35:35 2011 +0000 rpm: Build srpms without %dist in their name On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This leads to makesrpm.pl building SRPMS with .el6 in their release. As we endeavour to use the same SRPM on all of our Fedora platforms, this is less than ideal, so change makesrpm.pl to squash the setting of %dist before building the RPM. Reviewed-on: http://gerrit.openafs.org/4285 Reviewed-by: Alexander Ivan Redinger Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit b0921071dd1b4d460d406985bba9619561444055) Change-Id: I9e5bb2ce13378a0927763535d885a4728bd48f06 Reviewed-on: http://gerrit.openafs.org/4307 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f8c1bebf88de7376628c86eb3a7250bb78024510 Author: Derrick Brashear Date: Wed Mar 23 14:17:25 2011 -0400 macos next support first brush at supporting next macos. totally not lion about it. (cherry picked from commit XXX) Change-Id: I4ede2a940c3881b588117c2b80f62f71563e78ce Reviewed-on: http://gerrit.openafs.org/4291 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 829dd0bfc0f3315eb885373420fce684b55825b2 Author: Derrick Brashear Date: Wed Mar 23 14:11:31 2011 -0400 osconf: reduplicate systype stuff in some cases there is more to do, and in some cases we probably already didn't build anymore, but, let's simplify. (cherry picked from commit XXX) Change-Id: I48248c2fc081413536763f09608e00153c4ea3ee Reviewed-on: http://gerrit.openafs.org/4292 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 911b2583045bf1609b7f04571cbfd8b3c1df0389 Author: Andrew Deason Date: Thu Mar 10 18:37:44 2011 -0600 vol: Correct VolumeNumber for large volume IDs VolumeNumber was using atoi to convert a volume header name to a volume ID. This can return just -1 for volume IDs larger than 2^31-1, though, so use strtoul instead. Reviewed-on: http://gerrit.openafs.org/4199 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0f1c921fa1738c383fd576e287f356dd13f92a58) Change-Id: Ib56d3f77f0d90f5ad55b3c0de89632d271436f7e Reviewed-on: http://gerrit.openafs.org/4284 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d691ae10903e01db4d6b24a4eb02da536cadf7c Author: Andrew Deason Date: Wed Mar 16 14:44:56 2011 -0500 salvager: Fix volume parsing on 64-bit When an unsigned long is wider than an afs_uint32, comparing the afs_uint32 vid to ULONG_MAX is always going to be false (which the compiler can warn us about). Fix this by storing to an unsigned long, and converting to a volume id after ensuring that the result is not too large. (cherry picked from commit ce5e263b488f8cb85662031ee08eea448dab2d27) Reviewed-on: http://gerrit.openafs.org/4244 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear Change-Id: Iec2d640daed1e9c175d17823750f272297f890a7 Reviewed-on: http://gerrit.openafs.org/4283 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 12507bcd2f3313fb97cb926a3eea67e0cd6e05ed Author: Andrew Deason Date: Thu Mar 17 10:43:23 2011 -0500 viced: Actually print client CPS Client CPS was not getting output on SIGXCPU like the rest of the client information, since the conditional in the CPS loop was never true. Fix this so we traverse the CPS entries correctly. Reviewed-on: http://gerrit.openafs.org/4256 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5df51a82947f0ff60d57f551c5faa136ad7f6e0f) Change-Id: Ic710d9ab4da5dc1fdb4a1ffca72590b043bff918 Reviewed-on: http://gerrit.openafs.org/4282 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c31d20162b3648c2f16286f6ceb09f141abd9207 Author: Derrick Brashear Date: Tue Dec 7 21:26:59 2010 -0500 DAFS: fix forceDAFS support in salvager we need to get the shared partition lock for the per-volume forceDAFS case Reviewed-on: http://gerrit.openafs.org/3487 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 81e7a5adf93a6b5eec104ca4bde429cf6cb0548a) Change-Id: Ie7c6a43d25c621a3faca2a6564fbc06f9af87880 Reviewed-on: http://gerrit.openafs.org/4278 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 893feb97db3638c6f7a222aabf35b63e76e590b4 Author: Derrick Brashear Date: Tue Dec 7 21:23:53 2010 -0500 DAFS: allow salvager to detect whether FSYNC server is DAFS in order to enable the right commands and print the right errors, query for DAFS-only FSYNC op. doesn't use bozo InstanceInfo as it's possible you can run fileserver outside of bos. (cherry picked from commit b9ecf28c6c7c232823ac9b44cd00db9afab81c91) Reviewed-on: http://gerrit.openafs.org/3486 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: If53edc8d100d5eacaf4aaad9feee96211e24e1a2 Reviewed-on: http://gerrit.openafs.org/4277 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d0a4f7a6fce300463f11e6c2430cb94df3aaeb5d Author: Derrick Brashear Date: Wed Mar 23 10:54:15 2011 -0400 openafs 1.6.0pre4 set version for 1.6.0pre4, and phasers for stun. Change-Id: I43e36633b679f9af6156025842f2e1556fcbb17b Reviewed-on: http://gerrit.openafs.org/4276 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 21a2c79b76a88640189276c64bd781867ba19357 Author: Simon Wilkinson Date: Thu Mar 17 19:14:39 2011 +0000 rpms: Use new CellServDB Update the CellservDB referenced by the spec file to the latest one from grand.central.org Reviewed-on: http://gerrit.openafs.org/4257 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 71380ee4f3522ba64ed60724a928f8efc16ca132) Change-Id: I0f08b145073faca5d0dda2c6460e57dc448b3450 Reviewed-on: http://gerrit.openafs.org/4281 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ca878f0eac4775f02967e9df31f54a28573f12dd Author: Simon Wilkinson Date: Thu Mar 17 19:28:23 2011 +0000 rpms: Make makesrpm.pl cater for new rpm names Starting from 1.6.0, our specfile no longer adds a stray '1.' to the start of the release field. makesrpm.pl was failing to deal with these new-style names and therefore not actually making an rpm. Fix this by conditionalising on the OpenAFS version when selecting which rpm to copy. Reviewed-on: http://gerrit.openafs.org/4258 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit af854b4e2f19e5f1a83b686e99ca3dd6122af942) Change-Id: I95bc506e1113d0054b2aaca3a301551de1f086db Reviewed-on: http://gerrit.openafs.org/4280 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 35451a9d436d6359faab933fd2432b84f5dddf8e Author: Simon Wilkinson Date: Sun Mar 20 21:13:09 2011 +0000 util: Fix exec_alt exec_alt was failing its tests on Mac OS X (but passing them on Linux). It turns out that this is because it was failing to NULL terminate the string that it creates in construct_alt(), which copies in the characters from argv0, prefix and suffix, but never copies in a trailing NULL. Amend the code so that the trailing NULL from suffix is used to terminate the string. Reviewed-on: http://gerrit.openafs.org/4267 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 8c418408016ff8d6be9f85c4666a49954f61dbd0) Change-Id: Ie34832eb94f91a6e9083f65aa81333cb7b1fbb30 Reviewed-on: http://gerrit.openafs.org/4279 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d844910d7545df7b66625edcdb5ea2caaf21f341 Author: Jeffrey Altman Date: Tue Feb 17 04:37:27 2009 +0000 vclosevnodefiles-ihandle-leak-20090216 LICENSE IPL10 FIXES 124359 don't leak ihandles on close. this isn't a complete fix for the issue (cherry picked from commit b9816e12f7ed8213c9c4eaea09e992e69ce4ee05) This reverts the part of 12e85227c5dbfdb1258718ee3360bffacc4f96ac that reverted b9816e12f7ed8213c9c4eaea09e992e69ce4ee05. Reviewed-on: http://gerrit.openafs.org/4272 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ef9fc4fadaded1c0ea067b2fd1d423df826606ae) Change-Id: Ieeea51fd247ff4fc1b1da03c94a905c293b9fb7e Reviewed-on: http://gerrit.openafs.org/4275 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d260d9d7ede14123010b96e133a9ac210a432dce Author: Derrick Brashear Date: Thu Mar 17 00:11:43 2011 -0400 osx: prefs pane should properly detect version we use "new" afs conf after 1.4.6 or 1.5.36. detect correctly Reviewed-on: http://gerrit.openafs.org/4254 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0016e013aa012e179e7ac4c59b19a0ee1cbd0840) Change-Id: I6796dee249eccd7646359deb8f29322b9954f803 Reviewed-on: http://gerrit.openafs.org/4269 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9cb1d688ea96923d2b5abacdcbf9cf755e2145e5 Author: Derrick Brashear Date: Thu Mar 17 01:25:35 2011 -0400 osx: decode-panic should work in add-kext only land in 64 bit 10.6, you need add-kext (not add-symbol-file) to decode a panic. deal accordingly Reviewed-on: http://gerrit.openafs.org/4255 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c4744cc699be19fffb49f39f469e91ef6aac6585) Change-Id: I3de2c4799ff1a552e67d4398b76e8736ba2abf7e Reviewed-on: http://gerrit.openafs.org/4268 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 74f56c447de1878427655c1394e1805081b65333 Author: Derrick Brashear Date: Wed Jan 19 23:11:11 2011 -0500 MacOS: allow cdead vcaches to be found in FindVCache if requested if we are trying to find a dead vcache, let it be found, don't immediately attempt to recycle FIXES 128511 (cherry picked from commit d73d9a1011cc3e1e5acfbc970434373f732c066e) Change-Id: I4dde25e54e3d76faff58c8e42d0949493aa986f3 Reviewed-on: http://gerrit.openafs.org/4243 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 95fd8e09d80e3fbefe66ad0b5309b9844b92a12d Author: Derrick Brashear Date: Wed Mar 16 01:06:43 2011 -0400 macos: kernel socket upcall support kernel socket upcall instead of listener env (cherry picked from commit c10f5296d26eac9ac00018199ef579e8f6095c07) Change-Id: Iaad3138106475219194772491d3e0915d60c466e Reviewed-on: http://gerrit.openafs.org/4238 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ee2811b01f3c34d3f07802ff88e2577da1caef6d Author: Andrew Deason Date: Thu Sep 30 12:39:22 2010 -0500 viced: Allow checkout of VOL_STATE_DELETED volumes The fileserver allows nonexistent volumes to be checked out. Since VOL_STATE_DELETED volumes conceptually do not exist, we should also allow them to be checked out. Reviewed-on: http://gerrit.openafs.org/2873 Reviewed-by: Tom Keiser Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 88fc9ada4cfaee354199480916d139400ee0ef5b) Change-Id: I24bf2100bf57a27323cd0e9e5081e767e67c944e Reviewed-on: http://gerrit.openafs.org/4261 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 17b48f99b60ed0f67270d4649ee9bdcda9a7cc59 Author: Simon Wilkinson Date: Tue Mar 15 21:48:43 2011 +0000 Throw the compiler a bone ... ... failing that, a semi colon. Reviewed-on: http://gerrit.openafs.org/4234 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ffdc040d560a461abd59602ad62ba2fbf150227f) Change-Id: I6dc924df277da7e650d6ae26f8520b23be10db3e Reviewed-on: http://gerrit.openafs.org/4235 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7ac00619358c7a1b1749440e4c4ca6510ff87687 Author: Jeffrey Altman Date: Mon Nov 29 17:47:10 2010 -0500 Windows: permit code signing without timestamps If CODESIGN_TIMESTAMP is not defined, permit code signing to occur but do not ask signtool to contact a timestamp server. Change-Id: Iaac89f8db96c9428481a638fc72f8d14c53e2045 Reviewed-on: http://gerrit.openafs.org/3393 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4231 commit 66885074b3cf2f1f3c2facedad2e95600b9573c0 Author: Jeffrey Altman Date: Wed Nov 17 21:42:00 2010 -0500 Windows: Add CODESIGN_OTHER option to make signtool rules Some organizations may need to pass additional parameters to signtool.exe. Add the optional CODESIGN_OTHER value to permit arbitrary additional parameters to be specified. Change-Id: I225a790e04d8aa1298bbf03a9559ae0b5e63a70d Reviewed-on: http://gerrit.openafs.org/3322 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/4230 commit 449d114b475e20535610ee8eed8715fa8071f288 Author: Simon Wilkinson Date: Tue Mar 15 00:45:45 2011 +0000 Linux: Fix return codes from setpag Linux is a real stickler when it comes to error codes. Functions which return positive error codes into the kernel tend to have unfortunate effects. Because all AFS errors tend to be positive, most of our kernel entry points negate errors before passing them back to their caller. This causes problems when internal functions themselves return negative error codes. This was the case with the keyring functions, which ended up returning a negative code to setpag(), this handed that code ultimately up to the ioctl handler, which negated it (so turning it positive) before throwing it up to the kernel. The kernel sees this positive value as being a successful return, and so passes it direct to userland, rather than assigning it to errno. This led to the setpag() userspace function never being aware of keyring errors that had occurred in the kernel. Fix all this by making sure that all errors from the keyring code are made positive before being passed upwards in the kernel module. Reviewed-on: http://gerrit.openafs.org/4223 Tested-by: Marc Dionne Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3d92852ba99bc7591515992dfea3436d93c23b85) Change-Id: I72177ad2ee6d0a2c2c3f6d6819289a761b2712f0 Reviewed-on: http://gerrit.openafs.org/4226 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit de478ca8ac14b991082bf0f26fb9807a913980a0 Author: Simon Wilkinson Date: Tue Mar 15 00:06:19 2011 +0000 Revert "Linux: normalize error return for emulated syscalls" This reverts commit 0bc837f68a72ba1f75d940cc5dd057774d9f36bb. Sadly, this change fixed setpag(), but broke all of the pioctls. The problem is actually a little more nuanced than we at first thought. What's happening is yet another case of Linux's special handling of negative return values. When an ioctl handler returns a negative return code to the kernel, it does errno = -code, and sets the return code to -1. If you pass it a postive return code, however, it just returns that straight to the application. The pioctl code gets this right. However, the setpag code doesn't, and so tries to return postive values, which is why ioctl appears to be returning the error code in the return value, not in the errno. Reviewed-on: http://gerrit.openafs.org/4222 Tested-by: BuildBot Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit ff2933a122ddf9421ebcacdc7e4ec5f44333f894) Change-Id: Ibfb050552f8b2357e57139976e2bc42ce6187f4f Reviewed-on: http://gerrit.openafs.org/4225 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a7821f0bb503acf6c10547aeb29952768ef1127c Author: Jeffrey Altman Date: Mon Mar 14 22:55:26 2011 -0400 Windows: 1.6pre3 changes Change-Id: Ia4d504c2f9478f88c219375b92cdcb203defddfc Reviewed-on: http://gerrit.openafs.org/4228 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53d991474d8a8a885697cbdfb975f3a55500aa58 Author: Jeffrey Altman Date: Fri Mar 4 11:04:40 2011 -0500 Windows: mp target trailing dot not part vol name Instead of passing "root.cell." into cm_FreelanceAddMount pass in "root.cell" and add the trailing dot within the function. Reviewed-on: http://gerrit.openafs.org/4124 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 0d1335ad7104a6fa67525b84d70a33e7bb1b6c6a) Change-Id: I27b077c7fd9e8ea5cb67da96b5172d69623e1122 Reviewed-on: http://gerrit.openafs.org/4221 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2a4a4c715928c9c8e34e7d1285e753ea0c05cec1 Author: Jeffrey Altman Date: Wed Mar 2 14:06:48 2011 -0500 Windows: avoid use of cm_buf for MPs and Symlinks In the Windows cache manager, the symlink and mount point target strings are stored in the cm_scache_t mountPointString and are not accessed out of the cm_buf_t for offset zero except when populating the mountPointString. As a result, every mountpoint and symlink object that is read into the cache wastes a cm_buf_t which could otherwise be used to store additional file or directory data. Add cm_GetData() function which is similar to cm_GetBuffer() except that it reads data from the file server into an arbitray memory location instead of a cm_buf_t object. Use cm_GetData() to read directly into the cm_scache_t object. In addition, further optimize the communication with the file server by using cm_GetData() to perform a RXAFS_FetchData RPC to obtain both the target string and the status information instead of RXAFS_FetchStatus which only returns the status information in cases where there are no outstanding callback registrations on the object. RXAFS_FetchStatus is still used when a callback is active in order to obtain access permissions for new users. Reviewed-on: http://gerrit.openafs.org/4111 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit dec0ba1cfaf7dd6a4ed23a2f656bd6272600d51c) Change-Id: I2ffa85193ffeb35c9558224985ba7485ec617712 Reviewed-on: http://gerrit.openafs.org/4220 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cf532f7c8845e70df27fe45e7242db170f00babc Author: Michael Meffie Date: Mon Mar 14 10:15:35 2011 -0400 readme typos Fix two typos in README. Reviewed-on: http://gerrit.openafs.org/4218 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ba67ef96bb5216ecb03d656af22b3b7f7542efef) Change-Id: Id202785ee2568bd625c1e781574d21dae3488982 Reviewed-on: http://gerrit.openafs.org/4219 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit fbd4a43ddf5131cb597d46cff0419e7685e3210d Author: Simon Wilkinson Date: Sun Mar 13 14:45:04 2011 +0000 pt_util: Initialise empty database correctly Commit dc8f18d6f5003712bc9ef989363137a84953df07 broke pt_util's initialisation of empty databases. This is because Initdb was changed to call Initdb_check through the ubik_CheckCache wrapper. However, that wrapper was defined as a no-op in pt_util's ubik-shim. Modify pt_util's ubik_CheckCache so that it always calls into the wrapper routine - this mimics the old behaviour. Add a trival test for pt_util - check that we can build the database, using the example from the manpage, and then that the built database matches what we expect. (cherry picked from commit 4953ce8070497bc494e624d72271bcbc5dc1dbe7) Reviewed-on: http://gerrit.openafs.org/4211 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: If4cfbda25f8d1c5e1da4c1e42982c74becf386e3 Reviewed-on: http://gerrit.openafs.org/4217 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c97ec074977563b756e9ad1c9773c5880965c664 Author: Jeffrey Altman Date: Fri Nov 19 00:07:36 2010 -0500 Windows: conditionally set tray icon state If the checkbox IDC_TRAYICON is not present in the dialog, do not attempt to use its value as a setting for Config_SetTrayIconFlag(). FIXES 128591 Change-Id: Iff5ef4993f082e73cca93e79d17f49cc15b6264f Reviewed-on: http://gerrit.openafs.org/3331 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/4207 commit 19d89b94811d93b8a755f7e602d757e7a5c89765 Author: Derrick Brashear Date: Fri Mar 11 08:27:24 2011 -0500 make openafs 1.6.0pre3 create version 1.6.0pre3 in the various bits we need it Change-Id: Ia5768d097b1f4fa0df911db6d9d094584405c4db Reviewed-on: http://gerrit.openafs.org/4205 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 943f463775516875b411a4a0b7a3e9673179051b Author: Chas Williams (CONTRACTOR) Date: Fri Mar 11 13:33:50 2011 -0500 solaris: fix typo in the solaris 11 startup script /etc/devlink.tab not /dev/devlink.tab Reviewed-on: http://gerrit.openafs.org/4206 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 7e68671f6acf66b568672d94b37ef456b1de8813) Change-Id: I88f9ae47fcbb2878cc099fe783c72c32cc0b4a92 Reviewed-on: http://gerrit.openafs.org/4208 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 205a787bdb459c3c7d8acf79c6b108120d3a9f0c Author: Andrew Deason Date: Tue Dec 7 10:50:31 2010 -0600 SOLARIS: Free vcache mappings on shutdown Right before shutdown, go through all of our vcaches and flush them, freeing any pages associated with the vcaches. If we don't do this, pages associated with our vcaches may still be around after we shutdown and the module is unloaded, causing a panic when the kernel tries to deference the page's vnode. Abstract out afs_freevfs() following the gafs_foo/afs_foo convention from the vnode ops, since we're calling this in two different places. Reviewed-on: http://gerrit.openafs.org/3472 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 592a33a4787db88993a7bf9d8f5ad8c11a576b56) Change-Id: I809d10d2eceb7d0db92b3d149b13de0dc9221958 Reviewed-on: http://gerrit.openafs.org/4194 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d83e8626db9c5dfca0402ab22796b02333503cc9 Author: Derrick Brashear Date: Thu Feb 17 00:04:06 2011 -0500 linux: defer vcache evictions when sleep would be needed because we're only willing to loop 100 times worth of "sleeps", on a machine with heavy vcache demands we can end up just growing the list huge. in the first pass, just clean up as many entries which do not require sleeping as needed. if we need more entries, make a second pass. Reviewed-on: http://gerrit.openafs.org/3971 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 3105c7ff0b4ae9c372dc4c1424f63b7f259dcda1) Change-Id: Iced11ca56ced5971ab0cb8dbb65d275754ec33d5 Reviewed-on: http://gerrit.openafs.org/4186 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b5f9a8c0aa4223d5decb8048fc97d317a494d846 Author: Jeffrey Altman Date: Wed Mar 9 07:51:02 2011 -0500 Windows: handle rx busy call channel Register an error code for rx busy call channel detection. Force a retry whenever CM_RX_BUSY_CALL_CHANNEL is received by cm_Analyze(). Log the event to both the internal trace log and the Windows Event Log along with the server address. Reviewed-on: http://gerrit.openafs.org/4183 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 75c2f96364d598ec0c134cb6b366ce067b8b7f49) Change-Id: I932c3d1fdb89f697347c0acc06dc628b3b6175da Reviewed-on: http://gerrit.openafs.org/4185 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ba00da1ea833172ab6f6b5c89b5b92c4b5d5f716 Author: Michael Meffie Date: Thu Mar 3 20:22:54 2011 -0500 rpm: fix ChangeLog filename in doc rpm Fix an rpmbuild error introduced in commit 8d157961. (cherry picked from commit 8f8522e457eb7703f85da3a193134c50bcd8b6cf) Change-Id: I69b402b1a31bfa1b5e5a14a3a86bc0d3fab7f842 Reviewed-on: http://gerrit.openafs.org/4184 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c0aa61b7914c724b192c78d67b3bc963be4dbcd5 Author: Andrew Deason Date: Mon Mar 7 11:08:26 2011 -0600 RX: Avoid timing out non-kernel busy channels When we encounter a "busy" call channel (indicated by receiving RX_PACKET_TYPE_BUSY packets), we can error out a call with RX_CALL_TIMEOUT to try and get the application code to retry the call. However, many RX applications are not aware of this, and will just fail with an error upon receiving a single busy packet. So instead, make this behavior optional, and only do it if the application tells us what specific error it expects to receive when a busy call channel is detected. Enable this behavior for the Unix cache manager, as it can cope with receiving an RX_CALL_TIMEOUT error in this scenario. Bump shlibafsrpc minor version to 5 instead of 3, so we don't collide with the shlibafsrpc versions on the master branch. Reviewed-on: http://gerrit.openafs.org/4159 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eddcee3ad518dff9fbfda790640c5bfd2e97ef5a) Change-Id: I38981ad3e3c2cbb03c516c02481a2f44cb5f9acf Reviewed-on: http://gerrit.openafs.org/4182 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3260065941c65434c9124fb51559b0519e77fa9b Author: Andrew Deason Date: Fri Feb 25 16:58:30 2011 -0600 vol: Check for blank vnode in VAllocVnode_r When we alloc a vnode in VAllocVnode_r, we look up that vnode in the vnode cache, to see if a vnode struct already exists for it. If it doesn't, we check the vnode index to ensure that the vnode actually is not in use (among other things). However, we do not perform the same check for a vnode already in the cache. Add this check, to make sure that we don't allocate an already-used vnode number, even if the bitmap is screwed up. Reviewed-on: http://gerrit.openafs.org/4060 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 974e95302a312c03cd735c0fdaa67fb02d254e26) Change-Id: Ie75dc32c2a2c1ff05a96a1a14650e41ada07609d Reviewed-on: http://gerrit.openafs.org/4170 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f90a3a5b19bb4a8da91f0cbbcb4957c2d8246bcf Author: Andrew Deason Date: Fri Feb 25 16:01:32 2011 -0600 DAFS: VnLock after VnWaitQuiescent in VAllocVnode In VAllocVnode, we write-lock the newly-allocated vnode. In DAFS, however, we need to VnWaitQuiescent_r before VnLock'ing, since VnLock in DAFS just sets the writer tid/pid. So, in VAllocVnode, move the VnLock call to after we wait for quiescence, so we don't stomp over the vnode when someone else has it write-locked. Reviewed-on: http://gerrit.openafs.org/4059 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit b41575d176c2d485d55aed8780bfab9db4b7587d) Change-Id: I6c3d68f0f5248308d0f32e9fad5c540aaf593962 Reviewed-on: http://gerrit.openafs.org/4169 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c7612a49e1db924a8b8b24319754834b130c9312 Author: Andrew Deason Date: Fri Feb 25 14:43:09 2011 -0600 DAFS: Wait for exclusive ops in VFreeBitMapEntry_r VAllocBitmapEntry_r puts the volume in an exclusive state and drops VOL_LOCK when traversing the volume bitmap and updating the bitmap. So, VFreeBitMapEntry_r must ensure the volume is not in an exclusive state, to make sure that VAllocBitmapEntry_r is not updating the bitmap at the same time. Do so, by waiting for the volume to come out of exclusive state at the beginning of VFreeBitMapEntry_r. Reviewed-on: http://gerrit.openafs.org/4058 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 08ffe3e81d875b58ae5fe4c5733845d5132913a0) Change-Id: I0336bbc543828237cb9ae97ede18133b4e15100a Reviewed-on: http://gerrit.openafs.org/4168 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0a8bfca218a10df6e83768996a050cff8b19f02f Author: Andrew Deason Date: Wed Mar 2 14:11:43 2011 -0600 vol-salvage: VOL_DONE deleted volumes When the salvager deletes a volume (because it is an invalid RO clone, or because there is no data associated with the volume), we should inform the fileserver that the volume is gone. Otherwise, the volume in the fileserver can get put into an error state (in DAFS) when it tries to attach the volume, preventing anything from creating or using that volume. Reviewed-on: http://gerrit.openafs.org/4118 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a862d2df93fd4e8c8c7a0b8eebe9e59b75f54072) Change-Id: I4ec62d4c6b06678af6e8e499e9dafb2d0698c9ab Reviewed-on: http://gerrit.openafs.org/4167 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit be51c660780f8f9c0aa5f037a29130548460b8e6 Author: Andrew Deason Date: Wed Mar 2 15:39:51 2011 -0600 DAFS: Clear salvage stats on VOL_DONE When we VOL_DONE a volume, the volume has been deleted, so the salvage stats/information are no longer relevant. Clear them out, so we don't think the volume is still salvaging. Reviewed-on: http://gerrit.openafs.org/4120 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 40049c56791f3488640ae65c5dc5c4d6503375bd) Change-Id: I1c7f61994b050de7bd8c0e7fc39df978a31530a6 Reviewed-on: http://gerrit.openafs.org/4166 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fd9b8a51d19a64798997835ce783cafab61e6b7f Author: Andrew Deason Date: Wed Mar 2 15:02:40 2011 -0600 DAFS: Allow LEAVE_OFF for DELETED volumes When a volume is VOL_STATE_DELETED, it effectively does not exist to other programs over FSSYNC. So, do not prevent someone from issuing a FSYNC_VOL_LEAVE_OFF for a VOL_STATE_DELETED volume. Reviewed-on: http://gerrit.openafs.org/4119 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit ddf5ae4f746f2b5e522e10cfcacb6225499e7956) Change-Id: I840930e144260036e2c96d83134a79dee3c9d083 Reviewed-on: http://gerrit.openafs.org/4165 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9cb10be35b6942111a1110f569c8c77191ddbd23 Author: Andrew Deason Date: Wed Mar 2 14:10:33 2011 -0600 vol-salvage: calloc volume summary structs Calloc volume summary structs instead of malloc'ing them, in vol-salvage.c. This way, new fields added to struct VolumeSummary will be known to be zeroed by default, without needing to update all of the allocating callers. Reviewed-on: http://gerrit.openafs.org/4117 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit bb25fc6418bac937b31476754a09199636c24211) Change-Id: I9533d4f841ebc64bdf49c145512471ebbb51136e Reviewed-on: http://gerrit.openafs.org/4164 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 80159e9312ed2249866159170cea568a2108250d Author: Andrew Deason Date: Wed Sep 29 11:48:44 2010 -0500 salvager: Do not break cbks when salvaging parts When salvaging whole partitions / whole servers, the fileserver is assumed to not be running. So only break callbacks if we are salvaging a single volume. If we are salvaging a whole partition, do not tell the fileserver to break callbacks on changed volumes, since the fileserver will not be around and we will just hang. Reviewed-on: http://gerrit.openafs.org/2865 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fabd590cc4b0142fe97c4ffa6a4669fe5d44c359) Change-Id: I62eaa14c95ecce3dcd5fdde97f3a45f9103fc7bc Reviewed-on: http://gerrit.openafs.org/4175 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 40514c256bfd60682d57eada6fb88f468095e672 Author: Andrew Deason Date: Thu Aug 19 11:35:40 2010 -0500 Windows: vol-salvage SalvInfo fixes Commit 3d7388b790ef21de552ec60d379764df067ae421 broke the windows build. Fix it: - SVGParms_t has no salvinfo member, but an svgp_salvinfo member - Correct the SalvageVolumeGroup prototype to match the actual implementation Reviewed-on: http://gerrit.openafs.org/2595 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 87dc2a312ac94bc0a8b809a8f879128be8d9c791) Change-Id: I8fd13e683060ae4ae4818a03626e95680cc3e86d Reviewed-on: http://gerrit.openafs.org/4176 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2232f501c879edb0354878223e69aa8c40e07344 Author: Andrew Deason Date: Thu Jun 24 15:45:05 2010 -0500 vol-salvage: Move global vars into SalvInfo struct Reduce the number of globals used in the salvager code, by making functions pass around a 'salvinfo' structure that contains the information regarding a particular salvage. Reviewed-on: http://gerrit.openafs.org/2250 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 3d7388b790ef21de552ec60d379764df067ae421) Change-Id: I15137994806f0c753a42347c28cadcf48002b800 Reviewed-on: http://gerrit.openafs.org/4163 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 25529a308e2c4b4fc51ef10c48648316f845a54b Author: Ryan C. Underwood Date: Sun Mar 6 10:40:53 2011 +0000 Fix positional I/O support for largefiles Commit 335ccb40 introduced positional I/O support for the fileserver, but didn't handle the largefile versions of preadv and pwritev. As a result, the fileserver cannot handle files of more than 2Gb in size. Fix this by using preadv64 and pwritev64 where O_LARGEFILE is defined, in the same way as for all other I/O primitives. Reviewed-by: Simon Wilkinson Reviewed-on: http://gerrit.openafs.org/4152 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit bbf406da30428a22b4a6d28a7d36dbb786013cfa) Change-Id: I5d15097e4c9aa83444520628f484407d244ddf97 Reviewed-on: http://gerrit.openafs.org/4161 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9b62a95e4d5182cca70c690fa810aa5d99a22049 Author: Simon Wilkinson Date: Sun Mar 6 16:06:36 2011 +0000 Disable vectored positional IO if no 64bit support In order to support vectored positional I/O, and large files, we need there to be an implementation of preadv64 and pwritev64. If this isn't present, then just disable HAVE_PIOV. (cherry picked from commit 98a0c2f47b8641e3e31ed7d2f7d84c2eb484ef51) Reviewed-on: http://gerrit.openafs.org/4153 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Change-Id: I4e199c748d7b88ff7076106b19c3dec0e60be39a Reviewed-on: http://gerrit.openafs.org/4160 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a48580971da0b26ccd3e1db5efc894bddcc5aa93 Author: Andrew Deason Date: Mon Feb 28 14:03:46 2011 -0600 Revert "LWP: remove ucontext header from preempt module" This reverts commit fbac809a46376fcf60d3dcedc0be962c43d9c74e. The ucontext header is only included in lwp.h for platforms that use ucontext as a means for context-switching in LWP. The preempt module needs the ucontext header for signal handling on some platforms (at least Solaris). So, ucontext.h may not be included by lwp.h on these platforms, if that platform does not use ucontext for LWP context-switching. So we need to explicitly include ucontext.h in preempt.c. Reviewed-on: http://gerrit.openafs.org/4095 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 2681c49ada5679922f949e9c7d0010f2ee705dab) Change-Id: Ie1858dc4e7dfc6e9db4a4f63deda8018645f9111 Reviewed-on: http://gerrit.openafs.org/4162 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 511fc5d4b50bce273c16acef7b551b8517a6bf46 Author: Simon Wilkinson Date: Sun Dec 26 14:54:43 2010 +0000 Don't trust # of entries from ListAttributes ListAttributes returns the number of entries in its array as an RPC argument. But, we can't trust this, as it could be manipulated and end up pointing past the end of the returned array (which is counted, so the entries argument is actually pointless). Add bounds checking to the functions which use this value to prevent this problem. (cherry picked from commit 8992210f27671673a89a541776aa105238ad14cf) Reviewed-on: http://gerrit.openafs.org/3597 Reviewed-by: Derrick Brashear Tested-by: BuildBot Change-Id: I318f2f956a48f10e91590ad9f28fab868d8ceb60 Reviewed-on: http://gerrit.openafs.org/4134 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 70938028cd1267aa604d8b983473403eec702a20 Author: Jeffrey Altman Date: Sat Mar 5 00:40:13 2011 -0500 Revert "Convert from using nvldbentry to uvldbentry" This reverts commit 4f1efdc8b73ed734197925766530d033c6f9794a. The conversion to uvldbentry produced too many negative side effects. Revisit support for multi-homed servers when vos is executed from a machine that can only see a random subset of the addresses assigned to the server in the future. (cherry picked from commit 9e539fbea456cdb416a487364d67ab54da1249a7) Reviewed-on: http://gerrit.openafs.org/4131 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: I9211d919e4584c1dac388155b6f4609f50fe603c Reviewed-on: http://gerrit.openafs.org/4133 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5006ed8e5748dbdca76064dc9520837bcd55fef3 Author: Jeffrey Altman Date: Fri Mar 4 23:40:31 2011 -0500 Revert "modify FindIndex to compare uuids" This reverts commit 9aad0979e9ff0601c249eb66a6ecfb3e76264702. This is being pulled as the entire nvldbentry to uvldbentry conversion is being reverted. Reviewed-on: http://gerrit.openafs.org/4130 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ca0ae15d621dbd90339408a26715a107d1f69f23) Change-Id: If97b81e874c87b10a4c4e5f190f573781fc3c158 Reviewed-on: http://gerrit.openafs.org/4132 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 689317fbd98e28b8f2b884fcb4ec52b62d927143 Author: Andrew Deason Date: Fri Mar 4 11:35:06 2011 -0600 viced: Set HWHO_INPROGRESS in CheckHost_r When we are probing a host in CheckHost_r, set the HWHO_INPROGRESS flag on the host, so other threads know that the host is locked while we are waiting for a probe response, and the h_threadquota mechanism can work correctly. Reviewed-on: http://gerrit.openafs.org/4126 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 64d52938ee26e160a6e2cd64253df096eb5d0c1e) Change-Id: I168fb4cf80106bcaf3f846df68ab5a98b65365ab Reviewed-on: http://gerrit.openafs.org/4127 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c7221c70b89735d8c19b1053818770a5e4d108e4 Author: Derrick Brashear Date: Tue Mar 1 16:43:10 2011 -0500 tweak uvldb-making function in order to properly simulate a uvldb, swap in the right fields, and mark it correctly. Reviewed-on: http://gerrit.openafs.org/4107 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 89ae0b12f20eea8a8b0a3fe493dc52d2def436ce) Change-Id: I0f0d0d2676d49eb33d7eadd3b7616e16e1e9002f Reviewed-on: http://gerrit.openafs.org/4113 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f38c9aeff78db6cebd654051aa1f9ba86f11a2fd Author: Derrick Brashear Date: Wed Mar 2 08:12:38 2011 -0500 rx: cancel growmtu event on resetcall attempt at fixing issue reported by Ryan Underwood. Reviewed-on: http://gerrit.openafs.org/4108 Reviewed-by: Andrew Deason Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7d516192bed12aa3137bcb86cbe0d8ecd492415c) Change-Id: Iae0d290a41d2df1482e399721469984732096bf4 Reviewed-on: http://gerrit.openafs.org/4112 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 34713abb800a0c30fd6a712df2f4c8d1aab197aa Author: Andrew Deason Date: Thu Jul 29 11:06:28 2010 -0500 fssync-debug: exec DAFS version if DAFS detected If the user requests something that differs depending on whether the server is DAFS or not, try to exec the DAFS-enabled fssync-debug (dafssync-debug) for them. Based on a conversation with Tom Keiser. Reviewed-on: http://gerrit.openafs.org/2480 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1466cd755ce3b48d312fb4404f494934840e586b) Change-Id: Id87ef70853212f41d2eabbf02bf67e216d9eb43d Reviewed-on: http://gerrit.openafs.org/4110 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f13e0b298e9515da3d4785c5b5e4ec8ff26fe51d Author: Andrew Deason Date: Wed Dec 22 00:02:45 2010 -0500 HPUX: Put __HP_CURSES back in We need __HP_CURSES to be defined in order to get the _maxx WINDOW* field among other things. Define it on HPUX again (it was taken out as part of 4a6a00d6f45bd0ac94e2eb05adee41552073643a). Reviewed-on: http://gerrit.openafs.org/3582 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1bc23299720fc57dfefbb588f1f3de0ec792e069) Change-Id: Iae7294b266446da8d8577ddf68449d3a12784316 Reviewed-on: http://gerrit.openafs.org/4092 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Andrew Deason commit 790f92d55000d320521999261141938244f3e825 Author: Derrick Brashear Date: Mon Feb 7 10:54:51 2011 -0500 fileserver: dropbox mode shouldn't allow readback from anonymous if you're writing files as anonymous, don't let them be read back. things which potentially need to page back in will just have to be authenticated, or lose. Reviewed-on: http://gerrit.openafs.org/3901 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 470a6d46175125bfe15bb267ee8f77d60132592a) Change-Id: Ia81a9871a2d38843d0ad2c61af06c8bbaaef3d81 Reviewed-on: http://gerrit.openafs.org/4091 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 739721df17243959468ffd89fc791aca5ca15c6a Author: Derrick Brashear Date: Mon Feb 14 00:20:40 2011 -0500 MacOS: aklog auth plugin the AuthorizationPlugin subsystem replaced the old loginplugin method. As it is now usable for us, provide a plugin which can take advantage of it. LICENSE BSD Reviewed-on: http://gerrit.openafs.org/3939 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c3499218ad604b1985239334d77dd0a94c7128bb) Change-Id: I8280d0f1c2ac6ffb93ddc42a5cc5234401a4fcbc Reviewed-on: http://gerrit.openafs.org/4090 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 566f4f198a2e1e7cc05502bec1db267965a5ccc6 Author: Andrew Deason Date: Mon Feb 21 12:39:48 2011 -0600 rx: Reset fd_set in LWP rxi_Sendmsg When we select() on the socket fd in rxi_Sendmsg, we do not reset the fd_set, and just use the same memory for any necessary subsequent select()s. However, if the select returned on EINTR, the fd_set may be cleared, and so we may try to select() on an empty fd_set forever. To be sure that we don't do that, reset the fd_set to the socket fd every time. Reviewed-on: http://gerrit.openafs.org/4028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 63fb786c541926dbf03a9452288c6a938c7cd6c4) Change-Id: I4d0cc939065c39ca2478006e05fae025921af5b8 Reviewed-on: http://gerrit.openafs.org/4089 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4a068778bd6f3b6d74e40091c124e1db985262c6 Author: Derrick Brashear Date: Wed Feb 16 12:18:58 2011 -0500 MacOS: don't install growlagent into prefpanes dir we have more than one tool now. don't misinstall into the prefpanes directory Reviewed-on: http://gerrit.openafs.org/3963 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit df7cca0fa8c5cbeca8cdb9f065e47f4c927dbbe3) Change-Id: I9046dd9dbd0536a65b694a9331a86651bd1eeabd Reviewed-on: http://gerrit.openafs.org/4088 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ddda954cab7678d5e655af52e49c7fea67e5f8ee Author: Andrew Deason Date: Thu Feb 17 14:33:07 2011 -0600 Document dropbox permissions Document the behavior and potential problems with granting 'il' rights to create dropboxes. Do this in the manpage for 'fs setacl' and chapter 4 of the User Guide. Reviewed-on: http://gerrit.openafs.org/3977 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9c7c6a2ca5c45367d1a8ed1710a4c99f8e3c5f6b) Change-Id: I9514087016a2946934d253a79ce0721ce1d8ea0f Reviewed-on: http://gerrit.openafs.org/4087 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2f2fe6fefb3f7bb0184958ee4d6aff3448b972c4 Author: Andrew Deason Date: Thu Feb 17 15:15:06 2011 -0600 afsd.fuse: Force internal mount dir to /afs Commit 1f1545dfb708b6f70065da58b44676b8eafef772 made it so the argument given to -mountdir sets the internal mount directory. However, afsd.fuse assumes that the mount dir is always /afs internally. So, use the uafs_setMountDir function to reset the internal mount dir to "/afs", so afsd.fuse can work with non-/afs mountpoints. Reviewed-on: http://gerrit.openafs.org/3979 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 18b24156f1dc0f727260724023eed583b460218b) Change-Id: Icc856771c82332ee6dcd25692da80c28d2effe99 Reviewed-on: http://gerrit.openafs.org/4086 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4fe833e4a777235034151f630644303779c8f517 Author: Andrew Deason Date: Thu Feb 17 15:14:41 2011 -0600 UKERNEL: Add uafs_setMountDir Replace the function uafs_mountWithDir with uafs_setMountDir, and adjust the one caller. This allows libuafs users to manually set the mount dir after e.g. the mount dir is set from afsd options. Reviewed-on: http://gerrit.openafs.org/3978 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 445548636f4d57aaa8e29912803e242f772959c7) Change-Id: I86607ac80f564950b544a9283794f842d0dadadb Reviewed-on: http://gerrit.openafs.org/4085 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 78c87a2a7e3fa5efd1cd9093a3d5f32bcd709d04 Author: Andrew Deason Date: Fri Jan 28 11:11:20 2011 -0600 libuafs: Allow -mountdir to override uafs_Setup For some reason, uafs_Setup accepts a parameter specifying the AFS mount point, and we effectively ignore any -mountdir option specified in the string arguments. Allow -mountdir to override the mount point specified in uafs_Setup, by changing afs_mountDir &co during afsd_mount_afs(). Reviewed-on: http://gerrit.openafs.org/3897 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 1f1545dfb708b6f70065da58b44676b8eafef772) Change-Id: Id57dea754bb8f2e45b3128afadb52aeea97c4f13 Reviewed-on: http://gerrit.openafs.org/4084 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9fe452316ed225a176ea63f41b34a6e15d6ed51a Author: Andrew Deason Date: Mon Feb 7 13:13:31 2011 -0600 viced: Enforce lwps limit for -L Previously, we only enforced the calculated lwp/thread maximum when the -p argument was specified. When -L was specified, we set lwps to 128, which can be over the max of (effectively) MAX_FILESERVER_THREAD-FILESERVER_HELPER_THREADS, depending on the value of MAX_FILESERVER_THREAD. Instead, enforce the lwps min/max after all code to set the lwps has run. Reviewed-on: http://gerrit.openafs.org/3903 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 9315c66f15fb0d178e1c322cf14c0d64eea46c65) Change-Id: Ia1fed73cc3f227b2bba2c1a66de86b67b58139ce Reviewed-on: http://gerrit.openafs.org/4083 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3aa9e9d9e1378098f1e81321e3369c524398caab Author: Derrick Brashear Date: Sat Feb 26 21:55:19 2011 -0500 arm darwin update some stuff that got lost from the last batch Change-Id: I13addcb4b1ff5b36830e190bcee70a504df98e46 Reviewed-on: http://gerrit.openafs.org/4064 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 4397159a1c84c890a4f2a84fa2282f0ab9b74154) Reviewed-on: http://gerrit.openafs.org/4065 commit 1285c5311438088865edae1d019ba6c61f162fe9 Author: Derrick Brashear Date: Sat Feb 26 21:51:50 2011 -0500 LWP: remove ucontext header from preempt module it's already included by header. don't include it again. Reviewed-on: http://gerrit.openafs.org/4076 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit fbac809a46376fcf60d3dcedc0be962c43d9c74e) Change-Id: I8f56d5cc90957285cfd765f791b584eb36062070 Reviewed-on: http://gerrit.openafs.org/4082 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e67e03f9f6152922d5fdd2efd8108a0766831fa5 Author: Derrick Brashear Date: Sat Feb 26 21:44:37 2011 -0500 avoid unneeded rebuilds due to component version if the component version file does not change, don't touch it and force a rebuild (cherry picked from commit 86f7ac2f57591cf72ae22f8d1267efcc8e0b6641) Change-Id: Ia6e7b3f10e7efdea3e46c4fb7634f6e28d624e58 Reviewed-on: http://gerrit.openafs.org/4081 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 153a44e4b76172e642320bad0585a6cc8a966273 Author: Derrick Brashear Date: Sat Feb 26 21:42:40 2011 -0500 generated mode: fix result don't leave build results which will interfere with the next phase around Reviewed-on: http://gerrit.openafs.org/4074 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e16d015a3eec3cf2fb79b27b39bd567bb4f07581) Change-Id: I3bd6270f1d33468e9893aaebd887b23a1eda4f07 Reviewed-on: http://gerrit.openafs.org/4080 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit cc4199637973d2eae32cbaf06ab8daf05ab871d1 Author: Andrew Deason Date: Wed Dec 22 09:46:48 2010 -0500 Prefer libHcurses over libcurses Use the HP-UX-specific libHcurses instead of libcurses, like we used to. Otherwise we fail to link some gtx programs. Reviewed-on: http://gerrit.openafs.org/3583 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry picked from commit 651f66b0ffed08da82b352e3e252a03b8b13c780) Change-Id: I6c3c7e219548c0694dc84d167535cacbbfbb1e02 Reviewed-on: http://gerrit.openafs.org/4079 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 65ddae68df10eae5884376be85185329c036ce9a Author: Christof Hanke Date: Sun Nov 21 23:01:53 2010 +0100 check curses-libs by configure Presently, the used curses-library are determined by OS. The leads to a build error when no curses-headers are installed. Use configure to test if curses.h or ncurses.h is present. ncurses takes precedence over curses.h. If neither the curses- nor ncurses-libs are available, do not build afsmonitor and scout. A summary at the end of the configure should make this clear to everyone. The variable TXLIBS has been renamed to LIB_curses. (cherry picked from commit 4a6a00d6f45bd0ac94e2eb05adee41552073643a) Reviewed-on: http://gerrit.openafs.org/3345 Tested-by: BuildBot Reviewed-by: Derrick Brashear Change-Id: Iea866ca6dfe758d95ef890f0d95e1c38012048b4 Reviewed-on: http://gerrit.openafs.org/4078 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 41da26a9fdb9565565159daa46f923cc1d371a09 Author: Christof Hanke Date: Sun Nov 21 12:13:34 2010 +0100 remove unnecessary dependency fms in bu_utils is not using curses at all. Just remove the dependency from the Makfile Reviewed-on: http://gerrit.openafs.org/3342 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 01b9cee0d0d4a328b662c0138efcd8506126084c) Change-Id: Id1f046f9636632ba4323ee2b69f6270175c34c1b Reviewed-on: http://gerrit.openafs.org/4077 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8cbf8e5c5a4597c0be8861f37ab73d23f125399b Author: Andrew Deason Date: Thu Feb 17 11:57:53 2011 -0600 LINUX: Include key-related headers in osi_compat.h Include keyring-related headers in osi_compat.h, so we get the proper types defined for keyring-related functions. Also only define keyring-related functions if we have keyring support. Reviewed-on: http://gerrit.openafs.org/3895 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 358f2a23079f940e9adb741d2526895d620d1ced) Change-Id: Ice7b37feb23acef73d64d923243ee622db657b5d Reviewed-on: http://gerrit.openafs.org/4070 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b5bc969a564f33d68de0802c3f59c4e1df357eb3 Author: Anders Kaseorg Date: Tue Feb 22 18:18:17 2011 -0500 Linux: Reduce key_alloc flags confusion KEY_ALLOC_IN_QUOTA should be 0, not 1. Fortunately this was overridden by the earlier correct definition in osi_compat.h. Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4033 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit c576ca12b6618d2a121b29562aa70532b4cf65a9) Change-Id: If22e75b52792991f9eae5e27ef9b06dcfb73aae3 Reviewed-on: http://gerrit.openafs.org/4069 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 080d6caa26043b8ee5a8ff53672df3946f57454a Author: Anders Kaseorg Date: Tue Feb 22 19:18:30 2011 -0500 Linux: install_session_keyring: key_alloc flags are unsigned long Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4034 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 559152ac107f91c8c2f11a909ef638551227b04a) Change-Id: I33e909b7ec04a8d7df3b61bd16e1c8e820c38826 Reviewed-on: http://gerrit.openafs.org/4068 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit adf5ea13347aee4227e1253a5fcb68d9a3dcfacd Author: Simon Wilkinson Date: Sat Sep 11 12:43:35 2010 +0100 Linux: Move keyring includes where they're needed We don't need the keyring headers in every file, so reduce namespace pollution by just including them in osi_groups.c, which is the only place that uses them. Reviewed-on: http://gerrit.openafs.org/2746 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 33ce7a9308c8a71fbfcea82a935e32521031f48d) Change-Id: Ia943179a23c856ef9d37d1774192389cfe38612a Reviewed-on: http://gerrit.openafs.org/4067 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit dfcdd4a0672d3ebd7dec1969bbcb746196b50d8b Author: Jeffrey Altman Date: Fri Feb 25 15:32:37 2011 +0000 man-pages: add generated vos*.pod to clean rule 9ec343cf4292e178fa1e4a9757232dc983ea9ba3 failed to add the newly generated vos_addsite.pod, vos_copy.pod, and vos_zap.pod to the clean rule. Change-Id: Ia3b7b6cc578d84f9ee8ee105992248cf535564c6 Reviewed-on: http://gerrit.openafs.org/4062 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5aebd8d5416f242a84676cac3874fbc71c3cef44 Author: Andrew Deason Date: Fri Feb 18 15:49:03 2011 -0600 LINUX: Replace dcache.h for fs.h in config tests When detecting if we have certain Linux kernel features, we only include dcache.h. On some kernel versions (at least 2.4.27), compilation fails if we include dcache.h directly (due to e.g. list_head not being defined), which causes false negatives in tests such as the test for dcache_lock. If we instead include fs.h, which includes dcache.h, the tests succeed when they should succeed. So, use fs.h instead of dcache.h. Reviewed-on: http://gerrit.openafs.org/3989 Tested-by: BuildBot Tested-by: Marc Dionne Reviewed-by: Marc Dionne Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 839b62ab414fde02e1a2093bc036c63c708d861d) Change-Id: Ia8ea701c81bad9dc293ecb2848bd971052743c81 Reviewed-on: http://gerrit.openafs.org/4025 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4d49ff6addf5cb1b878e707096b8ca9fd4ef621b Author: Ben Kaduk Date: Sat Feb 19 22:41:19 2011 -0500 FBSD: remove prtactive It is unused and has been removed by upstream. Since we don't particularly need it for older versions, remove it unconditionally. Reviewed-on: http://gerrit.openafs.org/4020 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0491b2846f81defe92e3fcf8bc4481637ec109b3) Change-Id: Ibd0c39d414552ec95eba09faa4f542acf898af3d Reviewed-on: http://gerrit.openafs.org/4023 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85791f53d7357b971d6f091038c8c4f39c50414d Author: Andrew Deason Date: Thu Feb 17 11:53:08 2011 -0600 LINUX: Fix osi_compat.h include guard Reviewed-on: http://gerrit.openafs.org/3973 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 7bbec1f86bbdbf351d36863dc5d971f61051b170) Change-Id: I8a0b1a6bc57cb06778d97ad738c04b03c3ba7876 Reviewed-on: http://gerrit.openafs.org/4015 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0022bdd945a465bb6fe2ff1c821ff267563a60ad Author: Antoine Verheijen Date: Wed Jan 19 15:57:25 2011 -0700 Move check for unspecified CFLAGS in configure.ac configure.ac provides a check to see if the user has specified CFLAGS and if not, it sets CFLAGS to a blank (not NULL) string so that the resultant configure script does not set '-g' and/or '-O2' by default. This check occurs after AC_USE_SYSTEM_EXTENSIONS in the configure.ac file. However, on at least some systems, such as OpenBSD, AC_USE_SYSTEM_EXTENSIONS expands to include the code that configure uses to set '-g -O2' so the check has no effect and '-g' or '-O2' can not be turned off. This patch moves the "CFLAGS specified" check so that it precedes the AC_USE_SYSTEM_EXTENSIONS directive, in which case everything works. Reviewed-on: http://gerrit.openafs.org/3688 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8b932375ecca3fefc1190a8d23d5c24ae538cfae) Change-Id: Iec860d1ec5f1208e27e2602f10a83791a3481987 Reviewed-on: http://gerrit.openafs.org/4014 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5d0955ae914857c0fa64c6311f19b734ae59e05d Author: Christof Hanke Date: Sat Dec 4 11:03:13 2010 +0100 Add .gitignore for tsm41 Just ignore some files created during the build. Reviewed-on: http://gerrit.openafs.org/3435 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 3c370ed1e58310cb0202a5d2c826ba6569da831c) Change-Id: I774254ebb7d0cd45f162c7b74df1f0b016d2f7be Reviewed-on: http://gerrit.openafs.org/4013 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1547e54fd6ca7475b11f1202e13c0a4cb7f2dfcc Author: Steve Simmons Date: Tue Aug 31 13:16:15 2010 -0400 More deprecations noted. Reviewed-on: http://gerrit.openafs.org/2633 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 3f69d7247cfbd809aeed1e4d943c2b21da035654) Change-Id: Id20ce6b254720f61aefec18addbb5032849f0b6f Reviewed-on: http://gerrit.openafs.org/4012 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit bffc0357227f6bd3a2d2652eb74a5cff0836a7a0 Author: Steve Simmons Date: Tue Aug 31 19:21:50 2010 -0400 Update the man pages to discourage use of uss Usually the te