From: Jeffrey Altman Date: Tue, 28 Dec 2010 19:39:47 +0000 (-0500) Subject: Windows: fs checkserver skip multi-homed up server X-Git-Tag: upstream/1.8.0_pre1^2~4324 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=4e3207335771b78ff27a1f1c0755cdfcf78d7f30;p=packages%2Fo%2Fopenafs.git Windows: fs checkserver skip multi-homed up server Multi-homed file servers can be detected by comparing the uuid for the cm_server_t entries. If a server has at least one up interface, do not list it as being down in the "fs checkserver" response list. Change-Id: I718eeee3316d05a33a4af97ca6c7fd947db41f44 Reviewed-on: http://gerrit.openafs.org/3603 Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_ioctl.c b/src/WINNT/afsd/cm_ioctl.c index 91c9604b9..b4d1d9576 100644 --- a/src/WINNT/afsd/cm_ioctl.c +++ b/src/WINNT/afsd/cm_ioctl.c @@ -1208,7 +1208,7 @@ cm_IoctlCheckServers(struct cm_ioctl *ioctlp, struct cm_user *userp) char *tp; char *cp; long temp; - cm_server_t *tsp; + cm_server_t *tsp, *csp; int haveCell; tp = ioctlp->inDatap; @@ -1269,6 +1269,22 @@ cm_IoctlCheckServers(struct cm_ioctl *ioctlp, struct cm_user *userp) if (cellp && tsp->cellp != cellp) continue; /* cell spec'd and wrong */ if (tsp->flags & CM_SERVERFLAG_DOWN) { + /* + * for a multi-homed file server, if one of the interfaces + * is up, do not report the server as down. + */ + if (tsp->type == CM_SERVER_FILE) { + for (csp = cm_allServersp; csp; csp=csp->allNextp) { + if (csp->type == CM_SERVER_FILE && + !(csp->flags & CM_SERVERFLAG_DOWN) && + afs_uuid_equal(&tsp->uuid, &csp->uuid)) { + break; + } + } + if (csp) /* found alternate up interface */ + continue; + } + /* * all server types are being reported by ipaddr. only report * a server once regardless of how many services are down.