]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
libafs: initialize hard mount last errors
authorMichael Meffie <mmeffie@sinenomine.net>
Tue, 9 Apr 2013 08:00:16 +0000 (04:00 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Sat, 31 Aug 2013 07:13:39 +0000 (00:13 -0700)
Initialize the values of the server last errors
introduced in commit 94a8ce970d57498583e249ea61725fce1ee53a50
to avoid logging garbage for the last error codes.

Reviewed-on: http://gerrit.openafs.org/10082
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 495d6fcbba1630b136d9c1b4256f0a71666a8a7b)

Change-Id: I4402838d761ab4bbb3e0798f219dfb825347b090
Reviewed-on: http://gerrit.openafs.org/10085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/afs_analyze.c
src/afs/afs_error.c

index 76a8156a94d53a0b9899c5e3b3c8ca04859576ad..2ecd38ef7d3209f86accb03f0dc2b85bcf146142 100644 (file)
@@ -363,7 +363,7 @@ afs_PrintServerErrors(struct vrequest *areq, struct VenusFid *afid)
        tvp = afs_FindVolume(afid, READ_LOCK);
        if (tvp) {
            for (i = 0; i < AFS_MAXHOSTS; i++) {
-               if (tvp->serverHost[i]) {
+               if (areq->lasterror[i] && tvp->serverHost[i]) {
                    sa = tvp->serverHost[i]->addr;
                    if (sa) {
                        address = ntohl(sa->sa_ip);
index 7b0ad305e0d0e62cc305b1872b5d74411f48e121..a570f9c0d5ae85bc65ee886b1bf60ab106359d36 100644 (file)
@@ -214,6 +214,7 @@ afs_CopyError(struct vrequest *afrom, struct vrequest *ato)
     afs_FinalizeReq(ato);
     while (i < AFS_MAXHOSTS) {
        ato->skipserver[i] = afrom->skipserver[i];
+       ato->lasterror[i] = afrom->lasterror[i];
        i++;
     }
     if (afrom->tokenError)
@@ -240,6 +241,7 @@ afs_FinalizeReq(struct vrequest *areq)
        return;
     while (i < AFS_MAXHOSTS) {
        areq->skipserver[i] = 0;
+       areq->lasterror[i] = 0;
        i++;
     }
     areq->busyCount = 0;