]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DAFS: Do not give back vol to viced after salvage
authorAndrew Deason <adeason@sinenomine.net>
Thu, 7 Apr 2011 18:51:14 +0000 (13:51 -0500)
committerDerrick Brashear <shadow@dementix.org>
Fri, 16 Dec 2011 10:59:10 +0000 (02:59 -0800)
If we VRequestSalvage_r a volume successfully, and we are not the
fileserver, we will tell the fileserver to salvage a volume. So, we do
not need to give back the volume afterwards, since telling the
fileserver that a volume needs a salvage effectively gives it back (so
the salvager can take it).

So, clear needsPutBack so we don't try to also give back the volume,
and avoid the fileserver yelling at us for trying to give back a
volume that is checked out by someone else (or is not checked out at
all).

Reviewed-on: http://gerrit.openafs.org/4445
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 316b0421a27a4a76298f60ecd62b1236c971e512)

Change-Id: I432abb4d65a738e0e1936a7ff2fff2eccf45834a
Reviewed-on: http://gerrit.openafs.org/6284
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/vol/volume.c

index ea21820962dc872c530e6bbe5182fe072549e555..2b301a3482618204c9818057632ba83ce7ba96bd 100644 (file)
@@ -5322,6 +5322,10 @@ VRequestSalvage_r(Error * ec, Volume * vp, int reason, int flags)
                    VOfflineForSalvage_r(vp);
                }
            }
+           /* If we are non-fileserver, we're telling the fileserver to
+            * salvage the vol, so we don't need to give it back separately. */
+           vp->needsPutBack = 0;
+
            *ec = VSALVAGING;
        } else {
            Log("VRequestSalvage: volume %u online salvaged too many times; forced offline.\n", vp->hashid);