mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
DEVEL15-windows-cellservdb-rank-20090615
LICENSE MIT
When inserting a new vldb server, if the rank is 0 (unknown), do not
override the default rank assigned by cm_NewServer(). Doing so erases
the randomized ranking.
(cherry picked from commit 81c9b8c0c4
)
This commit is contained in:
parent
1367a1560e
commit
a2cc53224c
@ -54,7 +54,8 @@ long cm_AddCellProc(void *rockp, struct sockaddr_in *addrp, char *hostnamep, uns
|
|||||||
else
|
else
|
||||||
tsp = cm_NewServer(addrp, CM_SERVER_VLDB, cellp, NULL, probe ? 0 : CM_FLAG_NOPROBE);
|
tsp = cm_NewServer(addrp, CM_SERVER_VLDB, cellp, NULL, probe ? 0 : CM_FLAG_NOPROBE);
|
||||||
|
|
||||||
tsp->ipRank = ipRank;
|
if (ipRank)
|
||||||
|
tsp->ipRank = ipRank;
|
||||||
|
|
||||||
/* Insert the vlserver into a sorted list, sorted by server rank */
|
/* Insert the vlserver into a sorted list, sorted by server rank */
|
||||||
tsrp = cm_NewServerRef(tsp, 0);
|
tsrp = cm_NewServerRef(tsp, 0);
|
||||||
@ -138,6 +139,10 @@ cm_cell_t *cm_UpdateCell(cm_cell_t * cp, afs_uint32 flags)
|
|||||||
} else {
|
} else {
|
||||||
lock_ReleaseMutex(&cp->mx);
|
lock_ReleaseMutex(&cp->mx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (code == 0)
|
||||||
|
cm_RandomizeServer(&cp->vlServersp);
|
||||||
|
|
||||||
return code ? NULL : cp;
|
return code ? NULL : cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user