]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-blacklist-move-init-checks-back-into-req-code-20081020
authorDerrick Brashear <shadow@dementia.org>
Mon, 20 Oct 2008 20:29:46 +0000 (20:29 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 20 Oct 2008 20:29:46 +0000 (20:29 +0000)
LICENSE IPL10

revise things so we don't need to check initd outside analyze.c/InitReq

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE IPL10

since these end up being used, init them too

(cherry picked from commit 6d14b44b7c83918bcd7e6e07ec365f8430ad23c5)

src/afs/afs.h
src/afs/afs_conn.c
src/afs/afs_osi_pag.c

index e98d55616661e87fac6bb4a4825a8a51fb553b8b..032c9c2790311b1d92473b5f844e362b6815fbc8 100644 (file)
@@ -183,7 +183,7 @@ struct vrequest {
     afs_int32 uid;             /* user id making the request */
     afs_int32 busyCount;       /* how many busies we've seen so far */
     afs_int32 flags;           /* things like O_SYNC, O_NONBLOCK go here */
-    char initd;                        /* if non-zero, non-uid fields meaningful */
+    char initd;                        /* if non-zero, Error fields meaningful */
     char accessError;          /* flags for overriding error return code */
     char volumeError;          /* encountered a missing or busy volume */
     char networkError;         /* encountered network problems */
index fc13a6e060d3a86892ecec8091df95f70007ae87..bae3f01354ca347d4b23ab0126df5e8c72684b87 100644 (file)
@@ -84,8 +84,7 @@ afs_Conn(register struct VenusFid *afid, register struct vrequest *areq,
     /* First is always lowest rank, if it's up */
     if ((tv->status[0] == not_busy) && tv->serverHost[0]
        && !(tv->serverHost[0]->addr->sa_flags & SRVR_ISDOWN) &&
-       !((areq->initd == 1) &&
-         ((areq->idleError > 0) || (areq->tokenError > 0))
+       !(((areq->idleError > 0) || (areq->tokenError > 0))
          && (areq->skipserver[0] == 1)))
        lowp = tv->serverHost[0]->addr;
 
index 5f7eaf6f16ceb167bb100cead9c47763b5dbd7f0..6b06ee8b596815f0d166526a9a4a2c9d4754eec0 100644 (file)
@@ -429,9 +429,17 @@ AddPag(afs_int32 aval, struct AFS_UCRED **credpp)
 int
 afs_InitReq(register struct vrequest *av, struct AFS_UCRED *acred)
 {
+    int i = 0;
+
     AFS_STATCNT(afs_InitReq);
     if (afs_shuttingdown)
        return EIO;
+    av->idleError = 0;
+    av->tokenError = 0;
+    while (i < MAXHOSTS) {
+       av->skipserver[i] = 0;
+       i++;
+    }
     av->uid = PagInCred(acred);
     if (av->uid == NOPAG) {
        /* Afs doesn't use the unix uid for anuthing except a handle