commit 79188311b418b39539e0772725b9754130864c11 Author: Benjamin Kaduk Date: Tue Dec 26 17:42:39 2017 -0600 Make OpenAFS 1.8.0pre4 Update version strings for the fourth 1.8.0 prerelease. Change-Id: Ib7defe21ca5e5a8c2214879633a467e002f3269b Reviewed-on: https://gerrit.openafs.org/12837 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk commit 90bc3cf9355e3f60455d744b3e00315507e17b92 Author: Benjamin Kaduk Date: Tue Dec 26 17:41:59 2017 -0600 Update NEWS for 1.8.0pre4 Change-Id: I0ba71b1e837309b36db39895914b6a8b9380a81f Reviewed-on: https://gerrit.openafs.org/12836 Tested-by: BuildBot Reviewed-by: Stephan Wiesand Reviewed-by: Benjamin Kaduk commit 4feec06c7bdc7102ae654cff20eb02650ec32800 Author: Mark Vitale Date: Thu Nov 30 20:26:46 2017 -0500 LINUX: Avoid d_invalidate() during afs_ShakeLooseVCaches() With recent changes to d_invalidate's semantics (it returns void in Linux 3.11, and always returns success in RHEL 7.4), it has become increasingly clear that d_invalidate() is not the best function for use in our best-effort (nondisruptive) attempt to free up vcaches that is afs_ShakeLooseVCaches(). The new d_invalidate() semantics always force the invalidation of a directory dentry, which contradicts our desire to be nondisruptive, especially when that directory is being used as the current working directory for a process. Our call to d_invalidate(), intended to merely probe for whether a dentry can be discarded without affecting other consumers, instead would cause processes using that dentry as a CWD to receive ENOENT errors from getcwd(). A previous commit (c3bbf0b4444db88192eea4580ac9e9ca3de0d286) tried to address this issue by calling d_prune_aliases() instead of d_invalidate(), but d_prune_aliases() does not recursively descend into children of the given dentry while pruning, leaving it an incomplete solution for our use-case. To address these issues, modify the shakeloose routine TryEvictDentries() to call shrink_dcache_parent() and maybe __d_drop() for directories, and d_prune_aliases() for non-directories, instead of d_invalidate(). (Calls to d_prune_aliases() for directories have already been removed by reverting commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286.) Just like d_invalidate(), shrink_dcache_parent() has been around "forever" (since pre-git v2.6.12). Also like d_invalidate(), it "walks" the parent dentry's subdirectories and "shrinks" (unhashes) unused dentries. But unlike d_invalidate(), shrink_dcache_parent() will not unhash an in-use dentry, and has never changed its signature or semantics. d_prune_aliases() has also been available "forever", and has also never changed its signature or semantics. The lack of recursive descent is not an issue for non-directories, which cannot have such children. [kaduk@mit.edu: apply review feedback to fix locking and avoid extraneous changes, and reword commit message] Reviewed-on: https://gerrit.openafs.org/12830 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit afbc199f152cc06edc877333f229604c28638d07) Change-Id: I6d37e5584b57dcbb056385a79f67b92a363e08d2 Reviewed-on: https://gerrit.openafs.org/12851 Tested-by: BuildBot Tested-by: Benjamin Kaduk Reviewed-by: Benjamin Kaduk commit 4b633c9681057122b9266b8a775d0ad5aa0a3ac3 Author: Mark Vitale Date: Thu Nov 30 17:56:13 2017 -0500 LINUX: consolidate duplicate code in osi_TryEvictDentries The two stanzas for HAVE_DCACHE_LOCK are now functionally identical; remove the preprocessor conditionals and duplicate code. Minor functional change is incurrred for very old (before 2.6.38) Linux versions that have dcache_lock; we are now obtaining the d_lock as well. This is safe because d_lock is also quite old (pre-git, 2.6.12), and it is a spinlock that's only held for checking d_unhashed. Therefore, it should have negligible performance impact. It cannot cause deadlocks or violate locking order, because spinlocks can't be held across sleeps. Reviewed-on: https://gerrit.openafs.org/12792 Reviewed-by: Benjamin Kaduk Reviewed-by: Andrew Deason Tested-by: BuildBot (cherry picked from commit 5076dfc14b980aed310f3862875d5e9919fa199d) Change-Id: I7a17494b40c049a562dec20c50c27125f54436d0 Reviewed-on: https://gerrit.openafs.org/12850 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 16c0dbd7961fb599ed9f29d700d1a713902bd96d Author: Mark Vitale Date: Thu Nov 30 16:51:32 2017 -0500 LINUX: consolidate duplicate code in canonical_dentry The two stanzas for HAVE_DCACHE_LOCK are now identical; remove the preprocessor conditionals and duplicate code. No functional change should be incurred by this commit. Reviewed-on: https://gerrit.openafs.org/12791 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 0678ad26b6069040a6ea86866fb59ef5968ea343) Change-Id: If0f9516201cea747a753db04ba2d0e2cac69971b Reviewed-on: https://gerrit.openafs.org/12849 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit c42dea8e0293016ec30fa703956c8bbc5d5cb76d Author: Mark Vitale Date: Thu Nov 30 16:46:16 2017 -0500 LINUX: add afs_d_alias_lock & _unlock compat wrappers Simplify some #ifdefs for HAVE_DCACHE_LOCK by pushing them down into new helpers in osi_compat.h. No functional change should be incurred by this commit. Reviewed-on: https://gerrit.openafs.org/12790 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 652cd597d9b3cf1a9daccbbf6bf35f1b0cd55a94) Change-Id: I6aec7d6a21e68011ca10ceaa15e83d80f52fad59 Reviewed-on: https://gerrit.openafs.org/12848 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 0ec02ef73d7b94bbe83e7532524c096799cd4b25 Author: Mark Vitale Date: Thu Nov 30 16:08:38 2017 -0500 LINUX: create afs_linux_dget() compat wrapper For dentry operations that cover multiple dentry aliases of a single inode, create a compatibility wrapper to hide differences between the older dget_locked() and the current dget(). No functional change should be incurred by this commit. Reviewed-on: https://gerrit.openafs.org/12789 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 74f4bfc627c836c12bb7c188b86d570d2afdcae8) Change-Id: Id854e5957547a1370cadb400f7f699c30d861fd1 Reviewed-on: https://gerrit.openafs.org/12847 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit ae70407fafa3faa94706979c727f53a625939061 Author: Mark Vitale Date: Thu Nov 30 13:45:27 2017 -0500 Revert "LINUX: do not use d_invalidate to evict dentries" Linux recently changed the semantics of d_invalidate() to: - return void - invalidate even a current working directory OpenAFS commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286 switched libafs to use d_prune_aliases() instead. However, since that commit, several things have happened: - RHEL 7.4 changed the semantics of d_invalidate() such that it invalidates the cwd, but did NOT change the return type to void. This broke our autoconf test for detecting the new semantics. - Further research reveals that d_prune_aliases() was not the best choice for replacing d_invalidate(). This is because for directories, d_prune_aliases() doesn't invalidate dentries when they are referenced by its children, and it doesn't walk the tree trying to invalidate child dentries. So it can leave dentries dangling, if the only references to thos dentries are via children. In preparation for future commits, revert c3bbf0b4444db88192eea4580ac9e9ca3de0d286 . Reviewed-on: https://gerrit.openafs.org/12788 Reviewed-by: Andrew Deason Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 367693bd7da2de593e3329f6acc4a4d07621fb97) Change-Id: I3dfa9127adf8424fe675e237194d6ade5a7fc4f1 Reviewed-on: https://gerrit.openafs.org/12846 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 2a06e32c398bbb9e74258799d87a599d286f97d9 Author: Mark Vitale Date: Thu Nov 30 14:04:48 2017 -0500 Revert "LINUX: eliminate unused variable warning" This reverts commit 19599b5ef5f7dff2741e13974692fe4a84721b59 to allow also reverting commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286 . Reviewed-on: https://gerrit.openafs.org/12787 Reviewed-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit f8247078bd33a825d8734b2c8f05120d15ab3ffd) Change-Id: I023c88e19d9f1a18b2bfaec8a35bd635f157b570 Reviewed-on: https://gerrit.openafs.org/12845 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit e412a87b1f6a68a2c0b9e1baad1c328fdccbd41d Author: Pat Riehecky Date: Thu Mar 12 14:33:10 2015 -0500 redhat: separate debuginfo package for kmod rpm Place the debuginfo for the kmod into its own rpm so that it doesn't have to track against the userspace packages. FIXES 132034 Reviewed-on: https://gerrit.openafs.org/11867 Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 443dd5367e0cd9050ad39a6594c5be521271b4e9) Change-Id: I6a24bb08242ec34c123880e9cbca4580a3560cba Reviewed-on: https://gerrit.openafs.org/12822 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 7a80b4ba67b0d295df72e87da4aa638bd5e245de Author: Stephan Wiesand Date: Fri Dec 22 14:40:32 2017 +0100 Linux 4.15: check for 2nd argument to pagevec_init Linux 4.15 removes the distinction between "hot" and "cold" cache pages, and pagevec_init() no longer takes a "cold" flag as the second argument. Add a configure test and use it in osi_vnodeops.c . Reviewed-on: https://gerrit.openafs.org/12824 Tested-by: BuildBot Reviewed-by: Marcio Brito Barbosa Tested-by: Marcio Brito Barbosa Reviewed-by: Benjamin Kaduk (cherry picked from commit fb1f14d8ee963678a9caad0538256c99c159c2c4) Change-Id: Ib9e0751e4900d984a4197d18ee9ebb1bdc7bf331 Reviewed-on: https://gerrit.openafs.org/12829 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 2ff3ef2ec6f217195dc50c04ba4e3409c23e6a4d Author: Stephan Wiesand Date: Fri Dec 22 14:17:09 2017 +0100 Linux: use plain page_cache_alloc Linux 4.15 removes the distinction between "hot" and "cold" cache pages, and no longer provides page_cache_alloc_cold(). Simply use page_cache_alloc() instead, rather than adding yet another test. Reviewed-on: https://gerrit.openafs.org/12823 Tested-by: BuildBot Reviewed-by: Marcio Brito Barbosa Tested-by: Marcio Brito Barbosa Reviewed-by: Benjamin Kaduk (cherry picked from commit be5f5b2aff2d59986dd8e7dd7dd531be24c27cb2) Change-Id: I2d4df508abfa9d3c7020b8a2817ed3e882a4dbbc Reviewed-on: https://gerrit.openafs.org/12828 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit d9bb508e07f32219679c0e696f07f95e3b48886c Author: Marcio Barbosa Date: Thu Oct 12 12:42:40 2017 -0300 macos: make the OpenAFS client aware of APFS Apple has introduced a new file system called APFS. Starting from High Sierra, APFS replaces Mac OS Extended (HFS+) as the default file system for solid-state drives and other flash storage devices. The current OpenAFS client is not aware of APFS. As a result, the installation of the current client into an APFS volume will panic the machine. To fix this problem, make the OpenAFS client aware of APFS. Reviewed-on: https://gerrit.openafs.org/12743 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk (cherry picked from commit 6e57b22642bafb177e0931b8fb24042707d6d62f) Change-Id: I60d2a57fae3ee227bb3327a5e18962f46b49c991 Reviewed-on: https://gerrit.openafs.org/12827 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 5857724bf60e7706bcefde63d8fa0c7b2119e662 Author: Marcio Barbosa Date: Fri Oct 6 10:01:12 2017 -0300 macos: packaging support for MacOS X 10.13 This commit introduces the new set of changes / files required to successfully create the dmg installer on OS X 10.13 "High Sierra". Reviewed-on: https://gerrit.openafs.org/12742 Tested-by: BuildBot Reviewed-by: Marcio Brito Barbosa Reviewed-by: Benjamin Kaduk (cherry picked from commit e533d0737058940d59d93467c9b4d6d3ec2834e6) Change-Id: I8932f6a3db6a0572aa36944aa339b888fac94b7d Reviewed-on: https://gerrit.openafs.org/12826 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit ac8cab7fcd3abf76c39e9e08c2c3d6ec0c184837 Author: Marcio Barbosa Date: Tue Oct 3 17:01:56 2017 -0300 macos: add support for MacOS 10.13 This commit introduces the new set of changes / files required to successfully build the OpenAFS source code on OS X 10.13 "High Sierra". Reviewed-on: https://gerrit.openafs.org/12741 Reviewed-by: Mark Vitale Reviewed-by: Benjamin Kaduk Tested-by: BuildBot (cherry picked from commit 804c9cbf501d4ca91b69ad8fd6d64e49efa25a47) Change-Id: I9abcccf8313c8ac075eb1edbd36cbaa565968b38 Reviewed-on: https://gerrit.openafs.org/12825 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk commit 383688fa0d6904291578eb1f9a7c2ec1e06f54ca Author: Benjamin Kaduk Date: Thu Dec 14 19:54:57 2017 -0600 Fix macro used to check kernel_read() argument order The m4 macro implementing the configure check is called LINUX_KERNEL_READ_OFFSET_IS_LAST, but it defines a preprocessor symbol that is just KERNEL_READ_OFFSET_IS_LAST. Our code needs to check for the latter being defined, not the former. Reported by Aaron Ucko. Reviewed-on: https://gerrit.openafs.org/12808 Reviewed-by: Anders Kaseorg Tested-by: BuildBot Reviewed-by: Benjamin Kaduk (cherry picked from commit edc5463f3db4b6af2307741d9f4ee8f2c81cd98e) Change-Id: I7bc6615118f1200d3f257e7a01652b49b458a8fa Reviewed-on: https://gerrit.openafs.org/12809 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk