From 6d14b44b7c83918bcd7e6e07ec365f8430ad23c5 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Mon, 20 Oct 2008 20:29:26 +0000 Subject: [PATCH] blacklist-move-init-checks-back-into-req-code-20081020 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 --- src/afs/afs.h | 2 +- src/afs/afs_conn.c | 3 +-- src/afs/afs_osi_pag.c | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/afs/afs.h b/src/afs/afs.h index 0aedd4692e..bf2bb772cf 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -187,7 +187,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 */ diff --git a/src/afs/afs_conn.c b/src/afs/afs_conn.c index 0441df191d..252e72cce8 100644 --- a/src/afs/afs_conn.c +++ b/src/afs/afs_conn.c @@ -96,8 +96,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; diff --git a/src/afs/afs_osi_pag.c b/src/afs/afs_osi_pag.c index 37a979226f..ff977c2df0 100644 --- a/src/afs/afs_osi_pag.c +++ b/src/afs/afs_osi_pag.c @@ -430,12 +430,19 @@ int afs_InitReq(register struct vrequest *av, struct AFS_UCRED *acred) { int code; + int i = 0; AFS_STATCNT(afs_InitReq); memset(av, 0, sizeof(*av)); if (afs_shuttingdown) return EIO; + av->idleError = 0; + av->tokenError = 0; + while (i < MAXHOSTS) { + av->skipserver[i] = 0; + i++; + } #ifdef AFS_LINUX26_ENV #if !defined(AFS_NONFSTRANS) if (osi_linux_nfs_initreq(av, acred, &code))