mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
d822447c27
Our two 'goto tryagain;' cases in afs_root() have a couple of refcounting problems: - If vget() returns an error, but any of the cases in the first if() statement are true (such as, afs_globalVp does not have CStatd set), we'll vput() and afs_PutVCache(), but vget() didn't grab a reference, since it returned an error. So we'll put references we don't actually have. - If we enter the first if() block when vget() returns a success, we vput() the reference we got from vget(), but we also put an additional reference by calling afs_PutVCache(). If afs_globalVp still points to this same vcache, this can cause afs_globalVp to point to a vcache without a ref held for it. Because of this, if afs_globalVp loses CStatd while we're waiting for the vnode lock, this can cause the afs_globalVp vcache to not have any refs held for it, which causes all sorts of other possible problems, where the usecount for afs_globalVp can drop to 0 when we don't expect it to. To fix these issues, remove the extra afs_PutVCache(), and check for an error from vget() before doing the other afs_globalVp-related checks. The relevant code path involved here can be stressed by frequently causing lookups via /afs/..., while at the same time causing frequent callback breaks on the root vnode. This can be achieved by using an RW volume as the root volume (with non-dynroot), and having another client constantly modify the root directory in that volume while a FreeBSD client constantly does /afs/... lookups in separate pids. Thanks to tcreech@tcreech.com for reporting and helping investigate the relevant issue. Change-Id: I812d063b3d60ac6eb841863cc7fba3e152393910 Reviewed-on: https://gerrit.openafs.org/14206 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Andrew Deason <adeason@sinenomine.net> |
||
---|---|---|
build-tools | ||
doc | ||
src | ||
tests | ||
.gitignore | ||
.gitreview | ||
.mailmap | ||
.splintrc | ||
acinclude.m4 | ||
CODING | ||
configure-libafs.ac | ||
configure.ac | ||
CONTRIBUTING | ||
INSTALL | ||
libafsdep | ||
LICENSE | ||
Makefile-libafs.in | ||
Makefile.in | ||
NEWS | ||
NTMakefile | ||
README | ||
README-WINDOWS | ||
regen.sh |
AFS is a distributed file system that enables users to share and access all of the files stored in a network of computers as easily as they access the files stored on their local machines. The file system is called distributed for this exact reason: files can reside on many different machines, but are available to users on every machine. OpenAFS 1.0 was originally released by IBM under the terms of the IBM Public License 1.0 (IPL10). For details on IPL10 see the LICENSE file in this directory. The current OpenAFS distribution is licensed under a combination of the IPL10 and many other licenses as granted by the relevant copyright holders. The LICENSE file in this directory contains more details, thought it is not a comprehensive statement. See INSTALL for information about building and installing OpenAFS on various platforms. See CODING for developer information and guidelines. See NEWS for recent changes to OpenAFS.