commit 5fb8b61d2337638a67d40e8566b541176cb7d937 Author: Stephan Wiesand Date: Thu Jun 4 11:11:31 2015 +0200 Make OpenAFS 1.6.12 Update version strings and NEWS for release 1.6.12 Change-Id: If3ecee369ad1fe1e5866e3ffccc233ad4085684a Reviewed-on: http://gerrit.openafs.org/11884 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Michael Meffie Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit 46ecc7db4af6821da272d3ef6a28179ae5ddf342 Author: Stephan Wiesand Date: Thu May 7 09:57:50 2015 +0200 Make OpenAFS 1.6.12pre2 prerelease for 1.6.12 Change-Id: I139d2533e76b480b789eada9e049a1dbd2321d2c Reviewed-on: http://gerrit.openafs.org/11864 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit edfd7a255cfe9000c7a040ac1018e9227079cfe9 Author: Stephan Wiesand Date: Wed May 27 14:52:41 2015 +0200 Update NEWS for 1.6.12pre2 Preliminary release notes for 1.6.12. Change-Id: I12349fb2a8b29e031e33f7105aa66887ef460ff0 Reviewed-on: http://gerrit.openafs.org/11881 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 2c95c104fd526f99db6237fc49534ad7dd6e92c0 Author: Marc Dionne Date: Wed Apr 22 15:06:12 2015 -0300 Linux: mmap: Apply recursion check only to recursion cases The CPageWrite flag was originally added to prevent a scenario where a thread doing "writepage" would realize that the cache was too full and that some of its contents need to be written back to the server. Before writing back it would ask the OS to flush any dirty VM associated with the vcache entries that are to be written, to make sure the data is not stale. This flush could itself trigger writeback, leading to deadly recursion. One such scenario is a process doing mmap writes to a file larger than the cache. With some kernel versions and some callers of writepage, this can cause the mapping to be marked as being in an error state, leading to EIO errors passed back to user space. Make the recursion check more specific to only bail when the calling thread is one that was originally seen writing. A list of current writers is maintained instead of a single state flag. This lets other threads (like the flusher thread) go on with writeback to the same file, and limits the WRITEPAGE_ACTIVATE return case to call sites that can deal with it. In testing this helps avoid EIO errors when writing large chunks of data through mmap. Thanks to Yadav Yadavendra for extensive analysis and testing. Reviewed-on: http://gerrit.openafs.org/11124 Reviewed-by: Daria Brashear Tested-by: BuildBot (cherry picked from commit 95b857399d71cb1f6619e625bff256f8c4c72c6a) Change-Id: I08ced97c4f58f95375fda2ed9c707cdf7657e493 Reviewed-on: http://gerrit.openafs.org/11877 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 080e73e2362233953e6771f58c2ab7b78c2ee76d Author: Marc Dionne Date: Mon Apr 20 10:41:53 2015 -0300 Linux 4.1: Don't define or use ->write directly We no longer have to define a ->write operation, and we can't expect the underlying disk cache filesystem to have one. Use the new __vfs_read/write helpers that will select the operation to use based on what's available for that particular filesystem. Reviewed-on: http://gerrit.openafs.org/11849 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 5c1237432edf4600111845d175c92252430d5f76) Change-Id: I21bca85637e07d0e03ef471896d0454eeef68a14 Reviewed-on: http://gerrit.openafs.org/11873 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 015fe32c126cf850b919cdfa5587eeface1e9c2e Author: Marc Dionne Date: Mon Apr 20 10:37:40 2015 -0300 Linux 4.1: No need for do_sync_read Make the test here a bit more specific. do_sync_read no longer exists, but we don't use it for new kernels. Trying to define it here in terms of generic_file_read is not helpful as that doesn't exist anymore. Reviewed-on: http://gerrit.openafs.org/11848 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit fcfa5ae2468d878db962a93d6013fcd3042e6c13) Change-Id: I87bf0fc856d244d15bdae300f0cd6b80ecb63797 Reviewed-on: http://gerrit.openafs.org/11872 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 33a14ea9a205fe9d8ea2f5d6cf28e9cbc20aabeb Author: Benjamin Kaduk Date: Wed May 20 10:57:53 2015 -0400 afsio: switch BreakUpPath to strdup The current version of BreakUpPath is slightly broken, since commit 4e68282e26b0c4569d25d076d54274f0da47a691 -- it has two output parameters but takes only one length parameter for the size of the output buffers passed in. The callers ended up using the shorter of the buffer lengths in question, so there is not a risk of a buffer overrun, but long paths would not be properly handled. There is not really any need to pass in a length at all, since what is going on is conceptually strdup, and there is no real need to use strlcpy at all. Make the change from strlcpy to str(n)dup, and adjust callers to free the outputs as appropriate. While here, convert writeFile() to use goto and a cleanup handler to avoid leaks. Reviewed-on: http://gerrit.openafs.org/11874 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Daria Brashear (cherry picked from commit b8648dbefb3968329d20cad8976ce15947428678) Change-Id: I13d4ffd4ef46cbb7423d229cf6a6e85f7a42ecc1 Reviewed-on: http://gerrit.openafs.org/11879 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Stephan Wiesand commit 200f9c57927e988352491880bea70fa152d7cc61 Author: Jeffrey Altman Date: Sun Nov 11 22:00:07 2012 -0500 afsio: process windows file paths consistently Windows file paths can use either '\' or '/' as a path separator. libafscp on the other hand requires '/' and argv[0] will always use '\'. Introduce a new function ConvertAFSPath() which converts the input path to '/' and converts \\afs to /afs. A future commit should access the registry and make use of the NetbiosName and MountRoot values to perform the conversion correctly. Reviewed-on: http://gerrit.openafs.org/8430 Reviewed-by: Derrick Brashear Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 0bef3159d3698a941154bd21352eb35bd94edb8c) Change-Id: Id174313afae9c64a27133477e43e13731c0ac6b7 Reviewed-on: http://gerrit.openafs.org/11878 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit c2718d5ed7380f2c6d8b8621e5886b20de225c4c Author: Simon Wilkinson Date: Fri Mar 30 19:35:51 2012 +0100 venus: Make clang happy with strlcpy use clang now expects that strlcpy will always be used to prevent overflow of the destination string, and gives a warning if the size parameter is based solely on the length of the source string. Modify the BreakUpPath function so that it takes the size of the destination string as an argument, and uses this to limit the amount of data pasted into it. Reviewed-on: http://gerrit.openafs.org/7086 Tested-by: BuildBot Reviewed-by: Derrick Brashear (cherry picked from commit 4e68282e26b0c4569d25d076d54274f0da47a691) Change-Id: I31003fa06fc331a6313ca17840dcb46f61299921 Reviewed-on: http://gerrit.openafs.org/11845 Tested-by: BuildBot Reviewed-by: Stephan Wiesand commit 9a324f14e7c98a302d7276d7c151ccef9242c9f9 Author: Simon Wilkinson Date: Fri Mar 30 19:18:47 2012 +0100 libafscp: Use strdup, rather than rolling our own A = malloc(strlen(B)+ 1); memset(A, 0, strlen(B) + 1); strlcpy(A, B, strlen(B) + 1); can be more simply written as A = strdup(B); Doing so also avoids a warning from clang that strlcpy isn't checking for A overflowing. Reviewed-on: http://gerrit.openafs.org/7077 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit 1e30c00e7d9b45d65e819d39414939f2d5f7631b) Change-Id: I886bef77fdedb63d1c83e657c25d112e0a635db2 Reviewed-on: http://gerrit.openafs.org/11844 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 7dff0032992eac3c078f03e520aee5fed00f2b21 Author: Ben Kaduk Date: Wed Feb 11 17:47:10 2015 -0500 Remove spurious NULL checks clang 3.5 is more aggressive about these checks than the previous FreeBSD system compiler, so new warnings (which became errors) appeared on FreeBSD 11-CURRENT. In afs_dcache.c, checking &tdc->f for NULL-ness has no effect. The struct fcache f member of struct dcache is an ordinary structure element; its address will be the value of tdc plus the offset of f within struct dcache, which will not be NULL even if tdc is NULL. In ubik_db_if.c, udbHandle is a file-scope global and thus has allocated storage; the address of a member variable will never be NULL. The 0 it was compared against was spelled RX_SECIDX_NULL, which shows the intended check, which is for the value of the uh_scIndex member variable, not its address. In afscp_server.c, srv->conns can never be NULL since conns is a member variable of struct afscp_server (of array type, containing pointers to struct rx_connection). Comparing the array member variable against NULL is comparing the address of the array, which is never NULL since it is not allocated separately from struct afscp_server. In fssync-debug.c, state.vop->partName is never NULL because common_volop_prolog always allocates for state.vop, and the partName member variable of struct fssync_state is of array type, and thus is not separately allocated from the containing structure. Reviewed-on: http://gerrit.openafs.org/11739 Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit fb499c2406450fa5dc423a0b038266d3b8e79e33) Change-Id: I13799a3362508672136f8c603eabdfc0f3ee072d Reviewed-on: http://gerrit.openafs.org/11843 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 264ac76af4e82b0a1e1b27f3f4482100fb1bde20 Author: Benjamin Kaduk Date: Wed Apr 22 13:43:43 2015 -0400 kauth: fix clock skew detection Commit 5b3c1042969daec38ccb260e61d665eda0c713ea changed/removed some uses of abs() on unsigned time values. While the previous use of abs() was indeed incorrect, the result wasn't necessarily much better, even though it built with recent compilers, since it only checked for skew in one direction. Define and use a macro to correctly evaluate the conditionals in 64-bit precision, avoiding C's integer promotion rules which prefer unsigned types (Date) to signed types of the same width (time_t on 32-bit systems). Reviewed-on: http://gerrit.openafs.org/11850 Reviewed-by: Stephan Wiesand Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 810f0ccd0354dac30af024ca7b5acf3ebabf5f4b) Change-Id: I29337e1ecd410fcf7733408287930c50c055ff90 Reviewed-on: http://gerrit.openafs.org/11863 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 3bd4e8f797ce9834ff128468b777d870a9ee3dae Author: Ben Kaduk Date: Fri Feb 13 09:47:20 2015 -0500 Fix incorrect uses of abs() abs(3) is a function of one variable of type int returning int. labs(3) is a function of one variable of type long returning long. labs(3) should be used when the input is of type long, as in kaprocs.c. Calling anything from the abs(3) family on a variable of unsigned type is a bogus type pun, and a logical operation which is a no-op. (Unsigned values are never negative and thus the absolute value function is the identity over the entire range of values representable in an unsigned type.) Just remove the use of abs() for unsigned values, as in kaprocs.c, krb_udp.c, and vldb_check.c While in kaprocs.c, wrap a long line that was touched for the conversion to labs(3), spell the argument to time(3) as NULL instead of 0, remove unneeded parentheses, and correct the spelling of "reserved". Reviewed-on: http://gerrit.openafs.org/11745 Tested-by: BuildBot Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Benjamin Kaduk (cherry picked from commit 5b3c1042969daec38ccb260e61d665eda0c713ea) Change-Id: I82038e41346479dad39466907b95f2d7540f6258 Reviewed-on: http://gerrit.openafs.org/11842 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit d75ec582869afffc24f31b2acd115bd4a92a9b2d Author: Daria Brashear Date: Thu May 21 16:34:09 2015 -0400 Add defines for recent darwin sysctl constants These were accidentally omitted from commit ab9bb6363ca95f658764fbb9fb68ec88f89a5b3f. Reviewed-on: http://gerrit.openafs.org/11875 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Perry Ruiter Reviewed-by: Benjamin Kaduk (cherry picked from commit 9076cbd58dd48801ad212f803f586fdc53d7b886) Change-Id: I5a2ff768e0faec955c6ed7dafb4231fd3885e5bd Reviewed-on: http://gerrit.openafs.org/11876 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Daria Brashear Reviewed-by: Stephan Wiesand commit 9e08b24100fc49126b4483279b331f7eb4e745ce Author: Daria Brashear Date: Thu Apr 16 13:12:05 2015 -0400 osx: update afssettings for yosemite handle deprecated functions Reviewed-on: http://gerrit.openafs.org/11836 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit ab9bb6363ca95f658764fbb9fb68ec88f89a5b3f) Change-Id: I2ffab98ee422fb9d98a592ccbe2f1efbef1d2197 Reviewed-on: http://gerrit.openafs.org/11859 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Reviewed-by: Stephan Wiesand commit c8d6d91dfca8c19f1c101ee6987141fd601ea2c3 Author: Stephan Wiesand Date: Thu Mar 5 11:17:46 2015 +0100 Make OpenAFS 1.6.12pre1 prerelease for 1.6.12 Change-Id: Id73f0d7daa82ea51e7e62a497b1604f5ee658cc0 Reviewed-on: http://gerrit.openafs.org/11796 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 20d07f1763c9d72c5d8eb5fde09fe540fd5fc7df Author: Stephan Wiesand Date: Mon Apr 13 13:01:51 2015 +0200 Update NEWS for 1.6.12pre1 Preliminary release notes for 1.6.12. Change-Id: Ic54f4720c85ca819680d91d5329acc7aaa0d1960 Reviewed-on: http://gerrit.openafs.org/11832 Tested-by: BuildBot Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 6833be1e845c54edd9452b9e9e0fbd529cd1c8c3 Author: Nathan Dobson Date: Fri Mar 20 18:32:22 2015 -0400 aklog: Correct size used for strlcpy() When copying into the 'cell' array, use the size of cell, not the size of some other array that is copied into a few lines previously. (cherry picked from commit 777870da86e9ed66756e01e858a54e959959482d) Change-Id: Ib8b523901dd8008038c5a95a7c315b899cff8cee Reviewed-on: http://gerrit.openafs.org/11807 Reviewed-by: Jeffrey Altman Tested-by: BuildBot Reviewed-on: http://gerrit.openafs.org/11808 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit 539b0d759755145eb20c5fd2938d47aac7049480 Author: Jeffrey Altman Date: Wed Feb 11 01:25:04 2015 -0500 ubik: DISK_UpdateInterfaceAddr == server restart If a DISK_UpdateInterfaceAddr RPC is received the server that sent it restarted. Force the urecovery code to verify the server state. Change-Id: I465863dc3a52d844b56d576bd55229435556cfd6 Reviewed-on: http://gerrit.openafs.org/11738 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Jeffrey Hutzelman Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman (cherry picked from commit 30667a5d7b86b29f9aafe2b490d89b8e01bfc541) Reviewed-on: http://gerrit.openafs.org/11774 Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 09c1b9d5cf5aa9249b06b9312bb5e79eb3e06dca Author: Jeffrey Altman Date: Thu Jan 22 01:14:28 2015 -0500 ubik: SDISK_Begin no quorum, wrong db, no transaction When processing an DISK_Begin RPC verify that there is an active quorum and that the local database is current. Otherwise, fail the RPC with a UNOQUORUM error. The returned error must be UNOQUORUM instead of USYNC becase the returned error code will be returned by the coordinator's ContactQuorum_iterate() to the client that triggered the write transaction. Most ubik clients will only retry if the error is UNOQUORUM. FIXES 131997 Change-Id: Icaa30e6aca82e7e7d33e9171a4f023970aba61df Reviewed-on: http://gerrit.openafs.org/11689 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Hutzelman Reviewed-by: Jeffrey Altman (cherry picked from commit d47beca13236c64ed935fabeff9d1001e8a8871f) Reviewed-on: http://gerrit.openafs.org/11773 Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand commit 3da7b78ea965e5e1c94cd922eab0ac1d4e3d1b61 Author: Michael Meffie Date: Thu Nov 13 22:28:08 2014 -0500 libafs: remove "Please install afsd with check server daemon" warning Apparently, ancient versions of afsd did not start the check server daemon (AFSOP_START_CS). The afs_Daemon tries to detect when the check server daemon is not running and issues a warning to upgrade afsd. The afs_Daemon waits for the cache initialization to complete (AFSOP_GO) before detecting if the cache server daemon is started. Unfortunately, when running with memcache, the cache initialization is fast enough to race with the start of the check server daemon, and the "Please install afsd with check server daemon" message is sometimes printed to the syslog. Since all modern versions of afsd do start the check server daemon, this error message is no longer needed, so just remove the message and the flag used to print it on only once. Reviewed-on: http://gerrit.openafs.org/11602 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Jeffrey Altman (cherry picked from commit 8ce37d0d4aa4e6107f79efaf5027f31ea5a17604) Change-Id: I292052c9ba629c85ddc4b76c4b3db7d54ce1d852 Reviewed-on: http://gerrit.openafs.org/11680 Reviewed-by: Perry Ruiter Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Stephan Wiesand commit a48e90ddf1de19e766a8cc5898f9ac0a340eddb4 Author: Andrew Deason Date: Tue Jun 10 14:47:31 2014 -0500 doc: Document fs listquota 2TB partition limit We have previously documented that volumes over 2TB can result in inaccuracies, but this documentation does not say how the 'partition' field in "fs listquota" can be inaccurate. It is confusing to see a usage of 0% for a partition that you know is being used, so try to briefly explain in what way this field is inaccurate. The reason we _under_-report the partition usage is that the fileserver actually gives back PartBlocksAvail and PartMaxBlocks (not "blocks used" and "blocks total"). So 1TB used and 4TB total is truncated to 2TB and given back as 2TB free and 2TB total. One we hit 3TB used we'll report it as 1TB free 2TB total (50%) when the actual usage is 75%. Reviewed-on: http://gerrit.openafs.org/11245 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit cd8f24d9a1ba8563c6bef2b8d30885a753e8d30c) Change-Id: I2bd72cca994414a88073d26d44bef49e9cac3be1 Reviewed-on: http://gerrit.openafs.org/11626 Tested-by: BuildBot Reviewed-by: Perry Ruiter Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand