diff --git a/src/lb_chash.c b/src/lb_chash.c index 469da71f5..23b2b1272 100644 --- a/src/lb_chash.c +++ b/src/lb_chash.c @@ -316,6 +316,8 @@ int chash_server_is_eligible(struct server *s) * will still both receive traffic. If any server is found, it will be returned. * It will also skip server if the hash result ends on this one. * If no valid server is found, NULL is returned. + * + * The lbprm's lock will be used in R/O mode. The server's lock is not used. */ struct server *chash_get_server_hash(struct proxy *p, unsigned int hash, const struct server *avoid) { @@ -386,6 +388,8 @@ struct server *chash_get_server_hash(struct proxy *p, unsigned int hash, const s /* Return next server from the CHASH tree in backend

. If the tree is empty, * return NULL. Saturated servers are skipped. + * + * The lbprm's lock will be used in R/W mode. The server's lock is not used. */ struct server *chash_get_next_server(struct proxy *p, struct server *srvtoavoid) { diff --git a/src/lb_fas.c b/src/lb_fas.c index 9f6dc24b9..fb581eb52 100644 --- a/src/lb_fas.c +++ b/src/lb_fas.c @@ -292,7 +292,7 @@ void fas_init_server_tree(struct proxy *p) /* Return next server from the FS tree in backend

. If the tree is empty, * return NULL. Saturated servers are skipped. * - * The server's lock must be held. The lbprm's lock will be used. + * The lbprm's lock will be used. The server's lock is not used. */ struct server *fas_get_next_server(struct proxy *p, struct server *srvtoavoid) { diff --git a/src/lb_fwlc.c b/src/lb_fwlc.c index 4e1b7307f..643489690 100644 --- a/src/lb_fwlc.c +++ b/src/lb_fwlc.c @@ -317,7 +317,7 @@ void fwlc_init_server_tree(struct proxy *p) /* Return next server from the FWLC tree in backend

. If the tree is empty, * return NULL. Saturated servers are skipped. * - * The server's lock must be held. The lbprm's lock will be used. + * The lbprm's lock will be used in R/O mode. The server's lock is not used. */ struct server *fwlc_get_next_server(struct proxy *p, struct server *srvtoavoid) { diff --git a/src/lb_fwrr.c b/src/lb_fwrr.c index e2cdd9f0d..d7f618faf 100644 --- a/src/lb_fwrr.c +++ b/src/lb_fwrr.c @@ -506,7 +506,7 @@ static inline void fwrr_update_position(struct fwrr_group *grp, struct server *s * the init tree if appropriate. If both trees are empty, return NULL. * Saturated servers are skipped and requeued. * - * The lbprm's lock will be used. The server's lock is not used. + * The lbprm's lock will be used in R/W mode. The server's lock is not used. */ struct server *fwrr_get_next_server(struct proxy *p, struct server *srvtoavoid) {