commit a854188922f29fac15ad17999732c45b7e6818bf Author: Stephan Wiesand Date: Wed Apr 27 15:18:48 2016 +0200 Make OpenAFS 1.6.18 Update version strings and finalize NEWS for release 1.6.18 . Change-Id: I526f8964913d0cd869bfabad74036328e26ed5c3 Reviewed-on: https://gerrit.openafs.org/12261 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 72b84db9f7cdd716dc9dc41473c4cc60bb569f31 Author: Stephan Wiesand Date: Wed Mar 30 10:13:18 2016 +0200 Make OpenAFS 1.6.18pre1 Update version strings for the first 1.6.18 prerelease Change-Id: I7dd02969ace4868cd562f2e6a1ff9dd4eecf5fb2 Reviewed-on: https://gerrit.openafs.org/12234 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit ee08daff26f757a25964785cdf2668bc5f1567df Author: Stephan Wiesand Date: Wed Apr 6 12:28:29 2016 +0200 Update NEWS for 1.6.18pre1 Preliminary release notes for 1.6.18 Change-Id: I03fafe2ffa2f280ad2e7e67a00cbcc1bdc6ec5f2 Reviewed-on: https://gerrit.openafs.org/12242 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand commit 5ba144bcf9e4df4c0ac960b2dd885649c040be25 Author: Michael Meffie Date: Thu Aug 27 13:06:05 2015 -0400 afs: shake harder in shake-loose-vcaches Linux based cache managers will allocate vcaches on demand and deallocate batches of vcaches in the background. This feature is called dynamic vcaches. Vcaches to be deallocated are found by traversing the vcache LRU list (VLRU) from the oldest vcache to the newest. Up to a target number of vcaches are attempted to be evicted. The afs_xvcache lock protecting the VLRU may be dropped and re-acquired while attempting to evict a vcache. When this happens, it is possible the VLRU may have changed, so the traversal of the VLRU is restarted. This restarting of the VLRU transversal is limited to 100 iterations to avoid looping indefinitely. Vcaches which are busy cannot be evicted and remain in the VLRU. When a busy cache was not evicted and the afs_xvache lock was dropped, the VLRU traversal is restarted from the end of the VLRU. When the busy vcache is encountered on the retry, it will trigger additional retries until the loop limit is reached, at which point the target number of vcaches will not be deallocated. This can leave a very large number of unbusy vcaches which are never deallocated. On a busy machine, tens of millions of unused vcaches can remain in memory. When the busy vcache at the end of the VLRU is finally evicted, the log jam is broken, and the background deamon will hold the afs_xvcache lock for an excessively long time, hanging the system. Fix this by moving busy vcaches to the head of the VLRU before restarting the VLRU traversal. These busy vcaches will be skipped when retrying the VLRU traversal, allowing the cache manager to make progress deallocating vcaches down to the target level. This was already done on the mac osx platform while attempting to evict vcaches. Move the code to move busy vcaches to the head of the VLRU up the the platform agnostic caller. Thanks to Andrew Deason for the initial version of this patch. Reviewed-on: https://gerrit.openafs.org/11654 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk (cherry picked from commit 5c136c7d93ed97166f39bf716cc7f5d579b70677) Change-Id: I612a7b9ddafc697c0d15042344f0ff678decb4d5 Reviewed-on: https://gerrit.openafs.org/12257 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 440b518e6045e7cf2cd587dde38d95a29886aee3 Author: Michael Meffie Date: Thu Feb 25 18:49:20 2016 -0500 LINUX: hold vcache while dropping dcache refs Hold a reference on a vcache while attempting to evict the inode from the dcache. Since the afs_xvcache lock is dropped, it could be possible for the vcache to be flushed during this time, making it unsafe to use the vcache after the eviction attempt. Reviewed-on: https://gerrit.openafs.org/12206 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk (cherry picked from commit 961875cbedc2c91cdba6dc34a43c6136ea9797fb) Change-Id: I5beea5798f6cb10a00db90e1ba18dbc7ab1e43cb Reviewed-on: https://gerrit.openafs.org/12256 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit fbd50cb0c4b955e4699d323f7d59e8c794956ce2 Author: Andrew Deason Date: Sat Apr 11 20:51:09 2015 -0500 afs: Log abnormally large chunk files Any chunk in our cache for a regular file should be smaller than or equal to our configured chunksize. If someone sets a chunk to be larger than that, it is very strange and may cause other confusing issues. Specifically, afs_DoPartialWrite determines if our cache is "too full" by counting the number of dirty chunks. If we have a dirty chunk that is much larger than the chunksize, it can throw off the afs_DoPartialWrite calculation. This is only true for dcaches backing regular files, though. For directories, we fetch the entire directory into a single chunk file, and the size of a directory blob can easily exceed the chunksize without issues. The aforementioned issue with afs_DoPartialWrite does not apply, since directory chunks cannot be dirty (we only locally modify the chunk if we modify the dir on the server, and the DVs match). Anyway, it should not be possible to get a chunk for a regular file larger than the chunksize. Log a message if it does occur, to help assist anyone in tracking down issues when this does occur. [mmeffie@sinenomine.net remove unnecessary casts in afs_warn args.] Reviewed-on: http://gerrit.openafs.org/11831 Reviewed-by: Michael Meffie Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 11845765c75a2f15404ac55a882358c3f88595b9) Change-Id: I7c9f4aa147ba63e51bb805484bac5785259847cb Reviewed-on: https://gerrit.openafs.org/12216 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 10d148abe23d215c818643a0fea24c5d121046f0 Author: Andrew Deason Date: Thu Apr 9 21:26:25 2015 -0500 afs: Log weird 'size' fetchdata errors There are a couple of situations that should never happen when issuing a fetchdata, but cause errors when they do: - The fileserver responds with more than 2^32 bytes of data - The fileserver responds with more data than requested (but still smaller than 2^32) While these should normally never be encountered, it can be very confusing when they do, since they cause file fetches to fail. To give the user or investigating developer some hope of figuring out what is going on, at least log a warning in these situations, to at least indicate this is the area in which something is breaking. Only log these once, in case something causes these conditions to be hit, e.g., every fetch. Once is at least enough to say this is happening. [mmeffie@sinenomine.net remove unneeded casts in afs_warn args and explicit static initializers.] Reviewed-on: http://gerrit.openafs.org/11830 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 5fbf45b56298aa5a93cf9015f2d6346c7a0f615c) Change-Id: I2f15255f33f44bef038ac9926d1ed47eca73d89a Reviewed-on: https://gerrit.openafs.org/12215 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 8cb61b05780ae6f6584ce5ff381d9d34135411f0 Author: Andrew Deason Date: Tue Apr 7 22:10:53 2015 -0500 afs: Fix fetchInit for negative/large lengths Currently, the 'length64' variable in rxfs_fetchInit is almost completely unused (it just goes into an icl logging function). For the length that we actually use ('*alength'), we just take the lower 32 bits of the length that the fileserver told us. This method is incorrect in at least the following cases: - If the fileserver returns a length that is larger than 2^32-1, we'll just take the lower 32 bits of the 64-bit length the fileserver told us about. The client currently never requests a fetch larger than 2^32-1, so this would be an error, but if this occurred, we would not detect it until much later in the fetch. - If the fileserver returns a length that is larger than 2^31-1, but smaller than 2^32, we'll interpret the length as negative (which we assume is just 0, due to bugs in older fileservers). This is also incorrect. - If the fileserver returns a negative length smaller than -2^31+1, we may interpret the give length as a positive value instead of a negative one. Older fileservers can do this if we fetch data beyond the file's EOF (this was fixed in the fileserver in commit 529d487d65d8561f5d0a43a4dc71f72b86efd975). This positive length will cause an error (usually), instead of proceeding without error (which is what would happen if we correctly interpreted the length as negative). On Solaris, this can manifest as a failed write, when writing to a location far beyond the file's EOF from the fileserver's point of view, because Solaris writes can trigger a fetch for the same area. Seeking to a location far beyond the file's EOF and writing can trigger this, as can a normal copy into AFS, if the file is large enough and the cache is large enough. To explain in more detail: When copying a file into AFS, the cache manager will buffer the dirty data in the disk cache until the file is synced/closed, or we run out of cache space. While this data is buffering, the application will write into an offset, say, 3GiB into the file. On Solaris, this can trigger a read for the same region, which will trigger a fetch from the fileserver at the offset 3GiB into the file. If the fileserver does not contain the fix in commit 529d487d65d8561f5d0a43a4dc71f72b86efd975, it will respond with a large negative number, which we interpret as a large positive number; much larger than the requested length. This will cause the fetch to fail, which then causes the whole write() call to fail. Specifically this will fail with EINVAL on Solaris, since that is the error code we return from afs_GetOnePage when we fail to acquire a dcache. If the cache is small enough, this will not happen, since we will flush data to the fileserver before we have a large amount of dirty data, e.g., 3GiB. (The actual error occurs closer to 2GiB, but this is just for illustrative purposes.) To fix this, detect the various ranges of values mentioned above, and handle them specially. Lengths that are too large will yield an error, since we cannot handle values over 2^31-1 in the rxfs_* framework currently. For lengths that are negative, just act as if we received a length of 0. Do this for both the 64-bit codepath and the non-64-bit codepath, just so they remain identical. [mmeffie@sinenomine.net: directly use 64 bit comparisons, don't mask end call error code, commit nits.] Reviewed-on: http://gerrit.openafs.org/11829 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit c0f52c3a3d76059c9d8b2df3374df844d8d6861b) Change-Id: If6b9debe3f6381634b15be4529931422d908c2aa Reviewed-on: https://gerrit.openafs.org/12214 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit a1065ca054c4c0da4dca15926dd7ab49bb86092a Author: Andrew Deason Date: Thu Apr 9 19:58:51 2015 -0500 afs: Avoid incorrect size when fetching beyond EOF Currently, afs_GetDCache contains a couple of calculations that look similar to this: if (position + size > file_length) { size = file_length - position; } if (size < 0) { size = 0; } Most of the time, this is fine. However, if 'position' is more than 2GiB greater than file_length, 'size' will calculated to be smaller than -2GiB. Since 'size' in this code is a signed 32-bit integer, this can cause 'size' to underflow, and result in a value closer to (positive) 2GiB. This has two potential effects: The afs_AdjustSize call in afs_GetDCache will cause the underlying cache file for this dcache to be very large (if our offset is around 2GiB larger than the file size). This can confuse other parts of the client, since our cache usage reporting will be incorrect (and can be even way larger than the max configured cache size). This will also cause a read request to the fileserver that is larger than necessary. Although 'size' will be capped at our chunksize, it should be 0 in this situation, since we know there is no data to fetch. At worst, this currently can just result in worse performance in rare situations, but it can also just be very confusing. Note that an afs_GetDCache request beyond EOF can currently happen in non-race conditions on at least Solaris when performing a file write. For example, with a chunksize of 256KiB, something like this will trigger the overflow in 'size' in most cases: $ printf '' > smallfile && printf b | dd of=smallfile bs=1 oseek=2147745793 But there are probably other similar scenarios. To fix this, just check if our offset is beyond the relevant file size, and do not depend on 'size' having sane values in edge cases such as this. Reviewed-on: http://gerrit.openafs.org/11828 Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> (cherry picked from commit 3caee7575491c33920b9c84f5dc4098d99373cf6) Change-Id: Ibbecd779050f72e90db991e5a0695c86dadf484b Reviewed-on: https://gerrit.openafs.org/12213 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit ce8c728f4bbc34286714ce99898edb5a928c2a65 Author: Michael Meffie Date: Tue Dec 16 16:13:01 2014 -0500 vlserver: do not perform ChangeAddr on mh entries, except for removal Fix a long standing bug in the ChangeAddr RPC which damages the vldb, When vos changeaddr is run with -oldaddr and -newaddr, and the -oldaddr is present in an multi-homed entry, instead of changing the address in the mh entry, the server slot is "downgraded" to a single homed entry and the mh entry is orphaned in the vldb. Instead, if the -oldaddr is in a multi-home entry, refuse to change the address with a VL entry not found error and log the event. Multi-homed addresses can be changed manually using the vos setaddrs command which calls the RegisterAddrs() RPC. Reviewed-on: http://gerrit.openafs.org/11639 Reviewed-by: Benjamin Kaduk Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit 1cc77cd43732cca1c617db329a71693903d2b699) Change-Id: I14a77317d582dd1cb8490e643b8fdfc86f4942c0 Reviewed-on: https://gerrit.openafs.org/12089 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 994531efe704a59a0b7c5fa5cfad6c41397252d4 Author: Benjamin Kaduk Date: Tue Apr 5 12:53:48 2016 -0500 Fix typo in cm_dcache.c Commit b85c5f9339e20d3de9b1316217dadbea41ad537e introduced a new memset() but left out a prenthesis. In the absence of a windows build machine, this error went unnoticed. Reported by Mark Vitale. Reviewed-on: https://gerrit.openafs.org/12241 Reviewed-by: Michael Meffie Tested-by: BuildBot Tested-by: Michael Meffie Reviewed-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk (cherry picked from commit 808b156bd890cd78dc59b443b4ebe32e98d440d4) Change-Id: I1e8ac9c0edaf38212c63b662af227f4c1ef9603f Reviewed-on: https://gerrit.openafs.org/12252 Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit bfd7fced975986b74c2dae02b5835e3716a212d7 Author: Stephan Wiesand Date: Thu Apr 7 10:58:30 2016 +0200 Linux: Fix misleading indentation and other whitespace Commit 7edc6694e7632c9736bd1516935604a638165313 introduced a misleading indentation of a line in afs_linux_prefetch. Correct it, and once here remove trailing whitespace throughout the file. Reviewed-on: https://gerrit.openafs.org/12253 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 3609ebcfa3f70ca7612364c0cc2345b1d7f1096b) Change-Id: I0d42c6751b835308c692c0ebb7d217f56ad5cf2a Reviewed-on: https://gerrit.openafs.org/12254 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand commit 0e72e8463759ea707f687295f12e9ec328b41911 Author: Jeff Blaine Date: Wed May 18 21:46:52 2011 -0400 Hide -noexecute in favor of -dryrun Makes all previous -noexecute arguments hidden (still callable) and replaces them with -dryrun whose help text has been made common where appropriate instead of the 3 previous ways the argument was explained. Reviewed-on: http://gerrit.openafs.org/4678 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit f1928b9d26cfc415911a2e4346fbfefb909745ac) Change-Id: I1685d2de6d4f690300deac36143912fad11608c9 Reviewed-on: https://gerrit.openafs.org/11613 Reviewed-by: Perry Ruiter Reviewed-by: Jan Iven Reviewed-by: Daria Phoebe Brashear Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 49a95f7c2bd550436e4bb2b7b4e9843315c0ebba Author: Marcio Barbosa Date: Tue Dec 29 10:31:43 2015 -0300 afs: do not allow two shutdown sequences in parallel Often, ‘afsd -shutdown’ is called right after ‘umount’. Both commands hold the glock before calling ‘afs_shutdown’. However, one of the functions called by 'afs_shutdown', namely, ‘afs_FlushVCBs’, might drop the glock when the global 'afs_shuttingdown' is still equal to 0. As a result, a scenario with two shutdown sequences proceeding in parallel is possible. To fix the problem, the global ‘afs_shuttingdown’ is used as an enumerated type to make sure that the second thread will not run ‘afs_shutdown’ while the first one is stuck inside ‘afs_FlushVCBs’. Reviewed-on: http://gerrit.openafs.org/12016 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk (cherry picked from commit 70fd9bc6dcc79cb25e98cdcfd0f085c4bf4f310a) Change-Id: I073d1914a7daa858a78305ff154074f2a51a9f5f Reviewed-on: https://gerrit.openafs.org/12179 Tested-by: BuildBot Reviewed-by: Marcio Brito Barbosa Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 18e761bdea76db32130e20598b8e3b310cf390c4 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. Reviewed-on: http://gerrit.openafs.org/4831 Tested-by: BuildBot Reviewed-by: Derrick Brashear Reviewed-by: Ken Dreyer Reviewed-by: Jeffrey Altman (cherry picked from commit 6770c6c411f2766471b4dc07bd7c66794f95ba63) Change-Id: Id53b3ad6c2f8e0ec00fabf733b2b2052495b3f27 Reviewed-on: https://gerrit.openafs.org/11675 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit c77ca20f3eb72d69930259214d782918c561b8ba Author: Mark Vitale Date: Thu Mar 27 06:36:59 2014 -0400 DAFS: large volume support - fileserver crash after "addled bitmap" Any DAFS fileserver operation that allocates a new vnode but fails to update the vnode index will crash: "Fatal Rx error: assertion failed: --vp->nWaiters >= 0, file: ../vol/volume.c, line: nnnn" Note: This crash was exposed by other bugs (to be addressed in future commits) in OpenAFS large volume support. However, there may be other failure paths (unrelated to large volumes) that expose this error as well. When VAllocVnode() must allocate a new vnode but fails while updating the vnode index file (e.g. an "addled bitmap" due to other bugs in working with a vnode index larger than 2^31 bytes), it branches to common recovery logic at label error_encountered:. Part of this recovery is to call VFreeBitmapEntry_r(). Commit 08ffe3e81d875b58ae5fe4c5733845d5132913a0 added a VOL_FREE_BITMAP_WAIT flag to VFreeBitmapEntry() in order to prevent races with VAllocBitmapEntry(). If the caller specifies VOL_FREE_BITMAP_WAIT, VFreeBitmapEntry_r will call VCreateReservation_r() and VWaitExclusiveState_r(). However, the exit from VFreeBitmapEntry_r() calls VCancelReservation_r() unconditionally. This works correctly with the majority of callers to VFreeBitmapEntry_r, which do specify the VOL_FREE_BITMAP_WAIT flag. However, the VAllocVnode() error_encountered logic must specify 0 for this flag because the thread is already in an exclusive state (VOL_STATE_VNODE_ALLOC). This correctly causes VFreeBitmapEntry_r() to forgo both the reservation and wait-for-exclusive-state. However, before exit it erroneously calls VCancelReservation_r(). We now have unbalanced reservations (nWaiters); this causes an assert when the VAllocVnode() error_encountered recovery code later calls VCancelReservation_r() for what it believes is its own prior reservation. Modify VFreeBitmapEntry_r() to make its final VCancelReservation_r() conditional on flag VOL_FREE_BITMAP_WAIT. Reviewed-on: http://gerrit.openafs.org/11983 Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit d833ba768064a32a19c6b0b94ffb0d8a3a40a089) Change-Id: Ia146ca55b1c0497d475357e61eaeb061a11bd597 Reviewed-on: https://gerrit.openafs.org/12209 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 7a0aa1f6148ef5190d2d1783ad4679b9fe75d24c Author: Mark Vitale Date: Wed Nov 18 15:09:37 2015 -0500 vlserver: VL_GetEntryByName* requests undercounted Commit a14e791541bf19c6c377e68bc2f978fba34f94b1 refactored and corrected the counting of requests and aborts. However, it inadvertently introduced a new undercount for VL_GetEntryByName* requests, counting them only if NameIsId(volname), e.g. volname="536870911". Ensure that the normal case of a non-"numeric" volname is also counted. Discovered during review of pullup to 1.6.x. Reviewed-on: http://gerrit.openafs.org/12106 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 670381aa5d3a7bc91ad74c7499605cca2c33d612) Change-Id: Ic41f8775e4897efe5f6280b56d06d733865556a2 Reviewed-on: https://gerrit.openafs.org/12113 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 86624d4118cc0f50d0096563b615154f0fb1c4f7 Author: Mark Vitale Date: Tue Feb 16 14:55:03 2016 -0500 viced: incorrect FID audit of BulkStatus and InlineBulkStatus The audit code for object AUD_FIDS is off by one - we list the first FID twice and skip the last FID. Repair so all FIDs are properly audited. Reviewed-on: http://gerrit.openafs.org/12191 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk (cherry picked from commit 44349d0694c7a185fae4c55c75cb01196d109a26) Change-Id: I7f662fd54aaab8182fedc5ebd607db37e501b423 Reviewed-on: https://gerrit.openafs.org/12211 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 790cc130644c83cccc915e997f65a012fa47e86b Author: Simon Wilkinson Date: Thu May 19 15:06:15 2011 +0100 vlserver: Tidy up request counting Tidy up the counting of requests and aborts in the vlserver. Don't hide a variable allocation within a macro, convert macros to inline functions, and make it possible to not count particular operations by passing in an opcode of 0. Reviewed-on: http://gerrit.openafs.org/4769 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit a14e791541bf19c6c377e68bc2f978fba34f94b1) Change-Id: I1dcea218fbd3097511a93c9a825d6e76e9c8cf59 Reviewed-on: https://gerrit.openafs.org/12085 Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit e980a39cc39a02de8e112323f6037c740ee60728 Author: Michael Meffie Date: Fri Jan 30 12:20:10 2015 -0500 volser: detect eof in dump stream while reading acl Detect an EOF condition while reading the ACL in a dump stream and return a restore error, instead of filling the ACL with 0xFF and then failing the restore due to an invalid tag. Reviewed-on: http://gerrit.openafs.org/11703 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit ed52d65fe98549e13023e0a8997da479b626085a) Change-Id: I9aacd635b8bbf89923db0121639d5112ab775c19 Reviewed-on: https://gerrit.openafs.org/12185 Reviewed-by: Mark Vitale Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit cc6dc146e71ca6501e5d2d8f7e3fafe83d289c8b Author: Benjamin Kaduk Date: Sun Nov 22 14:23:49 2015 -0600 cellconfig: check for invalid dotted quads IP addresses entered into the CellServDB with components larger than 255 would silently be trucated down to 8-bit unsigned integer representations. This could cause confusing behavior with occasional hangs. FIXES 131794 Reviewed-on: http://gerrit.openafs.org/12109 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 97150150e6d12cbbc0c4a5af3424c9bf1e56918c) Change-Id: I4e628ab7e12e33b23cc513a268879de115ddec2e Reviewed-on: https://gerrit.openafs.org/12210 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 30da3d32533ce225d8d89099b0c3355f01a946a9 Author: Michael Meffie Date: Fri Jan 30 12:12:03 2015 -0500 volser: range check acl header fields during dumps and restores Perform range checks on the acl header fields when reading an acl from a dump stream and when writing an acl to a dump stream. Before this change, a bogus value in the total, positive, or negative acl fields from a dump stream could cause an out of bounds access of the acl entries table, crashing the volume server. Reviewed-on: http://gerrit.openafs.org/11702 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk (cherry picked from commit 0bf9fba458b39035a09f45c1b63f1e65672d4c00) Change-Id: Icebeb1d62900a7978f02177627a30e41de49a182 Reviewed-on: https://gerrit.openafs.org/12127 Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit c402e60e2b2af0f4f1cdd7129dcceb678e2b3f09 Author: Michael Meffie Date: Wed Feb 24 16:57:11 2016 -0500 LINUX: ifconfig is deprecated ifconfig is deprecated and is no longer installed by default on RHEL 7 and Centos 7. Use the replacement ip command in the init script for linux. Fallback to ifconfig in the event the ip command is not available. Thanks to Ben Kaduk for pointing out the hash built-in command. Reviewed-on: http://gerrit.openafs.org/12192 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk (cherry picked from commit b702ab5da216976ed01ad3b1c474ecd4cc522ff2) Change-Id: I9ffdfee233555f1e06bc4f980e2905851224ecc9 Reviewed-on: https://gerrit.openafs.org/12193 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 7883453bc474d6d53fc4a71898dcc1998fe0d3b9 Author: Marc Dionne Date: Sat Apr 2 09:43:26 2011 -0400 Convert ubik_Call(x) calls to ubik_x() Convert remaining ubik_Call(function, ..) users to ubik_function(..). Reviewed-on: http://gerrit.openafs.org/4399 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Derrick Brashear (cherry picked from commit b3094a39b74c0c593f6dcac945ad5e4bbf155c2d) Change-Id: Ida6d324e744904606c7cbfc073b60e0ed5733ed7 Reviewed-on: https://gerrit.openafs.org/11780 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit c9bbfff826c43f24c041b157a6a57184bbe82fe0 Author: Benjamin Kaduk Date: Sat Dec 19 01:08:06 2015 -0600 Typo fix in comment afsd -shutdown takes only a single dash, as with all cmd-style options. Improve the grammar a bit while we're here. Reviewed-on: http://gerrit.openafs.org/12133 Reviewed-by: Michael Meffie Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 6db49a841784459cf583e914b3f2433ce1e70f4c) Change-Id: Id3b12157c9d5ac3b9aeeba0c2af22fac33a2630f Reviewed-on: https://gerrit.openafs.org/12197 Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 44b1874cf26776c52f0a8e074791bf33b0fa71da Author: Benjamin Kaduk Date: Sun Nov 22 13:24:43 2015 -0600 volser: set error, not code, before rfail The rfail cleanup handler overwrites 'code' ~unconditionally, but does use an existing 'error' value if present. Since the intent is to return failure to the caller, preserve the code in the error variable and do so. FIXES 131897 Reviewed-on: http://gerrit.openafs.org/12108 Reviewed-by: Jeffrey Altman Tested-by: BuildBot (cherry picked from commit 888fc16db5f0063464bf219a6cf6fee0faea4705) Change-Id: Ic8aab7cbe9bac6c0677b1e3bc2ca2b59a76bd621 Reviewed-on: https://gerrit.openafs.org/12126 Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit bb8a6f45cbabb1db11fbcbfda5e2a3c97ffd0dd5 Author: Michael Meffie Date: Wed Mar 2 15:11:24 2016 -0500 afsd: deprecate afsd -settime Print a warning message if -settime is given and update the afsd man page to declare that -settime is deprecated. Thanks to Stephan Wiesand for suggesting this change. This is a 1.6.x specific change. Change-Id: Iab3f9aa602552e88d74b04e4628c7af13e0439e3 Reviewed-on: https://gerrit.openafs.org/12207 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 79f7c6c9f048d4bfc5ab599d040c9c1443327f3e Author: Benjamin Kaduk Date: Sun Nov 22 18:22:58 2015 -0600 Fix optimized IRIX kernel module builds Commit 9f94892f8d996a522e7801ef6088a13769bee7c2 (from 2006) introduced per-file CFLAGS, using $(CFLAGS-$@); this construct is not parsed well by IRIX make, which ends up attempting to expand '$@)' and finding mismatched parentheses. Commit 5987e2923a2670a27a801461dc9668ec88ed7d2a (from 2007) followed, fixing the IRIX build but only for the NOOPT case. This left the problematic expression in CFLAGS_OPT until 2013, when another RT ticket was filed reporting the continued breakage. That ticket was then ignored until 2015 (now) with no particular cries of outrage on the mailing lists. Perhaps this gives some indication of the size and/or mindset of the IRIX userbase. (There have been successful IRIX installations during this time period, so presumably it was discovered that disabling optimizations helped the build along.) FIXES 131621 Reviewed-on: http://gerrit.openafs.org/12111 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Michael Meffie Reviewed-by: Benjamin Kaduk (cherry picked from commit 767694d9ec86fc9451f5a4ba2ec7405c29986a21) Change-Id: Ie5d349b1e9f8a768efcb461d7367d2d7deac31f6 Reviewed-on: https://gerrit.openafs.org/12198 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 54a14d5349d19a7c765991552441ace97fe9bc21 Author: Michael Meffie Date: Thu Apr 16 20:03:21 2015 -0400 viced: add missing new lines to log messages The server logger requires an explicit new line. Reviewed-on: http://gerrit.openafs.org/11841 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk (cherry picked from commit 634ca4fdc206884afe0826bc682aa7d5208cdc8b) Change-Id: Ic04d98d15b92a86303a38000d5738c038b83d68f Reviewed-on: https://gerrit.openafs.org/12129 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Stephan Wiesand commit 848eb258e961b4bd5ee3181b53cc08e3308d95a2 Author: Dave Botsch Date: Wed Oct 28 11:28:01 2015 -0400 Initial set of changes for El Capitan OS X 10.11 . Mainly new El Capitan specific config files and defitions of Darwin 15 variables and config tests/etc. Reviewed-on: http://gerrit.openafs.org/12072 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit bf3707ccbf98f44103171f4a5c6fb5bcd0744bfc) Change-Id: I96c6c451841081d26a101507f35ff86fc8c54771 Reviewed-on: https://gerrit.openafs.org/12212 Reviewed-by: Michael Meffie Reviewed-by: Marcio Brito Barbosa Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit d73bbdfc49469128071980fd62be4b929593d90e Author: Stephan Wiesand Date: Tue Mar 8 14:15:17 2016 +0100 Linux 4.4: Do not use splice() splice() may return -ERESTARTSYS if there are pending signals, and it's not even clear how this should be dealt with. This potential problem has been present for a long time, but as of Linux 4.4 (commit c725bfce7968009756ed2836a8cd7ba4dc163011) seems much more likely to happen. Until resources are available to fix the code to handle such errors, avoid the riskier uses of splice(). If there is a default implementation of file_splice_{write,read}, use that; on somewhat older kernels where it is not available, use the generic version instead. [kaduk@mit.edu: add test for default_file_splice_write] Reviewed-on: https://gerrit.openafs.org/12217 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit ae5f411c3b374367ab8ae69488f78f8e0484ce48) Change-Id: I40dd0d60caece6379a62674defb8d46a2bfadad6 Reviewed-on: https://gerrit.openafs.org/12228 Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 2c3558c8d0688de2faf4d4d349ad48ff15d7fb25 Author: Michael Laß Date: Mon Jan 18 19:58:00 2016 +0100 Linux 4.4: Use locks_lock_file_wait The locks API was changed in Linux 4.4, introducing locks_lock_file_wait (e55c34a66f87e78fb1fc6b623b78c5ad74b475af) and removing flock_lock_file_wait (616fb38fa7a9599293e05ae1fa9acfaf73922434). locks_lock_file_wait can be used as a drop-in replacement so define flock_lock_file_wait as an alias for it. Reviewed-on: https://gerrit.openafs.org/12170 Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 58d82226a555d3781a5cb45e5cc177727628ebd8) Change-Id: Icceae3906c1a612fb9104b860e519bb7f94d25d3 Reviewed-on: https://gerrit.openafs.org/12227 Reviewed-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 0bd41d090e41649170eef8406bd21a58c4e8c073 Author: Michael Laß Date: Mon Jan 18 18:29:00 2016 +0100 Linux 4.4: key_payload has no member 'value' In Linux 4.4 (146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc) type-specific and payload data have been merged. The payload is now accessed directly and has no 'value' member anymore. FIXES 132677 Reviewed-on: https://gerrit.openafs.org/12169 Tested-by: BuildBot Reviewed-by: Mark Vitale Tested-by: Mark Vitale Reviewed-by: Benjamin Kaduk (cherry picked from commit 5067ee3ae11932a3f1c972c8f88b20afbd9e1d88) Change-Id: I5a3e89b2676b463935e9a77042cbcd8ab812dc68 Reviewed-on: https://gerrit.openafs.org/12226 Tested-by: BuildBot Reviewed-by: Michael Meffie Tested-by: Michael Meffie Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 4b00492016c54ec050abb71f6acf653616850f38 Author: Michael Meffie Date: Fri Mar 18 10:22:33 2016 -0400 doc: fs examine no longer requires read rights on the volume root vnode Update the man page to reflect the current access rights required for fs examine. Historically, fs examine required read access on the root vnode of the volume housing the directory or file being examined. This access check was relaxed in commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a, since the information returned by the file server is already available anonymously by other means. Reviewed-on: https://gerrit.openafs.org/12223 Reviewed-by: Benjamin Kaduk Tested-by: Benjamin Kaduk (cherry picked from commit f99c1ec32bb6e8d31ac517173ff7502dbd85aa05) Change-Id: I580d1e0cab7f823ac1932f99066495cef9e2410a Reviewed-on: https://gerrit.openafs.org/12224 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit bfe80a986a6efbfd74c950e3fdd1e0c2590079cf Author: Benjamin Kaduk Date: Wed Mar 16 16:16:49 2016 -0500 Add param files for FreeBSD 10.2, 10.3 FreeBSD 10.3 is in the beta stage now; better get ready for it. Reviewed-on: https://gerrit.openafs.org/12222 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit 02a393de6b30a500b77f276011c70d41eff363b5) [updated to match the FreeBSD param.h files on openafs-stable-1_6_x] Change-Id: Iae290edd29b34aa849f7422b48c765f81eb802fe Reviewed-on: https://gerrit.openafs.org/12232 Tested-by: BuildBot Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand