]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Revert "afs: shake harder in shake-loose-vcaches"
authorStephan Wiesand <stephan.wiesand@desy.de>
Wed, 6 Jul 2016 14:23:32 +0000 (16:23 +0200)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 14 Jul 2016 12:44:33 +0000 (08:44 -0400)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/DARWIN/osi_vcache.c
src/afs/afs_vcache.c

index 1a1199c4cbc0787504f7bb5035cf9801ac28a898..18d8d9a0890c1457d13ea6df48a49c748617f64d 100644 (file)
@@ -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;
index ca5a956ea28be3261b1d9c12228dc662e1b2c28a..d751a564ce8623da5edf80176b6f9d62a0c99ea2 100644 (file)
@@ -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) {