From: Stephan Wiesand Date: Wed, 6 Jul 2016 14:23:32 +0000 (+0200) Subject: Revert "afs: shake harder in shake-loose-vcaches" X-Git-Tag: upstream/1.6.18.2^2~4 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=b3fc8f288fa0aa29c50c0ea22330105444c8e808;p=packages%2Fo%2Fopenafs.git Revert "afs: shake harder in shake-loose-vcaches" This reverts commit 5ba144bcf9e4df4c0ac960b2dd885649c040be25 which does fix a real problem but unfortunately unmasks another one. This is a 1.6 only change. A proper fix will hopefully be developed on the master branch and then backported. Change-Id: I81d4af8c07dbd983ea693f5e1de112830c2b6794 Reviewed-on: https://gerrit.openafs.org/12323 Tested-by: BuildBot Reviewed-by: Mark Vitale Reviewed-by: Michael Meffie Reviewed-by: Stephan Wiesand --- diff --git a/src/afs/DARWIN/osi_vcache.c b/src/afs/DARWIN/osi_vcache.c index 1a1199c4c..18d8d9a08 100644 --- a/src/afs/DARWIN/osi_vcache.c +++ b/src/afs/DARWIN/osi_vcache.c @@ -53,7 +53,10 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) { * this out, since the iocount we have to hold makes it * always "fail" */ if (AFSTOV(avc) == tvp) { - /* Caller will move this vcache to the head of the VLRU. */ + if (*slept) { + QRemove(&avc->vlruq); + QAdd(&VLRU, &avc->vlruq); + } return 0; } else return 1; diff --git a/src/afs/afs_vcache.c b/src/afs/afs_vcache.c index ca5a956ea..d751a564c 100644 --- a/src/afs/afs_vcache.c +++ b/src/afs/afs_vcache.c @@ -725,7 +725,6 @@ int afs_ShakeLooseVCaches(afs_int32 anumber) { afs_int32 i, loop; - int evicted; struct vcache *tvc; struct afs_q *tq, *uq; int fv_slept, defersleep = 0; @@ -753,23 +752,12 @@ afs_ShakeLooseVCaches(afs_int32 anumber) } fv_slept = 0; - evicted = osi_TryEvictVCache(tvc, &fv_slept, defersleep); - if (evicted) { + if (osi_TryEvictVCache(tvc, &fv_slept, defersleep)) anumber--; - } if (fv_slept) { if (loop++ > 100) break; - if (!evicted) { - /* - * This vcache was busy and we slept while trying to evict it. - * Move this busy vcache to the head of the VLRU so vcaches - * following this busy vcache can be evicted during the retry. - */ - QRemove(&tvc->vlruq); - QAdd(&VLRU, &tvc->vlruq); - } goto retry; /* start over - may have raced. */ } if (uq == &VLRU) {