commit ba29e26c6b7e9d429b915f700c543af90fd6360a Author: Jeffrey Altman Date: Fri Nov 9 19:15:25 2012 -0500 Windows: Version 1.7.1900.0 Change-Id: I125e35dcedc6460b120c7377647d8ae09dd52215 Reviewed-on: http://gerrit.openafs.org/8425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9de934b193afbbace3f334702c2e84f41dc5bf9f Author: Jeffrey Altman Date: Fri Nov 9 19:14:39 2012 -0500 Windows: 1.7.1900 ChangeLog Change-Id: Ib4b1f91fd66a3a836cac9d15df6757bb524f6c8a Reviewed-on: http://gerrit.openafs.org/8424 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 113eb4093581c4df9258413e12af9b92af895f33 Author: Jeffrey Altman Date: Sat Feb 11 17:31:00 2012 -0500 Windows: default cell grand.central.org Change the default cell from openafs.org to grand.central.org since there is no openafs.org cell. All openafs software is distributed from the grand.central.org cell. (cherry picked from commit 0d515bb54a957c321cc152644a793c98b1b05c48) Change-Id: Iadae4d6015e8e54afe9a47ebd6882bf2e664f245 Reviewed-on: http://gerrit.openafs.org/6701 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0ce0fbc5f568799b011bbfc83084e457aab00ff9 Author: Jeffrey Altman Date: Thu Nov 8 13:26:36 2012 -0500 Windows: use hKUserMap to read afslogon username hkTemp is not the correct registry handle. Use hkUserMap Reviewed-on: http://gerrit.openafs.org/8412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 15670c1ae95182d98c6e874672ef7138e1949dfe) Change-Id: I4aaadf784bf3bc98f8c4594e161a68c8094a3823 Reviewed-on: http://gerrit.openafs.org/8419 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 69419b824658afafc2210c28f52f5463a38b51d6 Author: Jeffrey Altman Date: Thu Nov 8 12:20:30 2012 -0500 Windows: Prevent SMB unitialized variable access smb_ReceiveNTTranCreate would make use of 'fidp' before it was allocated. Reviewed-on: http://gerrit.openafs.org/8411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6f79eb36593a2b20e712cf7e828e987e12f8e99f) Change-Id: I94de9fed9ae08118b7f818445b7d98a175bc4056 Reviewed-on: http://gerrit.openafs.org/8418 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72f8e5f19efbaa5ee8f02e66628746a4f53f8217 Author: Jeffrey Altman Date: Thu Nov 8 11:29:20 2012 -0500 Windows: Treat invalid AFSFetchStatus as VBUSY Modify cm_Analyze() to accept an AFSFetchStatus parameter which when set is verified for validity. If the status info is invalid, then consider the response equivalent to VBUSY and attempt to query an alternate file server (if any.) Log the invalid status info to the Windows Application Event Log as a Warning. When cm_Analyze() is processing the response of an RPC that returns multiple AFSFetchStatus structures, pass in the one that corresponds with the source object. Reviewed-on: http://gerrit.openafs.org/8404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c01e552b857d0a472c79f60704906936cbb2eb19) Change-Id: Iac26228f91760bd7bb7c8cd4c9d0e9209c3d3d10 Reviewed-on: http://gerrit.openafs.org/8417 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 10c073d8914732383cfbb20a4c2687a846bad8c3 Author: Jeffrey Altman Date: Thu Nov 8 10:39:43 2012 -0500 Windows: cm_IsStatusValid Break out validity checking for AFSFetchStatus responses into a new function. Reviewed-on: http://gerrit.openafs.org/8403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d87a9adeb66f405441be35b12048012a527c122d) Change-Id: I75fc13abd5eb8f63fef7f0ead9c60a5594b9ead1 Reviewed-on: http://gerrit.openafs.org/8416 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 80365b9cce72e3d3785fbcef3e44716f852da8d5 Author: Jeffrey Altman Date: Thu Nov 8 00:24:14 2012 -0500 Windows: cm_MergeStatus now returns an error code cm_MergeStatus() can fail if the AFSFetchStatus InterfaceVersion field does not have the value 0x1 as that is the only version that is defined by the protocol. The return code will be CM_ERROR_INVAL. cm_MergeStatus() returns 0 on success. Update all of the call sites. Reviewed-on: http://gerrit.openafs.org/8402 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 45f0a9ba7f139749a969e73362194b380988116d) Change-Id: I392e01b34333cc3e5ad6767b6b8c18ecc699709e Reviewed-on: http://gerrit.openafs.org/8415 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51021ac306c7b3b355c64c978a029537e3341a25 Author: Jeffrey Altman Date: Thu Nov 8 15:48:18 2012 -0500 NetIdMgr: Krb4 is optional 32-bit builds should not require the krb4 library. Change-Id: Ie8fc92360843b073e3a91c9ae68e4417f579f22b Reviewed-on: http://gerrit.openafs.org/8414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3764cbfbc9f26738b5e6693e8729e79dbb0092c6 Author: Jeffrey Altman Date: Thu Nov 8 15:19:33 2012 -0500 Windows: Make krb4v32.dll and krb524.dll optional Permit afskfw.dll to be built with USE_KRB4 and USE_KRB524 without the requisite DLLs being available on the target machine. Change-Id: I2f83994123de9c3ae94b409dcde5a133fb256476 Reviewed-on: http://gerrit.openafs.org/8413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb15fcf09120cb0935d2b38695aa6cbfcae24df3 Author: Jeffrey Altman Date: Wed Nov 7 16:34:23 2012 -0500 Windows: RDR_CleanupFileEntry protect lock release Prevent lock release of scp->rw when not held. Reviewed-on: http://gerrit.openafs.org/8372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 30ee8b645ea28b8f4f4794b2620fef723d03de9d) Change-Id: I7519462daf8db02798224edda40c20ad7c87d867 Reviewed-on: http://gerrit.openafs.org/8400 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c63244e83fa0590a535646bbc782210f9d636ad6 Author: Jeffrey Altman Date: Tue Nov 6 06:39:39 2012 -0500 Windows: call MIDL_user_allocate instead of calloc In the RPC service routines do not call calloc() directly. All memory will be deallocated by a call to MIDL_user_free() so use MIDL_user_allocate() to perform the allocation. Modify MIDL_user_allocate() to call calloc() instead of malloc() to ensure that the memory is initialized to NUL bytes. Reviewed-on: http://gerrit.openafs.org/8365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8c7846f4e1dd89db4ff3b03c558d97cd13cbb205) Change-Id: I2689dce0ca19748d7656f7bfca5d1d119ca6b06e Reviewed-on: http://gerrit.openafs.org/8399 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e4e3326742f330f808aa6a85021b0e99e14db3ac Author: Jeffrey Altman Date: Tue Nov 6 06:38:14 2012 -0500 Windows: no more _wcsdup; use wcsdup _wcsdup is not mapped by roken.h. Use wcsdup which is. Reviewed-on: http://gerrit.openafs.org/8364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 40964dd39decf8b64d82090b5bb9ecac05901c07) Change-Id: If42035172c26dd7cc496c6907b7d7556a30aa90d Reviewed-on: http://gerrit.openafs.org/8398 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 16c68a7166df9aba5c24d8761da579f5673ce725 Author: Simon Wilkinson Date: Fri Oct 26 15:23:48 2012 +0100 rx: Refactor code to acknowledge a whole TX queue We acknowledge a whole transmit queue whenever an ACKALL packet is received, or whenever the call changes direction. As the same logic is used in both locations, pull it out into a common helper function. Reviewed-on: http://gerrit.openafs.org/8300 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 96d50fc0e1d8b709a86d76318c8a1801cbff12d7) Change-Id: I60e5b0404f5efbe6b2822aec44e5cbbad5543520 Reviewed-on: http://gerrit.openafs.org/8397 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 27acd671c85e1fc84a000c8c26c20284980ad7f5 Author: Simon Wilkinson Date: Fri Oct 26 14:55:02 2012 +0100 rx: Remove duplicate out of order ACK check Once we've moved the congestion window, there's no going back. So any ACK packets that attempt to move the window backwards by including a 'firstPacket' value earlier than the current window position must be ignored. However, we check (and ignore) these packets twice. Once in rxi_ReceivePacket, which only checks in the client side case, and again in rxi_ReceiveAckPacket, which has a more complete check that runs for both client and server connections. Remove the identical check from rxi_ReceivePacket in a continuing effort to clean up this bit of code. Reviewed-on: http://gerrit.openafs.org/8299 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 8d359e6dff5317698597e77f0a1dd5ba2bfb569a) Change-Id: I29c72136d02a16381e33d8836f35528ba7b1f055 Reviewed-on: http://gerrit.openafs.org/8396 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e648143cc546fdd8763d63ac8cbd78e2caa13a62 Author: Simon Wilkinson Date: Fri Oct 26 14:52:46 2012 +0100 rx: Remove duplicate security layer check rxi_FindConnection checks that the connection it returns has a security layer matching that of the incoming packet. Don't duplicate this check within the rxi_ReceivePacket code. Reviewed-on: http://gerrit.openafs.org/8298 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit daeb917110f6b358d505eef50088bbb4573a6130) Change-Id: I8bcd4b176cf0070f35108dd910382a2142a7b643 Reviewed-on: http://gerrit.openafs.org/8395 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 18caf3b254f99253710bc2011c052216af0202b6 Author: Simon Wilkinson Date: Fri Oct 26 14:50:51 2012 +0100 rx: Refactor rxi_ReceivePacket call selection Refactor the call selection logic in rxi_ReceivePacket so that it is a little bit easier to follow, and better optimised to the common case. Split the current logic into a function for packets being received by a server, and a function for packets being received by a client. Reviewed-on: http://gerrit.openafs.org/8297 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3c6570413c94afe4107634e9ca3f923f3cd30c21) Change-Id: I0ac84fe47398b92a24e6c34cd4f0036e7bb27fcb Reviewed-on: http://gerrit.openafs.org/8394 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a0637889b615320b4d10ffdab1e575165a6859d2 Author: Simon Wilkinson Date: Fri Oct 26 12:21:41 2012 +0100 rx: Don't build a call to immediately abort it If the server is over the busy threshold, then don't create a new call structure just to be able to send an abort on that call. Instead, use rx_SendRawAbort to send an abort packet on the appropriate channel. Reviewed-on: http://gerrit.openafs.org/8296 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a0ae8f514519b73ba7f7653bb78b9fc5b6e228f8) Change-Id: Id164497112a24b1ec303754b1324b0e76e3cb653 Reviewed-on: http://gerrit.openafs.org/8393 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f76fc875d79fb55a9735bba3bf0940d756f2039a Author: Simon Wilkinson Date: Thu Oct 25 13:34:33 2012 +0100 rx: Remove unreachable debug statement ReceivePacket has a dpf which is conditional on the packet having a zero callnumber. However, just before we reach this debug statement, we always return if the header doesn't have a call number included. So, the debug statement can never run. Just remove it, as it's potentially confusing. Reviewed-on: http://gerrit.openafs.org/8295 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 0c9e55639cc02d90e9fd108572bb5ee64db3ddcc) Change-Id: Idf15dba8889c8e0fe7e35e2b74a8e4b324e0805e Reviewed-on: http://gerrit.openafs.org/8392 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8ebaa49ca2c1ae72dba2d0ed7d9055111f15fd56 Author: Simon Wilkinson Date: Thu Oct 25 11:32:03 2012 +0100 rx: Don't have 2 different protos for rxi_CheckCall Use a single prototype for rxi_CheckCall in both the pthread and lwp cases. Remove the #ifdef maze at the call sites, and take advantage of the fact that MUTEX_EXIT reduces to an empty string in the lwp case. Reviewed-on: http://gerrit.openafs.org/8291 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9358e452a90c3d87f025a54e503da2b2d062dbef) Change-Id: I5128d720672e50dc78af7e0c9e93d6078e604485 Reviewed-on: http://gerrit.openafs.org/8391 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6af838e28f0cae3e37c4814c85ba3ab2de2efc87 Author: Simon Wilkinson Date: Thu Oct 25 11:27:33 2012 +0100 rx: Don't double check conn->call We currently have call = conn->call[channel] if (call) { ... } else { call = conn->call[channel] if (call) { ... } } As we don't drop (or acquire) any locks between the first and the second check of call, there's no way that the result can be different from the first time we checked. So just get rid of the uneccessary code, and reindent the following block to match. Reviewed-on: http://gerrit.openafs.org/8290 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e93b6dca2f593e479499122eedef1e65452aaaac) Change-Id: I5f3283a76945be92790baf58aafc32c501666b97 Reviewed-on: http://gerrit.openafs.org/8390 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 549194f1db2c69d4ab3f05363274335e1db88f22 Author: Simon Wilkinson Date: Thu Oct 11 12:34:46 2012 +0100 rx: Move server queue entry structure out of rx.h Hide the server queue management structure in its own header file, rather than exposing it globally in rx.h. This structure has always been private - applications have no business knowing about it! Reviewed-on: http://gerrit.openafs.org/8231 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit eca07c108cc61fc9a6da720848e1beb78833f670) Change-Id: Iaddcbadfca19f0a9b870ac24d5f707bd04e37e81 Reviewed-on: http://gerrit.openafs.org/8389 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c447b82be0fdf797a01b0f700ec3e9f43b3838b7 Author: Andrew Deason Date: Tue Sep 11 14:23:02 2012 -0500 rx: Skip rxi_CheckPeerDead if we are DALLY DALLY connections don't need to be marked dead, so just skip the whole function if we are DALLY. Reviewed-on: http://gerrit.openafs.org/8120 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a2877368045947ca28c29283ef03f1510d764d4d) Change-Id: Ib0d7103a100918db038703e5e71dead663e5b964 Reviewed-on: http://gerrit.openafs.org/8388 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b64f1e118740026f98fdbbcb8090e8b618848f28 Author: Andrew Deason Date: Tue Sep 11 13:59:21 2012 -0500 LINUX: Ignore 'offender' in error queue processing The 'offender' is who generated the error, possibly who sent us an icmp packet (the given 'port' will be 0). What we want is the peer that is actually unavailable, which is already in the 'addr' variable we received from the recvmsg itself. Reviewed-on: http://gerrit.openafs.org/8119 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4532e96bb96ab6424c7c00327c094f9b5b307f91) Change-Id: I9cb4302ed08f164637c3f62f7d5d19395fcd7884 Reviewed-on: http://gerrit.openafs.org/8387 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 04f583497aec3ccbbc12947321b8af2b5aef2bca Author: Andrew Deason Date: Tue Sep 11 12:48:14 2012 -0500 rx: Check for peer deadness in rxi_Resend If we need to resend something, the peer we're sending to may be dead. Check if the peer is dead in rxi_Resend, so we don't have to wait (possibly several seconds) for the next rxi_CheckCall. Reviewed-on: http://gerrit.openafs.org/8118 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 083ec556af66c755c93f821146e06423e27cfba9) Change-Id: I4085ed4a89ea7fc7509c938fe5f8e85aedbfebf8 Reviewed-on: http://gerrit.openafs.org/8386 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0bd2db504666736b11d67425734ea8f6af3e5e2b Author: Andrew Deason Date: Mon Sep 10 16:31:01 2012 -0500 rx: Process all errors received When we receive a buffer of errors from the error queue, loop through all of them, and do not stop at the first applicable one we find. Reviewed-on: http://gerrit.openafs.org/8116 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot (cherry picked from commit 0ac9fe184a323fef212c421b844a45838f4d6e57) Change-Id: Ie62e4e0ad8fe98c094e937b3808baa17c23473e6 Reviewed-on: http://gerrit.openafs.org/8385 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3c60cac6e2f7ca27a14f2816e4f2ed85520faaf0 Author: Derrick Brashear Date: Tue Oct 16 09:25:03 2012 -0400 linux: always define do_handlesocketerror even if we are not handling socket errors, have a stub function Reviewed-on: http://gerrit.openafs.org/8240 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c172d469dde64b5dfaf762c5ad52dfe842dffb02) Change-Id: Ied4748ba1dec38873adedf95b5b2c50c6c42f03a Reviewed-on: http://gerrit.openafs.org/8384 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4d699186b1d56a9367f30b925449ebc5e6d727d5 Author: Derrick Brashear Date: Wed Oct 17 18:52:41 2012 -0400 rx: pthread sendmsg should return success, not a bytecount thanks to Marc Dionne for noticing the error Reviewed-on: http://gerrit.openafs.org/8246 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit 37ef85d44a3275c1f367eaa6d241cd6d602a472b) Change-Id: I79527bc057abc586358ea8a6f9abbe5bb60096b7 Reviewed-on: http://gerrit.openafs.org/8383 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dd0cb5723f23b9ec6a0bc4729b2a948d811a87a7 Author: Andrew Deason Date: Fri Sep 7 17:04:18 2012 -0500 LINUX: Allocate error queue buffer once We call osi_HandleSocketError in a loop, so make sure we process all of the errors. We were allocating a buffer to process the errors in osi_HandleSocketError itself, but we can reuse the same buffer on subsequent invocations, to reduce allocation/free pressure if we need to call osi_HandleSocketError more than once. So, do that. Reviewed-on: http://gerrit.openafs.org/8115 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7c0484413d9928512b934ee92b2634444dd8ae58) Change-Id: Ib2d261ea5572b3faf399b56c30103af8e73c607c Reviewed-on: http://gerrit.openafs.org/8382 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 10c1ebd9f517a5bcd828bebbadb7a2a3c42d19a9 Author: Andrew Deason Date: Fri Sep 7 16:58:05 2012 -0500 rx: Process error queue after noticing errors If errors exist in the socket error queue, we will notice by a sendmsg or recvmsg returning an error. If we never get an error, we don't need to check the error queue. So, only call osi_HandleSocketError after such an error has been returned, so we can avoid unnecessarily checking the error queue when there are no errors. Reviewed-on: http://gerrit.openafs.org/8114 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson (cherry picked from commit cddd859d2a6a05a01c971c23dba0b43eceb6b93b) Change-Id: I3a714e61384096bc29df7c83a395d4c5bfacff17 Reviewed-on: http://gerrit.openafs.org/8381 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fa6ca956be907ca23b5ccb3aa022c5ae77057046 Author: Andrew Deason Date: Wed Aug 1 16:31:09 2012 -0400 LINUX: Fix error queue processing Receiving error queues in the Linux kernel is a little different from userspace. When we encounter a cmsg that is not CMSG_OK, we need to break out of the loop, and not just continue, since we can keep trying to process the same cmsg over and over. In addition, on successful return, the msg_control buffer has been modified to point to the next available buffer space, and msg_controllen contains how many bytes are remaining. So, we need to adjust the msg_control and msg_controllen values to get something more familiar. Reviewed-on: http://gerrit.openafs.org/7927 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 407cfd281eab375512881945999b7e13ba93936e) Change-Id: I4ae9ed0146fa8b2b47d5894236d2148ec02d6472 Reviewed-on: http://gerrit.openafs.org/8380 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit de8371a973a1bc3fa2b9b2e1a823bd8d9735df5c Author: Andrew Deason Date: Wed Aug 1 15:56:27 2012 -0400 LINUX: Avoid SO_ERROR for RXERRQ_ENV SO_ERROR is for receiving errors from some nonblocking operations; it has little relevance to our network operations. For Linux, use a similar structure as userspace error detection, instead of SO_ERROR. Reviewed-on: http://gerrit.openafs.org/7926 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d55df0ac8351b1518d2c3cde6e3938b98b3f21f7) Change-Id: Iaa4a2666dacb78b114db7b419d0783aae09f5f8a Reviewed-on: http://gerrit.openafs.org/8379 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2204939202248660c19b35ae740281563c7a35e1 Author: Andrew Deason Date: Mon Sep 24 13:03:34 2012 -0500 LINUX: Define printf/uprintf as variadic macros Instead of defining the string 'printf' itself, make printf (and uprintf) variadic macros. This avoids renaming printf to printk for things like '__attribute__((format(printf,X,Y)))'. Note that this is Linux-specific; compilers on other platforms may not support variadic macros. This avoids many warnings in the Linux kernel module build if we include Linux headers after AFS headers. Reviewed-on: http://gerrit.openafs.org/8150 Reviewed-by: Derrick Brashear Reviewed-by: Marc Dionne Tested-by: BuildBot (cherry picked from commit 179096d9b2c461f02236bbf670b46597ff2d4c3c) Change-Id: Ie8254f2ad3cdd3f51fd3e0bfa9e249fc5ad56fbe Reviewed-on: http://gerrit.openafs.org/8378 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 455285d4edf9e62f1008c90bd9f4a0df05885c51 Author: Jeffrey Altman Date: Fri Nov 2 13:50:44 2012 -0400 Windows: 1.7.1800.0 Version Number Change-Id: I106b298f7ebbec5a470b893f5bcc74142ca786b5 Reviewed-on: http://gerrit.openafs.org/8361 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 51daad12bbb0d6eeeb8b69117ffb2a441f7e6fd3 Author: Jeffrey Altman Date: Fri Nov 2 13:48:58 2012 -0400 Windows: 1.7.1800 ChangeLog Change-Id: If9f01bec9ede11b7ea02436096de44a7aea058b7 Reviewed-on: http://gerrit.openafs.org/8360 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 045d6a8230cc2d82030c035f285e77d2c16655b2 Author: Jeffrey Altman Date: Wed Oct 31 20:59:30 2012 -0400 Windows: Use MountRoot for Absolute Symlinks Replace the absolute symlink processing in AFSLocateName(). Implement AFSIsAbsoluteAFSName() to test whether or not the path is in fact an absolute /afs path by comparing the input string to the registry MountRoot value which specifies the case sensitive root path for all absolute symlinks stored in the AFS cell. If a symlink target path begins with a directory separator and is not an absolute afs path name, return an error. Construct the substitution string using the target path without the MountRoot prefix. Add functionality to AFSRedir.sys to read the MountRoot from the registry and pass it on to AFSRedirLib.sys. Reviewed-on: http://gerrit.openafs.org/8353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba718cba9285fc9f663b0fd15524bc5474cca893) Change-Id: I374885151f7186c509927a16fde0fcb493340881 Reviewed-on: http://gerrit.openafs.org/8359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ba51958148c1d6648d5d8d89b1371cd2709a2d31 Author: Jeffrey Altman Date: Wed Oct 31 12:04:50 2012 -0400 Windows: cm_ConnByServer increment under lock Incrementing the cm_conn.refCount must be performed while holding the cm_connLock in order to prevent cm_GCConnections() from seeing an in-use object as having a zero count. Reviewed-on: http://gerrit.openafs.org/8347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6580d64b5d8ef0ccce71b72783b33c9e6f75b9e8) Change-Id: I649d8421733eb600c99ac9bab7930f9e96a878b2 Reviewed-on: http://gerrit.openafs.org/8352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 58e507705c6db508ec75f59b7e8a2d478af53886 Author: Jeffrey Altman Date: Wed Oct 31 09:53:57 2012 -0400 Windows: cm_FindVolumeByName refactoring The cm_volume allocation within cm_FindVolumeByName() was racy. Given how locks were obtained and dropped it was possible for two threads to both determine that a cm_volume_t object needed to be allocated. It might even have been possible for two threads to attempt to allocate the same object. This refactoring ensures that if a volume cannot be found under a read lock that a second search is performed under the write lock in case the object had in fact been allocated during the transition. Once it is determined that an allocation is required, the cm_volumeLock is not dropped until the object has been built and inserted into the name hash table. This ensures that two threads cannot attempt to allocate a cm_volume object for the same volume group. InterlockedIncrement is used to manage the cm_data volume count. Reviewed-on: http://gerrit.openafs.org/8346 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b0283d5f17aafecf258479d6691682af3baaa0fd) Change-Id: Id007305b27bde907b1cebee7fdd57d985c968fd8 Reviewed-on: http://gerrit.openafs.org/8351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0ab8eb1880559b1e620aaa8d379e3d0b28859e3c Author: Jeffrey Altman Date: Wed Oct 31 09:52:23 2012 -0400 Windows: use cm_GetVolume / cm_PutVolume Instead of locally incrementing and decrementing the cm_volume refCount field use cm_GetVolume and cm_PutVolume. Doing so makes it easier to see if there is an imbalance. Reviewed-on: http://gerrit.openafs.org/8345 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d914034d4c5fd48fb89b1380da24984a520bae33) Change-Id: I2820461c66d4f73de7723fb98e4f4c4a5f632812 Reviewed-on: http://gerrit.openafs.org/8350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72bd572e1677cff23ece22d59a78082bbcfc22d8 Author: Jeffrey Altman Date: Wed Oct 31 09:50:34 2012 -0400 Windows: Interlocked ops for cell and scache allocation Replace foo++ with InterlockedIncrement for cm_data cell and scache counters which are used for allocating objects. Reviewed-on: http://gerrit.openafs.org/8344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2b798792fb56c5feda8e68dd433c82f43b1698aa) Change-Id: I3f27046d59882ba3ccfae8729b2fecaac7c2a1d1 Reviewed-on: http://gerrit.openafs.org/8349 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 215d3947efc9937a8fb6c8eae6fc5a9e0f1add32 Author: Jeffrey Altman Date: Tue Oct 30 21:54:20 2012 -0400 Windows: Do not flush dirty bufs to deleted FID If the FID is known to have been deleted, drop all dirty data returned from the redirector on the floor. Reviewed-on: http://gerrit.openafs.org/8343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aa3579b26503f42de50e7c58c56937a7fbf4d45f) Change-Id: I2ea9faf6954556de174848a965ef95830d605606 Reviewed-on: http://gerrit.openafs.org/8348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0565f0cd5c4e755a9751a55541ebd8e2a31c75f7 Author: Jeffrey Altman Date: Mon Oct 29 12:59:14 2012 -0400 Windows: Set Server Prefs recalc immediately When processing the set server preferences pioctl call cm_RankServer() to update the server preference value reported by "getserverprefs" in addition to cm_ChangeRankVolume() or cm_ChangeRankCellVLServer(). Reviewed-on: http://gerrit.openafs.org/8328 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7e8278e1447328bc57396803a1651cbb497198d0) Change-Id: I61ba7281debf0ffaecc6cd600e585e7bbbc0f115 Reviewed-on: http://gerrit.openafs.org/8331 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62035687e4eb8cd44eee2daff01e9f1af1be864f Author: Jeffrey Altman Date: Mon Oct 29 10:33:18 2012 -0400 Windows: mark server reference offline for VOFFLINE cm_Analyze() was not marking the cm_ServerRef_t reference to a volume instance as srv_offline in response to a VOFFLINE error. As a result the same volume instance is tried again and again. Reviewed-on: http://gerrit.openafs.org/8326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e59cf940ce1cb2ed72ccf05ce39f73019547d9b1) Change-Id: I546f607d964b8205de3bdf1510896b4140072242 Reviewed-on: http://gerrit.openafs.org/8330 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dda406780922c387d3e774045980362b90541a5f Author: Jeffrey Altman Date: Mon Oct 29 09:19:13 2012 -0400 Revert "Windows: Media Protected if create on RO volume" This reverts commit f3f282265a3d9e3c968fd06793e6d1a91337f443. Returning STATUS_MEDIA_WRITE_PROTECTED in preference to STATUS_OBJECT_NAME_COLLISION when the file results in silent failures by some applications (ie, Firefox.exe) when the first directory in the path below the share name is the root of a .readonly volume. FIXES 131416 Reviewed-on: http://gerrit.openafs.org/8325 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit c7061310b7865c635c382490703ff951c2f9af3f) Change-Id: I5b26ab98216d8039abdb369dc40633b4dca0d6dc Reviewed-on: http://gerrit.openafs.org/8329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3339ab5753d57bc0b79d0b89890548dd20876510 Author: Jeffrey Altman Date: Sat Oct 6 17:34:52 2012 -0400 Windows: Makefile dependencies Permit "afsrdr" and "extra" to be built without the rest of the tree by making them depend on "config". Reviewed-on: http://gerrit.openafs.org/8321 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c584b68213aef29f9df7fc104b584e8559b7d4fe) Change-Id: I7715afabfbfecd27117724bf4a35c5499675379a Reviewed-on: http://gerrit.openafs.org/8324 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6d36e02635460b07fa084b4b96bbff75936d33af Author: Jeffrey Altman Date: Mon Aug 6 12:19:26 2012 -0400 Windows: Send all \\AFS\PIPE to afsd_service Anytime there is a pipe service request, forward it to the afsd_service.exe and permit the service to manage the request. The prior implementation resulted in STATUS_FILE_NOT_FOUND errors being delivered when an unexpected service was requested. Reviewed-on: http://gerrit.openafs.org/8320 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e9e5978a4dc3738708f23d15a3e91cee1f34a5f2) Change-Id: If52ee90d9ab2e7a1e60bd46ffb3e98ba967366f3 Reviewed-on: http://gerrit.openafs.org/8323 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 67c8f4efb29f12c522af32028194e3c1957658ac Author: Jeffrey Altman Date: Wed Sep 26 01:51:37 2012 -0400 Windows: Treat EIO from file server as fatal error Return STATUS_DISK_OPERATION_FAILURE to caller when a file server fails an RPC with EIO. Previous behavior was to retry the request indefinitely. Reviewed-on: http://gerrit.openafs.org/8319 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit f7148418961e3083b895c0875b15060213921e4d) Change-Id: I0dcf27c11fd486af04149ee9f41241c86dab23cb Reviewed-on: http://gerrit.openafs.org/8322 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0a07d9eb44fa10864fdce21e710eb85ce1292742 Author: Jeffrey Altman Date: Fri Oct 19 11:26:21 2012 -0400 Windows: ObjectInfo RefCount 0 <-> 1 transitions When the reference count transitions from 0 <-> 1 ensure that the ObjectInfoLock is held exclusive to prevent the current thread from altering the state while another thread is holding the ObjectInfoLock shared in order to conditionally perform an action based upon the the reference count being zero. Reviewed-on: http://gerrit.openafs.org/8257 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5857dd36b2b129fd2cf187650723b896c24f5177) Change-Id: Iaeade8593bbdfaa1aa8f26cb369ec2dbdb338924 Reviewed-on: http://gerrit.openafs.org/8318 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9fef88d44f0378c0e21503118ac239137e6e8bdd Author: Jeffrey Altman Date: Thu Oct 25 18:42:11 2012 -0400 Windows: PrimaryVolumeWorker ObjectInfoLock deadlock Patchset eaad522651a81f20eac4966a55a731e0e59e39dd inadvertently introduced a deadlock with invalidation requests from the service. It is not safe to hold the ObjectInfoLock resource across calls to AFSCleanupFcb(). Instead of holding the lock obtain a reference to the ObjectInformationCB. Reviewed-on: http://gerrit.openafs.org/8308 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd7a16d5b09d963ded1fb4314632e9fb5d513b29) Change-Id: Ie8097257fba34b9703115d71f45899de82595f2f Reviewed-on: http://gerrit.openafs.org/8317 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b55c914f8841408934bf9ebb284220c2fb297496 Author: Jeffrey Altman Date: Thu Oct 25 14:33:29 2012 -0400 Windows: AFSCleanup re-organization Reorganize the activities of the AFSCleanup() for File FCBs so that the Fcb Resource can be dropped prior to issuing the cleanup request to the cache manager. The cache manager can block for a long period of time while flushing data and holding the Fcb resource blocks all subsequent CreateFile requests. Reviewed-on: http://gerrit.openafs.org/8307 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 08d446424873c2d46b00b6d4604766051e5ba837) Change-Id: I9668855b68bcab18d22ced414e0a1dbc391090b9 Reviewed-on: http://gerrit.openafs.org/8316 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6f1a72d1c2af2786463e6586b03a3ad85bd23245 Author: Jeffrey Altman Date: Thu Oct 25 14:31:14 2012 -0400 Windows: AFSCleanup Flush Data decision AFSCleanup() should instruct the cache manager to flush dirty data when the Context Control Block indicates that the handle being closed was opened for writing and was granted appropriate permissions. The decision to flush should not be dependent on the open handle count because the last handle might belong to an authentication group that does not have write permission. Reviewed-on: http://gerrit.openafs.org/8306 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3a996b58dea74be4748446c63b7d3c4c631b1881) Change-Id: I86ec89f3feb3e9e160cc53c2a5dda15eb29772f4 Reviewed-on: http://gerrit.openafs.org/8315 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bcb87d6281802778548f9f5b76ccbee6b5ea2ced Author: Jeffrey Altman Date: Thu Oct 25 14:12:42 2012 -0400 Windows: buf_DirtyBuffersExist return value buf_DirtyBuffersExist() should return 'found' not '0'. Reviewed-on: http://gerrit.openafs.org/8305 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ea2f25372cc09c958780990f6cb8d064c7e7a0e3) Change-Id: I1f5485917a78d588ec31034720ad73e74f9a2f7c Reviewed-on: http://gerrit.openafs.org/8314 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 643914b05b551ad93fdfd1cbbae2d8846460c52e Author: Jeffrey Altman Date: Mon Oct 22 20:40:21 2012 -0400 Windows: AFSMarkDirty() require ExtentsResource held Instead of dynamically testing if the ExtentsResource is held and if not acquire it within AFSMarkDirty(), simply require that it be held. AFSMarkDirty() is only called from one location. Reviewed-on: http://gerrit.openafs.org/8304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c33c678760e254e67037d62e38f6eedc139eaf6f) Change-Id: Id36b5bcf97fbb1db2aea79a49be8bd590328c778 Reviewed-on: http://gerrit.openafs.org/8313 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1963299e8b3a2a94cd9f733a2ecf69b6aea21628 Author: Jeffrey Altman Date: Mon Oct 22 20:34:59 2012 -0400 Windows: AFSFlushExtents QueuedFlushCount leak The FCB QueuedFlushCount was decremented in all code paths but only incremented if the AuthGroup acquisition succeeded. Increment the counter before the AuthGroup checks. Reviewed-on: http://gerrit.openafs.org/8303 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3c57bab34ee74b4951cf637537ff73d86986fd3e) Change-Id: I8035967a4c31a4ac848e9f6ec8a8be6163450d4e Reviewed-on: http://gerrit.openafs.org/8312 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a5f4f528569df90e53d46b440ebd5014241c0aae Author: Jeffrey Altman Date: Mon Oct 22 20:29:47 2012 -0400 Windows: RDRFunction remove DebugBreak DebugBreak hard coded into the source tree makes debugging other unrelated issues difficult if the code path being executed includes them. Remove them. Reviewed-on: http://gerrit.openafs.org/8302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 651cceabc3e5f939554e50437b9ed3181b6f7b1f) Change-Id: Icdf728cb1572e8c027be95e2efc3255aac435ac1 Reviewed-on: http://gerrit.openafs.org/8311 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4f377adb6797cbd86b62d382aa48e5c35c2a4196 Author: Jeffrey Altman Date: Fri Oct 19 09:33:18 2012 -0400 Windows: Promote DELETED from DirEntry to ObjInfo On deletion of the DirEntry in AFSDeleteDirEntry() set the AFS_OBJECT_FLAGS_DELETED flag on the ObjectInformation object if and only if the AFS_DIR_ENTRY_DELETED flag was set in the DirEntry. Setting the AFS_OBJECT_FLAGS_DELETED should not be conditional on the ObjectInformatION ReferenceCount being zero. Remove the test and set of AFS_OBJECT_FLAGS_DELETED from AFSClose() because that operation will already have been performed in the call to AFSDeleteDirEntry() if necessary. Reviewed-on: http://gerrit.openafs.org/8256 Reviewed-by: Derrick Brashear Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f869b6f8c11f859fad6e3649faf7e724e0bd1d6d) Change-Id: I9e93ca54ed8cd9a610b1f84d1a46887f9e90c5ea Reviewed-on: http://gerrit.openafs.org/8310 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 37d7920c31aa0ee2d432002c4235aff9877e9859 Author: Jeffrey Altman Date: Tue Oct 16 09:36:56 2012 -0400 Windows: Remove 'bAllocatedFcb' from AFSCreate.cpp All functions now call AFSInitFcb() and the ObjectInfo->Fcb == NULL test is performed internally. Therefore, it is not possible for the caller to track whether or not an Fcb was allocated. It is irrelevant. The Fcb will be cleaned up when the ObjectInfo is destroyed by the PrimaryVolumeWorker thread. Reviewed-on: http://gerrit.openafs.org/8242 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0b538f21bea758a92f2bd9f8d529e8889c4a9e63) Change-Id: I9d2e9a336d12bed2dc9498100827300c0b253a27 Reviewed-on: http://gerrit.openafs.org/8275 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 40234f2c51620fe302fde1df7a227db328e26555 Author: Jeffrey Altman Date: Sun Oct 7 23:41:32 2012 -0400 Windows: PrimaryvolumeWorker do not pause if busy fcb The AFSPrimaryVolumeWorkerThread should not unnecessarily block on the FCB Resource because such blockage could be the result of of waiiting for extents to be delivered from the service. The AFSPrimaryVolumeWorkerThread is the primary method by which extents are released back to the service. AFSCleanupFcb() is modified to return STATUS_RETRY if the Fcb resource cannot be obtained without blocking. The AFSPrimaryVolumeWorkerThread() does not call AFSCleanupFcb() with 'ForceFlush' parameter set to TRUE and remembers if STATUS_RETRY is returned. If any Fcb was busy, then the worker does not wait for the 5 second timer to fire. Reviewed-on: http://gerrit.openafs.org/8227 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2bfe3653e3eec99a1199392912a4136668406212) Change-Id: I54b18ec2e4598a4128f7437949d39a5a51b5957f Reviewed-on: http://gerrit.openafs.org/8274 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2f6b1a2321a6576c711fd317c9fbf859484afcc8 Author: Jeffrey Altman Date: Fri Oct 19 08:37:25 2012 -0400 Windows: avoid race set/clear ExtentsRequestComplete The FCB ExtentsRequestComplete KEVENT setting, clearing and testing was racy. Clear the event before issuing the request to the service and if the request fails, set it in case two threads issued requests for the same FCB in parallel and one fails and the other succeeds. We must ensure that a clear does not mask the event being set prior to the request thread returning. Reviewed-on: http://gerrit.openafs.org/8255 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dfcb68cdc82260f614b2efed2529dc7c559d1933) Change-Id: I4de873c060a59d6311e99703af6f846cb470eaf6 Reviewed-on: http://gerrit.openafs.org/8273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b9d9fa557cbfb567a816ef716994f981009a6095 Author: Jeffrey Altman Date: Thu Oct 18 09:56:12 2012 -0400 Windows: clear pending delete upon deletion During cleanup processing if the DELETE_PENDING flag is set the service will be told to delete the file when the handle count reaches 1. At that point the file will be deleted and the DELETED flag will be set on the object info object. The DELETE_PENDING flag was not being cleared which could lead to confusion. This patchset clears the flag after deletion. Reviewed-on: http://gerrit.openafs.org/8253 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman (cherry picked from commit 555412a03f18aff0d30401082ad2946a68bd7694) Change-Id: Ia05d02b749420647dd401c4e13fed23b25c46f2f Reviewed-on: http://gerrit.openafs.org/8272 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 68b92894ff144f014ee48b439a751dac05f36b1c Author: Jeffrey Altman Date: Sun Oct 7 10:23:19 2012 -0400 Windows: AFSInitFcb Check ObjectInfo->Fcb for NULL Now that AFSInitFcb is called under the ObjectInfoLock, it is once again safe to perform a test for ObjectInfo->Fcb != NULL and return immediately if an Fcb is already assigned. Reviewed-on: http://gerrit.openafs.org/8226 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 05fa1202fb63e32aff3c60d47286c8af232322fe) Change-Id: Ia743b62070404fc336a511c213592256df0028f6 Reviewed-on: http://gerrit.openafs.org/8271 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3e502c3bfdb4ab5e183368a079ed12095a3f2597 Author: Jeffrey Altman Date: Sun Oct 7 10:20:11 2012 -0400 Windows: Fix DV Raced Trace Message Parameters Data Versions are logged as HighPart:LowPart not QuadPart. Reviewed-on: http://gerrit.openafs.org/8225 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9eb4bcfced06554d08c0f95de54f2285f48de890) Change-Id: Ic8c687f8c6b48833f332e928adb2c65bb30bbcd1 Reviewed-on: http://gerrit.openafs.org/8270 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5df4cfff5bfe94698c486812551dc647c0104f5e Author: Jeffrey Altman Date: Fri Oct 5 11:36:45 2012 -0400 Windows: Protect ObjectRefCnts with ObjectInfoLock The ObjectInfoCB.ObjectReferenceCount is tested to determined when it is safe to remove an FCB from the ObjectInfoCB. The value must not be permitted to change while a removal is performed. Protect AFSRemoveFcb() calls with exclusive holds of the ObjectInfoCB.NonPagedInfo->ObjectInfoLock. New functions: AFSObjectInfoIncrement() AFSObjectInfoDecrement() perform all increments and decrements while holding the ObjectInfoLock in a Shared state. Reviewed-on: http://gerrit.openafs.org/8224 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eaad522651a81f20eac4966a55a731e0e59e39dd) Change-Id: I168e0cd748b68781300ef0b487d54b87779ec0c2 Reviewed-on: http://gerrit.openafs.org/8269 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0e200c7d905feaf2a49d01a94e15e4da70365b73 Author: Jeffrey Altman Date: Tue Oct 2 21:11:01 2012 -0400 Windows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb Do not call AFSRemoveFcb() on a directory entry whose Fcb has a non-zero use count. Reviewed-on: http://gerrit.openafs.org/8223 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cecd99abd3837ef820d78fb15e450c8688b0f39b) Change-Id: Ia93aaf621c53a9b917f62d873e00fb7d17177fac Reviewed-on: http://gerrit.openafs.org/8268 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fc273ed18996aa849d4e7c54bf1445fa2b3e60ea Author: Jeffrey Altman Date: Tue Oct 2 21:07:21 2012 -0400 Windows: Always AFSInitFcb and AFSRemoveFcb Instead of comparing ObjectInfo->Fcb to NULL and conditionally calling AFSInitFcb() or AFSRemoveFcb(), always call them and use InterlockedExchangePointer() as the test. Reviewed-on: http://gerrit.openafs.org/8221 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8827be708460eb1cbd58001d3247ed7bb160ebc8) Change-Id: Ia08f7483575d15caefdd28e031a76a26de7cca62 Reviewed-on: http://gerrit.openafs.org/8267 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c293e9a36c5db0ca6fb6bda97299b1726da5b30e Author: Jeffrey Altman Date: Sat Oct 6 17:36:25 2012 -0400 Windows: AFSRequestExtentsAsync and AFSDoExtentsMapRegion When calling AFSDoExtentsMapRegion() the FCB ExtentsResource must be held. AFSRequestExtentsAsync() failed to hold the ExtentsResource across the call. Reviewed-on: http://gerrit.openafs.org/8220 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 23c920066976ac5ede41dd799c84d97ff5174c4c) Change-Id: Iea2c0bd6dbb76d3563ef793e6145b97af50f442c Reviewed-on: http://gerrit.openafs.org/8266 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c21edb43020f7fee685df6c9502d1a0d83b10e2c Author: Jeffrey Altman Date: Tue Oct 16 09:08:37 2012 -0400 Windows: Remove Fcb.Specific.File.LazyWriterThread The LazyWriterThread should not be recorded in the FCB. It is possible for multiple lazy writes to occur on a file in parallel in separate threads. The value is not used for anything in any case. AFSCommonWrite() tests the LazyWriterThread value but only if 'bMapped' is FALSE. Since 'bMapped' is always TRUE, the comparison is never performed. Remove the test and the value. Reviewed-on: http://gerrit.openafs.org/8241 Tested-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f6ab5cc8bd216383b8584aa05a5516862b59ab70) Change-Id: I9acd8eb2c019e6205f84d410eeed60aaf688d790 Reviewed-on: http://gerrit.openafs.org/8265 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3d5332740a378f5b9a56808ed6da57cef9b756f0 Author: Jeffrey Altman Date: Sun Oct 14 15:46:06 2012 -0400 Windows: Add cm_SyncOp to cm_ReadMountPoint() Add a cm_SyncOp(CM_SCACHESYNC_FETCHDATA) call to cm_ReadMountPoint() to prevent multiple FetchData RPCs being issued for the same mount point at the same time. Reviewed-on: http://gerrit.openafs.org/8235 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fe28a0c5966ac50fa3bccf5d98db4a3532f1e4a4) Change-Id: Id60a557cc74e76f7f8dadb76495c9ec7b12a2ace Reviewed-on: http://gerrit.openafs.org/8264 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0ed72896d5e5b37c334351a337e9a4636d55104d Author: Jeffrey Altman Date: Tue Oct 2 21:09:35 2012 -0400 Windows: AFSInitFcb assign pFcb->ObjectInformation In AFSInitFcb() assign pFcb->ObjectInformation before the InterlockedExchangePointer call and not afterwards. Assigning it afterwards leaves a small race where the ObjectInformation value will be invalid. Reviewed-on: http://gerrit.openafs.org/8222 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7b1115d47019a9948c574ebad7b1323a30b16ab6) Change-Id: I9b0e4ab2ca0d59e2b5e5cf64e75859fda84b6ef2 Reviewed-on: http://gerrit.openafs.org/8263 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7490c3b486b1d17d5843b88cf525499fde852919 Author: Jeffrey Altman Date: Tue Oct 16 20:26:43 2012 -0400 Windows: OpenTargetDirectory AFSInitFcb Reparse Test In AFSOpenTargetDirectory the test to determine if AFSInitFcb allocated a FCB or returned an existing one (STATUS_REPARSE) was reversed. If AFSInitFcb was called and AFSOpenTargetDirectory eventually failed, an in use FCB would be freed. Reviewed-on: http://gerrit.openafs.org/8244 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7fd98901620cfb2f44f53b1d717834e39959c538) Change-Id: I74ca5e6ab0cd28dce97faf9c4bd2c57a7c7eae2f Reviewed-on: http://gerrit.openafs.org/8262 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1ebb1af737ed64350a74941316722d2dd99f67b2 Author: Jeffrey Altman Date: Fri Oct 5 11:40:44 2012 -0400 Windows: ObjectInformationCB indentation Fix indentation within ObjectInformationCB structure Reviewed-on: http://gerrit.openafs.org/8219 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae10a40c5c18a7e52fb11d95b28333e312ffffce) Change-Id: I9eb7728f470fd31ff31737cfb5e72ed803a3090a Reviewed-on: http://gerrit.openafs.org/8261 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 32a76e64b4dd30f7594372a03d45b144e09bdf21 Author: Jeffrey Altman Date: Sat Oct 6 01:40:47 2012 -0400 Windows: Do not call buf_ClearRDRFlag unlink/rmdir When processing unlink and remdir operations initiated by the SMB stack do not call buf_ClearRDRFlag. The redirector upon receiving the AFS_INVALIDATE_DELETE call will cancel outstanding extent operations, mark the FCB deleted, and tear down any held extents. Reviewed-on: http://gerrit.openafs.org/8218 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1335eefeffb70b0759015d39e6732ee075537982) Change-Id: I0710b6fa353c0a8e60965e19cc0b1d70a2e02d2e Reviewed-on: http://gerrit.openafs.org/8260 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6405991ce2b07adaa73d02ed4c960c75d4735ab3 Author: Jeffrey Altman Date: Fri Oct 5 20:16:35 2012 -0400 Windows: Correct alloc size SetFileExtents result AFSFileExtentCB objects not AFSSetFileExtentsCB objects. The latter are too large. Just wastes memory. Reviewed-on: http://gerrit.openafs.org/8217 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 816776215de17d5cf4e1f992ae27c7c1f5b5f43d) Change-Id: Ia60753e9899261a896f5a77cfdfa7db2f4fbd7d7 Reviewed-on: http://gerrit.openafs.org/8259 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 795d7d4297b9c86aa503830a40843833a8d18a29 Author: Jeffrey Altman Date: Thu Oct 4 22:07:40 2012 -0400 Windows: AFS_INVALIDATE_DELETE must cancel IO When processing an AFS_INVALIDATE_DELETE the redirector must cancel any outstanding extent requests on the file prior to tearing down the extents. This code path is triggered either when VNOVNODE is received from a file server or when an alternate cache manager interface (SMB) unlinks the file. Reviewed-on: http://gerrit.openafs.org/8206 Reviewed-by: Rod Widdowson Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c53220c179b06fdeb03879e8dc5e10f69bbe0a5f) Change-Id: Idb708a2033f0335d1d1293dc3c976b5c1e5dda51 Reviewed-on: http://gerrit.openafs.org/8258 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 024c09510208572b23889b6e5f1634b888d171ff Author: Jeffrey Altman Date: Mon Oct 1 12:03:49 2012 -0400 Windows: File Info Query Symlinks For Symlinks, always set the Reparse Point attribute and set the Directory attribute if the target is a directory. Do not return the file attributes of the target. Reviewed-on: http://gerrit.openafs.org/8171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 338014a231235fe25116b09c1e8978db2db1dbb3) Change-Id: I74d0ca1575624f46b9906f1dabc61ddff335db90 Reviewed-on: http://gerrit.openafs.org/8193 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4b9f6fc0a71b470f005725271d072cf3a0a3517a Author: Jeffrey Altman Date: Mon Oct 1 11:04:23 2012 -0400 Windows: Dir Enum behavior for Symlinks / MPs Comparisons of the behavior of cmd.exe, powershell.exe, and tcc.exe with regards to directory enumeration show that when Symlink file information is returned that the "reparse point" data should be reported along with whether or not the target is a directory. For mount points, the reparse point file information should always be returned and the type should always be directory. The target timestamps, file sizes, etc. should never be returned. Reviewed-on: http://gerrit.openafs.org/8170 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dd59f6f6114a436ae86b70cd0837e97eea18dde8) Change-Id: Ib37d60d47a313427a289603f3c6000400d881569 Reviewed-on: http://gerrit.openafs.org/8192 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 01df02d2b73940fd3fd088460fadfcb40f467853 Author: Jeffrey Altman Date: Wed Sep 26 22:03:03 2012 -0400 Windows: Move afsredir process type check The process type check in afsredir.sys was performed during the Process Creation callback which is processed in the context of the parent process which might not be the same type (32-bit or 64-bit) as the process being created. Reviewed-on: http://gerrit.openafs.org/8165 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 22d68eec6de654bdc6a8d5b005b86320a46ac8f0) Change-Id: I4f6e8bda3cd3676d5a4c63a85d84033285b93658 Reviewed-on: http://gerrit.openafs.org/8191 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62b37582e2e572a804950cf1835bfa1faeb8c901 Author: Jeffrey Altman Date: Tue Sep 25 13:01:53 2012 -0400 Windows: Fix memory leak SRXAFSCB_GetCellServ In commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb strdup() was replaced by xdr_alloc() and memcpy(). Unfortunately, the patch was wrong and the pointer to which the result of xdr_alloc() was assigned was overwritten with zero. Reviewed-on: http://gerrit.openafs.org/8162 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 137ea396dbbcf302bce8200e3da7d4693b464ca7) Change-Id: Ie54f6977dd5f3a83f7d60f45d5aee983da2a9305 Reviewed-on: http://gerrit.openafs.org/8190 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57971e6383c1fc5dc423ec5af28023f8cd0ad1f6 Author: Jeffrey Altman Date: Tue Sep 25 12:59:04 2012 -0400 Windows: duplicate ExtentsResource hold All callers to AFSDoExtentsMapRegion() hold the ExtentsResource so there is no need to obtain it again within the function. Instead add an ASSERT to confirm that the resource is held. Reviewed-on: http://gerrit.openafs.org/8161 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae8527269ca091d47a1232a0469921ba7c54f65b) Change-Id: I0e4ea681affb6af639f2043e18ca6f63f3dac3e7 Reviewed-on: http://gerrit.openafs.org/8189 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c6ccc42118ccabf8b65283b20030a9b0a96c0fba Author: Jeffrey Altman Date: Tue Sep 25 14:32:06 2012 -0400 Windows: make static RDR_ParseIoctlPath[Parent] The RDR_ParseIoctlPath and RDR_ParseIoctlPathParent functions are helper functions within RDRIoctl.cpp. Make them static and remove them from the header. Reviewed-on: http://gerrit.openafs.org/8160 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5c348e5a9f276b45e2351e4c1adf2bafd4659484) Change-Id: I63ff75ad572fe866181a521a3709f1049df9967e Reviewed-on: http://gerrit.openafs.org/8188 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2b094118b3f2a671d38cdc3a3179fe5806e3c6e7 Author: Jeffrey Altman Date: Tue Sep 25 14:31:11 2012 -0400 Windows: remove reqp param RDR_IoctlWrite/Read The RDR_IoctlWrite and RDR_IoctlRead functions no longer use the cm_req_t parameter so remove it. Reviewed-on: http://gerrit.openafs.org/8159 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1df112db3c06b6d16a027acbfe8739410630c66e) Change-Id: Ic79c3139d7b9fa72be911afcf17302970e604eff Reviewed-on: http://gerrit.openafs.org/8187 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 47fc2f5bb5e5ebf29aedafefbae7b326999685d4 Author: Jeffrey Altman Date: Tue Sep 25 14:18:39 2012 -0400 Windows: add cm_req_t to RDR_ioctl_t The cm_req_t structure flags store information related to the source of the request and whether the process is WOW64 or not. This information is required for proper pioctl processing. Add a cm_req_t structure to the RDR_ioctl_t structure and initialize it in RDR_SetupIoctl() which is called from RDR_PioctlOpen(). Reviewed-on: http://gerrit.openafs.org/8158 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 63ded5bc452bf6cdd10db4d9e1befb9a71fad539) Change-Id: I0deab7d9c408c9fe429b07ba231b30ae47ae0d7b Reviewed-on: http://gerrit.openafs.org/8186 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0821fe0d441966f6d3617a04d82adc0613339e48 Author: Jeffrey Altman Date: Tue Sep 25 14:16:10 2012 -0400 Windows: Add bWow64 param to RDR_InitReq Instead of using the pattern RDR_InitReq(&req); if (bWow64) req.flags |= CM_REQ_WOW64; add bWow64 as a parameter to RDR_InitReq(). Reviewed-on: http://gerrit.openafs.org/8157 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac97f8f5a6937398db7d1902ff6bab7adbc24f4a) Change-Id: Ibde72ff4ad8cbca3e6f44d51f72458cb820d6976 Reviewed-on: http://gerrit.openafs.org/8185 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa276c7ce84cef1a38088a380a1e40c9a1154a3b Author: Jeffrey Altman Date: Sun Sep 23 14:03:19 2012 -0400 Windows: cm_ExpandSysName for 64-bit processes on 64-bit Windows, only 32-bit processes have the WOW64 request type flag set. Reverse the conditional to permit proper evaluation of the 64-bit sysname list. Reviewed-on: http://gerrit.openafs.org/8147 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c2e4112ffe44bc5c638a79f88eab0377ec992784) Change-Id: I0017785bb792f6ee3aaa169e75e04a27ff0cacc2 Reviewed-on: http://gerrit.openafs.org/8184 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6359527c377de5987caafcc158dfc9201ed2257f Author: Marc Dionne Date: Fri Sep 21 20:08:58 2012 -0400 bozo: fix typo in help text Fix a typo for "interface" in the help text for bosserver. Reviewed-on: http://gerrit.openafs.org/8144 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jason Edgecombe Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Reviewed-by: Michael Meffie (cherry picked from commit 58c089e642198a210462b3bf508056b56667f879) Change-Id: Id0e85ec2e5c605487c879d0e144703c2b5709380 Reviewed-on: http://gerrit.openafs.org/8183 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e51ba115d6debaaa26e03c7de18d2601a6971d91 Author: Andrew Deason Date: Thu Aug 30 17:10:36 2012 -0500 rx: More afspag-specific objects For Linux, each object in the kernel module needs to be in only one module for KBUILD_MODNAME. For AFS_RXERRQ_ENV, we pull in some additional headers that require KBUILD_MODNAME in rx. So, just add a few more afspag-specific rx objects. Reviewed-on: http://gerrit.openafs.org/8113 Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear Tested-by: Andrew Deason (cherry picked from commit 1046bf7904dd323e1cd1c1788870052c315ec2a3) Change-Id: Ica8b9790a0961f0ccf49e0db82eb2e2e1f1e48e0 Reviewed-on: http://gerrit.openafs.org/8182 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 43dca051d66e4ce90c7d43dcddee230d2571ce26 Author: Andrew Deason Date: Thu Aug 30 16:36:48 2012 -0500 rx: Do not include linux/module.h This isn't available in userspace; we don't need it, so just don't include it at all. This was introduced in 9cd98379. I had thought it fixed a build failure, but I believe now I just made a mistake during build. Reviewed-on: http://gerrit.openafs.org/8112 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Tested-by: Derrick Brashear (cherry picked from commit 0e68488ec1a8420511095b389a7d820b9e115f11) Change-Id: Id2a5ba70eba7edbc20c338450826d8c8f771f84a Reviewed-on: http://gerrit.openafs.org/8181 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3191d23badfe1701a0c507ddbfa7bbee4d89425a Author: Andrew Deason Date: Tue Sep 11 18:46:42 2012 -0500 rx: Save errno in LWP rxi_Sendmsg Much of this code examines errno or WSAGetLastError to determine what to do. However, some other operations between the actual sendmsg call and code that examines errno may modify errno. So, save the value of errno to ensure errno reflects the actual error we got from sendmsg; this also slightly simplifies some of the logic. Reviewed-on: http://gerrit.openafs.org/8110 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 347908cd0031c558c266ec412aa49200ae2b3204) Change-Id: Ic422f8f53c13e63763c7762a4609f13cf99d78bb Reviewed-on: http://gerrit.openafs.org/8180 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 16fa5d6b78f043aecf3d6be60c8aae77c72f071e Author: Andrew Deason Date: Tue Sep 11 12:56:22 2012 -0500 rx: Split out rxi_NetSendError This logic is duplicated in a couple of places. Just extract it into its own little function for easier modification. Reviewed-on: http://gerrit.openafs.org/8109 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 27ee85123284b77004c757fec7cd6c9af3078e05) Change-Id: I2bb0ad0d17908bdcfa8e0792c8964aca82ffae7e Reviewed-on: http://gerrit.openafs.org/8179 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 50c859b4bd6332a4b6e3313b9744bafb121ca00d Author: Andrew Deason Date: Mon Sep 24 14:20:07 2012 -0500 doc: Fix Solaris 11 kernel module path For Solaris 11, the module goes in drv, not fs. Reviewed-on: http://gerrit.openafs.org/8152 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit a7278eb5620507cd70086582cf539b4024b46194) Change-Id: Ia5265a0a55237d356a43d18e0921c88e73f91f79 Reviewed-on: http://gerrit.openafs.org/8178 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4e97c4b4f81b7014e7091d193d979d6f29e1eecb Author: Michael Meffie Date: Fri Sep 21 15:58:29 2012 -0400 doc: solaris x86 kernel module path Add instructions for solaris x86 kernel module installation. Reviewed-on: http://gerrit.openafs.org/8143 Reviewed-by: Ken Dreyer Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 5ef5cf48f3d2ba52cf5ed428728215b5b5f8d0b2) Change-Id: Id75e008695ccbfaa861ae7df8414afd1dc2b6b07 Reviewed-on: http://gerrit.openafs.org/8177 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b04769604ff01089ce7be43d523da197dd7fd177 Author: Chas Williams (CONTRACTOR) Date: Sun Sep 23 19:02:19 2012 -0400 doc: fix kindle builds of documentation Use kindlegen located by the configure stage and test for kindlegen and dbtoepub before building in all cases. Reviewed-on: http://gerrit.openafs.org/8148 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Ken Dreyer (cherry picked from commit fe72b581d7c0a5285f109109ae7ed703f1d62b6f) Change-Id: Ib7483fe0ce2813fbeeff0d001e374d7f0e0777c6 Reviewed-on: http://gerrit.openafs.org/8176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c745f6626e1cdd875a651563d1aee41bcde0058 Author: Andrew Deason Date: Thu Aug 2 15:02:09 2012 -0400 doc: Add quotes to bos create in DAFS QSG section In appendix C in the QSG, we give an example 'bos create'. The given -cmd arguments should have quotes, or they will be interpreted as individual arguments to 'bos create'. Reviewed-on: http://gerrit.openafs.org/7930 Tested-by: BuildBot Reviewed-by: Ken Dreyer (cherry picked from commit 112348b4a5721a2c0585669160b7ec7d1689eb30) Change-Id: I14f1366af94232c29016d689aecc68ef19feb52d Reviewed-on: http://gerrit.openafs.org/8175 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ccc8dba20d5720252d5c2764ed3fff855e61f20f Author: Ken Dreyer Date: Thu Sep 6 12:24:25 2012 -0600 doc: fix examples of direct volume access Fix the Unix examples to use ":volume" instead of "#volume", and add a couple more examples. Reviewed-on: http://gerrit.openafs.org/8052 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ed0624c32e671f8ae391a61ff8b870ecde740216) Change-Id: I143a1343f3f68ab8713ca59a7e230b35f00a83b5 Reviewed-on: http://gerrit.openafs.org/8174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ff501befc70225458925da15ed6285a1576780ac Author: Jeffrey Altman Date: Wed Aug 15 13:29:33 2012 -0400 Windows: 1.7.1700.0 version update Change-Id: I4a1778aa65f40ab820b0059a8304468eab651216 Reviewed-on: http://gerrit.openafs.org/7998 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e3253bd3df159e5f8c61a6b3e89bce0b14b26ba8 Author: Jeffrey Altman Date: Wed Aug 15 13:28:43 2012 -0400 Windows: 1.7.17 ChangeLog Change-Id: I1c152e2b57d3f585ca63ab659072cfcf15f19841 Reviewed-on: http://gerrit.openafs.org/7997 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e19dd1f704b40eb66bd98c42f33767dcf260df6e Author: Jeffrey Altman Date: Wed Aug 15 00:53:21 2012 -0400 Windows: disable short names on Win7 and 2008 R2 After listening to a presentation from Microsoft's file system team and speaking with anti-virus vendors, it is not only safe to disable ShortNames on non-boot volumes in Win7 and 2008 R2 but it is a definite win for performance, stability and security of the system. Reviewed-on: http://gerrit.openafs.org/7989 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6e2dd6e65cae4157538c29fb4362da4d15406b0e) Change-Id: Ia8d2977949855624e8c7e65a04f3e952a87868b5 Reviewed-on: http://gerrit.openafs.org/7991 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5d0faa27db6affab9278c539f8cab777a42c6fc7 Author: Jeffrey Altman Date: Mon Aug 13 17:56:02 2012 -0400 Windows: AFSProcessUserFsRequest NULL dereference Protect against an Irp with a NULL FsContext2 field. These represent Irps that are not intended for our device since they do not have an AFSCcb associated with it. Reviewed-on: http://gerrit.openafs.org/7971 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit aaa1844b8f806513661d16c6429d4d1b890471f2) Change-Id: If4478d92011709840e8f4a5ba8b31db0480f5c89 Reviewed-on: http://gerrit.openafs.org/7973 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ad9fd2d434c8624f68df3ede59ac174a7ff0e615 Author: Jeffrey Altman Date: Sun Aug 12 22:51:54 2012 -0400 Windows: reset volume NOEXIST flag In response to fs checkvolumes the NOEXIST flag should be reset. It should also be reset if the volume location update fails because of a commumicaton (or other) error with the VLDB server. The volume's lastUpdateTime is refreshed on error. Reviewed-on: http://gerrit.openafs.org/7969 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 165c9e7465378f26db546c5f78fc4eeca0ba094a) Change-Id: I5f7f72221b60d8cef559fce9c469cf1640b6d168 Reviewed-on: http://gerrit.openafs.org/7972 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 89d99ddc17d518f03ccdbd2c6cf1bd17dd55886b Author: Jeffrey Altman Date: Thu Aug 2 21:13:45 2012 -0700 Windows: sdk install missing headers Reviewed-on: http://gerrit.openafs.org/7933 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69fd66abe7465e605c4b1460298514c3638c7864) Change-Id: Ib8eb3232777c1b0f0ffb9c07df5764213ef0b34d Reviewed-on: http://gerrit.openafs.org/7968 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 96d0711af2f31878d46afab834f9e59b2cabc51c Author: Jeffrey Altman Date: Thu Aug 2 21:12:25 2012 -0700 Windows: remove sdk sample token.c The sdk sample is no longer applicable. Reviewed-on: http://gerrit.openafs.org/7932 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5a707645b7d14f37f3d7fd8d06685f3940631a44) Change-Id: Ifa4f6f679a547f5be2dfb7e537157001b3a6d5cb Reviewed-on: http://gerrit.openafs.org/7967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 48ed9bdfc44b1239fd009e5d42bd489954fbeee9 Author: Jeffrey Altman Date: Fri Aug 10 18:04:49 2012 -0400 Windows: document command prompt lnk limitation Command Prompt shortcuts cannot be used when stored in AFS. Reviewed-on: http://gerrit.openafs.org/7955 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b10a0af8b3a88c4170403679b9c179258a225abe) Change-Id: I3e82c64877329600501d106bb8c49b64894fed71 Reviewed-on: http://gerrit.openafs.org/7966 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 68deb6e90be8f969221a2fb5d904900382963c33 Author: Jeffrey Altman Date: Wed Aug 8 16:42:47 2012 -0400 Windows: Freelance Discovery configuration Add new "FreelanceDiscovery" configuration option to permit Freelance dynroot mode to be used without the automatic discovery of cells and generation of mount points. Reviewed-on: http://gerrit.openafs.org/7950 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ecb3568210777fab98c51811aecaa1d2a085bc0b) Change-Id: Ica7c7ebe11c679ac2452edb70507937d3a661188 Reviewed-on: http://gerrit.openafs.org/7965 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7a90c5559f80fc8db9dac4cc3dabf6fb919c65a0 Author: Jeffrey Altman Date: Wed Aug 8 13:54:48 2012 -0400 Windows: disable short names on Windows 8 Add "ShortNames" option to control whether 8.3 compatible short names are generated for objects stored in AFS. Set the default to on for all operating systems prior to Windows 8 and Server 2012. Reviewed-on: http://gerrit.openafs.org/7949 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b48d45006cdfe1734935f54277c0bc27459a404e) Change-Id: I07baa91b4b6818d58a6b44da60740683e65f4dd9 Reviewed-on: http://gerrit.openafs.org/7964 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1f8ea11565e8c6eb61fd4545b6367684c9314b2f Author: Peter Scott Date: Tue Aug 7 09:07:41 2012 -0400 Windows: FileNormalizedNameInformation take one Add a response to FileNormalizedNameInformation requests. Respond with the long file name. As yet there is no translation from short name to long name for full paths. Reviewed-on: http://gerrit.openafs.org/7948 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1d2a050e99e1feb9a5cee9956b48eb56bd9ad95d) Change-Id: Ia7ddc4f75dfabee4727567a44f1666a307c1d9d9 Reviewed-on: http://gerrit.openafs.org/7963 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a21e01d0cdec473b0006668ab1cda94e5f09ced2 Author: Peter Scott Date: Mon Aug 6 15:15:57 2012 -0400 Windows: FSCTL_SET_PURGE_FAILURE_MODE Windows 8 adds FSCTL_SET_PURGE_FAILURE_MODE. Failure to respond with success prevents anti-virus filters from scanning the file system. For now just return success. Reviewed-on: http://gerrit.openafs.org/7947 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0af079f2d03d1b76bd4221cb56b27091b5635fd0) Change-Id: Iec6275be71305d82d0d6710754b3336abcb4e2b6 Reviewed-on: http://gerrit.openafs.org/7962 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c2137ae92aecf0a873b9d26ed23db20b22199af Author: Peter Scott Date: Mon Aug 6 15:12:12 2012 -0400 Windows: disable short names in redirector option If requested during redirector initialization, disable short name processing. Future versions of Windows (8, Server 2012, and beyond) will no longer require short names. Reviewed-on: http://gerrit.openafs.org/7946 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 831763ce6633d5377f5476651a8685f0673751de) Change-Id: I2b9963336a5dc82028e70cf9ea8fb98bc945f0cc Reviewed-on: http://gerrit.openafs.org/7961 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5cae938851c383cedf8b340ba8869db22cdd47e4 Author: Peter Scott Date: Mon Aug 6 12:59:35 2012 -0400 Windows: Consolidate Device Flags Move Device Flags to common/AFSRedirCommonDefines.h Reviewed-on: http://gerrit.openafs.org/7945 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d8e9d2f2bc0f95642836bca2d66bb09379884142) Change-Id: I2d748c50261230506f80120ec50dc08b5a54d664 Reviewed-on: http://gerrit.openafs.org/7960 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fe6553e8187703670fc1a41c426f2467e2aa6117 Author: Andrew Deason Date: Thu Aug 2 11:58:12 2012 -0400 rx: Process ICMP unreachable errors When a machine receives ICMP errors, we can detect them in AFS_RXERRQ_ENV environments. Many of these errors indicate that a machine is not reachable, so we are guaranteed to not get a response from them. When we get such an error for a particular peer, mark all relevant calls with an RX_CALL_DEAD error, since we know we won't get a response from them. This allows some calls to dead/unreachable hosts to fail much more quickly. Do not immediately kill new calls, since obviously the host may have come back up since then (or the routing/firewall/etc was fixed), but only calls that were started before the current error was received. Note that a call doesn't actually notice until the next rxi_CheckCall, since directly killing each of the relevant calls would be rather slow. So, we don't notice a dead peer immediately, though we notice much more quickly than we used to. Reorganize the error queue processing a little bit to make this easier to do. Reviewed-on: http://gerrit.openafs.org/7929 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 9cd983799e622c9acf5dd6e0b9ae3a3a75eaa8ce) Change-Id: Ica0a79e9b23b235f9a098bdf5043508f4c6a5411 Reviewed-on: http://gerrit.openafs.org/7959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f77c7a778b7c6071b762978e9daa284a7ecc6c27 Author: Andrew Deason Date: Wed Aug 1 15:19:02 2012 -0400 rx: Create AFS_ADAPT_PMTU and AFS_RXERRQ_ENV Currently we have the ADAPT_PMTU define, which turns on functionality in Linux to detect PMTU-related ICMP errors for Rx. However, this is really turning on two separate pieces of functionality: the PMTU processing, and the processing for ICMP errors in general. So split this out into two defines: AFS_ADAPT_PMTU, and AFS_RXERRQ_ENV. The former is for processing PMTU discovery, and the latter is for processing ICMP errors. Both of these are left disabled due to issues in the error processing. Although PMTU discovery is the only functionality which makes use of ICMP errors, this will change in the future. Reviewed-on: http://gerrit.openafs.org/7925 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 403f72ec7620c8c5d39d860edd7d8e775e2776e6) Change-Id: I86a6809b9b5590208a4bed139efc6753e538ca5a Reviewed-on: http://gerrit.openafs.org/7958 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f0c99bbf2839a471e841ef695e93af60a8ecc940 Author: Andrew Deason Date: Wed Aug 1 15:11:48 2012 -0400 rx: Formatting fixes Some minor fixes to preprocessor indentation and other minor formatting things in rx.c and rx_user.c. Reviewed-on: http://gerrit.openafs.org/7923 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 3cf4c1fbad712984074a916897b77841c3e24752) Change-Id: I248b0add753c55e8aa0b2adf06a5b29c3e132103 Reviewed-on: http://gerrit.openafs.org/7957 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 67dee100e51abf63424a0aaf030f3a73bf6e8a52 Author: Andrew Deason Date: Wed Aug 1 14:57:06 2012 -0400 rx: Remove ADAPT_MTU and MISCMTU Ever since 5bcf626ddaf92e199c4b46c11ad276013a47db52, ADAPT_MTU has been unconditionally defined. MISCMTU has always been unconditionally defined, and not used anywhere. Remove both of these, assuming they are always defined. Note that ADAPT_MTU != ADAPT_PMTU. Reviewed-on: http://gerrit.openafs.org/7922 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a3759e0af8717f478a32420b8c8d125fae15cd25) Change-Id: I08ec5d3845bfb021b479105ec218c503d04dd1a0 Reviewed-on: http://gerrit.openafs.org/7956 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c4f957b214e9ae77b399a5b55016819176cc3614 Author: Jeffrey Altman Date: Mon Jul 30 19:02:55 2012 -0400 Windows: 1.7.1600 (aka 1.7.16) Change-Id: Ia02778bc1f79c480ea0b0a66f6f1b87f16689193 Reviewed-on: http://gerrit.openafs.org/7910 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 25a2b06b96178b8866a616ce43fb3850a8cecbc3 Author: Jeffrey Altman Date: Mon Jul 30 19:01:13 2012 -0400 Windows: 1.7.1600 ChangeLog Change-Id: Iff5c4044a2f383fa24850d81088f064f01050b8f Reviewed-on: http://gerrit.openafs.org/7909 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 27d8898e9cb931c7489129f724cf67ef58121076 Author: Simon Wilkinson Date: Sun Jul 29 15:14:11 2012 -0400 Windows: Rename cm_btree struct data Rename the "struct data" in cm_btree.h to something less generic in order to avoid conflicts with other code. Reviewed-on: http://gerrit.openafs.org/7898 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 8c01141ccaa538b182ee79ec2d8ed5ec12b58f11) Change-Id: Iff8345e643c0d8d0608c9da7ef31c3cd6b5ccdf8 Reviewed-on: http://gerrit.openafs.org/7908 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8e2240f2f077554054bd4f4e22190773f800ce07 Author: Jeffrey Altman Date: Mon Jul 30 15:19:57 2012 -0400 doc: Windows Release Notes Integrated Logon Expand on support for integrated logon details. Explain the new capabilities for per-user configuration and name mapping. Reviewed-on: http://gerrit.openafs.org/7905 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 070e90a92175eb91b3709598859fabb0c843d0a9) Change-Id: I948b6b644687f4d8054d7f3f42ea2184919d7ff3 Reviewed-on: http://gerrit.openafs.org/7907 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 11ebd24c35363262eb9558f5a8867d47ae5e14b8 Author: Jeffrey Altman Date: Mon Jul 30 00:43:01 2012 -0400 doc: Remove USA vs International from AdminGuide OpenAFS does not have separate distributions for the United States and the rest of the world. Nor are there any restrictions on the capabilities of the Update Server. Reviewed-on: http://gerrit.openafs.org/7902 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit da9f42d044725ae128feffcfbeaab67b31aaab44) Change-Id: I98249c3ebb84ae4f4a73a502b0511d46dad8c849 Reviewed-on: http://gerrit.openafs.org/7906 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6c51a6c3e3ab322d5d920a469bf8cc71c08378e2 Author: Jeffrey Altman Date: Mon Jul 16 17:29:54 2012 -0400 rx: protect against ACKs with serial as prevPacket patchset 4e71409fe1305cde4b9b341247ba658d8d24f4d0 introduced a check in rxi_ReceiveAckPacket for out of order ack packets which relied upon the value of the previousPacket field. Unfortunately, some versions of RX store the previous packet's serial number in the field instead of previous packet's sequence number. Modify the check to only discard out of order ACKs if the previousPacket sequence number is within the valid window. Reviewed-on: http://gerrit.openafs.org/7785 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e02fd4d358f20bcf001f0486afe1750d4013dea3) Change-Id: I66cb544ff1e1b204fbd0be30b6d9813276d85e50 Reviewed-on: http://gerrit.openafs.org/7889 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 27a6e9c5bb4bdf59f5166ed262aba5fe95a6ae03 Author: Jeffrey Altman Date: Thu Jul 26 18:35:48 2012 -0400 rx: better rxi_FindRpcStat check for end of queue patchset 1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec tested for an empty queue but what is really required is a test for end of queue after the queue_Scan(). If the queue_Scan() completes at the end of the queue, in other words, pointing at the list head, then return NULL because no match was found. Reviewed-on: http://gerrit.openafs.org/7886 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 300dd717fa57df77175807cf7cf6be36cb1f9fef) Change-Id: Icc492c329314a359bff7396c278173a855490ae9 Reviewed-on: http://gerrit.openafs.org/7888 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c7ceff340724b2cbf7e7a8666bd82fd50fd9af65 Author: Jeffrey Altman Date: Wed Jul 25 01:55:27 2012 -0400 rx: protect against invalid params in rx_Copy*RPCStats Protect against: . rxi_Alloc() failure Reviewed-on: http://gerrit.openafs.org/7873 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ee2b9c2d3ee22dfbc8fd2eb2cc470ae853d4e19a) Change-Id: Iaf8e9f5d07508e97c71db7b6bb9695d82ab50684 Reviewed-on: http://gerrit.openafs.org/7887 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8d4ee792479ff8885ad5c8877c695e091f8a7eac Author: Jeffrey Altman Date: Tue Jul 24 13:56:02 2012 -0400 Windows: NPAddConnection3 debugging Define Add3FlagsToString() and use it when generating debug output from NPAddConnection3(). Reviewed-on: http://gerrit.openafs.org/7860 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5f60992bfe17b74526bf7d26c5e0df2a2d1c4833) Change-Id: I83d4a31d5ed2d676cdfdcb9dd375a5ff893a264f Reviewed-on: http://gerrit.openafs.org/7867 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 758bdd8f829b57b53f934e260605fd1d23d9d733 Author: Jeffrey Altman Date: Tue Jul 24 13:53:49 2012 -0400 Windows: Correct exceptions in AFSRDFSProvider Correct two errors in the generation of debug strings that were triggering invalid memory access exceptions. Reviewed-on: http://gerrit.openafs.org/7859 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 16b671cf3bddfc1c8cd9f760f99320ac21e583ac) Change-Id: I6734cd1181912e9948e1fbdd3a9608457656c4a4 Reviewed-on: http://gerrit.openafs.org/7866 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 880984efc1026008da5dc7688f45bfc982a0d889 Author: Jeffrey Altman Date: Sun Jul 1 22:31:04 2012 -0400 Windows: No VLDB server blocking probes Now that we have background probes, use them for VLDB server probes. Reviewed-on: http://gerrit.openafs.org/7854 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ff703fcbb93399f12fb3210b729f82fb43f0ed1) Change-Id: I2722efef6a2ab304f2301b689f68bc40db8856d6 Reviewed-on: http://gerrit.openafs.org/7857 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 287e2d9ec19b45c4e6e08588a074495d53bc051e Author: Jeffrey Altman Date: Sun Jul 1 22:27:13 2012 -0400 Windows: NOPROBE means probe in background thread It is important that down servers be detected as soon as possible. When it is not possible to perform a blocking probe, perform a probe in a backgrond thread. Reviewed-on: http://gerrit.openafs.org/7853 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ceeb0474578914a64cc938e52533e6c7911396b2) Change-Id: Ibb8eca39c445ff10bd580785618b059796c43bad Reviewed-on: http://gerrit.openafs.org/7856 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2c778cd59f10bbc7896589f4ec89e77acea42949 Author: Jeffrey Altman Date: Sun Jul 22 01:19:57 2012 -0400 Windows: get rid of _strdup and use rk_strdup Do not use the _strdup() C RTL function. Use strdup() so that rk_strdup() roken replacement can be used. Reviewed-on: http://gerrit.openafs.org/7848 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 736e0dbeec54e19801e96ba93d471bd5a995f4f3) Change-Id: I6249d21cd28c7d22292d5f2d2d740119b712d728 Reviewed-on: http://gerrit.openafs.org/7851 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ae12ff90f8b988b04b9c2a472fa68448d89ec194 Author: Jeffrey Altman Date: Fri Jul 20 10:19:07 2012 -0400 roken: rk_strdup rk_wcsdup exports Reviewed-on: http://gerrit.openafs.org/7847 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 907dbac89cfde3d3663c14fa17ca5ac9ced5a846) Change-Id: Ia7b559032277a56cc3497165fa4d3493eb952009 Reviewed-on: http://gerrit.openafs.org/7850 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 71eb47be1e971748edfc9c865669188c9f3ef594 Author: Heimdal Developers Date: Mon Jul 23 17:27:56 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to b8a53329fc8bf2fe8c4f4058512f828d7654e3f8 (switch-from-svn-to-git-3003-gb8a5332) Upstream changes are: Jeffrey Altman (2): Windows: rk_strdup allocator Windows: rk_wcsdup allocator Nicolas Williams (1): Fix bug in _krb5_expand_path_tokensv() Reviewed-on: http://gerrit.openafs.org/7842 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cabfe32c335002d2cfc77481c33d091cc7fd0dda) Change-Id: I4cd8514ae0b0d5db73fe830cd57fd43f1e29d4a8 Reviewed-on: http://gerrit.openafs.org/7849 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6a663f0d02b1b3a8046a5703d0a74d60ab862bd Author: Simon Wilkinson Date: Wed Jul 18 10:22:07 2012 +0100 ptserver: Make ptclient build again Make the ptclient utility build again, and add it to the ptserver Makefile so that it is built by default and, hopefully, won't bitrot again. Reviewed-on: http://gerrit.openafs.org/7841 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 5dce817d40bc69684451e88fe8a0f1078f1f3880) Change-Id: If9faa3d004b5b89289c140a2e242a97df949ed06 Reviewed-on: http://gerrit.openafs.org/7846 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2804437c8ac4ae341b8802c14238415d1eac2fb7 Author: Simon Wilkinson Date: Mon Jul 16 20:09:04 2012 +0100 auth: Fix GetTokenEx with NULL cellName If GetTokenEx is called with a NULL cellName, it means use the local cell. To do this with the legacy interface, a 0 length string must be used for the cell instance of the ktc_principal passed to GetToken. Fix this so that we do so, rather than attempting to strcpy(..., NULL) which never ends well. Caught by clang-analyzer Reviewed-on: http://gerrit.openafs.org/7840 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 0eca3c1822683ccf1b559eb8e455688c5bdc1fc9) Change-Id: Iada3afa508588f17bfad299774cc4fa01ba2e570 Reviewed-on: http://gerrit.openafs.org/7845 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 11d4bb0172e064c0fc2175a0cb473991faadd8c3 Author: Jeffrey Altman Date: Sun Jul 22 20:40:41 2012 -0400 rx: rxi_FindRpcStat must test for empty queue When queue_Scan is executed on an empty queue the queue element variable, in this case 'rpc_stat' is the queue head, _RXQ(q), and not NULL. Callers of rxi_FindRpcStat() expect NULL on failure to find or create an rx_interface_stat object. Correct the behavior by testing for an empty queue and return NULL immediately if the queue is empty and the caller is not requesting creation. Reviewed-on: http://gerrit.openafs.org/7835 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec) Change-Id: I71ad98b943e08804aa15672cdf428a501871923b Reviewed-on: http://gerrit.openafs.org/7844 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1363b0be1432422a4957babc53679b756e11b614 Author: Jeffrey Altman Date: Mon Jul 23 01:38:03 2012 -0400 Windows: cm_UpdateVolumeLocation volp locked When calling cm_UpdateVolumeLocation the volp->mx must be held. cm_Analyze() did not obtain the mutex as required. Reviewed-on: http://gerrit.openafs.org/7839 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 748a3e29b624d10e90af43cb0dc65a4f96c0310e) Change-Id: I389508d60d9cfb21eb21118c1da646d5ba644c92 Reviewed-on: http://gerrit.openafs.org/7843 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 31edc36ef950d860704adf816eb7030291469eb1 Author: Jeffrey Altman Date: Mon Jul 2 10:26:05 2012 -0400 Windows: Recompute server rank periodically After VL_ProbeServer and RXAFS_Getcapabilities RPCs call cm_RankServer() to recompute the server ranks based upon the updated peer statistics. Reviewed-on: http://gerrit.openafs.org/7827 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 30e26c07d42d8e8208c51719bc823e387d5919ee) Change-Id: I2b9e0eb02a53771d1b04b2cb1dbf3b25c9be7a1f Reviewed-on: http://gerrit.openafs.org/7834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 356f086eeed592537ac74423ecc081fc7d425452 Author: Jeffrey Altman Date: Fri Jul 20 02:57:35 2012 -0400 Windows: Clear peer RPC stats on IP addr change When an IP address change has been detected, clear the peer RPC statistics used for server ranking. Reviewed-on: http://gerrit.openafs.org/7826 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a3e2bd0d0183fab913264b04c6772f000367cb73) Change-Id: Ib6db0a7325ca489b7b89e528c2c6169b6104739e Reviewed-on: http://gerrit.openafs.org/7833 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f3b4c62118bb8a68fe15523fc99f0ece87d28e94 Author: Jeffrey Altman Date: Fri Jul 20 02:55:20 2012 -0400 Windows: server rankings by RPC statistics Use VL_ProbeServer for VLDB servers and either opcode_RXAFS_GetCapabilities or opcode_RXAFS_GetTime for File servers. Reviewed-on: http://gerrit.openafs.org/7825 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c0d652dcdead56c53c622ade5df0f50e8aefd0f2) Change-Id: If7402f8367332db85f64fc0b6e415df6a19f0958 Reviewed-on: http://gerrit.openafs.org/7832 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 75fa0708398a43d68d5cec4d14a1c7ac3cf20496 Author: Derrick Brashear Date: Sat Jul 21 00:17:14 2012 -0400 rxgen: per-opcode stats allow access to per-opcode stats Reviewed-on: http://gerrit.openafs.org/7802 Tested-by: BuildBot Reviewed-by: Jacob Thebault-Spieker Reviewed-by: Derrick Brashear (cherry picked from commit c1081a3ab5dc7e5c83ad84dd0b5c795969745d7d) Change-Id: I82525a1e3d1953eda5fbc51e7e83b1d855251e03 Reviewed-on: http://gerrit.openafs.org/7831 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 94bca9314db4ce25a5639126b89d534affc53b6b Author: Derrick Brashear Date: Sat Jul 21 00:07:41 2012 -0400 rxgen: emit opcode defines in header define an opcode-name-specific define with the numeric value of the opcode Reviewed-on: http://gerrit.openafs.org/7801 Reviewed-by: Jacob Thebault-Spieker Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c3767f1e90b7ba61efcb25e022d27f35d1accc2b) Change-Id: I031521eca93f077dece90e949a4fdfe0555dee70 Reviewed-on: http://gerrit.openafs.org/7830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72386186bfb742e3e03865025027dff65c6a3c07 Author: Garrett Wollman Date: Sat Jul 21 00:04:58 2012 -0400 xdr: fix two old FIXMEs related to signed/unsigned arithmetic It's implementation-defined whether the C '>>' operator, when applied to a signed integer, is sign-extending or zero-filling. If you want unsigned arithmetic, you have to ask for it explicitly. One assumes the reason for the shift is to avoid overflow if the returned size/count is later converted to a signed int, in which case maybe it would be better to use INT_MAX here. This is the minimal change necessary for correctness. Reviewed-on: http://gerrit.openafs.org/7800 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 417df0d495a8636aec6959b074a35885e20022c9) Change-Id: I6be50edca3098fb21148c4eaa3cd6a3654eafe6a Reviewed-on: http://gerrit.openafs.org/7824 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5ea02f3bf645011cffd899db6957d9ef7780543f Author: Jeffrey Altman Date: Sat Jul 21 12:17:46 2012 -0400 Windows: AFSTearDownFcbExtents loop conditional If there are extents in the list with a non-zero ActiveCount, those extents will be skipped and the list 'le' will never become empty. Add an additional condition to ensure that the loop is only executed once for each extent in the list. Reviewed-on: http://gerrit.openafs.org/7810 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 860812931f3adf07c85ac2a56deb149b9c0d33bb) Change-Id: Ia3f52f6f4d9a01dfb75fb4c529f794c6ee773740 Reviewed-on: http://gerrit.openafs.org/7823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit feb7aecbfb262418e9a5b82578aaad5862d34d93 Author: Jeffrey Altman Date: Sat Jul 21 12:02:20 2012 -0400 Windows: memory leak AFSInitPIOCtlDirectoryCB In an error occurs during AFSInitPIOCtlDirectoryCB processing the nonpaged pool allocation would be leaked. Reviewed-on: http://gerrit.openafs.org/7809 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6b0bc2f6ff6ffecb4dd158ba5d2021d46bad7da0) Change-Id: I75f592e347aea821993eb334d0dba1675a86b92f Reviewed-on: http://gerrit.openafs.org/7822 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dfeb6c0c3bce8195ea30f5c13b68655124ef4ec8 Author: Jeffrey Altman Date: Sat Jul 21 12:00:21 2012 -0400 Windows: memory leak AFSRemoveVolume Do not leak the VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->NonPaged allocation and the associated lock object. Reviewed-on: http://gerrit.openafs.org/7808 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit af1bdc2b7758615ac22505128415a4f10a1f8f10) Change-Id: I9c265e2474d3cda8a450abf3d5fc53fc619f16e5 Reviewed-on: http://gerrit.openafs.org/7821 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 963468e2c04bafb9eff48a1088086eea8fc698c0 Author: Jeffrey Altman Date: Sat Jul 21 11:52:22 2012 -0400 Windows: AFSExFreePool -> AFSExFreePoolWithTag Replace AFSExFreePool() with AFSExFreePoolWithTag() which is a wrapper around both ExFreePool() and ExFreePoolWithTag(). If a 'Tag' value, is provided, ExFreePoolWithTag() is used. Otherwise, ExFreePool(). Specify allocation tag values wherever possible. Path name buffer tags are not specified because they are allocated using multiple tags. The same is true for network provider string buffers. This is being done in order to debug a memory corruption issue. Warning: this is a change to the AFSRedir->AFSRedirLib interface and therefore both drivers must be updated with a reboot and not simply restarting the service. Reviewed-on: http://gerrit.openafs.org/7807 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fe61f35d35003121c94b717a1dd79119c9073adc) Change-Id: Icf830401c672c8953eedbfaa76e4bc36de8f5edb Reviewed-on: http://gerrit.openafs.org/7820 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit eae9b21df9607570660e2e59d8afe2a80b8f3482 Author: Jeffrey Altman Date: Sat Jul 21 11:57:40 2012 -0400 Windows: Freeing SeQueryInformationToken allocations Memory allocated by SeQueryInformationToken() must be freed with ExFreePool() and not AFSExFreePool(). Reviewed-on: http://gerrit.openafs.org/7806 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8a11435eed2d3d1d1aef0ebb92822b34299b2e4d) Change-Id: Ib623b967f43e422b7f6f280abd9904fc8f8b9167 Reviewed-on: http://gerrit.openafs.org/7819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa5840c4d501cb823135f46586dbce4b2ab4dc8d Author: Jeffrey Altman Date: Fri Jul 20 10:20:02 2012 -0400 rx: fix abort on missing service patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the possibility that a NULL connection pointer could be dereferenced. Prevent it. Reviewed-on: http://gerrit.openafs.org/7794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3ec1bdf9c74bd250d49065fa84475a5123461744) Change-Id: If65086177fd0d65d4ba4a57153b453abe939cf3c Reviewed-on: http://gerrit.openafs.org/7818 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ee8adc30052bf3d14bf20bd9ef5840e8bb977cf0 Author: Jeffrey Altman Date: Mon Jul 16 16:53:32 2012 -0400 rx: rxi_ReceiveDataPacket do not set rprev on drop In KERNEL builds if there are no available packet buffers the new packet is dropped on the floor. In that case, the call's rprev field should not be updated because the packet was never "received" for delivery to the application. Remove a dead comment from the same block of code. Reviewed-on: http://gerrit.openafs.org/7784 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit bbf92017b084a8ba8df81effe06d11421cdf4bb0) Change-Id: Id31069be917ca016ade77c204e8d6fb710891f51 Reviewed-on: http://gerrit.openafs.org/7817 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9296e66a32e209676c8407ed3816e4eb712e622d Author: Jeffrey Altman Date: Fri Jul 20 01:00:38 2012 -0400 Windows: avoid memory overrun during extent release While tearing down extents, if an extent is found to be in use it will be skipped. Must use 'ulReleaseCount' as the index into the released extent array. Reviewed-on: http://gerrit.openafs.org/7796 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 91f17adf01e54302b0c8d86df5627214f0bdf5d0) Change-Id: Ia57382aa1f4cdfe9737eda4eacab7de332dd42a8 Reviewed-on: http://gerrit.openafs.org/7816 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 478205d4ff97fb77f4b546e3d13257b248cf0b9a Author: Jeffrey Altman Date: Fri Jul 20 00:59:33 2012 -0400 Windows: more roken.h include corrections Reviewed-on: http://gerrit.openafs.org/7795 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ec46ced616f7af72fa3ce1d60304ae475977a28) Change-Id: I2cc589914785b56446a3116808eb2b61a4fa88f7 Reviewed-on: http://gerrit.openafs.org/7815 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 70d64aa2d657d7b5140d82d1cfcf29c12bd81636 Author: Jeffrey Altman Date: Fri Jul 20 02:54:18 2012 -0400 windows: add afsroken to afssvrcpa NTMakefile Reviewed-on: http://gerrit.openafs.org/7797 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 14c98f9df9fd7686f6fc453edaf70168e19e6da9) Change-Id: I286bc7cae9d3d575dd1d231f4b9aa484b1f8cdd4 Reviewed-on: http://gerrit.openafs.org/7814 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a39180f16b7bde8fc9cfe49effd6f98175e555f5 Author: Garrett Wollman Date: Sun Jul 15 15:41:25 2012 -0400 rx: dead initialization in rxi_RestoreDataBufs Don't initialize iov only to overwrite it immediately below. Reviewed-on: http://gerrit.openafs.org/7770 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 0b69ca34eb55f9d0a53e5f6b2e6155c7824b2fde) Change-Id: I2545e0e71b002856ef6d88fe2727eb73cf7fffba Reviewed-on: http://gerrit.openafs.org/7813 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 39a546d0efa76be7656e7c0eea044b7c618f14c3 Author: Garrett Wollman Date: Sun Jul 15 22:00:04 2012 -0400 rx: eliminate dead variable sdl in rx_getAllAddr_internal() Near as I can tell, sdl is only assigned once, and is never read. Reviewed-on: http://gerrit.openafs.org/7775 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 6422be38fc8084a58b70412e3cfe087a4e1e57b8) Change-Id: Ic0223e37bd85736e80f3ac79d1726e94c53f1a55 Reviewed-on: http://gerrit.openafs.org/7812 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 343b1ca3f4292fb1f681954887a1d46a4a6e4b9a Author: Garrett Wollman Date: Sun Jul 15 15:01:29 2012 -0400 rx: don't leak a connection hash table in unlikely error condition If getsockname() returns an error (which shouldn't be possible), rx_InitHost would leak a connection hash table (which probably doesn't matter because the caller will just exit anyway). Make the analyzer happy by freeing the memory anyway. Reviewed-on: http://gerrit.openafs.org/7768 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 53c432d1feba6454af4526b4d797b45a6f205eac) Change-Id: Id95faca47ee0eeb4fac9fcc188b5d94d2b61de78 Reviewed-on: http://gerrit.openafs.org/7811 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c4aed9b5992ed37b3c8039088f95ccd5a19c036f Author: Simon Wilkinson Date: Wed May 30 18:25:51 2012 +0100 rxgen: Make input strings const Modify the code generation routines so that string inputs to RPCs are declared as (const char *) on the client side. This doesn't affect callers as we can freely cast from (char *) to (const char *), but means it is easier to write API wrappers that accept const arguments. Reviewed-on: http://gerrit.openafs.org/7556 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit ed02c6ff8a4bc2cc82876a4b1736a8985548a71c) Change-Id: Ia56cca791b7bfad453d4cd6300f718dd167454d3 Reviewed-on: http://gerrit.openafs.org/7791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c26ffea568351e8f718f9642346b848a165189ee Author: Simon Wilkinson Date: Thu Sep 8 11:26:39 2011 +0100 Remove redundant header includes Remove includes of system headers where roken.h already takes care of including them. This simplifies the source tree, reduces the amount of work done by the compiler, and ensures that all of our headers are included with the correct guards The list of files to edit was generated with the following script: list=`grep include external/heimdal/roken/roken.h.in \ | sed -e's/#include//g' | sort | uniq`; \ for A in `find . -name *.c | xargs grep -l roken.h \ | grep -v external/ | grep -v WINNT/`; do \ found=0; \ for B in $list; do \ if grep "$B" $A > /dev/null; then \ echo "$A : $B"; \ found=1; \ fi; \ done; \ if [ $found == 1 ] ; then mvim -f $A; fi; \ done Reviewed-on: http://gerrit.openafs.org/5815 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Alistair Ferguson Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear (cherry picked from commit 83b76f564b0972c6163656637b2d64d06895e41a) Change-Id: I84ab2910badc87da6cc242f454d8253fce6af128 Reviewed-on: http://gerrit.openafs.org/7790 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e4a4498ab5e81eec8247942e67a97f1447ede74a Author: Jeffrey Altman Date: Fri Jul 6 16:04:28 2012 -0400 Windows: add cm_ServerListSize() cm_ServerListSize returns the length of a cm_serverRef_t list. Reviewed-on: http://gerrit.openafs.org/7759 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6b8c43559073caa7f0b9db25bab4812606740e7d) Change-Id: I755d5a93e44e858f4fcf5dddbf3320077d1ee848 Reviewed-on: http://gerrit.openafs.org/7762 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d884d144914c586bbae6fe6757a2a0bbefa81250 Author: Jeffrey Altman Date: Fri Jul 6 16:02:38 2012 -0400 Windows: add cm_IsVolumeReplicated() Given a file id indicates whether the volume it is located on is replicated or not. Reviewed-on: http://gerrit.openafs.org/7758 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2dbe1316a17716e57013cf41e7b19ec898b94cbf) Change-Id: I6aa7bc2c60162025745e30aa0f5a31d2a359b8e9 Reviewed-on: http://gerrit.openafs.org/7761 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b683b39d60a44818717547d01cbfff3ef590f572 Author: Jeffrey Altman Date: Mon Jul 9 09:34:22 2012 -0400 Windows: Redesign of server preferences Server rankings should be composed from three values: 1. administrative preferences 2. network address locality 3. peer performance (rtt and congestion window) This ensures that local subnet servers are always preferred. Add a new rank for down servers so they are always sorted las in cm_serverRef lists. Reviewed-on: http://gerrit.openafs.org/7757 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a9be0735b5e23adefc5fd57083ca206e61820bab) Change-Id: I6954a851115ba4b5bb3987ed46afd487156b03a7 Reviewed-on: http://gerrit.openafs.org/7760 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5064ac9d4b579ec5e9b2d6bca30379392fac9837 Author: Jeffrey Altman Date: Tue Jul 10 00:13:04 2012 -0400 Windows: cm_SyncOp waiting logic Use interlocked increment and decrement to track the waiters and use the wait queue itself to determine if there are waiters instead of the CM_SCACHEFLAG_WAITING flag. Reviewed-on: http://gerrit.openafs.org/7752 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f70952a347dff39bd445f8361224e1c622a5b1cf) Change-Id: I115c480b07d1e82bfe05f8c57acd38eeb05aa94d Reviewed-on: http://gerrit.openafs.org/7755 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2a70ca6d9665686026726ef97a7378a3cfda8550 Author: Jeffrey Altman Date: Tue Jul 10 00:09:14 2012 -0400 Windows: remove unused CM_SCACHEFLAGs CM_SCACHEFLAG_CALLBACK and CM_SCACHEFLAG_STATD were cleared at various points and tested at various points but never set. Remove them. Reviewed-on: http://gerrit.openafs.org/7751 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 80732b94ef8a8fd239d8f77d8e10f0d770f0ec24) Change-Id: I09eda21c5bda81dffc4c389c490c8182d7f19efb Reviewed-on: http://gerrit.openafs.org/7754 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 53e25c5da1e1d1bb9572b057bf93e50b1089bf8c Author: Jeffrey Altman Date: Sat Jul 7 14:11:23 2012 -0400 Windows: not all short rx_Read[v] reads are fatal When performing a RXAFS_FetchData[64] RPC, a short read from rx_Read[v] is not a reason to stop processing the call unless it is the first read and the file server FetchData offset bug has been detected. If not, only stop processing if the rx_Read[v] return value is <= 0. Reviewed-on: http://gerrit.openafs.org/7749 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6fb3b7aa317a6429daf86b140785875a70686bac) Change-Id: Id05c4abe07bf2e8a1980f15fc60874be444406a5 Reviewed-on: http://gerrit.openafs.org/7753 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e452a497e9aeb60070763d7c59b679e98e599a58 Author: Jeffrey Altman Date: Mon Jul 9 00:49:13 2012 -0400 Windows: record mount point string data version The Windows cache manager stores the mount point or symlink target string in the cm_scache_t object. If the string is the empty string then the target needs to be resolved. Otherwise it is considered up to date. With this approach, care must be taken to ensure that the string is erased whenever the data version changes. This patchset records the data version of the mount point target string in the cm_scache_t object. Being up to date is determined by comparing the current data version of the object to the mount point string version. A match and the string is up to date. Reviewed-on: http://gerrit.openafs.org/7745 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 606d9554e2880c2978675b7eae3fa5f53bd07c3d) Change-Id: I60b241a4e8fb798cff58ac7eb812774e0fdc892d Reviewed-on: http://gerrit.openafs.org/7748 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5452d3c074b71d146c8172fd4f04b7afe1e79927 Author: Jeffrey Altman Date: Sun Jul 8 02:00:17 2012 -0400 Windows: initialize afsStatus and callback structs In cm_GetBuffer, cm_GetData, cm_VerifyStoreData Reviewed-on: http://gerrit.openafs.org/7744 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit df46bb407a9073374337f4b8e4291e18c74e548c) Change-Id: I9c0ec99a067347b20836d2daa3f1902fb7deefcc Reviewed-on: http://gerrit.openafs.org/7747 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4ffe3e2a05f9c2db4a530ac9f19bd0d49a985c7e Author: Jeffrey Altman Date: Fri Jul 6 15:07:13 2012 -0400 Windows: cm_MergeStatus unknown interface numbers Ignore status information if the interface number is unknown. Currently only version 1 is recognized. Reviewed-on: http://gerrit.openafs.org/7743 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8115841e2fc9d827a7207ddc18e5c84e466ed7e7) Change-Id: Ib2cf79618a44e8da09bc61dc670c10266a3bc39f Reviewed-on: http://gerrit.openafs.org/7746 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e5a353fd7e25dcec7cd95e4e61814cc45c2e1ec0 Author: Jeffrey Altman Date: Thu Jul 5 16:55:03 2012 -0400 Windows: interlocked ops for osi lock flags Use interlocked operations to set and clear the flags in the osi mutex and readwrite lock objects. Reviewed-on: http://gerrit.openafs.org/7720 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9bc068edc890991b5d384108ce972c12d3c18975) Change-Id: I82d22e45e4f0245e70b7339e4eb0e74e5252bbb5 Reviewed-on: http://gerrit.openafs.org/7740 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c0f38392d8c58a2ba38fe2cc0f304badd356c5dd Author: Jeffrey Altman Date: Thu Jul 5 16:52:51 2012 -0400 Windows: use spin counts for osi base locks On multiprocessor systems, spin counts are faster than entering a processor wait state when there is critical section contention. Microsoft recommends a count of 4000. This feature is only available on XP and above which is fine since OpenAFS master and 1.7 no longer support Windows 2000. Reviewed-on: http://gerrit.openafs.org/7719 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d5f067aa735968d4da6685f0883ca978d5e6795c) Change-Id: I9ace400460db98caa7939227ad6b78c2d65bfd7c Reviewed-on: http://gerrit.openafs.org/7739 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d089fbd8b2467bc85146d7c18f13a112ae419bba Author: Jeffrey Altman Date: Thu Jul 5 21:13:21 2012 -0400 Windows: X86 DEBUG Interlocked Or and And X86 DEBUG builds do not have a native InterlockedOr or InterlockedAnd. Therefore, we must provide our own. Reviewed-on: http://gerrit.openafs.org/7726 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f4baf7cf99ef52f3ce9d6a7ee577cd9140a8bdc5) Change-Id: I0fdd34867294f8c3f321636c460c538a862fa001 Reviewed-on: http://gerrit.openafs.org/7738 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ffbc08082074e79bb30027c9e1d637311976b7fb Author: Jeffrey Altman Date: Thu Jul 5 18:25:09 2012 -0400 Windows: remove unused 'deltas' from cm_CheckServersMulti() Reviewed-on: http://gerrit.openafs.org/7725 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 52f3878da4b8f5356e7799f2659d41cade0dbdee) Change-Id: I984e13007ade5028989c834d560e3aa9ae657bcb Reviewed-on: http://gerrit.openafs.org/7734 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6b0b63b14c6397b7c812a0f5b8934e8eb4dc07d9 Author: Jeffrey Altman Date: Thu Jul 5 18:22:24 2012 -0400 Windows: Apply cm_GetVolServerList() to cm_ConnFromVolume() Use cm_GetVolServerList() in cm_ConnFromVolume() to ensure an error is returned instead of dereferencing a NULL pointer if the serverRef list for the requested volume cannot be obtained. Reviewed-on: http://gerrit.openafs.org/7724 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3b3b620a03b56dba7f0696f8175b9fb2c8fbd6ae) Change-Id: Ic533b9c63a7956f6d5e268967d84efb71e5d4395 Reviewed-on: http://gerrit.openafs.org/7733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 92301b34b3e102aa2d1971ef747c32b6e53903f7 Author: Jeffrey Altman Date: Thu Jul 5 18:21:51 2012 -0400 Windows: Apply cm_GetVolServerList() to cm_Analyze() Using cm_GetVolServerList() it is possible to simplify the logic in cm_Analyze(). It is no longer necessary for cm_Analyze() to call cm_GetServerList() which must obtain its own reference the the cm_volume_t object via a fileId lookup. This reduces lock contention and makes the code a bit more readable. Reviewed-on: http://gerrit.openafs.org/7723 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4e3400414f676b9a0033f041f81671534ffdab99) Change-Id: I2814fd77939be638d7159504604e3432bb9f115f Reviewed-on: http://gerrit.openafs.org/7732 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a0add5e0141bc0377d95ced27d3e8b6a1cd3fcbe Author: Jeffrey Altman Date: Thu Jul 5 18:16:09 2012 -0400 Windows: Add cm_GetVolServerList cm_GetVolServerList() is a wrapper for cm_GetVolServers() that returns CM_ERROR_NOSUCHVOLUME if the server list cannot be obtained for the requested volume. Reviewed-on: http://gerrit.openafs.org/7722 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2575d87824fbf5d0e1a5fcb3a1b49949d6fbe2ee) Change-Id: I07fcf9d2cf444da4d58ba1f18803b3b9a3e9b177 Reviewed-on: http://gerrit.openafs.org/7731 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c3f677d8d3b6982238822fe9bfe7c91ca97252f3 Author: Jeffrey Altman Date: Thu Jul 5 18:06:13 2012 -0400 Windows: Modify cm_GetVolServers and cm_GetServerList Move the determination of the 'replicated' state into cm_GetVolServers() so that cm_GetServerList() and cm_ConnFromVolume() can be implemented without duplicating the resolution of the cm_vol_state_t object. Reviewed-on: http://gerrit.openafs.org/7721 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ef5686b1a11e1a6ba4590b09170306190d6c7393) Change-Id: I8871bdf34bc5b42927df9043ea3949a6cb5783bc Reviewed-on: http://gerrit.openafs.org/7730 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 02bd4dfcbc85d5057d714000bd6da259d2545654 Author: Jeffrey Altman Date: Thu Jul 5 14:54:04 2012 -0400 Windows: cm_ConnByServer hold userp->mx only while necessary The cm_userp_t does not need to be locked while the cm_conn_t force new connection processing is taking place. Reviewed-on: http://gerrit.openafs.org/7718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5b9e9265a0df707e9fb79842ab5aa94b59b8e88e) Change-Id: I2de503c0c37e9808d120a0639e2a7d00a1a99dec Reviewed-on: http://gerrit.openafs.org/7729 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e6cf8cef580dcad0e8d3951ab76f753f9dc53e2e Author: Jeffrey Altman Date: Thu Jul 5 14:33:50 2012 -0400 Windows: cm_ConnByServer add conn to list after init Do not add a newly created cm_conn_t to the cm_server_t connsp list until after the object is fully initialized. Reviewed-on: http://gerrit.openafs.org/7717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3ce54e6b7be8c2996a0fda2d7ad9780fca2f0ef) Change-Id: I5561be88c466f4b50a5d4ab72d534f1a01fb9c17 Reviewed-on: http://gerrit.openafs.org/7728 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3eead71d40da2e325dfc033f8f696edacadf3834 Author: Jeffrey Altman Date: Thu Jul 5 11:03:35 2012 -0400 Windows: cm_HaveCallback optimize .readonly If the cm_scache_t has a registered callback, there is no reason to obtain a volume reference for a .readonly. Just use the callback. Reviewed-on: http://gerrit.openafs.org/7716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f73aebbe8772e62bf8930d70e9edab2f82ff8984) Change-Id: I60cc53888b6bf328f95c9b15ea910f34ce05ddc9 Reviewed-on: http://gerrit.openafs.org/7727 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5c1c8888a23506f8ae890be21d31d53037271508 Author: Andrew Deason Date: Thu Jun 28 18:56:47 2012 -0500 doc: Add fs bypassthreshold man page FIXES 130050 Reviewed-on: http://gerrit.openafs.org/7602 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 828ef9c39a14af265796755718c10b63513f952c) Change-Id: I002b8832ffc4fc425d30a9d9375f1b143197bfa7 Reviewed-on: http://gerrit.openafs.org/7736 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f49dc589ece4ea468c5c6343d19bda1ed4a07d55 Author: Jeffrey Altman Date: Tue Jul 3 15:38:33 2012 -0400 Windows: RDR RXAFS_GetVolumeStatus vs 1.1 'l' only The Windows redirector relies upon the ability to obtain volume status information to decide whether a file system volume object can be created and whether or not an extending write can be permitted. As of this writing, the file server always performs a PRFS_READ access check on the volume's root directory (1.1) vnode as a condition for releasing the volume state information which includes: Message of the day (if any) Offline message (if any) Online flag InService flag Blessed flag NeedsSalvage flag Type MinQuota MaxQuota BlocksInUse PartBlocksAvail PartMaxBlocks All of this information is publicly available to anonymous users via "vos examine" so it is odd that it is hidden from anonymous cache managers. When RXAFS_GetVolumeStatus fails, the AFS redirector was failing to create a file system object for the AFS volume. That in turn prevented the volume from being accessed even if the user had 'l' in the root directory and full access everywhere else. This patchset will make up fake data for the AFS volume if the RPC fails. However, doing so does have consequences. The client will be unable to make an accurate determination regarding free space on the file server. As a result, an extending write may be permitted which writes data into the system page cache which in turn cannot be written to the file server. Such data will be lost and unrecoverable. Reviewed-on: http://gerrit.openafs.org/7704 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 561b9ce80938d316223f2b313f8224fe06af9d5a) Change-Id: Ia8bce4e37d6b642b751c2c087ec95401a0e3681d Reviewed-on: http://gerrit.openafs.org/7715 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 416928d72d0fda65472ed8e8b13cc925d325967c Author: Jeffrey Altman Date: Tue Jul 3 12:51:27 2012 -0400 Windows: HaveCallback vs readonlyVolumeVersioning If the cm_scache_t volumeCreationDate is 0, the field is not valid for comparison. Add a check during the have callback test. Reviewed-on: http://gerrit.openafs.org/7680 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 261ec65f20df46ed043d16a869d042cf61c6eda7) Change-Id: I4347568f1e2d5b4a489206be527d5695382703c1 Reviewed-on: http://gerrit.openafs.org/7714 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8edf1fae65e094b7ed7412ea06a0dbd97d87e6e1 Author: Jeffrey Altman Date: Tue Jul 3 12:49:53 2012 -0400 Windows: HaveCallback vs OfflineRO Is Valid commit f716962ab41847af4450d0a361f5de9195b32ed0 inadvertently broke the offline .readonly is valid functionality when readonly volume versioning is disabled. Restore it. Reviewed-on: http://gerrit.openafs.org/7679 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c3485a35b7a548d850d55dde4634ba78e5330aa9) Change-Id: I3fb66a3d7afe2d32d00e419e5e85885f9eb86af7 Reviewed-on: http://gerrit.openafs.org/7713 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c9369cc66995cb33c167356a1a525191ba0bc8c9 Author: Jeffrey Altman Date: Tue Jul 3 12:42:52 2012 -0400 Windows: cm_DiscardSCache volumeCreationDate commit f716962ab41847af4450d0a361f5de9195b32ed0 clears the cm_scache_t volumeCreationDate field. It shouldn't because the volumeCreationDate is not a property of the callback. It is a property of the status information which does not change simply because the callback expires. Reviewed-on: http://gerrit.openafs.org/7678 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 64a37fa9f916cd1e8f0ec9bb252fda13aa8b4cd4) Change-Id: I18be397abb0cd223ac508c6addd11d00c64c54ba Reviewed-on: http://gerrit.openafs.org/7712 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1112b37cde4adf4099a22012fff94e87f661af89 Author: Jeffrey Altman Date: Fri Jun 29 00:35:49 2012 -0400 Windows: add missing items to 'clean' rules Reviewed-on: http://gerrit.openafs.org/7653 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 673127f6928c9c2fb5a3b0400fa36d4afcf1e5df) Change-Id: Ic8b5b529a4363d007e51d2db2d2228f422a8b3a9 Reviewed-on: http://gerrit.openafs.org/7711 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1a91b15f58a392349aee541799ec2dfde9bfd737 Author: Jeffrey Altman Date: Mon Jun 25 23:06:30 2012 -0400 Windows: afslogon expand short domain names Depending on how the user specifies the domain name during login, NPLogonNotify may be given a short or a full domain or kerberos realm name. If the name is the short name, attempt to expand it automatically if there is no 'realm' configured for the short domain name. This patchset relies upon data in the local registry instead of using an API such as NameTranslate in order to avoid network queries to the domain controller that might not be reachable. Reviewed-on: http://gerrit.openafs.org/7650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17584782a4d76facf5a89a3eeeebfcc23582b3e8) Change-Id: I50c66298e4543932c02d5dce2f1d524d0bcf157f Reviewed-on: http://gerrit.openafs.org/7710 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit df5273d767615acd49a902ab61b9c53604c4f47f Author: Jeffrey Altman Date: Mon Jun 25 01:38:41 2012 -0400 Windows: afscreds import lsa before renew expiring Reviewed-on: http://gerrit.openafs.org/7649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 712c0c1d0e506a9010d7a5cc93dfd49bee006d41) Change-Id: I1b4a6add63d52e870c25633695365395934cdbcc Reviewed-on: http://gerrit.openafs.org/7709 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1bd14e690357f50a5048a20b640c285dcadd8e81 Author: Jeffrey Altman Date: Mon Jun 25 01:33:02 2012 -0400 Windows: Remove HELP from afscreds The old .hlp format is no longer supported and the text of the help files is long out of date. Remove the HELP buttons from the dialogs and all references to WM_HELP message processing from the application. Reviewed-on: http://gerrit.openafs.org/7648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0834e40bd7444ba1f1770c60b387cf513b279a4b) Change-Id: Ia014ef3c07567d485d06b57523ff48d4766b07a7 Reviewed-on: http://gerrit.openafs.org/7708 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 76eed245b38f6cd37592a93ab80b5bcd3cd99573 Author: Jeffrey Altman Date: Mon Jun 18 22:03:21 2012 -0400 Windows: afslogon major refactoring NPLogonNotify() This is a major refactoring of NPLogonNotify() that is meant to reduce redundancy and add functionality. Key highlights include: * New Domain\user hierarchy that permits configuration settings to be applied on a per user basis instead of a domain basis. As part of the extension the username itself can be mapped. * Attempt to import the MSLSA credentials prior to performing KFW_AFS_get_cred(). * Do not perform redundant KFW_AFS_get_cred() calls. * Add a flag to indicate if the authentication name is the LSA principal name. * Add more debugging messages. Reviewed-on: http://gerrit.openafs.org/7635 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 91795c659087371f941231e51fe284de010e60b1) Change-Id: I52546ff59a81b94ad14cb502ab8cce469bb1d284 Reviewed-on: http://gerrit.openafs.org/7707 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c951367645735cbac0c97361bdcef1c068fbc412 Author: Jeffrey Altman Date: Mon Jun 18 21:58:26 2012 -0400 Windows: afslogon cast away warnings cast away size_t to int warnings in 64-bit builds. Reviewed-on: http://gerrit.openafs.org/7634 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 76ae0f01b32d3e87273ff6d2c9c20eec59e22e16) Change-Id: I2d84f48b4c9039f28842c2cb50ff5cf51dd3735e Reviewed-on: http://gerrit.openafs.org/7706 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 48261878f54e8aa24f3e72ebf161be53178c7b8e Author: Jeffrey Altman Date: Sun Jul 1 22:19:08 2012 -0400 Windows: cm_UpdateVolumeLocation misplaced lock The volume->mx was obtained in the wrong place which resulted in the potential of a panic caused by obtaining the mutex when it was already held. Reviewed-on: http://gerrit.openafs.org/7654 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4707174938b92df189697a2b7e463438c37c1ed0) Change-Id: Ia1d9eca674650f26cded72460253df37508e6bc2 Reviewed-on: http://gerrit.openafs.org/7703 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cd241d1b7e2e6c411aa7d2edad9b9326fa8f0e2d Author: Jeffrey Altman Date: Fri Jun 22 00:25:26 2012 -0400 Windows: check perms before RXAFS_GetVolumeStatus Instead of calling RXAFS_GetVolumeStatus naked, perform a read permission check using RXAFS_FetchStatus first. This permits EACCES caching to prevent unnecessary requests. Regardless of which FileId is queried, always use the root vnode FileId for the permission check. The file server performs its permission check using the root vnode. Reviewed-on: http://gerrit.openafs.org/7641 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 05ac74528b30d36c195ff8f4df343fa72082a213) Change-Id: Ia9408c2c80bcce0e857afdfe9f7e524f38ccaa07 Reviewed-on: http://gerrit.openafs.org/7694 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1eff75e057cd219c4bcd0f8897c88d9dca201dc4 Author: Jeffrey Altman Date: Thu Jun 28 22:29:19 2012 -0400 Windows: WiX backup additional registry keys Move backup storage to HKLM\Software\OpenAFS\BackupSettings Backup HKLM\SYSTEM\...\Services\AFSRedirector Add ..\TransarcAFSDaemon\NetworkProvider "Debug" value Reviewed-on: http://gerrit.openafs.org/7652 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4929b0cb0b57a803a84673fe0faf619d088ed910) Change-Id: Ia19e90923149a67aeee43c2d2da30d8ee9c0ff77 Reviewed-on: http://gerrit.openafs.org/7702 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6f2a7f061578c4b90de134a6b050c751bf576cab Author: Jeffrey Altman Date: Wed Jun 27 01:00:20 2012 -0400 Windows: ensure TreeLock obtain and release same pointer The indirection ObjectInformation->ParentObjectInformation does not appear to be stable. When acquiring and releasing a parent TreeLock, use a local variable to store the ParentObjectInformation pointer and use that to access the TreeLock. This will ensure that the resource obtained is the one that is released. Reviewed-on: http://gerrit.openafs.org/7651 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 03dfcce05aabf2ceecdb84528fc837176c52af77) Change-Id: I07adac68fbeb4b4da927a805880cc3cf0c845708 Reviewed-on: http://gerrit.openafs.org/7701 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cdb92d6ab2e56c688cceaed36a25d0064cc8877c Author: Jeffrey Altman Date: Sun Jun 24 10:16:42 2012 -0400 Windows: Media Protected if create on RO volume If there is an attempt to create a file/directory on a readonly volume as indicated by the Volume Characteristics, return STATUS_MEDIA_WRITE_PROTECTED immediately. Do not bother contacting the afsd_service. Reviewed-on: http://gerrit.openafs.org/7647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f3f282265a3d9e3c968fd06793e6d1a91337f443) Change-Id: I5706108cd59ae5d46614182f32c3d38744c1ebe1 Reviewed-on: http://gerrit.openafs.org/7700 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aac8059a2cf1860233dd8064f2e00ce7b8219c82 Author: Jeffrey Altman Date: Sun Jun 24 10:12:51 2012 -0400 Windows: Remove incorrect assert AFSVolumeInfo When querying the volume information, the input FileId does not have to be a volume root. Remove this extraneous assertion. Reviewed-on: http://gerrit.openafs.org/7646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 53413685ce56c5adba7b095265a62a5088977de2) Change-Id: I6b0b74d17c865e6b8b71c8fce435e0a1e2f06e0d Reviewed-on: http://gerrit.openafs.org/7699 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e5a5204cfd0034ab3cbdaed480dc04aa68e6b0da Author: Jeffrey Altman Date: Sat Jun 23 15:04:29 2012 -0400 Windows: NPGetConnectionPerformance Restore the implementation of NPGetConnectionPerformance in AFSRDFSProvider.dll. This time just return 0 for all fields except for the preferred read/write size which is set to 64K. When this function is not implemented at all, a query for performance of a \\AFS path will be processed by the SMB redirector. This can result in a 20 second timeout while waiting for the SMB Browser query for "AFS <20>" to complete. Reviewed-on: http://gerrit.openafs.org/7645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dddd393198bc066e0fea478baf719c97cd51ec53) Change-Id: I500db48d8769bd04d3d545dfe9b4afc1eec67d9a Reviewed-on: http://gerrit.openafs.org/7698 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 32603879ea1235ea94669b01714534ad244bdc8e Author: Jeffrey Altman Date: Sat Jun 23 11:11:47 2012 -0400 Windows: ShellExt Add Prop Page only if AFS If the file is not in AFS, do not add any of the AFS specific property sheets. Reviewed-on: http://gerrit.openafs.org/7644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5a6cf1494613b83332e4fad01980bb636c510a88) Change-Id: I8a07b457d5ac13f5a8e79f370b9ebd11e4fe15e9 Reviewed-on: http://gerrit.openafs.org/7697 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ec8205f7143b50336b88d98a1aeb0ac375ad2092 Author: Jeffrey Altman Date: Fri Jun 22 16:51:00 2012 -0400 Windows: ShellExt display error if symlink not AFS If the path in which a Symlink is to be created is not located within AFS, display an error dialog. Reviewed-on: http://gerrit.openafs.org/7643 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d95d4fcca997ea3f8bfbf4a2c1f22c402446aad8) Change-Id: I4fc890c257713508fac0a9cb1be22fb770f5f2b0 Reviewed-on: http://gerrit.openafs.org/7696 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 78e2a2a7eb0a75a8f46cd2b1ea1547020f30a32b Author: Jeffrey Altman Date: Fri Jun 22 16:46:23 2012 -0400 Windows: Dir Invalidation Notify Current Object When an invalidation is processed for a directory object, send the notification on the directory object that was invalidated not its parent. Reviewed-on: http://gerrit.openafs.org/7642 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 349c1f53383ee26eb13729d703b0b9e89865ec0c) Change-Id: I162834f5e33540ee5503fd6b0a6d319da47c8f7e Reviewed-on: http://gerrit.openafs.org/7695 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e3b89ae16b28f44f125e2d3f7d9a04ca91dad30b Author: Jeffrey Altman Date: Thu Jun 21 19:37:25 2012 -0400 Windows: cm_GetROVolumeID empty server list check Instead of testing for a non-NULL server list, check to see that the list itself is non-empty. Reviewed-on: http://gerrit.openafs.org/7640 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4785361388d21c46dd30332d89bb201522ee1a6c) Change-Id: If64a704c1fbb409af08cf75baa6743b1e3aafc29 Reviewed-on: http://gerrit.openafs.org/7693 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3e3af8f807e71bc0fcc0544bf5e21ac73676e618 Author: Jeffrey Altman Date: Thu Jun 21 19:34:58 2012 -0400 Windows: Replicated requires more than one site The VLDB response may include a list of servers some of which are not valid replicas because the DONOTUSE flag is set or because the replica site may be out of date. Instead of setting the replication state based upon the server count in the VLDB response, use the number of RO sites that were deemed valid at the end of processing. Reviewed-on: http://gerrit.openafs.org/7639 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 056399bb0d2186bae96223c7f7665e1bc0aed82f) Change-Id: If30ad2642de72188beb419b8635888f48c723139 Reviewed-on: http://gerrit.openafs.org/7692 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e3bd648d2c09acd2f6de46510d0cf464e807f21d Author: Jeffrey Altman Date: Thu Jun 21 19:29:26 2012 -0400 Windows: [Inline]BulkStat VolSync not accurate? Instead of only recording the volume creation date when cm_readonlyVolumeVersioning is true, record the date whenever the RPC in use is not a RXAFS_[Inline]BulkStatus. This is tracked by the addition of flags for cm_MergeStatus and cm_EndCallBackGrantingCall which identify when the RPC was in fact a BulkStat variant. As a reminder, pre- 1.4.11 and 1.6.0 file servers do not properly set the VolSync structure when responding to BulkStat RPCs. At present, there is no method of identifying when it is safe to use them. When cm_readonlyVolumeVersioning is TRUE, it is assumed that the file servers are new enough to do the right thing. Reviewed-on: http://gerrit.openafs.org/7638 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 877053a8cd419c6a6470972f18c4adc7ddb0f163) Change-Id: Ie2b1cf720cb09eada5f8ec5bc7b6756a3f240dbb Reviewed-on: http://gerrit.openafs.org/7691 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b49dc136565481271e0bd5835691bf8139bad0b4 Author: Jeffrey Altman Date: Wed Jun 20 00:05:44 2012 -0400 Windows: force vldb lookup if server list is empty The Windows cache manager can mark server references as "deleted" which can give the impression that a server reference list is not empty when it is. If the volume list is empty any attempt to issue an RPC would fail with a CM_ERROR_ALLDOWN error. Since the VLDB data is current, this condition will remain for two hours. This patchset adds a new error, CM_ERROR_EMPTY, which is returned when the server reference list is empty. cm_Analyze() is modified to process the CM_ERROR_EMPTY error by attempting to update the server reference list. If the update succeeds and the list is no longer empty, the RPC is retried. Otherwise, the RPC fails as before. Reviewed-on: http://gerrit.openafs.org/7637 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae25cf277c8d70da0e6666316baf98d5c117a03b) Change-Id: I954872a1db9467c441875609e75794c0bf0fcf07 Reviewed-on: http://gerrit.openafs.org/7690 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 417ed4a7bf42d383e8c681e0a8a16be4a6373c18 Author: Jeffrey Altman Date: Tue Jun 19 18:48:31 2012 -0400 Windows: Freelance Short circuit all vol updates As long as the cell is the Freelance Cell ID the volume updates should be short circuited. There is no benefit to performing the extra work. Reviewed-on: http://gerrit.openafs.org/7636 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e0b9b89dd98d0bf449556e3f28b479dd61e7eb95) Change-Id: I1ea014e4a8bd0c8523d0cecc7411afb53c199a18 Reviewed-on: http://gerrit.openafs.org/7689 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fa9ea681d9a5d642d5fe05f7d06c14aea8ef4e73 Author: Jeffrey Altman Date: Mon Jun 18 21:55:49 2012 -0400 Windows: AFS_Startup_Event must query Debug value For proper debugging to be performed within the AFS_Startup_Event processing, the "Debug" value must be queried from the registry. Reviewed-on: http://gerrit.openafs.org/7633 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7fd1dc6c887c3bf786632901bc72b8250298a98f) Change-Id: I24654b699575075f7019535dd8c4370666b3a350 Reviewed-on: http://gerrit.openafs.org/7688 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a9cfc752a175e600648f45fef4e239ed7e462c0e Author: Jeffrey Altman Date: Mon Jun 18 21:49:18 2012 -0400 Windows: NPLogonNotify secure erase password The user's password is copied during the NPLogonNotify processing, be sure to erase it from the stack before the function completes. Reviewed-on: http://gerrit.openafs.org/7632 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 187af8d11350c2ff509244f216c72bdd4b88451a) Change-Id: Ie242635713e8e2f7b6221494bb0245249f05ef7c Reviewed-on: http://gerrit.openafs.org/7687 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 01aed7438439b508dccc2031f933d0bc677120ae Author: Jeffrey Altman Date: Mon Jun 18 21:48:05 2012 -0400 Windows: afslogon impersonate when deleting tickets When tickets are obtained via the KFW_AFS interface the user context is being impersonated. Do the same when cleaning up. Reviewed-on: http://gerrit.openafs.org/7631 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c8b1f007b530c072ee1f5654833f68e45a2eafd5) Change-Id: Id764642e6eba30ee7b60cc34519fbfadb2960282 Reviewed-on: http://gerrit.openafs.org/7686 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 239f08217b5a87792dae93929d19652fd6cd943c Author: Jeffrey Altman Date: Mon Jun 18 21:45:39 2012 -0400 Windows: afslogon make error dialog system modal Prevent error dialogs from getting lost behind the desktop during logon. Make them system modal. Add a warning icon as well. Reviewed-on: http://gerrit.openafs.org/7630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ae5aba17cc5d45805f7d263fd645fba0d3bb5116) Change-Id: I522cfa931105f5a5f2330ebf8628caf21bcd7ca7 Reviewed-on: http://gerrit.openafs.org/7685 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 88fd053c8b612a7ec4bfb2c46248086ac36c8bc0 Author: Jeffrey Altman Date: Mon Jun 18 21:39:51 2012 -0400 Windows: afslogon MapAuthError return WN_NET_ERROR (ERROR_UNEXP_NET_ERR) to indicate a problem with this network provider when an error occurs instead of returning WN_NET_SUCCESS. Reviewed-on: http://gerrit.openafs.org/7629 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7adb93cf51d56936d51b70758a959342728fea56) Change-Id: I1d0c9bae64cd05478f7a67dd3d1653f56e88aa86 Reviewed-on: http://gerrit.openafs.org/7684 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b891f308db28ab155964c5ddc150356f97439631 Author: Jeffrey Altman Date: Mon Jun 18 21:37:49 2012 -0400 Windows: afslogon OutputDebugString If the NetworkProvider "Debug" value has the 1th bit set (2), generate all debug values to the debugger via OutputDebugString(). Reviewed-on: http://gerrit.openafs.org/7628 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 43d53bed6f591257fee55c343699ee1d3b223ff6) Change-Id: I6d23455c5c0d9f4e710c7b139eac0cfce3e4f803 Reviewed-on: http://gerrit.openafs.org/7683 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fab5e06696540593e4d9209b242524199eb3e947 Author: Jeffrey Altman Date: Thu Jun 7 09:23:26 2012 -0400 Windows: misplaced brace in KFW_AFS_get_cred A misplaced brace in KFW_AFS_get_cred() results in KFW_AFS_klog() being executed twice in a row if successful. The second attempt could fail due to a KRB5KRB_AP_ERR_REPEAT error issued by the KDC. Reviewed-on: http://gerrit.openafs.org/7626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d7690835aca12b3d38722a8dafa6efbfb1f549ee) Change-Id: I0a02cbe0b9128b7c17f3ba90cbc39512254daa43 Reviewed-on: http://gerrit.openafs.org/7681 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d0245b0960884d57e18bb6673a5957ca5f5ae7b9 Author: Jeffrey Altman Date: Mon Jun 18 10:10:32 2012 -0400 Windows: Do not permit RDR worker threads to quit If the DeviceIoControl from the service's redirector worker threads fails the thread will terminate. This is a problem because if all of the threads quit the afs redirector will end up deadlocking all requests since there will be no method of delivering them to the service. If there is an error log it (if possible), and retry. Hopefully it will be transient. Reviewed-on: http://gerrit.openafs.org/7627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e513799232f72ce9deabe5097f06f42d4ce09bf2) Change-Id: I2527a126ebd2d19052fa6b059a67e8611754fb52 Reviewed-on: http://gerrit.openafs.org/7682 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1d175e1e479eaf448a8e65cb918121f73d6b98b0 Author: Andrew Deason Date: Thu Jun 28 15:43:27 2012 -0500 doc: Correct volume size CAUTIONS notes 2 terabytes is 2^41 bytes, not 2^31 bytes. Also clarify that volumes can be much larger than this. FIXES 130188 Reviewed-on: http://gerrit.openafs.org/7598 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 300cbb28b08c2fd3709942cc6c48e7d9369a3394) Change-Id: Iaeb3208673fbbe257a9fa5735c18fbac996b5dda Reviewed-on: http://gerrit.openafs.org/7677 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8e1ee1a7c4598522fa4c25502cd62a94f51efb53 Author: Andrew Deason Date: Thu Jun 28 17:47:32 2012 -0500 doc: Fix whitespace errors Reviewed-on: http://gerrit.openafs.org/7599 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcaa53a6d7289665b64037a0d96ae4c6cbf4f776) Change-Id: I1eac5eaf797f68d8e9f5f7e8df1ba301544b0434 Reviewed-on: http://gerrit.openafs.org/7676 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e5b0879b67a4693c7c41f663ae477f840d934ae6 Author: Andrew Deason Date: Thu Jun 28 15:30:40 2012 -0500 doc: Consolidate CAUTIONS notes about volume size Reviewed-on: http://gerrit.openafs.org/7597 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3ff8ef499c56008f4d2ebf5b81e08e98eb0c0826) Change-Id: Icefd8c8e9eab3b7e539bdae84d498b18780714b5 Reviewed-on: http://gerrit.openafs.org/7675 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6dbe036ba6aee910fab265d4118f8db74385d2fd Author: Jeffrey Altman Date: Mon Jul 2 01:56:35 2012 -0400 Windows: export roken allocators Use rk_alloc, rk_calloc, rk_free, rk_realloc instead of Windows C RTL allocators. The OpenAFS source tree has a bad habit of allocating memory in one module and freeing it in another. This is not a problem for POSIX but is disaster on Windows. This change ensures that all OpenAFS modules share the same allocator. Reviewed-on: http://gerrit.openafs.org/7625 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5e91c3b5d1a70f7af2e04ac74d98ae6b407f169c) Change-Id: I8d0e2d3c6ecf700ebbee6d90826c1d27ca458732 Reviewed-on: http://gerrit.openafs.org/7669 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c600de8cf24da4b026ef524a9990662b8c9b194c Author: Heimdal Developers Date: Mon Jul 2 15:00:30 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to 3fe55728404c602884f16126e9cc60fc5a3d8f20 (switch-from-svn-to-git-2993-g3fe5572) Upstream changes are: Andrew Bartlett (1): Revert "make paranoia check less paranoid" - check that key types strictly match Jeffrey Altman (3): do not include stdint.h unprotected Windows EAFNOSUPPORT defined by VS2010 roken: Use a common allocator for all windows Love Hornquist Astrand (2): add rk_getpwnam_r move windows compat errno constants to after is included Nicolas Williams (7): Fixes to make Heimdal -Wall -Werror clean Make krb5_kuserok() pluggable and add features (including MIT config compat) Generalize token expansion to allow for context-specific tokens Address code review comments (use krb5_enomem()) Make master build on Windows Fix a compiler warning in lib/roken/snprintf.c on 32-bit Ubuntu Move base into lib Roland C. Dowdeswell (3): Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues. Provide support for enctype aliases for ease of use. Additional changes to make -Wshadow build on Ubuntu 10.04. Simon Wilkinson (1): hcrypto: Use correct size for memset in md2 New files are: roken/realloc.c roken/win32_alloc.c Reviewed-on: http://gerrit.openafs.org/7612 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9c0b7be87de83493ca1d5a01326982ce5c8c131b) Change-Id: Ic2d0405e9fa67818e3de5e26beafe96a6fcec34e Reviewed-on: http://gerrit.openafs.org/7668 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c65d97e2b6513afa63bb3b0d68a28111b723661 Author: Simon Wilkinson Date: Mon Jul 2 14:50:10 2012 +0100 roken: Import Windows allocator changes Roken now supports using a single allocator across all of the objects which include that roken library. Two additional objects are required to support this, so add them to the list of symbols that we import. Reviewed-on: http://gerrit.openafs.org/7618 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e05a63045230e732d6abb1f4baf8ed5275e19e69) Change-Id: I2560309da93a8cfda2908ad67c8a83ebc177f4fd Reviewed-on: http://gerrit.openafs.org/7667 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 88108fec2246dc1c2c61b792104270f6464f0ca2 Author: Jeffrey Altman Date: Mon Jul 2 11:49:54 2012 -0400 Windows: HAVE_UINTPTR_T The Windows build has a definition of uintptr_t. Add HAVE_UINTPTR_T to the Windows config.h file. The sources imported from Heimdal make use of it. Reviewed-on: http://gerrit.openafs.org/7623 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a41ab064962ef4865dfa5023c4b314c6f935ed64) Change-Id: Iad64cba28652df03d3c1563c12553d53fb482cfd Reviewed-on: http://gerrit.openafs.org/7666 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f4e781f1b2eeb358a39e1429e77d1a8894d8a595 Author: Jeffrey Altman Date: Mon Jul 2 01:42:35 2012 -0400 Add HAVE_INT64TOINT32 test in stds.h Windows SDK v6.0 and above include a platform specific definition of Int64ToInt32. Use the platform definition when available. Reviewed-on: http://gerrit.openafs.org/7622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 7c2399115153609edc87a4c487d18e7f8b41dcba) Change-Id: I0c7c0ff66cab6e89261265233afb4a9441a539e2 Reviewed-on: http://gerrit.openafs.org/7665 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 48b9016804bd691d29af0fdfec83d51894ca7b42 Author: Jeffrey Altman Date: Mon Jul 2 10:36:22 2012 -0400 Windows: remove unused defines from param.h Remove #if 0 disabled definitions and those for strtoll and strtoull as they are not used anywhere in the tree. strtoll and strtoull will conflict with the next roken.h update. Reviewed-on: http://gerrit.openafs.org/7621 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 6f779c18678d4d9549c2977c2c3c9d15a0f13524) Change-Id: I1944978187b813a027ebecc6918e889ace06ad95 Reviewed-on: http://gerrit.openafs.org/7664 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c1d43ece8ceebdfa7b3037dc25526974d1f1eee8 Author: Jeffrey Altman Date: Mon Jul 2 01:35:43 2012 -0400 Windows: link to afsroken.dll All binaries must be linked against afsroken.dll. Reviewed-on: http://gerrit.openafs.org/7620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 754180b61ee4cb84bd21046afd813b0dc03fad54) Change-Id: I6bb8959e14257d0441490dc0d48b362a699be46f Reviewed-on: http://gerrit.openafs.org/7663 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0dae86e3c4e57d5334889492045f9016147a7760 Author: Jeffrey Altman Date: Mon Jul 2 01:32:25 2012 -0400 Windows: roken.h ordering The order of include files must be afsconfig.h afs/param.h afs/stds.h roken.h Reviewed-on: http://gerrit.openafs.org/7619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3078c4a59240540b085799495270872bc9393912) Change-Id: Id4239598f5d32ec3479bcd8ec739f120bc0e5fc2 Reviewed-on: http://gerrit.openafs.org/7662 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5c88ceaec365562f1b85ef997e235e39aa5e361b Author: Jeffrey Altman Date: Mon Jun 11 14:45:15 2012 -0400 Windows: afslogon is only an authentication provider afslogon.dll is just a Authentication Provider DLL. It does not provide network file system browse and mapping functions. Therefore, do not include the "ProviderPath" registry value when the AuthentProviderPath variable is sufficient. Reviewed-on: http://gerrit.openafs.org/7550 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit d8397c7c320cd8557e4a24a9ff84b029c07b165e) Change-Id: Ia968616663fe0f28f297e59266aff9d3688e0415 Reviewed-on: http://gerrit.openafs.org/7661 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7e4c5a3a65fff70be3933a663bfd62d9c81e044f Author: Simon Wilkinson Date: Wed Apr 18 23:25:33 2012 +0100 roken: Add setprogname Add setprogname to the list of functions that we test for, and replace with a libroken alternative if it is missing. Remove setprogname and getprogname from the AC_CHECK_FUNCS list, as AC_REPLACE_FUNCS is a superset of this test. Reviewed-on: http://gerrit.openafs.org/7250 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit db733e325e558d4f36835639e340ecee94f7fcb5) Change-Id: If26d16f8562ba5e573cbf64252aec8c7f8071f66 Reviewed-on: http://gerrit.openafs.org/7660 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4ac1cb398a55b8ad48b99ecbef02b27ab79718f0 Author: Heimdal Developers Date: Wed Apr 18 23:16:39 2012 +0100 Import of code from heimdal This commit updates the code imported from heimdal to ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408) New files are: roken/setprogname.c Reviewed-on: http://gerrit.openafs.org/7249 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit c0952be8d870cf1fc7837b86b373a100886742e4) Change-Id: I0d9feef001d0aa7b7ac64ce54ac9557870157b5d Reviewed-on: http://gerrit.openafs.org/7659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a267381b8f04400be5839c1a43aff9d155b465c8 Author: Simon Wilkinson Date: Wed Apr 18 23:15:15 2012 +0100 roken: Add setprogname to list of imports Reviewed-on: http://gerrit.openafs.org/7248 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear (cherry picked from commit 02eb5507481a3f05423081df3c1d07597cd36dc4) Change-Id: I949d36331e901b08f39cb955d68154812592c482 Reviewed-on: http://gerrit.openafs.org/7658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a2afb1f4a743faf771218c0ec790218680d553ec Author: Simon Wilkinson Date: Fri Jun 1 13:20:57 2012 -0400 rx: provide mechanism to send a bare abort packet simply put an abort on the wire Reviewed-on: http://gerrit.openafs.org/7562 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5019ecd5fad0846abcd92835411c7b0f3f2170ca) Change-Id: I23f7ea60922aa0d2fbed4015d3ec910bea6817cd Reviewed-on: http://gerrit.openafs.org/7605 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3e6f88c98424e7ebe375871ce1b881721721c3f2 Author: Andrew Deason Date: Mon Jun 18 15:06:49 2012 -0500 doc: Consolidate NetRestrict format docmentation We were specifying exactly the same format in two different places; consolidate them into one place. In addition, explicitly say there are is no way to specify a range of addresses, in case some people are confused by the previous versions of this man page that erroneously said you could use 255 as a wildcard. Reviewed-on: http://gerrit.openafs.org/7565 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit d4bab02f023f53041c3ac58fd75cffd27ec92df0) Change-Id: I13b7374f8b7378413e0ed1cfeae7e1a83702c447 Reviewed-on: http://gerrit.openafs.org/7608 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e66f4a891355f36911eddd6ec39c831447fae4e5 Author: Andrew Deason Date: Mon Jun 18 15:02:09 2012 -0500 doc: Remove reference to NetRestrict wildcards Commit 80fc888a9223050481de932233fe7121a48df194 got some of this, but forgot the other reference. We don't support these anywhere, so remove it here, too. FIXES 125340 Reviewed-on: http://gerrit.openafs.org/7564 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4ae005062e2c927b77ea23d95934d5af463878b3) Change-Id: Ib3ef062cb0d7bf448e5282d6c855ded5afc2f22a Reviewed-on: http://gerrit.openafs.org/7607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3da1ccf09431162b5d03186c3a6b23986dead6a8 Author: Derrick Brashear Date: Fri Jun 1 13:16:31 2012 -0400 rx: abort on missing service currently rx does not send an abort if a service does not exist; it quietly ignores the packet. provide a hint we have done so. Reviewed-on: http://gerrit.openafs.org/7563 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1) Change-Id: Ice2ba42988ff2f65a45511505ef4e1d78dc94901 Reviewed-on: http://gerrit.openafs.org/7606 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5df006f89bdfb77a742c30a7924854091e3c0cdc Author: Simon Wilkinson Date: Thu Jun 7 20:46:27 2012 +0100 rx: Constify rx_opaque_populate rx_opaque_populate doesn't modify the data passed into it, so make that argument const Reviewed-on: http://gerrit.openafs.org/7557 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit c855dd726a6f2681bf51a9596ec600a8cc88fb59) Change-Id: I7f73646a4d6473c88937a45e5696aaa4ea4e4c66 Reviewed-on: http://gerrit.openafs.org/7604 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c4f72e041e5872b87479d9cb6e0c17ddabf21cf Author: Jeffrey Altman Date: Wed Jun 6 12:13:08 2012 -0400 Windows: 1.7.15 (1.7.1500.0) Change-Id: I2b9a9cceb005eb3c61645e9bbccf376092675eb3 Reviewed-on: http://gerrit.openafs.org/7534 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 48ec8209d3193a5b684687e2f35abd2b78a9ddb4 Author: Jeffrey Altman Date: Wed Jun 6 12:10:16 2012 -0400 Windows: 1.7.15 change log Change-Id: Ic0ebd6db72addf1b2b2b6f7cf3a89b143273e4ac Reviewed-on: http://gerrit.openafs.org/7533 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 81e92593ee734f51097b7c02746fdcd304a0a7ed Author: Jeffrey Altman Date: Tue Jun 5 23:25:08 2012 -0400 windows: AFSQueryVolumeInfo exception info Protect against NULL FileObject or ObjectInformation. Log additional information when an exception is caught in AFSQueryVolumeInfo. Reviewed-on: http://gerrit.openafs.org/7525 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0d2c1dfd5510e9c84cb3b56c00370f0fc114e87b) Change-Id: I66e32c1e4227c3be19eb42a2dcf128821e4a0b80 Reviewed-on: http://gerrit.openafs.org/7532 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0f1f1659469e0d8e8b4ebb255ebeae0f73e03ff Author: Jeffrey Altman Date: Tue Jun 5 23:07:40 2012 -0400 Windows: SMB GetFileAttributes support commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41 added a GetFileAttributes query to the pioctl interface to protect against printing pages on printers with a broken smb protocol implementation. This patchset adds support for GetFileAttribute on _._AFS_IOCTL_._ files to the SMB implementation. Reviewed-on: http://gerrit.openafs.org/7524 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 371af87a23b61187ca9d54c8e6819f2121fbf1db) Change-Id: I40f8c8c7f36d354eccc180758d9c7467af6a00bb Reviewed-on: http://gerrit.openafs.org/7531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 818e3794584ea55bd8921bfd498b70b0a934ded9 Author: Jeffrey Altman Date: Sat May 26 19:16:47 2012 -0400 Windows: Introduce AFSFreeExtent() Consolidate all operations necessary to free an extent in a single function, AFSFreeExtent(). Reviewed-on: http://gerrit.openafs.org/7521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6e704d967334a3f990e2ba1c758e4f054234e97e) Change-Id: I6514159214add9265647dcc82aef64a7bd3768da Reviewed-on: http://gerrit.openafs.org/7530 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 806319cc15e43fe30c7fed83f7eb2755f665858e Author: Jeffrey Altman Date: Sat May 26 18:11:06 2012 -0400 Windows: Adjust extent release strategy All extents were flushed whenever AFSReleaseExtentsWithFlush was executed. This included a call at the completion of each NonCached Read operation which could result in heavy thrashing as the data would be released prior to it being needed by the application. This patchset makes the following adjustments. First, AFSReleaseExtentsWithFlush() has been modified to release all but 1024 extents belonging to the file. Second, NonCached Reads only execute AFSReleaseExtentsWithFlush() when there are more than 4096 extents associated with the file. Third, AFSReleaseExtentsWithFlush() now has a 'bReleaseAll' parameter which is used for calls from AFSCleanup() and AFSFlushExtents() which need to be able to flush all extents attached to a FCB. Reviewed-on: http://gerrit.openafs.org/7520 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cee6a383d3d1732e78827c839ee9513847e03aa6) Change-Id: I683d8188523ce991ad7c461178984c098ddb5faa Reviewed-on: http://gerrit.openafs.org/7529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 08088f359bb61d0f979c811f7223ff579067f2cf Author: Jeffrey Altman Date: Sat May 26 18:09:30 2012 -0400 Windows: AFSRedir code cleanup Remove unnecessary intermediate variables. Do not drop lock only to reacquire. Formatting. Reviewed-on: http://gerrit.openafs.org/7519 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5335f77bd56b7a94fd0225477fe7b7a707df86b7) Change-Id: Ib0330bbf0331f669460969ea8b4a9c9f82e448df Reviewed-on: http://gerrit.openafs.org/7528 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 66d256fa83f2751bbc5304c68037156d0576a195 Author: Jeffrey Altman Date: Sat May 26 18:06:07 2012 -0400 Windows: Remove extent from all skip lists Before freeing the memory for an Extent object, the extent must be removed from all of the extent skip lists. Otherwise, the lists will be corrupted. Reviewed-on: http://gerrit.openafs.org/7518 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ed0eb70f36121ca5cacbf0b87ab9d05bfbb526b8) Change-Id: I0d07f213e2132297c5e3d8a7bf5cad94b5854cf7 Reviewed-on: http://gerrit.openafs.org/7527 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 273c579c41dd6ab6dd41d619a1e0d515ab41695c Author: Jeffrey Altman Date: Sat May 26 18:04:25 2012 -0400 Windows: consoldiate NextExtent() implementations Both AFSExtentsSupport.cpp and AFSIoSupport.cpp provided NextExtent() implementations. The AFSExtentsSupport version was more general. Use that one for both modules. Reviewed-on: http://gerrit.openafs.org/7517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c5f32b315982bf23f33d0395f404fe93563f0b8d) Change-Id: Ifaf9132f0217590267a2b0486d8b00e65aa583b8 Reviewed-on: http://gerrit.openafs.org/7526 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 07b134b088cb493555e9805f30a99cc519081c41 Author: Jeffrey Altman Date: Sun May 27 11:20:11 2012 -0400 Windows: Protect against null volp dereference In cm_RecycleSCache cm_GetVolumeByFID can fail leaving 'volp' a NULL pointer. Do not call cm_PutVolume() if cm_GetVolumeByFID fails. Reviewed-on: http://gerrit.openafs.org/7506 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e94b2338691d9450749e5f3e51f85e99f90b4bea) Change-Id: I051c641f49556ec4d6f82501243ac2a085787ac5 Reviewed-on: http://gerrit.openafs.org/7512 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 053f2253ffbbd9b576a5b4c46b3df3e4d500bf9e Author: Jeffrey Altman Date: Fri May 25 21:47:23 2012 -0400 Windows: Avoid deadlock on ProcessTree Lock Reviewed-on: http://gerrit.openafs.org/7505 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce8d0aefd1a6915df281ec2551b3f090c2a3b322) Change-Id: Id7e9ba86dd886c8160ac967fa44e657bfc603258 Reviewed-on: http://gerrit.openafs.org/7511 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5254a3abcec5e9b44a7e97a9b41118eb608bae93 Author: Jeffrey Altman Date: Thu May 24 20:46:27 2012 -0400 Windows: Add CCB NonPaged Resource for synchronization Add a NonPaged ERESOURCE object to the AFS_CCB structure for use in synchronizing access to the Ccb->Flags field and the construction of Directory Snapshots. Reviewed-on: http://gerrit.openafs.org/7478 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25948ccbc369087958d2159fb7dd995c21c92b20) Change-Id: I00a4f212302911fa89edff74241e7228009156d4 Reviewed-on: http://gerrit.openafs.org/7510 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 79f55a86d45bf19f13798e142b7f75fe5dbaeddb Author: Jeffrey Altman Date: Thu May 24 20:45:07 2012 -0400 Windows: Make CCB_FLAGS_DIRECTORY_QUERY_MAPPED consistent Use CCB_FLAG_DIRECTORY_QUERY_MAPPED instead of CCB_FLAGS_DIRECTORY_QUERY_MAPPED. Reviewed-on: http://gerrit.openafs.org/7477 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fffce9aee4c7c93e140eb56e449f9a9ff6345659) Change-Id: I535d88dcd4507bb6b187218c8eeee20d26ffbd84 Reviewed-on: http://gerrit.openafs.org/7509 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 227fbefac733789a7597b8b3b8dc7fda23fa5f0a Author: Jeffrey Altman Date: Thu May 24 17:47:25 2012 -0400 Windows: Remove unused async read/write operations Removing dead code. Reviewed-on: http://gerrit.openafs.org/7476 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 611436eaec4db67a856b0617c00224d4359d804a) Change-Id: I77c61b5387e98bc34141d36b27a76628457adb04 Reviewed-on: http://gerrit.openafs.org/7508 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8f18ee0c1eed4bd3aa83bfae419e93fbca6ab62d Author: Jeffrey Altman Date: Thu May 24 04:57:19 2012 -0400 Windows: Avoid deadlock on VolumeCB->VolumeLock AFSPrimaryVolumeWorkerThread() holds VolumeCB->VolumeLock SHARED across the call to AFSCleanupFcb() -> CcPurgeCacheSection(). If a filter driver such as Sophos (savonaccessfilter.sys -> savonaccesscontrol.sys) triggers an AFSCreate() in response to the cache section being purged that will force the evaluation of the file path by AFSLocateNameEntry(). If the path contains a mount point that requires validation, AFSBuildMountPointTarget() is called which in turn required the VolumeCB->VolumeLock EXCL. AFSBuildMountPointTarget() only requires the VolumeCB->VolumeLock if the VolumeCB->RootFcb == NULL. That should only be true if the VolumeCB was allocated by AFSInitVolume() or under very rare race conditions. This patchset refactors AFSInitVolume() to ensure that it holds an extra VolumeCB->VolumeReferenceCount reference. This reference is used to assist in the refactoring of AFSBuildRootVolume() and AFSBuildMountPointTarget() to avoid races with volume root object invalidation as well as permitting the VolumeCB->VolumeLock to be ignored in the common case. Avoiding the acquisition of VolumeCB->VolumeLock during mount point target evaluation has the additional benefit of reducing lock contention during path evaluation. FIXES 130812 Reviewed-on: http://gerrit.openafs.org/7474 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 06a602bfd40661ef89b3d6b39dd8574015a15b92) Change-Id: I817dc51ae57adb145cbd9078c86f9df12b31fd28 Reviewed-on: http://gerrit.openafs.org/7507 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 17935ccac0746a6a00ae89f6a927a06079bf81b5 Author: Jeffrey Altman Date: Mon May 21 10:41:49 2012 -0400 Windows: Version 1.7.14 (1.7.1400.0) Change-Id: I19b416ddddf2782e26e14d72cd69ca33a70aadb7 Reviewed-on: http://gerrit.openafs.org/7427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5bc744393a448c5859f2bd5910a473b820945966 Author: Jeffrey Altman Date: Mon May 21 10:41:11 2012 -0400 Windows: Change Log for 1.7.14 Change-Id: I9bfc760ca369a1eda4c5ffcfcd37ffd1c32e9e39 Reviewed-on: http://gerrit.openafs.org/7426 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9c5f88462aea016dd6b9c71775b7d33b8269b385 Author: Jeffrey Altman Date: Fri May 18 16:31:19 2012 -0400 Windows: avoid deadlock TreeLock vs Fcb Resource Cannot call AFSPerformObjectInvalidate directly because ObjectInfoCB->Specific.Directory.DirectoryNodeHdr.TreeLock is held during the sequence AFSVerifyEntry->AFSValidateDirectoryCache->AFSVerifyDirectoryContent and AFSPerformObjectInvalidate requires the Fcb->NPFcb->Resource which must be held prior to the TreeLock. Reviewed-on: http://gerrit.openafs.org/7423 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3a7dbe331580e418d1bdd5d75769512bb5e38cee) Change-Id: I4c2e41d86576a98aaac1bb9a594f81370bd6e80f Reviewed-on: http://gerrit.openafs.org/7425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5e9a300fed955a6a60a82b3a39b5bfafca8d1db7 Author: Jeffrey Altman Date: Fri May 18 10:19:13 2012 -0400 Windows: buf redir queue mgmt scp can be null buf_InsertToRedirQueue, buf_RemoveFromRedirQueue, and buf_MoveToHeadOfRedirQueue can be passed a NULL cm_scache_t pointer. If the pointer is NULL (as is the case during buf_Init() processing) the scp->redirMx must not be obtained or a crash will occur. Reviewed-on: http://gerrit.openafs.org/7422 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 564c9733e5f1f1bd2417063e3ccd8228ca763a2e) Change-Id: I87937a1e43375b09a993cebb59e5c8ce8f23ce84 Reviewed-on: http://gerrit.openafs.org/7424 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9ffca21ee2de29ad5582a9853c331889c00b65c2 Author: Jeffrey Altman Date: Wed May 16 23:26:00 2012 -0400 Windows: Version 1.7.13 (1.7.1300.0) Change-Id: I387b7b52bdf1158a5cb9fa07f7dcff24efdd170e Reviewed-on: http://gerrit.openafs.org/7417 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit de25527993ca50d6636669f376e882dc40e49387 Author: Jeffrey Altman Date: Wed May 16 23:25:19 2012 -0400 Windows: Change Log for 1.7.13 Change-Id: I7fa493bf48c6938055d36ac7a0952494264e4749 Reviewed-on: http://gerrit.openafs.org/7416 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3e7897d2b85712acfa40ee633f52f097115f16dc Author: Jeffrey Altman Date: Wed May 16 09:52:00 2012 -0400 Windows: Apply MAX_FID_COUNT to AFS Redirector Provide consistency between the SMB path parser and the AFS redirector path processing by using the same constant, MAX_FID_COUNT, for both. MAX_FID_COUNT is the maximum number of unique file ids that can exist in a path after all mount points and symlinks have been expanded. The current value is 512. Reviewed-on: http://gerrit.openafs.org/7412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e04f324b5dc87391d9fc08820a4ff22b7dda84c3) Change-Id: I0671e60db76bcc4f1148c4fed8a28978b6a4d505 Reviewed-on: http://gerrit.openafs.org/7415 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d6f610af93b8318424c4bd9a870ce20fc9852a28 Author: Jeffrey Altman Date: Mon May 14 11:11:57 2012 -0400 Windows: AFSTearDownExtents may experience active extents If there are extents with a non-zero ActiveCount when AFSTearDownExtents() is executed, it must leave them alone and attached to the File Control Block. This has implications for its callers, especially AFSCleanupFcb() since it may be the case that a Cleanup cannot be completed. The AFSPrimaryVolumeWorker thread must therefore check after calling AFSCleanupFcb() whether or not the Fcb ExtentCount is zero before calling AFSRemoveFcb(). Reviewed-on: http://gerrit.openafs.org/7406 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 94f96c6aae142478bf0824e7c3a3a810494a123d) Change-Id: I64f8c98af9aab0d56df9c9f1646aee0c107ab437 Reviewed-on: http://gerrit.openafs.org/7414 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a5e2435b06a31c392a4c755e62f0f956d565d762 Author: Jeffrey Altman Date: Tue May 15 23:27:36 2012 -0400 Windows: avoid duplicate work cm_Analyze During VNOVOL processing, if the volume is replicated and the server reference status is "not busy", set the status to busy and avoid calling cm_SetServerBusyStatus() because that function mirrors the loop that is already being processed. Reviewed-on: http://gerrit.openafs.org/7411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9a768fb7ac06c887c45f6ed144c312fe357ab1e) Change-Id: I22dc8434463ad517986f37fc9f465e6313961935 Reviewed-on: http://gerrit.openafs.org/7413 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 22f9ad8c8275466c65b6ce221a62007d5031e299 Author: Jeffrey Altman Date: Tue May 15 00:23:17 2012 -0400 Windows: init section ptrs for pioctl files FIXES 130783 Reviewed-on: http://gerrit.openafs.org/7407 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 97581f751024527d1090566f2d59fd1b14235b67) Change-Id: Ic0a8ff1159f61c624def9d69473fd4b21d335712 Reviewed-on: http://gerrit.openafs.org/7410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 06ce992d6599f7a6a2bb09eee8b9370c3c20f99f Author: Jeffrey Altman Date: Mon May 14 00:12:17 2012 -0400 Windows: Redir Ioctl thread safety A crash dump showed that it is possible for a Cleanup to race with a Read from the ioctl file. Add reference counting to protect against crashing under such a circumstance. Reviewed-on: http://gerrit.openafs.org/7405 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac08a0c30d1b8f4f5f13a6e78b86d32e2cb34f65) Change-Id: If0a8b29c15ae4efcbf9239277118049063626c1a Reviewed-on: http://gerrit.openafs.org/7409 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 08354ffea087b96a102a7647f63b15fb3b6a2b8b Author: Jeffrey Altman Date: Fri May 11 19:24:54 2012 -0400 Windows: Permit Media Player to work with mapped drives Windows Media Player was failing to play media files from mapped drives if the mapping was to a directory several levels below \\afs\cellname\. The code to permit SUBST drive letters to work got in the way during NPGetConnection processing. Try to get the connection info without the drive substitution logic. Try again with the drive substitution if the result is no connection present. FIXES 130757 Reviewed-on: http://gerrit.openafs.org/7402 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a160606616cae6e047d97d4e86f075ebe8c2e366) Change-Id: I451cb15843961ebd0efb9535e837db8c6b1dc56c Reviewed-on: http://gerrit.openafs.org/7408 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef449b78b82fa43df07cd35fafc74c77c6c152e6 Author: Mark Vitale Date: Wed May 2 13:55:16 2012 -0400 DOC: vos convertROtoRW security requirements They were copied from another command; corrected them. Reviewed-on: http://gerrit.openafs.org/7305 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Ken Dreyer Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit a2f523b50592e261fe9cd3ef32978e786011c3c7) Change-Id: Ie43754053461b472ab0885c40d9422daa16bb854 Reviewed-on: http://gerrit.openafs.org/7404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a19f5d33c2a4db714a1e0f120d7ef23a0aa7821f Author: Ken Dreyer Date: Fri Mar 16 13:37:20 2012 -0600 doc: add Windows section to fs newcell fs newcell works slightly differently on Windows. Document the differences in the man page. FIXES 125094 Reviewed-on: http://gerrit.openafs.org/6919 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry picked from commit 186158c9eb2379ec350831b8fb244c51ae234a6e) Change-Id: I8ad8d0ace88b3399319b92cd4aed55c495be6528 Reviewed-on: http://gerrit.openafs.org/7403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57f04d788400e0d96287da1ab0d1552339621d50 Author: Jeffrey Altman Date: Wed May 9 10:44:39 2012 -0400 Windows: cm_GetBuffer do not retry if biod empty Reviewed-on: http://gerrit.openafs.org/7390 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 90ecc0ff72607afeebafd9355a4fa42d5d994180) Change-Id: I3b0baeff7c0f78a79ad430849dee87e5a4d36eee Reviewed-on: http://gerrit.openafs.org/7397 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 24f3348a6e1686d7d229afb5f59f9adb9c9c6edd Author: Jeffrey Altman Date: Thu May 10 08:36:33 2012 -0400 Windows: Avoid deadlock during "fs memdump" When the afs redirector is in use, it is possible that "fs memdump" could be executed while all of the pages in the Windows page cache are dirty with data that must be purged and flushed to \\afs. In such a situation it is not safe for afsd_service.exe to hold global locks such as buf_globalLock, cm_scacheLock, etc. while performing WriteFile() calls against %TEMP%\afsd_alloc.log if afsd_alloc.log was opened without the FILE_FLAG_NO_BUFFERING flag. Doing so can result in a deadlock as it can become impossible for the Windows page cache to purge data to complete the WriteFile() as all extent operations block waiting for the global lock to be cleared. The correct long term approach would be to use the FILE_FLAG_NO_BUFFERING flag when opening %TEMP%\afsd_alloc.log. However, this requires that all writes to the file be performed using buffers that are consistent with the drive geometry. Such an approach would be incompatible with the _CrtMemDumpAllObjectsSince() operation and would require a redesign of the current interfaces. See http://msdn.microsoft.com/en-us/library/windows/desktop/cc644950(v=vs.85).aspx for requirements when using non-buffered writes. The short term fix is to dump the contents without holding the global locks. This can result in an inconsistent view of the world but will ensure that deadlocks are avoided. This patchset makes such a change when the afs redirector is in use. Reviewed-on: http://gerrit.openafs.org/7391 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c6782b86d77f8653d8dd4bc27d0cbcca5f13747f) Change-Id: I8480426dde949c2e5c733b511b5900c3b4cac172 Reviewed-on: http://gerrit.openafs.org/7396 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 77797ff1c547498874bde72c3dd5a22062aa515a Author: Jeffrey Altman Date: Mon May 7 13:19:54 2012 -0400 Windows: Version 1.7.12 (1.7.1200.0) Change-Id: I55a56f2f18326a42985aad61d19bd81a6adf8230 Reviewed-on: http://gerrit.openafs.org/7371 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 423cedc8bab477356fc566f8a36aceeb0b6af335 Author: Jeffrey Altman Date: Sun May 6 18:13:14 2012 -0400 Windows: 1.7.12 Change Log Change-Id: Ib641770d8285f7627a8477c59eea966f888fe7f9 Reviewed-on: http://gerrit.openafs.org/7362 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7fe3c7704c723194d4f6d282c3dd479d77478fae Author: Jeffrey Altman Date: Mon May 7 11:35:07 2012 -0400 Windows: cleanup redirector pipes If pipe creation fails, cleanup the mess. At shutdown, if there are pipes that have not been closed by Windows, clean them up. This is just to ensure that at shutdown the reference counts of cm_scache_t objects in the cache are reset to zero. Reviewed-on: http://gerrit.openafs.org/7366 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e9e14b551901db8f5be4d4c6060c709d2a3596be) Change-Id: If1441b12c5aa8d1496d21aa27179f34f6d3e2d2b Reviewed-on: http://gerrit.openafs.org/7370 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2dc9a798983e072cf13f86356ba0e73ef607a407 Author: Jeffrey Altman Date: Mon May 7 00:56:11 2012 -0400 Windows: Correct refcount leak The new duplicate avoidance code in cm_QueueBKGRequest() leaked a cm_scache_t and a cm_user_t reference count. Reviewed-on: http://gerrit.openafs.org/7365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 542dad75733354a6fb1e912d3ff75d414459078b) Change-Id: Ib21026219cda4e6edec2ecf5a0f9a623bd152fea Reviewed-on: http://gerrit.openafs.org/7369 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 872a9f2dd939fb938917960622b93f69b2fabf9c Author: Jeffrey Altman Date: Mon May 7 00:54:27 2012 -0400 Windows: fix build with DEBUG_REFCOUNT cm_GetSCache added a new parameter. The same parameter is required for the cm_GetSCache macro when DEBUG_REFCOUNT is defined at build time. Reviewed-on: http://gerrit.openafs.org/7364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6da91dfcb8ffa83a4663e73359abc6c8b6128e34) Change-Id: I9c8e85cc295571ecf80c84e0d8e56fff9c204dd7 Reviewed-on: http://gerrit.openafs.org/7368 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8f85819c3e4c32589a770c596ec055e58f69b7b1 Author: Jeffrey Altman Date: Sun May 6 19:31:03 2012 -0400 Windows: Checksum server lists on Volume Errors For VMOVED, VNOVOL and VOFFLINE checksum the server lists for the current volume. If the server list changes as a result of the forced volume location update, do not set the updated flag which prevents subsequent volume location updates for the current cm_req object. This combined with the previous patchset to filter volume locations based upon the VLSF_NEWREPSITE flag will avoid outages during vos release operations. Reviewed-on: http://gerrit.openafs.org/7361 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4fce72b0e6ddabce64af5fb7cef35492933f58d8) Change-Id: Ie2165b5698171fba4959228a4aafcf85915d502f Reviewed-on: http://gerrit.openafs.org/7363 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b508c5a6fe0a31e384d088fb95147bf4c2b2f857 Author: Jeffrey Altman Date: Sun May 6 09:54:55 2012 -0400 Windows: cm_SetServerBusyState use cm_ServerEqual When the busy state of a server is set it must apply to all server references if the server is multi-homed. Use cm_ServerEqual() to do so. Reviewed-on: http://gerrit.openafs.org/7355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 345d643729ed588c4e49e69607bee5793809b01d) Change-Id: I1448923b26bf66abc8dfb04b05afcccd1e57f6c4 Reviewed-on: http://gerrit.openafs.org/7360 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 99d925dc0a51159a13f041692ad5c6654598074c Author: Jeffrey Altman Date: Sat May 5 21:37:00 2012 -0400 Windows: Track Mixed RO Volume Release State If the volume location information indicates that a replica site is VLSF_NEWREPSITE then it implies that some of the replicas are out of date. Ignore the out of date replicas when constructing the list and force a volume location list reset every five minutes while the replica site info is mixed. Reviewed-on: http://gerrit.openafs.org/7354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 193a56aa664ccfb39a3447f81735f2183a914c76) Change-Id: I7efb0cefcf3b59065d7bc276f3786796d4eb3242 Reviewed-on: http://gerrit.openafs.org/7359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 57ceebef318b231b4061a9180b208dbcfa4b1472 Author: Jeffrey Altman Date: Sat May 5 20:46:08 2012 -0400 Windows: Make CM resilient to transient VNOVOL The 1.6.0 and 1.6.1 file servers send transient VNOVOL errors which are no indicative of the volume not being present. For example, VNOVOL can be sent during a transition to a VBUSY state prior to salvaging or when cloning a .backup volume instance. As a result the cache manager must attempt at least one retry when a VNOVOL is receive but there are no changes to the volume location information. This patchset records the VNOVOL error in the cm_req_t structure If the volume is replicated, the volume's server reference into a busy state. If the volume is not replicated, the thread is paused for two seconds. In both cases, the request is retried. If the VNOVOL error is received a second time from the same server, the volume server reference is deleted as before. This is done to prevent repeated requests to the VLDB server and the file server that are expected to fail. The server reference will be restored to the volume on the next volume location update. Reviewed-on: http://gerrit.openafs.org/7353 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1af906799b2de90d41139dadaf2dd654e4fd2df3) Change-Id: I3ce391face92e1e48031bc3ccea5d6603c51a745 Reviewed-on: http://gerrit.openafs.org/7358 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5f76de62563d65810b7ec528ad67dc2eb0c454b3 Author: Jeffrey Altman Date: Sat May 5 19:11:07 2012 -0400 Windows: cm_GetNewSCache drop lock to permit change In cm_GetNewSCache the entire LRU queue is searched for a cm_scache_t object that is safe to recycle. If none are the LRU queue was immediately searched again without dropping the cm_scacheLock or taking a pause. As a result it is quite possible that a thread about to release a cm_scache_t was blocked from doing so. This patchset factors some of the logic a bit differently to improve readability and adds new log messages to help diagnose the cause of a problem if no cm_scache_t ever becomes available. Reviewed-on: http://gerrit.openafs.org/7352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 46c1f1391b6e1b95798e183b8f34cba5c074e0ad) Change-Id: Ieab2d8c0e6c725d4d0048dfb57c576bcc8899ca9 Reviewed-on: http://gerrit.openafs.org/7357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2d734604f642d0e452a691bd723ce88b886489c3 Author: Jeffrey Altman Date: Sat May 5 13:50:36 2012 -0400 Windows: Remove dead code in AFSRead.cpp Reviewed-on: http://gerrit.openafs.org/7351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dbab42ca724668a8d0b0e33dd998fa9312b781d1) Change-Id: Id6ca18369babca5407af535df2cac97db2f8b8bf Reviewed-on: http://gerrit.openafs.org/7356 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4fcaa4d08e7c9eb263fde25fc08db8bc1b65e80f Author: Jeffrey Altman Date: Thu May 3 20:01:22 2012 -0400 Windows: FCB cleanup must be done before ObjectInfo When processing the cleanup and destruction of a File Control Block the related ObjectInfoCB is required for proper cleanup. Reorganize the AFSPrimaryVolumeWorkerThread logic to ensure that this is true. This involves dropping the VolumeCB->ObjectInfoTree.TreeLock around the AFSCleanupFcb() call. While the lock is released it is possible for the ObjectInfoCB->OpenReferenceCount to change. Therefore, new checks must be added after the lock is re-acquired to ensure that an in-use object is not destroyed. Reviewed-on: http://gerrit.openafs.org/7327 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f76cf9a3fb30b8c89c91ca10eaff8308cab9630a) Change-Id: I26590ca31da2b363fa9eb5f450425c42ae42f6a5 Reviewed-on: http://gerrit.openafs.org/7348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d2ce6622b81132717c80380a31074423300059cc Author: Jeffrey Altman Date: Thu May 3 19:58:31 2012 -0400 Windows: AFSInitFcb STATUS_REPARSE cleanup If a race is detected when creating a new File Control Block in AFSInitFcb() the Fcb Header must be torn down and the ExtentsResource and DirtyExtentsListLock must be deleted prior to freeing the pool memory. Reviewed-on: http://gerrit.openafs.org/7326 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e691a757d6f43fa11e3b9a84cf5cbb151a8e9a3b) Change-Id: I89a7746527500892bfffa0661cc8320887a52f7a Reviewed-on: http://gerrit.openafs.org/7347 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c431d39eb05bab87e75686cb5433b84ae8fbfe2b Author: Jeffrey Altman Date: Wed May 2 18:20:45 2012 -0400 Windows: cm_BkgFetch do not impose arbitrary timeout The afs redirector will queue extent requests for the entire file if it is being copied to local disk as long as there is enough page cache space to store it. If the file is 8GB and the bandwidth from the file server is 100K/second it may take a while to get to the end of the request queue. Do not arbitrarily time out the requests. Reviewed-on: http://gerrit.openafs.org/7320 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f12a20e2279dc9446a1b74217c9995e3d9fc099b) Change-Id: Ibb1da787cef20eb1ffbedd11252bae68872efbef Reviewed-on: http://gerrit.openafs.org/7346 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5130681fa2d4a35d3f0b578d92c5db1892fdfb18 Author: Jeffrey Altman Date: Wed May 2 18:05:26 2012 -0400 Windows: Treat all cached writes as write-through Treat all writes that are cached in the windows page cache as write-through requests so that they are delivered immediately to the AFS cache. The upside is that the afsd service can begin to store data to the file server immediately which can be of significant importance whe the AFSCache is larger than the file size and the file size is large and the bandwidth to the file server is slow. In that situation the entire file can be written into the windows page cache and will only be flushed to disk at the last handle close on the file. The downside is that all data will be written to the file server including that for files that will later have the delete pending flag applied. Reviewed-on: http://gerrit.openafs.org/7319 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b12a038b487a47e99700c0d51273aee37aecbfca) Change-Id: Ic02b98c321d5ab28ded9a6a97f4f181de216b7b4 Reviewed-on: http://gerrit.openafs.org/7345 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b95f16bda5f557613adc3f5a63bbab225583c0e0 Author: Jeffrey Altman Date: Wed May 2 18:04:23 2012 -0400 Windows: AFSQueueFlushExtents permit NULL AuthGroup If the AuthGroup is NULL, search for an AuthGroup to use when queuing the flush extents request. Reviewed-on: http://gerrit.openafs.org/7318 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fb70aab0e06099bbfe9b1fa388722d0b28f81a3) Change-Id: I4f9ffd4b75413a0bbdd1cfd2eb0de3f9aa0b6a4f Reviewed-on: http://gerrit.openafs.org/7344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 71b52dca2b4fb11bbc2f8f9fa6ce169df60078e1 Author: Jeffrey Altman Date: Wed May 2 18:02:28 2012 -0400 Windows: refactor AFSCleanupFcb move the checks for deleted and invalid files earlier in the function to simplify other conditional tests. Reviewed-on: http://gerrit.openafs.org/7317 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba8e60d70a74fc2c6899b29f330a5bfa59175912) Change-Id: I1094c224ae20eb5e8d248acd3f180ee61f7f57dc Reviewed-on: http://gerrit.openafs.org/7343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2154709ee2fadd8eeaf224a6153131e63c1ff59b Author: Jeffrey Altman Date: Wed May 2 18:01:31 2012 -0400 Windows: correct typos or mistaken comments Reviewed-on: http://gerrit.openafs.org/7316 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 23bec3fe9f12c0af08f03b0b9cb70add7be859ba) Change-Id: If6f09be94e224eb1b7ce51eb8e8a8fb83eef6da6 Reviewed-on: http://gerrit.openafs.org/7342 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c43a1ad5aca64586dc91cc27df6c72a69af6db45 Author: Jeffrey Altman Date: Wed May 2 17:58:39 2012 -0400 Windows: RDR_RequestFileExtentsAsync set current DV if the buffer returned from cm_GetBuffer() has an offset that is beyond the serverLength and it has a "bad" data version, set the data version to the current value. This is for debugging clarity. Reviewed-on: http://gerrit.openafs.org/7315 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f86b17ab2b9ea75dacfcb508f138256c3827655b) Change-Id: I8465581809a88f8fb7d27d9521d115312a9ff99e Reviewed-on: http://gerrit.openafs.org/7341 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 75ddd7d9fd56aca0dd173ba6040386926ab34aca Author: Jeffrey Altman Date: Wed May 2 17:52:44 2012 -0400 Windows: refactor cm_GetBuffer avoid BIOD construction Constructing a BIOD is a very expensive operation as it requires obtaining exclusive locks on each and every buffer that in the collection. The prior code would construct a BIOD for a chunk worth of buffers and then check to see if the current buffer is beyond the serverLength or the truncation position. If so, the buffer is cleared and the buffer is returned as current after releasing the BIOD. This is very wasteful. Instead, check every buffer in the BIOD to see if it should be made current or not. If yes, do so before releasing the BIOD. This permits the construction of the BIOD to be avoided for the rest of the buffers in the chunk. Reviewed-on: http://gerrit.openafs.org/7314 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a7fec07348889e9455ccec3b5028aec385b83e5f) Change-Id: Ie7dbf5191e37bba8ed5ad9aab0b840da6ccdeccc Reviewed-on: http://gerrit.openafs.org/7340 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6da62eb7b586ad48adbd7f4227a5fdd305087bfe Author: Jeffrey Altman Date: Wed May 2 17:47:46 2012 -0400 Windows: cm_InitDaemon initialize cm_bkgQueueCountp[] Reviewed-on: http://gerrit.openafs.org/7313 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6b602e59af8d360f7ca2c48734477c21a94396af) Change-Id: I2cd62154321169c553da6404f82d7fa84a1e8717 Reviewed-on: http://gerrit.openafs.org/7339 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d3d867db8fd65edf3284d2f07c4caef1d8c002a3 Author: Jeffrey Altman Date: Wed May 2 17:42:59 2012 -0400 Windows: cm_QueueBKGRequest improvements Do not add duplicate requests into the queue. Outstanding extent requests will be re-issued by the afs redirector on a periodic basis while waiting for them to be satisfied. If they are pending there is no need to remember them a second time. Use separate queues for Fetch and Store operations. Store operations might be blocked on the file server but a Fetch operation might be served from the cache. Reviewed-on: http://gerrit.openafs.org/7312 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b750d82a8460cc1bd5a5761ed160b09ac5c132f5) Change-Id: I0af9e58dca47b552ad8949a77bbe6e79fc65883b Reviewed-on: http://gerrit.openafs.org/7338 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c3fd5816caf0159278a74dfc6f4d73ac777088cb Author: Jeffrey Altman Date: Wed May 2 17:39:12 2012 -0400 Windows: buf_GetNewLocked skip redirector owned buffers If a buffer is owned by the afs redirector, regardless of whether or not it is dirty, do not use it. Reviewed-on: http://gerrit.openafs.org/7311 Reviewed-by: Chas Williams - CONTRACTOR Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ce7fe9ccfbfe0fd17416758357036881d5d2b5f4) Change-Id: I560a6046f2e5dc5502c37e6e4d64c4beb424d9bb Reviewed-on: http://gerrit.openafs.org/7337 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7aedb1f9ccf0bc111ad1a3ded531e781ca8371ab Author: Jeffrey Altman Date: Wed May 2 16:57:11 2012 -0400 Windows: buf_RemoveFromRedirQueue in buf_Init use buf_RemoveFromRedirQueue in buf_Init instead of the roughly duplicated code. Reviewed-on: http://gerrit.openafs.org/7310 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcf1079f580fe1f2afa86f5e0312792817d52d2f) Change-Id: I9cad7d01cfffed473f72ebf1ec1124d0149f7cf3 Reviewed-on: http://gerrit.openafs.org/7336 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4a20c197d73e513dd30563131b140e8e64fab71b Author: Jeffrey Altman Date: Wed May 2 14:32:01 2012 -0400 Windows: AFSInitializeProcessCB failure stack exhaustion If AFSInitializeProcessCB() fails in AFSProcessCreate() it can lead to a recursive loop of AFSValidateProcessEntry() -> AFSProcessCreate() calls. Only call AFSValidateProcessEntry() if AFSInitializeProcessCB() succeeds. On failure, log an error to the trace log. Reviewed-on: http://gerrit.openafs.org/7309 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2246e7887cccd9e3d3524c3079b80b5cecaac433) Change-Id: I07807ae570d7144127a024d310f3877e039e3b51 Reviewed-on: http://gerrit.openafs.org/7335 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3cef034e00db5caca34246ef36582bf932610599 Author: Jeffrey Altman Date: Mon Apr 30 06:22:41 2012 -0400 Windows: More useful AFSDumpFile exception info Modify AFSExceptionFilter to accept the __FUNCTION__ name where the exception occurred. Generate the trace dump file after the exception has been handled so that it is possible to see where it happened in the trace output. Reviewed-on: http://gerrit.openafs.org/7308 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ad5916d19fe85c89db7675cac551a1e7634d5bdc) Change-Id: I58571c8488ca605fd44a38fe3babdfa4f2470e37 Reviewed-on: http://gerrit.openafs.org/7334 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c8925eea8873e62cdbe30ec3e5bc5f9b0db44d6e Author: Jeffrey Altman Date: Mon Apr 30 06:18:58 2012 -0400 Windows: VNOSERVICE error translation Translate VNOSERVICE as CM_ERROR_RETRY and not CM_ERROR_OFFLINE. Reviewed-on: http://gerrit.openafs.org/7307 Tested-by: BuildBot Tested-by: Chas Williams - CONTRACTOR Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f70a12adef9a915ada728350e0b9e1e5104f7ea7) Change-Id: Ic898f3ca80df6c8a1f28aad96046f7bc0716ed77 Reviewed-on: http://gerrit.openafs.org/7333 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f0c18d5500683ec1d173c92e845fbffc9387bf13 Author: Jeffrey Altman Date: Mon Apr 30 06:18:06 2012 -0400 Windows: VNOSERVICE message text correct message text to indicate that an rpc has not been serviced. Reviewed-on: http://gerrit.openafs.org/7306 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c87fe04a61a97d61859684d53bb2d3ef7ee65da8) Change-Id: I4adb54d6119f23a2e2c50b078f24a92ad1031891 Reviewed-on: http://gerrit.openafs.org/7332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8c3e63ef2bc14fb1fe7ca6b3ca940515b68aa504 Author: Jeffrey Altman Date: Sun Apr 29 10:31:07 2012 -0400 Windows: reorg RDR_CleanupFile to prevent lock leak RDR_CleanupFile could fail to drop a file lock if the user does not have write permission on last handle close even if the file is readonly or there were no dirty extents to be stored. The error handling would return the error immediately and skip the file lock release. This patchset changes the logic so that the user permissions are not tested if the file is located on a readonly volume or if there are no dirty extents or metadata changes to store. In addition, if there is an error, skip to unlock processing and not to function exit processing. Reviewed-on: http://gerrit.openafs.org/7292 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 50752e2f60d613fda1e70b798a72679bea5d65f8) Change-Id: I5a5eb35451749f84f6b1ba9e959f27a5eb204c79 Reviewed-on: http://gerrit.openafs.org/7331 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51c209b59004a5f5d851918ecc987e0fd764a9c8 Author: Simon Wilkinson Date: Sat Apr 21 11:25:25 2012 +0100 rx_identity: Add a super user value Add an RX identity type that can be used to represent the super user who is granted access using printed tickets. Reviewed-on: http://gerrit.openafs.org/7261 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4b63b93f24157aefa33f28c67ebea41803cc068e) Change-Id: Ibeff1ef13845070e6d7d8d22ba497ac26fdd22cd Reviewed-on: http://gerrit.openafs.org/7330 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ce1bb7b1a888eed357500b35240e5058e8ae4d83 Author: Simon Wilkinson Date: Sat Apr 21 11:24:25 2012 +0100 rx: Make identity and opaque usable with NULL vals Make it possible to have NULL values for elements of the rx_identity and rx_opaque structures. Reviewed-on: http://gerrit.openafs.org/7260 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit e1eb0fd66af158b86aec9c21cda836d84bc21c59) Change-Id: I84878aa107103b6daaa274b57a96bfd604ef18d8 Reviewed-on: http://gerrit.openafs.org/7329 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit adcd6d3a153f24ffd7a6d770b2234015f4793476 Author: Simon Wilkinson Date: Fri Apr 13 14:49:59 2012 +0100 rx: Use native 64bit data counters Modify the peer, call and rpc_stats structures to use native 64 bit types for the bytesSent and bytesRcvd data counters. All of our platforms support native 64bit quantities now, so there's absolutely no value in rolling our own. Reviewed-on: http://gerrit.openafs.org/7205 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 8e62ddaa3706319b425327b9516c91290274590a) Change-Id: Iaca75af5a754d1c69fc378b07a8dd41e9d383c51 Reviewed-on: http://gerrit.openafs.org/7328 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 64854176282bc3fe596eca534fc23b8d464b72a1 Author: Jeffrey Altman Date: Sun Apr 29 10:40:31 2012 -0400 Windows: Cc FileObject Settings Modify the assigned CcSetReadAheadGranularity() from 64K to the afsd_service configured chunk size. Assign a CcSetDirtyPageThreshold() to be twice the configured chunk size. Reviewed-on: http://gerrit.openafs.org/7294 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 07ff10c7fc194ee503b52691da000ab2c69d0fb1) Change-Id: Ia138445cc0298dca5c63c07e79137ff9e6c632da Reviewed-on: http://gerrit.openafs.org/7300 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 30bc159a439769159d28a90161d67157a5aa131b Author: Jeffrey Altman Date: Sun Apr 29 10:37:35 2012 -0400 Windows: correct cm_Analyze log message A VNOSERVICE log message takes three parameters and not one. Use the correct log macro. Reviewed-on: http://gerrit.openafs.org/7293 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cf0d53b06a42a21238f13d65feb8e5ebf602da4d) Change-Id: I1d3a1c8e510cb63d3889ba064846c7e001348de7 Reviewed-on: http://gerrit.openafs.org/7299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7e305deb852dd0a38259b24e4189dc0333c04f23 Author: Jeffrey Altman Date: Fri Apr 27 08:54:56 2012 -0400 Windows: remove unnecessary libs from aklog/asetkey Unnecessary lwp libs were linked into the aklog/asetkey binaries on Windows. lwp and pthread should not be mixed. Reviewed-on: http://gerrit.openafs.org/7289 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a400f2a8a0732db57d725a8629ba869ed71caf9f) Change-Id: I9a2c0946fff940a304e895f1af63e8781d149dc7 Reviewed-on: http://gerrit.openafs.org/7298 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 05aab6fe12015b6401f3ebbe8ec2fcd2d0e01494 Author: Jeffrey Altman Date: Wed Apr 25 20:16:22 2012 -0400 Windows: Remove High Security Integrated Logon High security mode for integrated logon never was high security. It use was deprecated in the 1.5 series and it has no use at all in the afs redirector world. Remove it. FIXES: 21702 Reviewed-on: http://gerrit.openafs.org/7285 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2a83f03100deae0f13c255e41ab849d172859971) Change-Id: I3ec21ca5c7aa57cc9295aab84d4944185d50a8bd Reviewed-on: http://gerrit.openafs.org/7297 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ca477741fddc39c529d4e10d4654a2580caa1b7c Author: Jeffrey Altman Date: Wed Apr 25 18:05:01 2012 -0400 Windows: fs getcacheparms The get cache params output is supposed to include two values: . the size of the cache . the size of the cache in use Windows no longer has a concept of an unused cache buffer. All buffers are inserted onto the freelist and are available for recycling when the AFSCache file is created. Instead of reporting the used cache space as 0K, report it as the full cache in use. It is likely to disturb users less. Reviewed-on: http://gerrit.openafs.org/7284 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 7d0a0b66cca5dfd7f9c42032393632abadb1aa76) Change-Id: I4ef3e27201505a18c1e841a7b10db43530fcfcf0 Reviewed-on: http://gerrit.openafs.org/7296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6be1fd0d8caa419131daccdd554d5b72d94e21cb Author: Jeffrey Altman Date: Tue Apr 24 15:41:39 2012 -0400 Windows: AFSValidateEntry CcPurge on DV change The variable bPurgeExtents was not being set when a DV change was detected in AFSValidateEntry(). This resulted in the purge being skipped and old data being left in the cache. Reviewed-on: http://gerrit.openafs.org/7280 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 229131ab12d3c62a650ebff8c97acd5778f5bca1) Change-Id: I71a9f2ceab512f478d1750eee07d35304ac18d0b Reviewed-on: http://gerrit.openafs.org/7283 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 97e5ce37e2a481dc5f64d0d3684c540ff8c12e84 Author: Jeffrey Altman Date: Mon Apr 23 20:18:20 2012 -0400 Windows: Directory validation should purge data changes immediately During AFSEnumerateDirectory() and AFSVerifyDirectoryContent() calls use AFSPerformObjectInvalidate() instead of AFSInvalidateObject() to trigger the data purge. This is necessary to avoid a race as AFSInvalidateObject() will queue a work request that will be performed after the metadata is updated. Reviewed-on: http://gerrit.openafs.org/7279 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d4c9cbc75edd632bd5bf22042c6502d03dda2d9c) Change-Id: I46f11e9716874e3d6121ea8e5e6e448dcf575f6d Reviewed-on: http://gerrit.openafs.org/7282 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ad16c3ecdddc4c4e2e61169c2998de7a5f3777d0 Author: Jeffrey Altman Date: Mon Apr 23 20:08:47 2012 -0400 Windows: Flag purge on close if CcPurgeCacheSection fails CcPurgeCacheSection can fail. If it does, remember that the purge still needs to be performed by setting the AFS_FCB_FLAG_PURGE_ON_CLOSE flag on the File Control Block. Reviewed-on: http://gerrit.openafs.org/7278 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 76f2e07fd039e0175540ae0ca3330a4bec86e1fe) Change-Id: I9a194a0a8e79d59ec743186a414c6aa5215c0c68 Reviewed-on: http://gerrit.openafs.org/7281 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 397aaa3cb3cc0519c7aaf6332c58829e556e313f Author: Jeffrey Altman Date: Sun Apr 22 23:34:48 2012 -0400 Windows: Version 1.1.1100 (1.1.11) Change-Id: I64341254c3d0ef501fb3e382f037c66b79ff2efd Reviewed-on: http://gerrit.openafs.org/7272 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 40a434c5109578e8a87225e3432973874b626db8 Author: Jeffrey Altman Date: Sun Apr 22 23:33:59 2012 -0400 Windows: 1.7.11 Change Log Change-Id: I5f29896e7f502f453cdc84feee6ab47e6397f7a4 Reviewed-on: http://gerrit.openafs.org/7271 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 46c62bc282c8e58c66231584caa2622fd7675c48 Author: Jeffrey Altman Date: Thu Apr 19 07:14:16 2012 -0400 Windows: Add global root to name array if share name If the share name was resolved by querying the service instead of finding the entry in the root.afs root directory, construct a name array in AFSParseName() that includes the AFSGlobalRoot above the resolved share root directory. In AFSBackupEntry, check for the case where two volume root entries appear in sequence without an intervening mount point. Reviewed-on: http://gerrit.openafs.org/7252 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 749cb03e3c4b95c19803fc718d59ba79e8f8292f) Change-Id: Ie5ab8f4b8ac9104b27169637059ef91bfc9a7fcd Reviewed-on: http://gerrit.openafs.org/7269 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 580cfb8a3f80058c8bbee8d8cb00f865451b181a Author: Jeffrey Altman Date: Thu Apr 19 05:14:51 2012 -0400 Windows: cm_ResetACLCache handle NULL cellp It is valid for the cellp parameter to be NULL. When invalidating all ACLs for a user pass 0 to cm_EAccesClearUserEntries(). FIXES 130704 Reviewed-on: http://gerrit.openafs.org/7251 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9dce9e2461d7b375c0ff4caaf400a6b448322e74) Change-Id: If8a780667bee2147e95f594a6d6518049200e8e8 Reviewed-on: http://gerrit.openafs.org/7268 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 28da7e9ce8c160429e0f42823ed12b9a9f4a0cd4 Author: Jeffrey Altman Date: Wed Apr 18 17:26:00 2012 -0400 Windows: reverse order of EACCESS and USER locks The user lock is obtain while holding the eaccess lock. Reflect it in the hierarchy. Reviewed-on: http://gerrit.openafs.org/7247 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d55a767287d7f0ae1b3a018f3cb7b2a6730ebafa) Change-Id: I779be8074cd55f303f85db4fcd066f9881d2af28 Reviewed-on: http://gerrit.openafs.org/7267 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 600b5002b45d83c6421c4e82c433c90690fb66a1 Author: Jeffrey Altman Date: Mon Apr 16 22:09:40 2012 -0400 Windows: Version 1.7.10 (1.7.1000) Change-Id: I0f7dd0333cb059b681d8ad0f907aad5d95a8afac Reviewed-on: http://gerrit.openafs.org/7230 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4bdf2f633ba19b8cfcd0dda2bbb593635cf729b4 Author: Jeffrey Altman Date: Mon Apr 16 22:08:46 2012 -0400 Windows: 1.7.10 change log Change-Id: I86963e63f1d78c39444541d217eda5fcaef31599 Reviewed-on: http://gerrit.openafs.org/7229 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d355eb025d3f257c4b20ab4e21d1edfa5853d716 Author: Jeffrey Altman Date: Mon Apr 16 15:22:35 2012 -0400 Windows: Drop Fcb Resource across SetEOF and SetAllocation If the file size or allocation is being altered, we must hold the PagingResource and drop the Fcb Resource. Dropping the Fcb resource is necessary to avoid a deadlock with TrendMicro's filter if the size is set to zero and acquiring the PagingResource is necessary to prevent races now that the Fcb Resource is no longer held. Reviewed-on: http://gerrit.openafs.org/7224 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0ac28aa703459df60e9f18348fb1d4f73d5c042c) Change-Id: I51aa94511a003efd7135dad5f2457c267ecfc9a5 Reviewed-on: http://gerrit.openafs.org/7228 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b49885e18ca994f9fdcbc1809d7c522b367dee8d Author: Jeffrey Altman Date: Mon Apr 16 14:47:38 2012 -0400 Windows: Hold PagingResource across ExtendingWrite When the file allocation size changes the PagingResource must be held exclusively to prevent races. Reviewed-on: http://gerrit.openafs.org/7223 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd161ec0e474485c6a1a43019b802e3b663098df) Change-Id: I134f7250b8c81c0ec5d908c67db81a871d7e96e5 Reviewed-on: http://gerrit.openafs.org/7227 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d88b42e0b40dac2b185203281251c7ff8a6479c0 Author: Peter Scott Date: Mon Apr 16 12:25:01 2012 -0400 Windows: AFSProcessOverwriteSupersede CcSetFileSizes Instead of calling CcPurgeCacheSection() in AFSProcessOverwriteSupersede() as part of the file length truncation to zero, call CcSetFileSizes(). Wait to call CcSetFileSizes() until after the Fcb->Resource has been dropped but while the Fcb->Header.PagingIoResource is still held. Make sure that file sizes are restored in the Fcb->Header if the afsd_service rejects the file update. Reviewed-on: http://gerrit.openafs.org/7220 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8e1490f5799f0a307760047a133aade806b32afc) Change-Id: I259c6b1f27fbadb8cbbf8702fa9db75fa8b14bb3 Reviewed-on: http://gerrit.openafs.org/7226 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 20bb041d194459bc5f55db52ffa75ec184cea696 Author: Simon Wilkinson Date: Fri Apr 13 19:14:44 2012 +0100 rx: Remove surplus call to FindPeer When stats are enabled, rxi_ReadPacket calls FindPeer immediately the packet is received from the wire. The peer structure that it gets is used solely to increment a counter, and then thrown away. Given that FindPeer requires a lock, and a hash lookup, this is really inefficent. Instead, delay the compilation of statistics until rxi_ReceivePacket. Call FindPeer for version and debug packets which have no associated connection otherwise wait until we have found the packet's connection, and use the peer which is linked from there. Reviewed-on: http://gerrit.openafs.org/7206 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit a3ff62857cb76e403c11a27a250aa3c79d66ebb6) Change-Id: I1344dac9d2391b6254bba7c1ded8f344010538a5 Reviewed-on: http://gerrit.openafs.org/7222 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9c3125e94a5d95ec560327cc217491681db24556 Author: Andrew Deason Date: Thu Mar 29 10:30:47 2012 -0500 rx: dec rx_nWaiting on clearing RX_CALL_WAIT_PROC Currently, a couple of callers (rxi_ResetCall, and rxi_AttachServerProc) will decrement rx_nWaiting only if RX_CALL_WAIT_PROC is set for a call, and the call is on a queue (presumably rx_incomingCallQueue). This can cause an imbalance in rx_nWaiting if these code paths are reached when, in another thread, rx_GetCall has removed the call from its queue, but it has not yet cleared RX_CALL_WAIT_PROC (this can happen while it is waiting for call->lock). In this situation, rx_GetCall will remove the call from its queue, wait, and e.g. rxi_ResetCall will clear RX_CALL_WAIT_PROC; neither will decrement rx_nWaiting. This is possible if a new call is started on a call channel with an extant call that is waiting for a thread; we will rxi_ResetCall in rxi_ReceivePacket, but rx_GetCall may be running at the same time. This race may also be possible via rxi_AttachServerProc via rxi_UpdatePeerReach -> TryAttach -> rxi_AttachServerProc while rx_GetCall is running, but I'm not sure. To avoid this, decrement rx_nWaiting based on RX_CALL_WAIT_PROC alone, regardless of whether or not the call is on a queue. This mirrors the incrementing rx_nWaiting behavior, where rx_nWaiting is only incremented if RX_CALL_WAIT_PROC is unset for a call, so this should guarantee that rx_nWaiting does not become unbalanced. Reviewed-on: http://gerrit.openafs.org/6986 Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 660720d1f54a867e21f78b6ec4c024235e4c37b7) Change-Id: I374190636ca97e29c4743d9a42eb3f1e68c264a5 Reviewed-on: http://gerrit.openafs.org/7221 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2e4646f8b3d4314fad8ee66a1e558b586c79ffd6 Author: Jeffrey Altman Date: Sun Apr 15 17:40:03 2012 -0400 rx: conn_call_lock leak In rxi_ReceivePacket, if the packet is for a client connection and there is no call allocated, the conn->conn_call_lock was leaked. Introduced by 95c38dff3740d7e24971ceb5875c06e7abfce102. Reviewed-on: http://gerrit.openafs.org/7218 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6a9b0d8c56ab80bdcc8d4e2d0b28a606837141cc) Change-Id: Ic7ec7c1edb4afdaf478d64c7220c0cd0a9f3de30 Reviewed-on: http://gerrit.openafs.org/7219 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d258e0f6c69e6a06da4ce1f6021712ef2bbdecb1 Author: Jason Edgecombe Date: Sun Apr 8 12:10:58 2012 -0400 DOC: Factored common text out of the vos_backup and vos_dump man pages Change-Id: I84bd722834297778ab2e719996b2f8528d8706d6 Reviewed-on: http://gerrit.openafs.org/7126 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f26330904607c6c939c037587b473644deea669d) Reviewed-on: http://gerrit.openafs.org/7217 commit 9f298ea19909ae3761e8f5e12d16b0e07a2f02d1 Author: Jeffrey Altman Date: Sat Apr 14 09:43:48 2012 -0400 Windows: pioctl use GetFileAttributes Instead of attempting to CreateFile(OPEN_EXISTING) the _._AFS_IOCTL_._ file, try using GetFileAttributes() to obtain the attributes of the file. The file doesn't exist in the directory listing but the afs redirector and the afs smb server will respond to the request. Perhaps the SMB servers in the broken printers will fail it. Reviewed-on: http://gerrit.openafs.org/7210 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41) Change-Id: I438416c3166beaca965fc3c07e7f279c2a78a95e Reviewed-on: http://gerrit.openafs.org/7216 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 796b0edcf93abb3e1a9a2e440a687146539e34aa Author: Jeffrey Altman Date: Sat Apr 14 11:06:58 2012 -0400 Windows: _._AFS_IOCTL_._ hidden and system Query file attributes returned only the system attribute and not the hidden attribute. Must return both. Reviewed-on: http://gerrit.openafs.org/7209 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 718a6a0c464e1c2f477acbe48770c2297720a57d) Change-Id: If575ed10f476416e925a5c9afc33adbf77edc00e Reviewed-on: http://gerrit.openafs.org/7215 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1ad5659643537e2f24f108ad2a32d459f137d706 Author: Jeffrey Altman Date: Fri Apr 13 23:16:56 2012 -0400 Windows: Remove PurgeContent param AFSVerifyEntry When verifying a directory entry we must update the metadata for a file therefore we must also purge the data if the version number changed. This is not optional. Reviewed-on: http://gerrit.openafs.org/7208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3cdfdc4792444c54a36341b6a8a66ae1a8085cec) Change-Id: Id808b5b3fc441eb7fb94d7652f6695b5fc57c903 Reviewed-on: http://gerrit.openafs.org/7214 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f3327a2905bd6a7858c7ac4a135344acf93d3de4 Author: Jeffrey Altman Date: Fri Apr 13 20:17:48 2012 -0400 Windows: Flush data and then drop locks The redirector must flush the data to the file server and then drop the file locks. Doing it the other way creates races. Reviewed-on: http://gerrit.openafs.org/7207 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ead0a458272abe79fcca5e521b2960d90d358465) Change-Id: I6f0176b15c30cb798ca4950a41ee6ec91231aa11 Reviewed-on: http://gerrit.openafs.org/7213 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1d26e9c72ee5da7afebd51434ca62ef3dfa73900 Author: Simon Wilkinson Date: Sun Jan 8 11:45:57 2012 +0000 rx: Rework code which pulls packet from recv queue Both rxi_ReadProc and rxi_FillReadVector contained copies of the same code to pull a packet out of the receive queue, and turn it into the call's currentPacket. Abstract this out into a single common function, so we're not maintaining the same code in two different places. Reviewed-on: http://gerrit.openafs.org/7195 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a187be182ce2915b68af0e318bef352d41f7715a) Change-Id: Ic6b215729e117948c5a19faa757fc33a99299573 Reviewed-on: http://gerrit.openafs.org/7212 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 5fae0e26da534e1dbb54630842f033e7aca547f6 Author: Simon Wilkinson Date: Fri Jan 6 10:12:26 2012 +0000 rx: Tidy up currentPacket handling Instead of making a copy of the call->currentPacket variable in our read/write routines, reference it directly. Make it clear that currentPacket is used solely by the application thread, and remove a number of mistaken comments that suggest otherwise. Reviewed-on: http://gerrit.openafs.org/7194 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 7b45d62ec18726a49dcffe8ddbca8f446ca0bb3e) Change-Id: I3b1e3167425c43ecb1eb759b4c65069e83dd0a2b Reviewed-on: http://gerrit.openafs.org/7211 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7f87e6b68f196d17e83bafead2686362dd6004bd Author: Jeffrey Altman Date: Wed Apr 11 11:59:17 2012 -0400 Windows: missing brace in RDR_CleanupFileEntry Fix 46d76d8821f4c8476499757d509ce1a6bab764b1 Reviewed-on: http://gerrit.openafs.org/7189 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ed8b38d1d0f2e74ff7280c09afbc6fd4d2df1b23) Change-Id: Id4826bc070a264e1dd203a27ff4769e330f25093 Reviewed-on: http://gerrit.openafs.org/7193 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4377759302847530d5adf8c2aa9d201683de1c42 Author: Jeffrey Altman Date: Wed Apr 11 00:29:03 2012 -0400 Windows: Do not delete in CleanupFile if error If an error was detected when processing RDR_CleanupFileEntry() do not perform the file deletion. Just return the error as attempting the deletion could result in an exception. Reviewed-on: http://gerrit.openafs.org/7186 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 46d76d8821f4c8476499757d509ce1a6bab764b1) Change-Id: I70f70d41fb909c777b2782658e7bc761994cf8e6 Reviewed-on: http://gerrit.openafs.org/7192 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec366861fa1cb3a904bb9e2b4da95275ed3ae1fe Author: Michael Meffie Date: Tue Apr 10 16:07:37 2012 -0400 doc: distributed files are under dest Add the dest path component in the quick start guide instructions for copying files from a binary OpenAFS distribution file. Reviewed-on: http://gerrit.openafs.org/7187 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit bc770a5007ae16aa5477bf1748f3e0666f665781) Change-Id: I1535f153b0220438861f9a103236d426f525387f Reviewed-on: http://gerrit.openafs.org/7191 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman commit 8ac84d2764dfa233c3743db3c755732e49148890 Author: Jeffrey Altman Date: Tue Apr 10 10:17:51 2012 -0400 Windows: AFSValidateProcessEntry, ullProcessId 64-bit In AFSValidateProcessEntry(), ullProcessId is 64-bit and must be printed as an %I64X in AFSDbgLogMsg() formats. Reviewed-on: http://gerrit.openafs.org/7172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 46474374e1914fb556d38f09f50cdbbaeaa1aef0) Change-Id: I58170d56bdf4a6ed8eb9e9334cb746e260e89651 Reviewed-on: http://gerrit.openafs.org/7174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 54dfb0f4ce0985c46b434275f2ce8bd7ff810abb Author: Simon Wilkinson Date: Mon Apr 9 23:13:28 2012 +0100 roken: Add rk_getprogname to Windows mapfile Add the rk_getprogname symbol to the Windows mapfile so it can be used by roken consumers. Reviewed-on: http://gerrit.openafs.org/7139 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman (cherry picked from commit 7bab9649aa9d4fe467d2f0fa6df2747a97f35950) Change-Id: Id526908adf801387d8f8c3d46b115734645c3e7b Reviewed-on: http://gerrit.openafs.org/7173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 24b15378540ab0523b0ba87c5f6fc20dc2ac1ca2 Author: Simon Wilkinson Date: Sun Apr 1 12:27:04 2012 -0400 rx: Remove packet burst elements from peer struct The peer structure contains a number of elements left over from an earlier, burst based, congestion control strategy. As OpenAFS has never implemented this strategy, just remove these elements from the structure, and store 0 values for these elements in the debug packets. Reviewed-on: http://gerrit.openafs.org/7006 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3109a66fb2df8e3f2878938c5b62222e8212c0f1) Change-Id: Icf98b897fa350ddbe0d28935b61989ca3a5a19a5 Reviewed-on: http://gerrit.openafs.org/7171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2672ad1490bd0edfe8e78081c9574d6c5cf1f6bc Author: Simon Wilkinson Date: Fri Nov 25 20:51:40 2011 +0000 rx: Remove the unused packet skew code We don't (and haven't, since the release of OpenAFS) use the packet skew calculations for anything. However, maintaining them requires taking locks in some critical parts of the transmission code path. For both speed, and maintainability, reasons remove the skew code from the tree - it's in git if we ever want to go back to it. Reviewed-on: http://gerrit.openafs.org/7004 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit aa6f52584ea1aea170da578328cc35e567a5b0b4) Change-Id: I73597d58c67b483cc8f6e8b4ecc701096564da49 Reviewed-on: http://gerrit.openafs.org/7170 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d3e9fbdcf064d10dac5a9cc55cd6254b6b269780 Author: Simon Wilkinson Date: Tue Dec 6 14:06:05 2011 +0000 rx: Hide internal packet functions Hide functions in rx_packet.c which are only used by that file by making them static. Reviewed-on: http://gerrit.openafs.org/7003 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman (cherry picked from commit 84d09a831afcfa8d0971dcbe4f1fc7823cec9e10) Change-Id: I36eb56e93f13dbd2e6cfeb9b266d99b36f302234 Reviewed-on: http://gerrit.openafs.org/7169 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e0f394729e0de45a5a70e662b0e0bba0438909a4 Author: Simon Wilkinson Date: Mon Dec 5 18:56:03 2011 +0000 rx: Hide struct rx_peer from the rest of the tree The peer structure is an internal RX structure, so it shouldn't be contained in public header files, or used by non-rx modules. Hide the structure definition in rx_peer.h, and convert the rx_HostOf and rx_PortOf accessors from macros into functions. This will also help with adding support for non-IPv4 addresses to RX. Reviewed-on: http://gerrit.openafs.org/7002 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9862ac0dbb72d8f5f9f894e567261e52354e0b15) Change-Id: I037682925cd6b85623d145a69b166c4532592a6c Reviewed-on: http://gerrit.openafs.org/7168 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit aa31fb6f57ae91dafa0a0735b88576191725a1ad Author: Simon Wilkinson Date: Thu Apr 5 15:43:23 2012 -0400 shlibafsrpc: Add additional XDR functions Export the afs_xdr_pointer and afs_xdr_u_char functions so that shlibafsauthent can make use of them. Reviewed-on: http://gerrit.openafs.org/7065 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 00992c66972aeab96cca9781b02a780ab49dce23) Change-Id: I260e16b2b8b1d78e7746b016193a8dd7e600445d Reviewed-on: http://gerrit.openafs.org/7167 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ceaff3299dd24846a99b6f3021438f9148a8ba30 Author: Simon Wilkinson Date: Thu Mar 22 14:39:27 2012 +0000 libafsrpc: Export connection accessor fuctions Add various connection accessor functions to the export map file for libafsrpc so they can be used from within RX security layers. Reviewed-on: http://gerrit.openafs.org/6948 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20429272805d029de80275a4e092291be7d747e9) Change-Id: I4562782937789a48fd22caffecce6d9f96ac6c4d Reviewed-on: http://gerrit.openafs.org/7166 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2e87b81ce702668804869fbd24297fcc50ca7b1b Author: Simon Wilkinson Date: Sun Apr 1 15:40:24 2012 -0400 rxperf: Build again Fix rxperf so that it builds again Reviewed-on: http://gerrit.openafs.org/7011 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e4430d9d487b1b93717886eeb2621bbe50899838) Change-Id: I8a9d301d52d2ddcd74854a25507b792a65b54664 Reviewed-on: http://gerrit.openafs.org/7165 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0bf238c010136685a88bc16a30fa3fa350b1f839 Author: Jeffrey Altman Date: Mon Apr 9 07:18:32 2012 -0400 rx: remove peer burst elements from rx/test Subsequent patchsets will turn rx_peer into an opaque object and remove the burst elements entirely from the tree. For now remove them from rx/test Reviewed-on: http://gerrit.openafs.org/7130 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 578cdc35e645489823f322b09632fca2fd7b2c31) Change-Id: I5a3a0f6ce73e4da5d7e7b0c3bf051080102d3fd5 Reviewed-on: http://gerrit.openafs.org/7164 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 62ab24bdae3a157bd94cee55810060f82b20204a Author: Simon Wilkinson Date: Wed Dec 7 18:30:00 2011 +0000 rx: rxi_AckAll isn't an event handler rxi_AckAll is coded as if it is an event handler, yet the only call site is a direct call from rx.c. So, rework the function to remove all of the event handling code, change its arguments to match, and make it static. Reviewed-on: http://gerrit.openafs.org/6999 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01a1b79288c532f99e2da52aa13262d4c0fc1f79) Change-Id: I432a0268e02ff4365ed83ed241ba639e68a48cd9 Reviewed-on: http://gerrit.openafs.org/7163 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ae7d0b1e701242a53726dccdd39f50db770ca7aa Author: Simon Wilkinson Date: Wed Dec 7 19:14:03 2011 +0000 rx: Tidy up function scope in rx.c Rework headers to more clearly indicate which functions in rx.c are considered part of the 'public' rx interface, and which are for internal use only. Move internal functions either to be static in rx.c (if they are used only within that file), or defined in rx_internal.h. Remove entirely the unused function rxi_NatKeepAliveOn() Reviewed-on: http://gerrit.openafs.org/6998 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit a20c4893670df80c15585f68d244f2f82bfa0758) Change-Id: I2c498cd77193d4d2c5956f5a66decce2ccdb91f6 Reviewed-on: http://gerrit.openafs.org/7162 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 521a8c9e33a164edc2ec206128a4ad847d4198b2 Author: Simon Wilkinson Date: Mon Nov 14 10:28:38 2011 +0000 rx: Remove trailing else from RX_KERNEL_TRACE The RX_KERNEL_TRACE ifdefs all contain a trailing else, which makes no logicial sense given the rest of the code. The only effect of this trailing else is to cause packets to not be sent when tracing is enabled, which probably isn't the desired behaviour. Reviewed-on: http://gerrit.openafs.org/7001 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 084c2c1687fda07c768837e8fd7cc0904818f977) Change-Id: Iac3430eb753684bbf2c945d0dabd03e8c8f31a0b Reviewed-on: http://gerrit.openafs.org/7161 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 393ae08b38d5c8df1c8ef8bba22cc519902afd9f Author: Simon Wilkinson Date: Sat Jun 25 18:29:27 2011 +0100 rx: Remove unused ACKHACK macro rx_globals.h had a macro called ACKHACK which at one point looks like it was used to determine whether to send an ACK or not. We now have a more sophisticate mechanism for determining this, and the old macro doesn't seem to have been used in a long time. So, remove it to avoid confusion. Reviewed-on: http://gerrit.openafs.org/7000 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 2427cb000cb70cfca5b2a61d4f5f9ca54488fc55) Change-Id: I94bcdd0d16cc16630e1af7e730e1130aa17b087c Reviewed-on: http://gerrit.openafs.org/7160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit f857b87ff304193e1209efb146603fdfec92f2b6 Author: Simon Wilkinson Date: Sun Apr 8 18:31:15 2012 -0400 tests: rx needs roken On Linux, the RX library has a dependency on libroken for the rk_socket function. Add this dependency to the RX tests. Reviewed-on: http://gerrit.openafs.org/7127 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 02f470e99d5853808bca532ff953c2bbc0b8176c) Change-Id: Icfcc2dd6febbf7f4a0eddd4c57486f542faed2dd Reviewed-on: http://gerrit.openafs.org/7159 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b7ed23f479e3b62f5b5005c0ab632333f311f12f Author: Simon Wilkinson Date: Fri Mar 30 19:39:51 2012 +0100 rx: Remove needless braces Doing if ((a==b)) is unecessary. It's also potentially dangerous, as that's the syntax required to do assignment within an if statement. clang now issues warnings (errors in -Werror mode) when it encounters these. Remove pointless braces from the Unix CM to make clang happy. Reviewed-on: http://gerrit.openafs.org/7088 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit 5e107724f3661254cfdb693ae2d4d1c5238eba7d) Change-Id: I82833f58df0fa54234a04796bee8ae464e001ac6 Reviewed-on: http://gerrit.openafs.org/7158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit cb4d73b7a30eb5eaf7aaf8fcb343e6f9b07836bd Author: Simon Wilkinson Date: Fri Mar 30 19:37:36 2012 +0100 rx: Handle negative returns on packet reads rxi_RecvMsg returns an int, because it can return a negative value upon error. Don't store its return value as an unsigned int, because this may hide the potential errors. Modify the error handling loop so that errors get to where they are intended. Reviewed-on: http://gerrit.openafs.org/7087 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 438d6ba63cda7d7484c545a4fd181803e84d68eb) Change-Id: Ib877885e4ca5c2b6a580b5c9403666e2a2c02b1a Reviewed-on: http://gerrit.openafs.org/7157 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b3e2e07ef0b7784f7184b1a6f86ebb452eeb8815 Author: Simon Wilkinson Date: Thu Jan 5 10:51:06 2012 +0000 rxgen: Tidy up server side freeing The way in which rxgen handles freeing of objects allocated by the RPC stub has evolved over the years. Originally, there appears to have been a "somefrees" parameter which was used to track whether objects required freeing or not. However, this parameter has fallen in to disuse, as support for typedefs and unions were added, and which parameters require freed is now tracked within the description structures themselves. So, get rid of somefrees, as it is now just confusing. The generated code to free a set of RPC arguments currently looks something like: fail: z_xdrs->x_op = XDR_FREE; if (!xdr_string(z_xdrs, &Name, AFSNAMEMAX)) goto fail1; if (!xdr_string(z_xdrs, &OfflineMsg, AFSOPAQUEMAX)) goto fail1; if (!xdr_string(z_xdrs, &Motd, AFSOPAQUEMAX)) goto fail1; if (rx_enable_stats) { rx_RecordCallStatistics(z_call, RXAFS_STATINDEX, 19, RXAFS_NO_OF_STAT_FUNCS, 0); } return z_result; fail1: if (rx_enable_stats) { rx_RecordCallStatistics(z_call, RXAFS_STATINDEX, 19, RXAFS_NO_OF_STAT_FUNCS, 0); } return RXGEN_SS_XDRFREE; Which isn't very efficient, or easy to modify. So, change the code generator to produce code that looks like: fail: z_xdrs->x_op = XDR_FREE; if ((!xdr_string(z_xdrs, &Name, AFSNAMEMAX)) || (!xdr_string(z_xdrs, &OfflineMsg, AFSOPAQUEMAX)) || (!xdr_string(z_xdrs, &Motd, AFSOPAQUEMAX))) z_result = RXGEN_SS_XDRFREE; if (rx_enable_stats) { rx_RecordCallStatistics(z_call, RXAFS_STATINDEX, 19, RXAFS_NO_OF_STAT_FUNCS, 0); } return z_result; This does the same thing, but is easier to read and is more consistent with the way that we structure marshalling and unmarshalling. Reviewed-on: http://gerrit.openafs.org/7005 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e202822b8efd7511f8652064cd8831c0a049dce6) Change-Id: I13699150f4adf9f46c2ae26fef5af7fd72aa3756 Reviewed-on: http://gerrit.openafs.org/7156 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit b77a28be66a8d2151c51fe26f61c9dd5a9496e85 Author: Simon Wilkinson Date: Sun Jan 8 11:49:53 2012 +0000 rx: Get rid of some uneccessary temporary vars rx_ReadProc and rx_ReadProc32 originally used temporary variables (which were, at one time, declared as "register") to hand optimise a couple of routines. With the removal of register throughout our code, this is no longer helpful. Reviewed-on: http://gerrit.openafs.org/6997 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit e6e8e26a3d7d97f2ad056251859f258fee509e7e) Change-Id: I4d00d5b9fd3542d93f3651e4a70d2cc5fcbe6bfc Reviewed-on: http://gerrit.openafs.org/7155 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4c6116515f08febccabe5dace3c115593149b99f Author: Andrew Deason Date: Mon Feb 13 14:11:36 2012 -0600 Rx: Avoid lastBusy/PEER_BUSY discrepancy If an rx call has the RX_CALL_PEER_BUSY flag set, but the call's conn->lastBusy is not set, we can easily cause an rx caller to loop infinitely. rx_NewCall will see that lastBusy for a call channel is not set, and will use that call channel, but rxi_CheckBusy will note that the call appears busy and that there are non-busy call channels on the same conn, and so will return RX_CALL_BUSY. This can currently happen in rxi_ResetCall, since we set RX_CALL_PEER_BUSY on the call again if the call had that flag set when rxi_ResetCall was called. If we are calling rxi_ResetCall with 'newcall' set, the passed in call is unrelated to the new call, since it was obtained from the free list. Thus, the busy-ness of the call should be ignored. Fix this by only paying attention to the incoming RX_CALL_PEER_BUSY flag if 'newcall' is not set. Also prevent this from happening by clearing RX_CALL_PEER_BUSY in rx_NewCall when we select a call and clear lastBusy for that call. Reviewed-on: http://gerrit.openafs.org/6707 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Derrick Brashear (cherry picked from commit 2a4c6c3b9e1dc30d5599e67e02237a1aeef8a0f0) Change-Id: I6a9d2dadc90340b6abcca118cc6e17942a8ca0f1 Reviewed-on: http://gerrit.openafs.org/7154 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e2673d31333b3a6eeabee976ea04a83175a4f46d Author: Andrew Deason Date: Fri Feb 3 16:06:16 2012 -0600 Rx: Add missing rx_packet.h includes We no longer include rx_packet.h from rx.h, so rx_kcommon.h was not picking up some packet-related definitions. Some files (SOLARIS/rx_knet.c, IRIX/rx_knet.c) were using packet-related defines (e.g. RX_HEADER_SIZE) while just including rx_kcommon.h. Include rx_packet.h in those files to get the relevant definitions. Reviewed-on: http://gerrit.openafs.org/6670 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 3a621a8518f96e15a08448fecdfdb0cbce6a02c2) Change-Id: I8ca3d7dcf034a5aad55f99e5efb3acdf03af0d2c Reviewed-on: http://gerrit.openafs.org/7153 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7584e4ea526ccb05bfd5ac3a72c15c0358a69f55 Author: Ben Kaduk Date: Fri Dec 2 20:24:04 2011 -0500 Remove dead code from rxi_FindIfnet() There is a separate implementation for DARWIN and XBSD above, so having a check for DARWIN here is pointless. Reviewed-on: http://gerrit.openafs.org/6193 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit c22aa6c121bfbc71d5d6d4b628ee4585f4e134cf) Change-Id: I5a5f82c709a579641aadfe9f4e1c383bb7e12c17 Reviewed-on: http://gerrit.openafs.org/7152 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 2355e2ec7b2aa4710104fe82f89241f6712a9bd5 Author: Jeffrey Altman Date: Tue Apr 10 01:05:14 2012 -0400 Windows: report error on panic If afsd_notifier() is called the service is going to exit(1). Report to the service manager that the service exited with an error as well. Reviewed-on: http://gerrit.openafs.org/7148 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 7051672c7118b44e40a59b645f48428aabc9ee8a) Change-Id: If17d91893cf733df5317bd9543b2c0fe73d2d336 Reviewed-on: http://gerrit.openafs.org/7151 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8bd8ce586407c4032cd1d3df186cee17796b956a Author: Jeffrey Altman Date: Mon Apr 9 23:24:07 2012 -0400 Windows: correct afsredir log entries AFSVerifyEntry != AFSValidateEntry Reviewed-on: http://gerrit.openafs.org/7147 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 846cef3685edbdba9f186f595daecb5241551ec1) Change-Id: I9dfd299eda55351a8484b7b353f9fe79782392a2 Reviewed-on: http://gerrit.openafs.org/7150 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit bbc85a68b027ae0901a1702873a6d8e1abf94721 Author: Jeffrey Altman Date: Mon Apr 9 18:41:13 2012 -0400 Windows: Refactor AFSValidateEntry Refactor AFSValidateEntry to avoid obtaining the ObjectInformation->Fcb->Resource when it isn't necessary. This will avoid contention and improve performance. The only time that the Fcb->Resource is required is when the object requires verification, the object is a FILE, and the object was successfully evaluated. Even with this reorganization there is a small window of opportunity for a deadlock to occur if a CcPurgeCacheSection() which is called with the Fcb->Resource held triggers a filter driver to issue a CreateFile and in between the two operations an invalidate object is received. Reviewed-on: http://gerrit.openafs.org/7143 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 779c27bf1daaf01c79c0bb7c687781151abb4383) Change-Id: I401167eea36f946f61cb9af6aafaa8f4bcc817a9 Reviewed-on: http://gerrit.openafs.org/7149 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 41c1c91e2e481d205fa11b5815b7e66fd606da62 Author: Jeffrey Altman Date: Fri Apr 6 23:30:11 2012 -0400 Windows: Version 1.7.9 Change-Id: Ib9dda2dab4b61bf6fdee2397e2aa85a935255b5d Reviewed-on: http://gerrit.openafs.org/7114 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 37b4078c2989dc31b50f091a0f9b4abda72bd345 Author: Jeffrey Altman Date: Fri Apr 6 23:29:20 2012 -0400 Windows: 1.7.9 ChangeLog Change-Id: I7c5412f465a8fac0e0dde880a1b097948c1e7c85 Reviewed-on: http://gerrit.openafs.org/7113 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f52fe0d55cef059aaa66e2001458683459c043c Author: Jeffrey Altman Date: Fri Apr 6 22:30:41 2012 -0400 Windows: Disk Full errors instead of Quota Exceeded The AFS Redirector does not support the Windows quota interface therefore return STATUS_DISK_FULL for all over quota conditions. Change-Id: Idd8755b26ab65e423330eeb6cb0e1806dd6306c9 Reviewed-on: http://gerrit.openafs.org/7111 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8648a8c45b593dce8982deec41e3caf48e80dc0c) Reviewed-on: http://gerrit.openafs.org/7112 commit 9cbdd93324a54fd0616da4cb6d39b2488f813f40 Author: Jeffrey Altman Date: Fri Apr 6 22:18:59 2012 -0400 Windows: AFSCheckCellName one level of indirection The parameter 'CellName' is a UNICODE_STRING *. No need to take the pointer of it to pass to AFSDbgLogMsg(). Change-Id: Id49f95058541a1a0ddaa0db9cb2c5ef0e5a32c64 Reviewed-on: http://gerrit.openafs.org/7109 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 85fad9a69f0d3df73ec8285722e788fe49ae9459) Reviewed-on: http://gerrit.openafs.org/7110 commit 4c82175368f9990552677fe896213843862de951 Author: Jeffrey Altman Date: Thu Apr 5 07:38:47 2012 -0400 Windows: CleanACLEnt requires cm_scache write locked Therefore, cm_FindACLCache() must be called with the cm_scache_t write-locked and therefore cm_HaveAccessRights() must obtain a write-lock and not a read-lock on 'aclScp'. Reviewed-on: http://gerrit.openafs.org/7049 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c1ef200a76b334309b0202c70165374305beb8fb) Change-Id: I53fa9575342322fd412229612b0e10dd07fdea54 Reviewed-on: http://gerrit.openafs.org/7064 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 121d0d6b1554a980991392eb0a8a2d2541b5e341 Author: Jeffrey Altman Date: Mon Apr 2 18:10:07 2012 -0400 Windows: Name Array store mount point and volume root Modify the Name Array processing to store both the mount point object and the volume root directory object in the array. This is necessary for proper operation of AFSPopulateNameArrayFromRelatedArray when the DirectoryCB parameter is a mount point object. Modify AFSBackupEntry to remove two entries if a volume root directory entry is being removed. Remove AFSReplaceCurrentElement() as it is no longer used. Reviewed-on: http://gerrit.openafs.org/7021 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3db44bacd4b3ac3b9ed63bcf671b03f7f7eeb8af) Change-Id: I66711639c41515c0b6ae6cd6263d45457fa668d0 Reviewed-on: http://gerrit.openafs.org/7063 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 62d7ce57d57d57e21abf3535c42eb51e0e8248d7 Author: Jeffrey Altman Date: Mon Apr 2 07:10:17 2012 -0400 Windows: do not call time() in a loop When checking for ACL Entry expiration, obtain the current time once per call to cm_FindACLCache() instead of once per ACL entry. Reviewed-on: http://gerrit.openafs.org/7016 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 048b24ae2b8accb33bc92ab9fdc4cdda14bc425b) Change-Id: I9954acea73cae20befa771ce430492c2396e8326 Reviewed-on: http://gerrit.openafs.org/7062 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 658f17df92286ee830df675311f8842846ff0882 Author: Jeffrey Altman Date: Sun Apr 1 01:17:21 2012 -0400 Windows: Add per object per user EACCES caching If a cache manager is told by a file server that the user does not have permission to fetch status for an object, the cache manager must avoid requesting a fetch status a second time for that object for the same user. Doing so risks triggering the rx call abort throttling which can have a significant impact on end user usability of the Explorer Shell and other applications. The cache manager cannot make a decision on whether or not to issue an RXAFS_FetchStatus RPC based upon the type of the object because the type is unknown to the cache manager. A file server will succeed a FetchStatus request when the parent directory ACL grants lookup permission if the object in question is the directory or is a symlink/mountpoint. Only file objects require read/write permissions to obtain status information. The rx call abort throttling is broken is many ways and must be avoided. Call aborts are tracked by call channel and occur whenever ten call aborts are issued on the same call channel in a row regardless of the amount of time that has elapsed. The EACCES cache works by storing EACCES events by the FID and User for which the event occurred, when it occurred and the FID of the parent directory. By definition, the parent FID of a volume root directory is itself. Entries are removed from the cache under the following circumstances: 1. When the parent FID's callback expires or is replaced. 2. When the parent FID's cm_scache object is recycled. 3. When the user's tokens expire or are replaced. Entries are not removed when the FID's cm_scache object is recycled. This patchset also implements correct behavior if the VLF_DFSFILESET flag is set on a volume. Reviewed-on: http://gerrit.openafs.org/6996 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7c5b8346b305911c981620fff70503008e9cf488) Change-Id: Iaba693d2c3d8e4e8734dc600ade7f886211d9ebc Reviewed-on: http://gerrit.openafs.org/7061 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d1fee15c697f0cb47133dd40ff15691cff94cd9 Author: Jeffrey Altman Date: Mon Apr 2 13:41:27 2012 -0400 Windows: Fail recursive path evaluation with access denied Matching the behavior of the AFS SMB server, the afs redirector should return STATUS_ACCESS_DENIED if File ID recursion is detected in the Name Array for any given path. Reviewed-on: http://gerrit.openafs.org/7018 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4c5819e22852afe4e83bdcd05268864ac1953a8c) Change-Id: Ib9c835e552e2aeb3bba402ca8d8ab537d507f91b Reviewed-on: http://gerrit.openafs.org/7060 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 89f707fc32447414ba5373dc7f746b59b6a68266 Author: Jeffrey Altman Date: Thu Apr 5 23:14:18 2012 -0400 Windows: Check Avail Space on extending SetEndOfFile When cm_SetLength() is called with an extending file length, check the available free space in the volume to see if the new length will fit. If not, return CM_ERROR_SPACE. This permits applications to discover that there is insufficient space prior to writing all of the data into the windows page cache at which point it will be too late. There is still the possibility of a race that can result in data loss if two applications are writing into the same volume at the same time and there is insufficient room. Reviewed-on: http://gerrit.openafs.org/7057 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3d024372293a279cf3a6cbdfe75a384ec7c8b200) Change-Id: I88a41bb57cafa495147d4b891c76d174e1d748de Reviewed-on: http://gerrit.openafs.org/7059 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 378e447e23a78a6bd60eb937b6be87d3a24d5988 Author: Jeffrey Altman Date: Thu Apr 5 00:11:11 2012 -0400 Windows: AFSVerifyEntry purge file data on DV change If the data version change is detected during AFSVerifyEntry(), treat it the same as if the AFS_OBJECT_FLAGS_VERIFY_DATA flag had been previous set. Purge the old data from the Windows file cache. Be sure to set the new metadata after the purge so that if the file length was truncated the old data beyond the truncation point will still be purged. Reviewed-on: http://gerrit.openafs.org/7048 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba3ba96976f17cb5e83fae1e0a42fd6564b75719) Change-Id: I27b50904e4dbdfdeb414245e985206b0bbc79f40 Reviewed-on: http://gerrit.openafs.org/7058 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c9f7546c0e8f2962c4d26932a3515391e86942c2 Author: Jeffrey Altman Date: Thu Apr 5 14:40:18 2012 -0400 Windows: Redirector must query volume size when asked The volume size and free space cannot be obtained at volume initialization and then re-used for all FileFsSizeInformation and FileFsFullSizeInformation queries. Doing so prevents Windows from being able to see changes in the available free space. The maximum size of the volume is not the size of the partition and the available space on the partition unless there is no quota applied to the volume. If there is a quota, then the free space is the smaller of the available quota and the available partition space. Add a new ioctl request to permit the redirector to query the current Volume Size Information details. Reviewed-on: http://gerrit.openafs.org/7052 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c19d1b875fab472dc7474c70529ab7fc2f7bf106) Change-Id: I98ea5e21c2b9d0f1041c68e4cfe9156c94b3d639 Reviewed-on: http://gerrit.openafs.org/7056 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9ba711d59119b62535db51b14eb791995f8c2151 Author: Jeffrey Altman Date: Thu Apr 5 17:00:28 2012 -0400 Windows: cm_AddACLCache lock ordering cm_aclLock must be obtained after cm_user_t mx and cm_cellLock. cm_user_t mx must be obtained before cm_cellLock. Reviewed-on: http://gerrit.openafs.org/7051 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7881de8cc17924120e45e498add1adc63fd85e5c) Change-Id: Id1f9ad94cd133f7a95bdafd630991b0cf3b5fdec Reviewed-on: http://gerrit.openafs.org/7055 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fd66b18119191723970a2c987c5911d2b1d10ec1 Author: Jeffrey Altman Date: Thu Apr 5 17:16:15 2012 -0400 rx: fix bad merge 95c38dff3740d7e24971ceb5875c06e7abfce102 An extra CALL_HOLD(call, RX_CALL_REFCOUNT_BEGIN) was added in rx_NewCall(). Revert it. Reviewed-on: http://gerrit.openafs.org/7050 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ea82d1014372383334fd05c01db135da870d3928) Change-Id: I80c58fd66b48fed93480bd73e209301dbc20b52b Reviewed-on: http://gerrit.openafs.org/7053 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 50c367909e538060e7df6125b0a437e67f1cba26 Author: Jeffrey Altman Date: Sun Apr 1 23:09:32 2012 -0400 Windows: Redirector Dir Enumeration Bug An enumerated directory was not validated properly if AFSValidateEntry() was called with PurgeData == FALSE even when a data version change was detected. Now it does. FIXES 130636 Change-Id: Ic5d2fd62b40fb16652fc09d459caf43905566d37 Reviewed-on: http://gerrit.openafs.org/7012 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e53e189c3e99e28d31e0e1d1b52041aadcbd3ffa) Reviewed-on: http://gerrit.openafs.org/7044 Tested-by: BuildBot commit 560e8de9c6cea0d04709e7206d03daf4973e97d2 Author: Jeffrey Altman Date: Tue Apr 3 09:09:42 2012 -0400 Windows: cm_GetNewSCache must return NULL on failure cm_GetNewSCache was leaking a valid cm_scache_t pointer in some failure cases. On failure, explicitly set the return value to NULL. Reviewed-on: http://gerrit.openafs.org/7037 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e1eba145843996ce50eae79356a3f88b92a2ea86) Change-Id: I38621995a5b664cea35ef51e8536186be58d4079 Reviewed-on: http://gerrit.openafs.org/7041 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef0323f4224f3dc024f57835e5e37b9d284e845c Author: Jeffrey Altman Date: Thu Jan 12 09:31:43 2012 -0500 Rx: give grow mtu its own call ref count type Reviewed-on: http://gerrit.openafs.org/6543 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit e3a50ea0d314df4e8caf0e25c57042a5f2a6e008) Change-Id: I5339ba13c199a618db13230fa4212f67784080bf Reviewed-on: http://gerrit.openafs.org/7040 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 398303bed581bfca13e249bad0752bf761555727 Author: Jeffrey Altman Date: Sun Jan 29 13:52:17 2012 -0500 rx: conn->callNumber protected by conn_call_lock The conn->callNumber array should be protected by the conn_call_lock since the conn_call_lock is what protects the binding of calls to connection channels. Reviewed-on: http://gerrit.openafs.org/6629 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman (cherry picked from commit 95c38dff3740d7e24971ceb5875c06e7abfce102) Change-Id: I8aaae06e6f8c500c7855d8e2bde923137e7b73be Reviewed-on: http://gerrit.openafs.org/7039 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0349edb9f4fc617b8bb3f2c504d341518fdf25f7 Author: Jeffrey Altman Date: Fri Jan 20 01:50:01 2012 -0500 Rx: rxi_FreeCall conn_call_lock vs call->lock deadlock The conn->conn_call_lock is held before call->lock in the lock hierarchy which is violated within rxi_FreeCall(). While the deadlock is rare, it is possible and has been experienced on both Windows and Linux. Change the signature of rxi_FreeCall to return 1 if it frees the call and 0 if it does not. Due to the lock hierarchy violation use MUTEX_TRYENTER() to attempt to obtain the conn->conn_call_lock. If the lock cannot be obtained set the call state to dally and return. If the conn_call_lock can be obtained, behave as we did before this patchset. Only increment the callNumber if the original call->state was dally or hold and the conn_call_lock could be obtained. We must not increment the callNumber otherwise. Doing so can result in call numbers being skipped when the conn->call slot is reused. Reviewed-on: http://gerrit.openafs.org/6443 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 33185db16aca40a3bdbcb66caf994924220b5012) Change-Id: I2b0f21dfb549eccd4b8f3b0be0a6b87d181ae726 Reviewed-on: http://gerrit.openafs.org/7038 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3a025008708d01d79397fd7067de72fc61346050 Author: Jeffrey Altman Date: Mon Apr 2 17:32:39 2012 -0400 Windows: Pass name array to AFSRetrieveFileInformation AFSRetrieveFileInformation does not parse the complete path. That information is available in the Ccb->NameArray. If the object on which AFSRetrieveFileInformation is called is a relative symlink containing ".." references, the full contents of the evaluated path is required for context. Pass the Ccb->NameArray so that it is available. Reviewed-on: http://gerrit.openafs.org/7020 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0ca4dc279a49141a63727134898c58f30ad15e8d) Change-Id: I08bbf5fdf72033f2bd16a89073f23799ad2ea436 Reviewed-on: http://gerrit.openafs.org/7036 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e2907dcaef09e9f97252be57908ef75e1aabafb4 Author: Jeffrey Altman Date: Mon Apr 2 13:39:17 2012 -0400 Windows: Use hash when comparing File IDs in redirector AFSIsEqualFid() should use the hash value included in the FileId as part of the comparison algorithm. Reviewed-on: http://gerrit.openafs.org/7017 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 766c62b918dba793f738a075918947b8dad76229) Change-Id: I7e9b38a3c945da1f69b16ba6dbfe16ba2e4d84d9 Reviewed-on: http://gerrit.openafs.org/7035 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bccceb57eab234da1198705d9f6744d528d3a5a4 Author: Jeffrey Altman Date: Mon Apr 2 06:57:53 2012 -0400 Windows FindACLCache must hold scp write locked In the SMB modules, calls to cm_FindACLCache() were not holding the cm_scache_t rwlock writed locked as required. Reviewed-on: http://gerrit.openafs.org/7015 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0896602f6e7c409990fcae40dd54f84260312472) Change-Id: I17890e739bed1e495125b1852b1249bdfd06f37c Reviewed-on: http://gerrit.openafs.org/7034 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2faf0e963f1f939d4466a94f536dfb0ca18367cd Author: Jeffrey Altman Date: Mon Apr 2 06:57:02 2012 -0400 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/7014 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 68a42ed88db3e457b6d5169c2beb8fa7bb144ea3) Change-Id: I2aad1b5c811a00a315580fe5571246ac802c6853 Reviewed-on: http://gerrit.openafs.org/7033 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8f9eebacd5902c038d832c64db2ee9f3c15da738 Author: Jeffrey Altman Date: Sun Apr 1 12:40:36 2012 -0400 Windows: Freelance HaveAccessRights Change the test in cm_HaveAccessRights related to Freelance mode. All objects in the freelance cell and root volume by definition have access rights. Reviewed-on: http://gerrit.openafs.org/7008 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b84496b8593dd9c220022c78d8b9b571c7b78e8d) Change-Id: I9741be99fc643b56180369f2bfad0a46746c013c Reviewed-on: http://gerrit.openafs.org/7032 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d923ea62aa58d7d244d62466c466ccba8af4ea31 Author: Jeffrey Altman Date: Sun Apr 1 12:11:40 2012 -0400 Windows: optimize InitCallback3 processing Do not drop and acquire locks if the cm_scache_t does not have a callback. Reviewed-on: http://gerrit.openafs.org/7007 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9a76279ef154730150594cc560a34eada3ae9fe4) Change-Id: Ibbaac9c807c8cdfb0ac37e7708011325a9757a76 Reviewed-on: http://gerrit.openafs.org/7031 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 077f9425cab1db69b27b1b05f5e67f0388900f2b Author: Jeffrey Altman Date: Fri Mar 30 15:13:55 2012 -0400 Windows: Record callback issued time Save the time at which a callback was issued. This can be used in a later patchset to determine if a callback was issued after a negative access entry for a {fid,user} pair. Reviewed-on: http://gerrit.openafs.org/6995 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8fcdef55f8e422f4762f38374be32993d2b2551e) Change-Id: I26293ea93b48f3953bd79a76e4741f03237232be Reviewed-on: http://gerrit.openafs.org/7030 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 64d57ee68c0537b0ccf8246b3ea5e6a0e6f59414 Author: Jeffrey Altman Date: Fri Mar 30 14:58:11 2012 -0400 Windows: Implement cm_TGTLifeTime() cm_aclent.h defined cm_TGTLifeTime() as a macro that always returned 0x7fffffff. Implement cm_TGTLifeTime() as a function that returns the actual token lifetime. Reviewed-on: http://gerrit.openafs.org/6994 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit fd919b3ae52695b8a83fabc736c8ea82f383a5c9) Change-Id: I3adfb0ec08ee0c5ad807dc9f2cc5a3f322f62f43 Reviewed-on: http://gerrit.openafs.org/7029 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 747fc0d8581f261c9341f649ad7fadd5636fe1df Author: Jeffrey Altman Date: Fri Mar 30 12:24:43 2012 -0400 Windows: add parent FID to cm_GetSCache When a cm_scache_t object is created in 98% of the time, the parent FID is known to the cache manager. Normally the cache manager will obtain the parent info from the AFSFetchStatus structure but if the user credentials do not permit status info to be obtained from the file server the parent info will be unavailable. Having the parent directory FID is useful for debugging but can also be used to check the user's access rights on the parent directory. Reviewed-on: http://gerrit.openafs.org/6993 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cf81cd790f71b7ce83c802df8e7094f93bff63fb) Change-Id: I6f819bfee4999e84fbbb43b30af52c505813824e Reviewed-on: http://gerrit.openafs.org/7028 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2e0f44e8828866e93080c19e50e57eb7d6215f94 Author: Jeffrey Altman Date: Mon Apr 2 22:35:41 2012 -0400 viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize The AFSDisk and AFSFetchVolumeStatus structures use signed 32-bit integers for representation partition size and available blocks. RoundInt64ToInt31() should be used instead of RoundInt64ToInt32() when assigning their values. Reviewed-on: http://gerrit.openafs.org/7022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3) Change-Id: I72a71e74d86d6142ecd295ef4837f61ded329e38 Reviewed-on: http://gerrit.openafs.org/7027 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d0b44ce961f11a5d13d65ddbc270b4c571f1328 Author: Jeffrey Altman Date: Fri Mar 23 13:41:10 2012 -0400 rx: handle clock reversals for call timeouts If the clock is set backwards, call timeouts will not trigger until the clock regains its original value plus the timeout period. In rxi_CheckCall(), look for a backward clock shift and if one is noticed, fail the call with RX_CALL_TIMEOUT. Reviewed-on: http://gerrit.openafs.org/6943 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 223cbf5a5bc1812f3b2ce86a7b05dc56f517c6f8) Change-Id: Ieeba9cbc21da24705364af7b06ad7bfc35cb9104 Reviewed-on: http://gerrit.openafs.org/7026 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bd5c64193d8b5e9237644f8b45fb4ff5c1286da1 Author: Jeffrey Altman Date: Thu Mar 29 23:49:43 2012 -0400 Windows: avoid deadlock with Trend Micro Trend Micro's anti-virus driver attempts to open the file in response to CcPurgeCacheSection(). While processing AFSSetDispositionInfo() the Fcb->NPFcb->Resource is held which is also required if a status verification is required during the CreateFile operation. That results in a deadlock. Avoid the deadlock by setting the PENDING_DELETE flag prior to calling CcPurgeCacheSection(). Reviewed-on: http://gerrit.openafs.org/6988 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 134943a7a55d73f567d3f336e06783c405347fa7) Change-Id: I30ea9fcd8c0a1266d91bae28c749ee3ba0476ebe Reviewed-on: http://gerrit.openafs.org/6990 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit db7f4a36aa878d16c01ef0e99732032a3fc4bc5c Author: Jeffrey Altman Date: Thu Mar 29 23:39:17 2012 -0400 Windows: Use ulFilter in AFSInvalidateObject ulFilter was assigned appropriate values but it was not passed to AFSFsRtlNotifyFullReportChange as a parameter. Reviewed-on: http://gerrit.openafs.org/6987 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6cb256375bb0aab73cc802e50620f1fcf0f564e4) Change-Id: I48a1d42713489259e24b0d11e1bc5913658ff523 Reviewed-on: http://gerrit.openafs.org/6989 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 78e2332531f10d3475a473b9b1daba7d2a5da697 Author: Jeffrey Altman Date: Tue Mar 27 00:16:30 2012 -0400 Windows: ObjectInformation.ObjectReferenceCount comparison If there is an undercount of the ObjectReferenceCount, consider it the same as if the object count is zero for comparison purposes. Reviewed-on: http://gerrit.openafs.org/6970 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0bc328b9729cb5bfe3085ac01455fe82c9cef7a4) Change-Id: I4c40e61ecf1d505cacbb0fbe78fb39551549f97f Reviewed-on: http://gerrit.openafs.org/6984 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b5a8b1e1b663e6ad1a4cb1e2f77e6280005623d5 Author: Jeffrey Altman Date: Tue Mar 27 14:18:14 2012 -0400 Windows: Add Name Array Processing Trace Subsystem Reviewed-on: http://gerrit.openafs.org/6973 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Tested-by: Jeffrey Altman (cherry picked from commit 05a703a320e549efe7f68e27cfa86e391cf5839d) Change-Id: I877ff217fdb1a579e603f5da79883332cf75f1e0 Reviewed-on: http://gerrit.openafs.org/6983 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ebdd5b2f46236b7eeab3b146aa85c759d08a44d9 Author: Jeffrey Altman Date: Mon Mar 26 11:10:36 2012 -0400 Windows: AFSInvalidateObject can overwrite input param AFSInvalidateObject() must not be called with an AFSObjectInformationCB pointer variable that it is not safe to overwrite as the function sets the input value to NULL if the invalidation is going to be performed asynchronously in a worker thread. In AFSEnumerateDirectory(), the following call took place: AFSInvalidateObject( &pDirNode->ObjectInformation, AFS_INVALIDATE_DATA_VERSION); which requires a worker thread to process. As a result, the ObjectInformation pointer was being set to NULL which detached the AFSObjectInformationCB from the AFSDirectoryCB. That in turn produced an execption in AFSLocateName() which resulted in a resource not being freed that in turn produced a deadlock. Reviewed-on: http://gerrit.openafs.org/6962 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Tested-by: Jeffrey Altman (cherry picked from commit 32ad50bcee9a5b087bea7e0c9c1cfe3d1e58293e) Change-Id: I8a8c2292f18ddb2f25162e86592a3b51e413bebb Reviewed-on: http://gerrit.openafs.org/6982 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e0b43bb475e59201f8da30d8d9f34ba684e632d3 Author: Jeffrey Altman Date: Sun Mar 25 21:29:40 2012 -0400 windows: ObjectInformationCB.ObjectReferenceCount The ObjectInformationCB.ObjectReferenceCount is protected by the VolumeCB->ObjectInfoTree.TreeLock. When the TreeLock is dropped the reference count can change. Hold the TreeLock across both ObjectReferenceCount == 0 tests and the associated tear down or repeat the ObjectReferenceCount == 0 test after the TreeLock is reacquired. Reviewed-on: http://gerrit.openafs.org/6959 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f7bea476c7f6e8489372e138dc60ebcdd92c40c1) Change-Id: Ie44c8c8f47d33f87234566565592f0a5afa67ece Reviewed-on: http://gerrit.openafs.org/6981 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5dec6f26695f385a091971359ce2ffeed2bec1fd Author: Jeffrey Altman Date: Mon Mar 26 20:49:03 2012 -0400 Windows: CreateProcessNotify verify changes PsSetCreateProcessNotifyRoutineEx will fail with STATUS_ACCESS_DENIED if the driver does not have the IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY bit set in the image header. Do not include the ParentProcessId in the AFSProceSSDestroy parameter list. It isn't available to use and isn't used for anything in any case. Assign AFSProcessCB blocks to processes that were created before AFSRedirector registered the CreateProcessNotify callback and access the file system. Reviewed-on: http://gerrit.openafs.org/6967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5b4e0e3c2eb161eabbb7a9ea8486315040e9705a) Change-Id: I6d6a4e2f11e234d9001f41a85db921e4a671854d Reviewed-on: http://gerrit.openafs.org/6977 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1daa2f763d5fa4abc1ae6457ff0236ebbb3494d9 Author: Jeffrey Altman Date: Tue Mar 27 00:00:30 2012 -0400 Windows: Fix VNOSERVICE EventLog parameters Add missing volume and cell. Reviewed-on: http://gerrit.openafs.org/6969 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d1d51852be1daf45f92a8cbf5f294892141108f2) Change-Id: I987b45b5521baad163270a1116dbb247c180d365 Reviewed-on: http://gerrit.openafs.org/6976 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f30cc094a6cb78fdfef9b2ee4c12eb194742fe50 Author: Jeffrey Altman Date: Mon Mar 19 22:38:06 2012 -0400 Windows: Assign AuthGroup during Process Create As the process is being created, assign the AuthGroup so that the must up to date information is used to assign AuthGroup inheritance from Impersonation states and to prevent the parent process from being destroyed before the AuthGroup is determined. Reviewed-on: http://gerrit.openafs.org/6927 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a0a1ad06c2dd632e3e471e5f40ff3eda470bf71a) Change-Id: If5698ef49ecc7e359d411d56c73e20143f8c152a Reviewed-on: http://gerrit.openafs.org/6956 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6ab902ef6a56d14d506f7ea004d8240408080f0f Author: Jeffrey Altman Date: Mon Mar 19 21:10:31 2012 -0400 Windows: Refactor AFSProcessSupport Breakup AFSProcessNotify() into AFSProcessCreate() and AFSProcessDestroy(). Correct inconsistencies with ETHREAD vs ThreadId HANDLE. Add AFSProcessNotifyEx() and use PsSetCreateProcessNotifyRoutineEx() to register it on Vista SP1 and above. Reviewed-on: http://gerrit.openafs.org/6926 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a54fefc0449fbccc881c017480cb92878bb460cb) Change-Id: I6104f2d0d789fda7d4ff1a68712e9b5508da7a7e Reviewed-on: http://gerrit.openafs.org/6955 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f4a0bc3c42895ef61f9a8a53f3fca6b59dfdab2c Author: Jeffrey Altman Date: Sun Mar 25 09:56:48 2012 -0400 doc: correct implicit ACL permissions volume owner OpenAFS changed the behavior of implicit administrator permission for directory ownership. In OpenAFS only the volume root directory owner has implicit administrator permissions and they apply to all directories in the volume not just those with matching ownership. Reviewed-on: http://gerrit.openafs.org/6951 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 95ec152a850c0cde33829481b8e71e7e7e686a58) Change-Id: I327a1f1de4f6d13eef290de6a7165c16398dede2 Reviewed-on: http://gerrit.openafs.org/6953 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0616dd70efd70ef2112ee9298cf730df763c4129 Author: Jeffrey Altman Date: Wed Mar 21 10:11:31 2012 -0400 Windows: AFSRedir Debug for STATUS_NOT_A_DIRECTORY Add additional logging to handle the case where the afsd_service returns STATUS_NOT_A_DIRECTORY for eval by id/name. Reviewed-on: http://gerrit.openafs.org/6930 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b695eb272d66269a57cdca2550c00f2b0003ae35) Change-Id: Ia700d3f1529d55db5ce534c1a54cb9e7b1203cd4 Reviewed-on: http://gerrit.openafs.org/6942 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 710cbbab107d35507e04ce590ad8daf9de5bd550 Author: Jeffrey Altman Date: Thu Mar 22 15:55:47 2012 -0400 Windows: Client handling of VNOSERVICE VNOSERVICE should not be grouped together with the volume status error codes. It is used to indicate that the RPC was not serviced. The file server issues it when its idle dead timeout period is reached while receiving rx call data. The client's existing status information is still valid and the client can retry the call. Reviewed-on: http://gerrit.openafs.org/6938 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 39964d08792f3a09694f97d7c7fa76a86ca213a7) Change-Id: I8c8436fcecc2263d177df88719883cf29b021a84 Reviewed-on: http://gerrit.openafs.org/6939 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0d756c0c049e6068612939d028b33a9deb9af72 Author: Jeffrey Altman Date: Fri Mar 16 01:09:42 2012 -0400 Windows: invalidate correct objects during dir verification When processing a directory verification, if a change of data version is detected or if the FileID of a FileName changes, be sure to invalidate and verify the directory entry. Setting the verify flag on the parent after updating the directory entry's metadata does not result in the correct behavior. Reviewed-on: http://gerrit.openafs.org/6914 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 4d98adc83cd09d75c99abd9d29af79f9de5b1d1a) Change-Id: Ic60c506a7279f3ee39347dd6d98ff0dc9a50c904 Reviewed-on: http://gerrit.openafs.org/6920 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cbf0cb233bb87251dbd63885a7a91c74d851c6d4 Author: Simon Wilkinson Date: Wed Mar 14 10:56:06 2012 -0400 rx: hold call->lock across RXS_PreparePacket RX Security Classes have a right to assume that when RXS_PreparePacket is called that they have exclusive access to the rx_call structure. Commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 unintentionally failed to acquire the call->lock prior to RXS_PreparePacket being called. Change-Id: I5a9dfb2818fa17ba6fc1ab6f76ec5cde602c6f16 Reviewed-on: http://gerrit.openafs.org/6904 Tested-by: BuildBot Reviewed-by: Alistair Ferguson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fdcf171a8d2b2153648b6b799096e09eb469beb) Reviewed-on: http://gerrit.openafs.org/6915 commit 003debd23bf377cac9ec972828dc300d89e1367f Author: Jeffrey Altman Date: Wed Mar 14 23:22:57 2012 -0400 Windows: 1.7.8 (1.7.0800) Version Change-Id: Ice56a2baa4ae4cb732c01844d7effbf76c53fb51 Reviewed-on: http://gerrit.openafs.org/6906 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3785ae2fb95a0019353f30bc8a3ba71e081459fc Author: Jeffrey Altman Date: Wed Mar 14 23:21:29 2012 -0400 Windows: Change log for 1.7.8 Change-Id: Ibed23b401628e171ac5a7697a533072625e30a4d Reviewed-on: http://gerrit.openafs.org/6905 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d80dc5a3905234412bf0c2e2a7b98e86aa4ca482 Author: chas williams - CONTRACTOR Date: Mon Mar 5 11:41:08 2012 -0500 rxgen: fix to use rx accessor routines apparently some uses didnt get converted during the previous work. Reviewed-on: http://gerrit.openafs.org/6874 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4cc3923b1b857368a522be55c55fce4c9b62548a) Change-Id: I016fab1696bedad9ce98f91343912a407961a744 Reviewed-on: http://gerrit.openafs.org/6902 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa9457d9088570c5955063db2dbf4103850b4bac Author: Jeffrey Altman Date: Mon Mar 12 15:53:47 2012 -0400 Windows: Drop resource across AFSCleanupFcb Avoid additional deadlocks involving VolumeCB->ObjectInfoTree.TreeLock. Reviewed-on: http://gerrit.openafs.org/6893 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 317b227a20a99960b313d06a3441822472d638c8) Change-Id: Icdbd9d936d6dc48c8ff3429472ad4444b177ce28 Reviewed-on: http://gerrit.openafs.org/6901 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6bec896cdd216eec47e73ff0598555adf37f17dc Author: Jeffrey Altman Date: Wed Mar 7 06:54:54 2012 -0800 Windows: Wait for memory allocation if necessary The kernel has a limited pool of memory. If there is no memory available to satisfy a request, that request will fail initially with a STATUS_OUT_OF_RESOURCES error which in most cases is exposed to the user-mode application as STATUS_ACCESS_DENIED. This can produce inconsistent results. This patchset introduces an Event object, MemoryAvailableEvent, which is signalled when the redirector deallocates memory. This should in many cases permit requests to succeed where they otherwise would have failed immediately. The WaitingForMemoryCount field tracks the number of threads that are waiting for memory to become available. A subsequent patch could use this value to accelerate the tear down of cached data. To avoid deadlocks, blocking threads will only wait for a maximum of 30 seconds at a time. As long as the redirector continues to free memory, the thread can re-queue itself. However, if a timeout occurs, the allocation request will fail. Reviewed-on: http://gerrit.openafs.org/6886 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6fb1078e08d4077fb0602f97b1a83bcd72f55db8) Change-Id: I6d16591e597866d2e5b9592431bc3ba0d7c8de44 Reviewed-on: http://gerrit.openafs.org/6900 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8bbc671a9f744cd72c998d440ea19b48b357bfe4 Author: Jeffrey Altman Date: Mon Mar 5 23:14:28 2012 -0600 Windows: Correct Data Version change synchronization The data version must be checked and set while the ObjectInformation DirectoryNodeHdr.TreeLock is held exclusive. Otherwise, it is possible for a race to occur. Reviewed-on: http://gerrit.openafs.org/6883 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b7f6d8e3964592543d4706c58c395fbe2f81218b) Change-Id: I1e8b3ffc27a1118bea9276573031603bf4449c5d Reviewed-on: http://gerrit.openafs.org/6899 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6262ad70ff33134ca6091eb99bcb34e3c741583f Author: Jeffrey Altman Date: Fri Mar 2 10:54:38 2012 -0500 Windows: add __try..__except Wrap potential exception locations in __try ... __except so that the exceptions can be caught by us instead of Cc/Mm which use exceptions to signal status. Reviewed-on: http://gerrit.openafs.org/6859 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 88ec2929fddec2ae53a74d3e40cbdeb566aeacc5) Change-Id: I01be8efade28893f9a73796fd6db3500e28c7e2b Reviewed-on: http://gerrit.openafs.org/6867 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 954305cedb70c09d2847af6ef67fd8e2731b1544 Author: Jeffrey Altman Date: Fri Mar 2 10:54:23 2012 -0500 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/6858 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5762d9c3c7d941b856bfa86ce8e1ee6a76f41eda) Change-Id: Iefdbea3bfe44b97b38b82f3a5417420a7f25b65f Reviewed-on: http://gerrit.openafs.org/6866 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 48d638644c8278193c7f95d7a4b6218eb5d3104e Author: Jeffrey Altman Date: Fri Mar 2 10:52:35 2012 -0500 Windows: Avoid deadlock in invalidation path During data version invalidation the AFS redirector must CcPurge any non-dirty extents on a file. This operation can be intercepted by a filter driver which in turn might open the file and close it again before the CcPurge completes. The AFSPerformObjectInvalidate call holds the ExtentsResource shared which can deadlock if AFSClose attempts an extent tear down which requires exclusive access to the ExtentsResource. Reviewed-on: http://gerrit.openafs.org/6856 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fdf1dfc5f92fcd149a7ae0945e4458993b2ad61e) Change-Id: I6eb5300cb7d3a98ffe9eb5301dcc6ef24fdf7a7b Reviewed-on: http://gerrit.openafs.org/6865 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d5ceb1ac269353ffacf3b6ff5215dba27a346429 Author: Jeffrey Altman Date: Wed Feb 29 13:07:47 2012 -0500 Windows: Workaround Win7 SMB Reconnect Bug The SMB specification permits the server to save a round trip in the GSS negotiation by sending an initial security blob. Unfortunately, doing so trips a bug in Windows 7 and Server 2008 R2 whereby the SMB 1.x redirector drops the blob on the floor after the first connection to the server and simply attempts to reuse the previous authentication context. This bug can be avoided by the server sending no security blob in the SMB_COM_NEGOTIATE response. This forces the client to send an initial GSS init_sec_context blob under all circumstances which works around the bug in Microsoft's code. Do not call smb_NegotiateExtendedSecurity(&secBlob, &secBlobLength); As a result of the SMB 1.x bug, all attempts to reconnect fail due to SMB connection resets. The SMB 1.x redirector will retry indefinitely but all processes with outstanding requests to \\AFS will block until the machine is rebooted. Reviewed-on: http://gerrit.openafs.org/6846 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 28a33f8492098c23f7c3c58763ace93b82ea80a7) Change-Id: I8439cf1f68dd818036fc9b479a05aa47e4bd6967 Reviewed-on: http://gerrit.openafs.org/6850 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d08de41676cd1c3d0f7c7507d00865d3f2af1f1c Author: Jeffrey Altman Date: Fri Feb 24 12:23:28 2012 -0500 Windows: Fix an ExtentResource trace message This instance is logging a SHARED acquisition not an EXCL one. Reviewed-on: http://gerrit.openafs.org/6792 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0e610fdacb4484d245bf1f727d035812774192ea) Change-Id: I9ea73e28e84bc4346b9f698ad7b5162be7b4b083 Reviewed-on: http://gerrit.openafs.org/6837 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6a9fdfd3c9e23f3954a06590fe31a69bf1e56f6 Author: Jeffrey Altman Date: Fri Feb 24 12:21:46 2012 -0500 Windows: cm_UpdateCell never applies to Freelance mode The Freelance.Local.Cell is updated by the registry monitor thread and cm_UpdateCell should be a no-op. Make it so. Reviewed-on: http://gerrit.openafs.org/6791 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit cfb7f205d8153899c0165594a29d91926a40425d) Change-Id: Ic3b9f2349a956ae143c579715a7536f04877574f Reviewed-on: http://gerrit.openafs.org/6836 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a7fa4786fe4422dae6ee1b9d58bcf1c9252b182b Author: Vaibhav Kamra Date: Thu Feb 23 09:58:07 2012 -0800 Windows: Redirector opens must set a valid FsContext A successful open must have FileObject->FsContext set to a structure with a valid/initialized FSRTL_ADVANCED_FCB_HEADER object. Not having this breaks assumptions in the kernel. Patchset edited by Jeffrey Altman Reviewed-on: http://gerrit.openafs.org/6782 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6bb0014be2c3ea5ca411bf349fb3987c5d496c40) Change-Id: Id8e08c5bf0eb3c42e38ccd05ac4171c5f2108117 Reviewed-on: http://gerrit.openafs.org/6835 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cf47f25be2c17831002f89207a636e32ae4446e8 Author: Jeffrey Altman Date: Thu Feb 23 11:13:08 2012 -0800 Windows: remove AFSOpenRedirector from AFSRedirLib The AFSOpenRedirector functionality must exist in the framework, AFSRedir.sys, not the library, AFSRedirLib.sys. Reviewed-on: http://gerrit.openafs.org/6781 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit de93a78b870b40338cfd0f4839fe4ef3b959481b) Change-Id: I9e6504459ed958b0fe698171aef4286275538eb9 Reviewed-on: http://gerrit.openafs.org/6834 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2a3ddd5a6a0e5d574ece669586ab5da8048a5d2b Author: Jeffrey Altman Date: Thu Feb 23 06:31:31 2012 -0800 Windows: do not bugcheck in AFSExAllocatePoolWithTag If the Bug Check flag is set, the call to AFSBreakPoint() in AFSExAllocatePoolWithTag() will trigger. There is no need for an explicit bug check test in AFSExAllocatePoolWithTag(). If AFSExAllocatePoolWithTag() returns NULL there is no need to ASSERT() the return value since AFSBreakPoint() would already have been called to signal a debugger. Reviewed-on: http://gerrit.openafs.org/6780 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 315b97ab587247d7750ff4b64275e397ac4b97a7) Change-Id: I1410a9653d072c844bafe32346865ec8b6dd1e1b Reviewed-on: http://gerrit.openafs.org/6833 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 87032d0be0824d13a5e54df85de81da40bdae479 Author: Jeffrey Altman Date: Thu Feb 23 06:28:49 2012 -0800 Windows: Revert "AFSRedir DebugFlags Turn on BugCheck" This reverts commit 209df87d08fb07d9641b81858a0821b9fd95dbcc. Turning on BugCheck by default was a good idea because we needed to track down the cause of exceptions that were otherwise being thrown resulting in resource leaks. However, it is a bad idea because it results in out of memory conditions throwing bug checks that result in a BSOD. Reviewed-on: http://gerrit.openafs.org/6779 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit fe6cc80fdbbd3c66ddc32bb6a8e639753244da70) Change-Id: I84ba1a03f01d1219808ad6fab38a5a6688bcab1a Reviewed-on: http://gerrit.openafs.org/6832 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb44db99538cdde737d6a7462d77daa896598e50 Author: Jeffrey Altman Date: Wed Feb 22 14:28:49 2012 -0800 Windows: version 1.7.7 (1.7.07000) Change-Id: Iaf6b62651184662ced2a87163d19579c46b9c282 Reviewed-on: http://gerrit.openafs.org/6773 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0f9ea1376320f0ab8af8948191576dd09660ad09 Author: Jeffrey Altman Date: Wed Feb 22 14:39:34 2012 -0800 Windows: 1.7.7 Release Notes Change-Id: I99687f35fc78eb13ab6f2b36bb176f5f22049435 Reviewed-on: http://gerrit.openafs.org/6774 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fbc203e4e671987fbdd62f8d705af81313897ac6 Author: Jeffrey Altman Date: Wed Feb 22 14:19:51 2012 -0500 Windows: invalidate data version on link creation notify the redirector that the directory data version has changed when a pioctl is used to create a symlink or mount point. FIXES 130589 Reviewed-on: http://gerrit.openafs.org/6747 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4ed91fe59468ed6c834f968a5b8202e967ea43b5) Change-Id: Ieff313e120d758ef12eea1ddd4d0479fe6940468 Reviewed-on: http://gerrit.openafs.org/6748 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f904d53f80354d9d911fdcead5ddc4c115635478 Author: Jeffrey Altman Date: Mon Feb 20 20:50:53 2012 -0500 Windows: AFSPerformObjectInvalidate hold ExtentsResource shared The AFSPerformObjectInvalidate() was obtaining exclusive access to the Fcb ExtentsResource even though it was not tearing down the extents list. The ExtentsResource could be held shared instead. Doing so will avoid the following deadlock: Thread 1: nt!MmPurgeSection+0x403 nt!CcPurgeCacheSection+0x100 AFSRedirLib!AFSPerformObjectInvalidate+0xd4 AFSRedirLib!AFSWorkerThread+0xa4 nt!PspSystemThreadStartup+0x2e Thread 2: AFSRedirLib!AFSAcquireShared+0x18 AFSRedirLib!AFSMarkDirty+0x68 AFSRedirLib!AFSNonCachedWrite+0x603 AFSRedirLib!AFSCommonWrite+0x5fa AFSRedirLib!AFSWrite+0x20 nt!IofCallDriver+0x45 AFSRedir!AFSWrite+0x57 nt!IofCallDriver+0x45 fltMgr!FltpDispatch+0x6f nt!IofCallDriver+0x45 AMFilter+0x2c6e nt!IofCallDriver+0x45 PMDriver+0x112a nt!IofCallDriver+0x45 OpLoader+0x1cd2 nt!IofCallDriver+0x45 savonaccesscontrol+0x6f15 savonaccessfilter+0x2fa0 nt!IofCallDriver+0x45 nt!IoAsynchronousPageWrite+0xd0 nt!MiMappedPageWriter+0x127 nt!PspSystemThreadStartup+0x2e Thread 1 is attempting to perform a cache purge which cannot complete until Thread 2 is finished but Thread 2 requires the ExtentsResource which is held by Thread 1. Reviewed-on: http://gerrit.openafs.org/6744 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5965c5390bf8264dacf60016929fc8d3aa83a7ea) Change-Id: I1555f6f504fa7f14a9d6cb0389c641a54a7e45fa Reviewed-on: http://gerrit.openafs.org/6746 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ad191770bd56c9a8f81f06f551ee440244664ab Author: Jeffrey Altman Date: Mon Feb 20 01:48:20 2012 -0500 Windows: fsLockCount not accurate Prior to 1.6.2 the file server does not report an accurate value for the lock state. In addition, callbacks are not broken when locks are freed due to lease expiration. Reviewed-on: http://gerrit.openafs.org/6741 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 08d800b896db688cd96d742781e8225c9e58ef57) Change-Id: Ia89c0cb207912a3d197b158c26d967a8c779cd89 Reviewed-on: http://gerrit.openafs.org/6745 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d729634300cb8bcb82292f2b754934f3a0f03251 Author: Jeffrey Altman Date: Sat Feb 18 19:57:25 2012 -0500 Windows: Dereg Lanman and Lsa reg values for afsredir If the machine has been upgraded from an AFS SMB Server to the AFS Redirector, the registry will have leftover configuration for the "AFS" netbios name in the Lsa BackConnectionHostNames value and the LanmanWorkstation ReconnectableServers and ServersWithExtendedSessTimeout values. These values are not useful with the AFS Redirector since \\AFS is owned by afsredir.sys and not the SMB redirector. Remove the "AFS" netbios name from these values when afsd_service.exe has started in redirector mode. Reviewed-on: http://gerrit.openafs.org/6737 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 91d38b93566734734f559a84c38a09e5c7d530c0) Change-Id: I5148e1391c601d4b8f2a954639c1c6fef499a73e Reviewed-on: http://gerrit.openafs.org/6739 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e385576c14a4a5c568cc1cf8d0c499a390803982 Author: Ken Dreyer Date: Sat Feb 11 09:43:30 2012 -0700 doc: replace hostnames with IETF example hostnames There were several different real and made-up hostnames and company names used throughout our documentation examples. The IETF has reserved "example.com" and other "example" TLDs for use in examples (RFC 2606). Replace almost all references to ABC Corporation, DEF Corporation, and State University, as well as "abc.com", "bigcell.com", "def.com", "def.gov", "ghi.com", "ghi.gov", "jkl.com", "mit.edu", "stanford.edu", "state.edu", "stateu.edu", "uncc.edu", and "xyz.com". Standardize on "Example Corporation", "Example Network", "Example Organization" (example.com, example.net, and example.org). The Scout documentation in the Admin Guide contains PNG images that contain the old cell names, so I left those references until the images can be replaced. Reviewed-on: http://gerrit.openafs.org/6697 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1cc8feb6fc7b8d551b343b276e40e023ab1dccbe) Change-Id: I650045c18f3529c13bfcdd2a35c84bcc8a95e67e Reviewed-on: http://gerrit.openafs.org/6736 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d8aa1697dc9d471db38587ea78b16da0d51b8d1 Author: Jeffrey Altman Date: Fri Feb 17 22:21:00 2012 -0500 Windows: Explorer Shell Set Unix Mode bits The Unix Mode bits were not being saved. This patch permits them to be saved. FIXES 130572 (cherry picked from commit f93d92a1d79bdb88d0403b3df9a56753f3de4b64) Change-Id: I1ec198f81babe51b4c817dcb2e2b4fcf8968efe5 Reviewed-on: http://gerrit.openafs.org/6735 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e51214263a9908d8eaa057336a0782a6c3da58fd Author: Jeffrey Altman Date: Fri Feb 17 10:37:34 2012 -0500 Windows: remove unnecessary DirectoryEnumEvent The DirectoryEnumEvent is not required to implement: AFSSetEnumerationEvent AFSClearEnumerationEvent AFSIsEnumerationInProgress The DirectoryEnumCount is modified by interlocked operations and can be used as a marker for when an enumeration is in progress. Reviewed-on: http://gerrit.openafs.org/6725 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 168d730a6f227c9b9dce228314eb75aa76b8cddb) Change-Id: I84b5cec155e67454427b9fdd94bd44fd6985f538 Reviewed-on: http://gerrit.openafs.org/6732 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit de60151ebdccf92dce4d982303c2dcd6c53250d2 Author: Jeffrey Altman Date: Thu Feb 16 23:50:18 2012 -0500 Windows: VolumeCB->ObjectInfoTree.TreeLock Deadlock AFSPrimaryVolumeWorkerThread held the VolumeCB->ObjectInfoTree.TreeLock exclusively across calls to AFSCleanupFcb() which in turn triggers a file extent release to the service which can in turn result in an object invalidation. Processing the invalidation requires shared access to VolumeCB->ObjectInfoTree.TreeLock which results in a deadlock. This patch alters the processing of AFSPrimaryVolumeWorkerThread so that the VolumeCB->ObjectInfoTree.TreeLock is not held across the AFSCleanupFcb() calls. FIXES 130431 Reviewed-on: http://gerrit.openafs.org/6724 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 780e497b32a927e008474a63b0427eca5d5a8877) Change-Id: I55198e24138984fdae8cc87cbf9b0dac49aa9ed8 Reviewed-on: http://gerrit.openafs.org/6731 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2ff1c756c2e089812352fa236953f8438dd7c80f Author: Ken Dreyer Date: Wed Feb 15 20:12:56 2012 -0700 doc: refer to aklog instead of klog klog (and kaserver) is deprecated. In generic examples, refer to the Kerberos 5 equivalents. Reviewed-on: http://gerrit.openafs.org/6721 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 07d9b18e36fff6fc96c629ac2bebe8bb43f6b9dd) Change-Id: I8784d6dc1160e6b3b6cc86f9ef97d82ca4b7ba02 Reviewed-on: http://gerrit.openafs.org/6730 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d4840a55046008e55173d0c9c4320f7b0502de93 Author: Jeffrey Altman Date: Wed Feb 15 00:06:47 2012 -0500 Windows: disable afsdhook.dll reload by daemon The daemon thread's loading and unloading of afsdhook.dll every second prevents the disk drive from sleeping and forces a search of the PATH. Make the periodic reloading configurable and disable it by default. Reviewed-on: http://gerrit.openafs.org/6715 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f38780b38d6097832b6d49453a0a47044bc06903) Change-Id: Iefede0f47510722cb98a490b547ab9d8dfaee299 Reviewed-on: http://gerrit.openafs.org/6720 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c4a614deccc800afe2446fb22782d7e30022bca4 Author: Jeffrey Altman Date: Tue Feb 14 21:52:28 2012 -0500 Windows: remove install9x rules Reviewed-on: http://gerrit.openafs.org/6712 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fcc8244095a9cfb5235b39afc25c8817167e895c) Change-Id: I2a0a1be7d5756b1ba820ff1105794fa99ee1cfad Reviewed-on: http://gerrit.openafs.org/6719 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 41c986db723a2ce2564fa1799adeda96b804be21 Author: Jeffrey Altman Date: Tue Feb 14 16:02:02 2012 -0500 Windows: remove AFS_WIN95_ENV No longer build for Win9x. Remove AFS_WIN95_ENV conditionals. Reviewed-on: http://gerrit.openafs.org/6711 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 32de17264e229fca94742da7b6278536c24fe713) Change-Id: I3df6508291ae8d895bd5a4ec806807751ac9f046 Reviewed-on: http://gerrit.openafs.org/6718 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d155be726cfab52f24b9a690a7b7d3c778a99104 Author: Jeffrey Altman Date: Tue Feb 14 15:35:07 2012 -0500 Windows: add KTC_TOKEN_MUTEX_FAIL error code If acquisition of the Global\AFS_KTC_Mutex fails, return a different error code from a pioctl failure since the pioctl was never issued. Reviewed-on: http://gerrit.openafs.org/6710 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9a394780abb782f7a4f8b6095b6faf46b8e819a6) Change-Id: Ic3d574a0ccb4ceaa739b7bc4eafa23f03cb49f18 Reviewed-on: http://gerrit.openafs.org/6717 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 40c5ecb1c155b8f87a7c047534076163d404171a Author: Jeffrey Altman Date: Tue Feb 14 12:01:38 2012 -0500 Windows: avoid GetComputerNameW call for all ioctl Cache the value of GetComputerNameW() to avoid repeated calls for each and every redirector ioctl request. Reviewed-on: http://gerrit.openafs.org/6708 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit da17eb6c8619c0f781cd4601c0da1258043aa475) Change-Id: I228873be2ef3eb475a85d4e33a80fc50512903ce Reviewed-on: http://gerrit.openafs.org/6716 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c250c37a837825cc541eecd430c79bd578df7c5 Author: Jeffrey Altman Date: Sat Feb 11 22:14:23 2012 -0500 doc: fix AdminGuide The AdminGuide was broken by e99224f2fe049bc339e87c8b6c195de67dca2f08. Reviewed-on: http://gerrit.openafs.org/6703 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aaab21e7a123ce701a8d5b2144032739fe177d6f) Change-Id: I4307d7932771d942bea4379ad4512539e2b17fd9 Reviewed-on: http://gerrit.openafs.org/6704 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c90b639fbe6ce21b3dcf04a6038754bb030b7409 Author: Jeffrey Altman Date: Sat Feb 11 12:49:33 2012 -0500 Windows: AFSRemoveFcb() cannot race Modify AFSRemoveFcb to use InterlockedComparePointerExchange to ensure that only one thread can remove and deallocate an AFSFcb structure. Reviewed-on: http://gerrit.openafs.org/6696 Reviewed-by: Peter Scott Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5c4e49062af0e9b81b963d1d6e50c7cc52c68eb9) Change-Id: I4c963381757daab9c27b5d663d0c2bcc073159ab Reviewed-on: http://gerrit.openafs.org/6702 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72e84d077c4419ed3a13a363e4949ebaf0a762db Author: Ken Dreyer Date: Thu Feb 9 17:37:01 2012 -0700 doc: add section on direct volume access Provide examples of the direct volume access syntax, using the fictitious example.com cell. Reviewed-on: http://gerrit.openafs.org/6691 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e99224f2fe049bc339e87c8b6c195de67dca2f08) Change-Id: I11e982d3fd0c3a6af7ed7e1c266466d00345f59f Reviewed-on: http://gerrit.openafs.org/6700 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bdadf63a86375fd040123b507882dfab52a09c02 Author: Jeffrey Altman Date: Fri Feb 10 08:56:12 2012 -0500 Windows: Perform rename to self check earlier In AFSSetRenameInfo(), the rename to itself check was performed after the name collision check. Move the check earlier in the routine to ensure that we catch the no-op before any real work is done. Reviewed-on: http://gerrit.openafs.org/6692 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 42aba4391ab3fadca2103e1df1f47445e40c436e) Change-Id: Ib04c969e6e3cb27950f7aaf7df947ab452644dab Reviewed-on: http://gerrit.openafs.org/6695 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit abfb36fa3696d58c97fd8c997062638ceb05c7b4 Author: Jeffrey Altman Date: Tue Feb 7 16:14:27 2012 -0500 Windows: Version 1.7.6 (aka 1.7.0600) Change-Id: I081498b1df05b6cfad12d7c1b5cc990b0d0d6877 Reviewed-on: http://gerrit.openafs.org/6688 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 935e4cefc2aeb08630c445ad65012700b19c0148 Author: Jeffrey Altman Date: Tue Feb 7 16:13:36 2012 -0500 Windows: 1.7.6 change log Change-Id: Ic5e83ef72b76678cb59696d1cc944ab46ec38d4a Reviewed-on: http://gerrit.openafs.org/6687 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ff711a8063be06eacd2552c0dd1527de854b2d14 Author: Jeffrey Altman Date: Tue Feb 7 15:56:12 2012 -0500 Windows: Release Notes corrections Add missing BlockSize registry value Correct AFSRedirector\NetworkProvider registry key description Add note that LanAdapter value is ignored if SMB mode is not in use. Reviewed-on: http://gerrit.openafs.org/6685 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c0ac71d92fda5c1cd451bd453b00983362f47ce7) Change-Id: I47ed0e43543aa5f8d58b8ad08a04064bafa4efc9 Reviewed-on: http://gerrit.openafs.org/6686 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8de1bae4c230ea439c1ca3be4306745c0034a700 Author: Jeffrey Altman Date: Mon Feb 6 12:00:58 2012 -0500 Windows: OpenAFS reparse points are surrogates OpenAFS reparse points represent mount points, symlinks, and dfs referrals. All of which are file system objects that represent another named entity in the system. As a result the reparse tag field must include the Reparse Tag Surrogate bit (0x20000000) set. This permits the IsReparseTagNameSurrogate() macro provided in winnt.h to be used to determine if the reparse point is a surrogate or not. See http://msdn.microsoft.com/en-us/library/windows/desktop/aa365197%28v=vs.85%29.aspx Reviewed-on: http://gerrit.openafs.org/6668 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 8bc139b4acdd2c06643abb44d3f5b3bfdcbf639d) Change-Id: I21d577a7f4f512073d3407ddd7d6c8ee1662c7b5 Reviewed-on: http://gerrit.openafs.org/6684 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9d6257b7fafb9cdf627bc62aab68c68229c1b14c Author: Jeffrey Altman Date: Sat Feb 4 17:26:02 2012 -0500 Windows: Avoid race during PIOCtl DirNode allocation Use InterlockedCompareExchangePointer to assign the DirNode to ObjectInfo->Specific.Directory.PIOCtlDirectoryCB. Otherwise, one thread could race with another thread when allocating the pioctl object. Reviewed-on: http://gerrit.openafs.org/6661 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 39d152810de9adfa89acb994506d0b9d368395f2) Change-Id: I5286fb924e64a92c3b0e2144a894fb531cc650d8 Reviewed-on: http://gerrit.openafs.org/6667 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 30391d85374f9f160ce688e08009e944ae7262eb Author: Jeffrey Altman Date: Sat Feb 4 12:48:24 2012 -0500 Windows: Hold Fcb references prior to service call If the Fcb reference count hits 0 while the service is called it is possible that the Fcb can be garbage collected prior to the completion of the call. Reviewed-on: http://gerrit.openafs.org/6660 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b819d3e3abcfedf10a1c91a26f45d0d85e6b93f1) Change-Id: Ie4a281d32c7a8d2cd1ebf2cdda4408717cfad118 Reviewed-on: http://gerrit.openafs.org/6666 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit da7398034d72d5ea5cc6af8c75a0f35feb25ace7 Author: Jeffrey Altman Date: Sun Feb 5 12:58:22 2012 -0500 Windows: Do not build NSIS by default NSIS installers are no longer up to date and do not support 64-bit builds. OpenAFS no longer distributes them for 1.7 and beyond. Stop building them by default. Reviewed-on: http://gerrit.openafs.org/6664 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit deb41441f0671d46de876d30f641f86cca7d256e) Change-Id: I7fc081dd596a198d272089533e4fdffa7f645bc2 Reviewed-on: http://gerrit.openafs.org/6665 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fc82beaac2d838a3aaafdc985687552a68079fb5 Author: Jeffrey Altman Date: Sun Jan 29 10:39:28 2012 -0500 Windows: Increase size of worker thread pools The size of the afs redirector worker thread pools should be made configurable but for now just increase the pool size to be in parity with the default worker pool created by the afsd service. Reviewed-on: http://gerrit.openafs.org/6627 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5e08628da2c24b40aeedebe0fef4e6ddd4690904) Change-Id: I68fe74204a33bc6a2b61087e0121bc6a14237f14 Reviewed-on: http://gerrit.openafs.org/6663 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 14a20951e1d35cf7550ad6eb4812df077f475e4e Author: Jeffrey Altman Date: Sun Jan 29 10:37:50 2012 -0500 Windows: Run Workers until empty task queue Do not allow a worker thread to sleep until the task queue is empty. It is better for the running thread to pick up and process a task then to sleep this thread and wait for another one to wake up to perform the work. Reviewed-on: http://gerrit.openafs.org/6626 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0f65600b675e641575efaf81a71db990cebbb7d3) Change-Id: I2d43d7deca943bf57ced42c39c43493adfe5cf1e Reviewed-on: http://gerrit.openafs.org/6662 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 15963a449078cc6d9d81af6258a537e69a30c330 Author: Jeffrey Altman Date: Fri Feb 3 11:35:33 2012 -0500 Windows: add buf_InvalidateBuffers Add a utility function that invalidates all buffers for a cm_scache_t object. Reviewed-on: http://gerrit.openafs.org/6651 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 339189c88ba9c6bc7e4ea6434acef0b96da24dae) Change-Id: Icfb15a8d8db0cd963fede8b813384568ebbd900c Reviewed-on: http://gerrit.openafs.org/6659 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 625728696fc7af79839ff2506d97966a15e80908 Author: Jeffrey Altman Date: Fri Feb 3 11:21:45 2012 -0500 Windows: fix cm_DirOpDelBuffer assert In cm_DirOpDelBuffer() the data version field for a buffer in cm_dirOp_t.buffers[] can be CM_BUF_VERSION_BAD if the buffer was added to the buffer list but was never fetched from the file server. If the buffer was recycled by buf_Get() an attempt to remove an entry from the directory will be failed as opposed to fetching the buffer from the file server and performing the local removal. Reviewed-on: http://gerrit.openafs.org/6650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 865f2442e682ff71b28a6b21363de8262f9e2bd1) Change-Id: I2e3e18564796dd656d846ad58377f20d409a172b Reviewed-on: http://gerrit.openafs.org/6658 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 142a0d1b3f141b1bd29f9bb70f33e907fc994a47 Author: Jeffrey Altman Date: Fri Feb 3 11:17:40 2012 -0500 Windows: buffer DV ranges do not work for directories In cm_MergeStatus, always set cm_scache_t.bufDataVersionLow to the new data version because the cm_dir package does not support version ranges. All modified dir buffers have their dataVersion field set to the current data version value. Failure to update the bufDataVersionLow field can result in B+ Trees being constructed from out of date directory information. Reviewed-on: http://gerrit.openafs.org/6649 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25142a9c2db933607507ee20e20216c635465d6d) Change-Id: Icbf032702b8783b8b95088a92a9a95eb664cf0ef Reviewed-on: http://gerrit.openafs.org/6657 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4358b39b7a6f77f1b9d9a71e7acac3bf247fb85d Author: Jeffrey Altman Date: Fri Feb 3 11:16:04 2012 -0500 Windows: update btree debugging code B+Tree key strings were changed to wchars for unicode support, the debugging printf format patterns were not updated to match. Do so now. Reviewed-on: http://gerrit.openafs.org/6648 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 09ab91bf9d27258c126411d4c80e5363118b7bba) Change-Id: I0a37d8f91950d34e878da3631e54f395e1ef25cb Reviewed-on: http://gerrit.openafs.org/6656 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 28f164a067d1a9a4869d2e02bc886023b209496a Author: Jeffrey Altman Date: Fri Feb 3 11:14:50 2012 -0500 Windows: Do not open file if shutdown in progress Perform the shutdown check earlier in AFSCommonCreate() to prevent a request from being processed after the service indicates that a shutdown has begun. Reviewed-on: http://gerrit.openafs.org/6647 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4224dc5c281ffc2bf8dd34eadb76762304eece75) Change-Id: Ie5cc33a5b8ccd5edeba01fdeb41705be9cfda266 Reviewed-on: http://gerrit.openafs.org/6655 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 72fbded300acd01c9024488eca95bc3204f0d154 Author: Jeffrey Altman Date: Tue Jan 31 22:34:30 2012 -0500 Windows: AFSRedir DebugFlags Turn on BugCheck Turn on bug checking by default via the installation. This permits sites to disable the functionality but will allow us to capture more meaningful minidump output. Reviewed-on: http://gerrit.openafs.org/6646 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 209df87d08fb07d9641b81858a0821b9fd95dbcc) Change-Id: Ib029cb53a7090cff5cb26c8e9ae19d1706394856 Reviewed-on: http://gerrit.openafs.org/6654 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit d5d1a5a9a5e99ff23151a8e0c232f6f7891c0eaf Author: Jeffrey Altman Date: Tue Jan 31 15:51:34 2012 -0500 Windows: Improve AFSNotifyDelete Do not call AFSNotifyDelete after the reference count on the DirEntry->ObjectInformation is given up. Log the Parent FID and file name since that is what are passed to the service to perform a delete. Log the actual FID of the object being deleted and not the address of the FID fields. Reviewed-on: http://gerrit.openafs.org/6645 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fe952116f3f0968e6c9f584297bafd3e8dd56903) Change-Id: I57bcef8aa04d2bec261f80f9a49388487872b291 Reviewed-on: http://gerrit.openafs.org/6653 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 51a1e752eb46e5a766cf1b1e3884834a567bbde4 Author: Jeffrey Altman Date: Tue Jan 31 15:49:22 2012 -0500 Windows: do not lower case direct volume references Not all volumes are lower case. Do not lowercase the string. Reviewed-on: http://gerrit.openafs.org/6644 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9a1d7518b62f43586f4d228f9261adb0fac4f5a4) Change-Id: I94c6fc3715584b524275a8caf0212fdcb83f3733 Reviewed-on: http://gerrit.openafs.org/6652 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 3a4652b9290367ade8600330c06180ec47798e40 Author: Jeffrey Altman Date: Sun Jan 29 16:54:53 2012 -0500 Windows: Version 1.7.5 (1.7.0500) Change-Id: I24a3debbac2ea791a0c1120c65180fa291daf242 Reviewed-on: http://gerrit.openafs.org/6635 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 999d3ca5fc7ded96e49db0c96f32c965b3b8f9ed Author: Jeffrey Altman Date: Sun Jan 29 16:53:41 2012 -0500 Windows: change log for 1.7.5 Change-Id: I04b16ee4c171a77d4344661151d75bffeebf4a45 Reviewed-on: http://gerrit.openafs.org/6634 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 31e477d21a30f868f55b62ad81b68a91d92e1025 Author: Jeffrey Altman Date: Sun Jan 29 16:46:22 2012 -0500 man-pages: add fs_getverify and fs_setverify Add man pages for two new Windows only commands fs getverify fs setverify -verify {on, off} Reviewed-on: http://gerrit.openafs.org/6632 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 87049b873b08ddd2246c02cd66099940eae2b1fd) Change-Id: I7ce7cfff6e7dca98439d537c480020dbac5a89f6 Reviewed-on: http://gerrit.openafs.org/6633 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5641870c82b5fba0f25fb6d0d3c472c315b711a2 Author: Jeffrey Altman Date: Sun Jan 29 14:41:06 2012 -0500 Windows: do not panic if afsredir not ready during shutdown Reviewed-on: http://gerrit.openafs.org/6630 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7b3f5df6dca09a15d56aae5c431a50529c119db2) Change-Id: I7b54a6c37588dd2efc7f5e92722c1cd730641c4e Reviewed-on: http://gerrit.openafs.org/6631 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1daf027c6eddb41c0c5426a2dee8afaae7aaed55 Author: Jeffrey Altman Date: Sun Jan 29 00:22:03 2012 -0500 Windows: Release Notes for 1.7.5 Release notes updates for 1.7.5. (cherry picked from commit c97cb2ed8b9bad6377f2978c16e22785ea7a5f03) Change-Id: I67a60a9e7acb0b8104fd97acaa9e9f88b3e9378a Reviewed-on: http://gerrit.openafs.org/6625 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ae5374187721acf07ebf3ae7f7f822fa5960219 Author: Jeffrey Altman Date: Fri Jan 20 14:43:06 2012 -0500 Windows: Stop the thundering herd The afs redirector used notification events to wake up worker threads when a task was added to a work queue. Notification events when signalled wake up all threads instead of just one. Instead, use synchronization events to wake up a single thread at a time and restructure the code to permit workers to wake up additional workers if there is additional work to be performed or during library shutdown. Thanks to Peter Scott for his assistance. Reviewed-on: http://gerrit.openafs.org/6595 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit de4d12dd5366bfddb6fde5bb050ce8fbaeb95f1a) Change-Id: I20bc28909d4e62b2d5d75838636f1ed8be7567c1 Reviewed-on: http://gerrit.openafs.org/6622 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a37574484755fb839b1eba6d0b5af54e99a26bc6 Author: Jeffrey Altman Date: Wed Jan 25 11:27:39 2012 -0500 Windows: DriveSubstitution handle too small buffer If the buffer passed to DriveSubstitution is too small the resulting file path will end up being truncated. At the very least log the fact that truncation is occurring. In addition return the fact that truncation occurred to the caller. In NPGetUniversalName allocate a 4K buffer on the heap instead of calculating a buffer based on the local name buffer size. The local name buffer size has no relationship with the required buffer size for the expanded unc or device path. FIXES 130548 Reviewed-on: http://gerrit.openafs.org/6618 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1161d5fc3cde5e15cb2d13f01ff225710fc04766) Change-Id: Iaba8f1c91ae88a898a11675cf36557b1fdd27587 Reviewed-on: http://gerrit.openafs.org/6621 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e3c22b517e685bbed8d9321c8a6ade6f31cb3541 Author: Jeffrey Altman Date: Tue Jan 24 17:09:01 2012 -0500 Windows: Invalidate all volumes at library init The afsredirlib.sys library driver is unloaded when the afsd_service stops and is reloaded when the afsd_service restarts. During the shutdown window any objects known to the kernel are preserved by afsredir.sys. When the afsd_service restarts, there are no valid callbacks on any objects so the afsredirlib.sys must invalidate all status info to permit the service to request a callback from the file server on next use. Reviewed-on: http://gerrit.openafs.org/6617 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3d10edc2d49e0e1c7a7a67c538a932347a91504c) Change-Id: Ie9e7bd0679d2a9eb112e0fab2d77a91745e0acda Reviewed-on: http://gerrit.openafs.org/6620 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3e46e380e4e83e9d1eab310c833ff1f68e61580 Author: Jeffrey Altman Date: Tue Jan 24 12:52:12 2012 -0500 Windows: Refactor and consolidate afsredir invalidation Invalidation requests were being processed in an inconsistent manner because different rules were being applied to volume root directories and other objects and whether or not the invalidation was a whole volume invalidation or not. This patchset consolidates all invalidation logic for an object in the new AFSInvalidateObject function. AFSInvalidateObject is then called from AFSInvalidateCache and AFSInvalidateVolume as necessary. AFSInvalidateVolume executes AFSInvalidateObject on all objects in the volume object tree. As a result, whole volume invalidations whether triggered by the file server or "fs flushvolume" now work. Reviewed-on: http://gerrit.openafs.org/6616 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit e44163a5470c6a9ff766641e4ce1ade6569cbadb) Change-Id: I6ea3c80c4f2ae744d9d2cd65d604522bf45754fa Reviewed-on: http://gerrit.openafs.org/6619 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c5a6ea7275f0781dec9579aad39022a310cdf54 Author: Jeffrey Altman Date: Sun Jan 15 11:43:40 2012 -0500 Windows: make lock reader history debug only The lock reader history on osi_rwlock is proving to be too expensive. Only use it for DEBUG builds. Leave the data structures the same so that DEBUG builds can be mixed with a RELEASE build of afsd_service.exe. Reviewed-on: http://gerrit.openafs.org/6559 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9803ae643b070b8c805cf94b4ac3205ba8668b1) Change-Id: I233a3434382109a0fa6dfa3a9d63f41f6178881e Reviewed-on: http://gerrit.openafs.org/6608 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5a4cd17262fb13e24ac762035d3b06663b4a682e Author: Jeffrey Altman Date: Sun Jan 22 18:42:32 2012 -0500 Windows: store data verification mode Over the lifetime of OpenAFS a number of bugs have been discovered that can result in data corruption. This new mode (Windows only) will double check that the data received by the file server does in fact match the data that was written by the cache manager. After a successful StoreData and status merge but before the BIOD is released, a fetchdata is issued to read the data written by the cache manager. If the data fails to match, the StoreData operation is repeated. Data verification mode can be queried with "fs getverify" and set with "fs setverify {on, off}". The default value can be set with the TransarcAFSDaemon\Parameters DWORD "VerifyData" registry value. By default verification is disabled. Reviewed-on: http://gerrit.openafs.org/6601 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit dfd0c2acc103cd2881bbfecd923c05012001e12a) Change-Id: Id3f412c66b3d233d0f7129172ef760dedc720631 Reviewed-on: http://gerrit.openafs.org/6607 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9f6b1abb41e8d5191b2355b03451e6188ef15b28 Author: Jeffrey Altman Date: Sun Jan 22 18:38:49 2012 -0500 Windows: VIOC_GETUNIXMODE = smb_IoctlGetUnixMode VIOC_GETUNIXMODE pioctl should execute smb_IoctlGetUnixMode not smb_IoctlSetUnixMode. Reviewed-on: http://gerrit.openafs.org/6600 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1474b4a739c60f96a8d2e38546778ab9572c138d) Change-Id: I3734c9b161426cbe0ebce3342dc2cc97ec6b33fa Reviewed-on: http://gerrit.openafs.org/6606 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 031d4aa6948bd8f9bf17b2913c0084d2663d6dd2 Author: Jeffrey Altman Date: Sun Jan 22 18:37:14 2012 -0500 Windows: fix fs setcrypt help message Options are on, auth, and off. Reviewed-on: http://gerrit.openafs.org/6599 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 898930fc3ca81a5e5dde31967c00cdf5f4734ffa) Change-Id: If9c45403ec2cad139b984efa5288bf36e7d1c3fc Reviewed-on: http://gerrit.openafs.org/6605 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 31d79c2bb129023c80bba2b302773b4b1da59ef5 Author: Jeffrey Altman Date: Sun Jan 22 18:33:43 2012 -0500 Windows; release BIOD after status merge Releasing the BIOD permits the accumulated buffers to be accessed. Releasing the BIOD before the cm_MergeStatus() call creates a window where the buffer data version is larger than the cm_scache data version. Release the BIOD after the status merge. Reviewed-on: http://gerrit.openafs.org/6598 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 111de76ea8dac713247c99ebe2182ae16cc0a3c0) Change-Id: I7226b4ef2d5cf40aabc9549a807c93e9a6222109 Reviewed-on: http://gerrit.openafs.org/6604 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 55fdacb1ba70243e11b6a127ce1b4106028a801c Author: Jeffrey Altman Date: Fri Jan 20 20:10:51 2012 -0800 Revert "Windows: disable memory extent interface" This reverts commit 503bc56403baf741a4a7056a4077edc43812b9d1 Change-Id: I459f3f68a3d68c94b3228cde0a8e09712e0a022c Reviewed-on: http://gerrit.openafs.org/6602 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3e3cfb7083af9a12f76a8adbdf73e9ad05bda788 Author: Jeffrey Altman Date: Tue Jan 17 19:46:30 2012 -0500 Windows: failover and retry for VBUSY When a file server returns the VBUSY error for an RPC the cache manager records the 'srv_busy' state in the cm_serverRef_t structure binding that file server to the active cm_volume_t object. The 'srv_busy' was never cleared which prevents the volume from being accessed. Clear the 'srv_busy' flag whenever cm_Analyze() receives a CM_ERROR_ALLBUSY error which means that all replicas have been tried or whenever the error is not VBUSY or VRESTARTING. FIXES 130537 Reviewed-on: http://gerrit.openafs.org/6563 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9056d09887c84a480e0a9ee3457a9469fbb97064) Change-Id: Ib6fbc22d8720277910112d6e66f926650d023741 Reviewed-on: http://gerrit.openafs.org/6594 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 0b238f232c64c1ba1d235e220dacfa292e26dd09 Author: Jeffrey Altman Date: Fri Nov 25 09:28:18 2011 -0500 Windows: improved idle dead time handling RX_CALL_IDLE has been treated the same as RX_CALL_DEAD which is a fatal error that results in the server being marked down. This is not the appropriate behavior for an idle dead timeout error which should not result in servers being marked down. Idle dead timeouts are locally generated and are an indication that the server: a. is severely overloaded and cannot process all incoming requests in a timely fashion. b. has a partition whose underlying disk (or iSCSI, etc) is failing and all I/O requests on that device are blocking. c. has a large number of threads blocking on a single vnode and cannot process requests for other vnodes as a result. d. is malicious. RX_CALL_IDLE is distinct from RX_DEAD_CALL in that idle dead timeout handling should permit failover to replicas when they exist in a timely fashion but in the non-replica case should not be triggered until the hard dead timeout. If the request cannot be retried, it should fail with an I/O error. The client should not retry a request to the same server as a result of an idle dead timeout. In addition, RX_CALL_IDLE indicates that the client has abandoned the call but the server has not. Therefore, the client cannot determine whether or not the RPC will eventually succeed and it must discard any status information it has about the object of the RPC if the RPC could have altered the object state upon success. This patchset splits the RX_CALL_DEAD processing in cm_Analyze() to clarify that only RX_CALL_DEAD errors result in the server being marked down. Since Rx idle dead timeout processing is per connection and idle dead timeouts must differ depending upon whether or not replica sites exist, cm_ConnBy*() are extended to select a connection based upon whether or not replica sites exist. A separate connection object is used for RPCs to replicated objects as compared to RPCs to non-replicated objects (volumes or vldb). For non-replica connections the idle dead timeout is set to the hard dead timeout. For replica connections the idle dead timeout is set to the configured idle dead timeout. Idle dead timeout events and whether or not a retry was triggered are logged to the Windows Event Log. cm_Analyze() is given a new 'storeOp' parameter which is non-zero when the execute RPC could modify the data on the file server. Reviewed-on: http://gerrit.openafs.org/6118 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit f768fb95f3eb3815d6225e074c43341ed2ad5347) Change-Id: If50848582749a5378a12b6961557f263830379c8 Reviewed-on: http://gerrit.openafs.org/6592 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bcd86eb6c0beef452b7489a58f5a31bdd95f82a6 Author: Jeffrey Altman Date: Mon Nov 28 12:58:02 2011 -0500 rx: RX_CALL_IDLE and RX_CALL_BUSY Allocate new Rx error codes for Idle and Busy calls but do not send these errors on the wire. They are only intended for local use. RX_CALL_IDLE is an indication to an application that requests it that the rx peer is maintaining an open call channel but has not sent any actual data for the length of the registered idle dead timeout. RX_CALL_BUSY is an indication to an application that requests it that the rx peer believes the selected call channel is in use by a pre-existing call. When either RX_CALL_IDLE or RX_CALL_BUSY are assigned as the call error and an abort must be sent to the rx peer, the errors are translated to RX_CALL_TIMEOUT. This is necessary because it is not possible to add new Rx error values in a method that is safe for peers that are not expecting them. This patchset also documents which Rx errors defined in rx.h are used on the wire and which are not. The Unix and Windows cache managers are updated to build with these new error codes. Reviewed-on: http://gerrit.openafs.org/6128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c7673f4fad8e8b9390564e3cbfa11d5f1b52ba2f) Change-Id: I41fd850c876c3da36f657cb43e6abd8ed1048b8b Reviewed-on: http://gerrit.openafs.org/6591 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cb60ce929701a02b6e461b31c4165b60b9eb2e97 Author: Peter Scott Date: Wed Jan 18 18:42:19 2012 -0700 Windows Asynchronous purging of file content after a DV change Purge all regions of the file surrounding the extents which are to be purged. If a failure occurs on the purge due to an existing mapping, flag for purge during handle close Change-Id: Id8ef81afaa614ea08e03bbd55ec2cdded0d7139f Reviewed-on: http://gerrit.openafs.org/6573 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f6828bd9f158870002e8eeeb2325a40eb7ca5041) Reviewed-on: http://gerrit.openafs.org/6590 commit bf42eac1f7874abf3092b358a6b4c4320c4a0353 Author: Jeffrey Altman Date: Thu Jan 19 15:25:44 2012 -0500 Windows: cm_buf refcnt must hold buf_globalLock An assertion in buf_Recycle() was being triggered when a cm_buf_t object was supposed to be in the free buffer list but wasn't. buf_Recycle() was racing with another thread. The test for refCount == 0 was performed while holding the buf_globalLock exclusively but the InterlockedDecrement(refCount) in buf_Release() was performed without holding buf_globalLock at all. buf_globalLOck must be held at least as a read lock. Otherwise, the refCount can reach 0 prior to the thread blocking for exclusive access to the buf_globalLock. This provides buf_Recycle() which is holding buf_globalLock the opportunity to race. The solution is to make sure that buf_Release() always holds buf_globalLock as a read lock and then use buf_ReleaseLocked() to perform the actual decrement and test. Reviewed-on: http://gerrit.openafs.org/6576 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 22cba8e9702f3673c335bf834a9ee2c5e5fd9b6e) Change-Id: Id68d40f6c62c10630af0a5167d7e4d42b2812f77 Reviewed-on: http://gerrit.openafs.org/6589 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 95e505faead455d7e5425f271870009258f64c35 Author: Jeffrey Altman Date: Thu Jan 19 01:21:02 2012 -0500 Windows: Redesign daemon thread queue management The daemon thread worker pool has some very poor properties. The threads spend a significant amount of time polling for ready to process tasks because so frequently a store/fetch data request is accompanied by many other requests for the same FID that would block. Lets try a new approach. Create one queue for each worker thread and assign the tasks to a thread by a hash of the FID. This ensures that all tasks for a single FID are serialized and prevents multiple threads from attempting to perform the same task only to decide that the thread would be forced to block. Reviewed-on: http://gerrit.openafs.org/6575 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 201c954a36fe6ec19f96e4c8e24e6e080c3ba55a) Change-Id: I081917ff8e5ce5179a18ed6fff9f67cc46d19e52 Reviewed-on: http://gerrit.openafs.org/6588 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 9205c25456179dd93654a2f8585c11f377b356e4 Author: Jeffrey Altman Date: Tue Jan 17 19:43:54 2012 -0500 Windows: prevent race assigning Fcb in AFSInitFcb() AFSInitFcb() is executed when the ObjectInformation->Fcb pointer is NULL. More than one thread can make that determination at the same time. Use InterlockedCompareExchangePointer() to detect a race and permit cleanup to be performed. Remove the output parameter of AFSInitFcb() to avoid a double assignment. Reviewed-on: http://gerrit.openafs.org/6562 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit afeb3c3a83ed0869e4a70b0725e3f85713330c3a) Change-Id: I7d580c128ab5c5cbe65cdfdbf69d84fe414f16c6 Reviewed-on: http://gerrit.openafs.org/6587 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 6082e42964623222709f4ef5d54583d10dfb16ea Author: Jeffrey Altman Date: Sat Jan 14 10:32:51 2012 -0500 Windows: cm_EndCallbackGrantingCall refactoring Refactor cm_EndCallbackGrantingCall to prevent assigning a callback to the cm_scache object in the case where it is going to be discarded. If the race was lost the callback data was already discarded by cm_RevokeCallback. By assigning and then discarding we are forced to issue an additional change notification to the smb client or afs redirector. Not only is this extra work but the afs redirector notification can result in a deadlock with a kernel thread that is waiting for the current thread to complete. modify the function signature to return whether or not a race was lost with a callback revocation. rename 'freeFlag' to 'freeRacingRevokes' since that is what the flag is meant to indicate. create a new 'freeServer' flag to indicate when the server reference should be released. There was a leak of server references when a race occurred. modify all calls to cm_EndCallbackGrantingCall() that provide an AFSCallBack structure on input to check for a lost race. If a race occurs, cm_MergeStatus() should not be performed. Reviewed-on: http://gerrit.openafs.org/6556 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 503d09413add1831dff5db24ee907eec59eda9e2) Change-Id: I6d4ff712fb612e02fc09ecf8cdc8deefafb9ee12 Reviewed-on: http://gerrit.openafs.org/6586 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7893df2c21bd120a67f1afbf6f83b70af11e8824 Author: Jeffrey Altman Date: Sun Jan 15 11:08:23 2012 -0500 Windows: deadlock bet. DirEntry lock + DirectoryNodeHdr.TreeLock The DirectoryNodeHdr.TreeLock must be obtained before the DirEntry->NonPaged->Lock. In AFSLocateNameEntry(), the DirEntry lock is obtained before the TreeLock when processing a symlink object. For that case obtain the TreeLOCK first. Drop it if it is not required. Reviewed-on: http://gerrit.openafs.org/6558 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d9884a480c96d14a3e5a6b08cde5e5003d7a4694) Change-Id: I7d0226457eafb42870988328f91b3f2ec9ed6e2a Reviewed-on: http://gerrit.openafs.org/6585 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 042601a8a2489d6cd5d9c56eff88dab84940e507 Author: Peter Scott Date: Wed Jan 18 12:04:29 2012 -0700 Windows: Correctly mark extents dirty when using non-persistent AFS cache Reviewed-on: http://gerrit.openafs.org/6571 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fa7f36f74adc9a40a6b7c7ac5b5ea528733e0dc) Change-Id: I56dbaf75311d8f19008a451ff2d3aae2c833fed0 Reviewed-on: http://gerrit.openafs.org/6584 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1f98d3b48c3cae49da08872290b5f896d4264d51 Author: Peter Scott Date: Wed Jan 11 06:49:23 2012 -0700 Windows: Performing async work after cache invalidation The code now queues a work item to perform additional work on extent processing after a cache invalidation has occurred. This additional work involves walking the current list of extents and purging/flushing regions of the system cache based upon the current state of the extent. Additional changes to filter which invlidation events result in a queued worker to perform asynchronous work. Reviewed-on: http://gerrit.openafs.org/6528 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3cf5064c91af5efb5e2be80fb59db43b674d467a) Change-Id: I84c7366a6dc23ba5a5b6e8f0354d1221fd037add Reviewed-on: http://gerrit.openafs.org/6583 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit fbac699e8ea2cff90a4ce9a5541981fcd90b2abf Author: Marc Dionne Date: Tue Jan 17 20:19:54 2012 -0500 rx: Correctly test for end of call queue The intention of this condition is to check if the current call being considered is the last one on the queue, but the test is incorrect. A null next pointer indicates a removed item, not the end of the queue. Use the queue_IsLast macro instead to correctly determine that this is the last item in the queue and that a call has to be selected, either the current one or a previously seen good choice. This can cause calls to get permanently stuck in the call queue and never get assigned to a thread, even when all threads are idle. Reviewed-on: http://gerrit.openafs.org/6564 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 6ad3d646e62801cb81a3c9efeac320daa44936e1) Change-Id: I8fb51dec8275d6dfd57c28e3dbb5ee69d5624a99 Reviewed-on: http://gerrit.openafs.org/6582 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 589ae8923ac53f8b558462178edbdd33b196c075 Author: Jeffrey Altman Date: Sat Jan 14 10:44:56 2012 -0500 Windows: disable memory extent interface There have been reports that the memory extent interface which is used when NonPersistentCache is active can lead to data corruption. Reviewed-on: http://gerrit.openafs.org/6557 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 20151a869911a98f0938d74ae6096f3308d7ec01) Change-Id: I835e9d85eb0b355a4ecb9de888ac8ef4bf3986a7 Reviewed-on: http://gerrit.openafs.org/6581 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a00da66e3102cad42422182c17e368bade7b251c Author: Jeffrey Altman Date: Sat Jan 14 10:31:01 2012 -0500 Windows: restrict service to 2 cpus by default Performance drops off considerably when the number of processors increases due to lock contention and the cm_SyncOp wait processing. If the MaxCPUs registry value is not set, limit ourselves to two. Setting MaxCPUs to zero permits use of all CPUs. Reviewed-on: http://gerrit.openafs.org/6555 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 69196e41ec9c5a6ce8efd370fb8582f66667bcf7) Change-Id: I64fcb1675c4229011929fab5f96665925c3035ec Reviewed-on: http://gerrit.openafs.org/6580 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1a7e8581624a9e0a8b985040dfd7d98de9817f92 Author: Jeffrey Altman Date: Fri Jan 13 23:58:50 2012 -0500 Windows: AFS_SERVER_FLUSH_DELAY AFS_SERVER_PURGE_DELAY Alter the flush delay to 5 seconds from 30 seconds Alter the purge delay to 300 seconds from 5 seconds Reviewed-on: http://gerrit.openafs.org/6554 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ae2c0df3373bdce129694efaf8d0097bab606da) Change-Id: I36283a08a306aec0dd6110898c56b74865cd018c Reviewed-on: http://gerrit.openafs.org/6579 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 492d5df9a8febbbb11be0cd47c283367c66a637a Author: Jeffrey Altman Date: Fri Jan 13 23:57:10 2012 -0500 Windows: AFSParseName edge cases If the input path is \afs\ behave as if the path is \afs. If the input path is \afs\*\ detect the wildcard and return STATUS_OBJECT_NAME_INVALID. Reviewed-on: http://gerrit.openafs.org/6553 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f549911027417cdb4fbacfc8deaa8bd664d1651f) Change-Id: Ic317c9060f01f4671426a0c4d4ed1705ff1794d2 Reviewed-on: http://gerrit.openafs.org/6578 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 4b53bbde380d4f8313dc0c58e31a7dfd32bf2a10 Author: Jeffrey Altman Date: Fri Jan 13 19:32:16 2012 -0500 Windows: afs root is always a directory If the root is opened with the FILE_NON_DIRECTORY_FILE option, fail the request with STATUS_FILE_IS_A_DIRECTORY. Reviewed-on: http://gerrit.openafs.org/6552 Reviewed-by: Peter Scott Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 96b9900d306645bb79d631250e3d740f163a2b40) Change-Id: I6e6a01a90fe66aea9b81ee5fd9f020a1fe9f601d Reviewed-on: http://gerrit.openafs.org/6577 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit a77ee2012b01116a3cf6235024f5166b9283e29c Author: Derrick Brashear Date: Fri Jan 6 06:53:46 2012 -0500 rx: add and export a public keepalive toggle make enabling and disabling keepalives a public function. export the function Reviewed-on: http://gerrit.openafs.org/6517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit 2a31f35936698c504c863702ebb675ac9dfe47e1) Change-Id: Ie4ec52c627425e0b855c8a3b848d0ab87c7939b0 Reviewed-on: http://gerrit.openafs.org/6544 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b50822e5784a934aba3037a4efdb99ca274d11ec Author: Jeffrey Altman Date: Tue Jan 3 21:10:32 2012 -0500 Windows: dir buffers out of date - mark them as such if cm_CheckForSingleDirChange() fails, mark the cm_scache_t bufDataVersionLow as the current data version so that old directory buffers are discarded. Reviewed-on: http://gerrit.openafs.org/6498 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e77b6858ee889ec9e4e3fe3bb62c23b1c1f5727f) Change-Id: I67f9fdfefe92cc6e56a5a66326d748761fa0fb42 Reviewed-on: http://gerrit.openafs.org/6542 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0adf47743aa59ba67d94f24ebb272cab8ac51556 Author: Jeffrey Altman Date: Thu Jan 5 11:52:00 2012 -0500 Windows: Avoid file server rpcs on deleted files If a file has been deleted, do not attempt to issue RPCs to the file server in response to AFS redirector extent processing. All RPCs will fail with VNOVNODE which will in turn trigger invalidation requests to the AFS redirector which can deadlock. Reviewed-on: http://gerrit.openafs.org/6514 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7a25010a6e1719fc056b7367893c24267334978e) Change-Id: Id300ec155118373818850ad55a7ca79dd2c4a502 Reviewed-on: http://gerrit.openafs.org/6541 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit de3b98e7d77e189029c08a6ec6ee92867062f586 Author: Jeffrey Altman Date: Wed Jan 4 12:13:40 2012 -0500 Windows: use local var for interlocked result Save the result of the interlocked operations for use in debug logging. Do not reference the incremented or decremented object in the log messages, it may have changed. Local assignment is provided even in functions that are currently not logging to assist with debugging and as a reminder to use the result variable in future log messages. Reviewed-on: http://gerrit.openafs.org/6508 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit cde0539f79b54dc3c4aa496be16b89a5e6a3654c) Change-Id: I73de51aec663abbe60f90c9720d8400b6b8ab3fa Reviewed-on: http://gerrit.openafs.org/6540 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5cd4ff65ca2268f4b4abbd40746757e895a9078d Author: Jeffrey Altman Date: Wed Jan 4 01:10:37 2012 -0500 Windows: AFSParseMountPointTarget buffer overrun When parsing the AFS mount point string do not overrun the buffer if the colon cell/volume separator is not found. Reviewed-on: http://gerrit.openafs.org/6507 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6185532db58692e58fca035a7b89767523d33225) Change-Id: I34cec0e801b403f13eece88dfba3a8b5355e486a Reviewed-on: http://gerrit.openafs.org/6539 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e63bcd896fee77c5a9ddeb2687d2bde9350c6a0c Author: Jeffrey Altman Date: Wed Jan 4 00:02:42 2012 -0500 Windows: Directory Enumeration, DVs, and TreeLocks Hold the TreeLock exclusively across all operations that enumerate, validate, or otherwise manipulate directory tree lists or data versions. Take the data version into account when deciding what to do with directory data. If a directory enumeration takes more than one request to service and the DV has changed from the time the directory snapshop was taken by the service and the enumeration completion, merge in the changes and then mark the directory as requiring verification. If a directory change operation completes (create, rename, remove) and the directory DV has changed by more than one force a full directory verification. Set the directory data version to -1 whenever a directory verification is required. Otherwise, the check to clear the VERIFY flag will only update the metadata for the directory. During a directory verification, if a new entry has been discovered it is added to the directory. Make sure the VALID flag is set so that the entry will not immediately be removed as invalid. Reviewed-on: http://gerrit.openafs.org/6460 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ba4f5afc9c68f74587c7a9669571c2c32cb7a13b) Change-Id: I8c5246c3c7bf238c3c3f4c9f40f7daa4c72bff87 Reviewed-on: http://gerrit.openafs.org/6538 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c7b2b3f8c739c49e1c7d3612d3aa3624af6f9eee Author: Jeffrey Altman Date: Wed Jan 4 00:01:09 2012 -0500 Windows: correct log messages in AFSCleanup Reviewed-on: http://gerrit.openafs.org/6506 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9783384af764fae23eb34cb26193cc295ee1a185) Change-Id: I08b76cacb9741539130d89b0dfa05b3bf824ce2b Reviewed-on: http://gerrit.openafs.org/6537 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 169d09de8dbc71819ddb91fda2a1398bf71c94a9 Author: Jeffrey Altman Date: Tue Jan 3 23:58:04 2012 -0500 Windows: Return Dir Data Version from AFSCleanup This patchset returns the directory data version from AFSCleanup(). It does not do anything with it. Reviewed-on: http://gerrit.openafs.org/6505 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit bd09d06c3f5bb81023b438e43c4b9b49d663bb34) Change-Id: I4b3bca914f07f15ad53853bf1c892d2a8ddad933 Reviewed-on: http://gerrit.openafs.org/6536 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 46952ed88db80520b66a35ad800ab1c0acd2fb62 Author: Jeffrey Altman Date: Tue Jan 3 23:43:30 2012 -0500 Windows: reorg open handle counts and Fcb->NPFcb->Resource Reorganize when open handle counts are decremented in order to avoid a race with worker threads performing garbage collection. Reviewed-on: http://gerrit.openafs.org/6504 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d2f9f8fa05b5b07965c8001d7b716da4ba486d83) Change-Id: I5003ba2d3b661c1f41af9160eed476bf1c993415 Reviewed-on: http://gerrit.openafs.org/6535 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b8219d3bf00c9358d30762a95733a9ea3c7f9565 Author: Jeffrey Altman Date: Tue Jan 3 23:39:53 2012 -0500 Windows: Permit renames of open files AFS does not impose a restriction on renames of open files. Failure to permit the rename can cause problems if an anti-malware service opens the file immediately after the application performing the rename does so. Reviewed-on: http://gerrit.openafs.org/6503 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e28d77fc4b3b6e5a93e5518d28c241eb9767d863) Change-Id: I172ac570bf51ce86dd9578718ff34f92170f2dc8 Reviewed-on: http://gerrit.openafs.org/6534 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3fb46f3f6652429ee0b160319442fc10358091d Author: Jeffrey Altman Date: Tue Jan 3 23:36:50 2012 -0500 Windows: Do not prime the service directory cache Performing a directory enumeration is an expensive operation that we should be attempting to avoid. The current directory enumeration and evaluate target requests will use inline bulk status RPCs to the file server which obtain status for 49 items at a time from a single directory. Reviewed-on: http://gerrit.openafs.org/6502 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b92a676517084432c64e1ccb1efff59e7bcbe088) Change-Id: Icee92415f44563d02c1ea212b461d0df007471fb Reviewed-on: http://gerrit.openafs.org/6533 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit df707b59766230df33c081d040e3f684a2de405e Author: Jeffrey Altman Date: Tue Jan 3 23:35:51 2012 -0500 Windows: More specific error values When a mount point, symlink, or dfslink cannot be resolved return STATUS_REPARSE_POINT_NOT_RESOLVED. When an operation fails because the volume is readonly, return STATUS_MEDIA_WRITE_PROTECTED. Reviewed-on: http://gerrit.openafs.org/6501 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 6ee54eb3821b70a51cfde8096f2d50d46ead1b8a) Change-Id: Ie9dbe4b68ef0208ae17319c28de194a1c501ecc9 Reviewed-on: http://gerrit.openafs.org/6532 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72f645f6847d78334b1b5ce4b2cf20a35d487575 Author: Jeffrey Altman Date: Tue Jan 3 23:12:34 2012 -0500 Windows: do not flush dirty extents without permission When closing file handles, do not permit dirty extents to be released back to the service if the current handle (Ccb) does not have write permission. The cleanup operation will fail with STATUS_ACCESS_DENIED, the extents will be released and all of the dirty data will be discarded. Reviewed-on: http://gerrit.openafs.org/6500 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman (cherry picked from commit e5a2f955c782ee46d1b24671fd0bac555e11d1a8) Change-Id: Ifd0cc1f76f45a216d359320323942783e3a346c5 Reviewed-on: http://gerrit.openafs.org/6531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7e8ab0d2cb826a54b9397e384ea4debc0ecb7f01 Author: Peter Scott Date: Thu Dec 29 17:23:32 2011 -0700 Windows: Support correct status codes from service When performing object verification, check for status failures corresponding to parent object issues which require a validation of the parent Reviewed-on: http://gerrit.openafs.org/6447 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit af08b745117899d116d4ee14e08e1184369f591f) Change-Id: I353ab7acd126939fc22c34e3ea19cd1191ea0b5a Reviewed-on: http://gerrit.openafs.org/6490 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 29794ad29d9420ec480960c27bfeecbd0c1f6f10 Author: Peter Scott Date: Thu Dec 29 17:30:45 2011 -0700 Windows: Handle invalid node types In the case where the direntry data is invalid, construct an Fcb of type INVALID so that the direntry can be displayed and the objected deleted even if it cannot be evaluated. Reviewed-on: http://gerrit.openafs.org/6445 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 52c3bace5ac4c93883d4913933a58573abded3e9) Change-Id: Icf05af4023cdc1ec38bf642d4fa76adbab59e8a4 Reviewed-on: http://gerrit.openafs.org/6489 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit feeacd5f6b6d6abdb8e3f89afcf77844261b8604 Author: Jeffrey Altman Date: Fri Dec 30 21:45:54 2011 -0500 Windows: AFSFileUpdateResultCB ParentDataVersion Add the parent directory data version to the AFSFileUpdateResultCB structure. Reviewed-on: http://gerrit.openafs.org/6459 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac56cd9e6182742e0b586ea8d833e4c7346e03b8) Change-Id: I79344a710d788cae6f21b7db9ed6a66585fb30bc Reviewed-on: http://gerrit.openafs.org/6488 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fb04de2c928a2f81ab6875b6e4e17cf3b1ffcc17 Author: Jeffrey Altman Date: Fri Dec 30 20:09:06 2011 -0500 Windows: renames that overwrite existing target The Windows client up to this point has never correctly implemented directory renames. For the longest time it assumed that the file server would not replace a pre-existing target. As a result, when the target name was already in use the contents of the directory would end up with the target name existing but its previous file id associated with it. A second problem was that lookups for the source and target names were not performed while the directory (or directories) were exclusively held to ensure that competing changes could not occur. This patchset corrects both issues in cm_Rename() and adjusts the redirector interface to match the new behavior. Reviewed-on: http://gerrit.openafs.org/6457 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 85f4971f850c0110915ba862922c1536ebe506c2) Change-Id: Ie9b5a23114f65d161e1b7fa24b65b57077eff6f6 Reviewed-on: http://gerrit.openafs.org/6487 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 198968075125a362f2cd90ae71e81892767469c1 Author: Jeffrey Altman Date: Fri Dec 30 01:34:51 2011 -0500 Windows: AFSDirEnumResp and AFSDirEnumEntry changes A directory enumeration is not an atomic operation. The redirector reads an enumeration a chunk at a time. During the entire enumeration it is possible that the data version of the directory object has changed due to entries being added or removed. This patchset adds two data version values to the AFSDirEnumResp structure. The first is the snapshot data version which is the dv of the directory object at the time the entry list snapshot was taken. The second is the current data version number of the directory object. If an object has been removed from the directory after the snapshot was taken, attempts to fetch status information for the object will fail with a VNOVNODE (aka CM_ERROR_BADFD aka STATUS_INVALID_HANDLE). The NTStatus field has been added to the AFSDirEnumEntry structure to permit notifying the redirector of such failures. RDR_PopulateCurrentEntry() has been extended with an additional cm_Error parameter that accepts the errorCode field provided by the cm_direnum_entry_t object constructed during the enumeration. Reviewed-on: http://gerrit.openafs.org/6455 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d64983bab047ad6349d2edfe2ffa35b484529889) Change-Id: Ia5907625e172069e24b4b3df3015b9564efbe961 Reviewed-on: http://gerrit.openafs.org/6486 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 25c55e614dc7e8e325d97d625253cdfafb1bb29e Author: Jeffrey Altman Date: Fri Dec 30 01:24:27 2011 -0500 Windows: Add AFSFileEvalResultCB In response to AFS_REQUEST_TYPE_EVAL_TARGET_BY_ID and AFS_REQUEST_TYPE_EVAL_TARGET_BY_NAME, return the new AFSFileEvalResultCB instead of a raw AFSDirEnumEntry. AFSFileEvalResultCB includes the data version number of the parent directory at the time the node was evaluated. Reviewed-on: http://gerrit.openafs.org/6454 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f142b615bbac6195aa4e275179f37da490013432) Change-Id: I04e7a45af23c5ddf6e57addc287028d87210c5f1 Reviewed-on: http://gerrit.openafs.org/6485 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5d7dac0be076be03d205b6f293fc2ea2f6aaf513 Author: Jeffrey Altman Date: Fri Dec 30 01:10:08 2011 -0500 Windows: Add AFSFileCleanupResultCB Add AFSFileCleanupResultCB which includes the parent directory data version number. This is necessary because object deletion occurs during the Cleanup processing and the redirector needs to know the resulting data version of the affected directory. Reviewed-on: http://gerrit.openafs.org/6453 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ccd6614c8f92e349e1892fa59f814b615c8816e0) Change-Id: I3f71b7b6c21153dc85bc6944f8217421363d3237 Reviewed-on: http://gerrit.openafs.org/6484 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 44b7f6e6ecb0f47adba613d5410be43c95afa65e Author: Jeffrey Altman Date: Thu Dec 29 18:31:11 2011 -0500 Windows: STATUS_OBJECT_PATH_INVALID == invalid parent directory Modify evaluation of nodes by name and id to consistently return STATUS_OBJECT_PATH_INVALID if the parent FID no longer exists. Reviewed-on: http://gerrit.openafs.org/6446 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9115c437c4113a554f3c3b97c4eaeafea6949600) Change-Id: I138d25e41c115475107e1b98044e4126b183280a Reviewed-on: http://gerrit.openafs.org/6483 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 722c846461737614633c1bfb6732957cbfdaf815 Author: Jeffrey Altman Date: Mon Dec 26 20:46:46 2011 -0500 Windows: Request extents readability Two minor code modifications to make the code easier to read. Reviewed-on: http://gerrit.openafs.org/6433 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e7ecda66eb2054012b4ec153a656ce674d6e70e4) Change-Id: Ic0bef65c01ffe11ab2cdd20f584c39b4d945b19b Reviewed-on: http://gerrit.openafs.org/6482 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8aad60da03e6ea5a423ea63b85184efd15bd5ca0 Author: Jeffrey Altman Date: Mon Dec 26 20:44:36 2011 -0500 Windows: RequestExtents avoid bufWrite if rdr held If the cm_buf_t is held by the redirector the buffer cannot be written back to the file server even if dirty. Therefore, do not check whether or not the cm_buf_t is dirty until after it is known that the buffer is not redirector owned. Reviewed-on: http://gerrit.openafs.org/6432 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 970d6e268011ab4ad8a4857121933514f7768b55) Change-Id: Ib55cf4daef8218a699f19b200c8918208b939e7c Reviewed-on: http://gerrit.openafs.org/6481 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7db630dd2ad01c1155505ca357b43c714f52f49b Author: Jeffrey Altman Date: Sat Dec 31 16:07:00 2011 -0500 Windows: avoid race during Fcb cleanup The worker thread can race with a AFSCleanup() operation and tear down the Fcb before the AFSCleanup() drops the Fcb->NPFcb->Resource. Avoid this race by requiring the worker thread to obtain the resource once before deleting the resource. Reviewed-on: http://gerrit.openafs.org/6462 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2ef57a3ee951660cb69d8656e9293c93b28e0d1e) Change-Id: Id475c8d99e7a7c8cf09fa1e6987cd04ca02d17bc Reviewed-on: http://gerrit.openafs.org/6480 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8fec878646357ae79919ee6de5163bf3af53837e Author: Jeffrey Altman Date: Sat Dec 31 16:04:27 2011 -0500 Windows: avoid deadlock if bulk error during enum If the cache manager has a valid callback at the start of a directory enumeration, the service can begin a bulk status rpc which can fail. The error code from the rpc is never propagated to the caller, therefore the caller loops forever attempting to complete the enumeration with status info. Fix it by returning the error. Reviewed-on: http://gerrit.openafs.org/6461 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit e2b42e2cde170102c07937d55db376416cb3965c) Change-Id: I56c59e40401e30e6af3559e149905b81678a0cff Reviewed-on: http://gerrit.openafs.org/6479 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e8687e21d1dee47042456c978f4a32d55ca8346a Author: Jeffrey Altman Date: Fri Dec 30 20:24:49 2011 -0500 Windows: AFSInsertHashEntry can fail If AFSInsertHashEntry() fails, the object information structure that was being inserted is not in the btree. Therefore, ensure that the object does not have the AFS_OBJECT_INSERTED_HASH_TREE or AFS_VOLUME_INSERTED_HASH_TREE flag set (as appropriate). This permits the unreferenced object to be garbage collected. Reviewed-on: http://gerrit.openafs.org/6458 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 36657b8505e3b232158a63b4ecad12fa59548b3a) Change-Id: I650fba32228773300561a642b2607d5e26490312 Reviewed-on: http://gerrit.openafs.org/6478 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2410c02dfd0f4efc82f09f51ef05daedc883c561 Author: Jeffrey Altman Date: Fri Dec 30 12:55:30 2011 -0500 Windows: additional AFSValidateEntry logging Reviewed-on: http://gerrit.openafs.org/6456 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d4eb369e7a5dada7e13585d934a63fa27e0d20ee) Change-Id: I162371150062266cce4a184855a69eb6165c8a65 Reviewed-on: http://gerrit.openafs.org/6477 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 688044b50c9dbe270c3166c65648855b2bfa9761 Author: Jeffrey Altman Date: Thu Dec 29 22:20:38 2011 -0500 Windows: add DV and error status to dir enumerations The cm_BPlusDirEnum family of functions are atomic when generating the directory enumeration but are not atomic with respect to the rest of the system as the enumeration is accessed. Therefore, the data version of the directory at the time the enumeration is created may not be the same as the directory version when the enumeration is fully processed. We therefore store the initial data version in the cm_direnum_t object. When the enumeration is fetching status information for each of the directory entries, it is possible that the fetch status will fail. We therefore store the fetch status error code in the cm_direnum_entry_t object. By doing so, the consumer of the enumeration can make a reasonable decision about the lack of status info. For example, if the resulting error is CM_ERROR_BADFD it is known that the entry has been removed from the directory since the initial enumeration. Reviewed-on: http://gerrit.openafs.org/6452 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ad3c00520b93174808f692ced3e35261030a8c1b) Change-Id: Ic843e33af6e461922850d04a83ad630d4834a695 Reviewed-on: http://gerrit.openafs.org/6476 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9f2780de0c1eb7a9f2f1e6f192e3043679a3ea2b Author: Jeffrey Altman Date: Thu Dec 29 22:18:59 2011 -0500 Windows: protect merge status against dscp == scp If the directory status object is the same as the object for which status info is being merged, the object will refer to itself as its own parent. Do not permit that. Reviewed-on: http://gerrit.openafs.org/6451 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 9b42af9326dbf34a7a657a7d4a2ea6d845c845e1) Change-Id: Id6548405ba099f7ffdaad5859e0c9ca748efaaa1 Reviewed-on: http://gerrit.openafs.org/6475 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e723e6f0faf95b973387af6b00a012374838455a Author: Jeffrey Altman Date: Thu Dec 29 19:58:19 2011 -0500 Windows: protect dir ops by CM_SCACHESYNC_STOREDATA CM_SCACHESYNC_STOREDATA is used to ensure that only one directory modifying rpc can be issued to the file server at a time on a single cm_scache_t. However, the local directory modifications were being made after cm_MergeStatus() and cm_SyncOpDone() were called. As a result, serialization of changes against the local directory buffers and b+tree was lost. Reviewed-on: http://gerrit.openafs.org/6450 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 60992d4ffb94a8472ccff3ff7890c34e2572688d) Change-Id: Id37ce6b75535c95e93fc16d976ddbba9428fef97 Reviewed-on: http://gerrit.openafs.org/6474 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 81fabf594df051922c5bea2f07def5a09c17cd64 Author: Jeffrey Altman Date: Thu Dec 29 19:19:04 2011 -0500 Windows: init scache DV=CM_SCACHE_VERSION_BAD zero is a valid DV. CM_SCACHE_VERSION_BAD is not. Reviewed-on: http://gerrit.openafs.org/6449 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit dc06ebad8ba7a58c1561ddd03f0a8a79e610d7c7) Change-Id: Ie2e8446386fb6a9b531f7273dc07a1b589b13c99 Reviewed-on: http://gerrit.openafs.org/6473 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b09bc9ba0a79a1537893a0c43765a01d58013732 Author: Jeffrey Altman Date: Thu Dec 29 12:45:16 2011 -0500 Windows: afsredirlib log messages Improve or correct a number of log messages. Report the correct FID or NT Status value, etc. Reviewed-on: http://gerrit.openafs.org/6442 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 83c52997b7b9e4d91a0263fbd26ec19fb2092d9c) Change-Id: I98d6c6cb0ed3280f9854fdb8e824590251211582 Reviewed-on: http://gerrit.openafs.org/6472 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c5e9aabd392496db072a49d6b80d60969a09d3db Author: Jeffrey Altman Date: Thu Dec 29 12:42:26 2011 -0500 Windows: Symlink resolve failure error If a symlink cannot be resolved, return STATUS_REPARSE_POINT_NOT_RESOLVED instead of STATUS_ACCESS_DENIED. The symlink is after all a reparse point. This results in a more meaningful error being delivered to the end user. Reviewed-on: http://gerrit.openafs.org/6441 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit ea0865e3266884f15a05bb3edd316f5ce8f972ed) Change-Id: I0a78cd70d7e59f8e4f6cfd98a7e35f1e151f82da Reviewed-on: http://gerrit.openafs.org/6471 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72cc8e53dcfcdf6c6ef2d802d0e741e2137a3687 Author: Jeffrey Altman Date: Wed Dec 28 17:08:23 2011 -0500 Windows: Make idle dead timeout very long The idle dead timeout processing must eventually be removed from Rx for initiators. In the meantime, make the timeout period ten times longer than the hard dead timeout. This permits eventual failure when the server doesn't respond in ten minutes but avoids more transient issues. Reviewed-on: http://gerrit.openafs.org/6440 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 07655bc23e2ab7b5d0c808d79b3c7838a01eacfa) Change-Id: I4fe69fc3d94eb20aaad5abd49f46aed0fc42ee8d Reviewed-on: http://gerrit.openafs.org/6470 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ed4078e8d70cdc99323fd427ddbc5c6d97d89843 Author: Jeffrey Altman Date: Wed Dec 28 17:07:01 2011 -0500 Windows: replace strdup with xdr_alloc in callback processing The CRT allocator cannot be used for memory that will be freed by afsrpc.dll. Use xdr_alloc() instead. Reviewed-on: http://gerrit.openafs.org/6439 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb) Change-Id: I4be514a23f5dc2f8bb1bd0eb222764577727823e Reviewed-on: http://gerrit.openafs.org/6469 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit fa085200a5da3164861c8bd92fe223077fec1445 Author: Jeffrey Altman Date: Mon Dec 26 20:59:21 2011 -0500 windows: osi_TSignalForMLs simplify Simplify logic for readability and efficiency. Reviewed-on: http://gerrit.openafs.org/6438 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 5d11bd665cd93b736f735d689f703e44f865cefc) Change-Id: Ib31fe2eb9ebcf064e5a330c585db4a5a99ddbf26 Reviewed-on: http://gerrit.openafs.org/6468 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6e84360fc2422e4367c143ab568b4975ac85ab58 Author: Jeffrey Altman Date: Mon Dec 26 20:56:38 2011 -0500 Windows: osisleep do not tamper with queues There is no need to manually remove an entry from a queue before executing osi_QRemoveHT(). osi_QRemoveHT() removes the item from the queue and fixes up the pointers correctly. Manual intervention is a waste of cpu and can be harmful. Reviewed-on: http://gerrit.openafs.org/6437 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit f6f95ac4bfc5e504c1b825fd52b787d12a89e53c) Change-Id: I8e18f6e4ca0b7348009bd2196373420424ddf108 Reviewed-on: http://gerrit.openafs.org/6467 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 90ed9c443c9844e03844650007208bb3698be9ef Author: Jeffrey Altman Date: Mon Dec 26 20:55:22 2011 -0500 Windows: osi_sleepInfo tid type The thread id type is DWORD not size_t for consistency with the rest of the client_osi package. Reviewed-on: http://gerrit.openafs.org/6436 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 4c2190784f1d4bb613cc140b8d189f0ab4ae10fc) Change-Id: I0ebde75b5286d81d3f310cfed92ed873eb1247ee Reviewed-on: http://gerrit.openafs.org/6466 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f9817fa6e92aaf6d2cf353ae6437c93f6e6cc8b6 Author: Jeffrey Altman Date: Mon Dec 26 20:51:33 2011 -0500 Windows: add osi_TWaitExt(), fix osi_TWait() osi_TWait() was adding new locks to the turnstile at the tail which is the end of the queue locks are removed from. This implemented LIFO instead of FIFO when FIFO is the "fair" order to service lock requests. osi_TWaitExt() is added to permit the Reader to Writer upgrade request to use LIFO when more than one reader is present. Reviewed-on: http://gerrit.openafs.org/6435 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3011a8228a04a54e04f5626e9f686840a25f2d5f) Change-Id: I33d8592db2999b80d6f03060b0208b76b7101c30 Reviewed-on: http://gerrit.openafs.org/6465 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 644a9b912c4b0adcb8e0be185938e094747b6242 Author: Jeffrey Altman Date: Mon Dec 26 20:48:24 2011 -0500 Windows: use waiters counter instead of osi_TEmpty The osi_TEmpty() macro examines the values of the turnstile pointers. Instead use the lock's 'waiters' counter to determine if there are waiting threads to signal. Reviewed-on: http://gerrit.openafs.org/6434 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2b6a8d384bd4426a61c72e79c34ffd75a03e612e) Change-Id: I089109d532dbdc0da2bc3ee58d775e8ca7f0a813 Reviewed-on: http://gerrit.openafs.org/6464 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit db3c8f1559c0cba2c1f45edee487e732686cd9a6 Author: Jeffrey Altman Date: Sat Dec 24 15:16:12 2011 -0500 Windows: kauth search for kerberos iv port first Modify src/kauth/user_nt.c to match the service name search order of the Unix code: kerberos4 kerberos-iv kerberos The standard Windows SERVICES file includes "kerberos-iv" as port 750. FIXES 127907 Reviewed-on: http://gerrit.openafs.org/6430 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 2cdd59d8f318193d0ef7937910466531caf1c963) Change-Id: Ia41c7ddfa1c6cd0d3e3ded2d8be12dfa5bc13cfe Reviewed-on: http://gerrit.openafs.org/6463 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b0679bba56868ddbac3ed7eaa5b43064ceec3d55 Author: Peter Scott Date: Fri Dec 23 17:00:57 2011 -0700 Windows: Avoid bottleneck on VolumeLock The VolumeLock resource was obtained during each AFSParseName() and held across a wide range of operations including volume info queries, renames, and extent requests. These operations can take a long time to complete and as long as the VolumeLock was held exclusively there could only be one operation in flight at a time on a given volume. This significantly reduced the parallelism of operations. The VolumeLock was not required in almost all cases. This patchset adjusts the use of the VolumeLock and avoids the bottleneck. Reviewed-on: http://gerrit.openafs.org/6420 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 3ca42749357edc97922918d04558deb268fe78f0) Change-Id: I1f1ef64e82ca01169e61ba8ceb6cab113129d2fa Reviewed-on: http://gerrit.openafs.org/6429 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 7c42f353615de2230250a4f7a4d5f78802f86700 Author: Jeffrey Altman Date: Sat Dec 24 03:15:53 2011 -0500 Windows: avoid race in cm_GetNewSCache The cm_scacheLock is dropped while walking the scache LRU queue. As a result it is possible for the cm_scache_t that is being considered for recycling to be accessed and moved to the head of the queue. Track the prev and next pointers so it is possible to detect if the cm_scache_t that is about to be recycled has been moved. If so, restart the search from the tail. Reviewed-on: http://gerrit.openafs.org/6424 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ff368a7ec70fca0673a21f6b283db13cabcc2286) Change-Id: Ib13ee103cf06b211ca1307e530db379825a9ad62 Reviewed-on: http://gerrit.openafs.org/6428 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 1eada9bff005490de3d715729b7b1ff23ce53186 Author: Jeffrey Altman Date: Sat Dec 24 03:11:04 2011 -0500 Windows: cm_BufWrite() must wait in cm_SyncOp() Now that it is permissible for more than one store data operation to construct BIOD lists in parallel, cm_BufWrite() must be willing to wait in cm_SyncOp(). Otherwise, the daemon threads will spin. Reviewed-on: http://gerrit.openafs.org/6423 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 17ce77f843e01ff96f66e05b4b932b0c6187493e) Change-Id: I8d0c6570488115d3ea60e757113fbb466b4a772f Reviewed-on: http://gerrit.openafs.org/6427 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit c154a2f78df790eb563cd90ef0eb3b815f3f61fb Author: Simon Wilkinson Date: Sat Dec 24 17:23:48 2011 +0000 rx: Don't adjust non-existent events If we notice that time has gone backwards (that is, the current time is older than the time of the last event we fired), then we reschedule all pending events. On Windows, immediately after we have resumed from a suspend, this code path can be executed with an empty event tree, causing an exception: FAULTING_IP: afsrpc!adjustTimes+cf [c:\src\openafs\openafs.git\repo\src\rx\rx_event.c @ 213] 00000000`61041847 4c8b4030 mov r8,qword ptr [rax+30h] EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff) ExceptionAddress: 0000000061041847 (afsrpc!adjustTimes+0x00000000000000cf) ExceptionCode: c0000005 (Access violation) ExceptionFlags: 00000000 NumberParameters: 2 Parameter[0]: 0000000000000000 Parameter[1]: 0000000000000030 Attempt to read from address 0000000000000030 Resolve this by checking for an empty tree before we attempt to adjust event times. If the tree is empty, we just zero the last event time (so we don't keep running the adjustTimes routine), and continue as normal. Reviewed-on: http://gerrit.openafs.org/6425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5f939c64e575dab937feda819937ce3087a2d2e8) Change-Id: Id765b115745a6d16fce731ed957f150fffe7e1f1 Reviewed-on: http://gerrit.openafs.org/6426 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit e9c95bcc49ca1ac3e747698b276c843be4f369ab Author: Jeffrey Altman Date: Wed Dec 21 21:47:56 2011 -0500 Windows: AFSCleanup extent processing 1. Perform a CcFlushCache() any time the file is cached and the Context Control Block indicates that the handle has FILE_WRITE_DATA permission. 2. Perform an AFSFlushExtents() whenever there are dirty extents and the handle has FILE_WRITE_DATA permission. No point flushing the extents if the AuthGroup does not have write permission. Another Ccb must exist that does have write permission. Reviewed-on: http://gerrit.openafs.org/6399 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit e18c620aa0e49fde31beaa8327bf02eb87d89e3f) Change-Id: Id090761b8a389d3f4f56654698e7935aa38ec0d3 Reviewed-on: http://gerrit.openafs.org/6409 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 92b8320fd90579e471d18507f7bcb1efb34dc198 Author: Jeffrey Altman Date: Wed Dec 21 21:37:41 2011 -0500 Windows: AFSRetrieveValidAuthGroup FILE_READ_DATA Only an AuthGroup belonging to a Context Control Block that was granted the FILE_READ_DATA permission is capable of reading data from the file server. Reviewed-on: http://gerrit.openafs.org/6398 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 68b10efa7dbabbedbb95928dccac29ed8d4179c4) Change-Id: Ia7d1eb9c4a27ee97d00ec2764a16180e3e85135b Reviewed-on: http://gerrit.openafs.org/6408 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4a7457d9ef2e5482795500f13cf639135f351db5 Author: Jeffrey Altman Date: Wed Dec 21 21:34:14 2011 -0500 Windows: AFSRequestExtentsAsync retry with alt authgroup If AFSRequestExtentsAsync() fails to obtain requested extents due to STATUS_ACCESS_DENIED using the AuthGroup associated with the Context Control Block, try to find an alternate AuthGroup to use to perform the extent request. We have already told Windows what permissions the application has when the file was opened. Windows will perform its own validation checks prior to permitting the data to be accessed or altered. Reviewed-on: http://gerrit.openafs.org/6397 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 4fa01ad7fc5434ca5ca42f30407d47c736f8b000) Change-Id: I0a7963c3a7c44497c33403ee7c70260a9ebb49a3 Reviewed-on: http://gerrit.openafs.org/6407 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 282173fc8b9a11f6931064feb110a27e3399f0ea Author: Jeffrey Altman Date: Wed Dec 21 21:17:33 2011 -0500 Windows: Use AuthGroups for extent request error reporting The afs redirector current tracks the most recent extent error in the File Control Block. Prior to this patchset the error was returned to the requesting thread when the process Id matched the most recent Process to issue a request. This approach resulted in a couple of problems. 1. There are multiple threads that can issue an extent request on the same file at the same time representing different processes. Resetting the process Id with each new request could clear the error prior to its receipt. 2. The failure may be due to inappropriate permissions. Permissions are not associated with proceses but with Authentication Groups. This patchset makes several changes: 1. It enables the afsd_service to track the active authgroup as part of the cm_user_t structure and associates that object with the BIOD object to ensure that the active authgroup can be reported to the afs redirector. 2. It modifies the AFSExtentFailureCB structure to include the AuthGroup GUID. 3. It tracks the AuthGroup GUID associated with the extent failure in the non-paged file control block. 4. It converts all tests on Process Id to use AuthGroup instead. 5. It alters the behavior of error delivery such that reported error is only cleared after it has been reported once to a thread using the matching AuthGroup. These changes make the situation better but not perfect as error states can still be lost. However, it avoids the case most often seen in production where two processes (a end user process and an anti-malware process) are fighting over a file and the anti-malware process has no permission to access the file under its own credentials. Reviewed-on: http://gerrit.openafs.org/6396 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b9ca435dcb5433218ecbb37ab41b85dabe0a5912) Change-Id: I3f32ffda5cc7091854488aba66a8549ea7470141 Reviewed-on: http://gerrit.openafs.org/6406 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f531a62da46ff3f11a4a3b3e06ddd0eb06d3406a Author: Jeffrey Altman Date: Wed Dec 21 21:10:45 2011 -0500 Windows: Explicit permission check on extent release When a data extent is released by the afs redirector or the afsd_service performs an extent claw back during a cleanup operation, perform an explicit permission check before attempting to store dirty buffers to the file server. Instead of waiting for the file server to fail the request, fail it immediately. The permission check is performed using the currently active authentication group. Reviewed-on: http://gerrit.openafs.org/6395 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7e26dfd6dc893d14717aad411460fc781acc4001) Change-Id: Ib1a4e3854482f197a97d558a802c69109bec9663 Reviewed-on: http://gerrit.openafs.org/6405 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 633f3ab87c4f4f9d9d119483187d01fed22fff23 Author: Jeffrey Altman Date: Wed Dec 21 21:08:59 2011 -0500 Windows: RDR_CleanupFileEntry restrict extent claw back Only demand that extents be returned by the afs redirector if this cleanup is the last open handle or the redirector has requested that the file be flushed to the file server. Reviewed-on: http://gerrit.openafs.org/6394 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6cd09ca2e699d2f9817b897e7165fac60560adcc) Change-Id: Ia89fb27eeb458b68f13bbb2fcfed17ade918c382 Reviewed-on: http://gerrit.openafs.org/6404 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5d96d48f944ca845dae6f26e0cc36cda63fd5f5b Author: Jeffrey Altman Date: Wed Dec 21 21:03:52 2011 -0500 Windows: remove unused AFSRequestExtents() Reviewed-on: http://gerrit.openafs.org/6393 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f6c85f40c06ddb2e527fcd9c39cba779bc82485b) Change-Id: I22befd94571e2e418733e1db4bc911b78ff5cb79 Reviewed-on: http://gerrit.openafs.org/6403 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a7f977d9fc0c8f74c73715a8a0cb9f2f258618c5 Author: Jeffrey Altman Date: Wed Dec 21 20:49:59 2011 -0500 Windows: Bad DV invalidate only when new DV not 0 If the current DV is BAD_VERSION and the new DV is 0, do not send an invalidation to the redirector. It only results in wasteful work. If the current DV is BAD_VERSION the object either: 1. was never previously known 2. was recently flushed 3. the cm_scache_t was recycled In all cases, the redirector does not have knowledge of the object since either it didn't exist or a previous invalidation was sent. Reviewed-on: http://gerrit.openafs.org/6392 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7a1c8e57a08dcebce2f3b861a0d7bbabcc5272ba) Change-Id: Icaaa61adf076af43444ec9884cd81da5ed4fa173 Reviewed-on: http://gerrit.openafs.org/6402 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 872acf267312a1af8af886993e9a78061f485a4a Author: Jeffrey Altman Date: Wed Dec 21 20:45:19 2011 -0500 Windows: Define times in terms of AFS_ONE_SECOND The afs redirector defines the macro AFS_ONE_SECOND to indicate the number of 100ns units necessary to indicate one second of time. Use that definition when defining other time values. Also define AFS_ONE_MILLISECOND and AFS_ONE_MICROSECOND. Reviewed-on: http://gerrit.openafs.org/6391 Tested-by: BuildBot Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f417dba69230c6b72882ca614a3a8c5691fe561c) Change-Id: Iacecbccb3b791198338e9d71d2314d4c5c9e6cf1 Reviewed-on: http://gerrit.openafs.org/6401 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 67418ecf80a48662aefe7763601ef200f02b4a38 Author: Jeffrey Altman Date: Sun Dec 18 19:23:45 2011 -0500 Windows: version 1.7.4 Change-Id: I75331de08d274c192dbd84172fd77d00d66d3c18 Reviewed-on: http://gerrit.openafs.org/6381 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 62cb0545e58b52ed2c4667c023e6f27a875b5d8a Author: Jeffrey Altman Date: Sun Dec 18 12:08:01 2011 -0500 Windows: ChangeLog for 1.7.4 Change-Id: Ia68d35422fe8c3526ddf77aec7c0f701c02e2dd1 Reviewed-on: http://gerrit.openafs.org/6380 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91e925277707d0e4951d20cbfdb6b3c90fff95ab Author: Jeffrey Altman Date: Sun Dec 18 18:36:14 2011 -0500 Windows: avoid deadlock during SetRenameInformation The VolumeLock must be held before the Fcb->NPFcb->Resource. Obtain the VolumeLock in AFSSetFileInformation only in the rename case instead of obtaining the VolumeLockin AFSSetRenameInformation. Reviewed-on: http://gerrit.openafs.org/6377 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ad2965bad8e8b2f085d05be661086dc81da52d3) Change-Id: I25f15d4a1de563df6e5ed4ba678e0ce9b0a58323 Reviewed-on: http://gerrit.openafs.org/6379 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f297830f834f2a6d496ce6d7f9c9fa630232473d Author: Jeffrey Altman Date: Sun Dec 18 12:08:24 2011 -0500 Windows: terminate HOSTS/LMHOSTS with newline If the original file did not terminate with a newline, add one before appending the "AFS" entry. FIXES 130210 Reviewed-on: http://gerrit.openafs.org/6375 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d8f9141fa98df50ce682364ef5a7958ce422613) Change-Id: I4aa1644436f7a4eb80c0a3ab757e8363b0193f3f Reviewed-on: http://gerrit.openafs.org/6378 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 526918cb2ecea86cea9cd8c78c1983f8cca50b71 Author: Jeffrey Altman Date: Fri Dec 16 00:12:39 2011 -0500 Windows: save fid/type for redirector invalidation Must save the fid/type fields of the cm_scache_t object before recycling in order to invalidate the contents in the redirector. Reviewed-on: http://gerrit.openafs.org/6359 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit db9e5775dd26e6362820b7267f8d971f62dfe2ed) Change-Id: Ifdaca37a68f4a159149738f14a47bd800d19ec96 Reviewed-on: http://gerrit.openafs.org/6366 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6f5474dc1acc08c4c792a5c1ca98af4a4f71d96 Author: Peter Scott Date: Wed Dec 14 12:27:54 2011 -0700 Windows: Track AuthGroup in Context Control Block Tracking the AuthGroup in the File Control Block proved to be insufficient to ensure that dirty extents can be stored back to the file server when an anti-virus service opens a file in authgroup without 'write' permission immediate after the application performing a WriteFile() opens it. In this situation the Fcb ends up with the AuthGroup set to the anti-virus value and not the one that belongs to the writing application. Tracking the AuthGroup by Ccb provides the ability to select an AuthGroup from the list of open handles instead of tracking the most recent one. Reviewed-on: http://gerrit.openafs.org/6333 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 92bfaae062c596d678220dcb93f9dc61304d3c5a) Change-Id: I8c3775d7e4ca8c0747309d3f081fb5d01f74b996 Reviewed-on: http://gerrit.openafs.org/6374 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 73e785e7d8ef9549d00e408b34fa5281185f552f Author: Jeffrey Altman Date: Sat Dec 17 12:14:28 2011 -0500 Windows: Tear down extents upon file deletion When processing AFS_INVALIDATE_REMOVED, tear down all extents since they are no longer necessary and return them to the service for recycling. Change-Id: Iec6c0d2c68db16dbf3bd04c51536e13d45f0c1b8 Reviewed-on: http://gerrit.openafs.org/6365 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 714ae7f1840757e0575d25c910b0b9fa2499e354) Reviewed-on: http://gerrit.openafs.org/6373 commit 8f448cb6fe838037d7a68f7d70b76bb6de19f4bc Author: Jeffrey Altman Date: Sat Dec 17 12:13:17 2011 -0500 Windows: notify file size change if flushed When processing AFS_INVALIDATE_FLUSHED, notify any listeners that the file size has changed to force a complete refresh. Reviewed-on: http://gerrit.openafs.org/6364 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit c29dc399769c54bbab4af5bd4f828f0d49755860) Change-Id: Idc13f09dd8458881cd1b94e0a3902092116b347c Reviewed-on: http://gerrit.openafs.org/6372 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 72a6715b379ca9c36ba4d0184528b4abb114db2c Author: Jeffrey Altman Date: Sat Dec 17 12:08:49 2011 -0500 Windows: forget data version only for flushing The AFS redirector was intentionally forgetting the data version number for AFS_INVALIDATE_DATA_VERSION events. The point of that event is to ensure that clean data be purged if the data version in fact changed. Checking the data version for change cannot be performed if the data version is reset to -1. Only when AFS_INVALIDATE_FLUSHED is processed should the data version be reset to ensure that all of the data is purged. Reviewed-on: http://gerrit.openafs.org/6363 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20d986fddf6b21abc58b2f3c24aac425cf5d2bf0) Change-Id: I4c45b5f5b8738d057621059f34faa0670b5f1545 Reviewed-on: http://gerrit.openafs.org/6371 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f2a3371c5f18c69e334814170e640f58cc703fa6 Author: Jeffrey Altman Date: Sat Dec 17 12:07:53 2011 -0500 Windows: fix indentation Reviewed-on: http://gerrit.openafs.org/6362 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit ef31f0f6d1f23bcd882740db4d54a9ffea6e0a64) Change-Id: I5255bd95e308a540ced80c622cfedf5e1776ce27 Reviewed-on: http://gerrit.openafs.org/6370 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4632975defcda4a508bbbbaa1510721fa4619ff2 Author: Jeffrey Altman Date: Sat Dec 17 11:57:15 2011 -0500 Windows: AFSSetRenameInfo log message Fix a typo in the log message and change its priority from error to verbose Reviewed-on: http://gerrit.openafs.org/6361 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 20c871cc67f332f77b1b766f15b2659c0fab8e40) Change-Id: Id5f18a6c33619265bbd590acba68a09c8a8f4a71 Reviewed-on: http://gerrit.openafs.org/6369 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 71a45192777562054d1920428e760d872eb2af19 Author: Jeffrey Altman Date: Fri Dec 16 17:24:36 2011 -0500 Windows: return error to system paging requests If an error has been set on a file, return that error to the System process for any outstanding extent requests. Reviewed-on: http://gerrit.openafs.org/6360 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit d142082caed1eba870ffee017193883a0508306e) Change-Id: I9181665a8df899f72bca113da67ec1a388a9723f Reviewed-on: http://gerrit.openafs.org/6368 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit adea911be96b6df5529e5f8f50ef6ed116c4fbbe Author: Jeffrey Altman Date: Fri Dec 16 18:24:50 2011 -0500 Windows: log volume and authgroup for redir open If opening a volume root fails, log the authgroup and volume to make it easier to debug the error. Reviewed-on: http://gerrit.openafs.org/6352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 307856353c3f168105ce82f3f3fa8e4c5efb0b6c) Change-Id: Ib35ea15775cdbd5d6b4ab39d900a2f4d37942f51 Reviewed-on: http://gerrit.openafs.org/6367 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2de29702cd5ac928f3bd88a973eaa100f9bdf0a9 Author: Jeffrey Altman Date: Fri Dec 16 17:22:49 2011 -0500 Windows: move to head of queue no-op if not in queue If the buffer is not in the queue, do nothing. Reviewed-on: http://gerrit.openafs.org/6351 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0b2639ff4fd732dfac2c1dc058d6c517cc966737) Change-Id: Iacc2e9ab5c8502b9c5e125513cd25a805edff366 Reviewed-on: http://gerrit.openafs.org/6357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a3376c0765bacc139ba194d2c5bc104d72ba7905 Author: Jeffrey Altman Date: Fri Dec 16 16:15:56 2011 -0500 Windows: Properly convert FID structures Use the FID conversion function in RDR_SetFileStatus(). The FID structures are not the same in afsd_service and the afsredirlib.sys driver. Reviewed-on: http://gerrit.openafs.org/6350 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit b63ff1319e0ebecdfbdef7365d49d02543bccce8) Change-Id: I897448870ee5eba1aaf45e066e261e4c3ea0529d Reviewed-on: http://gerrit.openafs.org/6356 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5ad8376c57d677e010fb6fe45afd4266eab109f5 Author: Jeffrey Altman Date: Fri Dec 16 11:43:32 2011 -0500 Windows: propagate directory enumeration failures If a directory is enumerated with an AuthGroup that has no permissions, do not treat the enumeration as successful. Reviewed-on: http://gerrit.openafs.org/6344 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b3e6db22a1755b7633b522dfe5cbb61949e06466) Change-Id: I38acef1c143cb3821aca5d9527ddf12aff8f94ad Reviewed-on: http://gerrit.openafs.org/6355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ae13423fab775a6b2bedc890c53d626c4c53b0c1 Author: Peter Scott Date: Thu Dec 15 17:52:54 2011 -0700 Windows Problem with cross-directory rename Not correctly handling cross-directory rename processing Reviewed-on: http://gerrit.openafs.org/6343 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f73685c233974403fe63795303cd1659c5bcb2af) Change-Id: Ie3a87bf2767ab966b945e327a9770d16e2de065f Reviewed-on: http://gerrit.openafs.org/6354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec8f5e7682ac322b06d6189763553df1249faae0 Author: Jeffrey Altman Date: Wed Dec 14 12:58:36 2011 -0500 Windows: Update Adv Firewall Rules Do not specify the Service Name property. According to feedback on openafs-info the Service Name blocks the rule from working properly. If the rule already exists, attempt to remove the Service Name filter and update NAT Edge Traversal and Permitted interface rules. Reviewed-on: http://gerrit.openafs.org/6332 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2d472f94ab1017724e56bcdd29b9ef451a13f182) Change-Id: I81d083321c5ada5451d1a63166d5d9604652fe6c Reviewed-on: http://gerrit.openafs.org/6353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d9441580223afd8dcaf396cde1992bf04bc7e755 Author: Jeffrey Altman Date: Tue Dec 13 23:28:15 2011 -0500 Windows: AFSRDFSProvider stack overrun StringCchXXX functions take the number of characters not the number of bytes. Use StringCbXXXX functions whenever the buffer size is being specified. Check return codes from StringXXXXXX functions and return errors instead of blindly continuing with a truncated string. Allocate a larger buffer for substitution strings since they need to handle the device path plus the target path. FIXES 130392 Reviewed-on: http://gerrit.openafs.org/6248 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit da89855b492d8d06128ed62b219dc968f5b38a9d) Change-Id: I85207bddcf5ba92c7ba6783404837cc1c4fa5f2e Reviewed-on: http://gerrit.openafs.org/6258 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 506032be33efb89a348a0e1c0611c43fa356252c Author: Jeffrey Altman Date: Sat Dec 10 13:28:17 2011 -0500 Windows: memory leak when setting tokens via smb The SID string of the RPC used to set the token sessionKey was being leaked. Be sure to free it when it is no longer required. Reviewed-on: http://gerrit.openafs.org/6244 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f30d70ba5575753302be0a2b08c27a639898d4aa) Change-Id: Id7728420ee32c2144b8c87a5e9e82ea91837b0af Reviewed-on: http://gerrit.openafs.org/6246 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8bc3dfc3d7e2f99edd8c1c293c03ee4813bb061a Author: Jeffrey Altman Date: Fri Dec 9 18:40:42 2011 -0500 Windows: Suspend/Resume for afsd_service The power mgmt events are received in the service. The service can block all requests from the redirector from being processed until it knows that it is safe to process them. The service will receive a SERVICE_CONTROL_APMSUSPEND just before the system goes to sleep. The service has two seconds to respond and it uses that time to attempt to send RXAFS_GiveUpAllCallBacks to all file servers as an rx_multi with no wait. It also marks all servers down and updates the callback expirations to be just after the servers were marked down so that they will be forced to be refreshed when the server is marked up. Upon resume the service receives two events. First, SERVICE_CONTROL_APMRESUMEAUTOMATIC which is used to perform an SMB lan adapter change detection and perform a probe of all down servers. The second, SERVICE_CONTROL_APMRESUMESUSPEND is used to resume SMB listeners, perform a 2nd lan adapter change check (just in case), check the status of all down servers in additional networks have come up, and finally resume processing of redirector requests. With these changes no special logic in the redirector is required. Reviewed-on: http://gerrit.openafs.org/6243 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 41d145b303d61aa6f8f336e4d66748dea860d08f) Change-Id: I8a0d105c790c127320409e89913e399b7a35ffd5 Reviewed-on: http://gerrit.openafs.org/6245 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 60824032b97b7975f68751a38a4535546e781612 Author: Jeffrey Altman Date: Thu Dec 8 10:00:57 2011 -0500 Windows: increase timeout for extent request retries The AFS Redirector requests file data extents from the afsd_service.exe. If it does not receive the requested extent within 10 seconds it issues another request for that extent. Extent processing in the afsd_service is handled by background daemons that process tasks serially from a work queue. When the load on the system is large enough that satisfying the work queue takes longer than 10 seconds, the redirector would retry the request. This would increase the length of the work queue and increase lock contention. Increasing the timeout period for extent retries to two minutes significantly reduces the number of retry attempts while maintaining protection against a lost extent request. Two minutes is selected because that is the rx hard dead call timeout. Reviewed-on: http://gerrit.openafs.org/6237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f238d4854d1f32836228f2d191c8a9d265d4b181) Change-Id: I13003826aee5a2d110e03e6b3293d60fabe7eed8 Reviewed-on: http://gerrit.openafs.org/6239 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0d6f03583c41c95d1001d85d0fc93216ead9196b Author: Peter Scott Date: Wed Dec 7 20:29:00 2011 -0500 Windows: include owner/group in Security DACL Include the World (Everyone) SID as the owner and group for all files in AFS. FIXES 130343 Reviewed-on: http://gerrit.openafs.org/6236 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f2c0c51f781495be0d28a75e5d7a786bbe9dddda) Change-Id: If6bdba2387737217ac5cb52b591997a0ebd72f45 Reviewed-on: http://gerrit.openafs.org/6238 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ef766c5024646f08eb9808cda7efc4ae9bb33217 Author: Jeffrey Altman Date: Sun Dec 4 14:32:11 2011 -0500 Windows: version 1.7.3 (1.7.0300) Change-Id: Ib55cc7dc17f98eb3d1b7590d10a764b5d581c3e8 Reviewed-on: http://gerrit.openafs.org/6226 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47aa318ed79e3eabb4a3eba8bd6e73b7f7c671ea Author: Jeffrey Altman Date: Sun Dec 4 13:42:08 2011 -0500 Windows: Release Notes Updates Updates for 1.7.3. Grammar improvements. Reformatting. Reviewed-on: http://gerrit.openafs.org/6222 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 942dae0dd02f2e222ace5d003b1c55397a4018ff) Change-Id: Idc2fc530097fcdacbf51f572ffe4836664406a96 Reviewed-on: http://gerrit.openafs.org/6225 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 911e27a33f2284f191b9c5ca40c4b9382ed80b14 Author: Jeffrey Altman Date: Sun Dec 4 14:24:57 2011 -0500 windows: 1.7.3 change log Change-Id: Ia38b4cd92bba1c3ee13007b40a396b2f24a89bb2 Reviewed-on: http://gerrit.openafs.org/6224 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9e6e784634216ab62a962506b8dda00f38d7d96c Author: Simon Wilkinson Date: Sun Nov 20 18:11:53 2011 -0500 rx: Make CALL_RELE and CALL_HOLD lock refcnt mutex The reference count mutex must always be held when calling CALL_RELE or CALL_HOLD. Instead of requiring that the caller obtain, and release the mutex, do so within the HOLD and RELE macros, greatly simplifying calling code. Provide CALL_RELE_R and CALL_HOLD_R as versions of these macros which can be used by callers who already hold the reference count mutex for other purposes. Reviewed-on: http://gerrit.openafs.org/6219 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 57316878e03691f7e320013b21f0c7640877e11e) Change-Id: Ifa63adc280b4499ba1f541fe242612bc33f8e603 Reviewed-on: http://gerrit.openafs.org/6221 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1764b4030c26bd3beb785614af6405bb1a215fdd Author: Simon Wilkinson Date: Sun Nov 20 18:07:41 2011 -0500 rx: Helper function for decrementing conn refcnt The code to lock the reference count mutex, reduce the connection reference count, then unlock the mutex, is duplicated many times throughout rx.c. Replace all of these multiple copies with a single inline function. Reviewed-on: http://gerrit.openafs.org/6218 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry picked from commit aefb10920740e537aa26d841d16302e6ce8e3d76) Change-Id: I01b5ef952345188b35138b62d0f241c198c3a265 Reviewed-on: http://gerrit.openafs.org/6220 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit afaaecb84fc8006dce922568c2118632fb1b4106 Author: Simon Wilkinson Date: Sun Nov 20 16:31:28 2011 +0000 rx: Hide the rx_packet.h Hide the rx_packet.h, and hence the rx_packet structure from application view. rx_packet.h is currently still installed, and is included directly by RX security classes, to reduce the per-packet overhead there. Reviewed-on: http://gerrit.openafs.org/6182 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 64b00c3a1a87739621f58c777fc3cc54fb15a0af) Change-Id: Icca1e80e898b2f034ed22b6f2a2381bf3b57ae3f Reviewed-on: http://gerrit.openafs.org/6217 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c1db73bf33c67230d810a7d69dfe8c5e5d62ccc Author: Jeffrey Altman Date: Sat Dec 3 21:20:05 2011 -0500 Windows: define MIN and MAX MIN and MAX are used throughout the tree. Windows does not define them. A future patchset should convert the openafs src tree to use min and max. Reviewed-on: http://gerrit.openafs.org/6209 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a57f6434e81539d3f261f0dd57327ae4dcd98caa) Change-Id: Ie106fbf08445ebcb1ce66379125a1c3a19222e58 Reviewed-on: http://gerrit.openafs.org/6216 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 475e526fbaea715e792cf032d54aca2770df8782 Author: Simon Wilkinson Date: Sun Nov 20 14:58:28 2011 +0000 rx: Make the rx_call structure private Hide the rx_call structure for public view. Provide accessors for those elements which are currently accessed by applications. Note that this change as it currently stands removes the visibility of the last sent time, and sequence number information, from the VolMonitor function. Reviewed-on: http://gerrit.openafs.org/6181 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d3eaa39da3693bba708fa2fa951568009e929550) Change-Id: I3e9aa35d8c4759ce9d5f16bb2c9af99f0bf1f477 Reviewed-on: http://gerrit.openafs.org/6215 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0681e7998e360365fbf69c581da213493710730f Author: Simon Wilkinson Date: Tue Nov 15 10:40:44 2011 +0000 rx: Make struct rx_connection private Move the rx_connection structure into a private header file, so that it is only visible from within the rx module. This allows us to use types within the structure that are not visible to everywhere that includes rx.h, as well as being a step towards a more stable ABI for RX. Add accessor functions for all of the connection members which are currently used by external callers, and modify those accessors which were implemented as macros to also be functions. Change all external access to the connection structures to use these new functions. Reviewed-on: http://gerrit.openafs.org/6180 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit aa76c8f670012d4591489db374bad48118defa36) Change-Id: I9cd702cf8f9833f1b3368f3f6f8913155963e637 Reviewed-on: http://gerrit.openafs.org/6214 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69c0033ac68ca83107a6a75cc97bc9b15f6040b7 Author: Jeffrey Altman Date: Sat Dec 3 17:49:47 2011 -0500 Windows: apply Nat Pings only to cm_rootUser connections Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser connections and only apply Nat pings to those connections instead of examining the security state of the connection. Reviewed-on: http://gerrit.openafs.org/6208 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 01f55bbf14210ef3e4f4c0246409af370de3a383) Change-Id: I9bac16d5eda46f32e23e9a845b511b8a8ddc4283 Reviewed-on: http://gerrit.openafs.org/6213 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit efb24564b84dcb133699f0d7155f17e3608df73d Author: Jeffrey Altman Date: Sat Dec 3 17:46:41 2011 -0500 Windows: track cm_rootUser connections Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose of tracking which connections belong to the cm_rootUser. Reviewed-on: http://gerrit.openafs.org/6207 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75) Change-Id: I5af7929dbcf03171734bcbd4c950f5e6e5de81ba Reviewed-on: http://gerrit.openafs.org/6212 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 09f107db9e380230befabdc24663e181484ca5a9 Author: Jeffrey Altman Date: Sat Dec 3 15:45:53 2011 -0500 rx: rx_conn/rx_peer refCount signed Can't trace reference count underflows with rxi_LowConnRefCount and rxi_LowPeerRefCount if they cannot become negative. Reviewed-on: http://gerrit.openafs.org/6205 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit f37df60763a306fb70f791f7dcba9cec2ec27c7e) Change-Id: I495dae70eb5b7cad72783a506d9b5e6a894de867 Reviewed-on: http://gerrit.openafs.org/6211 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a8e09db6f6ddf721befea25b66d3da45fbd7d290 Author: Simon Wilkinson Date: Sat Dec 3 21:10:43 2011 +0000 rx: Some kernels have no reschedule function If RXK_TIMEDSLEEP_ENV isn't set, then Unix kernel cache managers call rxevent_Init without a reschedule function. Check for this so we don't end up calling a NULL function in these situations. Reviewed-on: http://gerrit.openafs.org/6206 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 5c6640bf0b2b365d4871051db7a1be6075d44666) Change-Id: Ife77ae88370226b26a2e1e6eb5185e64b3e25221 Reviewed-on: http://gerrit.openafs.org/6210 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ca63944603e040d6f26ba69dfafb955d432d5d6 Author: Jeffrey Altman Date: Fri Dec 2 23:38:01 2011 -0500 Windows: npdll connected query returns no usage In response to a NPEnumResources CONNECTED scope query, the usage field is always set to zero. If the CONNECTABLE flag is set, mpr.dll will filter the entry out of the result list. Reviewed-on: http://gerrit.openafs.org/6195 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0fb7d852845effce50d896416cf8b4ba3c19d6e1) Change-Id: Ica9fda3cd945d868b8a7d8e015203e3e60763570 Reviewed-on: http://gerrit.openafs.org/6202 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7e9dbdb2b0c051b5f316295ca34ccecf473c123 Author: Simon Wilkinson Date: Sat Dec 3 11:20:57 2011 +0000 Windows: Use roken's min and max roken provides min() and max() macros. Use these, rather than our own MIN() and MAX() Reviewed-on: http://gerrit.openafs.org/6196 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit b34a2df4c706838e680bdcd15528862c49b5ba6c) Change-Id: I88ec2249c1fe0beab82aa4ad6f8f1d10579b1b9d Reviewed-on: http://gerrit.openafs.org/6201 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6187b8ad9ca1fdfd153742f168c17c0108f55e88 Author: Simon Wilkinson Date: Sun Nov 20 16:29:55 2011 +0000 rx: Refactor MaxMTU error checking The error checking on the rxMaxMTU parameter was done individually by every server that sets it, using "internal" RX #defines to do so. Instead, do the error checking within the function that actually sets the MTU, reducing both the amount of code duplication, and the amount of RX knowledge held within the servers. Reviewed-on: http://gerrit.openafs.org/6091 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry picked from commit 1c4cd446605706e55e415cec15841acf8b1572e1) Change-Id: I2cebf40ecf088653a90d1b05fc6348ada5a80bd1 Reviewed-on: http://gerrit.openafs.org/6200 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c901201fc4f31de44e4694c59416ed26d46720a Author: Jeffrey Altman Date: Fri Dec 2 18:49:23 2011 -0500 Windows: GetInfoTip really set return to NULL When we are not returning an info-tip string from the shell extension the string output parameter must be set to NULL. Reviewed-on: http://gerrit.openafs.org/6183 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9de84a1e67cb3570dedef4ac4552901210b19e5f) Change-Id: I6cb47f9f89a05599adee9cbe4b55aea7fae65ee1 Reviewed-on: http://gerrit.openafs.org/6192 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc53c36a1d9b5087c2bf60b0e06575e3b31896ef Author: Jeffrey Altman Date: Fri Dec 2 13:41:38 2011 -0500 Windows: memset in RDR_RequestFileExtentsAsync The logic in RDR_RequestFileExtentsAsync() made it possible for memset() to be called multiple times on a buffer that is already known to be up to date. Restructure the code to make things faster. Reviewed-on: http://gerrit.openafs.org/6178 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 3fce5b3541d118bc452fe236e557acde57587462) Change-Id: I7dbf4615a8c0b6e0311d19fc88f82b90de4d7f32 Reviewed-on: http://gerrit.openafs.org/6191 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4368712221226a7ce045c2b723779959a3c80e98 Author: Jeffrey Altman Date: Fri Dec 2 13:36:01 2011 -0500 Windows: cm_MergeStatus redirector invalidation The redirector maintains its own cached status information which must be updated when a DV change occurs that is not the result of a redirector initiated data change. If the current old DV is BAD, send a DV change notification. If the DV has changed and request was not initiated by the redirector, send a DV change notification. If the request was initiated by the redirector, send a notification for store and directory operations that result in a DV change greater than the number of active RPCs or any other operation that results in an unexpected DV change such as FetchStatus. Reviewed-on: http://gerrit.openafs.org/6177 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a60594ef54c1458f6778d0b16d870803e1594d41) Change-Id: Iec392ba0be7e2e8a7273fe426af20fafe69a8e38 Reviewed-on: http://gerrit.openafs.org/6190 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ff267ca46d577d146195c91d8465e37302a415cb Author: Jeffrey Altman Date: Fri Dec 2 13:31:15 2011 -0500 Windows: cm_MergeStatus use new DV to purge buffers When deciding whether or not to purge buffers on a DV change it is the new DV that matters not the old DV. If the new DV is 0, there should be no purging because there are no buffers to purge. Reviewed-on: http://gerrit.openafs.org/6176 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2a2ae16511bae032025ffcfbbe4e78b2de1f8eff) Change-Id: Ibe466308cc44a0bee929d3eb79041e38a6db76d9 Reviewed-on: http://gerrit.openafs.org/6189 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bf424b05c6895371e07b9b36172e858f3c804af4 Author: Jeffrey Altman Date: Fri Dec 2 13:21:24 2011 -0500 Windows: use interlocked increment on cm_buf_t refcnt For consistency use interlocked increment when setting the cm_buf_t refCnt to 1 even though it is protected by a lock. Reviewed-on: http://gerrit.openafs.org/6175 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6ee14eef3679fbcdecfe6b1d7879309c9360bb61) Change-Id: I99e6e2e1f3b1131be53960b1b1a0ba551a8f723a Reviewed-on: http://gerrit.openafs.org/6188 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 89fd45e672eeed0bfe7aae36d21cdf15719595cd Author: Jeffrey Altman Date: Fri Dec 2 11:21:46 2011 -0500 Windows: buf_GetNewLocked should use cleaned cm_buf buf_GetNewLocked() searches the free buffer list for a buffer that has a 0 refcnt, is not in the chunk that is being populated, is not actively having I/O performed on it and is not dirty. If it comes across a dirty buffer, it calls buf_Clean() with the assumption that buf_CleanAsync() (as it was previously called) was in fact asynchronous and would return immediately. Instead buf_Clean() is synchronous and when it completes the buffer will in most cases be clean. buf_GetNewLocked() should use the newly cleaned buffer if it is still available and not continue the search from the next entry in the free buffer list. Reviewed-on: http://gerrit.openafs.org/6174 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 500ffccfd66123c74a0d32c04801e5906f58e58a) Change-Id: Ie1f5fad42a24cec15a9510411cb212312be34624 Reviewed-on: http://gerrit.openafs.org/6187 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 54ece1c90313ac99e2be559f9ce944b8e3d6b51a Author: Jeffrey Altman Date: Fri Dec 2 11:19:13 2011 -0500 Windows: fix buf_Recycle() comment buf_Recycle() does not return with a reference count to the cm_buf_t object held. Correct the comment. Reviewed-on: http://gerrit.openafs.org/6173 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7dccf17840a53e96b21f8c092910f3e4d7628b71) Change-Id: Id29fca95455be4200748845151da6a0c51b767c9 Reviewed-on: http://gerrit.openafs.org/6186 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bb13f1a3fb54eba1982395544dc64de8e2486a5e Author: Jeffrey Altman Date: Fri Dec 2 11:14:11 2011 -0500 Windows: buf_CleanAsync is not async; rename it buf_CleanAsync() calls cm_BufWrite() which stores the dirty buffers synchronously. There is nothing asynchronous about buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked() to buf_CleanLocked(). Update the comments to remove the references to the asynchronous processing which doesn't exist. That is not to say that the call to buf_Clean() in buf_GetNewLocked() should not be asynchronous; it should. There is no such functionality at the moment. One approach would be to modify buf_IncrSyncer to trigger on an event set by buf_GetNewLocked() instead of the call to buf_Clean(). Another approach would be registering a background store event. In any case, that is for another patchset. Reviewed-on: http://gerrit.openafs.org/6172 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c712403f192bd9932f3ec1dce5fb23461d3d0349) Change-Id: I4baf6425cd3d7c8b6d2a32ea1fac29431d3a0259 Reviewed-on: http://gerrit.openafs.org/6185 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0a3ff374b935e03cc36c82c3813e1302b3edda7f Author: Jeffrey Altman Date: Fri Dec 2 11:11:59 2011 -0500 Windows: convert buf_IncrSyncer to pthreads buf_IncrSyncer() calls rx therefore it should be a pthread thread so as not to count against the 63 native thread count limit. Reviewed-on: http://gerrit.openafs.org/6171 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b26161284fef682e570377e70c7ebe5b6e8902fb) Change-Id: I5d4257a682a2a7cacd1aaf237ce1d4cae02633d0 Reviewed-on: http://gerrit.openafs.org/6184 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8c5c9af6a129bbcae877a575f3f988327c78bd6a Author: Jeffrey Altman Date: Wed Nov 30 23:29:56 2011 -0500 Windows: invalidate rdr for CM_SCACHE_VERSION_BAD If the cm_scache_t.dataVersion is set to CM_SCACHE_VERSION_BAD, invalidate the redirector notion of status so that we do not leak info to users that do not have permission. If the dataVersion is CM_SCACHE_VERSION_BAD and is updated with real status info, invalidate the redirector so it attempts to read the directory contents. Reviewed-on: http://gerrit.openafs.org/6159 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2aeb041bb0f5de94d553bc3fb6b2d39c82750952) Change-Id: Ieb597c3ea8c82e648563d1be7b8f588caad24eda Reviewed-on: http://gerrit.openafs.org/6170 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7d8f8457838cf75754a77dbe1e784b82bc86f8a Author: Jeffrey Altman Date: Wed Nov 30 23:28:46 2011 -0500 Windows: do not set CM_SCACHEFLAG_EACCES twice correct a merge error. Reviewed-on: http://gerrit.openafs.org/6158 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 79833cbc64c8ccd051060782a381af1ad0cc8d50) Change-Id: I2e45868ea765bc9236a018d8ea5a4cab758089cc Reviewed-on: http://gerrit.openafs.org/6169 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af10833f91902f84a410cf9df1d899640fcbf85d Author: Jeffrey Altman Date: Tue Nov 29 15:02:12 2011 -0500 Windows: AFSRDFSProvider log to file For when logging via OutputDebugString() is insufficient, add a cheap method of logging to a fixed file: c:\temp\AFSRDFSProvider.log. Set AFSRedirector\NetworkProvider "Debug" to 0x2. Reviewed-on: http://gerrit.openafs.org/6142 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0c01c36245c53db93ec6418b2b7ff7f679181765) Change-Id: Ie5b08202ea80f84a0ba4f9ec7a3fe958ba9a4335 Reviewed-on: http://gerrit.openafs.org/6156 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 227ea038da261ecb727a6748c1414af91e5cfb94 Author: Jeffrey Altman Date: Tue Nov 29 15:01:00 2011 -0500 Windows: NPEnumResources no Printer support The AFS Redirector does not support printer shares. If the query is for printers only (or any other query that does not permit disk shares as a response) return no more entries. Reviewed-on: http://gerrit.openafs.org/6141 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 7ba9129141387e7c24a695a94fb602df368e3917) Change-Id: I09b44507a8244cbbc68cee0d40f4aed73a997a43 Reviewed-on: http://gerrit.openafs.org/6155 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 044f3509524671aee45729caa56f71ef3c991222 Author: Jeffrey Altman Date: Tue Nov 29 14:59:24 2011 -0500 Windows: NPGetConnectionCommon buffer too small If the specified buffer size is too small, say so. Do not attempt to copy data in that won't fit. Do not walk beyond the end of the allocated memory. Reviewed-on: http://gerrit.openafs.org/6140 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 31d80e64683a6e7ce33ab714759e74a18454110d) Change-Id: If4ecbf984866b02ac08645eafa291b4f99f16d8c Reviewed-on: http://gerrit.openafs.org/6154 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 400c9b94a690cd8fc6ac58d1814e9af5379a11ce Author: Jeffrey Altman Date: Tue Nov 29 14:55:55 2011 -0500 Windows: no drive subst for NPCancelConnection NPCancelConnection() must use the results of a Get Connection ioctl to the afs redirector and not the result of Drive Letter Substitution queries via DosQueryDevice(). Rename NPGetConnection() to NPGetConnectionCommon() and add a new parameter to indicate whether drive substitution is ok. Reviewed-on: http://gerrit.openafs.org/6139 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 9fa28d7df3034600026aacbfb902a4f92446253b) Change-Id: Ic10023981cafe49b59fd970bedac5b6e444db352 Reviewed-on: http://gerrit.openafs.org/6153 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit af8f1147865007efdc5ab49ac4bb0626b9d288a8 Author: Jeffrey Altman Date: Tue Nov 29 14:54:24 2011 -0500 Windows: refactor NPCancelConnection refactor NPCancelConnection to consolidate some conditional blocks to improve readability. Reviewed-on: http://gerrit.openafs.org/6138 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit abfa8f00293780fd751ba8de3ee4ce6cbdb00e90) Change-Id: I4b76f8bde6781b7ac92202cd8c0ac842d35cdc08 Reviewed-on: http://gerrit.openafs.org/6152 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 759eb9c897c4d6d6c6728556b4dc03a09c70a104 Author: Chris Orsi Date: Sat Nov 26 17:26:10 2011 -0500 Windows: Mount Point and Symlink Overlay Icons Reviewed-on: http://gerrit.openafs.org/6137 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit d6900a7cd1722648f4107f82d0d74d01f6da1810) Change-Id: I96f73a105564a4232b6e0e0df88298017e656a34 Reviewed-on: http://gerrit.openafs.org/6151 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9d7835f7803bc227d59c8ee2aff828d2b53d4179 Author: Jeffrey Altman Date: Mon Nov 28 18:42:21 2011 -0500 Windows: Wix disable integrated logon by default One of the significant differences between the NSIS and Wix installer packages is that NSIS does not activate integrated logon by default whereas the Wix installer does. Enabling integrated logon without configuring the cell, CellServDB, installing Kerberos v5 and configuring krb5.conf can result in a very long wait at logon. Now that NSIS is no longer being supported and cannot be supported as a native 64-bit installer mechanism we must disable integrated logon by default to prevent more bad end user experiences like @Lotterleben described on Twitter. Reviewed-on: http://gerrit.openafs.org/6132 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit bd7cecb3277b2980a880c68e70a7ca761285347c) Change-Id: Ibf9b8891991dc4f56242ce5506e2e2ed2b0f9e31 Reviewed-on: http://gerrit.openafs.org/6150 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e33c43af8c261ad5364bbe035e39303ccfa18848 Author: Simon Wilkinson Date: Sun Oct 23 21:21:39 2011 +0100 rx: Use a red black tree for the event stack Instead of the current event stack, which uses a sorted linked list, use a red/black tree to maintain the timer stack. This dramatically improves event insertion times, at the expense of some additional implementation complexity. This change also adds reference counting to the rxevent structure. We've always had a race between an event being fired, and that event being simultaneously cancelled by the user thread. Reference counting avoids that race resulting in the structure appearing twice in the free list. Reviewed-on: http://gerrit.openafs.org/5841 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 043c31bf8d81f5aba968f69c613b639e1d0e3ee7) Change-Id: Id3979110abb01c17855e6cd6a7d63dfd55919fb2 Reviewed-on: http://gerrit.openafs.org/6149 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit beac4280f913cf9410ba7eca313bdca64f69cbbd Author: Simon Wilkinson Date: Fri Nov 11 09:33:31 2011 +0000 Unix CM: Build rbtrees in kernel Build the new opr rbtree code in the Unix kernel module Reviewed-on: http://gerrit.openafs.org/5842 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a9682775fcb047e4bcd3994d582ada430d28e264) Change-Id: I74312f89d4e02e6dc243f7fbb2266812d51aed39 Reviewed-on: http://gerrit.openafs.org/6148 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4db63088e72a75a128746d8334aae3271e23b4b8 Author: Andrew Deason Date: Tue Nov 29 12:07:49 2011 -0600 udebug: Fix endianness when fudging lastYesHost hostAddr is in NBO, lastYesHost is in HBO. Reviewed-on: http://gerrit.openafs.org/6136 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 073edd3fbdf442249920acea8f3ee90b6346bf23) Change-Id: I23c9590124f0a38364b1f903e398dcd576fab937 Reviewed-on: http://gerrit.openafs.org/6147 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 10a85f50af8c4d6e8396387a33893671a6fc3df8 Author: Jeffrey Altman Date: Mon Nov 28 19:15:33 2011 -0500 Windows: FSync not CleanVnode during Cleanup cm_FSync() is buf_CleanVnode() plus a sync of metadata which is required during last handle close. FIXES 130351 Reviewed-on: http://gerrit.openafs.org/6134 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 82809787d5addcec4a64ce71bb5b7d389ee4623b) Change-Id: Ieab8b688316d25c09f9cdbafe4d6f23aef1b0224 Reviewed-on: http://gerrit.openafs.org/6146 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1da2af863a25b332f8f676fa2c7ece9c1a3d52bb Author: Jeffrey Altman Date: Mon Nov 28 18:45:55 2011 -0500 Windows: Wix cell names can be greater than 120 chars Increase the permitted length in the UI to 255 characters. Reviewed-on: http://gerrit.openafs.org/6133 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit bf4f9f33dc55150d991d9eec4ea95d78208f6949) Change-Id: Ib2d3b313269de59b9b31531bcb76587dd0c625ef Reviewed-on: http://gerrit.openafs.org/6145 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da41789b7ce26c95d5158a144a89a2ddc81bfa07 Author: Jeffrey Altman Date: Mon Nov 28 15:13:43 2011 -0500 Windows: cache format version change With the change to the size of the osi_mutex_t and osi_rwlock_t structures the CM_CONFIG_DATA_VERSION must change to force a reconstruction of the cache file. Reviewed-on: http://gerrit.openafs.org/6131 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 006815ca2f4df1ed5236fc377da2647895853b0a) Change-Id: I375758d0c72f8a3c7726a960d3c780d411a25076 Reviewed-on: http://gerrit.openafs.org/6144 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8d3a40be0dba3fb5835ff476d4cf16fd3f81ad99 Author: Jeffrey Altman Date: Sat Nov 26 17:26:50 2011 -0500 Windows: osi_mutex / osi_rwlock changes Reorganize the osi_mutex and osi_rwlock structure so that all counters are 32-bit and pointers are aligned. This requires adding padding fields. Move lock validation checks within the critical section. Include additional assertions checking the ownership state and protecting against under/overflows. Increase the size of the rwlock tid array to support a larger number of simultaneous readers. Reviewed-on: http://gerrit.openafs.org/6130 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit a07338f4ccc5062e224405ccda0c9ed41e666f5e) Change-Id: I5bfd2ceaefef5b18fb41a7a84c4ccff07d28ac1f Reviewed-on: http://gerrit.openafs.org/6143 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3d5f9d5e1dbf970c2fa8ca910c7127a1ca7d05af Author: Jeffrey Altman Date: Sat Nov 26 10:55:27 2011 -0500 Windows: convert daemons threads to pthreads The daemon threads make calls to Rx and therefore need to be created with the pthread package to prevent the threads from being tracked as 'native' threads by the pthread_thread_shutdown thread which can only track up to 63 native threads. Reviewed-on: http://gerrit.openafs.org/6119 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5d7adc6b67dedf0dc888196812e66b131cf91bbc) Change-Id: Iead37a1c79ba0321c44d3e5ba052c193825ee559 Reviewed-on: http://gerrit.openafs.org/6129 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 98fe9a2bc86089253d5420245130f2fd0dcb0db2 Author: Jeffrey Altman Date: Tue Nov 22 09:31:45 2011 -0500 Windows: add trace logging to Pioctl File Info Query Reviewed-on: http://gerrit.openafs.org/6110 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 53d55cf35327ec08c2f2ed5dea4138cdc2d46de7) Change-Id: Ia8d653927bf299c16176b1218cf711d5ef9c4c95 Reviewed-on: http://gerrit.openafs.org/6115 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c2e384384ab93b413a4500b44573cfaa9554d624 Author: Jeffrey Altman Date: Tue Nov 22 16:36:18 2011 -0500 Windows: _._AFS_IOCTL_._ size is zero When replying to a FileStandardInformation query on the pioctl special file, the size of the file is 0. Failure to return 0 can result in an anti-virus program attempting to read the file via a paging request which will fail. Reviewed-on: http://gerrit.openafs.org/6109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 030157166795628bbfa81e8b4b7ede35dfead8d0) Change-Id: Ib2790df4a760156d0cdf457776dbaf7dd5e2f086 Reviewed-on: http://gerrit.openafs.org/6114 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2c9517d47bc5a9d7f8b1bc5b7e48105aeb786b3c Author: Jeffrey Altman Date: Mon Nov 21 21:47:38 2011 -0500 Windows: RDR_InvalidateObject do not hold locks Do not hold any locks when calling the afs redirector. Holding a lock can cause a deadlock. Reviewed-on: http://gerrit.openafs.org/6105 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 039ffe2a036217e7d23c7466c77b69df50a603f7) Change-Id: I8518ff1752bb2a0d9b73d23d9c78e6964512eb25 Reviewed-on: http://gerrit.openafs.org/6113 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9f2ef0caea292928cfaae0d14702be493d0908e Author: Jeffrey Altman Date: Mon Nov 21 13:14:40 2011 -0500 Windows: cm_GetSCache do not release unheld lock if cm_GetNewSCache() fails, an attempt would be made to release cm_scacheLock which is not held. However, it should be noted that cm_GetNewSCache() cannot fail without itself triggering a panic. Reviewed-on: http://gerrit.openafs.org/6103 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit d42db13152fb8fa374db6531020da6effca51ab4) Change-Id: I7c125a117591805b62439dad95ba7e597c574bc6 Reviewed-on: http://gerrit.openafs.org/6112 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f33b597dbcd6112a9676b47660a91573ed643da0 Author: Jeffrey Altman Date: Mon Nov 21 08:42:13 2011 -0500 Windows: Use Jenkins' Hash Replace the non-string hash functions with Jenkins' Hash derived hash values. Bump the cache version value because the hash function has changed. Reviewed-on: http://gerrit.openafs.org/6102 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 887791bacf8a1b39a610734e5c27c55f88513750) Change-Id: I5bfde25d408844b8105454d49efebde211b274f7 Reviewed-on: http://gerrit.openafs.org/6111 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da77380f3c3899ebc0d5e39478d2de6a9c8eb07d Author: Michael Meffie Date: Thu Oct 27 17:53:47 2011 -0400 auth: avoid excessive stat of cellservdb The modified time resolution is one second, so only stat the cellservdb file at most only once per second. Reviewed-on: http://gerrit.openafs.org/5743 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af) Change-Id: If7358da6cae712b5cc6773a80bbb5e8206c39fd6 Reviewed-on: http://gerrit.openafs.org/6107 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8b224986ebd5b2805e81103adc4d041527ec1f60 Author: Simon Wilkinson Date: Sun Nov 20 23:40:51 2011 +0000 opr: Add Bob Jenkins's hash functions This imports a small subset of Bob Jenkins lookup3.c hash functions into the opr library. At present we only import the subset of this that deals with aligned arrays of integers, as this addresses our immediate need. It seems likely that if we're interested in a hash function for string arrays (or other arbitrary data), that more recent functions such like SpookyHash (from Bob Jenkins, again) or CityHash (from Google) may be a better solution. The immediate use case for this is removing the use of the '%' operator when indexing speed critical hash tables, as well as ensuring fairer distribution of entries across these tables. A short set of test cases is also provided Reviewed-on: http://gerrit.openafs.org/6095 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 20448059f02d07eccf7f81fdb55b80e566acfecc) Change-Id: I53f3a78f416d1893b16498f412d9aaa85db78ad3 Reviewed-on: http://gerrit.openafs.org/6106 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 536cd4c038b61e7ebe0591015230ad56d5545336 Author: Jeffrey Altman Date: Fri Nov 18 12:12:22 2011 -0500 Windows: Version 1.7.2a (1.7.0201) Change-Id: I851e400e18907db5a3fc490838c0b275ced5e2af Reviewed-on: http://gerrit.openafs.org/6077 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4e6e3dcb03a085addb23406b823626d036a554a0 Author: Jeffrey Altman Date: Fri Nov 18 09:54:43 2011 -0500 Windows: RDR_RequestFileExtentsAsync unheld lock commit 55f5f356af2ef884413bd656f100055741ae871b forgot to remove a lock_ReleaseWrite(&scp->rw) in RDR_RequestFileExtentsAsync(). Reviewed-on: http://gerrit.openafs.org/6075 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 8ce811e34379615f942e9ca73d1ba78bfe742042) Change-Id: Iae6202820f80637909b053b89a7f3ea79fb4ebdf Reviewed-on: http://gerrit.openafs.org/6076 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21c4adde592218daba0ce67b6ca8f71f511ad054 Author: Jeffrey Altman Date: Fri Nov 18 00:39:24 2011 -0500 Windows: must obtain and release an actual lock Reviewed-on: http://gerrit.openafs.org/6072 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit ac1251ead12434a12fb8e7d6787845f534565039) Change-Id: Ie5b3823e7a1fbb4d384d40d42eae78e79fa84a88 Reviewed-on: http://gerrit.openafs.org/6074 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8b72931b4062b29c17e51ec53621203f67658795 Author: Jeffrey Altman Date: Thu Nov 17 00:30:24 2011 -0500 Windows: non-release only worker threads can release There are two classes of worker threads created by the service and donated to the afsredir as part of the reverse ioctl processing model. Normal workers can process any kind of ioctl and Release Only workers that can only process release extent events. Use a KeWaitForMultipleEvents in the normal worker case to permit processing any type of event. The previous implementation excluded release extent ioctls from the normal workers. Reviewed-on: http://gerrit.openafs.org/6071 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 1379fb6de4d2134160fcc95cbbee4bd6048eaeaa) Change-Id: Ifc04af699cdea776e56f5f8a64b5372e79c969a1 Reviewed-on: http://gerrit.openafs.org/6073 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 16c470c62ddbdc596b497882d6c4405e30dc6cd8 Author: Jeffrey Altman Date: Wed Nov 16 14:06:36 2011 -0500 Windows: Version 1.7.2 (1.7.0200) Change-Id: I0172a96f0c68bd4b5e069c333942eb79c7fa38f1 Reviewed-on: http://gerrit.openafs.org/6070 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c53280f2d8a34982c1cbd620e4b5e1986d5d9348 Author: Jeffrey Altman Date: Wed Nov 16 14:01:11 2011 -0500 Windows: 1.7.2 Change Log Change-Id: I976c821e80343f85c5f41a033adb7ee41f285dd5 Reviewed-on: http://gerrit.openafs.org/6069 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ffb98152c7c3329de971799d3bc510e671638283 Author: Jeffrey Altman Date: Wed Nov 16 00:29:34 2011 -0500 auth: initKeys before first error exit path In afsconf_OpenInternal() _afsconf_InitKeys() must be called before the first opportunity to call afsconf_CloseInternal() or a crash can occur if the CellServDB file cannot be parsed. Reviewed-on: http://gerrit.openafs.org/6059 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 833d076e04ac09270a203a9ff449ae2af8bdad7e) Change-Id: Id9a734e896c663f3159de6f38744df98343bf77a Reviewed-on: http://gerrit.openafs.org/6068 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ecc9f50577ad43de20bed850d1e28cddeee734a Author: Jeffrey Altman Date: Wed Nov 16 10:33:41 2011 -0500 Windows: Do not install IBM AFS HLP files The IBM AFS HLP files are so out of date at this point that they are simply confusing. They reference tools and screens that no longer exist and claim the product is "IBM AFS". Incorrect documentation is worse than no documentation. The HLP files cannot be updated since we do not have the sources. HLP file format is no longer supported on Windows Vista or 7. The afs-nt.hlp file will continue to be installed conditionally when afscreds.exe is installed but the shortcut to it in the Start menu is being removed. afscreds.exe is not installed by default. Reviewed-on: http://gerrit.openafs.org/6065 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 1c97c04add6639a11e88d412e369771bf6f0f281) Change-Id: Ia3dcda194d8ec7b2253d3c7023c766d61ce567bb Reviewed-on: http://gerrit.openafs.org/6066 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b28e843ee3e3229ae79e4da7d0b01ace133bd0f5 Author: Jeffrey Altman Date: Tue Nov 15 18:35:26 2011 -0500 Windows: buf_CleanAsyncLocked dirty range only buf_CleanAsyncLocked() should not instruct cm_BufWrite() to write a full chunk if the current buffer is the only one that is dirty. cm_BufWrite() will determine if it is appropriate to fill a full chunk when storing. Instructing it to check a full chunk forces it to do more work than necessary. Reviewed-on: http://gerrit.openafs.org/6054 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit fd42e08bf1882a02c3200e1c33a101e644aa046a) Change-Id: I4fadbf00ac2adb3dd1ce78118d4fe5170156d501 Reviewed-on: http://gerrit.openafs.org/6064 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d84937a30952c544ebfc3aef28797407807830aa Author: Jeffrey Altman Date: Tue Nov 15 18:23:46 2011 -0500 Windows: create scache->redirMx to reduce contention Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue* results in a large amount of contention between processing extent requests and releases from the afs redirector and the threads attempting to read from or write data to the file server. There is no reason why the same lock must be used. Allocate a dedicated mutex to protect the queue. By placing the new mutex after the buf_globalLock in the locking hierarchy it permits the lock acquisition logic for extent processing to be simplified further reducing cm_scache_t.rw lock transitions. Reviewed-on: http://gerrit.openafs.org/6053 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 55f5f356af2ef884413bd656f100055741ae871b) Change-Id: Ic52bb0063e764c67f22783b4de2fdfaad90d374a Reviewed-on: http://gerrit.openafs.org/6063 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e88c69dec8aff4bd3fb5d012a99ea0b4f9a31e2d Author: Jeffrey Altman Date: Tue Nov 15 19:03:14 2011 -0500 Windows: Increase default number of daemon threads With the SMB interface there was little benefit to having a large background daemon worker pool since it was so rarely used. Now that the redirector does everything in the background daemon workers, increase the default from 4 to 16 threads. Reviewed-on: http://gerrit.openafs.org/6058 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 042f6c08e3be0af3ef1cc4a0bfc4688c3e2ef7d0) Change-Id: I32705d0787719f0196eac5a5ff1e87bde26e1768 Reviewed-on: http://gerrit.openafs.org/6062 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a2a437f60773913bf011d688c24dd296c73d71c5 Author: Jeffrey Altman Date: Tue Nov 15 19:00:05 2011 -0500 Windows: cm_SetupStoreBIOD use firstModOffset chunk When cm_SetupStoreBIOD attempts to store a chunk to the file server it should not use *inOffsetp as the start of the range. There is no guarantee that the buffer at *inOffsetp is dirty. Instead use firstModOffset which refers to the first known dirty buffer in the range specified by the caller. Attempt to fill a chunk of consecutive dirty buffers from that point. Reviewed-on: http://gerrit.openafs.org/6057 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b) Change-Id: I790e06790702b19c74e27e92a11112be669286c1 Reviewed-on: http://gerrit.openafs.org/6061 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a30a3b7cb5e6185ccde0a7c4ec7c527842c1dadf Author: Jeffrey Altman Date: Tue Nov 15 18:40:21 2011 -0500 Windows: Fairness for background operations The background daemon worker pool is responsible for processing background Store and Fetch operations. With the SMB interface primary store and fetch operations are performed in the SMB worker thread which makes sense since those operations must be synchronous to the incoming request. With the AFS redirector interface almost all of the work is performed by the background daemon worker pool. It is therefore critical that the workers not get stuck in a state that starves applications. For example, copy of a file that is larger than the cache to \\AFS will result in a background store request for each chunk size of the file. If each worker thread grabs one to process, only one will make progress and the rest will block. If a cleanup operation (aka handle close) occurs the entire file will be flushed to the server synchronously in the redirector worker thread. That thread will cause of the background daemon threads to block. Any subsequent fetch data requests that get queued behind the list of stores will in turn block until they clear. This behavior is not fair. This patchset adds a new test to the cm_BkgDaemon() request selection loop, cm_RequestWillBlock(). If a request will block it is skipped. If there are no requests to process that would not have blocked, the worker will sleep for 25ms instead of the usual 1s. For BkgStore operations, the CM_SCACHEFLAG_DATASTORING flag is used to indicating a blocking state. For BkgFetch and PreFetch operations, the CM_BUF_WRITING and CM_BUF_READING flags on the first cm_buf_t of the range is used to indicate a blocking state. Reviewed-on: http://gerrit.openafs.org/6056 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit c904d9a3889b7dd8c8795feaa9e5e4979f681f53) Change-Id: I2490f2c45b86a17cdd5bf4a86529f87509bc83ad Reviewed-on: http://gerrit.openafs.org/6060 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cc6f1c6ef0a16dc351267ad8c3a0129109d300ef Author: Jeffrey Altman Date: Tue Nov 15 09:03:59 2011 -0500 Windows: Create default Security Descriptor A misplaced #endif prevented the allocation of a default security descriptor. This results in STATUS_INSUFFICIENT_RESOURCES errors. FIXES 130284 Reviewed-on: http://gerrit.openafs.org/6048 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit a1871449eec8d9fc1152319bc63e29db7f9ae231) Change-Id: I9c1d67368a1b5d770a4c9a981bdb4a24f8ad3c8e Reviewed-on: http://gerrit.openafs.org/6049 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5db5466feff51b6792c8569138514bbbcc4ec6b4 Author: Jeffrey Altman Date: Mon Nov 14 17:49:45 2011 -0500 Windows: interlocked refCount increment in cm_GetSCache Failure to use interlocked operations in cm_GetSCache can result in an under count Change-Id: I370bcb9ac8b40f1c1b7ea3b7647fc76e3a554e2c (cherry picked from commit c4d19e5d4271a31fd29c111fb27d145dc83b83b7) Reviewed-on: http://gerrit.openafs.org/6047 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d887868cc7435e29864ab566de1792f00e046f04 Author: Jeffrey Altman Date: Mon Nov 14 10:23:53 2011 -0500 Windows: netidmgr krb5_cc_get_principal can fail Do not dereference a NULL pointer if krb5_cc_get_principal fails. On master this bug is fixed by e55d1774b1b5b27a3617467b5e2a24ee2be3a38c but that change is after the conversion to the Kerberos Compatibility SDK and cannot be applied to openafs-devel-1_7_x at this time. Change-Id: Iffb31330ea022a4f75728ff2da657029c56d61d8 Reviewed-on: http://gerrit.openafs.org/6018 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b2e58559cf453c80d4b9800dac4bf4adb0ad345b Author: Jeffrey Altman Date: Sun Nov 13 00:40:54 2011 -0500 Windows: missing braces in AFSFSControl Change-Id: I008b03f26bf52a38296e6a009535ea5267fc8f3b Reviewed-on: http://gerrit.openafs.org/6017 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 55910eddee4adf6512ba0d8664e0db188c8c0cc9 Author: Jeffrey Altman Date: Sat Nov 12 18:33:18 2011 -0500 Windows: smb_ReceiveNTCreateX create smb_fid earlier smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now requires the smb_fid_t allocated fid value for use in share mode locking. Move the allocation of the smb_fid earlier in the function and apply necessary cleanup in error paths. Reviewed-on: http://gerrit.openafs.org/6004 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839) Change-Id: Ife9d93672681d92da7ca7f89536d4a12bd177084 Reviewed-on: http://gerrit.openafs.org/6015 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e699ac3fa840fdcc2e31060fdcb91924708ce946 Author: Jeffrey Altman Date: Sat Nov 12 17:32:06 2011 -0500 Windows: cm_GetSCache avoid holding cm_scacheLock cm_GetSCache used to hold cm_scacheLock write-locked from start to finish except that it didn't. There were several places where cm_scacheLock was dropped and reacquired due to lock ordering requirements. Unfortunately, this has two problems. First, the function isn't very fast in the most common case since cm_scacheLock is write-locked for the search for an existing FID. Second, there is a race that results when cm_GetNewSCache() drops the cm_scacheLock. To make things faster, use a read-lock for the common case. To avoid the race, if the FID cannot be located, call cm_GetNewSCache() first and then obtain the cell and volume information. Then perform a second lookup for the FID while holding cm_scacheLock write-locked. If we lost the race or there was an error obtaining the cell and volume info, put the new cm_scache_t back onto the end of the LRU queue. Reviewed-on: http://gerrit.openafs.org/6003 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5c59d1b500ae4ba5223184fbfe18837891ea30c3) Change-Id: Ifcaf015b4105487fa3de123636f1d9aacbbb482a Reviewed-on: http://gerrit.openafs.org/6014 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47ffcafc23f8747870d1d349572dce8594ee57c3 Author: Jeffrey Altman Date: Sat Nov 12 17:24:12 2011 -0500 Windows: avoid null ptr in RDR_RequestFileExtentsAsync If the cm_scache_t cannot be obtained, do not dereference it while returning an error to the redirector. Reviewed-on: http://gerrit.openafs.org/6002 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit eb3c9f783b9488181c57ef949e3feddcb02d381a) Change-Id: Ide78420779869ed31c3909983f16ead546a333d8 Reviewed-on: http://gerrit.openafs.org/6013 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c8fc90e25476fb439d7abaa2a9041266f45b2fcb Author: Jeffrey Altman Date: Sat Nov 12 13:45:08 2011 -0500 Windows: Track active RPCs per scache_t It has been noticed that multiple RPCs can be active on a cm_scache_t object at the same time. This is especially true of directory objects with the redirector. Track the number of active RPCs and use that number in cm_MergeStatus when deciding whether or not to discard the cached data for the object. Reviewed-on: http://gerrit.openafs.org/6001 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 090f6279c5496f648893606d298c698f376c7ae0) Change-Id: Idc2d97998c274a130bee7666180f35016d575b0b Reviewed-on: http://gerrit.openafs.org/6012 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit dd1eb21a90e43db2650751ca01aab6ee5a32cbd8 Author: Jeffrey Altman Date: Sat Nov 12 13:41:30 2011 -0500 Windows: fix locking hierarchy in service The smb username lock and the daemon global lock can be requested while the scache dirlock is held if there are no free buffers and the service is forced to claw back extents from the redirector. Adjust the locking hierarchy accordingly. Reviewed-on: http://gerrit.openafs.org/6000 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f) Change-Id: Ib6ca9a44e626613c44f79fc3a59dcd2adaeb1dc8 Reviewed-on: http://gerrit.openafs.org/6011 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e2ca5877bc6566110e40ef20b40d61e24040e6ad Author: Andrew Deason Date: Wed Nov 2 16:55:49 2011 -0500 afs: Do not use separate array for srvAddrs The array of srvAddr structs we use in afs_LoopServers have indices unrelated to the indices of conns, rxconns, etc. Several places were assuming that addr[i] corresponded to conn[i], which is not necessarily true. So instead, do not use the separate addr array (except when populating the conn and rxconn arrays), and just get the srvAddr structure by going through the relevant conn[i]. Reviewed-on: http://gerrit.openafs.org/5790 Reviewed-by: Marc Dionne Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit f199ac666195771a02e3ebb040c6e5fe47c58c58) Change-Id: Ib6605ee02964fc8215774d9b45846ac4c07fa636 Reviewed-on: http://gerrit.openafs.org/6010 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a9745a9273628fdada422d5ed922388fb624d232 Author: Simon Wilkinson Date: Sat Oct 22 16:37:04 2011 +0100 rx: Turn the rxevent_Cancel macro into a function Turn rxevent_Cancel into a function rather than a macro which modifies its argument as a side effect. rxevent_Cancel now checks whether the event being cancelled is already NULL, as well as NULLifying the event when it is actually cancelled. Update all of the callers to reflect this new API, and so they no longer do unecessary work. Reviewed-on: http://gerrit.openafs.org/5840 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a7d569c857234626191514e2780368e1b85a6dae) Change-Id: I0bd60d47eea41d9181e136c3a3cd42b0ade3955c Reviewed-on: http://gerrit.openafs.org/6009 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2b192f51fc05762322ad0b2c938ce0c614cabca9 Author: Simon Wilkinson Date: Sat Oct 22 16:22:36 2011 +0100 rx: New signature for rx event functions For a while now, we've had both new and old-style rx event callback functions. Modify all of our event handlers, and the functions that install them, to use only new style functions, and get rid of the old-style function prototypes. Reviewed-on: http://gerrit.openafs.org/5839 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit be8db58f5a44ce2ee4208de09a5ca1faf6f0f91f) Change-Id: I904c1a49ea3bf18244ea2eb908ca3a7d7394e7ff Reviewed-on: http://gerrit.openafs.org/6008 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 91dc31974626e7cb083b821c5ea4dddce8780f36 Author: Simon Wilkinson Date: Sat Oct 22 11:22:51 2011 +0100 opr: Add a red/black tree implementation Add an implementation of red/black trees to our runtime library. This is originally derived from the FreeBSD macro-based rbtree implementation, but is heavily reworked to not use macros, to improve legibility, and to favour speed over structure compactness. A test suite is provided in tests/opr/ Reviewed-on: http://gerrit.openafs.org/5838 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 5574ff814f02078b709cbc0a6c94201ca6fe2eca) Change-Id: I1b70886c40db41fbbdc56b2374fb554c772e1b96 Reviewed-on: http://gerrit.openafs.org/6007 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 47a5e7bca67f454780928e800a4ce93296f0e8e0 Author: Simon Wilkinson Date: Sat Oct 22 11:10:53 2011 +0100 rx: Add a helper function for delayed acks The code to schedule a new delayed ack event is distributed throughout the RX code. Consolidate this into a single helper function. Change-Id: Id24d5891e6c378aeed375454bf9016572dc8bb8a Reviewed-on: http://gerrit.openafs.org/5837 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-on: http://gerrit.openafs.org/6006 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f9f574294535b6c46ceb969274f93fb822682cd Author: Simon Wilkinson Date: Sat Oct 22 09:45:10 2011 +0100 opr: Add opr_containerof Add the opr_containerof macro, which can be used to find the base address of a structure which contains a member whose location is known. This formulation is heavily used throughout OpenAFS to determine the base address of structures containing queue pointers - this provides a central definition, rather than coding it from scratch each time. Reviewed-on: http://gerrit.openafs.org/5836 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 1a056d24a79242db09963dd0b0c2193c5034b61b) Change-Id: I3e3a7d0b83603edf6d62520cb2245cf0944f930b Reviewed-on: http://gerrit.openafs.org/6005 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f85fa656d90168758a3ef8fe2438371c16bb32f1 Author: Peter Scott Date: Mon Oct 31 17:59:51 2011 -0400 Windows: add braces to case statements A number of case statements did not have braces protecting the block. Add them. Reviewed-on: http://gerrit.openafs.org/5772 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry picked from commit 22f4e2945d3fa5b7802b7321ddaa35ef34b04a45) Change-Id: I1f5527250285886f2c5253e9cae27ebd45e2266f Reviewed-on: http://gerrit.openafs.org/5999 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b641ae2569eba40006a0342f4824e0abf3986965 Author: Jeffrey Altman Date: Sat Nov 5 04:10:42 2011 -0400 Windows: Add Vista/Win7 Firewall Configuration Make use of the INetFwPolicy2 COM interface to configure the Vista/Win7 firewall for all network profile types. Change-Id: I68fd5f89436304e9be1fe7c4279eade7d5f7692e Reviewed-on: http://gerrit.openafs.org/5812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b15b4b15822bee87720bb0d78c2ce54051180339) Reviewed-on: http://gerrit.openafs.org/5998 commit 8e1f9a8bc610cc95fe46b185c5ee9c9b8d81b8c9 Author: Jeffrey Altman Date: Wed Oct 5 03:36:48 2011 -0400 Windows: Enforce Share Access Use file server locks to enforce file share access modes via the afs redirector interface. The approach taken integrates share mode enforcement with the file server lock tracking code in the service. The share mode enforcement mimics that of the SMB Server interface. This patchset includes two functional changes to the previous locking and share mode processing: 1. The cm_scache_t fsLockCount field is used to determine if the desired lock can be granted by the file server. If not, the RXAFS_SetLock() request is skipped and the request is failed locally. 2. cm_CheckNTOpen() now accepts the desired and and share access modes. The share access mode is used to determine if a test lock should be obtained at all. If the share mode is FILE_SHARE_WRITE then no lock is requested. This change permits Microsoft Office applications to offer the user the ability to open the file in read-only mode and notify the user when the document can be opened in read-write mode. Developed with Peter Scott FIXES 130239 Change-Id: Iaa2beda3182f93575574bbe8f505e5008cd0d37f Reviewed-on: http://gerrit.openafs.org/5823 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b78b8f64a69481e59e957ebe09315fc5b8b60c17) Reviewed-on: http://gerrit.openafs.org/5997 commit 366844699e21bc7d6a2cb4324a08a72143a90918 Author: Andrew Deason Date: Thu Nov 10 11:58:12 2011 -0600 namei: Remove extraneous rmdir We just unlinked the file, so we know we won't be able to rmdir() the same thing. Give a path one level higher to namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir. Change-Id: I37da76e360fd3967048297789ed8cf4748c14845 Reviewed-on: http://gerrit.openafs.org/5833 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from b41e30a55c8aeb6d7f42d74f9eb090232032057f) Reviewed-on: http://gerrit.openafs.org/5996 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 870a129428fab3ce1349df1ad8810cfeff62325a Author: Andrew Deason Date: Thu Nov 10 11:05:28 2011 -0600 vol: Remove O_EXCL|O_TRUNC combinations A few places were specifying both O_EXCL and O_TRUNC to open(). O_TRUNC does not make any sense with O_EXCL, and doesn't do anything, so remove O_TRUNC from these instances to make the code more clear. Change-Id: I06e2f68eb589da0baee32e523103c2c868c33cc8 Reviewed-on: http://gerrit.openafs.org/5832 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4c679e380f697760de777d35fe057229bf2bf762) Reviewed-on: http://gerrit.openafs.org/5995 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f44c554665196b7fe07f83cede5314445a0c3b92 Author: Jeffrey Altman Date: Wed Nov 9 22:52:37 2011 -0500 Windows: FSCTL_SET_REPARSE_POINT not yet implemented Since FSCTL_SET_REPARSE_POINT is not yet implemented return STATUS_INVALID_PARAMETER to all requests that do not fail validity tests. Change-Id: I0a6b5e58fe660bc9e71411ec63e32cf81790ec51 Reviewed-on: http://gerrit.openafs.org/5829 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from f27480aa2f8a26da3bd7634ff7072c1faac0f448) Reviewed-on: http://gerrit.openafs.org/5994 commit 8de04de7e1e24fc0b320adb276c17da3fa36a140 Author: Jeffrey Altman Date: Wed Nov 9 22:47:55 2011 -0500 Windows: FSCTL_SET_REPARSE_POINT error According to MS_FSCC 2.3.54 if the input buffer length is less than the size of a REPARSE_DATA_BUFFER structure, or the input buffer length is greater than 16,384, or a REPARSE_DATA_BUFFER structure has been specified for a third party reparse tag, or the GUID specified for a third party reparse tag does not match the GUID known by the operating system for this reparse point, or the reparse tag is 0 or 1, then the return status shall be STATUS_IO_REPARSE_DATA_INVALID. Change-Id: Ied458e193ebf10144c954a1b29e38454a5323ec4 Reviewed-on: http://gerrit.openafs.org/5828 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 72e5bd1434a6a2238f28f11a149192f44d0b82d1) Reviewed-on: http://gerrit.openafs.org/5993 commit 83e1087a9799416e5e881f2a08b4330ed8cc8c02 Author: Jeffrey Altman Date: Wed Nov 9 22:45:07 2011 -0500 Windows: FSCTL_IS_PATHNAME_VALID return success Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 support the FSCTL_IS_PATHNAME_VALID Request (section 2.3.21) and return STATUS_SUCCESS whenever this request is invoked. We will do the same. Change-Id: I65be2d5fac5a04f93efb835a827b49e9f1ddec06 Reviewed-on: http://gerrit.openafs.org/5827 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 733aa6a63d8f15dcfe31f24ce31b67b746a2934a) Reviewed-on: http://gerrit.openafs.org/5992 commit 9e45f4a2c394d4fc466ee13d7f09ae7911ba5d8f Author: Jeffrey Altman Date: Wed Nov 9 22:42:54 2011 -0500 Windows: these fsctl cmds are not implemented Return STATUS_NOT_IMPLEMENTED since the following FSCTL_ operations are not: FSCTL_LOCK_VOLUME FSCTL_UNLOCK_VOLUME FSCTL_DISMOUNT_VOLUME FSCTL_MARK_VOLUME_DIRTY FSCTL_IS_VOLUME_DIRTY FSCTL_IS_VOLUME_MOUNTED Change-Id: Ie8fab08f5b005b26192e9bb74a4f09ff29b9c64f Reviewed-on: http://gerrit.openafs.org/5826 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 3c6e5681245ad4ee267d7e5ca260b38655633a96) Reviewed-on: http://gerrit.openafs.org/5991 commit 77952f2d7e6cfe7a6883b118a9de7e8a8f8823a1 Author: Jeffrey Altman Date: Wed Nov 9 22:33:11 2011 -0500 Windows: Additional trace logging Add additional trace logging to the redirector to assist with debugging reparse point processing. Change-Id: I2dac6a6ed3a178c59581f3862678d2fed5f10bc7 Reviewed-on: http://gerrit.openafs.org/5825 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ff7d3a19f032c5d4917cc04eeff9cf92733f1fae) Reviewed-on: http://gerrit.openafs.org/5990 commit 00f81bddd788e17e7e3c1811d2140f1d2055333f Author: Jeffrey Altman Date: Wed Nov 9 20:05:05 2011 -0500 Windows: service must set reparse point attribute When populating the directory entry information for the redirector the service must set the reparse point attribute. Change-Id: Ibeaca04d19c59783c04721cad2b5716a3c8c1e2c Reviewed-on: http://gerrit.openafs.org/5824 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from b947adbacb5db4ce5e380ea28e1d734fdadd5cdf) Reviewed-on: http://gerrit.openafs.org/5989 commit 673c31abd608acd1f591104fef907a86d2699432 Author: Peter Scott Date: Thu Nov 10 13:34:53 2011 -0700 Windows: Correctly increment PIOCtl DE When performing a directory enumeraiton, correctly increment ref count on the PIOCtl DE structures Change-Id: I95833d45ccaf4a4da1eeb64c92e15400b7b7840e Reviewed-on: http://gerrit.openafs.org/5834 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from d810870ec1a2ad1cb438d776236db3340081fe74) Reviewed-on: http://gerrit.openafs.org/5988 commit 2cfcced5863a7a7a874ed2a568e598443851e21a Author: Peter Scott Date: Thu Nov 10 09:06:53 2011 -0700 Windows: FileNetworkPhysicalNameInfo implementation Handle this File information query Change-Id: I04b0d9a97987b526fb1ff2606aff855f4811a232 Reviewed-on: http://gerrit.openafs.org/5830 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 2c0f857bc8d17d8e02f515d510f9530bc47866d4) Reviewed-on: http://gerrit.openafs.org/5987 commit 775cbd0d759d7d3141e1d264a7e50942e4a88780 Author: Jeffrey Altman Date: Sun Oct 30 23:52:00 2011 -0400 Windows: improve store data parallelism The file server will set the rx call status bit (0x1) when the rpc is in process and all of the locks are held. At this point it is not possible for another store data rpc to begin on the vnode prior to the completion of the current rpc. Once this status bit is detected as set, the exclusive store data synchronization on the cm_scache_t can be dropped. This permits the next store data rpc to perform its biod construction. Change-Id: Ibd62a3c289ed11b4f67d5ff1ffff326bcc400044 Reviewed-on: http://gerrit.openafs.org/5741 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from deedf97416e4eaaea79479711ad3c84020fdd1e0) Reviewed-on: http://gerrit.openafs.org/5986 commit 87bb4c90402bbd2f68f9f489217a1d44ce0f11a8 Author: Andrew Deason Date: Wed Nov 9 17:04:09 2011 -0600 volser: Preserve needsSalvaged during restore Some of the routines during a volume restore may set needsSalvaged, if an inconsistency is detected while writing the given volume data. However, after the data is read, we set the volume header information to what was found in the dump stream, ignoring any needsSalvaged that may have been set. To ensure that inconsistent volumes in this situation actually get demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of needsSalvaged in the header, if it was set. Change-Id: Ie4895a8386642a762a523f2a0ac0e2d1b4ac3de7 Reviewed-on: http://gerrit.openafs.org/5822 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9ba891676a15512fa58915662cf599ea73eac430) Reviewed-on: http://gerrit.openafs.org/5985 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ae6d9b2943319b9f44459011f7cfda08e76b6c16 Author: Derrick Brashear Date: Wed Nov 9 10:34:10 2011 -0500 viced: avoid bogus handle in rename because fileptr's handle can be reset during CopyOnWrite we need to SetDirHandle after that call FIXES 130215 Change-Id: I61d21c6026b294e3c7f442786f6ee7f97ab6f5e4 Reviewed-on: http://gerrit.openafs.org/5818 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry-picked from a1669f3e37299c11bf29a458212e03d1bdb22334) Reviewed-on: http://gerrit.openafs.org/5984 Tested-by: Jeffrey Altman commit 7b35b1f29dadeaf5ea27714877c16e4f893037ba Author: Andrew Deason Date: Tue Nov 8 12:52:50 2011 -0600 regen: Fail on failures If something fails, don't ignore the error. Change-Id: Ia679cf8541adce573fa3ee16ae8fafec0cfae790 Reviewed-on: http://gerrit.openafs.org/5817 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6d519cf1234d54630dcfe48f6ecd393e2dfe71dd) Reviewed-on: http://gerrit.openafs.org/5983 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0e65a06262ff231fb782178abebf8a2817ae4908 Author: Andrew Deason Date: Wed Apr 13 13:15:57 2011 -0500 Add "pretty" build option Add the capability to do a "pretty" build, where we output something like " CC /path/to/foo.o" to build foo.o, instead of the entire compiler invocation, similarly to how the Linux kernel build appears. Add the "pretty" building for CC and LD rules. This also prints out some helpful information when a command fails, which can sometimes otherwise be annoying to figure out post-mortem. To enable the pretty building, make with V=0. To output everything that is actually run with V=0, make with 'V=0 Q=' . Note that this does not work with all makes, since not all makes will propagate command-line-specified variables to sub-makes without -e. Non-working makes include /usr/ccs/bin/make on HP-UX and Solaris. However, GNU make will work, as will /usr/xpg4/bin/make on Solaris. Change-Id: Ifb6cf8840c2b99c4d384e195434071ae427c4032 Reviewed-on: http://gerrit.openafs.org/4486 Reviewed-by: Russ Allbery Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 49cb0d00909693b85f52d87a26d5df69a829d9d5) Reviewed-on: http://gerrit.openafs.org/5982 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b8725e9543584c25a08ce6227072974c75c8b1b2 Author: Andrew Deason Date: Tue Nov 8 12:29:39 2011 -0600 Specify pattern rules in addition to suffix rules A few makefiles specify an old-style suffix rule, such as: .c.o: $(AFS_CCRULE) $< Not all makes seem to interpret these rules correctly (such as Solaris /usr/xpg4/bin/make). Since it is easy to do so, specify pattern-based rules along with these, like so: %.o: %.c $(AFS_CCRULE) $< Change-Id: I268c0a81b263c89d079976a01b2759ef6b4f2770 Reviewed-on: http://gerrit.openafs.org/5819 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5c64df8628e60f2e4c55aaf3e53fb01c140b42ed) Reviewed-on: http://gerrit.openafs.org/5981 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 97ab635fa5b384848bfbb403428b05463e5adfa1 Author: Andrew Deason Date: Thu Nov 3 13:40:37 2011 -0500 Add setenv/unsetenv to roken Add the replacement setenv and unsetenv functions to roken, for use on (at least) HP-UX and older Solaris. Change-Id: I032e744649300b1fcb89b30f4f36f9117d2b7b99 Reviewed-on: http://gerrit.openafs.org/5801 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 70e8451acd0426024c152073e53bc6606e0189e1) Reviewed-on: http://gerrit.openafs.org/5980 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bd2bedb563187007bea479e7c2fc7e60fadc6edc Author: Derrick Brashear Date: Sun Nov 6 16:28:27 2011 -0500 dafs: avoid null deref getting volume header we don't assign hd before dereferencing. stop dereferencing and just use the queue cursor. Change-Id: Id70be9e9ff59d68219698f11460effafbdd7a587 Reviewed-on: http://gerrit.openafs.org/5814 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from 00beae8c4e3b390637f20584e676cf86c817dadd) Reviewed-on: http://gerrit.openafs.org/5979 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d6b7f3303fe67ca21b1c71041b318993c3512e81 Author: Andrew Deason Date: Thu Nov 3 13:17:33 2011 -0500 salvager: Implement AskDAFS via SYNC flags Instead of probing the DAFS-ness of the fileserver by probing which FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC response header flags, which explicitly state whether or not the endpoint is DAFS. This avoids unnecessary "protocol mismatch" log messages when the endpoint is not DAFS. Change-Id: Ia228fffd75e23130fe37a74cf79b8433c234609a Reviewed-on: http://gerrit.openafs.org/5800 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7fee28bae30c5a65898a2e3fd7149f07e8ca0df6) Reviewed-on: http://gerrit.openafs.org/5978 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2865af40fd636d532ddc844e32e714e2e32026ea Author: Derrick Brashear Date: Fri Nov 4 11:43:01 2011 -0400 ukernel: handle pioctl errors properly in ktc the straight return from call_syscall isn't what we want. munge so e.g. EDOM handling for ktc_GetToken does the right thing. Change-Id: I5b4d1fe503f64e95544b66a3cf3e9c5c43a2cb5e Reviewed-on: http://gerrit.openafs.org/5807 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from b06c700ee40ca70ef08259af819e2a6084137457) Reviewed-on: http://gerrit.openafs.org/5977 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 179c9a59c4ba51d0848c71e55b64d5bd12d6dc39 Author: Andrew Deason Date: Fri Nov 4 16:12:03 2011 -0500 libafsauthent: Remove obsolete HP-UX workaround This workaround is no longer relevant. It is also error-prone and there are far better ways to achieve a similar result, so get rid of it. Change-Id: I24b1edca87d0b0d7e4f2214292b6af2d61218c5c Reviewed-on: http://gerrit.openafs.org/5811 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from c96d3429f2d4ad2ec7ac45a83c1111dc60a0d5c1) Reviewed-on: http://gerrit.openafs.org/5976 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8f1e1b0f1d7fb0df78188af2f7273c900256c2b5 Author: Andrew Deason Date: Fri Nov 4 17:19:28 2011 -0500 volser: Remove debugging log messages While the -log option to volserver is supposed to print additional log information, it shouldn't spam the log with useless data. Remove some of the log lines that are really more "debug" information, so we log the same amount of information as in the 1.4 series. Change-Id: I99273975bfbf484ae395f96a5d13c97e2aeb5c54 Reviewed-on: http://gerrit.openafs.org/5810 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 2a1251c5d0c1b0fd4024d7b3282187a838b551fd) Reviewed-on: http://gerrit.openafs.org/5975 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9a7d0801689de828bf11bb53413df1d46728d777 Author: Simon Wilkinson Date: Thu Nov 3 10:10:23 2011 +0000 Unix CM: Fix dir buffer leak in afs_readdir Resolve a buffer leak in afs_readdir that was visible on all non-Linux platforms (Linux has an independent readdir implementation) Change-Id: I9324c9cc979c51b06f90ad10eae01c36dae40840 Reviewed-on: http://gerrit.openafs.org/5794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry-picked from 025a7aee0b86c7d8a7299c85c88615eb8cd6b07f) Reviewed-on: http://gerrit.openafs.org/5974 Tested-by: Jeffrey Altman commit 60fa75d299d4ac421ecb10311f9127c866a03062 Author: Andrew Deason Date: Fri Nov 4 12:42:33 2011 -0500 DAFS: Deal with exclusive-state volume headers GetVolumeHeader assumes that headers on the LRU are not associated with a volume in an exclusive state. This is known to not be true for some cases when salvage requests are received over FSSYNC, and may be true in other scenarios. It's easy to just skip such headers, so skip them. Change-Id: Ie605f04e6c1a9e9e9ae3e8791179b3a85eab2fca Reviewed-on: http://gerrit.openafs.org/5808 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e) Reviewed-on: http://gerrit.openafs.org/5973 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fb3402c1dcca217240b4a56ceb8ac857ed19c114 Author: Jeffrey Altman Date: Fri Nov 4 09:34:53 2011 -0400 Windows: NPCancelConnection set correct length The RemoteNameLength passed in the IOCTL_AFS_CANCEL_CONNECTION call must not include the trailing NUL. NPGetConnection() returns the size of the buffer used which does include the trailing NUL. Change-Id: I02940d35b2cc3cdfbff91e169c4d8cba60f4e724 Reviewed-on: http://gerrit.openafs.org/5806 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from da00d719a77607d8873067902f5db5bff02d0e99) Reviewed-on: http://gerrit.openafs.org/5972 commit 929b83333bbe09b99eb613b4bf46be1d843d559e Author: Jeffrey Altman Date: Fri Nov 4 08:40:03 2011 -0400 Windows: do not leak resource in AFSQueryDirectory Track whether or not the pFcb->NPFcb->Resource is held so it can be released in all error paths. Change-Id: I2bfa9d3bb5a608ad861f60e1dee81df845080533 Reviewed-on: http://gerrit.openafs.org/5804 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 3acd9b854e05748578f8291200fad8c6650e9b14) Reviewed-on: http://gerrit.openafs.org/5971 commit 7a090d7029a1a99c07f09b9b0cd15303a50b7316 Author: Peter Scott Date: Fri Nov 4 07:31:57 2011 -0600 Windows: Failed to release correct lock For cross-directory renames, the correct parent lock was not being tracked Change-Id: I5337eb8b617d633e7f20e8fe706df8285e472ffa Reviewed-on: http://gerrit.openafs.org/5805 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from f7adbd3d3977a328612c0f527d764566846593da) Reviewed-on: http://gerrit.openafs.org/5970 commit a4d79c402a82799049faeb5b8f8902ef31f2cfba Author: Ken Dreyer Date: Mon Oct 31 08:27:16 2011 -0600 doc: limitations of addsite on different partitions A user on the openafs-info mailing list noted that the Admin Guide is unclear about creating read-only replicas on different partitions on the same fileserver. Clarify the rules here. Change-Id: Idcb944d46fc9f3994b79d8e930cd050830872f6c Reviewed-on: http://gerrit.openafs.org/5745 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from c59c07132ef17589ad3466ded418c1370539b7af) Reviewed-on: http://gerrit.openafs.org/5969 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bee8e4135fda49caf67b0a2983da3e91fcdc999e Author: Heimdal Developers Date: Thu Nov 3 12:37:36 2011 -0500 Import of code from heimdal This commit updates the code imported from heimdal to ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408) Upstream changes are: Jeffrey Altman (2): Windows: fallback to PROV_RNG if no PROV_RSA_FULL roken: posix errnos for windows Love Hornquist Astrand (3): drop __restrict to please old compilers add krb5_is_enctype_weak Don't export tests from library, reported in bug from Tom Payeire New files are: roken/setenv.c roken/unsetenv.c Change-Id: Ib644b61ee61e2528629a2b4d75f2bd329e1eb6c1 Reviewed-on: http://gerrit.openafs.org/5798 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from c0961b8d4103fab37c360461bcde30c56d24f483) Reviewed-on: http://gerrit.openafs.org/5968 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 995f86ec19fb7d972bcf96f7dde0cd4d769ed6f7 Author: Andrew Deason Date: Wed Nov 2 11:35:42 2011 -0500 Solaris: Specify ARCHFLAGS in CFLAGS Various autoconf tests which use the C compiler may yield different results depending on whether or not we are compiling for x86 or amd64 on Solaris (different libraries are available, structures may be different, et al). So, set CFLAGS depending on which arch we are targeting, so the autoconf results are more consistent with the actual compilation during the build. Change-Id: Iaec57276a803a9804e441787195f05f38c2963f2 Reviewed-on: http://gerrit.openafs.org/5786 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 5eba97a8960c49aeea957dc94408368e1324eff0) Reviewed-on: http://gerrit.openafs.org/5967 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 172c40ae58fa0c541c3385ce4e13b4410aed8367 Author: Andrew Deason Date: Wed Nov 2 11:32:56 2011 -0500 Do OPENAFS_OSCONF before compiler autoconf tests OPENAFS_OSCONF can set the C compiler we use, as well as changing various compiler flags. These changes can alter autoconf tests, so allow OPENAFS_OSCONF to change these before various autoconf tests are performed which require the C compiler. Change-Id: I5a4145e71159fab1c4873ebb50c930391e5f0391 Reviewed-on: http://gerrit.openafs.org/5785 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 353aa7ef2c172f574998480d6d051b3f4e95ae7b) Reviewed-on: http://gerrit.openafs.org/5966 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b6298275e7d3e69145d2f11dfed5e6eb31a4a8e7 Author: Andrew Deason Date: Wed Nov 2 10:43:54 2011 -0500 Remove -settime/RXAFS_GetTime client support Remove the -settime option from afsd, and any code for making RXAFS_GetTime calls in libafs. Server probes have been replaced by calls to RXAFS_GetCapabilities, and the actual functionality of synchronizing the system clock has been superseded by other systems like NTP. Issue a warning for all code paths that try to enable -settime support. Historical note: the code that this commit is removing contains bugs. Do not simply revert this commit to turn on -settime support again. Change-Id: Iafb2ced1f411888f43b57b0141a9420f8738c349 Reviewed-on: http://gerrit.openafs.org/5787 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 1d9888be486198868983048eeffabdfef5afa94b) Reviewed-on: http://gerrit.openafs.org/5965 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9400197b3f3a7b1d6add2c8020c85fb04c2765a2 Author: Michael Meffie Date: Thu Aug 18 17:04:14 2011 -0400 opr: queue swap Add inline function to pivot two queues. Implementation by Simon Wilkinson. Change-Id: Idea3b8740c32992e91fc0b454c7c30140cc611c5 Reviewed-on: http://gerrit.openafs.org/5742 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9c130285d8f17a5e09bbe0b3c3b886ec3145bae9) Reviewed-on: http://gerrit.openafs.org/5964 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 27ade78fb9b0db8a1858e3eb77b5fadb8520d4b2 Author: Andrew Deason Date: Thu Nov 3 12:33:55 2011 -0500 external: trigger git commit-msg hooks on import When we import commits, the new commit does not have a Change-Id in the commit message. Usually a git commit-msg hook will be installed to automatically insert a Change-Id into the commit message if one does not already exist, so trigger the hook by performing a no-op 'git commit --amend'. Change-Id: Ia43b5b16ee00c9aee8950039b035d27ed6782781 Reviewed-on: http://gerrit.openafs.org/5797 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fbf68f12592419a315f56585f9b8bb3a822bbc9b) Reviewed-on: http://gerrit.openafs.org/5963 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2113b3d3d300a3b1afe6e580208e0f2bcad0b5ad Author: Andrew Deason Date: Thu Nov 3 12:27:22 2011 -0500 external: commit imports with --no-verify Currently, importing external commits with import-external-git.pl may fail if the current repository checks for whitespace errors, and the external commits contain whitespace errors. So run the commit with --no-verify, so we can make the commit before fixing up the whitespace errors immediately afterwards. Change-Id: I0acbf1ca7a9a2fae528e71e81b23d8fd6f496570 Reviewed-on: http://gerrit.openafs.org/5796 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7ef5aeb608a390b6ac88d7e6748c5a1b4a65e0c5) Reviewed-on: http://gerrit.openafs.org/5962 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c45876d847c4a194333af745a5bf5c431e512982 Author: Andrew Deason Date: Thu Nov 3 12:17:07 2011 -0500 Import setenv.c and unsetenv.c from roken Import the roken implementation of setenv and unsetenv, which are required on HP-UX. Change-Id: I0e56dd7368e61235013f6c94b8775170724f1d10 Reviewed-on: http://gerrit.openafs.org/5795 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 95038fde9a23b4550cbba38460f4668ca25b4f85) Reviewed-on: http://gerrit.openafs.org/5961 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c6fff259d03049b51364c3da9a5f3d88e9054fba Author: Peter Scott Date: Wed Nov 2 19:29:00 2011 -0400 Windows: fix deadlock in symlink Attrib retrieval Commit df22620f66f5ce92776177d4d800fc7f4ae4ae99 introduced a deadlock when retrieving file attributes for symlink objects. To correct the deadlock, do not hold the Fcb locks during the AFSRetrieveFileAttributes() call. Change-Id: If6b789781cc3bc14a2f8fdd5ee808fda4f7e8f99 Reviewed-on: http://gerrit.openafs.org/5792 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ed9bf9b55976c78cf24b43580d1752e81fe697b1) Reviewed-on: http://gerrit.openafs.org/5960 commit edb5c4068624e644caf4c075f8f725a66a03eb94 Author: Jeffrey Altman Date: Wed Nov 2 19:27:42 2011 -0400 Windows: always set reparse point attrib for symlink Make sure that we always set the reparse point attribute for symlinks in directory enumerations and attribute queries. Change-Id: Ice4405ce5f47a807680d857831a3bca07b95e697 Reviewed-on: http://gerrit.openafs.org/5793 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from d8f357b9838509c5a5cfa22a85dffcd962804025) Reviewed-on: http://gerrit.openafs.org/5959 commit 001e3b7fe0cc08b2858ce8839435ab39e2b62745 Author: Peter Scott Date: Wed Nov 2 19:25:36 2011 -0400 Windows: remember when a reparse point is opened If the mount point or symlink is opened as a reparse point we must remember that in the Ccb so that later reparse point processing can be implemented properly. For now remember with the CCB_FLAG_MASK_OPENED_REPARSE_POINT flag. Change-Id: I19e6358c47513a3c9283273893b306c2fd854579 Reviewed-on: http://gerrit.openafs.org/5791 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from e39e8bb5b2f08281bc1d91c9209a1a3f1b463af2) Reviewed-on: http://gerrit.openafs.org/5958 commit f06199a09be32f4522899732fe148a6dafd5ac4e Author: Jeffrey Altman Date: Wed Nov 2 10:35:14 2011 -0400 Windows: Mount points are always directories Set the directory file attribute for all mount points since a mount point target is always represented as a directory. Change-Id: I88cf8cefbd01f70dada749779a74d9e636cc0619 Reviewed-on: http://gerrit.openafs.org/5784 Tested-by: BuildBot Reviewed-by: Peter Scott Tested-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c7e2d8450117a947cb858bfdb4aedd668bd56bfd) Reviewed-on: http://gerrit.openafs.org/5957 commit 1c2ad5c37991f79aabe8907718b0ee75b2acb388 Author: Peter Scott Date: Wed Nov 2 10:23:48 2011 -0400 Windows: Retrieve file attributes on symlinks When a component is a symlink, correctly retrieve file attributes during a query file information request. FIXES 130283 Change-Id: Ia6962510ee4027684290d840ef10ade64c024890 Reviewed-on: http://gerrit.openafs.org/5782 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from df22620f66f5ce92776177d4d800fc7f4ae4ae99) Reviewed-on: http://gerrit.openafs.org/5956 commit 199d5976814ce5002525f438f27449c0e562d824 Author: Peter Scott Date: Wed Nov 2 10:18:09 2011 -0400 Windows: add AFSRetrieveParentPath() Change-Id: I6f18abebc99713a89a374a06d22deeb1588ef949 Reviewed-on: http://gerrit.openafs.org/5783 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from cddb3baa13b1c941533bee5cdf0873ca4563c9c1) Reviewed-on: http://gerrit.openafs.org/5955 commit 51409629361b6ee1d4d814101a1f76bc65101c15 Author: Jonathan A. Kollasch Date: Tue Oct 11 12:56:08 2011 -0500 kdump-build: don't install when it hasn't been built for *bsd* Change-Id: I0d80a0464f64eb376fef976d500647fcc7fb774f Reviewed-on: http://gerrit.openafs.org/5596 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 6fe9a1ea0f22ef31ede5a9a8bb052b4ee71e7be0) Reviewed-on: http://gerrit.openafs.org/5954 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4d25dfc7d433e3fb552abf573adbbfecab837796 Author: Jeffrey Altman Date: Fri Oct 14 08:10:19 2011 -0500 klog.krb5: enforce DES for rxkad 0. Always request a TGT regardless of the state of writeTicketFile. 1. request des-cbc-crc when requesting a ticket for an rxkad service principal 2. check the returned key length to ensure that it matches the permitted length of an rxkad key. If not, generate an error instead of overwriting memory and continuing. FIXES 130278 Change-Id: I219774be6cadc41c2f3e3ff2fd4c882f69808052 Reviewed-on: http://gerrit.openafs.org/5619 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear (cherry-picked from 3a9a5783cd1fd73902655f0876e2069b42688c94) Reviewed-on: http://gerrit.openafs.org/5953 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0abcadec8680bbde750e6fbe27329416414bce50 Author: Peter Scott Date: Tue Nov 1 08:55:37 2011 -0600 Windows: DE Reference count added during create A reference count is added under lock to a newly created DE to ensure it is not removed through deletion while in flight. Change-Id: I4057a0301752dc30c6b79c4d3af31a74f42cb2ba Reviewed-on: http://gerrit.openafs.org/5775 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 4f4b805ae9107482aa39f2c3c0c4327e8466e2ac) Reviewed-on: http://gerrit.openafs.org/5952 commit be85af45b5217acb219819c2a47b7647102fec34 Author: Peter Scott Date: Mon Oct 31 18:10:07 2011 -0400 Windows: change AFSProcessUserFsRequest default Default the return code for AFSProcessUserFsRequest() to STATUS_INVALID_DEVICE_REQUEST instead of STATUS_INVALID_PARAMETER. Change-Id: Id80996aa0f4ceb3e4fe5c1bc1905a3ce6ad39f7f Reviewed-on: http://gerrit.openafs.org/5774 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 96e313de3e040efffbb9b933b0b2ae15c9fd540c) Reviewed-on: http://gerrit.openafs.org/5951 commit 08129740ed7df57e7e8fdb620579649267454b20 Author: Peter Scott Date: Mon Oct 31 18:07:23 2011 -0400 Windows: correct ordering of reparse point tests Test for whether an object is a reparse point before testing whether the provided buffer is large enough to hold the result if it is. FSCTL_GET_REPARSE_POINT FSCTL_SET_REPARSE_POINT FSCTL_DELETE_REPARSE_POINT Change-Id: Ifb637f90dee41b1d8db8674a3b6436f11b754576 Reviewed-on: http://gerrit.openafs.org/5748 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from ee8b6d34fa7d562f94469e2b8098ccc0507d5876) Reviewed-on: http://gerrit.openafs.org/5950 commit aa6cc8e9c9fa98ca43b25e8047729537b67697a9 Author: Peter Scott Date: Mon Oct 31 18:05:31 2011 -0400 Windows: log FSCTL_CSC_INTERNAL requests FSCTL_CSC_INTERNAL requests are not supported and will return STATUS_INVALID_DEVICE_REQUEST. However, log them for easier debugging. FSCTL_CSC_INTERNAL is defined in ntifs.h only for Vista and above. Since afsredir is built for XP and above its value must be conditionally defined by us. Change-Id: I8b89e5fb66ea48567fb617a81dc41f1c5c4617c5 Reviewed-on: http://gerrit.openafs.org/5773 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 94e9fceaa7ec343717b3fdc8610381832f532ebf) Reviewed-on: http://gerrit.openafs.org/5949 commit a3e342da9cec88c63026b2777e91c0ebdd007973 Author: Peter Scott Date: Sat Oct 29 13:55:46 2011 -0400 Windows: Directory Entry Processing Memory corruption was detected due to improper handling of directory entries and the short name b-tree during directory revalidation and tear down. The problem resulted in a BSOD most frequently when roaming profiles were written back to the file server or when multiple clients were actively modifying the contents of a directory simultaneously. This patchset makes a number of changes: . rename processing no longer handles collisions locally. the file server replaces a target atomicly when there is a collision. . directory validation is no longer delayed until a handle is closed . data version numbers are checked for implied invalidation Change-Id: I119511118e7f1492428da81f4dabc936e7a10f64 Reviewed-on: http://gerrit.openafs.org/5736 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from af3dbb34a1ff226ac693c143f8e9d94ced4114c9) Reviewed-on: http://gerrit.openafs.org/5948 commit ad8aabf86e9d7e12897a9f0bfc425d4eb53580ed Author: Peter Scott Date: Sat Oct 29 13:29:55 2011 -0400 Windows: additional trace logging for afsredirlib A large number of addition trace log entries were added to assist in diagnosing problems in the dir entry processing. Change-Id: I8087cb8b72316ef367faa107d02cccf92b7b1ff3 Reviewed-on: http://gerrit.openafs.org/5739 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from dac012a84b1fec9f2a5003e8cf45a7bdb8cb004a) Reviewed-on: http://gerrit.openafs.org/5947 commit f1cc5706f6dceb8dc3e1ed4845b9d06efeeb92ed Author: Peter Scott Date: Sat Oct 29 11:34:07 2011 -0400 Windows: Reimplement AFSGenerateCRC() Replace the home grown CRC generation with a call to RtlHashUnicodeString() which is present on Windows XP and above. Change-Id: I5769fc99fb2485714fdb12d5f8a62dca47791c0c Reviewed-on: http://gerrit.openafs.org/5738 Reviewed-by: Rod Widdowson Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 15d9654d7242e56a6bab9f8d61afa87b58c1c55f) Reviewed-on: http://gerrit.openafs.org/5946 commit b17fabb7b4a24fa44b64f0436297d284319a0d19 Author: Marc Dionne Date: Sat Oct 29 19:23:07 2011 -0400 Linux: 3.1: update RCU path walking detection in permission i_op The permission() inode operation changed again with kernel 3.1, back to the form it had before 2.6.38. This compiles fine, but is missing the new way of detecting when we get called in RCU path walking mode, resulting in system hangs. Change-Id: If86c2cca9c16aef7731f04832ec524ac30c22b3b Reviewed-on: http://gerrit.openafs.org/5740 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4952df3f0359531e4a660c99c94c51eb0b169f59) Reviewed-on: http://gerrit.openafs.org/5945 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a93cd10b946f17c715cf748de919c697b7887358 Author: Simon Wilkinson Date: Tue Jun 21 18:32:02 2011 +0100 rx: Remove the ADAPT_WINDOW code RX still has the remnants of an old mechanism for doing RTT and congestion window detection. This code is #ifdef'd out using the ADAPT_WINDOW define, but is pretty much unservicable these days, as it collides with the TCP style implementation (with ADAPT_WINDOW enabled, both will attempt to manipulate a connections RTT and window size) As the current TCP-style RTT and window calculation seem to work much better in deployment, and there isn't much hope for us being able to maintain two different congestion mechanisms, just remove ADAPT_WINDOW. It is in git, if we ever want it back (not that I think we ever would). Change-Id: I956aa991eb14617de1cebf36b9ce9e780211aa22 Reviewed-on: http://gerrit.openafs.org/5737 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from d603e2a95252200f02ad8465815c5bac0b23b1e1) Reviewed-on: http://gerrit.openafs.org/5944 commit 132655420c5e195c41afdaac3a5f35606631efe8 Author: Jeffrey Altman Date: Fri Oct 28 17:43:24 2011 -0400 Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of a file to a name that does not exist. Put back the code that makes that possible with a comment. Change-Id: I19dddded27a32b6ffa86d1458b7a1e2253705e97 Reviewed-on: http://gerrit.openafs.org/5735 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 7a426424b7fb45659f6000a564e8c71a9108a33c) Reviewed-on: http://gerrit.openafs.org/5943 commit 18170cef0d3786a3ae87f35ad39552673882ad6b Author: Jeffrey Altman Date: Fri Oct 28 11:36:10 2011 -0400 Windows: out of date version not in current chunk In buf_GetNewLocked(), the comparision to decide whether a cm_buf_t is a member of the current chunk must take the data version into account. If the data version is out of date, it is not part of the current chunk and is an object that can be safely recycled. Change-Id: I2d1699163925c881990b0f647bba1e8dd05d3f4d Reviewed-on: http://gerrit.openafs.org/5734 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb) Reviewed-on: http://gerrit.openafs.org/5942 commit 3c86f4c60f73a4c245c1f72ca53214036ebb6c40 Author: Jeffrey Altman Date: Thu Oct 27 17:57:25 2011 -0400 Windows: only flush buffers on shutdown if running If a service shutdown message is received prior to the service entering the running state, do not attempt to buf_CleanAndReset() because the required data structures and locks are not initialized. Change-Id: I4257cfcd1179a6d118975b6b813213c8aae232ed Reviewed-on: http://gerrit.openafs.org/5733 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9743f5729d1a55513e861bb1334599a8e597de6b) Reviewed-on: http://gerrit.openafs.org/5941 commit a79aa81e72d37cda14c853c6406bea0e1ca01298 Author: Jeffrey Altman Date: Tue Oct 25 15:32:11 2011 -0400 Windows: Do not EEXIST exact match during rename AFS Rename operations on the file server will delete a target file if it exists. Do not prevent renames because an exact match of the target name exists in the target directory. Change-Id: I2d7c3283dc6433d1d1276e1406eb383b0f2853ac Reviewed-on: http://gerrit.openafs.org/5731 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 9cf7a628c2ff178b2fa236d2c0a41ca9be315036) Reviewed-on: http://gerrit.openafs.org/5940 commit f0bc70d8bd78f6b4679939c1a9aedb4451a4f952 Author: Jeffrey Altman Date: Tue Oct 25 15:42:44 2011 -0400 opr: build on Windows after queue.h move 55efff93fe2762b58dc70cdd20aaf97e39825929 broke Windows. update the NTMakefile in src/util and src/opr to correspond to the move of queue.h. Change-Id: Ie74289712a442d01fdb15315a974f7430c3e8f48 Reviewed-on: http://gerrit.openafs.org/5732 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 8fce3848d94f9717323bbd5dc51a9d18956fa2b5) Reviewed-on: http://gerrit.openafs.org/5939 commit b03c426b363b3cf1200b1819dc000a8322b69c3c Author: Rod Widdowson Date: Sat Oct 22 16:46:26 2011 +0100 Windows: Look for 8.3 name when doing a rename If we are doing a destructive rename we need to find whether the target file exists. This is done in the usual way (case sensitive case insensitive), but the short name is not looked for. This means that the rename of a file to a short name will not supersede correctly; rather the service refuses the rename since the target existed already. This patch looks the target name up in the shortname tree if the target name is short and all else has failed. Change-Id: Ib03a87e58a9f015000fc2bf3a4067b8683032a49 Reviewed-on: http://gerrit.openafs.org/5652 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 241d3d54cebfc661cfaec6d21de091d906df3d08) Reviewed-on: http://gerrit.openafs.org/5938 commit 83baa00bc0414f186bf8e8a250ccd3ff389f0d77 Author: Peter Scott Date: Thu Oct 20 14:39:31 2011 -0400 Windows: New Trace for DirEntry tracking problem Incuded in this patch is additional trace for logging how directory entries are added, modified and deleted throughout the redirector Change-Id: If66c2790d8c8ec65733c20f52da4e98ec964ac82 Reviewed-on: http://gerrit.openafs.org/5640 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 159003395a6183266ad9672f12482b1cba6ba0ff) Reviewed-on: http://gerrit.openafs.org/5937 commit 1fbd30e74d8e6a8fe89c5d8d47f626a6654268ab Author: Jeffrey Altman Date: Mon Oct 17 09:29:37 2011 -0400 Windows: Free work item memory with tag value For consistency throughout the source module, free all work item memory allocations with ExFreePoolWithTag. Change-Id: I96eb3fc9f4cad11133b20354b88c5c71f340bc32 Reviewed-on: http://gerrit.openafs.org/5627 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from f0cc4c5dd0c03e4074fc70583215e590623e2414) Reviewed-on: http://gerrit.openafs.org/5936 commit 9ce178637066fe38b43c55e4b0a4c3acce7ecfbb Author: Jeffrey Altman Date: Mon Oct 17 09:28:11 2011 -0400 Windows: free pointer after last reference This is a superficial change but is being done for readability. If given the choice of freeing memory and then testing the pointer value or vice-versa, test the pointer value first. Change-Id: I84666e0bc2e06641c3d0d4ae16f42db996470f32 Reviewed-on: http://gerrit.openafs.org/5626 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from d5a6a895e3b004666b0d6aaa9fe4313b0a831dbd) Reviewed-on: http://gerrit.openafs.org/5935 commit d6370c5762f06cee690f38ddeff667846474a9ae Author: Jeffrey Altman Date: Mon Oct 17 09:26:13 2011 -0400 Windows: AFSInitPIOCtlDirectoryCB free in try_exit Process all conditional release of allocated memory on failure within the try_exit on failure. Change-Id: I818b75d3a1efae2b1ee8ce77f3606d29862a2446 Reviewed-on: http://gerrit.openafs.org/5625 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from ada5908ca1ed8cfa7bfc42890ac5edc73769ae4c) Reviewed-on: http://gerrit.openafs.org/5934 commit 169f14fdd83b8c83f90be3c7be9bb0a747655329 Author: Jeffrey Altman Date: Tue Oct 25 13:30:19 2011 -0400 Windows: close leak in AFSPrimaryVolumeWorkerThread Prevent a leak of the non-paged pool and a Resource by freeing all allocations within the Specific.Directory.PIOCtlDirectoryCB object. Use AFSExFreePool() instead of ExFreePool() because the objects are allocated from the AFSRedir.sys driver allocator. FIXES 130280 Change-Id: I4385c6ac60dce0949aa32e95e358d81e1434bb4a Reviewed-on: http://gerrit.openafs.org/5730 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 782fba58db1210e998ef9c6a50803262ac256812) Reviewed-on: http://gerrit.openafs.org/5933 commit 18cfa2022bc7d441387a73177a35936bc7cb3777 Author: Jeffrey Altman Date: Mon Oct 24 21:14:59 2011 -0400 Windows: afsredir only wants shortName if not 8.3 When performing a directory enumeration for the afs redirector only specify a shortname if the name is not valid 8.3. Change-Id: I14d30aabafc10d09363fd6101e339b4a9e7407b3 Reviewed-on: http://gerrit.openafs.org/5727 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 61b04b19ad4bf2c62ec4309efeba4f442a54d8f2) Reviewed-on: http://gerrit.openafs.org/5932 commit 33481411251ed913c3f56a6b1202a776cfed561d Author: Jeffrey Altman Date: Thu Oct 20 14:06:47 2011 -0400 Windows: Use SetFlag macro when setting flag Change-Id: I3e4a643e1f3cd257324d4fe58cb779cd0894a25f Reviewed-on: http://gerrit.openafs.org/5642 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 219624206ddee454e6bcbac7da7fe2fe632e39a7) Reviewed-on: http://gerrit.openafs.org/5931 commit 329665578d23ef51fd29f057cc4f58e4ea8be21d Author: Jeffrey Altman Date: Thu Oct 20 14:05:59 2011 -0400 Windows: minor typo in trace output Change-Id: I5dba1a39a68d1de880e2f72ae5377ca1ddc239f5 Reviewed-on: http://gerrit.openafs.org/5641 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from e21a063217f99ac441bb65c7e1f628de2a0fbb68) Reviewed-on: http://gerrit.openafs.org/5930 commit f37198cb79975fd516d505a12834c65f53b92932 Author: Peter Scott Date: Tue Oct 18 10:04:48 2011 -0400 Windows: AFSRemoveCaseInsensitiveDirEntry corrections If there is a fLink but no parentLink for the DirEntry being removed, return the fLink as the new value for *RootNode. This patch set also includes two changes that improve readability but do not alter the behavior. Change-Id: Id44d0d4897b002551039fe2016b529a838d61913 Reviewed-on: http://gerrit.openafs.org/5638 Reviewed-by: Rod Widdowson Reviewed-by: Peter Scott Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 81bfacca545e7394a13baa569a6b7c894fc36bde) Reviewed-on: http://gerrit.openafs.org/5929 commit c024e744d11cb5a168d773e2d7a905746736903d Author: Jeffrey Altman Date: Mon Oct 17 09:22:53 2011 -0400 Windows: AFSEvaluateTargetByName free buffer if no return For consistency with other functions in AFSCommSupport modify AFSEvaluateTargetByName to free the DirEntry on completion if the caller has not provided an out parameter to accept it. Change-Id: I7c59d215ffc37b160b60989a716ac61f609a5b2d Reviewed-on: http://gerrit.openafs.org/5624 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 46a96ee06582178eb88e8ca1c7fbb33fae79b403) Reviewed-on: http://gerrit.openafs.org/5928 commit 8ee098dffece3258bf1119307fc84ef8d3a5013e Author: Jeffrey Altman Date: Mon Oct 17 09:19:33 2011 -0400 Windows: remove unused code block A small bit of dead code in the redirector. Change-Id: Ie3205dfa541d194b39658a555be122e9d0e72cea Reviewed-on: http://gerrit.openafs.org/5623 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from c780a9bc2849e25e3ac84f9f674348b8cdd942ff) Reviewed-on: http://gerrit.openafs.org/5927 commit 2c6378720002f2a19bf4ba72bef072f29c5f4e5b Author: Jeffrey Altman Date: Mon Oct 17 09:10:17 2011 -0400 Windows: re-indent afsredir log message params convert tabs to spaces for consistent indentation make use of braces be consistent Change-Id: I126546be0557f13d934fa5418f5edc3d5dabc94d Reviewed-on: http://gerrit.openafs.org/5621 Reviewed-by: Jeffrey Altman Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman (cherry-picked from 9c723e7a514ee4f809348ec79e2124cf3a38d895) Reviewed-on: http://gerrit.openafs.org/5926 commit 677899fe0f156dcf5c49d54f58df6b434d8c7b85 Author: Rod Widdowson Date: Sat Oct 22 15:00:03 2011 +0100 Windows: Defer deref of a directoryEntry During the handling of SL_OPEN_TARGET opens (usually associated with a rename) a directory entry was deferenced prior to its contents being used (to set up a seconding inforation field). This change just holds on to the reference until after that processing. Change-Id: I33b5362433e49ee06ff99081341e7ef12d9ac959 Reviewed-on: http://gerrit.openafs.org/5651 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 2a7795aa565dfa4e371f806b799ce6a01a2db6c9) Reviewed-on: http://gerrit.openafs.org/5925 commit 56fa7f47aa2c0b5cd1c6bf0c0a932660e155b5eb Author: Rod Widdowson Date: Fri Oct 21 16:57:02 2011 +0100 Windows: Set new file index correctly during rename Directory entries are required to have a file index which is used during directory enumeration. When inserting into a new directory we have to update this from the target directory. This code fixes a bug whereby it was being set from the source FCB, rather than the target one. On failure we now also reset the value to its old value. Change-Id: Iea938b0012694afd2271d330b99438e47beb260a Reviewed-on: http://gerrit.openafs.org/5646 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman (cherry-picked from 9824a53aea25a150f770e6b37536aa5fd7eb87df) Reviewed-on: http://gerrit.openafs.org/5924 commit 5da7359aac24c841506d2f4b9311f7440343dd35 Author: Jacob Thebault-Spieker Date: Tue Jul 19 15:01:26 2011 -0700 allow cloning of any volume to any volume with same parent ID remove checks to disallow cloning of ro volumes to rw volumes, which allows cloning of any volume within the same parent ID grouping, including allowing destruction of newer version of the volumes. Change-Id: I4c0e0f1a05c0b015aa832326b1c0dd48bc70fd70 Reviewed-on: http://gerrit.openafs.org/5049 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 83c41c69411ece7ac1dd0a7b15d4ee9746edcf23) Reviewed-on: http://gerrit.openafs.org/5923 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1d9dc1820592820bec4b73eeb7418a89d9a0df70 Author: Jacob Thebault-Spieker Date: Tue Jul 19 09:02:49 2011 -0700 remove check for disallowing clones of backup or ro volumes removes the if-statement ensuring that the volume being cloned is not a backup volume, nor a read-only volume. This allows clones from any type of volume to a given volume. Parent volume meta-data is maintained, only the cloneId value changes. Change-Id: If75d797e355d70912e7be56fae0ba3a40890f6cb Reviewed-on: http://gerrit.openafs.org/5046 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4e1a65ba7edec519acc67f0dcf2237a0f26e92aa) Reviewed-on: http://gerrit.openafs.org/5922 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2961e6488a03a83f4d61c800520489552ed87fd4 Author: Michael Meffie Date: Thu Oct 6 08:33:37 2011 -0400 bozo: build notifier sample program Build the smail-notifier sample program. Change-Id: Ifd0df65cefc1eadb3e8fdef44f0398df950ae282 Reviewed-on: http://gerrit.openafs.org/5555 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from ac88af748e25a40d062c888396aab8670ff8426a) Reviewed-on: http://gerrit.openafs.org/5921 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3b31b24267217289edb837baa9f2ec9da58dea08 Author: Michael Meffie Date: Thu Oct 6 07:55:21 2011 -0400 bozo: test program update Add -file option to test program to simulate program crashes. Change-Id: I5c0aedc2687b1eeee6cb5bf923eabb347f8fd072 Reviewed-on: http://gerrit.openafs.org/5533 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from e7302bcc9c4aa6f1e6a1ae8e5b498bcb0540aac9) Reviewed-on: http://gerrit.openafs.org/5920 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a7ed5536e142f62b28094274647e66fed40d14cd Author: Andrew Deason Date: Mon Aug 29 17:41:31 2011 -0500 DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER Currently VRequestSalvage_r takes a flag, VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the specified volume to be freed (via FreeVolumeHeader). This is almost never safe to do, since there may be other users of the specified volume that can be accessing the volume header at the same time. There is also no reason to invalidate the header at the time of the VRequestSalvage_r call, since the header must be invalidated when we detach the volume (other utilities may change header information). So, if there are any problems in the future because we do not invalidate the header at the time of VRequestSalvage_r, it is the fault of the detachment/offlining logic. So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take this opportunity to correctly document the VRequestSalvage_r headers in the VRequestSalvage_r comment, as it was previously missing the VOL_SALVAGE_NO_OFFLINE flag. Change-Id: I5d0451a7326997b38a466ec427c2e12e0cea4ae6 Reviewed-on: http://gerrit.openafs.org/5319 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5) Reviewed-on: http://gerrit.openafs.org/5919 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 5e711345279af397da9022c5072ea298dcbc051a Author: Michael Meffie Date: Thu Oct 13 12:23:35 2011 -0400 DAFS: fssync online requires a partition name argument fssync-debug online silently fails when run without a partition name. Check for the required partition name on the server side and the client side. Report errors back to the client when the server side fails to pre-attach the volume. Change-Id: I0b6b3729acf50656aefb082ae56ea9fb9218f11a Reviewed-on: http://gerrit.openafs.org/5615 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from d171a5e059566cc99c5dd980039dd56233f91a67) Reviewed-on: http://gerrit.openafs.org/5918 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7e74702fadbf90fd56d97fb2adc8099b56ebb4fb Author: Andrew Deason Date: Tue Oct 11 10:51:14 2011 -0500 volser: Remove ExtractVolId volser was using its own function to extract a volume ID from a filename string, and was using atol to do so. The ato* family of functions can have problems with larger volume IDs, not to mention a lack of error checking, so don't use it. Since we already have the function VolumeNumber in the vol package to do the very same thing, just use that instead. Change-Id: I76ed65e4640cc42515091810689cd6e61f684ea0 Reviewed-on: http://gerrit.openafs.org/5594 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry-picked from 87f969f82d12c8200ede3fd30a151e09ab0bf6ad) Reviewed-on: http://gerrit.openafs.org/5917 Tested-by: Jeffrey Altman commit cab590b6a99374084da41bd4035164c0f5b09f5e Author: Andrew Deason Date: Mon Oct 3 13:10:44 2011 -0500 viced: Check for HOSTDELETED in stillborn check h_FindClient_r checks the connection rock for a client object twice. First it sees if we already have a client object, and if we don't, we effectively create one (or find a suitable one). Then we check again, to see if someone else set the rock while we were creating a client structure. Currently, the first check checks if client->host->hostFlags has HOSTDELETED set, but the second check does not. So, if the host associated with the client has been deleted by someone else, currently we will unnecessarily log a "stillborn client" message, and we will continue to use the deleted host. If the host continues to be held by someone, we will run into the same situation repeatedly on future requests until all of the host references go away. To fix this, also ignore HOSTDELETED clients when performing the stillborn race check. Change-Id: Ifbac6d7fafd42ca9fe47360ba3915c1b2b6908c2 Reviewed-on: http://gerrit.openafs.org/5614 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from b5a153fb75bb6642490e9856dc6212244a590301) Reviewed-on: http://gerrit.openafs.org/5916 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit abf127c90aa670b302135b4dbe1dc33dbcb15601 Author: Andrew Deason Date: Thu Oct 13 11:45:58 2011 -0500 vlserver: Log to VLLog by default, not PtLog Change-Id: I5d5cbca19dd27a3c6c1c1d3ff15746fd4528cfc2 Reviewed-on: http://gerrit.openafs.org/5616 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 13a4642458254e6bdbfa6fd8e165c270f567a1aa) Reviewed-on: http://gerrit.openafs.org/5915 Tested-by: Jeffrey Altman commit fcc79659ee34e05ae8edafdea159faeeeda3e66f Author: Andrew Deason Date: Fri Oct 14 11:32:34 2011 -0500 vos offline: Bring volume back online for -busy vos offline is supposed to bring a volume back online from "busy" status before exiting, as volumes should not be in "busy" status for extended periods of time. This was being enforced by required that -sleep be specified; however, -sleep only results in the volume being brought back online if a non-zero sleep time was specified. So, make sure the volume is brought back online if -busy was specified. Change-Id: Iaefd135bd69b3205d14b88c0b35f493d91eb3a0e Reviewed-on: http://gerrit.openafs.org/5620 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d) Reviewed-on: http://gerrit.openafs.org/5914 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aba3f679e89256d9dbad0785068eaea56d4a93c1 Author: Marc Dionne Date: Sat Oct 22 09:32:33 2011 -0400 cache bypass: don't define iovecp for UKERNEL iovecp is defined but not used for UKERNEL. Define it conditionally to avoid gcc warnings and --enable-checking failure. Change-Id: Ic4697ffd329c975e1357f1e19328700a22c4a9da Reviewed-on: http://gerrit.openafs.org/5650 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 547d94edd3affb5f377cd1b3db39c46ca0cf5aec) Reviewed-on: http://gerrit.openafs.org/5913 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit aadaa1ea7615f6ba27b19771194a5639fb576714 Author: Rod Widdowson Date: Sat Oct 22 14:27:41 2011 +0100 Windows: Remove unused cleanup flag In AFSOpenTargetDirectory the flag bRemoveShare was initialized FALSE and never set TRUE. In teardown after failure some code did listen to the flag, but the operation (IoRemoveShareAccess) was not protected by the FCB mainlock which it should have been. Rather than get the locking correct, just remove the flag entirely. Change-Id: Ib5712af0c572a6ceab3aa1643b4959b394d3860c Reviewed-on: http://gerrit.openafs.org/5649 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from f715ebaee4188300ecee57109512609c7c84cf98) Reviewed-on: http://gerrit.openafs.org/5912 commit 44a99baa658042d29ed82c2eeae910c28383c3b6 Author: Derrick Brashear Date: Sun Oct 23 19:15:16 2011 -0400 bypasscache: allow arbitrary sized iovecs instead of binding outselves to PAGE_SIZE, just fill any size Change-Id: I453acc35ddf41ff54d0da96e44694f13552ba6d4 Reviewed-on: http://gerrit.openafs.org/5658 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 4b817cbb520872e69b01e5675f9037d8948d0ade) Reviewed-on: http://gerrit.openafs.org/5911 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 718b265846da050769a1f2f147533bfb30556a9e Author: Derrick Brashear Date: Thu Oct 6 04:04:36 2011 -0400 bypasscache: do errors correctly do set errors when we bomb out early do not unlock and return early when we happen to do a correct zero length read do set errors the kernel can deal with if we're feeding a page routine Change-Id: I69e53f7a326de780edd8a820aaacb506aef1f25f Reviewed-on: http://gerrit.openafs.org/5554 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 28a159b2bfff7ad450dce612601a0286d4f91df5) Reviewed-on: http://gerrit.openafs.org/5910 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1eebe1e50dd8c3208a895519bff21da5f68553a6 Author: Derrick Brashear Date: Tue Oct 11 15:37:57 2011 -0400 ukernel: get an ip address even when dns and hosts suck gethostname plus gethostbyname being useless make things fun make things less fun Change-Id: Ia3146f54a507ba4d1d54bad3abee63f2190dc5d8 Reviewed-on: http://gerrit.openafs.org/5600 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 6f59c71988d75f76750c46adb11cda7e9189d5f3) Reviewed-on: http://gerrit.openafs.org/5909 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8e031303ce41d89a30a58e728118550cc0fcd7bc Author: Marc Dionne Date: Sun Oct 23 22:45:21 2011 -0400 dir: add missing return in DRead A missing return in the kernel version of DRead causes the code to think that no entry exists for a dir and proceed to allocate a new one, if the entry is the third one in the hash chain. If the existing entry is dirty, its contents are never written back, and the pending changes to the directory are not seen by the client. Change-Id: I9853b02c114225c02c68b8086aa6cf0ee8fd1a13 Reviewed-on: http://gerrit.openafs.org/5666 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 7829e7152361c38a22a7ba4c11e4f614e4392d60) Reviewed-on: http://gerrit.openafs.org/5908 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4efc8b46714027315d3ca4d2a481e1d9c33d3b4 Author: Simon Wilkinson Date: Sun Oct 23 17:41:27 2011 +0100 tests: volser doesn't need rxgk yet An rxgk dependency has crept in to the volser tests. Remove it for now. Change-Id: Ic475977b3e5191f267e932943ec6546632f2977d Reviewed-on: http://gerrit.openafs.org/5665 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 2aaa540276f5b5a0c368e44d8fd04b32c4632c3f) Reviewed-on: http://gerrit.openafs.org/5907 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d38f316e4e6b429849e79d33ffe8925379477e11 Author: Simon Wilkinson Date: Sun Oct 23 17:40:20 2011 +0100 tests: Add opr library for ktime test The ktime tests need libopr for the lcstring routines. Add the dependency. Change-Id: Ib366a17cf770e93b109eab890dc61398831080ad Reviewed-on: http://gerrit.openafs.org/5664 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fd5174d918a5d75f64b122c8433a3c431cb8e454) Reviewed-on: http://gerrit.openafs.org/5906 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e4ccc7af0c892ac6de2632993e08a8b0f9450ea1 Author: Simon Wilkinson Date: Sun Oct 23 17:49:08 2011 -0400 roken: Add *progname() to shared library exports Add rk_getprogname and rk_setprogname to the set of shared library exports in libroken Change-Id: I178d2a4d428f889c869da75f9dc4e5da46a650e1 Reviewed-on: http://gerrit.openafs.org/5661 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from d88682e803912451880c3a9c2b07a01abaebe984) Reviewed-on: http://gerrit.openafs.org/5905 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4974db91802f6051922e91817a42fc57e3efbcf Author: Simon Wilkinson Date: Sun Oct 23 21:23:34 2011 +0100 rx: Define afs_kmutex_t for LWP too afs_kmutex_t is used for lock definitions in the kernel, and in pthreaded builds. LWP doesn't have any equivalent, and all structure members using this type have to be protected with RX_ENABLE_LOCKS, which starts to become untidy. Just make afs_kmutex_t an int for LWP, so that we can simplify our headers, at the expense of some additional storage on LWP builds (which are going away at some point, anyway) Change-Id: Idd90fd0c2b0aa94fde1308b49641f83a820dee8b Reviewed-on: http://gerrit.openafs.org/5660 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5743c96bdea2e9aafeeeec3a1b4377d8860ef437) Reviewed-on: http://gerrit.openafs.org/5904 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit dc4e3ac1c1c7123633d0d3a890ed31f2919f89d3 Author: Simon Wilkinson Date: Sun Oct 23 16:38:13 2011 +0100 dir: Don't leak a buffer on a failed Enumerate If, for some reasons, Enumerate encounters a hash object with a NULL buffer pointer, that's no reason to leak the hash object. Make sure that we DRelease it before failing Change-Id: I6a8f3583dd1c9c11f1dbc59dcd36fdd0460bda61 Reviewed-on: http://gerrit.openafs.org/5659 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from 3f938315adc08936024eb86678745dd85d2a092d) Reviewed-on: http://gerrit.openafs.org/5903 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 66730cdf8f033a77f644690ae2163e79feffc1a5 Author: Andrew Deason Date: Fri Oct 21 15:05:06 2011 -0500 LINUX: Fix afs_linux_pag_to_groups signature "new" is a struct group_info**, not a struct group_info* Change-Id: I4007c614002cbe3683787f9a77e43798328c5d07 Reviewed-on: http://gerrit.openafs.org/5648 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e) Reviewed-on: http://gerrit.openafs.org/5902 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a3297643410b3759362bb6798c345ba70b6f48f3 Author: Andrew Deason Date: Fri Aug 12 14:50:26 2011 -0500 LINUX: Revert group changes on keyring failure On Linux kernels that support keyrings, when we setpag we try to add the PAG to the session keyring and to the supplemental group list. Currently, if we fail to add the PAG to the keyring (which may happen due to key quotas, or possibly other reasons), we return failure but the group list is still modified with the new PAG in it. Therefore, if the keyring-based approach fails, the new PAG may still be in use, but there are no keyring keys associated with that PAG, so the PAG may never get destroyed. This can cause a large number of PAGs to accumulate over time, causing performance problems. So, change this so that, in the event that keyring installation fails, we revert the group list back to what it was before we touched it. Also mark all unixusers with the new PAG as expired, in case one got created during processing. Thus, the new PAG never gets used. Change-Id: I068158607d19e27db6dbeda84f912c52d4b1919f Reviewed-on: http://gerrit.openafs.org/5238 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from ee2fbffb04bb8b5098354646e262afa90c1b6f59) Reviewed-on: http://gerrit.openafs.org/5901 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 6f730bcdadb7f78a0b44e451b1725a7aa699abaf Author: Andrew Deason Date: Thu Oct 20 16:57:14 2011 -0500 viced: Do not swallow errors on StoreData recovery When we encounter any error in the StoreData fetch/store loop, we reset the disk usage to ensure it remains correct, even in the face of unexpected errors. However, when we do so, we use the errorCode from VAdjustDiskUsage as our return value; if it is 0, we return success, ignoring the error that got us in this code path in the first place. Instead, keep track of a temporary errorCode for the disk usage adjustment, and do not override our return value if there was no error in the disk usage numbers. Change-Id: I1fcd0f52821ac813d57ecac2f743edd4474727b1 Reviewed-on: http://gerrit.openafs.org/5645 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from dd831c09602f1ef16cc7dece84aeff638cce7272) Reviewed-on: http://gerrit.openafs.org/5900 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d26d743c9dc7432fb400b8160ffaebfa1437f787 Author: Simon Wilkinson Date: Sat Oct 22 09:43:41 2011 +0100 opr: Move queue header out of util Move the header which is installed as opr/queues.h out of util/ and into the new, top level, opr/ directory. Similarly move the tests out of the util/ test suite, and into the opr/ tests Change-Id: I56cebc8f2d9f53454e70147e07587580c4e3c4b5 Reviewed-on: http://gerrit.openafs.org/5656 Reviewed-by: Derrick Brashear Tested-by: Simon Wilkinson (cherry-picked from 55efff93fe2762b58dc70cdd20aaf97e39825929) Reviewed-on: http://gerrit.openafs.org/5899 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f4743c4b30bfa389e69ef772d8648657f040a919 Author: Simon Wilkinson Date: Mon Oct 10 19:01:26 2011 -0500 dir: Remove double release in FindBlobs When DRead() fails, we DRelease the entrybuf, then break. However, this break takes us to the end of the function, where we promptly DRelease again, causing a double free Change-Id: Ifc2adecb0b05c17abba8f7aed711c4fe6aa1b86c Reviewed-on: http://gerrit.openafs.org/5655 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from ab866c821a705d7911e0ff8ac987249efdc63435) Reviewed-on: http://gerrit.openafs.org/5898 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fbbbe68380b2662a686f6d37ddf2c918bc3d457a Author: Derrick Brashear Date: Wed Oct 12 14:34:55 2011 -0400 afs: don't try GetDownD if nothing to get if we "need" negative slots or caches, don't run. also, don't stay "too full" Change-Id: Idcca18e8db6defda5654015f97cc1fdce27d45cc Reviewed-on: http://gerrit.openafs.org/5612 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 488c7c97854a4bd0ec67bcfe17df93b3fd025f88) Reviewed-on: http://gerrit.openafs.org/5897 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d0ca0866a1bc3b3d9f617f45ae54776ca9eef869 Author: Simon Wilkinson Date: Wed Oct 12 15:26:23 2011 -0400 ukernel: don't define rdwr env on linux We're not vm rdwr env in ukernel. Don't claim we are, otherwise we will never push chunks out to the fileserver when our cache is full Change-Id: I590482eeeb4ad72398cbeadb159b2c6822715794 Reviewed-on: http://gerrit.openafs.org/5613 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 796de9fb43857acccbd51e2af7c8d67eea90fdc5) Reviewed-on: http://gerrit.openafs.org/5896 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d323e80b68279b6a8f8dfec9cc0e9f40b90233ba Author: Derrick Brashear Date: Wed Oct 12 13:09:42 2011 -0400 ukernel: set pthread stacksize to an integer multiple of 8k because some pthread stacks require this to be in units of page size, guess that page sizes will be 4k or 8k, and use the larger as a divisor Change-Id: I3624dbefb0029ad735fcbfb8a1368b5bef7a5590 Reviewed-on: http://gerrit.openafs.org/5606 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: Derrick Brashear (cherry-picked from 7ae1921b76750ef28258777cf1b233c4917663d7) Reviewed-on: http://gerrit.openafs.org/5895 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ba344bc2b600173e92634e0195a1e12f779e2fc3 Author: Simon Wilkinson Date: Wed Oct 12 13:04:28 2011 -0400 ukernel: add morepackets check in listener Make the listener loop actually check for more packets needed, like kernel, pthreads and lwp. Only checking for new packets every 20 seconds isn't sufficient on today's networks! Change-Id: I72ff1229530bb36470891aae2e5ec65e59463084 Reviewed-on: http://gerrit.openafs.org/5605 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from eead07418f13cd87a90770f03ea5118c546d8f1a) Reviewed-on: http://gerrit.openafs.org/5894 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c6a43197f95041dcaef92ee82d8caae8d545637a Author: Derrick Brashear Date: Tue Oct 11 15:21:12 2011 -0400 afs: on uuid init fail, don't leave garbage behind make sure we zero the uuid if we failed Change-Id: I9563bfc2b9b4dcb208578eff0a98489b803e395d Reviewed-on: http://gerrit.openafs.org/5599 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb) Reviewed-on: http://gerrit.openafs.org/5893 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 75b3b6c9f1a1930c6a765048ca0bf1497dc38ca5 Author: Derrick Brashear Date: Tue Oct 11 14:32:04 2011 -0400 ukernel: set close-on-exec on our socket if the process we are in execs a child, it doesn't get our socket Change-Id: I240283fa0b67eacd0e5c38a21af1664a6f68e9f1 Reviewed-on: http://gerrit.openafs.org/5598 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 87dcfc872c11fdb13ebf0448abe91150aaa86859) Reviewed-on: http://gerrit.openafs.org/5892 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9e1205f80cd0ef5af8f35d362c281a531098fb4e Author: Andrew Deason Date: Thu Apr 14 15:36:50 2011 -0500 auth: Get correct viceid in legacy GetToken When ktc_GetTokenEx needs to get tokens via the legacy ktc_GetToken interface, it was not extracting the viceid. Make it set the viceid so the caller gets the correct id. Normally this would require parsing the given client name. To reduce the amount of times we store and extract the viced from the "AFS ID %d" string, create a helper GetToken function that can store the viceid directly, without storing it in a string. Change-Id: I8707bdc4d3cd5c6c183b2659a14d5b23a7d48a89 Reviewed-on: http://gerrit.openafs.org/4482 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 735873d51512bc31134856c06345bb7caf9d8144) Reviewed-on: http://gerrit.openafs.org/5891 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 339eccb2c1078c1bd667a9f2834c385ca01ec6e2 Author: Andrew Deason Date: Thu Apr 14 15:05:37 2011 -0500 auth: Force correct evenness on rxkad tokens Rxkad tokens historically have forced odd lifetimes when the given viceid is actually an AFS ID, and even lifetimes when it is not. Force this when the new token-handling functions are used (so the viceid is correctly interpreted by users of the old token format), by creating rxkad tokens with token_importRxkadViceId. Slightly reworked by Simon Wilkinson to provide a generic token destructor function. Change-Id: Ic7f592dee71d05004f639027cd588ccebd5b54f0 Reviewed-on: http://gerrit.openafs.org/4481 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 59b47fba3fa7cf13ef82463c5112851f7bdaf2ec) Reviewed-on: http://gerrit.openafs.org/5890 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 34c886877e7cb07c6134683e6e2595a65497cd74 Author: Simon Wilkinson Date: Mon Oct 10 17:19:13 2011 -0500 docs: Refer to dafs binaries by their real names (Most of) the dafs binaries are called da(something). Update the example in the dafileserver documentation so that we call the binaries by the names that they are actually installed with on the system. Change-Id: Ic0d8c6f1b5c612b1e528f2d02e66012f575c3c3f Reviewed-on: http://gerrit.openafs.org/5654 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from c37a14697df291f641b4fa5a32826054d92210b0) Reviewed-on: http://gerrit.openafs.org/5889 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 64b9c8a6f03aefd242551ea323465ba4a4eda79d Author: Simon Wilkinson Date: Mon Oct 10 22:09:40 2011 +0100 ptserver: Don't check for noauth before rebuilding The ptserver database building scripts would check to see if the server was running from a bosserver with the noauth flag set before performing a database rebuild. This means that you can't start ptserver normally, and then configure the database using pts -localauth, which is the preferred method for configuring new cells. Remove the check for noauth. This is slightly risky, as it means that a corrupt database could be completely erased upon restart. However, we already check that the dbheader (65k) is entirely blank - which will protect us against any single page corruption errors. Change-Id: I7282a30756fe13da2c69f064f36a863cae70d827 Reviewed-on: http://gerrit.openafs.org/5653 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear (cherry-picked from 7a4498850814ea524f55de0b84d6b0ae0b4834bb) Reviewed-on: http://gerrit.openafs.org/5888 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 55f3f860ffd89af7f998812c25ddb1315e50041b Author: Rod Widdowson Date: Wed Oct 12 11:04:33 2011 +0100 Windows AFSRDR: Log before decrementing refcount The library support package keeps count of the number of times the library code is active. When this goes to zero this means that unload of the library can continue. Although I cannot see it in the code it seems reasonable to assume that at that stage the device object might go away so (and if it doesn't do now it may in the future). This potentially renders it unsafe to do anything after InflightLibraryEvent has been signalled. This patch moves the logging up to above the decrement of the refcount. Change-Id: If20f756d6e655bca6c560c8672a97003f122ba5e Reviewed-on: http://gerrit.openafs.org/5601 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 1b32b4800b1dd8985c1554453354e683a66c9ab5) Reviewed-on: http://gerrit.openafs.org/5887 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 685cca704bd5eaa4bff9fd25067848cbccc0245d Author: Derrick Brashear Date: Tue Oct 11 14:03:29 2011 -0400 ukernel: don't enforce thread lockers in remove vop we enforce locking by pid. when we are ukernel, MyPidXX is stupid. don't bother. Change-Id: I6ed5d52dd04953ae5d7d2d40aa617753986426d1 Reviewed-on: http://gerrit.openafs.org/5597 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from da9044cff966736bc064166a7136c94c0bfc1e5f) Reviewed-on: http://gerrit.openafs.org/5886 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0d786f8a3a2182c76ea004a541dd16914ffb861b Author: Derrick Brashear Date: Mon Oct 10 17:56:20 2011 -0400 ukernel: install our sysincludes to root.perf otherwise, we can't actually include sysincludes from something linking libuafs Change-Id: I77ae1b8a3decee0a32086d6d7b3967514a6d0777 Reviewed-on: http://gerrit.openafs.org/5593 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 75179d50eae3258e8baa0a4c9f069fcd11d08260) Reviewed-on: http://gerrit.openafs.org/5885 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4f357e064da26b81a596a152052c0f242b31937a Author: Derrick Brashear Date: Mon Oct 10 16:35:45 2011 -0400 ukernel: add uafs_access we don't have an access vop. add one. Change-Id: Ieb46c411a8300933e8dfb0000290fb821f286ad9 Reviewed-on: http://gerrit.openafs.org/5589 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 3eb60908a1f9b3f2783ec3f7755b242bff3d573d) Reviewed-on: http://gerrit.openafs.org/5884 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2c03ddd2efa4d866c87d0eb1287f3c8f58bd7887 Author: Derrick Brashear Date: Mon Oct 10 16:57:35 2011 -0400 volinfo: fix bad format string we need a format string; currently here we have none, which is no good Change-Id: Idf6a04475f29ec1413d3d27f91b3c20a42e110cc Reviewed-on: http://gerrit.openafs.org/5591 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88) Reviewed-on: http://gerrit.openafs.org/5883 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 404ba73245a102e914539c93730947bdb4c7be2f Author: Hartmut Reuter Date: Wed Oct 5 10:06:05 2011 -0400 vol_split: avoid using stale open directory vnodes we could in case of multiple splits end up using a stale open vnode for a directory; attempt to close and thus force-reopen any fdhandles backing ihandles. Change-Id: I0b12c7e012d86695f7c48549beb2f454c902dff7 Reviewed-on: http://gerrit.openafs.org/5553 Reviewed-by: Hartmut Reuter Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c) Reviewed-on: http://gerrit.openafs.org/5882 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7f9a04656d9e2f45f7288673bc16fb260618826a Author: Michael Meffie Date: Thu Oct 6 06:03:07 2011 -0400 bozo: bosserver man page updates Add the new -pidfiles option to the man page. Add a few other missing options as well. Change-Id: I1068fa1d5d7767020ed35ff11bc4115042f07978 Reviewed-on: http://gerrit.openafs.org/5587 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from 26253df896a7709847cda041db1dc187f1dbf83e) Reviewed-on: http://gerrit.openafs.org/5881 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a827ed78aa5440b2f8951918d1b655f010b9559a Author: Derrick Brashear Date: Fri Oct 7 08:11:34 2011 -0400 bypasscache: free in order we need to free this, but while the pointer is still good Change-Id: I5108ba4495998ac64796c7cb4528ae74bf56aa7e Reviewed-on: http://gerrit.openafs.org/5562 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from df3e4145e758de3530a21bb1e75cd48a4a7f61ec) Reviewed-on: http://gerrit.openafs.org/5880 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit df27041865f0866ed337eba6a312f9d115e5a166 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. Change-Id: I310b7d178fdbe7920121863658ea0be9b4243f1d Reviewed-on: http://gerrit.openafs.org/5558 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry-picked from f2cba414c1390d5ed46b6c57f5682bfbcf53774e) Reviewed-on: http://gerrit.openafs.org/5879 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e329617326cecd147161eb969e4791dee62efe05 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. Change-Id: Ifa750b2f3e52ee5321e8af23e60f6213b1c80a2a Reviewed-on: http://gerrit.openafs.org/5484 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from d1cf14d54e380014851fb850b65263a66a8a4443) Reviewed-on: http://gerrit.openafs.org/5878 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c4626c83be9533ec5f441ac636c68853f192ae9f Author: Andrew Deason Date: Thu Apr 14 11:29:26 2011 -0500 aklog_dynamic_auth: Support new SetToken pioctl Make aklog_dynamic_auth use the new SetTokenEx method of storing tokens. Change-Id: Ic2c91cc25c028d1ab802c218c250996f4f4fae4e Reviewed-on: http://gerrit.openafs.org/4483 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 40eebd37a295c77615950858e08282447a8c28ca) Reviewed-on: http://gerrit.openafs.org/5877 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 673f46aeb220f7fc4c9f1ac162083237ba6faf2a Author: Andrew Deason Date: Thu Sep 29 12:14:15 2011 -0500 Remove a few extra trailing backslashes In a few different places, moving libutil before libafshcrypto_lwp caused a variable definition to have a trailing \ on the last line of the definition. This can confuse make (at least, the HP-UX make) to think the next following definition is also part of the current definition. Remove the trailing "\"s. Change-Id: I32533fec0df4e4fb9501bd3cb40c420a56d0af79 Reviewed-on: http://gerrit.openafs.org/5523 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 0ca1d92952cc81483e7b949f2982033cf0b9f3db) Reviewed-on: http://gerrit.openafs.org/5876 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cb64172867da610b991c0e36df2fc0b72b7fc9a3 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. Change-Id: Ib2df2079a392d7ed1a8c2aded34f2a7265215ecd Reviewed-on: http://gerrit.openafs.org/5514 Reviewed-by: Derrick Brashear Tested-by: Andrew Deason Tested-by: BuildBot (cherry-picked from 82481c6f4464ad978ea56c687205bdfcd3eebffd) Reviewed-on: http://gerrit.openafs.org/5875 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8cbd52a3d8493645b3adec0147865c7b78da0500 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. Change-Id: I2f2b0c67d9df23207c47f4cd816be5b20909a1c5 Reviewed-on: http://gerrit.openafs.org/5521 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry-picked from b4f96eb78d9403799b97a39b9659070cf1114cd1) Reviewed-on: http://gerrit.openafs.org/5874 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a13b52888e2c6135bb8cbc329aec9d808fd6388a 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. Change-Id: I755640ea4ce607245ae98cc7455472ef781271e7 Reviewed-on: http://gerrit.openafs.org/5528 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 5c6bd04211d587efde4b0915a62273aafb2d306b) Reviewed-on: http://gerrit.openafs.org/5873 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b3dd6ccb74d0f2405b7d832c96b3b3369aba689c 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. Change-Id: I5d78718d5625e4ce8475695dcb699b1cd6b305c3 Reviewed-on: http://gerrit.openafs.org/5527 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6e7b31ef0a69b8ea39e8acc474a7aab48f828d3d) Reviewed-on: http://gerrit.openafs.org/5872 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e6ae122e76ef14e2ce5c51194224cd0c112babe8 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. Change-Id: I30447aa426c041f9261fdfa37505d71fd604426c Reviewed-on: http://gerrit.openafs.org/5526 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from d54a9994d362ce3f287fe786839ec72f6d94806c) Reviewed-on: http://gerrit.openafs.org/5871 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 442af50e29102663809b9704660879d29f8b7247 Author: Andrew Deason Date: Thu Sep 29 18:36:07 2011 -0500 viced: Assert valid statistics indices Make sure we are passed valid statistic index numbers, so passing in a bad index doesn't result in writing over random memory. Change-Id: I3041d4a3c72a8fd8cdd21d158d594dacba162b99 Reviewed-on: http://gerrit.openafs.org/5525 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from d43438bb914f267f1c65d81e23efbab6874ae426) Reviewed-on: http://gerrit.openafs.org/5870 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 93ce9981991ea3939bb3dbc741cd2c09c6e9fe53 Author: Andrew Deason Date: Thu Sep 29 18:31:37 2011 -0500 viced: Use xfer indices for xfer data Use the xfer indices for the xfer-related data, not the op indices, so we don't try to fill in data beyond the actual storage for the stats. Change-Id: I907ffe6c67eb8402810287894d8d643e85b06df3 Reviewed-on: http://gerrit.openafs.org/5524 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 22d94407ea06a3213b7f0f6d57edd48d1977b2e1) Reviewed-on: http://gerrit.openafs.org/5869 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c7eb9398e1282d9656cb00085f9bbcece63412df 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. Change-Id: I3b3bb6e562321ccfb7c04dcf015f1b016a4868c2 Reviewed-on: http://gerrit.openafs.org/5529 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry-picked from 5587bbfc0bc70de234e5655faf7676cf2b9b9715) Reviewed-on: http://gerrit.openafs.org/5868 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c24613019b82debc670a3f583c44dd68ef1f3507 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. Change-Id: Ibaeddbf4dcbe9c48bd838c8df46a4c82a863c2d8 Reviewed-on: http://gerrit.openafs.org/5515 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 11a6fc948983c0a9f1fb41c58b9559750763440b) Reviewed-on: http://gerrit.openafs.org/5867 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4935b51eab4b17d8f5f70a3eeac6c2536b202187 Author: Rod Widdowson Date: Wed Sep 28 16:46:00 2011 +0100 Windows: Remove spurious use of CRTL Checkins b71a2daa and 5247fa38a moved us from using a FILE* to using an FDi_t. However, lurking inside the dump code we see a use of _filelength() which is a MS-Crtl API. This checkin replaces this call with one to the WIN32 API GetFileSizeEx. Change-Id: Ia8a276ecc28dc26eadc68f4e5c43ae699eae4e9b Reviewed-on: http://gerrit.openafs.org/5511 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry-picked from 60a6454d80c760aa8768ba64f7c5bab24f897c7b) Reviewed-on: http://gerrit.openafs.org/5866 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b6d390e7c0e3595b1a841570c9224d61ad443dc8 Author: Andrew Deason Date: Wed Sep 28 15:41:38 2011 -0500 Remove references to afs_assert.h The header afs_assert.h no longer exists after commit cac74242728ad97e3ce9cef0a949d58c237250f6. Remove all remaining references to afs_assert.h in the tree. Change-Id: I6cb8b26b0167c7243b20e3f535ea7c6e94e38985 Reviewed-on: http://gerrit.openafs.org/5513 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c7dc0180c7c424c6cb58d1493759caf82ef280f2) Reviewed-on: http://gerrit.openafs.org/5865 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 1ad1e1d4ae1678f4e2627f4a42cbb0a98a2fb742 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. Change-Id: I8b491dade6acf18fc42565563df82149866a0f49 Reviewed-on: http://gerrit.openafs.org/5510 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 955bab670d0aed714fc940b5be7e2b75896a63d0) Reviewed-on: http://gerrit.openafs.org/5864 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d9c0fe6f6cb5d2398b02a02dc3bcfbeeae1cea1c 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 Change-Id: I3cdaea1cccd1425b1146bf4a816894437787ef70 Reviewed-on: http://gerrit.openafs.org/5509 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear (cherry-picked from 80943970b8cfcdf3fc630b25804aebaea228bd73) Reviewed-on: http://gerrit.openafs.org/5863 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3816c0f3b9d1f5ae6d53faf2596dbed90a0fe409 Author: Rod Widdowson Date: Wed Sep 28 17:34:54 2011 +0100 Windows: Fix comment about DiskPartition64 There is significant confusion between the partition name (/vicepX) and the containing volume (C:) in the windows code. A review of the uses in FSYNCH found a downright wrong comment (as checked in the debugger). Change-Id: I167a0fd83a60dc3604ce6b1302d4e6b4549043f5 Reviewed-on: http://gerrit.openafs.org/5512 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 5b579b83abc57d6bb9212b599aae96af9ac71832) Reviewed-on: http://gerrit.openafs.org/5862 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8e0d084344b880a504fba478d7e982ffce62c35b 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. Change-Id: I6ddda254d69b10a68a16e4736d024bd89310b316 Reviewed-on: http://gerrit.openafs.org/5488 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726) Reviewed-on: http://gerrit.openafs.org/5861 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ff1341adab8dbf3793f79571c1c6c571f195a236 Author: Jeffrey Altman Date: Mon Sep 26 12:28:49 2011 -0400 Windows: do not install afs_assert.h commit cac74242728ad97e3ce9cef0a949d58c237250f6 removed afs_assert.h from the build tree. It can no longer be installed. Change-Id: I9f9bff18e09be8fa10dc1e573f6c0bb1660d8af3 Reviewed-on: http://gerrit.openafs.org/5505 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 4a0d8cc24e687f271fcf44bab765691bd782d78d) Reviewed-on: http://gerrit.openafs.org/5860 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit bddac7ca58a4d69ba527ab003e7ffbcd79a7d4cb 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 Change-Id: Id6e2fe312ce0605685d3f5ce60f23271c59834b3 Reviewed-on: http://gerrit.openafs.org/5504 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 48e326372d89b0d778420f268dbe59236758eba8) Reviewed-on: http://gerrit.openafs.org/5859 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7d65c4544aae13de17bbc243b47a70987862d536 Author: Michael Meffie Date: Mon Jul 25 09:21:34 2011 -0400 volinfo: refactor vnode handling At program startup, register procedures to be called when scanning vnodes. Change-Id: I7fee43035320ef8315177c19bd2b459f5bb50021 Reviewed-on: http://gerrit.openafs.org/5100 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 11f54962f638c8ae48d5193f6b695c252fbb9937) Reviewed-on: http://gerrit.openafs.org/5858 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b5ad4ced08d8cf3a6ae96a3e8985dcfbf60abf8f Author: Michael Meffie Date: Sat Jul 23 14:55:57 2011 -0400 volinfo: release volume header ihandles when done After scanning the volume, release the header ihandles for the volume. Change-Id: I87a9579bc59c5556e657b48ef615ef89299f08d4 Reviewed-on: http://gerrit.openafs.org/5099 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4aa72b4308bae8e1d789682e7ead83bcadded862) Reviewed-on: http://gerrit.openafs.org/5857 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0a3ffab3c7f6758b584f49b84bb005c9dd8aa664 Author: Simon Wilkinson Date: Sun Jul 10 13:46:11 2011 +0100 Clean up assertion The AFS code has multiple different assertion implementations in userspace. This patchset is the start of bringing some sanity to them. In rx, we have osi_Assert, a user/kernel assertion macro. This is only available to libraries which have RX dependencies In util, we redefine the standard 'assert()' macro to provide a cross-platform assertion solution. Because util has an RX dependency, neither of these provide an assertion solution for libraries which should be independent of rx. So, pull the assertion code out of util, and put it into opr, as a new opr_Assert() macro. Implement the userspace osi_Assert in terms of this macro, leaving the kernel variant untouched. Update callers to the new macro and header file names. Change-Id: If923440c0f4289847749cf7fff1c38bae4d8214f Reviewed-on: http://gerrit.openafs.org/5394 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from cac74242728ad97e3ce9cef0a949d58c237250f6) Reviewed-on: http://gerrit.openafs.org/5856 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 53686463a7769426bb9eb112816c3257dd9cb5e7 Author: Simon Wilkinson Date: Sun Sep 11 21:44:23 2011 +0100 Move abort() into opr We need our own abort function, because the behaviour of the Windows abort() implementation isn't sufficiently flexible for us. Because we're replacing an operating system function, reather than implementing a missing function, this doesn't belong in roken. So, provide an alternative opr_abort() implementation in our portable runtime layer, which is a synonym for abort() on Unix, and implements the required DebugBreak() functionality on Windows. Remove lwp_abort() which was just creating another, unnecessary, layer of abstraction. Change-Id: I0a2fa44f74f5f5b19c90ce724d90d41696a58a7f Reviewed-on: http://gerrit.openafs.org/4428 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 0a8f21e6a44d59a3333c0b4fee572fe6d94aae3d) Reviewed-on: http://gerrit.openafs.org/5855 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit eaaa26cc7faeecfd35832eef0c1ba2fc1c4e7ff2 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. Change-Id: I9b2f897c696779b466a541e55231687cadc9e489 Reviewed-on: http://gerrit.openafs.org/5497 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from bdf86d245fd55c5c7ac7ea81e3d6b6bafdbe1783) Reviewed-on: http://gerrit.openafs.org/5854 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9f40f5af85ba5db8cd9493a9f08e4ce5668c3866 Author: Michael Meffie Date: Fri Sep 23 11:28:05 2011 -0400 bozo: remove duplicate prototype Remove duplicate function prototype. Change-Id: I5915e2a012ed9f350af66e81359535e9c008dd76 Reviewed-on: http://gerrit.openafs.org/5496 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from fab921de67fe2bfbf6967c2e1cbf27230aad8bb2) Reviewed-on: http://gerrit.openafs.org/5853 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit d47fcbc8ddf5fdadb6f354cd218e0afa01e568ee Author: Rod Widdowson Date: Fri Sep 23 16:37:43 2011 +0100 Fix buffer leak in dir/buffers.c Checkin 0284e65f97861e888d95576f22a93cd681813c39 accidently threw in a trailing semicolon after an if statement. Since the next line was a break this had several unfortunate side effects, the most obvious being that we leaked a buffer in certain cases. Change-Id: Ic03f48ea542b1f0c0871389063951a7139c7f69e Reviewed-on: http://gerrit.openafs.org/5498 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from c2f7627a89e50713dc963ece2ef086cd991c15aa) Reviewed-on: http://gerrit.openafs.org/5852 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 459edd9c14957dc3ac0d34eb567a3831188c5374 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. Change-Id: Iebc335c42efb6bf8c3a556d07085a222b11ab094 Reviewed-on: http://gerrit.openafs.org/5490 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from a020c572d372f2e86807dc4c75ec50ff14ef2fba) Reviewed-on: http://gerrit.openafs.org/5851 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a47ae75fdcf2d76c1b8fca60710b6e0c4c095d1f 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. Change-Id: I32fbbf30ed4e60555e0f087af6e0f83e780680e2 Reviewed-on: http://gerrit.openafs.org/5487 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 544ff1b295a57b50afefa6146094434db7608355) Reviewed-on: http://gerrit.openafs.org/5850 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f5c597fb1dc5b29886074b898781347cef002b5b 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. Change-Id: I261b7f88be7a6140d04563e1c2a88b9b9fc21775 Reviewed-on: http://gerrit.openafs.org/5469 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry-picked from 1d6dfa5806b171c6f306508396a06302d3d9c42a) Reviewed-on: http://gerrit.openafs.org/5849 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8b3062f8da58ccf19f404c3e5fc1e6c656e1af3e 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). Change-Id: Ia23d570d70719982cdeb5d1d99522c59be2968a5 Reviewed-on: http://gerrit.openafs.org/5466 Reviewed-by: Derrick Brashear Tested-by: BuildBot (cherry-picked from e69714739f64475d71633fd4cb3523bc1ae143bb) Reviewed-on: http://gerrit.openafs.org/5848 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7bf8cc16d5ad0075572db2ed105a07efcd781948 Author: Jeffrey Altman Date: Sun Sep 18 14:18:24 2011 -0400 dir: remove unnecessary cast from malloc Change-Id: I4720407138cccbc17dd278a762057355ea531549 Reviewed-on: http://gerrit.openafs.org/5464 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 4d4cd3cd0874f4574989f57201bd3a3999764d6c) Reviewed-on: http://gerrit.openafs.org/5847 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cdf5c1ae095344b9beadb54c42c8880f9bb900ac 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. Change-Id: Ia750e3752d67908ea34820bbb82251292ebfd082 Reviewed-on: http://gerrit.openafs.org/5447 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry-picked from 6196abf3c864f8cc6ab1efc6e5625a5cc68158bd) Reviewed-on: http://gerrit.openafs.org/5846 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b9caee7cdf21588207f272b3eb79fb7370d95e07 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 commit f722a75fe21963d64217375f1f7bbb0eb14befb4) Change-Id: I2c3ffbc395a785794ec878be1d2feaebdf84b153 Reviewed-on: http://gerrit.openafs.org/5845 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7dd6c745479d2821a060fe3cf5f7c7b42b78fda3 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: Ic303fa46f40c1bfcaeb10b7c90b9dbcbc34118ee Reviewed-on: http://gerrit.openafs.org/5844 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0f9ec666edfc03d649251894c6acefd39a1ae766 Author: Jeffrey Altman Date: Tue Oct 4 19:01:50 2011 -0400 Windows: Explorer shell GetUnixModeBits() actually append the unix mode string elements to the respective strings. Reviewed-on: http://gerrit.openafs.org/5552 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 65bdade6d5a6c4301444f288cf20430241cbdc5d) Change-Id: Ie130b3b38504c7f4a3a2c7219e9c2eb2f110074f Reviewed-on: http://gerrit.openafs.org/5586 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit e0533066fd9524bfba682e47b31d9938b8d25c3e 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: Id319160812d7a054249d8838f449ceef401f1d85 Reviewed-on: http://gerrit.openafs.org/5585 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 2bc35050d5b906856bd2b7e04968e380b5eb29c6 Author: Jeffrey Altman Date: Sat Oct 1 14:05:31 2011 -0400 Windows: Explorer Shell Extension enhancements Redesign the AFS Volume Tab to report: . Volume name . Volume ID . Cell . Server . Availability . Quota . Partition Info . Replica Server List Properly handle multiple selections to report the volume info of the parent object and not the actively selected object. When a mount point is selected, display the volume information for the target volume. Remove file server from AFS tab. Modify the AFS tab to better handle multiple selections including mount points. Extend many gui2fs functions to implement a poor man's "follow" option. This really should be done with the pioctl 'literal' capability but this is an improvement. The pioctl modifications will require a major redesign of gui2fs.c and all of the dialogs. Reviewed-on: http://gerrit.openafs.org/5531 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 59169e0ac73fe44ddd7d28f3985cfc5549938cb8) Change-Id: I5f42f4de74fdf6da68628301dbd60e090ae6e29b Reviewed-on: http://gerrit.openafs.org/5584 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a6080b4aceef9fb82a816758a442ee564d29dff3 Author: Jeffrey Altman Date: Fri Sep 30 03:43:24 2011 -0400 Windows: register Shell Ext handlers Add registry keys and values to enable use of the overlay handlers for symlinks and mount points. Add registry keys and values to enable use of the property sheet handlers. Correct registry keys for the Folder background context menu handler. Reviewed-on: http://gerrit.openafs.org/5530 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0d76ca3c5b17caa2c8106a75ee6ca1332deae603) Change-Id: I6f25b498f1118e51dbf6aedbd5ba62fe75020c15 Reviewed-on: http://gerrit.openafs.org/5583 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 8d78c52d4e9c49791bfd97687c308540df9bb84e 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: I174200401f9bd1dc0d9610ba1c572a655d8914bf Reviewed-on: http://gerrit.openafs.org/5582 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9646f97cd77775880527ecd245c2b4804ebcb24a Author: Jeffrey Altman Date: Wed Sep 28 21:46:48 2011 -0400 Windows: Fixup errors in AFS ACL Property Sheet Unlike the afs_set_acl_dlg the PropACL sheet only uses a single ComboList to maintain both the positive and negative ACEs but uses two CStringArrays to separately store the positive and negative ACEs. Two entries in each array are used to store an ACE. The %2==0 entry is the pts name and the %2==1 entry is the permission list. This needs to be taken into account when manipulating the negative entries since the array count for the normal entries is twice the number of ACEs. Negative entries were prefixed with '=' instead of '-'. The Remove button was not hooked up and was not enabled or disabled under all appropriate conditions. Reviewed-on: http://gerrit.openafs.org/5518 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b977e52a441c70ec9ea97c7d0ebaaed17e530116) Change-Id: Id7cf6d1bafcf27d36408d49a8c7f65e2d67118f6 Reviewed-on: http://gerrit.openafs.org/5581 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fe20e08d4e4c29b0209b58bf4062e9a01da98ea4 Author: Jeffrey Altman Date: Wed Sep 28 19:59:03 2011 -0400 Windows: add resource info to afshcrypto.dll The afshcrypto.rc file was provided but it was never compiled nor linked to the dll. Reviewed-on: http://gerrit.openafs.org/5517 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 5ba6a6223c42abf104c02d59f8c95d1760bd9030) Change-Id: I0ec4e26c7f7024b789bbf05ed9fd197daf7b0307 Reviewed-on: http://gerrit.openafs.org/5580 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b63531fc4fd16db239c6534a2635ff4ad7d0ce5e Author: Jeffrey Altman Date: Wed Sep 28 19:58:07 2011 -0400 Windows: Add resource info to afsroken.dll The afsroken.rc file was provided but it was never compiled or linked to the dll. Reviewed-on: http://gerrit.openafs.org/5516 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0c6bc6c78ade956978652dfe62bcc27140695b8a) Change-Id: I0f6d110e804f62a2c732e38933229c11f711f6b9 Reviewed-on: http://gerrit.openafs.org/5579 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit dec2a0e9fbe03e85641cd76691b886a4bbc4520d Author: Jeffrey Altman Date: Sat Sep 24 11:42:50 2011 -0400 Windows: update ntbuild.bat Add references to: . new APPVER and _WIN32_IE values . new AFSVER_CL values . additional code signing variables . variables for symbol store support . WiX Installer Toolkit location . Cygwin Install Directory . ActivePerl Install Directory . SignTool path Reviewed-on: http://gerrit.openafs.org/5500 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit b6e04fa78ed5793d52caccafe2f5fc46be6a6af9) Change-Id: Ifc2e7959bebf5264e3594d02f21445de7dda1d32 Reviewed-on: http://gerrit.openafs.org/5578 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ce6763e9124dc2fa639a25e17a318e984ff0f9ca Author: Jeffrey Altman Date: Wed Sep 21 01:46:52 2011 -0400 Windows: Disable OACR by default for AFSRDR build When building the AFS redirector with WDK7600 the Microsoft Auto Code Review process is started by default. This is a problem for buildbot. Disable OACR by default if the _RunOacr environment variable is not set to TRUE. Reviewed-on: http://gerrit.openafs.org/5479 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 6fb2e92422abdaca6175f2556b24ba681af72fd6) Change-Id: Ifc0b7392f86b6113795c858bf8051815fa212bd6 Reviewed-on: http://gerrit.openafs.org/5577 Reviewed-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4d4bc4171b6356eb5121254a2c46c9eaab882d40 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: If18718b4953088d45c7c1485d0ebb19ca2f4745f Reviewed-on: http://gerrit.openafs.org/5576 Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2facdcdae1ea24db46b75451031f4ea28f0d9ffa Author: Jeffrey Altman Date: Sun Sep 18 13:13:18 2011 -0400 Windows: install control panel only if afs_config Add the AFS control panel to the AFS Configuration Tool component so that it is installed only if afs_config.exe is going to be installed. Reviewed-on: http://gerrit.openafs.org/5462 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit c8f64e04b8cfb1085a2f3227785492d5e3f487ff) Change-Id: If4e6660898af2fa2f59f5d309f882e003c8e4217 Reviewed-on: http://gerrit.openafs.org/5470 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 696aabf9d3a233d7c5a742c39cbbda2f45b74c8e Author: Jeffrey Altman Date: Sun Sep 18 13:14:39 2011 -0400 Windows: Disable Control Panel button in NIM Since afs_config.exe is no longer installed, remove the OpenAFS control panel button from the Network Identity Manager provider. Reviewed-on: http://gerrit.openafs.org/5463 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 25254adeeea5f41820f140ce812bdacae34d24c9) Change-Id: Ie371f0c9be40923572fa14c33931559c94d09f8c Reviewed-on: http://gerrit.openafs.org/5471 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7ea91dd7fd828ece90b51a9840be8db266e19a68 Author: Derrick Brashear Date: Thu Sep 15 23:20:30 2011 -0400 openafs 1.7.1 update version strings to openafs 1.7.1 Change-Id: Ic79d0354cae1e93f57bcd7e03b325407f9ecb901 Reviewed-on: http://gerrit.openafs.org/5458 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit e6c04df407036b82c980d933d56ebce686c79e0f Author: Jeffrey Altman Date: Thu Sep 15 15:16:55 2011 -0400 Windows: changelog prior to branching openafs-devel-1_7_x Change-Id: I27ece967a136a44513fade8e9b8cc1c8d57951b4 Reviewed-on: http://gerrit.openafs.org/5449 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5263b04796dfae34b2ac52e420bdc2f0c70e0568 Author: Jeffrey Altman Date: Thu Sep 15 14:00:39 2011 -0400 windows: Set ReparsePoint Attribute in FileAttributes The ReparsePoint Attribute is a primary attribute that is used internally within the redirector to determine when the object is a reparse point. It must be set in all code paths that obtain the FileAttributes from the service. Do not fold it in during the QueryBasicInformation response processing. Change-Id: Iba819dd94ec03133f78a4d18559dbd1b5352788e Reviewed-on: http://gerrit.openafs.org/5448 Reviewed-by: Peter Scott Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e24984a52a7ca73e8e270e0e39e5d2bb22b5f77b Author: Jeffrey Altman Date: Thu Sep 15 10:32:19 2011 -0400 Windows: README-WINDOWS updates for build environment Not complete but closer than it was. Change-Id: I5945101206535753ace6d3a53a4d91ee4290351c Reviewed-on: http://gerrit.openafs.org/5446 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ced8cd18c6d6ef545fba623fbb431536386bbc65 Author: Jeffrey Altman Date: Thu Sep 15 02:07:53 2011 -0400 Windows: NetWksta RPC test application A simple application to query the NetWksta RPC interface. Change-Id: I9d53dd956ace89ce01e3cf48583e160176fa05ce Reviewed-on: http://gerrit.openafs.org/5445 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit c044db34a1cef5cb905bfdb5df35fe05bf30fb4f Author: Jeffrey Altman Date: Thu Sep 15 02:06:14 2011 -0400 Windows: Build the AFS Redirector world All of the new build rules necessary to build the new AFS Redirector world. Change-Id: Ic5b8839eb6f10e44c3b6e185c85c3948f77b4d60 Reviewed-on: http://gerrit.openafs.org/5444 Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit effaebfe007eaa70d8479e8d655deb54cc0d36e9 Author: Jeffrey Altman Date: Thu Sep 15 02:04:45 2011 -0400 Windows: Release Notes updates for AFS Redirector No more support for Windows 2000. A first pass at indication which features that are SMB only are no longer applicable. much more. Change-Id: I6e6337804d75c8dccdbc66307215e18238f33dac Reviewed-on: http://gerrit.openafs.org/5443 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69674f376aeb748fffb0c47d855851349e21c4ee Author: Jeffrey Altman Date: Thu Sep 15 02:02:36 2011 -0400 Windows: WiX Installers for AFS Redirector Add the AFS Redirector and AFSRDFSProvider and new Shell Extensions to the MSI installer package. Change-Id: I82d8256d016a19865bc8a681331f650d52e3b261 Reviewed-on: http://gerrit.openafs.org/5442 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b9d9264c0efb3529fe1d67d5a837be8d3081fcc9 Author: Jeffrey Altman Date: Thu Sep 15 02:00:00 2011 -0400 Windows: NSIS installers for AFS Redirector These changes provide basic support for installing the AFS Redirector and the AFSRDFSProvider.dll. However, since NSIS is not useful for 64-bit installations the NSIS installers will be removed from the source tree in the near future. 1.7.x series will not be distributed with NSIS installers. Change-Id: Ifd9d06af4f047e27c23c87af79ba84085bc3614a Reviewed-on: http://gerrit.openafs.org/5441 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 073e3c528952abdf21432d32487b3a11c71a3234 Author: Peter Scott Date: Thu Sep 15 01:58:48 2011 -0400 Windows: AFS Redirector Support Tools settrace, gettrace, objstatus, authgroup, and crash. These tools are useful for debugging the system. Change-Id: I2d62186a98f5561d579f7934ef568a54a3b099f1 Reviewed-on: http://gerrit.openafs.org/5440 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 82d60412041bd05f13da3bc9937d1e561744c71c Author: Peter Scott Date: Thu Sep 15 01:52:08 2011 -0400 Windows: AFS Redirector Network Provider In Windows a network file system must have a matching network provider dll that interfaces with the Multiple Provider Router (MPR) to support the WNet APIs called by the Windows Explorer Shell and other applications. The WNet APIs are primarily used to support driver letter mapping but they also have a number of other functions including universal name mapping, path formatting, and path parsing. Jeffrey Altman contributed to the development of the AFSRDFSProvider.dll interface. Change-Id: I9476003e05f12684676e8c7331a0a8dd13d98686 Reviewed-on: http://gerrit.openafs.org/5439 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3c69a113aac8f09ea1d7c2221173bd656cc4c8d1 Author: Peter Scott Date: Thu Sep 15 01:48:59 2011 -0400 Windows: AFSRedirLib.sys file system library driver This patchset implements the AFS Redirector Library driver. This driver contains all of the AFS specific implementation details for service communication, network provider support, directory management, extent management, metadata management, callback invaldation, volume management, file locking, etc. Rod Widdowson and Jeffrey Altman contributed to the development of this driver. Change-Id: Icc18c26b81b96a92096c20e01360007815ca1acb Reviewed-on: http://gerrit.openafs.org/5438 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9399093a767c0638ee247d89d5f8f70b518b9396 Author: Peter Scott Date: Thu Sep 15 01:33:20 2011 -0400 Windows: RDR File System Framework driver This is the first of two kernel drivers used to implement the AFS Redirector: AFSRedir.sys. This driver is registered at boot time and provides the binding to the Windows kernel infrastructure. However, it only provides a framework of a file system driver. All of the AFS specific interfaces are actually implemented in a secondary library driver, AFSRedirLib.sys. The rationale for this model is that file system drivers cannot be unloaded on a running system. By using this approach the library driver can be unloaded which permits systems to be live updated. To permit this model to work, all memory allocation is performed by AFSRedir.sys. This confuses the driver verifier tool. When the library is unloaded all objects are still valid. Operation is simply paused until a new library is brought up. Under the current configuration the library is loaded as part of afsd_service initialization of AFSRedir.sys and is automatically unloaded when afsd_service.exe shuts down. The framework driver also implements all of the process and thread tracking logic necessary to support Authentication Groups. Communication between AFSRedir.sys and afsd_service.exe is performed via a reverse ioctl model whereby the service contributes threads to the driver to convey requests for processing. The original file system was derived from the Kernel Drivers File System under license from Kernel Drivers, LLC. Rod Widdowson and Jeffrey Altman contributed to the development of this driver. Change-Id: Ic123cacd868ddde31d66bf17d3ad2a13c22cd1f4 Reviewed-on: http://gerrit.openafs.org/5437 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6e82b5be128a07124fe8a69d6932ffe011fb1077 Author: Jeffrey Altman Date: Thu Sep 15 01:31:08 2011 -0400 Windows: Make pioctl interface RDR aware Permit the pioctl interface to recognize how to interact with the RDR for processing pioctl operations. Change-Id: I7ddf15f29661e61fab6439d2a3c1aa2935011559 Reviewed-on: http://gerrit.openafs.org/5436 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b418d381be8c778ebeb93dd75bdc068dc4ed4871 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. Change-Id: I94c09e4f8e459ffebdcb2a63dbbe2197d7fbf070 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 commit 49724640b84c0a1a44957ef7f713491bab2b86db Author: Jeffrey Altman Date: Thu Sep 15 01:27:58 2011 -0400 Windows: "AFS_SMBNAME" envvar for aklog Permit the Windows smb user parameter used when setting tokens as the LOCAL_SYSTEM account to be set via an environment variable. This is useful for debugging. Change-Id: Id4521c863df1288a7a0937b83bf85cff1af3696f Reviewed-on: http://gerrit.openafs.org/5434 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3f3fedecd08834439c462725e04eb04c690c07ee Author: Jeffrey Altman Date: Thu Sep 15 01:26:00 2011 -0400 Windows: no SOCKLEN_T before WDK 6.0 Change-Id: Idc63e28385b85e808b4391bc897863c792584c70 Reviewed-on: http://gerrit.openafs.org/5433 Tested-by: BuildBot Reviewed-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b91d39edec6a8bdb7451ed6f52ea2ad2065b0022 Author: Jeffrey Altman Date: Thu Sep 15 01:11:15 2011 -0400 Windows: Redirector interface for afsd_service.exe Over the last three years the afsd_service sources have been gradually separated into distinct layers for the SMB server and the AFS cache. The eventual goal of this work was to permit the addition of alternative interfaces to the cache manager in parallel. This patchset implements the first alternative interface, a reverse ioctl model that communicates with a native IFS redirector driver. The driver will be submitted in a subsequent patchset. Although it is possible to run afsd_service with both the SMB and RDR interfaces active at the same time. In practice it is somewhat impractical because it destroys the uniformity of the \\AFS name space. The RDR loads at boot time and claims all of \\AFS. The SMB interface if active at the same time must use the old \\%HOSTNAME%-AFS. As implemented, if the RDR interface is functional the SMB interface is not started. Only if the RDR interface fails will the SMB interface be activated. The afsd_service.exe maintains all of its primary responsibilities for communicating with the AFS servers, processing callbacks, enforcing permissions, handling afs path ioctls, Windows RPC service simulation, and object management. The biggest change is in the cm_buf_t management. Data is exchanged with the RDR by passing control over cm_buf_t->data buffers in the form of Windows File Extents. This avoids data copies across a communication channel which significantly improves performance at a substantial complexity cost. Credential management is switched from a Windows username binding to a GUID binding where the GUIDs represent authentication groups that are managed by the RDR. This patchset includes additional changes to support integrated logon in conjunction with the RDR. In particular, adding support for authentication groups. Change-Id: I7135489421c67a429ec3b2acd4c8ae08b8329f6d Reviewed-on: http://gerrit.openafs.org/5432 Tested-by: BuildBot Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f03cef68fbe5ed0852397c2818d42d5f53b035b3 Author: Peter Scott Date: Thu Sep 15 01:07:03 2011 -0400 Windows: AFS Redirector Support Headers This patchset includes all of the common headers upon which all of the subsequent submissions depend. Co-authored by Jeffrey Altman Change-Id: I3b2ba6fe0a9a5231801db2cd1a340b9c518b9be4 Reviewed-on: http://gerrit.openafs.org/5431 Tested-by: BuildBot Reviewed-by: Rod Widdowson Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a82c20639843f7021fdfcca32fc6db5faa172eba Author: Stefan Kueng Date: Thu Sep 15 00:57:23 2011 -0400 Windows: Explorer Shell extensions This patchset implements a broad range of improvements to the explorer shell. There is still a significant amount of work to be done. * Remove the 'cut' and 'delete' options from the context menu if the selected object is a symlink or mount point. This is performed in a language neutral manner. * Add AFS Property page to the property sheet * Add AFS Volume Property page * Add AFS ACL Property page * force the linker to add the common-controls V6 manifest and define ISOLATION_AWARE_ENABLED to make property sheets work for the shell extension dll * Fix the InfoTip handler. Display symlink and mount point target strings Stefan Kueng was assisted by Jeffrey Altman. Change-Id: I6b7c4506026270a5408d90cdc5358864e3fb44c3 Reviewed-on: http://gerrit.openafs.org/5430 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 236c18b36a93a1c4906f84c825f03f654f5ae4dc Author: Marc Dionne Date: Wed Sep 14 17:16:52 2011 -0400 Linux: Remove use of undefined AFS_LINUX_ENV AFS_LINUX_ENV is used in a few places, mostly from commit dc077b83, but it is not defined anywhere. As a result the logic was not as intended. In the definition of osi_ThreadUnique, this means that on all Linux we use getpid(), which is OK as it gets defined appropriately under LINUX and LINUX24 as current->pid or current->tgid. Change-Id: Ic8daf10480a91ff8406cd6ca3929a2ecfafa78ad Reviewed-on: http://gerrit.openafs.org/5424 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 17be9b775c0be234879eeda66707581e23a18d08 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. Change-Id: I82a84380175d9ef5c41ef29d9043671d264df589 Reviewed-on: http://gerrit.openafs.org/5427 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d355b4d6fce477e275ac34eb04b3d0f5504dd6fb 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 Change-Id: Id81cfccd2c2c15d7fcbdbb5edc7dcb095abbd665 Reviewed-on: http://gerrit.openafs.org/5426 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cf57eb294f28084cbb138b1a06bc813e14e6d0ec Author: Jeffrey Altman Date: Wed Sep 14 17:46:32 2011 -0400 Windows: validate buffer hash tables in cm_MergeStatus Change-Id: I1ff76513e9f2ba08bdeb988a19fec992b08310db Reviewed-on: http://gerrit.openafs.org/5425 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit febbd0f1ae9ae8700c0f9004979442e45a5e9883 Author: Ben Kaduk Date: Mon Sep 12 21:54:09 2011 -0400 Tidy up event hash table definitions a bit more The change in http://gerrit.openafs.org/5314 consolidated the definitions of struct afs_event and some related objects, but the definitions were not quite in the right place. In http://gerrit.openafs.org/5392 this content was moved to more standard headers, but a comment and #define were missed. This change moves the comment to be in the same place as the content. Change-Id: I86831879e9a2afd9e653182dcba4621624c55471 Reviewed-on: http://gerrit.openafs.org/5403 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 58d136ed0d35db6859eb3648969512eca216cbb2 Author: Simon Wilkinson Date: Tue Sep 13 09:54:12 2011 +0100 Use rra-c-util m4 from src/external This commit switches us over from using manually maintained copies of Russ's rra-c-util m4 macros, to using ones that are automatically imported from his upstream git tree. The macro versioning in the OpenAFS tree was slightly confused. This (approximately) updates us from using version 3.3 of the macros to version 3.8. The signifcant changes are: *) Use PATH_KRB5_CONFIG rather than KRB5_CONFIG to set the location of the krb5-config file *) Use --with-gssapi-{include, lib} if given, rather than krb5-config *) Use --with-krb5-{include, lib} if given, rather than krb5-config *) Define HAVE_KERBEROS if we find a Kerberos library The first, in particular, is likely to cause some confusion. Change-Id: Ie7a1c0db31b32fc7ac9ad7bded2c4ffce3ac013f Reviewed-on: http://gerrit.openafs.org/5418 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 60d0458f57cb95693190b29c4d8d4b75738fe363 Author: Russ Allbery Date: Tue Sep 13 09:40:59 2011 +0100 Import of code from rra-c-util This commit updates the code imported from rra-c-util to aadb400e7536b29fb2b34299ef3cac07d86c108d (release/3.8) New files are: LICENSE m4/gssapi.m4 m4/krb5.m4 m4/lib-depends.m4 m4/lib-pathname.m4 m4/pam-const.m4 Change-Id: I34d42a5491e87dc61b81ac2bf034c53dc2020f20 Reviewed-on: http://gerrit.openafs.org/5417 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78e2bb1e17b2310f3586c92a96b0def2eba476f4 Author: Simon Wilkinson Date: Tue Sep 13 09:37:04 2011 +0100 Add rra-c-util to the src/external regime We're already using a number of m4 configure tests which are taken from rra-c-util. Instead of importing these piecemeal, add rra-c-util to the src/external git import system, so that we can simply keep our selves in sync Change-Id: I58d610a3ee5f0f924b02745a89696ef46a8b0c04 Reviewed-on: http://gerrit.openafs.org/5416 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit b5a4c81fe0a25bb7f4aa0c41ea675f42657cb7a9 Author: Jeffrey Altman Date: Tue Aug 2 18:33:06 2011 -0400 Windows: osi_Debug macros The osi_Debug macros are like osi_Log macros except when used the logged values are always printed using OutputDebugString(). This interface is meant only for temporary debugging. No code that uses osi_Debug should ever be committed to the upstream repository. Change-Id: I139c81aa0c745f4f03c6900a19f65c55c495ad33 Reviewed-on: http://gerrit.openafs.org/5415 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bf2bf9a1fbb5fd4c208e1e581aa4b6ee5d0cf5d0 Author: Jeffrey Altman Date: Thu Aug 18 22:07:26 2011 -0400 Windows: daemonCheckLockInterval to 60 seconds Since we are no longer using deleted cm_fileLocks to cache file server locks, there is no need to purge the list so frequently. Change-Id: I47d1e40be8b4008a11b1114389538a110644bed0 Reviewed-on: http://gerrit.openafs.org/5412 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c9d655b9a6edf02fd92455961445f239f4667821 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. Change-Id: I2e2e781ff355f1452e991898dfb5b91c47db9e34 Reviewed-on: http://gerrit.openafs.org/5411 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1de4561529bdb92b6647a634d9f2c2714e1758e5 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 Change-Id: I8c541bc1709d2c02fb58d6d15b4a66d95647d1e7 Reviewed-on: http://gerrit.openafs.org/5414 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 793fdd3360982c48bf60eefbd9c56b4a3c1e09f0 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. Change-Id: I33fe4a02d0d1ce2cb4d192dd1b2e5f23fda4091c Reviewed-on: http://gerrit.openafs.org/5410 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6c18c8844f3be6e006c7f59b3cc36f5b1688e04f 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. Change-Id: I430d5c9941043341908cbf50ae70b982bb0ab8b3 Reviewed-on: http://gerrit.openafs.org/5398 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 11b6f9f0034a3934ffcf1dea8b1bfd915e7522ed 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. Change-Id: Iee566d5f5502b7dce900d833f5711038c984cf37 Reviewed-on: http://gerrit.openafs.org/5408 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8d939c08f60b44c83ed8db8892b93563ddea0e15 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. Change-Id: Ie34a45a4c1c88fc5732801dcefec89cbc9764f81 Reviewed-on: http://gerrit.openafs.org/5377 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 759c993c615b214bebdb5b1dc7346a72e379c135 Author: Simon Wilkinson Date: Mon Sep 12 09:42:47 2011 +0100 Add warning suppression to tcudbprocs.c When tcudbprocs.o is built as part of tbutc, it needs to have the same warning suppression as when it is built as part of butc. Change-Id: Ied3a9512676ea929f5acdb80b29875555f69113a Reviewed-on: http://gerrit.openafs.org/5402 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa6b8651251228d46b8eba472b2b84e829cfdc00 Author: Simon Wilkinson Date: Mon Sep 12 09:42:11 2011 +0100 Build tbutc and tvlserver on Darwin At some point, the build lines for tbutc and tvlserver ended up omitting Darwin platforms. This is incorrect, so re-add Darwin to the platform list. Change-Id: I7704eb19a457620b37cbe3d9cbd33d6c9bd3ae5e Reviewed-on: http://gerrit.openafs.org/5401 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit df13bb3be2d12dcb005cfe42585344826073c48c Author: Chas Williams (CONTRACTOR) Date: Mon Sep 12 15:24:39 2011 -0400 crypto: Fixes for recent Heimdal changes ignore KRB5_DEPRECATED_FUNCTIONS for now since it doesnt give any advice. Some keytypes (but not all) have been renamed. So for now we need to keep both apparently. Change-Id: I55de284448d255d5107afe03b4df56ccebc90beb Reviewed-on: http://gerrit.openafs.org/5400 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Jeffrey Altman commit f566228af82ffe8091ed14fa6ec175de624504bc Author: Heimdal Developers Date: Mon Sep 12 14:08:57 2011 -0400 Import of code from heimdal This commit updates the code imported from heimdal to b118610a9c56835c4ac5dc49ce8124cae8078346 (switch-from-svn-to-git-2478-gb118610) Upstream changes are: Harald Barth (1): Move common code to krb5_unsupported_enctype() and make error message contain string instead of error number Jeffrey Altman (1): roken: declare IN_LOOPBACKNET if necessary Love Hornquist Astrand (5): Warning fixes from Christos Zoulas Fixes from NetBSD via Thomas Klausner and Roland C. Dowdeswell Rename subsystem_DEPRECATED to subsystem_DEPRECATED_FUNCTION(X) remove trailing whitespace remove warning, remove forward declaration by moving the function up, ident Love Hörnquist Åstrand (4): don't set i = 0, its never read sprinkle doxygen and kode more like the rest of the code base partly unify enctype/keytype since there is only enctypes switch to KRB5_ENCTYPE Roland C. Dowdeswell (1): Fix a couple of bugs in krb5_c_valid_enctype(): chas williams - CONTRACTOR (1): hcrypto: var name current conflicts with linux kernel Change-Id: Id9a7a9ee8258b979b54f4ed2b4175815ab35ea21 Reviewed-on: http://gerrit.openafs.org/5399 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Jeffrey Altman commit 19a5b5e67c65f0a9109b0fb5410b5ba74ad85b41 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. Change-Id: I9fdc4e960efb0a6793316102ce2794c775693da1 Reviewed-on: http://gerrit.openafs.org/5370 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a5effd9f1011aa319fdf432c67aec604053b8656 Author: Simon Wilkinson Date: Mon Apr 25 10:46:33 2011 -0400 viced: Use libcmd for command line options Change-Id: Id402dc44bce03fcf998ad5b3f6de80fae7de9539 Reviewed-on: http://gerrit.openafs.org/5075 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e 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 Change-Id: I1f7b3ccb438bb957bb0b97456b23c11cb0b4a41b Reviewed-on: http://gerrit.openafs.org/5393 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6d274905b0b87c4947df9dccc2509295e7b28d09 Author: Simon Wilkinson Date: Sun Sep 11 12:31:55 2011 +0100 Unix CM: Fix afs_event fallout on Mac OS X Commit dc077b83c9b1f107efbc3483743f44117748f23c moved the afs_event structure definition into afs_osi.h. However, afs_osi.h is included from lots of places which don't include a complete set of platform headers. This means that the use of lck_mtx_t in this file breaks the build on Darwin. Instead, define the structure in afs.h, along with all of the rest of the cache manager structures. Also take the opportunity to move the definition of shutdown_osisleep it afs_prototypes.h, with the rest of the prototypes. Change-Id: Idd19fc30adcb5ab37e65ad87fa9224668e8cd321 Reviewed-on: http://gerrit.openafs.org/5392 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 136704fa648e5050941ed2a279cd9225b5e0ee68 Author: Simon Wilkinson Date: Sun Sep 11 12:35:18 2011 +0100 Darwin: Actually stop the kernel build At the moment, all of the kernel build lines end with "; true", which means that the build will always continue, regardless of whether creating an individual object file succeeds or not. The 'true' is there to gobble up the name of the source file which the common build infrastructure adds to the end of the command line. Instead of using '; true', use '&& true', so that if one of the C compiler commands, or the lipo, fails, we get told about it, before we try to link the missing objects. Change-Id: I11c14e6aa12188e3de044f900b3df8c8ffe5df13 Reviewed-on: http://gerrit.openafs.org/5391 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9c9b906c8a5779c48afecfa098b15206f041665d Author: Simon Wilkinson Date: Sun Jul 10 10:24:26 2011 +0100 Move string manipulation functions out of util Some functions in libafsutil depend upon the RX libraries, which means that pulling in other functions in this library can create a dependency upon RX. This is less than ideal for low-level libraries such as cmd and comerr. So, create a new low-level library (currently named 'opr') which can contain low-level functions from util, and elsewhere. This library should have no dependencies other than on system libraries and libroken. Change-Id: I703db3da4d8faf79ee82bf572af09d07152d9b25 Reviewed-on: http://gerrit.openafs.org/5363 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 440943e96b4be87abd02c47b3bcea8a5a2bdbc5f Author: chas williams - CONTRACTOR Date: Wed Sep 7 09:55:47 2011 -0400 autoconf: use $XCFLAGS from OPENAFS_OSCONF when making tests Certain platforms (like ppc64_linux26) compiler options might affect some autoconf tests. In particular, the ones related to the size of certain primitive types. Change-Id: I20c3f737ee4623451bc6cab3f97e86d152cb397f Reviewed-on: http://gerrit.openafs.org/5366 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit c2272c207bc9f6cc0ba6892dfa6d879c7594d261 Author: Simon Wilkinson Date: Wed Sep 7 18:20:24 2011 +0100 IRIX: Pull NFS translator hooks We've never had working NFS translator for IRIX, and the system call codes which are required to install the symbols used by the IBM translator have long been used for other things by OpenAFS. Simplify this mess by just removing the translator stubs from the kernel module, and all of the code in afsd which used to handle pulling addresses out of the kernel module so that we can hook ourselves in. Change-Id: I2da2b0040afc0191e236706126d75bc7d39c0936 Reviewed-on: http://gerrit.openafs.org/5375 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b34d7aa051d9bc8bcf8de2403c94741c0961af18 Author: Simon Wilkinson Date: Sun Jul 10 13:57:36 2011 +0100 volser: Don't initialise all error tables Initialising the KA and cmd error tables in vsprocs.c makes the libvolser library dependent upon rxkad and cmd. As we may want to use that library in programs which use neither rxkad, nor our command processor, this is less than ideal. So, just drop the initialisations. Change-Id: Ifd47b1b16fc014f969e2b487451e21877b6a5407 Reviewed-on: http://gerrit.openafs.org/5374 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2ba597391df8127ed610324fc6b7b489b1c1f83c Author: Simon Wilkinson Date: Tue Sep 6 14:18:12 2011 +0100 afsd: Fix res_init warning afsd requires res_init to be declared - get a definition for this by including roken.h (which has the necessary magic to figure out which set of headers are required to get resolver functions) Change-Id: I217405df223f0bc42be90aea991cb228db4da4f0 Reviewed-on: http://gerrit.openafs.org/5373 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 85d54a064b62756c0a59be030d0eb1fbc293d168 Author: Simon Wilkinson Date: Tue Sep 6 14:14:56 2011 +0100 pam: Fix test_pam on Darwin Darwin doesn't have a getpassphrase function. Fix the PAM test to use getpass, in the same way as we do for lots of other platforms. Change-Id: Ib252174ac1356a8975a9187b252d4fe0246d5d39 Reviewed-on: http://gerrit.openafs.org/5372 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1589e29f4e03919064c769372a7601957a8a033c Author: Simon Wilkinson Date: Tue Sep 6 14:03:41 2011 +0100 pam: Don't duplicate .c.o rule Our included configuration has a perfectly fine .c.o rule, so don't override it in this Makefile, as all that does is produce a warning at build time Change-Id: If8d37f50932124ef0adef64ec23d81e646da337a Reviewed-on: http://gerrit.openafs.org/5371 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ec51fcc2b67fda494ff15c5be589bb280ce49d92 Author: Russ Allbery Date: Wed Sep 7 19:25:23 2011 -0700 Import new pam-const.m4 from rra-c-util 3.8 Fixes detection of whether the PAM library uses const on FreeBSD and possibly others. Report and testing from Julien ÉLIE. Change-Id: Ice01914f4a00f73e4e473934f4ad907da3a3493f Reviewed-on: http://gerrit.openafs.org/5376 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 4ec6fd003084b02c299466bcaeac3850be10f79c Author: Jeffrey Altman Date: Tue Sep 6 11:57:18 2011 -0400 Windows: add clean rule to src/afs/NTMakefile Change-Id: I433dee1e3f9e4b5774dc8011690b6c74162772ce Reviewed-on: http://gerrit.openafs.org/5368 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b6e5493437b942d5550247761dac3311c6d73a86 Author: Jeffrey Altman Date: Wed Sep 7 13:33:36 2011 -0400 Windows: correct comments in cm_BkgStore Change-Id: I1b74db2cc37626dad2e92e86facf7bbaf71d6177 Reviewed-on: http://gerrit.openafs.org/5369 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 39b788eeafe27d21ae6b4fd3cfeb59ce5dc70077 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. Change-Id: I9c52d9d934638075fc1693ed94f20665822e5e6e Reviewed-on: http://gerrit.openafs.org/5365 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit dc077b83c9b1f107efbc3483743f44117748f23c Author: Ben Kaduk Date: Mon Jul 25 23:39:27 2011 -0400 Free memory from afs_events DARWIN and LINUX were already doing this, but everybody else had a memory leak. Consolidate most of the common code to do so, including afs_event_t definitions. Change-Id: I5ec83cf23fd15dbbd5716995c671998e35862843 Reviewed-on: http://gerrit.openafs.org/5314 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Derrick Brashear commit 327762071be3806c5d08be0218982c7027754756 Author: Simon Wilkinson Date: Tue Jul 5 09:20:15 2011 +0100 rx/rxkad: Move rxkad initialisation into rxkad When the RX pthread conversion was done, the initialisation of rxkad mutexes was incorporated into the rx library itself. This is a layering violation (it breaks the relatively clean security object abstraction), and means that you can't actually use RX without the rxkad library. So, remove all of this initialisation from RX. As security libraries don't have an explicit initialisation function, we setup our various mutexes using a pthread_once function called from the NewSecurityObject functions. This has the added bonus that it removes the final error in rx.c for pthread builds, and so another bit of warning suppression can be removed. Change-Id: I3cf9b2404a03fb58534c5f41afd77aa5ba5e2256 Reviewed-on: http://gerrit.openafs.org/5361 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit ca0f1946a2f0a75be7de6aa0ac083ffebc950624 Author: Simon Wilkinson Date: Tue Jul 5 09:27:05 2011 +0100 volser: Don't declare cstruct twice Both vsprocs.c and vsutils.c declare the global variable 'cstruct' (which is initialised by vos.c in order to pass a ubik client structure through to many of the libvolser functions). This double declaration prevents libvolser from being linked as a shared library on some platforms. We only need one of these, so just make vsprocs.c declare it, and vsutils.c refer to it as an extern. Of course, using a global variable to pass state around is really quite nasty, but let's fix that in another change. Change-Id: Ief1667bd7a5b70dbfb49cdc02cc435eb2344527e Reviewed-on: http://gerrit.openafs.org/5362 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8a24a7c933441f449192cf8c1b8d6fd728261734 Author: Rod Widdowson Date: Tue Sep 6 15:23:33 2011 +0100 Windows: Replace "%T" as format string to strftime Checkin I18ed36cc4dce9aa354ad1398710ab7db83c814a2 made strftime much more widespread. However the %T format is not available on all platforms and causes (at least) Windows servers to fail on first attempt to log. %T is just shorthand to %H:%M:%S so this checkin just replaces the one with the other. Change-Id: Ibfff133d9263f5513276d96f3624801fd8ab229e Reviewed-on: http://gerrit.openafs.org/5364 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 37d72aa15615ca32acb83ff82d35fd4508efa479 Author: Jeffrey Altman Date: Sat Sep 3 22:35:43 2011 -0400 Windows: Freelance vnode,unique pairs The redirector maintains file object state after the afs service has shutdown in case it is restarted. It is critical that Freelance FIDs not be reused. Add cm_data.fakeDirVersion into the mix when generating unique values. Change-Id: I1cf480d3e0ec6e0b7eadf731a1ef867079c2dc44 Reviewed-on: http://gerrit.openafs.org/5357 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 796684c024bfd675072bc067289b55dba2f130db Author: Jeffrey Altman Date: Sat Sep 3 21:33:00 2011 -0400 windows: fix comments, add logging Change-Id: I383ce8679828f91d013d1f98ea3d25c73a0399df Reviewed-on: http://gerrit.openafs.org/5356 Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit b6f23864ffa380923f50d424063ad0804e407f4a 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 Change-Id: Ic152707fd3f0a7592409a5f570c02488f5503a9c Reviewed-on: http://gerrit.openafs.org/5359 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 33af0f92e9b8a50c5a6dd17a9065c0ef58597c28 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 Change-Id: I5d134f045a0c935fdaaef6edf5bdf37bb0418a98 Reviewed-on: http://gerrit.openafs.org/5360 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c3e82ee98bf66058636f11d7a98d3bebe3bac955 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. Change-Id: Ib78c5a189b6980223946aff9cf027419127c35bd Reviewed-on: http://gerrit.openafs.org/5328 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Derrick Brashear commit def00ae8ba774f4d7290c29208484dda756dc0e0 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. Change-Id: I621f54d8e8182b29ccfdf82798773800f5870064 Reviewed-on: http://gerrit.openafs.org/5335 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3e3400e422129a8a19d180c4e37689294d927ecb Author: Jeffrey Altman Date: Sat Sep 3 20:09:20 2011 -0400 Windows: tailor smb_MapNTError output for redirector Separate mappings apply for the afs redirector. Add a boolean parameter to the function signature that is set true when the call requires the redirector mapping. Change-Id: Ib2892b6c78047f3f1d289e31c4236ea90d8026ab Reviewed-on: http://gerrit.openafs.org/5351 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9b0cb614387403ff433cf39f84c13b626b1b9bdc 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. Change-Id: Ida8fdc4214844dad009362877f125aa5d20120a1 Reviewed-on: http://gerrit.openafs.org/5355 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 537592f6bbda0c659c25ae7068f50504e2a5e116 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. Change-Id: I570682ef1cd6801f1467c4b1af40ae6591a33862 Reviewed-on: http://gerrit.openafs.org/5354 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1e23761b7fadc260b32bebb0343a9b5b1de37cf4 Author: Jeffrey Altman Date: Sat Sep 3 20:22:19 2011 -0400 Windows: remove dead code from cm_scache.c Change-Id: Ibc5ae641f6bacbe0975f8ffaf0d4cff3e294959a Reviewed-on: http://gerrit.openafs.org/5353 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 741e478970a17edda84f2d2c4689a99e90510edd Author: Jeffrey Altman Date: Sat Sep 3 20:16:09 2011 -0400 Windows: add cm_Gen8Dot3VolNameW() Change-Id: Ic514719ee247d60862cc9ff07de16e5de4ffb774 Reviewed-on: http://gerrit.openafs.org/5352 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 69463ac0cb367202485aac9977f8b4c47fb067f2 Author: Jeffrey Altman Date: Sat Sep 3 20:06:21 2011 -0400 Windows: add logging to smb_IoctlRead Change-Id: Ia1c7fc1035eee07de47776e63d6a054ee2809f2f Reviewed-on: http://gerrit.openafs.org/5350 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2588dd12478afb96a72f0cd788233ecf2145830f Author: Jeffrey Altman Date: Sat Sep 3 20:03:28 2011 -0400 Windows: remove potential data loss warning with cast Change-Id: If9cbe1b777452dba5b0785d8abfccb9ec31540e3 Reviewed-on: http://gerrit.openafs.org/5349 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 722843e2df533e8fcf245f2a3b10ef686992deb2 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(). Change-Id: I8f805c2860e33df37040ee3785f18358e1a9b762 Reviewed-on: http://gerrit.openafs.org/5348 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1d6593e952ce82c778b1cd6e40c6e22ec756daf1 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. Change-Id: Ie19d12e3d3f0068c88d0a9c83f6a96d51baee018 Reviewed-on: http://gerrit.openafs.org/5305 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0f4dfaed6b25ae4282298cc2ba4908ce9f36f043 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. Change-Id: I73210e0d05869827ba99d09f504052d1a6797669 Reviewed-on: http://gerrit.openafs.org/5317 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b298138bc49c1d1dae0495e03f4a561f0bd5dd82 Author: Simon Wilkinson Date: Mon Aug 29 23:36:41 2011 +0100 libafs: Fix directory verification With the earlier directory verification changes, every directory was seen as corrupt, because the nde pointer was never being initialised Rework the way that we check for the failure of afs_dir_GetVerifiedBlob so that we can more robustly detect problems, whilst still allowing normal directories to be browsed as before Change-Id: I3d3f428025296956b5feff6ba290aaef79817dcd Reviewed-on: http://gerrit.openafs.org/5318 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8e97cf6f215d5575c63d86eaec59031399f4beda Author: Marc Dionne Date: Sat Sep 3 12:32:33 2011 -0400 Linux: make sure backing_dev_info is zeroed The afs backing_dev_info structure is allocated dynamically with kmalloc, which doesn't zero out the contents. In particular there's no guarantee that congested_fn is NULL, causing spurious oopses when bdi_congested tries to call it. Change-Id: Ieeed870905627a132a0d1bd2f15cf80443b36303 Reviewed-on: http://gerrit.openafs.org/5334 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbaefa266d433af3b9a082a360e23a42f161d80f 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. Change-Id: Icf4e152ce52f2b32c99920f83a5cc3136c05d2cd Reviewed-on: http://gerrit.openafs.org/5332 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 20772897654b58da6f7d4cd0bd2caf169abddd50 Author: Jeffrey Altman Date: Sat Sep 3 19:03:05 2011 -0400 Windows: correct log message in buf_Sync() Change-Id: I808e37584a8dda303c037dca82c2230ff884560f Reviewed-on: http://gerrit.openafs.org/5347 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2f9f19085e83d3050748d03b9db903f06bba17ac Author: Jeffrey Altman Date: Sat Sep 3 18:57:09 2011 -0400 Windows: restructure cm_ResetACLCache locking Change-Id: Ic22ba2f54463dd0efa0efa1fff83890eb6d61cc1 Reviewed-on: http://gerrit.openafs.org/5346 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0954e0ef9a34ca74886900a938f091e5bf9befd9 Author: Jeffrey Altman Date: Mon Feb 28 01:27:33 2011 +0000 Windows: add cm_BPlusDirEnumBulkStatOne cm_BPlusDirEnumBulkStatOne() is similar to cm_BPlusDirEnumBulkStat() except that it is used to obtain the status info for one FID in particular via RXAFS_InlineBulkStat, the parent directory FID, and up to 48 other FIDs in the same directory which do not currently have a registered callback. The parent directory is included to prevent the directory FID callback from expiring when a directory such as /afs/andrew.cmu.edu/usr/ that requires more status objects then exist in the cache are continuously recycled. Up to 48 other FIDs are requested since in most cases on Windows every entry in a directory is required for an enumeration. Change-Id: Ic53134498ac0e776232a6f9c97cdb26367959546 Reviewed-on: http://gerrit.openafs.org/5345 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1a0dd342cc21a307e568efdc2b7ae40fda310edb Author: Jeffrey Altman Date: Thu Jan 27 23:09:00 2011 -0500 Windows: remove warnings afskfw.c Sometimes warnings are errors and sometimes they are just warnings. In this case, the krb5 error message functions were being passed a krb5_context with the wrong level of indirection which resulted in an actual error. Other warnings were due to improper typing and unnecessary casts. Fix them all. Change-Id: Ib2cefe94acca858dda9af92baaae3168c074bb2e Reviewed-on: http://gerrit.openafs.org/5344 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 79e3af59f1737e46a5bbc58fc8d73f5e38ed8c30 Author: Jeffrey Altman Date: Sat Sep 3 18:41:43 2011 -0400 Windows: non-persistent cache from pagefile->heap Change the non-persistent cache mode to use a heap allocated cache in place of a paging file allocated cache. With a heap cache the memory for the cache can be locked into physical memory so it won't be swapped out when running in virtual machines. This patch does not apply such memory locking. Change-Id: I85e6da1bba481d3d9bca84673b918b1d7cde71f9 Reviewed-on: http://gerrit.openafs.org/5343 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6aeab6595e4a36429943c22466b1b38591305240 Author: Jeffrey Altman Date: Mon Jul 18 16:16:42 2011 -0400 Windows: Only mask Delete permission for SMB reqs For SMB requests the Delete permission is masked if the readonly attribute is set on the file. Do not apply this heuristic to non-SMB requests. Change-Id: I6617e935cb32796e4a95b4eac0bec9519bd3e937 Reviewed-on: http://gerrit.openafs.org/5342 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7dcc4766377b99c60db60328c21a3990db132268 Author: Jeffrey Altman Date: Thu Sep 1 09:51:06 2011 -0400 Windows: buf_SetDirty do nothing if length is zero Change-Id: Id6a96feadccc437900e944ab23b45d2717766e1c Reviewed-on: http://gerrit.openafs.org/5358 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit abe0e6b7bca7fe02c4b08cc621f7a97dfcd82b1b Author: Jeffrey Altman Date: Sat Sep 3 18:25:10 2011 -0400 Windows: conditionalize cm_Analyze timeLeft on SMB or RDR Restrict timeLeft in cm_Analyze() to SMB constraints only when SMB mode is in use. Change-Id: Iff37b90c1532fe9aa7d57567f4ff4e5e6877cb65 Reviewed-on: http://gerrit.openafs.org/5341 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f1ca805de8cc4e79b683663e5aaca69188f81497 Author: Jeffrey Altman Date: Sat Sep 3 18:22:53 2011 -0400 Windows: additional CM_REQ flags Change-Id: Ic620d157817e39053e75ba79ad7d582ba3067424 Reviewed-on: http://gerrit.openafs.org/5340 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21496cc223b82081ebdf1de9ef5aeb7dc812489b Author: Jeffrey Altman Date: Sat Sep 3 18:19:58 2011 -0400 Windows: add connection defaults for RDR mode CM_CONN_IFS_HARDDEADTIME 120 CM_CONN_IFS_CONNDEADTIME 50 CM_CONN_IFS_IDLEDEADTIME 50 Change-Id: I0b110f2a33879bb889d4ad4b54b7c218a1006e65 Reviewed-on: http://gerrit.openafs.org/5339 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b861e17c0bc34ea2042879bc705f5d26a7e0a77f Author: Jeffrey Altman Date: Sat Sep 3 18:17:21 2011 -0400 Windows: log SMB or RDR in use at startup Change-Id: Ib38d8a755a8ace9db672ce2d10bcdd370e9e3de6 Reviewed-on: http://gerrit.openafs.org/5338 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 070383939d84aaf6aff9885328439a19b789286c Author: Jeffrey Altman Date: Sat Sep 3 18:13:31 2011 -0400 Windows: Make use of SMB interface a runtime decision Add 'smb_Enabled' and 'RDR_Initialized' flag variables. Default smb_Enabled to true and RDR_Initialized to false. Add registry value "SMBInterfaceEnabled" to permit disabling the SMB interface. If the redirector interface is initialized (a future set of patchsets will add it) disable the SMB interface at runtime. Change-Id: I354e121001d942421aa98490b62b710ac175051f Reviewed-on: http://gerrit.openafs.org/5337 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f7d0e800eba62f4984795cb7b487f6695f6fedcc Author: Jeffrey Altman Date: Fri Aug 6 18:24:47 2010 -0400 Windows: pioctl path retrying with \\afs\all When the redirector is in use, \\AFS is identified as being an AFS path. With the SMB redirector, \\AFS was not considered a valid path. In order to simulate the notion of \\AFS being the root volume, failover logic was added to the symlink and fs modules being triggered that would retry a request for \\afs\foo as \\afs\all\foo. The VIOC_SYMLINK and VIOC_AFS_CREATE_MT_PT pioctls are broken. The 'path' parameter that is passed in contains the directory entry that is to be created. Since the AFS redirector maps \\afs to the root.afs volume the "foo" in \\afs\foo must exist in order for the _._AFS_IOCTL_._ special file to be opened. This patch implements an alternative to the failover. If the opcode is one of the two listed above and the input path is a UNC path, then the path is re-written as \\AFS\all. This is necessary because the repeated attempts to open a UNC path through the SMB redirector with different usernames can result in the smb session becoming disconnected. If this is done when the SYSTEM account is in use, the tokens associated with the connection can be lost. LICENSE MIT Change-Id: I2c2f6c08c7ca5c137062d34e1353731b6f78f633 Reviewed-on: http://gerrit.openafs.org/5336 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2271d481d33b2b2ad56dcd4fc9fbdd726fc1967b 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. Change-Id: Ib9ea4597fcda47aa9dce0fbf92675a6606e2ec6e Reviewed-on: http://gerrit.openafs.org/5333 Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 8127e9332be8cadda001f05c6036d4c87e04cb4a 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. Change-Id: I4626f4bdcf601cd1b421dd3d373edd634cc78527 Reviewed-on: http://gerrit.openafs.org/5331 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f37b6dfaf050ec0270979c8310fb471c16b66cd3 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. Change-Id: I51b383150b0186867e1c51a28b01e8483ee470f2 Reviewed-on: http://gerrit.openafs.org/5330 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 9563dd68fc1fb4b86016106aaacd33732d4cf6ed 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. Change-Id: If4a26514959d3fd82e4b583a993ccea393267fdd Reviewed-on: http://gerrit.openafs.org/5329 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 85f917d0762dfb0c22cddf4b0cab3bf76efa0f62 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. Change-Id: I3ea2f3df6e0f39aafb421f6b0854af5d85659742 Reviewed-on: http://gerrit.openafs.org/5205 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 16dff61e148ce6893a68dda6e05e84f96fa753ac 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. Change-Id: I648900849a5a7349adc686658872706bd7024c90 Reviewed-on: http://gerrit.openafs.org/5303 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 12fa5b859b857aaf0ab6975ebac0d4867d0ae0ff 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)) Change-Id: If295d0b9ce347c1cc24df12cd9934a30dce2a3c6 Reviewed-on: http://gerrit.openafs.org/5294 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 24287ff0154c49a2563c9a08ff44ff72583095e4 Author: Derrick Brashear Date: Tue Aug 30 01:18:37 2011 -0400 redhat: mockbuild updates for repoquery for starters, mock should be careful not to use parent yum cache when running repoquery, the host runs it, we want the guests's yum cache. be careful to not attempt to use the parent's yum cache (in the default config). additionally, we need to not try to build 64 bit kernel modules in 32 bit chroots. expand the list of rpms while ejecting any which are 64 bit if we're 32. additionally, blacklist kernels which are the wrong osver. Change-Id: Id2a68cf66ddae57458c9f97314cd492e7b5132a8 Reviewed-on: http://gerrit.openafs.org/5322 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8d4f65c3021b3416d290a1d5f1e8e61d14a936c7 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. Change-Id: Iaad401be067513e2bf42609f0b0d407ba5c6302d Reviewed-on: http://gerrit.openafs.org/5323 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 130144850c6d05bc69e06257a5d7219eb98697d8 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. Change-Id: I857ea48bf8e12ec006ef24affb2e65a105ce27bb Reviewed-on: http://gerrit.openafs.org/5237 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 33bb5218ba8d6c5b5c5c4839fd31824ca90c062b 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. Change-Id: I6e9635dfe1fe6d4633486acf1e9cc35a96f33cd6 Reviewed-on: http://gerrit.openafs.org/5310 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 3d4e111dd6c4201476e7447fdfaa27ed630032c5 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. Change-Id: I4ba233b38bda547af35aa4b363edc819bcc3792c Reviewed-on: http://gerrit.openafs.org/5316 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 971a103cd088ddbaf227d562fc64f8c728bbc235 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. Change-Id: I1ed4ac7a7fed5d86d607ecfd5e027f62ec26a82f Reviewed-on: http://gerrit.openafs.org/5315 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9052974812e33d186613c31e318673f9268467c6 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. Change-Id: I845bc633f17f21946ce7de796d66c0bb429005cd Reviewed-on: http://gerrit.openafs.org/5313 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 209d59a61ba9614a8b9d231d828f74a3e9bdaa27 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. Change-Id: Ia8ac1fd827ab8fb47aea0b527acd3c7f7070e873 Reviewed-on: http://gerrit.openafs.org/5312 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 40c9163aa9f266c4ad3a0a5a68e0aae0c35e3e51 Author: Garrett Wollman Date: Mon Aug 8 23:59:17 2011 -0400 libafs: crash in a more useful way if nchunks is zero In afs_CacheStoreDCaches(), if the parameter nchunks is zero, the main loop will not execute, leaving the XSTATS pointer unchanged, which will result in a null dereference in XSTATS_END_TIME. Instead assert that nchunks is nonzero, which will help the static analyzer and will also generate a more useful panic message should this error ever be encountered in operation. There is presently only one call site, and it may be the case that this condition can never be triggered. (While in the neighborhood, also avoid dereferencing tdc immediately before testing whether it is null.) Change-Id: Idf68f1306d3e09771425c62df139c1de11806c22 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5179 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit edbe891abfb00be2c9f4de474db2dd784f2d5a61 Author: Garrett Wollman Date: Wed Aug 10 21:52:44 2011 -0400 libafs: FillStoreStats doesn't need to be global; avoid pass-by-pointer FillStoreStats is only used in afs_fetchstore.c, so make it static. Parameter xferStartTime is an osi_timeval, which should be small enough to pass by value, so do so. Change-Id: Ic47eae8babb3b7cadbbbca2f10e2e070e2457590 Reviewed-on: http://gerrit.openafs.org/5199 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 90681a59bac641c4c4d70c0bb500845be3577c33 Author: chas williams - CONTRACTOR Date: Sat Aug 13 10:29:31 2011 -0400 doc: missing $DBTOEPUB variable in the Makefile Change-Id: I623859ae58fea6a602221ca5d111605004b4a27f Reviewed-on: http://gerrit.openafs.org/5256 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 597de25969ebdeaafb7390984b5ce2c8782fd557 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. Change-Id: I3188a18f7833950cf5454b3ffe4a4ce0c69e234f Reviewed-on: http://gerrit.openafs.org/5308 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6d79cfb36165c33dd1fd9c4d7ca8436d9a78f7ff 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. Change-Id: I4e3b3319ae14b7e68a87f5fe172419f5ebf9d2c9 Reviewed-on: http://gerrit.openafs.org/5307 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit fa97579a08cdf23fcff3c50a5845d72a785feeaf 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. Change-Id: Icbffdf21c6fc7929483589e87ffe9131834c79b4 Reviewed-on: http://gerrit.openafs.org/5309 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 2dbdcc5fde93673efba132cad432029e03aef486 Author: Derrick Brashear Date: Wed Aug 24 22:53:38 2011 -0400 roken: no strcasecmp we don't provide it, don't map it. Change-Id: Ifcbb1ec66c374ef8cd6eaddf1954dcd688ae3e9b Reviewed-on: http://gerrit.openafs.org/5311 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit c23b27a69322f4c9963a532d5cbcb136b23bb20c 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. Change-Id: I38835ee86405c4f3f798ad6be8626e6da507109f Reviewed-on: http://gerrit.openafs.org/5304 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b804e027f1a9d8dfaad3d348390a83493b53a6c7 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. Change-Id: I0e22f8d547a8fa0067cfc918f578b8fe11cc781a Reviewed-on: http://gerrit.openafs.org/5302 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit bca64c70467afd00ca02290a4236bc295ec4633c Author: Jeffrey Altman Date: Sun Aug 21 00:36:44 2011 -0400 Windows: cm_serverLock read required not write Change-Id: I9e804ddd7de824b2f5ce880e52c08bff6b0615e7 Reviewed-on: http://gerrit.openafs.org/5301 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b2c1313f2f39ffff22a2a991dcb01428f118a3c7 Author: Jeffrey Altman Date: Thu Aug 18 21:58:50 2011 -0400 Windows: Be more efficient when processing locks Do not drop the cm_scacheLock only to reacquire it a few lines later. Do not manually set the tail of the queue when osi_RemoveHT does it for us. Change-Id: I61b2e54a4864760d257dfcd2841c2c15f1ee41fe Reviewed-on: http://gerrit.openafs.org/5300 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a576ff1e53a539e88b9f3fa6b8132d4f161b0bd4 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. Change-Id: Ic1933a989a4e8c95a1417679e9bc7cbc4e14dd12 Reviewed-on: http://gerrit.openafs.org/5299 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a6138b412d3b4197b22ca7fb63d8cdc9671ef67c Author: Jeffrey Altman Date: Thu Aug 18 21:53:45 2011 -0400 Windows: Track file server lock count The fsLockCount field is the lock count reported by the file server as part of the status info. Lock acquisition and releasing does not obtain new status info but we can estimate what the lock count is by tracking it ourselves for each of our successful RXAFS_SetLock and RXAFS_ReleaseLock RPCs and failed RXAFS_ExtendLock RPCs. Change-Id: Ib5dc5853d82a1292e848bf67d4d9932485177d91 Reviewed-on: http://gerrit.openafs.org/5298 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ae87a1aff2a99841701c1e8a7a0dbb699ea14102 Author: Jeffrey Altman Date: Mon Aug 22 21:12:25 2011 -0400 Windows: remove signed/unsigned mismatch cm_aclent.c Change-Id: I6cf41410d84b96d2fbe9fd8f1602a7aaa2c1797d Reviewed-on: http://gerrit.openafs.org/5297 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 21acdd92c8510a9f99243588388a2a1078547533 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. Change-Id: Ic3f55ae08da36900fc8c7a89b6487ae53f381eb3 Reviewed-on: http://gerrit.openafs.org/5296 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0fb2e3a6dbfdf91bcf1591e454a00171792b7a38 Author: Marc Dionne Date: Sun Aug 21 12:02:29 2011 -0400 dir: verified pathnames fallout Fix some issues introduced with the verified directory path names commit in master: - In GetVerifiedBlob, the output parameter is set to NULL on entry and dereferenced later on. - For Linux, the code in afs_linux_readdir was changed to pass a DirEntry to GetVerifiedBlob. This is incorrect, the function still expects a DirBuffer pointer. - In afs_dir_IsEmpty, the assignment of ep was removed, leaving the function to dereference this pointer which was never set. Change-Id: I9045076ebe636cf68c19487c0d58baebf2de7dd1 Reviewed-on: http://gerrit.openafs.org/5292 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9581821a4599e1ba871360dcf8503e13eb6516b6 Author: chas williams - CONTRACTOR Date: Sat Aug 13 11:01:28 2011 -0400 pod: use /OPTIONS when referring to the local OPTIONS section Change-Id: I889e3a89f5cc68b816a822b6a23db30ac6fe2357 Reviewed-on: http://gerrit.openafs.org/5257 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85bb872e3df6b6f54764d90996bc52904ccd4385 Author: chas williams - CONTRACTOR Date: Sat Aug 13 10:18:45 2011 -0400 doc: generate admin ref from the pod documentation a bit convoluted but this generates docbook from the pod documentation and from that pdf, epub and mobi versions. we are using variablelist.as.block since that looks prettier on smaller devices/screen. Change-Id: I5cd51ef10448373960a0aeed15212bbcf6f44039 Change-Id: Ib222dbfa30e3af644b1dbc6738df1d39cc33c92f Reviewed-on: http://gerrit.openafs.org/5255 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0754537c11f034966c79ebd2330e1155c736badf Author: Russ Allbery Date: Sun Jul 24 16:20:05 2011 -0700 Don't fail to build documentation if kindlegen doesn't exist Check for kindlegen in configure and do nothing in the MOBI build rule if the binary didn't exist. This is still a bit of a hack since the rule will run with every invocation of make. The target needs to be made conditional. But at least this way make all in the documentation directory doesn't fail. Change-Id: I57f158929b3907678b9848a60edb9765136f7dbb Reviewed-on: http://gerrit.openafs.org/5090 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit add66023a05bf9a380eef34bd4fcc80d343fffad Author: Jeffrey Altman Date: Mon Aug 22 09:00:47 2011 -0400 Windows: avoid cm_serverLock refcount leak Change-Id: I4e46750de130557b7d4779f83029b69bc28eaf4b Reviewed-on: http://gerrit.openafs.org/5293 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 5836464f454f0bb4612c665d27061956d4c745af Author: Garrett Wollman Date: Sat Aug 13 18:34:47 2011 -0400 libafs: don't crash if afs_write() is called with zero-length uio If AFS_UIO_RESID(auio) is zero in afs_write(), we could end up calling afsio_free(NULL). Guard the free. (In the alternative, perhaps we should just osi_Assert(totalLength > 0) instead?) Change-Id: Ic218f039e2034b679cb4817a543af2e8307f36f8 Found-by: clang static analyzer with the help of AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5259 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 259eaa99155921c42888fce8c6c398252bd3b937 Author: Jeffrey Altman Date: Tue Aug 16 10:49:46 2011 -0400 Windows: torture test updates roken'ize remove dead code Change-Id: Id556ded4b3340fac1d58b5407f82d394ab1d18b2 Reviewed-on: http://gerrit.openafs.org/5290 Tested-by: Rod Widdowson Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 361cf11db36db2fc94c7e4961061423fb13e4cf8 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. Change-Id: Icb678bd2da148f59546f5e3d5cfda0251e76bdca Reviewed-on: http://gerrit.openafs.org/5287 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bec9c12859a22efadb657e7b3995af00fcf91b83 Author: Russ Allbery Date: Sun Jul 24 16:22:35 2011 -0700 Prefer dblatex to docbook2pdf docbook2pdf, at least in version 0.6.14-1.1 in Debian, dies while attempting to build the Admin Guide with an error about TeX capacity exceeded. dblatex seems to work reliably. If both are installed, prefer dblatex to docbook2pdf. Change-Id: I7cf594c677cde84410bfefacf07cbbf398026ff3 Reviewed-on: http://gerrit.openafs.org/5091 Reviewed-by: Derrick Brashear Tested-by: Russ Allbery commit ad6e19331e4f3ec6566dc224f1e1c943a69c62bb 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. Change-Id: I45ac36f12565320576070fd1c6d1f99ac6db8a63 Reviewed-on: http://gerrit.openafs.org/5278 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit b88c0482f445e11d82804fba08e42944b7253200 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 Change-Id: I2906b0515a1c91f3ea6eb51ec3dcd161675e8060 Reviewed-on: http://gerrit.openafs.org/5285 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1a0b99e654831fe28794f8e0cec2ab94f07ec965 Author: Jeffrey Altman Date: Mon Aug 15 00:37:31 2011 -0400 Windows: add assertions to cm_scache.c Change-Id: If9a47c3b1507b5b4aa9c271204ff496c5b0a88a0 Reviewed-on: http://gerrit.openafs.org/5280 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c58ae34f72d25434cd59228806ca59a6ff39a903 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. Change-Id: I025a8d76f3f7b94ae00bfd4e000750a90d38b343 Reviewed-on: http://gerrit.openafs.org/5279 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 020b415be8fa357cded6eb4c50454aaa5b0722bf 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. Change-Id: I4a42ad597a7e1806bbae6d63bf1a2db365e6be8e Reviewed-on: http://gerrit.openafs.org/5281 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 73b91bf0c0a86e55d6879573aeadd99a137ebf3b Author: Jeffrey Altman Date: Sun Aug 14 21:41:47 2011 -0400 Windows: More interlocked ops for cm_cell flags Change-Id: I9e5cae6152439af75a9baf85900117ca9b456f40 Reviewed-on: http://gerrit.openafs.org/5274 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit f75214282795b23c433b2512b00d24b3e6166b76 Author: Jeffrey Altman Date: Sun Aug 14 21:41:19 2011 -0400 Windows: Interlocked ops for cm_user flags Change-Id: I64932b0d15b439614b6bbba0ba875eacb1260832 Reviewed-on: http://gerrit.openafs.org/5273 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a5d66d05fa0308d505de8bde59442e29be9d04f8 Author: GCO Public CellServDB Date: Sun Aug 14 18:43:08 2011 -0400 CellServDB update 14 Aug 2011 Change-Id: I2b18a59001c4a5fe041e977ee0321cfafb22fa91 Reviewed-on: http://gerrit.openafs.org/5270 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit b97383c1e68a0b94baa8d05b2ab2531f96e7b63c 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. Change-Id: I427fa849ff34734a2dd11d06f42bc709bb70a74e Reviewed-on: http://gerrit.openafs.org/5268 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c20010850e2b43a0b9a6d74357ea6111dbf3409e 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. Change-Id: Ia26e21e1f007875ce316d2ae45a1fbf6fed835f9 Reviewed-on: http://gerrit.openafs.org/5266 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 10d27341808be41b29fbcc09b8bd7523c3b7a541 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. Change-Id: Ib0891636a3479bf97cdeab823189e659cb261aa6 Found-by: clang static analyzer with help from AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5260 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5c0e92a159f11366a88adab4700e3f909124a06a Author: Garrett Wollman Date: Sat Aug 13 19:01:26 2011 -0400 libafs: don't free a null pointer in an unlikely error condition It is extremely unlikely that we will ever fail to allocate two bytes in SRXAFSCB_GetCellServDB() to hold the empty-string return value for the case where the specified cell can't be found. But that would result in freeing a null pointer, so check for it. Change-Id: I47a296148e231b0ef20ecd18b8458b912f22a58c Found-by: clang static analyzer with the help of AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5261 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ee56107d4d168ef07968afeaa7f1c5b39f5c5b23 Author: Garrett Wollman Date: Sat Aug 13 19:12:50 2011 -0400 libafs: don't free the NULL we get from a failed allocation In extractPioctlToken(), if we fail to allocate space for token_opaque_val, don't immediately pass the null pointer to osi_Free on the error exit path. Change-Id: Ic95e178cfbc1b1bbcb18701c0bbd5221426342ee Found-by: clang static analyzer with help from AFS_NONNULL Reviewed-on: http://gerrit.openafs.org/5262 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5b40c5f5294964fc09df2c8332ab63cd2d729264 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. Change-Id: Ibabfc3b2e1b716f2a0cc664a4667bc9219fde09c Reviewed-on: http://gerrit.openafs.org/5258 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 8f446c7463c9183d59a30343682e31ad9f85b307 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. Change-Id: Ie65cdca4461e84c675e8a29e22cef3e15679fda7 Reviewed-on: http://gerrit.openafs.org/5248 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 578db3bbecf218e3ab80f4896b7cde4d3975daaa Author: Jeffrey Altman Date: Fri Aug 12 19:01:56 2011 -0400 Windows: remove unused variables in fs.c Change-Id: Ie0f21b84266d77d0c92244d5c8a6958d9bfe7e71 Reviewed-on: http://gerrit.openafs.org/5247 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 145a8490c761a0ebf7b3a1cc3017bbe8635f8014 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. Change-Id: I95f9136cecb476f70fe694847a518eabd2d1ef44 Reviewed-on: http://gerrit.openafs.org/5240 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit ef3ef1992115e6b61a7859fa2295726af0fb9318 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 Change-Id: Id71d46381c8fbade3ea72c581911447fe6ade395 Reviewed-on: http://gerrit.openafs.org/5246 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bb25bdfcb059fc54a57fd4733ce3184e231ca88d Author: Simon Wilkinson Date: Sat Jul 16 22:59:12 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. Change-Id: I9e281571f3b01bd8de346ee5418df38b2f5edaa1 Reviewed-on: http://gerrit.openafs.org/5242 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d1946ffe9be0031a2daf907f5e96cf0ee7f5e15e Author: Simon Wilkinson Date: Sat Jul 16 22:57:55 2011 +0100 libafs/dir: Verify directory pathnames Provide a new routine, afs_dir_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. Change-Id: I4b3bbb95cb49645a8ac52e6061f9e24f89924831 Reviewed-on: http://gerrit.openafs.org/5241 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 6f725c441529ccd1616adeda19c7c0b43dcfd9cb Author: Jeffrey Altman Date: Fri Aug 12 16:30:26 2011 -0400 Windows: ChangeLog for 1.6.0 (final) Change-Id: Idd457c7ea4617f9d698d07359f750df25bab4c7c Reviewed-on: http://gerrit.openafs.org/5239 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e3148c6bfad25fdcb86b7248bd6b05432502d4ce Author: Garrett Wollman Date: Fri Aug 12 00:39:54 2011 -0400 FBSD: coalesce three assignments to the same variable Change-Id: Iadc9652c03a2d3453addab759c9f8f0048929e2b Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5233 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cbdca2996af06c57cb3ba953c1efb9e316d18f27 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 commit a3b4cd3c7325c7878ec7b47008f0eec8bfcb1175 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. Change-Id: Ie8b026992bdde1b46117e6f592f9cf0ea4c85a7e Reviewed-on: http://gerrit.openafs.org/5181 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8a25d1a1de4a27c87c193ea9588424d56ceed413 Author: Garrett Wollman Date: Wed Aug 10 23:20:57 2011 -0400 rx: make queue macros easier to follow Nothing depends on the queue-manipulation macros having the expression nature, so make them proper statements and unpack the comma-expressions to make it easier to read and understand how they work. This should not change the object code. Change-Id: Icf14537f902768429aa27f67f8acfe39ac996214 Reviewed-on: http://gerrit.openafs.org/5200 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit d18ff03b59cf26423795f735decdcaf13097c446 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. Change-Id: Ia9fe6d96615c7fa816f4a88b794faa6ee7e1d010 Reviewed-on: http://gerrit.openafs.org/5206 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 7ab34058120ebcc218e4061ea3ac3c8eeca6d83e 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. Change-Id: I3d9504827cb74f8770e344cea1c06a6e786785b3 Reviewed-on: http://gerrit.openafs.org/5197 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4876a416d2e59e87f9da8834db1ea4770f2c618c Author: Jeffrey Altman Date: Wed Aug 10 11:42:59 2011 -0400 Windows: Interlocked for cm_buf cmFlags Change-Id: I7ed2847afdcbc94c9023c6686d3c81f7863d7f61 Reviewed-on: http://gerrit.openafs.org/5196 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 8661c9b6710322195b00de6ae03b3172712104aa Author: Jeffrey Altman Date: Wed Aug 10 12:02:20 2011 -0400 Windows: fix tptserver director creation Change-Id: Ifc2433068e1811633f4ac80d3b4a2a9d16226f16 Reviewed-on: http://gerrit.openafs.org/5195 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit cbd075a36000d0b54b64eb7d9736587b27a08e9e 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. Change-Id: I1a062a5c49d793162b83b9f4f3c32185ae596369 Reviewed-on: http://gerrit.openafs.org/5194 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 75297d4439bb30ddd9968805aecf2cc2812bfdf0 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. Change-Id: Ice87dc5de395b54e7e30e362d2e72caa9062120e Reviewed-on: http://gerrit.openafs.org/5193 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit deb8c893c2bd78b2871ccf1ff733539534a2890e 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. Change-Id: I45c0a39ea935db2c231a30ecb02963f35b6d734c Reviewed-on: http://gerrit.openafs.org/5192 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ec1295d11b5e75fa942fe8c3a0f16309c5486ed4 Author: Jeffrey Altman Date: Tue Aug 9 17:25:50 2011 -0400 Windows: implement InterlockedAnd/Or for X86 Debug Change-Id: I56b3f9534daf0cd152eeea293b1a357d062b9166 Reviewed-on: http://gerrit.openafs.org/5191 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 3993b215afe8b5b44baee4f60d1e75d419a90448 Author: Jeffrey Altman Date: Tue Aug 9 17:25:22 2011 -0400 Windows: correct prototype for ChangeList fs_acl.h Change-Id: I63e3b37bd4348da0789dfa78599e513753f34a62 Reviewed-on: http://gerrit.openafs.org/5190 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6691ff6daceb7960dc925983a2b9129877e67c9a 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. Change-Id: Ica7bb95dfb1c0285a925771a9b659f85ec0e075f Reviewed-on: http://gerrit.openafs.org/5189 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 833010acac069c97f59c527e23eaa4b71ff18981 Author: Garrett Wollman Date: Wed Aug 10 21:21:40 2011 -0400 stds.h: __nonnull__ has four underscores Compile-testing AFS_NONNULL doesn't prove anything until something actually uses it. Fix 342be3535499c5ecd7d34b4edd43a4655559cb28 to use the spelling that the compilers actually support. Change-Id: I4a6b965d459a90a1832f2e813e886c15d3477962 Reviewed-on: http://gerrit.openafs.org/5198 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e8607d8d250fb41fcf4e60a09917f971c4d6104a 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 Change-Id: I71be39a2f2986804257c50b1d5b7d557b58a3573 Reviewed-on: http://gerrit.openafs.org/5184 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 7d0cd1393ff5c69cba2f14fc76aa8f7ca588ccc3 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.) Change-Id: Ifdad92ae8e393e85c3f97907af7119ce342b25dd Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5183 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 342be3535499c5ecd7d34b4edd43a4655559cb28 Author: Garrett Wollman Date: Tue Aug 9 23:50:09 2011 -0400 stds.h: introduce AFS_NONNULL AFS_NONNULL wraps the GCC/Clang function attribute __nonnull__, which tells the compiler and the static analyzer that the pointer arguments to a function (or specific ones, if provided) cannot be null. Note that GCC has only limited support for warning about violations of these constraints. Usage examples: int myfunc(struct foo *a, bar_t, struct baz *c) AFS_NONNULL((1)); tells the compiler that the first argument cannot be null (but the third one can). int myfunc2(struct foo *a, bar_t, struct baz *c) AFS_NONNULL(); tells the compiler that both pointer arguments cannot be null. Change-Id: Id81f0c382a6a3bdd9bf9c716eb4091b433129d69 Suggested-by: Simon Wilkinson, comment on change Ic8751737 (#5180) Reviewed-on: http://gerrit.openafs.org/5182 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2cd9d0536b173bf8c983aecd8599de0a82610151 Author: Andrew Deason Date: Wed Aug 10 10:23:40 2011 -0500 volinfo: Include nfs.h nfs.h is required for various types used in vol-info.c. Include it. On namei this header gets pulled in indirectly via other means, but on inode it does not (and we shouldn't be relying on such anyway). Change-Id: If917f8c3b0382572d2146450116399498257ffc7 Reviewed-on: http://gerrit.openafs.org/5185 Tested-by: BuildBot Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit a868209c4a9009893044ad33870a9e120085f5ce Author: Simon Wilkinson Date: Sun Jul 31 15:14:00 2011 +0100 aklog: Add -config option Add the -config option to aklog so that a different configuration directory location can be specified on the command line for testing purposes. Change-Id: Ic5f8d778304a43c823e53bf1855a3e6bf426f80c Reviewed-on: http://gerrit.openafs.org/5170 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8b60082c1f31f2aa02107e509f161e4e79ea5daa Author: Simon Wilkinson Date: Wed Jul 27 11:30:51 2011 +0100 pts: Add the -config option Add the -config option to all pts commands, so that the user can set the location of the configuration directory to use. This is primarily provided for testing purposes, to make it simpler to build fake AFS cells with configuration in non-standard locations. Change-Id: I90c9c95cbf99b3853bfbe93dab1ab71c3ae7e228 Reviewed-on: http://gerrit.openafs.org/5103 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 784a410d0f1d6b5649c5b4943eb1b945ef7d70e8 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. Change-Id: Ifda59983cda0711e9e1568d5a6be25e6ea934eee Reviewed-on: http://gerrit.openafs.org/5171 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit d28188382b40055acf7096ef89d5507194a3b8b6 Author: Marc Dionne Date: Mon Aug 8 17:08:34 2011 -0400 pam: fix unused but set warnings Fix a few cases of set but unused variables. Change-Id: I0a3e0906dbc708e2449121f3de1726d7055efc27 Reviewed-on: http://gerrit.openafs.org/5173 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 4b4a52b31406d122ce3e542d3a9d9941dd803576 Author: Marc Dionne Date: Mon Aug 8 16:51:53 2011 -0400 volser: flag unused variable nearInode can be unused, flag it as such to prevent warnings and keep enable_checking happy. Change-Id: Ic79d101380b79c3c3d90c4c4f949abe7c3f476ff Reviewed-on: http://gerrit.openafs.org/5172 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit bf4b2fd3e26dcf2a0db704815e05d77a558d38c6 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. Change-Id: Ib856ff40c5949cde95a2b277cd44253b87c3c2a4 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5178 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 7fe4125fe3435092b75ed29b884d8d3c2d1a2cad Author: Garrett Wollman Date: Mon Aug 8 23:19:22 2011 -0400 dir/vol: Die() really does Die() is an abort routine shared by the dir and vol modules. Move its prototype into dir.h to ensure that its declaration matches its three different definitions, and add an AFS_NORETURN annotation so that the static analyzer knows that it aborts. Change-Id: If01f35fe796708f6187b9767497a32458888ec1c Reviewed-on: http://gerrit.openafs.org/5177 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 9b0f53b2bf61e7532d95391ae553b407a601e814 Author: Garrett Wollman Date: Mon Aug 8 22:49:24 2011 -0400 vos: eliminate unnecessary global variables tserver is used by three different functions but not shared by them; make it private to each one to improve static analysis. tconn is not used by anything, so just delete it. Change-Id: Ic9fc4add66dbbb02170846154e44d261dcc6b061 Reviewed-on: http://gerrit.openafs.org/5176 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 292b375e392c6d3443d486e654a88bc4b4502cb2 Author: Garrett Wollman Date: Mon Aug 8 21:41:57 2011 -0400 volser: let it be known that Abort() really aborts The compiler and static checkers can do a better job if they know that certain functions never return. Tell it that common.c:Abort() is such a function. While we're at it, let volser_internal.h provide the declarations for this function (Log() was already there). This makes volser parallel to the way the same functions are declared in vol. Change-Id: I8b684bf96866edfc9edaae126d789d245a8d2356 Reviewed-on: http://gerrit.openafs.org/5175 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit ae6a3929489035ddcd17785abab8900cebd22eb3 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. Change-Id: Idc2d3c9b6049e5d3b0eb302353a68bcfdad6a90d Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5174 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 90ea68979c6740583747d0af500ed4a034eba651 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]. Change-Id: I4d7be16a1ad99a03025c80f9782c4f678da868ae Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5169 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 8776f194173bf688da9982845303c98da458fa3f Author: Garrett Wollman Date: Sun Aug 7 00:09:33 2011 -0400 afs_pioctl: don't use cell uninitialized in PGetTokens2 An unlikely error condition could lead to the variable cell in PGetTokens2 being passed uninitialized to afs_PutCell. Initialize it to NULL beforehand to avoid this. Change-Id: Ia8ded86df9d8af2f08c02d39749252d98a6c9ffe Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5168 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 43834bff1a2b1af348ff69d538a884bf1070b90c 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. Change-Id: I678f40552590e238f494507f7410233cdbb949ac Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5167 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 1fc4c9dbe2b1ba11929a5e5106afda5969e6fa7c Author: Derrick Brashear Date: Wed Aug 3 13:05:27 2011 -0400 pam: stop building it wrong in the new lwp/pthread/shared universe, well, we have the opportunity to be correct. and we chose to do it entirely wrong. we're building a shared object. use the right rules. we need to add some CFLAGS for PAM. do that using MODULE_CFLAGS instead of just building a whole new CCRULE Change-Id: Ie3e3c5ba902e5364cfa99d4dbd1b5b7fd4451127 Reviewed-on: http://gerrit.openafs.org/5153 Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d84c065fbf893d753bcd8da1211be536b07e29d Author: Derrick Brashear Date: Wed Aug 3 13:56:08 2011 -0400 pam: clean up unused variables and prototyping don't define variables on platforms we won't use them on do prototype functions we call. basically, we compile with warnings enabled now, so, fix everything so we *can*. Change-Id: I749f27c227ac70c58ccc68f1548f8274f10e3587 Reviewed-on: http://gerrit.openafs.org/5154 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 496fb87372555f6acddd4fd88b03c94c85f48511 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 Change-Id: Ie333d50a090f1f086c958440cc37849413442dea Reviewed-on: http://gerrit.openafs.org/5130 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit c92f04af6094ce04b1541a1b23b254d3c1421290 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. Change-Id: I133f8e84e46d0faedf3c9683330d92158bcd8935 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5166 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 34cc26a1b11bc8cf8f91996a019ac4b7d21dccd8 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.) Change-Id: I25bf7a5e149540593febec79f9f5111434807514 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5165 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 619b420903c99e48618db0d2f12085111573f279 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. Change-Id: I6979a69d33ecbbdb906eb9a075bbf13180e36646 Found-by: clang static analyzer Reviewed-on: http://gerrit.openafs.org/5164 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 55beacdc385424770c78cf055e8fd426075506f1 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 per-AFS which are building pthreaded clients to use a single library, rather than trying to mix LWP and pthreaded code within the same process. Change-Id: I3682876e91ca03311a798ac71e3a7a28f3205d42 Reviewed-on: http://gerrit.openafs.org/5157 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 400c72561e7622716a46a38affd2f5a7842519eb 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 Change-Id: Ibb6b8fb87dfe6e9eb4fa6d1dde195fd5261a8959 Reviewed-on: http://gerrit.openafs.org/5156 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0246f6e9683fb9e51d0fb0633049ff0125468b2b Author: Jeffrey Altman Date: Thu Aug 4 22:50:03 2011 -0400 Windows: symlink make should translate \\afs target If the target is a UNC path beginning with the AFS netbios name, convert the path to use Unix /afs mountpoint notation. Change-Id: I01e01b70938f8eb383fd3e7458a140d9e89dd237 Reviewed-on: http://gerrit.openafs.org/5162 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c5126838590eaf15e0df569c31b2a1bc12b3e0af 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. Change-Id: I0e862b1270e10c31f20ecde06d208f4b8c405c3a Reviewed-on: http://gerrit.openafs.org/5161 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4e42d6fd18097d0c8d2e4b455d3c540743d7dbda 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. Change-Id: I59de78a5b7b35cc822a648a51cd63a14037c1ca5 Reviewed-on: http://gerrit.openafs.org/5160 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 17e50a4b98de057a699681261ba126a5ac12a0cc 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. Change-Id: Idffe82282c77202d0fc3a9be9123c3b7384ecd63 Reviewed-on: http://gerrit.openafs.org/5159 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2bce3b50ef4fd9b9bdd03daf6e8332710f541922 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. Change-Id: Ia2089fb9b47dab77abc0911ab009e5aed75ed848 Reviewed-on: http://gerrit.openafs.org/5158 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 4111ee2374d030e1f3bb1fa3530f2877f2576d07 Author: Jeffrey Altman Date: Tue Aug 2 18:24:56 2011 -0400 Windows: use %p to print cm_scache_t pointers Change-Id: Iee13204820b3adc4359e42d46d9f9050ab07bcb2 Reviewed-on: http://gerrit.openafs.org/5152 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 88725587e97d717086801b2522e4625e5fdeb3a8 Author: Simon Wilkinson Date: Wed Aug 3 19:07:14 2011 +0100 tbudb depends on tubik ... ... so say so in the Makefile Change-Id: I84f0ac3c06953eff98e0194ad375c32b3656af58 Reviewed-on: http://gerrit.openafs.org/5155 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fec4e6bc595014f34c38707c0015c1f76edd770e 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 Change-Id: I87a70b2a30701f184f7a70fbcf6ee50a4bb1d973 Reviewed-on: http://gerrit.openafs.org/5149 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit f631a11f5e9ab50e62b3aaebbff9ef200ac799fe 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. Change-Id: Ia6929d9ff84358059efcc4a53dcc91ee2612fc5a Reviewed-on: http://gerrit.openafs.org/5129 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 71e64b6f21817872676e74a8c67c0f0bcfb23391 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. Change-Id: I3d25fafb15f1b0060ad1047178cbadd5ce22edb2 Reviewed-on: http://gerrit.openafs.org/5128 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d54c9b05d003bf861fd51e904b631e5425a079d6 Author: Derrick Brashear Date: Mon Aug 1 10:58:28 2011 -0400 vos: spell "vldb" correctly i'm not even going to ask. Change-Id: I5f59177ef58d9728a516176a14e0504130f7c584 Reviewed-on: http://gerrit.openafs.org/5125 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 5ebef72c0299560716f3bc8d59122aedd61cc399 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. Change-Id: Ic5db50473a97bd7ffb3ba34ac052da2ae8f2875b Reviewed-on: http://gerrit.openafs.org/5124 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit b621a2986099488426a026818532a9600db9aeba 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. Change-Id: I4e5869237e24da320afc2b7edaf8edca0ab3e4e9 Reviewed-on: http://gerrit.openafs.org/5117 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6b83ba621b520174dc4679c220888619dc0b44a0 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 Change-Id: If3d317fc406746f357e29e0d8d82c7ccf3c192d7 Reviewed-on: http://gerrit.openafs.org/5123 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit afc3ded56795d30e4e0f38d11f8302568943c49b 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. Change-Id: Ib74300568ac083e39506b0d106a5984e8fe5e464 Reviewed-on: http://gerrit.openafs.org/5120 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7e3615208d9e1b03d8eba4fb802744b2b81f8868 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. Change-Id: Ifeafd55da6e02807ed4cc3c3f2b6f1de4df2a87f Reviewed-on: http://gerrit.openafs.org/5119 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fa11f71f040b2e6856047c53fdd902109e5c6e52 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. Change-Id: I15860920a224bd032256e08c9983fa31f7f1c9ee Reviewed-on: http://gerrit.openafs.org/5118 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 357e9f928fa0abb73ab3bb2e3b8e8fa17d0f9065 Author: Jeffrey Altman Date: Thu Jul 28 15:07:32 2011 -0400 man: more changes for man.3 pod files generate-html requires a HEADER description for pod3 The Windows makefile needs to process pod.in files. Change-Id: I5ac964cc8c1af73510d17b3a31bf1a9a5df3a58f Reviewed-on: http://gerrit.openafs.org/5116 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4138a778fe821493c726826ffc4715f5f46222d9 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. Change-Id: Iaf14a82134cc2dcf3c23b1e5a0ed65606e2487bb Reviewed-on: http://gerrit.openafs.org/5115 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 4a24a59d52266fcbbf92041ce3a74a455e84a25c 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. Change-Id: If211f80564115bdc184181226aa0750ba1989a55 Reviewed-on: http://gerrit.openafs.org/5114 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 0b6247c27fcc0b8a2f307ccc545eea777a07f999 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 /. Change-Id: I7139bd2138573e938ea3e8386685f3b69e131c4d Reviewed-on: http://gerrit.openafs.org/5113 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit b61bd99bce68055dc0dd53b82d1d5318c25d9051 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. Change-Id: I22698ebaf3c950a5b9c9b7d6746af45603b5acf9 Reviewed-on: http://gerrit.openafs.org/5112 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 7c59ec8f816120c738b1da83f7db9349d912f573 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. Change-Id: I2cb3f861b99686a7d14aa7f567adc5a083a08a5b Reviewed-on: http://gerrit.openafs.org/5111 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 214e9a6052b1dab2a0c4383632640936c3e518c6 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. Change-Id: I5887ffabce93666bdbe231eaac0821573162a6ba Reviewed-on: http://gerrit.openafs.org/5110 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit a063ecdc78cf888df2459b32b0082d4767948563 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. Change-Id: I668961b17472a78ebac6744bf131dcb850d4e4a2 Reviewed-on: http://gerrit.openafs.org/5109 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 549737f1e7d52256f053c86116b56c3211b084b6 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 Change-Id: I62aa5f1249d4d1f2d64ed068be47a5832d97f85c Reviewed-on: http://gerrit.openafs.org/5108 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit be152a00a7e4043592094be30f4a811c67a4ac32 Author: Michael Meffie Date: Fri Jul 22 23:38:36 2011 -0400 volinfo: clean up headers Remove unneeded includes. Change-Id: I68514d47b1ddd4ea1d79c919635f87f6670e767f Reviewed-on: http://gerrit.openafs.org/5098 Reviewed-by: Andrew Deason Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 530b5ecac51cc7ce61ccddd50868c632c4a47298 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. Change-Id: Ie82f68c5eae76519fcf1491164133c1955ed9c08 Reviewed-on: http://gerrit.openafs.org/5060 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 0251eb6b377a7ce6a858398f95bd724c3477ee43 Author: Simon Wilkinson Date: Sun Jul 10 13:56:21 2011 +0100 util: Don't use FT_GetTimeOfDay for MRAFS logs FT_GetTimeOfDay creates an LWP dependency. For the purpose that we're using it in serverLog.c, gettimeofday performs identically. So, just use gettimeofday and reduce our dependencies. Change-Id: I36887d725c7e93386c80c61b3b33a7cda2bfe738 Reviewed-on: http://gerrit.openafs.org/5085 Tested-by: BuildBot Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 192ba0deae276e5bbea2580da2019a4d743daab3 Author: Garrett Wollman Date: Sun Jul 17 21:57:20 2011 -0400 pthreaded servers: set thread names In the startup function for each thread, set a thread name. This can safely be done unconditionally as LWP builds turn the call into a no-op. In general, the thread name parallels the name passed to LWP_CreateProcess, but for Rx server threads, it additionally includes the thread ID so that these threads can easily be distinguished. (I'm not sure yet whether doing so will prove to be useful or counterproductive.) Change-Id: I30e012eebef4c7856084fa8b8eb1d88d9fcdf2c4 Reviewed-on: http://gerrit.openafs.org/5041 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit e453f49bd4d501210e4d1696cb07158c4b887334 Author: Andrew Deason Date: Mon Jul 25 11:12:37 2011 -0500 libafs: Add afs_conn refCount imbalance safeguard If someone is putting back too many refs, we can detect so very easily. If we see that such a thing is happening, give a warning and bail out, instead of risking a panic or memory corruption. Change-Id: I36c968f9cd7cab3f569d3f6860f41678f026fba8 Reviewed-on: http://gerrit.openafs.org/5094 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 04e4126264c083a3a5f3d86c4de2f44ac1fe8cb2 Author: Garrett Wollman Date: Thu Jul 28 00:39:52 2011 -0400 FBSD: complete the build fix for 8.1 libafs Strangely enough, nosys() also needs a cast to sy_call_t *. Change-Id: I7fee2278c228da3ddb2c3ccc9758681cd0abc01d Reviewed-on: http://gerrit.openafs.org/5105 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3d6f6e00439ba04f7d93c701cf85e921eab2565e Author: Garrett Wollman Date: Thu Jul 28 01:44:25 2011 -0400 configure: provide some necessary prerequisites in header checks is a prerequisite for and . is a prerequisite for . Change-Id: I2c974ad863c6ff7eedb3702159399118af8de074 Reviewed-on: http://gerrit.openafs.org/5107 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 74e8bec7bec8b754498d9006ee6e7db3d105c0d7 Author: Garrett Wollman Date: Thu Jul 28 01:04:59 2011 -0400 configure: spell the "=" operator to test(1) correctly Equality in the test(1) utility is represented by "=", not "==". Some, but not all, versions of test accept the latter as an extension. Change-Id: I25380f77e1c621965e0610318c9793874154cf15 Reviewed-on: http://gerrit.openafs.org/5106 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9e29a20df7cca05472825f57ed553780ac901520 Author: Garrett Wollman Date: Mon Jul 25 00:50:54 2011 -0400 libuafs: don't use a GNU-only feature in a common makefile $(shell ...) is a GNU Make proprietary feature and shouldn't be used OS-independent makefiles. There is no need to use it here; command substitution in the shell is good enough. Change-Id: I511108dab0770e772005b3f4a851713d1ee5a83e Reviewed-on: http://gerrit.openafs.org/5093 Reviewed-by: Derrick Brashear Reviewed-by: Andrew Deason Tested-by: BuildBot commit f8ff2591f73401e6d9b6def7630f428569e2f3a6 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. Change-Id: I2b6d8d5cc4824f0f2a9473a2e810410579e3ad48 Reviewed-on: http://gerrit.openafs.org/5095 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit ef28bc08c18e750f6100535665d5258a317a0a2b 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. Change-Id: Id6396f8e9d4757d54825d4915458bf8b5153984f Reviewed-on: http://gerrit.openafs.org/5086 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 461603e474becbe56f6b42f3eb4b0aa44213dd43 Author: Simon Wilkinson Date: Tue Apr 26 21:37:42 2011 -0400 vlserver: Use libcmd for command line parsing Modify the vlserver so that it uses the libcmd library to parse its command line, rather than rolling its own command line parsing. Change-Id: I7705219894de2d2268729ddc66a8af9ad9758ce7 Reviewed-on: http://gerrit.openafs.org/5074 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 0b9986c8758c13a1de66b8bdae51b11abaea6cf3 Author: Simon Wilkinson Date: Tue Apr 26 21:36:15 2011 -0400 ptserver: Use libcmd for command line parsing Modify the ptserver so that it uses the libcmd library to parse its command line, rather than rolling its own command line parsing. Change-Id: I84bac2cd70bbaf85004fce2f23d9237215544edd Reviewed-on: http://gerrit.openafs.org/5073 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit dcb9776f9c34d070e8bdfe3e482135cbcdb6609c Author: Russ Allbery Date: Sun Jul 24 16:35:42 2011 -0700 Update README for newly added configure switches Add --with-gssapi*, --with-libintl*, and --with-roken for the new library location flags. Add --with-docbook2pdf and --with-docbook-stylesheets for the automatic discovery of tools for building the documentation. Expand and correct the descriptions of --with-html-xml and --with-xslt-processor. Change-Id: Ibe0a94ce3e9c6393bde009bf08f8b9dfac6b84a6 Reviewed-on: http://gerrit.openafs.org/5092 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 525f640c4eda5c7cb96fe65c23a94ff368039590 Author: Russ Allbery Date: Sun Jul 24 16:00:35 2011 -0700 Clean and ignore additional build files for DocBook documentation Depending on what generation method is used for the DocBook documentation, additional build files may be created. One of those (*.aux) will cause the build to break if one switches from docbook2pdf to dblatex without deleting it. Update make clean and .gitignore to remove and ignore these additional files. Change-Id: I13cc8a3526bd7bc7c4c65cd7d2cd78b094398faa Reviewed-on: http://gerrit.openafs.org/5089 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 46b897bbaff9e7ea8ff88766ce2b3e047feeee6b Author: Ben Kaduk Date: Sat Jul 23 14:58:54 2011 -0400 FBSD: cast lkmnosys appropriately lkmnosys is a function, and as such has its own prototype which includes a named struct specific to it (struct nosys_args). When comparing its address to an entry in the syscall table, we must cast it to a sy_call_t to correctly do the comparison, lest gcc warn us about comparing distinct pointer types without a cast. This warning recently became an error due to bsd.kmod.mk, so it causes the build to fail on 8.1 and earlier, which do not use syscall_register() due to a conflicting entry for our syscall in syscalls.master. Change-Id: I606aaf73e433a50ea41adaab842d61ee69653bd5 Reported-by: Garrett Wollman Reviewed-on: http://gerrit.openafs.org/5087 Tested-by: BuildBot Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e49bf687fe548f8addb7f1282a7c23261a55c34a Author: Simon Wilkinson Date: Sun Jul 10 13:54:20 2011 +0100 util: Cleanup generation of dirpath.h dirpath.h is only copied into place if it has changed. However, this means that the timestamp of dirpath.h is never updated, causing make to always trigger the buildrule, even if the rule eventually does nothing. Instead, always copy in the new dirpath.h, which simplifies the make rules, and stops make from always building. Change-Id: I43ba9152473591c5afd9064ad6e58adda6823f11 Reviewed-on: http://gerrit.openafs.org/5084 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 18af550ef15605d13e7d5ac59fa88713262db82d Author: Simon Wilkinson Date: Tue Jul 5 09:17:53 2011 +0100 rx: Provide Get/SetThreadNum functions Provide functions to let an application manipulate the rx thread specific key, rather than letting them root around in the internals of RX themselves. Change-Id: Ic42430de7e0c0a60217a509d9b7ef9d3523463ce Reviewed-on: http://gerrit.openafs.org/5083 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 2676143c035d19d02492d370382a74650b1e1496 Author: Simon Wilkinson Date: Mon Jul 4 10:03:50 2011 +0100 klog.krb5: Don't use ubik_PR_NameToID internal func ubik_PR_NameToID is a low level function which requires a large amount of setup from the caller. Instead, use pr_Initialize() and pr_SNameToId() which do all of the work in a library. Change-Id: I6b8d50c3d16eb258a4a81335790be2654c4fb191 Reviewed-on: http://gerrit.openafs.org/5082 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a40cbd7f074bc0009f4f66f72e13d6737fc285ad Author: Simon Wilkinson Date: Sun Jul 10 13:53:15 2011 +0100 ubik: ServerInitCommon is an internal function... ... so make it static Change-Id: Ia323d9ea4e35e4d3a5593df05a905191e9d951a0 Reviewed-on: http://gerrit.openafs.org/5081 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 10264a523fd78e9cd22e41feda6c5eb6f75de784 Author: Simon Wilkinson Date: Tue Jun 15 18:18:30 2010 +0100 bozo: Don't initialise variables unecessarily Don't initialise variables to NULL 3 lines before we assign malloc results to them. Caught by clang-analyzer Change-Id: Ic0f2fc56fe6ce39411c4cd48ea0a0b955b3e0f19 Reviewed-on: http://gerrit.openafs.org/5080 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit ba18ea65174dd06a305e3524756aaca6ebb04e9a Author: Simon Wilkinson Date: Tue Jun 15 18:15:34 2010 +0100 viced.c: Don't store results of reads unecessarily When we don't need to store the amount of data read from a file, don't complicate the if() statement by adding a pointless assignment. Caught by clang-analyzer Change-Id: I326d894c9b5f7a89f31534c7864e05ea059a03aa Reviewed-on: http://gerrit.openafs.org/5079 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 364d1bec7458b874922f5d1e9be49f7a1f813136 Author: Simon Wilkinson Date: Tue Jun 15 18:09:53 2010 +0100 libcmd: Don't increment array then discard result We don't need to increment argv here, as we're about to return to the caller. Change-Id: I442fe741e4bda91e12375a6fe72657dc215c4e78 Reviewed-on: http://gerrit.openafs.org/5078 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e3d9821a8b34f919de9a01fa0023a691487e763f Author: Simon Wilkinson Date: Tue Jun 15 18:08:50 2010 +0100 libcmd: Don't store values that we don't need Don't store the results from cmd_CreateSyntax unless we actually need to use them for something. Caught by clang-analyzer Change-Id: I581dcc00a886245a8d117f78c74590111c75e3b0 Reviewed-on: http://gerrit.openafs.org/5077 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 2d61f1fcbb7c42de6164795fc07e18776afc77cf Author: Simon Wilkinson Date: Tue Jun 15 16:51:42 2010 +0100 ptserver: Don't print undefined value The readgroup utility printed the wrong variable when listing the source group - instead of printing the group name, it tried to print an arbitrary element from the list of group members. Fix it to print the right thing. Caught by clang-analyzer. Change-Id: Ie7ada8a1e881871ae5db14714ee10325ac052d40 Reviewed-on: http://gerrit.openafs.org/5076 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 6cae7c554e917a26b197167e177bd3eb22bce71a 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. Keep VPartVisible for VICEP-ACCESS, but lower it to the next unused bit. Change-Id: I04c9d1c75774a55d01105acb2b5df9d2bcafa5d8 Reviewed-on: http://gerrit.openafs.org/5059 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 09d1d8575ce96ef945a4fd8a99a0347f4e258c1e 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. Change-Id: I344a06c66c426c5d14dbe08ce9da0431f095349d Reviewed-on: http://gerrit.openafs.org/5069 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 62cccc4547bd816dfffb2c1a4431c3c674d302f8 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. Change-Id: I6a55209b94694e8eb462bc0a4607a891b9f8b570 Reviewed-on: http://gerrit.openafs.org/5065 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 30cd8dafa73d90a943f00af05e4841699bc18534 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. Change-Id: I103ccb39bc7bb075cffab1d980b542ea8156f0c6 Reviewed-on: http://gerrit.openafs.org/5026 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit c61f5208f553ed1674d1ae51d6e0f16fcdbba47b 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. Change-Id: I40349826f2ab229961e3c3552f66808775f0a239 Reviewed-on: http://gerrit.openafs.org/5062 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9c2d3180aa760d2a406bb68dd84e73f7d1ec7019 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. Change-Id: I51458e24b5b9f16fc0378073e002d8ee160b8f15 Reviewed-on: http://gerrit.openafs.org/5061 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d3a4b6ce700509383849653fa061a87298e5258f Author: Jeffrey Altman Date: Wed Jul 20 14:21:09 2011 -0400 Windows: improve shutdown time During Windows OS shutdown the service may be given as little as six seconds to shut itself down before it will be terminated. Forced termination will leave the cache file in a dirty state. This patchset makes several minor changes to reduce the overall time required for shutdown: 1. do not wait for the IP address change notification thread. by the time it terminates the ip address has been lost. 2. send give up all callbacks earlier. 3. reorder the daemon thread waits. 4. change the daemon thread loop sleep time to 500ms in order to prevent the service from waiting up to 10 seconds for the thread to notice a shutdown is in progress. Change-Id: Ib1ff3eaf2e5116d9b3d7561670b8266e1bc5d1cf Reviewed-on: http://gerrit.openafs.org/5055 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 0783b8f3821f59004146b4c34a53189ada178d70 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. Change-Id: I509cde64a8b51ce1846f37047a574409ff248978 Reviewed-on: http://gerrit.openafs.org/5054 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e91f16ebb704a431f9731bb39bf9b5621b7f6ad0 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. Change-Id: I1ad2471e1e1442d836d6abac09fc5cdd08edae0b Reviewed-on: http://gerrit.openafs.org/5053 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit a1af69182b12bedd8a413d38cef9a4691286da46 Author: Jeffrey Altman Date: Wed Jul 20 14:04:57 2011 -0400 Window: breakout CM error codes into separate header Change-Id: I67be608c6cb153904fa2ca8c5ad6cbc7943064e5 Reviewed-on: http://gerrit.openafs.org/5052 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ba546ecf0c6a404f2efced2e600826621876ffcf Author: Andrew Deason Date: Thu Jul 21 13:20:54 2011 -0500 afsd: Add the -rxmaxfrags option Add an option to afsd to limit the number of fragments Rx will send/receive, called -rxmaxfrags. Change-Id: I9f0b3edd95db17f82ef8f7d1e300df4eff355172 Reviewed-on: http://gerrit.openafs.org/4899 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit beac254406d28b89d9f99967b6c1305c607959ad Author: Ben Kaduk Date: Wed Jul 20 18:11:47 2011 -0400 FBSD: in libafs, define LIBAFSNONFS Running 'make dest' will fail without this variable defined. Change-Id: I7f82cb3aeae8585c68ee60b005f4ba32d44e2104 Reviewed-on: http://gerrit.openafs.org/5058 Tested-by: BuildBot Reviewed-by: Andrew Deason Tested-by: Benjamin Kaduk Reviewed-by: Derrick Brashear commit ee950e7ecf578bd225eec29b182f108450c5bfaf 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. Change-Id: I91e7113e6934c67129e61dfc84b7f0c4d110cea0 Reviewed-on: http://gerrit.openafs.org/5066 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45f0cbf83aed2bd534e9b43822c033ef6b4a9b1b 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. Change-Id: I781fc475389c5be56aa89041b8d22b166517a3f5 Reviewed-on: http://gerrit.openafs.org/5056 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1fc5b6e67477c6e52c311b4117ff067a60487cdc Author: Andrew Deason Date: Tue Jul 19 16:44:21 2011 -0500 Revert "afs: Use 64-bit inode numbers" This reverts commit e1e008338639d6cc0d836ff8079e6fb42021ab9e. Using 64-bit inode numbers can make AFS largely inaccessible to 32-bit programs that are not compiled with large file support, since the inode number we provide is not representable in a 32-bit struct stat. Using 64-bit inode numbers thus can break quite a few programs, and has little benefit, so don't do it. Change-Id: Ia482ac2864601b5c56a4259432529d14981f4a1a Reviewed-on: http://gerrit.openafs.org/5048 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e06931172eec5a683490040f5564b294d263dac4 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. Change-Id: I45af362948dde40772c347c9f432e59cfd86b64d Reviewed-on: http://gerrit.openafs.org/5044 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 79aedab16c36c46d7b828078079e7aa80f99490d Author: Ben Kaduk Date: Mon Jun 20 22:46:01 2011 -0400 FBSD: update to using bsd.kmod.mk We have for a long time had a cobbled-together kernel module build system that essentially copied build arguments from a kernel build in an ad hoc fashion, with lots of conditionals on architecture and OS version. (We got it wrong, several times, too.) Instead, use the supported mechanism for building kernel modules, which allows us to remove a lot of code from the Makefile and gives us some measure of future-proofing. FIXES 127578 Change-Id: Ibccea4507f57660becb4fb39a57b50c15ea4cb07 Reviewed-on: http://gerrit.openafs.org/5042 Reviewed-by: Garrett Wollman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 1ec64ba50ea8d691cfb126dd40a11370ed37b433 Author: Ben Kaduk Date: Sun Jul 17 16:24:12 2011 -0400 libafs: switch to hardcoded source names with CRULE Most of the userspace tree uses AFS_CCRULE for how to compile things. We cannot use this directly for libafs, since in the general case kernel and userland code may need to be treated with an entirely different compiler and compiler options. Switching libafs fully to a (e.g.) LIBAFS_CCRULE would be a substantial amount of work, and require a lot of testing. However, we can stop passing -c $? (the out-of-date sources) in CRULE_{NO,}OPT and add the source file after each invocation of the CRULEs, an incremental step towards LIBAFS_CCRULE. This has the extra advantage of not causing issues when integrating with kernel module build systems that automatically add dependencies to all object file targets. (In such cases, $? expands to multiple files and 'gcc -o foo.o -c' bails out.) Most of this change was automatically generated from the following awk script: ========== /[a-zA-Z_0-9].o:/ {path=$2;} /^ \$\(CRULE_/ {print $0,path;} !/^ \$\(CRULE_/ {print;} ========== Change-Id: I22b8eeaee730feb37b2527d44d6548e7b13b9a0a Reviewed-on: http://gerrit.openafs.org/5040 Tested-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4356fcbb5b5dd1b5ff2098388d0e70214a5fe898 Author: Simon Wilkinson Date: Mon May 23 07:40:14 2011 +0100 vlserver: Handle logging of non-rxkad classes Expand the 'rxinfo' function so that it is not rxkad specific, and add the framework to allow other security classes to be added to it. Change-Id: Idb514be6aafbc69154a7aba4b0ece3330b8b3aed Reviewed-on: http://gerrit.openafs.org/5031 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 9376f75beca80af69c5437de4023c32646e702b8 Author: Simon Wilkinson Date: Fri Jul 15 11:50:09 2011 +0100 tests: Fix error in man check specification The kas manual test is kauth/kas-man, not kauth/kas Change-Id: I714cbbf78af7f8e99ec52d9c0f173df3f6ae18c5 Reviewed-on: http://gerrit.openafs.org/5030 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f02c3d40cb25d5d7b0c184a6822a21e1ddebf4d5 Author: Simon Wilkinson Date: Tue May 31 09:30:41 2011 +0100 tests: Add tests for the vlserver Add some very simple vlserver tests Change-Id: I862d3a86857dc70f0421f4887d1fc4d047c57909 Reviewed-on: http://gerrit.openafs.org/5029 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e798bcaf97c3ad1b464e29482cb29074cbbf33d6 Author: Ben Kaduk Date: Mon Jun 20 22:35:08 2011 -0400 FBSD: use better casts in vop_advlock In the bsd.kmod.mk world, the compiler bails when we cast a pointer directly to int. Cast through intptr_t as the supported mechanism. On amd64, this loses bits, but since this instance is just attempting to use the value as a unique handle, it is probably okay for now. However, it should be addressed more properly eventually, when this locking implementation sees wider use. Change-Id: I4fe8084c14a97dc4efc8d74e9971b1540c028e40 Reviewed-on: http://gerrit.openafs.org/5034 Reviewed-by: Matt Benjamin Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 135b41ec7e446aee6276854effa0900cc7a58a2a Author: Ben Kaduk Date: Sat Jun 25 00:33:41 2011 -0400 FBSD: Use correct path for ufsmount.h include The two lines above it already used correctly. In the bsd.kmod.mk world, this will let us get rid of some more symlink hackery in libafs, since the system's '@' symlink will point to the system headers directly. Change-Id: I97dd779c2c7a119f51972b02e185a17264911151 Reviewed-on: http://gerrit.openafs.org/5036 Reviewed-by: Garrett Wollman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit d10f62a7e7221b86e6b336cae936ecbc9485fb94 Author: Ben Kaduk Date: Mon Jun 20 22:36:39 2011 -0400 FBSD: cast pointers appropriately Since the bsd.kmod.mk build uses -Werror. Change-Id: I4bc34477a36ae8946272c1830080ddd9add5cd00 Reviewed-on: http://gerrit.openafs.org/5035 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 037f3251cd8fa318ad8320a061368efedc480c37 Author: Ben Kaduk Date: Mon Jun 20 22:34:41 2011 -0400 FBSD: Remove include directive for nonexistent file In the bsd.kmod.mk world, this becomes a fatal error. Change-Id: I14315982fac48bf392d9f3a06422f5c4707bc3b9 Reviewed-on: http://gerrit.openafs.org/5033 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9d3d4b30af5fe40fa84b8bedec71dab04bee15ab Author: Simon Wilkinson Date: Sat Jul 16 09:07:57 2011 +0100 Fix broken make dest rules Commit ffb6864f0f60113d125527feacbd6d20a8121e2d is missing some semi-colons in assorted dest rules, which breaks the make dest target. Change-Id: Ie6f88878604f1043256f1683e1d228e16d568f50 Reviewed-on: http://gerrit.openafs.org/5037 Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 45025e949bba0244d51e406b9105fb14bcba902d Author: Michael Meffie Date: Thu Jul 14 12:02:21 2011 -0400 audit: remove uneeded strncpy In this caller to krb_realms, when no realms names are returned the number of local realms is correctly set to zero, however the first local realm buffer is filled with a placeholder string which is not used. Remove the uneeded strncpy, which also makes this section of code consistent with afs_is_foreign_ticket(). This section of code is duplicated by afs_is_foreign_ticket() and should be consolidated in a subsequent patch. Change-Id: I48f84934e7321769eebaf80c83b2c100fd026a6a Reviewed-on: http://gerrit.openafs.org/5020 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 607c0aaaa438414a64e8201c34cccc2c28cabf72 Author: Andrew Deason Date: Tue Jul 12 00:11:17 2011 -0500 UKERNEL: Avoid using parameters named "new" Alter the prototypes in afs_usrops.h to avoid using the name "new", in order to make the header usable by C++ code. Change-Id: I21165b5c1e33e9229172d9f8e797d65fc954bb77 Reviewed-on: http://gerrit.openafs.org/5038 Reviewed-by: Garrett Wollman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit df4843c4b1f3aebf32dcb28560b259826e9dbb9a Author: Garrett Wollman Date: Wed Jul 13 14:20:17 2011 -0400 util: clean up two #ifs Use defined(...) in two instances to avoid warnings. Change-Id: I0a574283e2384c7cfb2f58884570e78e3fed3bc6 Requested-by: Simon Wilkinson Reviewed-on: http://gerrit.openafs.org/5005 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 1f181307d5c90bd46bed0eb4a6e97fd96531c5c6 Author: Garrett Wollman Date: Fri Jul 15 01:00:28 2011 -0400 util: try again to satisfy the gatekeepers Apply a two-clause BSD license to src/util/pthread_threadname.c. Note that the claim of copyright in this file refers to the derivative work consisting of the original code combined with the text of the license. Change-Id: Id75badee03cb85a23778088aa9cb49d8c92eb5d0 Reviewed-on: http://gerrit.openafs.org/5025 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit ffb6864f0f60113d125527feacbd6d20a8121e2d Author: Simon Wilkinson Date: Fri Jul 15 17:14:27 2011 +0100 Make --enable-pthreaded-ubik do what it claims The configure help text for --enable-pthreded-ubik says "enable installation of pthreaded ubik applications" This patch set makes the behaviour in the code match that. Instead of controlling whether the pthreaded ubik code is compiled at all, the configure option now just controls whether it is installed. This means that we'll always build the pthread code, and so should reduce the number of times it is inadvertently broken. Change-Id: I8b2ffb46e01157f2043cf7daf68e69580ea285c5 Reviewed-on: http://gerrit.openafs.org/5028 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f56f2731552ca4dc5f5e476c1e8db14f035ec060 Author: Simon Wilkinson Date: Fri Jul 15 14:06:14 2011 +0100 Fix pthreaded ubik dest and install rules Fix the dest and install rules for pthreaded ubik, and its servers, so that they match the current Makefile style. Change-Id: Ifd3bd181772e278518f2a90167b6524d6045645c Reviewed-on: http://gerrit.openafs.org/5027 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 20a2422c1479476acd407bae9345ea6482aeca3b Author: Andrew Deason Date: Thu Jul 14 14:53:00 2011 -0500 util: Include pthread.h in afsutil_prototypes.h afsutil_prototypes.h can reference pthread_t when we are in AFS_PTHREAD_ENV. So, include pthread.h to guarantee we get the definition for pthread_t. Change-Id: Ib46c2cf3b3fdd2dcd61a7b8ac4d5512fecd084ff Reviewed-on: http://gerrit.openafs.org/5023 Tested-by: Andrew Deason Reviewed-by: Derrick Brashear commit b6d05986f0c79bdf54169fc7b209b137c0e63a39 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. Change-Id: I653c4259a0bbe926abac80c09e32ff3bc35f2de2 Reviewed-on: http://gerrit.openafs.org/5022 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e2980f3d70bc61cc9a89b65499798193c011ec75 Author: Derrick Brashear Date: Wed Jul 13 22:43:40 2011 -0400 volser: remove pragma requiring ultranew gcc this won't fly with the gcc in the field most places. move along. Change-Id: I54de25c4986e574ca5b34b850807b10374d9d8ad Reviewed-on: http://gerrit.openafs.org/5013 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit a76e65034cf3feadfe2af5a20ddae705fda00aa0 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 commit 4b9ad1b56ecc9c81aafe54331121435d3ca18fdb Author: Michael Meffie Date: Tue Jul 12 15:51:33 2011 -0400 tests: fix cmd test case Fix a build error in the cmd tap tests. Change-Id: I757c5b508784fd938b70ca3829130275707dd39a Reviewed-on: http://gerrit.openafs.org/4975 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 0e4c227d62c30247cb09e40567b096ce0f3cbb57 Author: Simon Wilkinson Date: Wed Jul 13 14:44:39 2011 +0100 rxkad: Suppress warnings for ticket5.c rxkad's ticket5.c includes v5gen.c, a generated file from Heimdal. This file contains a load of set-but-unused variable warnings. As we currently have no way of portably suppressing just these warnings, turn off warnings-as-errors for ticket5.c Change-Id: I739cee4f345523fce130c73c713c7309273f5bee Reviewed-on: http://gerrit.openafs.org/5003 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6840d8dfb80d9ae3888171520304a021caef9fe5 Author: Simon Wilkinson Date: Wed Jul 13 14:42:11 2011 +0100 volser: fix set-but-unused variable warning restorevol reads the magic number from the dump, then does nothing with it. Rather than not reading it at all, just mark the variable that it is read into as unused to supress the compiler warning. Change-Id: I371e2556e3661836f6256fac255ae79005d9ffaa Reviewed-on: http://gerrit.openafs.org/5002 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 130155ff3c48f2da2433b359588346b4438d24a2 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. Change-Id: I4fa42b9ae0af5eb7c44ea868b4ea6ca9e4e0bb92 Reviewed-on: http://gerrit.openafs.org/4985 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 30d68e6934810e3cfc67518d36cb8be26d6542b8 Author: Jeffrey Altman Date: Fri Jul 8 09:49:51 2011 -0400 Windows: ChangeLog for 1.5.9907 Change-Id: Ie6eb2ed4c9e4c3a9e8250c3946d0a060834610b6 Reviewed-on: http://gerrit.openafs.org/4954 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit beda3b239a13903d4bcd9a5d91d5ff562962cb5a 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. Change-Id: I5dbc33e2e1a9a4ca1bdf4b2f7e56f33af87ccc1a Reviewed-on: http://gerrit.openafs.org/5001 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f 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. Change-Id: Ie4adbbd98f5006a9aa50ed9bf73ea9e4344fabf3 Reviewed-on: http://gerrit.openafs.org/5000 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 9bb81711a545122bba36c525095aebfe52e73168 Author: Simon Wilkinson Date: Wed Jul 13 14:31:15 2011 +0100 Mark nearInode as unused When we're building an inode fileserver, we use the nearInode hint. The IH_CREATE macro just throws this hint away if we're building namei, which leads to compiler warnings about set-but-unused variables. Just flag nearInode as being potentially unused in order to suppress these warnings. Change-Id: I25022dc859974e9311e4530a9eeee8ab1d77c373 Reviewed-on: http://gerrit.openafs.org/4999 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 85b8372b44036f4e10cb30e9dbdd572700d10aaa Author: Simon Wilkinson Date: Wed Jul 13 14:23:22 2011 +0100 Don't split int64s when we don't need to Now that we're always using an int64, and never a hyper_t, to represent 64bit integers, we can just print them out and assign them using the native tools, rather than having to call SplitInt64. Simplify our code to do so, which also avoids some gcc-4.6.0 warnings. Change-Id: I12cfb5401d0431be2a4fefdfc5e1f52df7d5764d Reviewed-on: http://gerrit.openafs.org/4998 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8df379696ca6303cd2e4cd3eed34e4552725853b 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. Change-Id: I0085adbfdb886d89acc7f4203ddb6f7a10281dfc Reviewed-on: http://gerrit.openafs.org/4997 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 093b5108a37576762e424a33d2254edab0ac0b60 Author: Simon Wilkinson Date: Wed Jul 13 14:02:54 2011 +0100 uss: Remove unused variables Remove assorted unused variables, both those used to capture error returns, and so unused (but initialised) string pointers, to make gcc 4.6.0 happier. Change-Id: I8cdcfb7175b48c79ce2b1a312d6a5fe6ab5c1989 Reviewed-on: http://gerrit.openafs.org/4996 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 96b4f4be970b16238aba84be7dcef9f5c09c3496 Author: Simon Wilkinson Date: Wed Jul 13 14:02:03 2011 +0100 scout: Remove unused error codes Remove unused error returns, and make gcc 4.6.0 a little bit happier Change-Id: Ic1fe541ed860a739ac3e2aa2978cbb8b92ec1a8d Reviewed-on: http://gerrit.openafs.org/4995 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d6b1573995120cc8167bb87032274e04bd918880 Author: Simon Wilkinson Date: Wed Jul 13 14:00:30 2011 +0100 libadmin: Remove unused error codes A number of functions in the libadmin vos implementation set up error values, and assign them to 0, but never actually use them for anything (either further assignment, or returning to the user) So, just remove these unecessary variables, and make gcc 4.6.0 a little happier. Change-Id: Ia4a4a7d8cda855d904f2a84092928f227ea83f3b Reviewed-on: http://gerrit.openafs.org/4994 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fa71561e493003585e977bdf0e513b0979319a72 Author: Simon Wilkinson Date: Wed Jul 13 13:59:05 2011 +0100 bozo: Remove unused error codes assignments This removes a couple of unreported error code assignments. Firstly, the return from 'setsid' was being assigned to 'ec' and promptly ignored, and secondly, the response from SendNotifierData was being ignored. As there is nothing sensible to do with these error codes, just ignore them properly. Change-Id: Ifff8c7b5b7950e467570d26ce5f92fe5f11a51e9 Reviewed-on: http://gerrit.openafs.org/4993 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 00061610b9db83ca9510e485e49379eeb6f9e082 Author: Simon Wilkinson Date: Wed Jul 13 13:57:12 2011 +0100 afsmonitor: Fix set-but-unused variable warnings Tidy up the afsmonitor code to remove gcc 4.6.0's set-but-unused variable warnings. These are all assignments to error code values which are never checked, or reported. Change-Id: I8d48a6defe848d7cf477ac747aa330fc8ed1b276 Reviewed-on: http://gerrit.openafs.org/4992 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit cd8ebb14e59e58bf3c76815d22f3b796faee3827 Author: Simon Wilkinson Date: Wed Jul 13 13:55:39 2011 +0100 libafs: Remove support for length optimisation At one point afs_StoreAllSegments had an optimisation to speed up stores. However, that optimistation used the chunkLength without taking appropriate locks, and was disabled. The variable assignments which still exist from this code cause errors with gcc 4.6.0, so just remove them. Change-Id: I86547d94280d7f07214fbf6ef5b3db61c9781e59 Reviewed-on: http://gerrit.openafs.org/4991 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 6a03341df67e8330f6f801deb3a70e529cedb2a6 Author: Simon Wilkinson Date: Wed Jul 13 13:54:52 2011 +0100 libafs: Fix warnings in PPrefetchFromTape The PrefetchFromTape pioctl had a number of set-but-unused variable warnings. Tidy up the code to remove these warnings. Change-Id: I358f7e31ab8e9f03447675be40dc8571650dbe72 Reviewed-on: http://gerrit.openafs.org/4990 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4e9a49c58aa1a6c910b01fe995739d0852c75dd4 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. Change-Id: I5698f8861af1b5e9771d138ca93a28f676df349b Reviewed-on: http://gerrit.openafs.org/4989 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit beaf9a4e3e39af87cda4f312917f09974b51a5ef Author: Simon Wilkinson Date: Wed Jul 13 13:48:07 2011 +0100 libafs: Remove unused DNLC LRU code The LRU code in osi_dnlc_lookup has never been enabled in OpenAFS, and causes compilation errors with gcc 4.6.0 - just remove the unused code and its associated variables. Change-Id: Ifc09bbb857406b9bfcbf436c35e36289567f65cf Reviewed-on: http://gerrit.openafs.org/4988 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 37f41897fb9d28e32c8def34790d653ef585400f Author: Simon Wilkinson Date: Wed Jul 13 13:45:33 2011 +0100 libafs: Remove unused NAT markeddown code Remove unused code which used to retry once when a server was marked down due to a bad NAT. This code has never been enabled in OpenAFS, and causes compile errors with gcc 4.6.0 Change-Id: Idc978a68e81ccb761117c97200607e30c98627dc Reviewed-on: http://gerrit.openafs.org/4987 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 8adf4cd0b0ae319b9610cd5caad050f973200ca7 Author: Garrett Wollman Date: Mon Jul 11 06:31:41 2011 -0400 util: introduce a common interface for setting thread names A previous change added support for setting thread names/titles to viced; this change moves the #ifdef spaghetti to src/util in preparation for calling it from other places where it would be useful. Two functions are defined, one for setting an arbitrary thread's name (as might be done by the spawning thread) and one for setting the current thread's name; the latter is also defined as a macro for non-pthreads compilations so that it can be called unconditionally (the interface does not reference any pthread-specific data types). Note that some platforms, Mac OS X in particular, do not allow setting the name of a different thread. The two functions are defined as no-ops for Windows as our pthreads emulation layer for Windows does not provide the needed mechanism. Make viced use the new interface. Change-Id: I58c65a28772d8d188c03d6ff3a6f052889362fb7 Reviewed-on: http://gerrit.openafs.org/4966 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 470bab9d564a7be8cdaf808c3d8dda3457821b2f Author: Simon Wilkinson Date: Wed Jul 13 14:46:00 2011 +0100 Add PERLUAFS to libuafs's git ignore Change-Id: I0067ba4c9b4f2b57ded862bc5cfe33a2c419d108 Reviewed-on: http://gerrit.openafs.org/5004 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f775c0fb6f9191dcf5d226bfddbf82f52cd1116c 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. Change-Id: Ic5cde2382f973a004406e0ef0f09708d0ba0ad5f Reviewed-on: http://gerrit.openafs.org/4984 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6a27e228bac196abada96f34ca9cd57f32e31f5c 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. Change-Id: I477629b4102f48a9669ff67aae429c08862a5afc Reviewed-on: http://gerrit.openafs.org/4983 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 4470d849ec731c97dd2fb02dc6cbfe777949b510 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. Change-Id: I77090d3ccc3ba9952e14f2be13946ef2e91a6af7 Reviewed-on: http://gerrit.openafs.org/4973 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 8bface302c14698a14b7b988e1a7714e84415c04 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. Change-Id: Ib514328cf944ea601028fb99273046cb2f5ea828 Reviewed-on: http://gerrit.openafs.org/4925 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2d794a5e5d8154b096596f45bed93cc41b36005a Author: Antoine Verheijen Date: Fri Jul 8 11:47:39 2011 -0600 Remove pre-existing assert macro in hcrypto header. The config.h header for hcrypto defines an assert macro for use by RX. OpenBSD already has an assert macro definition so this new one causes screaming by the compiler about re-definition. This patch adds the directives to remove any pre-existing definition of assert, if one exists, prior to defining the new one. Change-Id: I01d5a1f26617fecfd0ffcc3930a7c7881beb8183 Reviewed-on: http://gerrit.openafs.org/4958 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 02aa30893f79b0a3d3ed75da987e20d48071c5df Author: Michael Meffie Date: Mon Jul 11 15:45:11 2011 -0400 salvager: do not redefine SalvageVolumeGroup Do not use the c preprocessor to redefine the SalvageVolumeGroup() function name. Change-Id: I3d48ee28dc03be702d0427d74725ff1e99ec6411 Reviewed-on: http://gerrit.openafs.org/4965 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5ec998a016ffcbb1e88bd4eb3b12b3735a0c0cca Author: Derrick Brashear Date: Tue Jul 12 13:37:56 2011 -0400 macos: fix shlib link list link shared libs from the right place, lib not etc Change-Id: I3d58d1f65b479b7c23c1bb0978eacea99b114541 Reviewed-on: http://gerrit.openafs.org/4971 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 84a3c4714fce3c1722802963e1fcc4d7dad8cc55 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. Change-Id: Ia56b9b15d0b28672a8411417d38937ed45ee93a1 Reviewed-on: http://gerrit.openafs.org/4970 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 15c073887b905adaef301863ed87c49f9d77b394 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 Change-Id: I2d10c6fa362d3cbfa786c270996fa8ae75b9db20 Reviewed-on: http://gerrit.openafs.org/4969 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 82e772bed034ea278e7a7a1b4422d75cc14576dd 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. Change-Id: I1e8c2d101cf1dd1d375a965684d95f6708e8c601 Reviewed-on: http://gerrit.openafs.org/4968 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 27af8b4b537236d8c678465d034721dd220641c8 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 Change-Id: I7b32c81f11c3fef53f8a21a44f3594d5cd9e1552 Reviewed-on: http://gerrit.openafs.org/4967 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit ee05a1b086cf0613b340da9d977658e309981ea3 Author: Garrett Wollman Date: Fri Jul 8 00:09:43 2011 -0400 viced: If platform supports setting a thread title, do so Some pthread libraries support setting a name or title for individual threads (analogous to setproctitle() for processes). This can be useful for debugging and is sometimes published for use by utilities like ps (again like setproctitle() for processes). The two most common variants of this have the same signature with slightly different function names. If either one is present, use it in viced (which already assigns a thread name when compiled for LWP but ignores it in pthreads compilations). Change-Id: I5486aa6a21dbc3c8885b94ad52c2b1a66baae81f Reviewed-on: http://gerrit.openafs.org/4950 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 52fee7140325d905f01798d7c5724744b606ac06 Author: Jeffrey Altman Date: Mon Jul 11 00:19:17 2011 +0100 Windows: Move file server lock releases to daemon Create a new lock daemon thread which performs regular cm_LockCheck() calls. If a lock is deleted check the cm_scache_t to see if the matching file server lock should be dropped. If yes, drop it. This effectively caches file server locks for two seconds after they are released to provide a chance for subsequent local lock requests on the same file to avoid a file server RPC. It also ensures that windows processes do not thrash the file server and force callback breaks. Change-Id: I1c452e231ff282d9b45026aed1b02ab0c5932a77 Reviewed-on: http://gerrit.openafs.org/4964 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1accef4e77c8cad518d728d15fbd194bebd49f33 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. Change-Id: Ifb185297666e5365974c342814ed3c2d2a54092e Reviewed-on: http://gerrit.openafs.org/4926 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 3559e5c8edd90ffb17e8f3b722ff014654bae336 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). Change-Id: I8281b085eed2a6dec1f096ad9a6e96078c1e4af0 Reviewed-on: http://gerrit.openafs.org/4956 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53434c828d0fed96a90e8f984460c323282c4d7b Author: Garrett Wollman Date: Fri Jul 8 22:40:27 2011 -0400 viced: indent nested preprocessor directives Make viced.c look more like other source files by indenting nested preprocessor directives. In a few case it made more sense to eliminate the nesting. This should otherwise be a whitespace-only chnage. Change-Id: I895ea2f754f90a15daa73cea24d3da9576fff9c9 Reviewed-on: http://gerrit.openafs.org/4959 Reviewed-by: Simon Wilkinson Tested-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 99b43273c0203881ea3d2d50f0abf000cdc0b03e 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. Change-Id: Id61b55b4d1d57a2b9b35ea942545ef4bdc8d33f3 Reviewed-on: http://gerrit.openafs.org/4963 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 88b4e2e52799cfa5999cbc22873407ec8b77766a 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 Change-Id: I03e47d24fa79c888dc49a9dba7e0388dafe6ce59 Reviewed-on: http://gerrit.openafs.org/4961 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit da6c97678f530ca76334613e229337a75f94e297 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. Change-Id: I370321b087df480336c833d68e348d7f62d227b3 Reviewed-on: http://gerrit.openafs.org/4955 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 3505c444f681c8bfed3638b7393f3f40449492b5 Author: Andrew Deason Date: Fri Aug 14 16:32:54 2009 -0500 Add AFS::ukernel libuafs perl bindings Add the SWIG-generated AFS::ukernel perl module, which provides perl bindings to libuafs calls. Change-Id: I5ce480944a8c97cbca72c80e79fc40c0edb0962f Reviewed-on: http://gerrit.openafs.org/2048 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit bbd505a8e191f69179f8dc245e0d7f96310db275 Author: Andrew Deason Date: Fri Jan 21 17:38:24 2011 -0600 Add afsload Add afsload, a set of scripts used to synchronize the activity of numerous libuafs cache managers for testing/simulation purposes. Change-Id: I6f797d5968ea4ba3c29c1b13251f743c7d02d60d Reviewed-on: http://gerrit.openafs.org/4906 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 21edc432dcbb8b14c0a40feb2ea5de1bc0ae81f6 Author: Andrew Deason Date: Fri Feb 4 16:23:30 2011 -0600 doc: Add support for section 3 man pages Generate and install man pages (and their HTML versions) for library reference documentation in section 3. Change-Id: I500818097c6880e0412794661393351ab14461dc Reviewed-on: http://gerrit.openafs.org/3898 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6548cedbee4ea3e0f1769075717a3c05a5a0127f Author: Andrew Deason Date: Tue Sep 22 15:45:09 2009 -0500 Add documentation for AFS::ukernel Add some documentation explaining some of the minor quirks in AFS::ukernel; specifically how some functions look a bit different than in plain libuafs. Change-Id: Ib8b18720c3fa6087de98d58ba8381f1ae4fb2f10 Reviewed-on: http://gerrit.openafs.org/3902 Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear commit 21854e03eb6fe70a70ea5fecde5c4ef8074e28c9 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. Change-Id: I28798eb2232e739f665eb51499305a7a1898f824 Reviewed-on: http://gerrit.openafs.org/4924 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1ac219f537f75ac5835f750d4c9e5f4dc684c2de 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. Change-Id: Ic5db7b3928fc0477f155183326321717ea04ace0 Reviewed-on: http://gerrit.openafs.org/4923 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 1a56229910a67cc782959beb45f56d244d6b3c4f 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(). Change-Id: Icdb8efe030ae3e1f714ca72ad741bd38c692697f Reviewed-on: http://gerrit.openafs.org/4922 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit e1e008338639d6cc0d836ff8079e6fb42021ab9e Author: Andrew Deason Date: Wed Jul 6 15:22:38 2011 -0500 afs: Use 64-bit inode numbers When we have a 64-bit ino_t, use the full 64 bits, instead of always limiting ourselves to 32 bits. Change-Id: I8f9f552b230e1723c8b77bfe92213ca43816240c Reviewed-on: http://gerrit.openafs.org/4921 Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 2dc7ee2757f6d2ac7c2ff21ec4a9936719e884b5 Author: Andrew Deason Date: Wed Jul 6 14:21:53 2011 -0500 afs: Consolidate afs_calc_inum Instead of having two separate afs_calc_inum functions, just have one afs_calc_inum, and split off the md5 inode code into its own function under a LINUX20 ifdef. Change-Id: I400d2e70403905da40055238ffc2bb785659e9e0 Reviewed-on: http://gerrit.openafs.org/4920 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3a33ce4a336223ac8aebe2fc24fd69459ab9e9db Author: Andrew Deason Date: Wed Jul 6 16:23:23 2011 -0500 afs: Use afs_calc_inum everywhere The algorithm for calculating inode numbers was copied in several places in libafs. Make them all use afs_calc_inum instead. Change-Id: Ie835a0b92bf940b78090fd7ca4e36aace1df9767 Reviewed-on: http://gerrit.openafs.org/4919 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 42943aead4db2bdf9b8ec01c3917eb1c9ac9eb76 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. Change-Id: I4b939042dd993419f785a78e87e68cf346b56e26 Reviewed-on: http://gerrit.openafs.org/4902 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 0a51946f7c5ca499e305f10c4c1c6cd556dbd1a7 Author: Andrew Deason Date: Tue Jul 5 17:13:57 2011 -0500 uss: Suppress more warnings from lex.yy.c Specify -Wold-style-definition when compiling lex.yy.c. This allows us to compile when --enable-checking is specified and our lex generates code with old-style function definitions. Change-Id: I09c87fd6274b5850952a8aaf63f0e3358100d567 Reviewed-on: http://gerrit.openafs.org/4905 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 39083fe1edab784fcd75eacbdaaf7f6affa14c9f 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. Change-Id: Iee1ef4cc2ad66269f2c677e29d586ef0964d7c70 Reviewed-on: http://gerrit.openafs.org/4901 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 34bdd979fc487843c26f15655b94eac7c8f98fee 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. Change-Id: I154334dc5b73980a0d9b8abd9fd6645994f63829 Signed-off-by: Anders Kaseorg Reviewed-on: http://gerrit.openafs.org/4843 Reviewed-by: Derrick Brashear Reviewed-by: Simon Wilkinson Tested-by: BuildBot commit cdd9f78f058f6d6c67d52d8b28a66f24065702d9 Author: Andrew Deason Date: Wed Jul 6 12:33:53 2011 -0500 Add a few missing .gitignore entries Change-Id: Ibe1498c504defc0e1779b8764c091a98576a588a Reviewed-on: http://gerrit.openafs.org/4904 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 78e39417af6d2b87f0cbda0b5d3bb3e4859dc0ba 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. Change-Id: I5f48a78528a75b984201f9ee0563b142ef59baf9 Reviewed-on: http://gerrit.openafs.org/4903 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1ecac71e50e75ce5a45e297d57c480e850975af7 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. Change-Id: Ic4efd7a78bfb1b99a5308f0c67e81f4779dfe545 Reviewed-on: http://gerrit.openafs.org/4900 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 9929d1c6fcd63a2a1d250cc36f4858b0fbba02af Author: chas williams - CONTRACTOR Date: Wed Jun 8 10:44:21 2011 -0400 doc: epub and mobi support .epub is generated using dbtoepub which is still considered alpha software apparently and installed in a non-standard place. for now, use the docbook stylesheet location to find it. .mobi is generated using kindlegen from the .epub in order to have a real toc. there is some preprocessing with a custom stylesheet to make things "look right". see mobi-fixup.xsl.in Change-Id: Ice92e701e2f921e70c0f98683b5e9ab44a347e3b Reviewed-on: http://gerrit.openafs.org/4887 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 31a001f60e5fe729b315f679d1d43b367bd74ea5 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: Idb305c8b7511065301739542772d16d4fe8cd574 Reviewed-on: http://gerrit.openafs.org/4896 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 8017773587bf28a58e480f634fdccc287c443d3b Author: Andrew Deason Date: Fri Jun 24 16:23:13 2011 -0500 Remove nonsensical bozon-lock defines Currently there are two preprocessor defines related to bozon locks: AFS_BOZONLOCK_ENV, and AFS_NOBOZO_LOCK. The former creates the pvnLock member of a struct vcache, and controls calls to e.g. afs_BozonLock in cross-platform code. The latter, if defined, turns calls to e.g. afs_BozonLock into no-ops. It doesn't make any sense to have both of these, since if AFS_BOZONLOCK_ENV and AFS_NOBOZO_LOCK are defined, the pvnLock member exists but is never used, since afs_BozonLock &co are no-ops. On Solaris, the only platform where AFS_NOBOZO_LOCK is currently defined (DUX used to define it before DUX was dropped), this is the case. So to make things a bit more clear, get rid of the AFS_NOBOZO_LOCK define, and just use AFS_BOZONLOCK_ENV to dictate whether we do anything with bozon locks (ppc_darwin_80 appears to be the only platform at this time). Remove AFS_BOZONLOCK_ENV from Solaris param files, since it doesn't use bozon locks. Remove all references to pvnLock in Solaris-specific code. Change-Id: Id72c14ec5485d35b853d38e2ea1a944a385f2b5b Reviewed-on: http://gerrit.openafs.org/4889 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit e4c2810f41ccc0ffd13506ff82811e4484090e5a Author: Andrew Deason Date: Fri Jun 24 15:25:46 2011 -0500 Remove support for Solaris pre-8 Remove support for all Solaris and SunOS platforms prior to Solaris 8, since Solaris 7 reached end-of-life in August of 2008. Remove all non-documentation references to sunx86_57 and earlier, sun4x_57 and earlier, and AFS_SUN57_ENV and earlier. References to AFS_SUN58_ENV have been changed to AFS_SUN5_ENV where appropriate, and AFS_SUN5_ENV now implies Solaris 8. AFS_SUN57_64BIT_ENV has been renamed to AFS_SUN5_64BIT_ENV. Change-Id: Ia64ce7da7bfc685fa28a5119c51ec740625456e3 Reviewed-on: http://gerrit.openafs.org/4888 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a4e3c3be697bb99ee4846c99550cd2b52929cdca 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 Change-Id: I2bb70d79da529aee7a810264542aa3b381dcb972 Reviewed-on: http://gerrit.openafs.org/4897 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit f0774acd73b4698be72a5a6c46534fec7dab621c Author: Jeff Blaine Date: Thu Jun 16 19:58:49 2011 -0400 Introduce TAP tests of man pages for command_subcommand Introduces the first batch of man page testing as part of the TAP tests. We would like to fail, for example, when someone has added a new command to vos but not AHEM documented it. For now, the tests consist of checking to ensure that for every subcommand listed in the output of "command help" (e.g. vos help), fail the test if there is not a man page for those (e.g. vos_delentry.1 etc). Copy any of the -man-t tests and edit to make a new one All tests make use of a simple new Perl library stored in tests-lib/perl5 (a new area, not just named 'lib' because I didn't want it to be confused with a s test for a 'lib' in the src). Change-Id: I1e07adafe718c4549f1855c5e5b0d10dd9ab5f00 Reviewed-on: http://gerrit.openafs.org/4846 Reviewed-by: Simon Wilkinson Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 73aadede037ade30dd0bf5307b8ec0c974b570ac Author: Jeff Blaine Date: Fri Jun 17 17:24:54 2011 -0400 Styling tweak for generated HTML man pages Prefer "Georgia" as a typeface over the less readable Times New Roman, but with Times New Roman then "serif" as fallbacks. Georgia is available everywhere. Provide 10px top/bottom and 30px left/right margin on the main body for readability. Margins are good. For review: Old: http://docs.openafs.org/Reference/8/kas_apropos.html New: http://kickflop.net/openafs-man-20110617/kas_apropos.html Change-Id: I687b2007ef56019c5b683a43ac3811426ec825b0 Reviewed-on: http://gerrit.openafs.org/4850 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 70c5cb7b5dc4068928a84fd9a185e26a3655ee67 Author: Jeffrey Altman Date: Tue Jun 28 09:35:02 2011 -0400 rx: race in rx_multi processing multi_Init() registers an arrival procedure which is called when the first response packet for the call arrives. If the call times out the multi_Body loop will call rx_EndCall() and then set multi_h->calls[multi_i] to NULL. If the first data packet of the call arrives before rx_EndCall() is executed, then the arrival procedure, multi_Ready(), will be executed adding the call to the firstNotReady list. When the multi_Body loop attempts to process the call from the firstNotReady list it attempts to dereference the NULL multi_call. This race was introduced by be4abb4ec83a47477b254f2b3375742c4efbb063. multi_h->calls[multi_i] is set to NULL as an indicator to multi_Finalize() that rx_EndCall() has already been processed for the call. When rx_EndCall() is executed the arrival procedure is cleared. If rx_EndCall() has already been processed, the fact that the arrival procedure has been executed must be ignored. Add an additional check in multi_Body for a non-NULL call pointer to skip the startProc and rx_FlushWrite processing on the no longer existent call. Note that it is not safe to hold onto the call reference after rx_EndCall() has been processed since the call slot may be reused for a new RPC before the multi processing on all calls is complete. Change-Id: Ib4694a7e1d133f621d15e79534a42f780b141e34 Reviewed-on: http://gerrit.openafs.org/4890 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear commit 131cbaa0cf74a7b3ca24ec971a9495c8dbd73e6a Author: Jeff Blaine Date: Wed Jun 8 20:56:46 2011 -0400 Change -n to -dryrun for backup subcommands Change -n to -dryrun for "don't do it, show it though" operation to be in line with agreement on -dryrun in place of -noexecute or -n. Updated man page POD sources to reflect the changes and updated README to remove these specific todo line items. Change-Id: I5c1361dcc866ea3d1efbb0c0ddcd4a7fe513c816 Reviewed-on: http://gerrit.openafs.org/4827 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit c643f455cbe8e99ebb062427abcfec8e75a5e1a4 Author: Jeffrey Altman Date: Mon May 30 00:15:43 2011 -0400 vos: refactor ListAddrs refactor ListAddrs to be more readable. Clarify that -uuid and -host cannot be issued at the same time. Rename 'nentries' to 'max_index' so it is clear that ubik_VL_GetAddrs() is issued to set an upper-bound for the number of subsequent ubik_VL_GetAddrsU() calls that are issued when neither -host nor -uuid are specified. Change-Id: Icbd511722728396fda837abba39a3e6809f4d26c Reviewed-on: http://gerrit.openafs.org/4754 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 51fa590e704c77c0e9ba873ecb854448885030a5 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. Change-Id: I8073da701cf11cd0df2b901e81180de7c193ae23 Reviewed-on: http://gerrit.openafs.org/4891 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9f77a2d6b3d571a928261563763913c8c6ee2938 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. Change-Id: I9df3443f0bdf0dd05caac74f4de3a0cc64d26800 Reviewed-on: http://gerrit.openafs.org/4884 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 7532b05221caf2c382d9e8c9ca5af4a284566920 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 Change-Id: I3dc6e571326c7259a39d30bd80b5986ff35c743c Reviewed-on: http://gerrit.openafs.org/4886 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 358099b21c5c888c02bf3754702ae623378c507d 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. Change-Id: I7ee90e1190688570cf3b268229972064480283cc Reviewed-on: http://gerrit.openafs.org/4837 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit 55050f566b1fbf6a2ce3c60ddbb44d0f52d4865b Author: chas williams - CONTRACTOR Date: Wed Jun 8 09:42:47 2011 -0400 doc: fix dependencies index.html might not be built if you are building anything other than the html/chunk.xsl but in general this is better than before. Change-Id: I2e1b98c8a3fce65cb702274d5e276989031e338b Reviewed-on: http://gerrit.openafs.org/4822 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 137dd2349400a2e372f1f03e0bce327fffcb5e9e Author: chas williams - CONTRACTOR Date: Wed Jun 8 09:40:17 2011 -0400 doc: prefer fop to generate pdf from docbook It would seem xsltproc -> fop -> pdf is the "modern" way to generate pdf from docbook now. The hard part is finding the stylesheets. This should work for fedora, sles and debian. Additionally, it brings some consistency--xsltproc for all the conversions. You can still override via configure options if you prefer something else. Change-Id: Id779e9473a6759daddc9a61be714109b27da980e Reviewed-on: http://gerrit.openafs.org/4821 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman commit 6770c6c411f2766471b4dc07bd7c66794f95ba63 Author: Chas Williams (CONTRACTOR) Date: Thu Jun 9 21:14:05 2011 -0400 doc: fix some broken link specifications "local" links to section heads inside the same pod page should be written L instead of L. the other broken links are assorted typos and capitalization changes. Change-Id: I18b57a81d984501309e96dcd4c04582e744a6db2 Reviewed-on: http://gerrit.openafs.org/4831 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman commit 1ac8468ad94f0bcc51bda41be98575ae62c1cd12 Author: Jeffrey Altman Date: Sat Jun 11 23:27:10 2011 -0700 roken: add search.h to .gitignore Change-Id: Iab524de2757af982b00ff09048b6cb4ee34d797e Reviewed-on: http://gerrit.openafs.org/4879 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit f5349051abebd15fc2f2d77ff5b6dc81e09bdf47 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. Change-Id: Id5df08fe31073485e4d733c42310b42090ee8e7b Reviewed-on: http://gerrit.openafs.org/4874 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 926ce3d35018050bdbe8e00011884954d6b0fd80 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. Change-Id: I94f6e5c8b8c60675de25eb6f8290de9545ff4dd0 Reviewed-on: http://gerrit.openafs.org/4876 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit f2d067b4e48500004236b181dd5a25454f352daf 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. Change-Id: I7b9f965fc18b6e6b71275912684ad041aaef19f4 Reviewed-on: http://gerrit.openafs.org/4875 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 3f47779f51dad3af7b1db43bb3fd71f1dd1b76d8 Author: Andrew Deason Date: Tue Jun 21 18:34:46 2011 -0500 dir: Remove extraneous printf from Create Change-Id: Id226d5457119a9f898aa35bc7b4d4db830a2f7fc Reviewed-on: http://gerrit.openafs.org/4878 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 9f8757650c8985785f0934bead2314a2acff21e1 Author: Andrew Deason Date: Tue Jun 21 18:33:16 2011 -0500 dir: Fix DRead DRead was missing a return statement in one of the cases where we found the buffer we were looking for, so we locked the buffer but kept looking. Return it instead. Change-Id: If72a0ba3ce60a847f2796b51a82f0f473bbc608a Reviewed-on: http://gerrit.openafs.org/4877 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 25688bc2e7e8da83b4bf22d7cdc3e0214eadc455 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. Change-Id: Icb2895036620f186230e1558b8bc04d18cc45c86 Reviewed-on: http://gerrit.openafs.org/4873 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 6b833f575743d4a826750bb6913cd53232a8867f 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. Change-Id: If8e461dd91315be845397dd1bf42771c9223d156 Reviewed-on: http://gerrit.openafs.org/4869 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 91b351e88bdb56bfdfc2f5f16f64bb7522796581 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. Change-Id: I9f21138662b0918d6d2b885f0fb5ada7fa4c79ec Reviewed-on: http://gerrit.openafs.org/4868 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 0b9c9e9973e8d32cdfe1fc884fb2c310cedc0404 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. Change-Id: Ic2e7606136ca04c869685345b63101c346ce702b Reviewed-on: http://gerrit.openafs.org/4867 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit e8c4fc4f37912a5d30694caef45d27374e9201e7 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. Change-Id: Iedb34437db9fcfbc90307b01e566a8d089eef4bb Reviewed-on: http://gerrit.openafs.org/4866 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 0118fb5387e656e515d78d48497a48f1e04a1152 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). Change-Id: I715dc673a0b379733e3be26fa594ea13f492a58f Reviewed-on: http://gerrit.openafs.org/4865 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 784babbea1247660f39463403233589a74c6e73b 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. Change-Id: Ia71b387ce521a11e4caf9ec200907efe1d2be8ff Reviewed-on: http://gerrit.openafs.org/4864 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 280c80152522f32cf34deae96696b1db8aaaa9bb 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. Change-Id: I550ebbbae63b7d659bb980eea709a14882038914 Reviewed-on: http://gerrit.openafs.org/4863 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Derrick Brashear commit a80a88e8ba7ac5e2afc5188add482f4e5323128e 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. Change-Id: Ic1e2b32876197f8a1fb620b7d70c0c3ec3f6bb88 Reviewed-on: http://gerrit.openafs.org/4862 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman Tested-by: BuildBot commit 39484c6e57cf993a713b4a989d1c0c227e6f496c 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. Change-Id: I2ed6bce63adf160c03518686ec25cbecc5084f5f Reviewed-on: http://gerrit.openafs.org/4861 Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 53fec2db10ee6a52f3374b62b2d0d7fd791d9996 Author: Simon Wilkinson Date: Tue Jun 21 09:34:50 2011 +0100 rx: Make testclient build on Unix The "testclient" utility is built as part of the build on Windows. Fix it so that it actually builds on Unix, so we can test changes to testclient there. Change-Id: I751e905f6d9676598e3b7be9ccaf321250804f11 Reviewed-on: http://gerrit.openafs.org/4872 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 5614305853f0f87a2418a6fb7ca472a8ef966084 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 ... Change-Id: I6072183b5ca72754755c3ac854e30a064c4187e5 Reviewed-on: http://gerrit.openafs.org/4871 Reviewed-by: Derrick Brashear Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit d7d727b87b44d77ca7b108e6d21d9209b5d84c90 Author: Derrick Brashear Date: Mon Jun 20 12:31:51 2011 -0400 macos: package shared libraries include our shared libraries in the package when we have them Change-Id: I18a38c69410a7fded361b05479c93698e3d618e2 Reviewed-on: http://gerrit.openafs.org/4870 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b65944973a24e9365dc1ff118ded4c3a1e25f782 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. Change-Id: I0f4af56601c43b72394d7903cacc3fc19bc9d046 Reviewed-on: http://gerrit.openafs.org/4860 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 699330682f3cb001bf1bfbeaffd806600ccf69e8 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. Change-Id: I48ab28e03bb7c0a49fe21c21f83adbb02b7665f2 Reviewed-on: http://gerrit.openafs.org/4859 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit c0cfbc40c8ef3de65f144560918cbd2a5bf187ec 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. Change-Id: Ibdeae4577b09d120f22bb922697f92d63aaf0dff Reviewed-on: http://gerrit.openafs.org/4858 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit 800a5642a0b9ff514519b4af30b4d0dadd471480 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. Change-Id: I6cfebb41c18e1acca5bbb70e3ee179c8ee976be3 Reviewed-on: http://gerrit.openafs.org/4852 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 0a318b5bb9d0f5940eeffa092f6adae025d560de Author: Ken Dreyer Date: Wed Jun 15 14:21:27 2011 -0400 Enable -afsdb in the Red Hat packages. Change-Id: Ib701b248155a9a59da132ecb22116cc594089250 Reviewed-on: http://gerrit.openafs.org/4844 Tested-by: BuildBot Reviewed-by: Simon Wilkinson Reviewed-by: Derrick Brashear commit 03a54723eaf23b2aad0d026ba5f1a8e7343b3763 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. Change-Id: Id227ca74f4036c1c1f40a41a922e73198f16f958 Reviewed-on: http://gerrit.openafs.org/4847 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 327f516477b3dbf6ed6302c706bbb2bf41ae7907 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. Change-Id: I93279c5d7b0e5262bfdb68cdbd92c49e1984fa97 Reviewed-on: http://gerrit.openafs.org/4849 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit d354050ab1d9e4fda9265cd119e9787f39bb6fba Author: Marc Dionne Date: Fri Jun 10 21:49:58 2011 -0400 Linux: remove typedef from configure test comment Remove the "typedef" from the structure element configure test comment. The typedef version of the macro is used by the more general element test, so the comment should be more general. This affects comments in src/config/afsconfig.h Change-Id: If5b748e1a63de83e15906fc16e7c94b357c4363c Reviewed-on: http://gerrit.openafs.org/4836 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 36f6eed2b458995ab973102acf74375bf0a66931 Author: Michael Meffie Date: Tue Jun 7 12:37:40 2011 -0400 volinfo: fix false good magic line Fix false report of good magic/version numbers in volume header file. Change-Id: I26869b6e6ada331373d626e501f6520755d5c070 Reviewed-on: http://gerrit.openafs.org/4817 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: BuildBot commit 6cf9254ec29ef10dfd4515f192f53f6c935b2375 Author: Derrick Brashear Date: Fri Jun 10 18:40:33 2011 -0400 generated: take into account the things needed in master we need roken and hcrypto to build the bits we need to build the compiler tools on master. do so. Change-Id: I3e974a5d94bdfdf3e89f3d18aed55ed586b0034d Reviewed-on: http://gerrit.openafs.org/4835 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a00b11221b559aee9a3412b78757173abeabaf77 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 Change-Id: Ib76c158297a331fcaf650c435c5696e5b5aaab8c Reviewed-on: http://gerrit.openafs.org/4834 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a6ef51ff50245d30624545cca05348aaa88865d0 Author: Derrick Brashear Date: Fri Jun 10 03:02:38 2011 -0400 more death to des des is in the generated targets. kill it. Change-Id: Ifb4ad48b0f57e95842411046cb79b589669265b7 Reviewed-on: http://gerrit.openafs.org/4833 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit a3f27333c5521fdc52314bf510943c602b3cd1a0 Author: Derrick Brashear Date: Fri Jun 10 02:11:26 2011 -0400 darwin armv6 and armv7 support simply compile lwp process assembler for both arm arches. Change-Id: Ie09ec1e3684656a492373f86e4c8be71e6abfabd Reviewed-on: http://gerrit.openafs.org/4832 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 3f7d8ec219e1aa04b6c0417ecf5e730d40b4f149 Author: Jonathan Billings Date: Mon Jun 6 16:29:28 2011 -0400 Linux: rpm: Update openafs.spec.in to include changes to installed files * Remove several files from the packaging manifest that are no longer generated or included in the distribution, such as the DES header files. * 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. * Add librokenafs.so.1 and libafshcrypto.so.1 to the base package, because many of the binaries in the base package are linked against librokenafs and the 'butc' binary is linked against libafshcrypto. * Move the librokenafs.{so,a} and libafshcrypto.{so,a} to the -devel package instead of the authlibs-devel package, now that the .so.1 library is part of the base package. * 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. Change-Id: I8f66cf882008b5576528ccc0f4a9694015db85bb Reviewed-on: http://gerrit.openafs.org/4814 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit b1f0bb472e237f5a6f88449db44f030c08a5a324 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. Change-Id: I58d64548303f25a51753d093a733608fea1282e1 Reviewed-on: http://gerrit.openafs.org/4825 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit fc087f187759398a2646480eca25c1195ed23d22 Author: Andrew Deason Date: Wed Jun 8 23:06:58 2011 -0500 volinfo: PrintFileNames is namei-only PrintFileNames only exists on namei, so make sure it's inside a namei ifdef. Change-Id: I65867b54e3747b6f3a26cdfd70ab84ed7fe4e44d Reviewed-on: http://gerrit.openafs.org/4830 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Derrick Brashear commit f091ace32e3045da396d577055dafd67888ff7ea 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. Change-Id: Ibaa5140d510c2df7e1129352a6677594785b42b4 Reviewed-on: http://gerrit.openafs.org/4829 Tested-by: BuildBot Reviewed-by: Derrick Brashear commit 1c917cee2b948595c98b8b0645289ccc79d8ffd9 Author: Jonathan A. Kollasch Date: Wed Jun 8 20:31:49 2011 -0500 Remove NetBSD-specific debugging statement Change-Id: I458a6b50fee4ed41dd512e23de6b4e516e0ddc93 Reviewed-on: http://gerrit.openafs.org/4828 Reviewed-by: Jonathan A. Kollasch Tested-by: Jonathan A. Kollasch Reviewed-by: Derrick Brashear commit f88c2db3ac273171f8cfe4df60456764d98bfd29 Author: Jeff Blaine Date: Wed Jun 8 14:56:58 2011 -0400 Removed detail of prev. completed work found listed todo list A todo item was in the "Known Problems" list, but the work was already completed. Cleared this item from the list (klog man page info about krb5, klog.krb5, fakeka) Change-Id: I9dbff50afd7bbaa6f5d20f7d4acfc796731b9c2d Reviewed-on: http://gerrit.openafs.org/4826 Reviewed-by: Russ Allbery Tested-by: Russ Allbery commit 418a70feedb5574d28c3fbe513333b0fb102a3ca 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. Change-Id: Idbec3e0027fc7e3c43b503c55c1b479bcb5984bc Reviewed-on: http://gerrit.openafs.org/4819 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman commit 9cde8b8854f255a2cc264e0391dbb855fcfab23b Author: Chas Williams (CONTRACTOR) Date: Tue Jun 7 14:26:11 2011 -0400 doc: fixes for the xsltproc -> fop -> pdf toolchain "Empty" entities seem to trigger a bug in fop. These are easily converted to reference on the containing block. Additionally, 's seem to need to be inside a non-structural entity (like a ) in order to determine their page number/location correctly. Change-Id: I2ab577f6ba8989685257fb9429e00a71dd51075c Reviewed-on: http://gerrit.openafs.org/4812 Tested-by: BuildBot Reviewed-by: Jeffrey Altman commit 445a8b5461c66160552136214a1d8d97de15967e 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. Change-Id: I7f9e94b09c504193084e1e04ae137df08b27b447 Reviewed-on: http://gerrit.openafs.org/4815 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear commit 6a22a2f4b7aa0d960cea17b419003986f6184d58 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. Change-Id: Ied5653b6f01b78525091d8bf09bdc454002eedc0 Reviewed-on: http://gerrit.openafs.org/4797 Reviewed-by: Derrick Brashear Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit fe7d38f3205bd879e961f5849ed64df5b495388a 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. Change-Id: I59578956e81197bbea7ce496e2f520a2995a3e95 Reviewed-on: http://gerrit.openafs.org/4796 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman commit cd326b2f54c3397468807c32ce0834f73c9d5d1b 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. Change-Id: I3bdf0c8f297b1d91b1a2bf3284adfeb9301874eb Reviewed-on: http://gerrit.openafs.org/4798 Reviewed-by: Derrick Brashear Tested-by: BuildBot commit e448824f9dac207f0198d2284988fcf97243d30e Author: Jeff Blaine Date: Thu May 26 14:22:52 2011 -0400 Added fstrace subcommand h