MINOR: backend: move hash_balance_factor out of chash

This one is a proxy option which can be inherited from defaults even
if the LB algo changes. Move it out of the lb_chash struct so that we
don't need to keep anything separate between these structs. This will
allow us to merge them into an union later. It even takes less room
now as it fills a hole and removes another one.
diff --git a/include/types/backend.h b/include/types/backend.h
index e67f0be..ea38ed2 100644
--- a/include/types/backend.h
+++ b/include/types/backend.h
@@ -144,6 +144,7 @@
 	int tot_used;			/* total number of servers used for LB */
 	int wmult;			/* ratio between user weight and effective weight */
 	int wdiv;			/* ratio between effective weight and user weight */
+	int hash_balance_factor;	/* load balancing factor * 100, 0 if disabled */
 	char *arg_str;			/* name of the URL parameter/header/cookie used for hashing */
 	int   arg_len;			/* strlen(arg_str), computed only once */
 	int   arg_opt1;			/* extra option 1 for the LB algo (algo-specific) */
diff --git a/include/types/lb_chash.h b/include/types/lb_chash.h
index b711636..5991ce9 100644
--- a/include/types/lb_chash.h
+++ b/include/types/lb_chash.h
@@ -30,7 +30,6 @@
 	struct eb_root act;	/* weighted chash entries of active servers */
 	struct eb_root bck;	/* weighted chash entries of backup servers */
 	struct eb32_node *last;	/* last node found in case of round robin (or NULL) */
-	int balance_factor;	/* load balancing factor * 100, 0 if disabled */
 };
 
 #endif /* _TYPES_LB_CHASH_H */
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index 7514a47..1af86de 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -426,7 +426,7 @@
 
 		if (curproxy->cap & PR_CAP_BE) {
 			curproxy->lbprm.algo = defproxy.lbprm.algo;
-			curproxy->lbprm.chash.balance_factor = defproxy.lbprm.chash.balance_factor;
+			curproxy->lbprm.hash_balance_factor = defproxy.lbprm.hash_balance_factor;
 			curproxy->fullconn = defproxy.fullconn;
 			curproxy->conn_retries = defproxy.conn_retries;
 			curproxy->redispatch_after = defproxy.redispatch_after;
@@ -3654,8 +3654,8 @@
 			err_code |= ERR_ALERT | ERR_FATAL;
 			goto out;
 		}
-		curproxy->lbprm.chash.balance_factor = atol(args[1]);
-		if (curproxy->lbprm.chash.balance_factor != 0 && curproxy->lbprm.chash.balance_factor <= 100) {
+		curproxy->lbprm.hash_balance_factor = atol(args[1]);
+		if (curproxy->lbprm.hash_balance_factor != 0 && curproxy->lbprm.hash_balance_factor <= 100) {
 			ha_alert("parsing [%s:%d] : '%s' must be 0 or greater than 100.\n", file, linenum, args[0]);
 			err_code |= ERR_ALERT | ERR_FATAL;
 			goto out;
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 7c316df..31698b9 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -453,7 +453,6 @@
 	defproxy.maxconn = cfg_maxpconn;
 	defproxy.conn_retries = CONN_RETRIES;
 	defproxy.redispatch_after = 0;
-	defproxy.lbprm.chash.balance_factor = 0;
 	defproxy.options = PR_O_REUSE_SAFE;
 	defproxy.max_out_conns = MAX_SRV_LIST;
 
diff --git a/src/lb_chash.c b/src/lb_chash.c
index 186e87a..a35351e 100644
--- a/src/lb_chash.c
+++ b/src/lb_chash.c
@@ -290,7 +290,7 @@
 	/* The total number of slots to allocate is the total number of outstanding requests
 	 * (including the one we're about to make) times the load-balance-factor, rounded up.
 	 */
-	unsigned tot_slots = ((s->proxy->served + 1) * s->proxy->lbprm.chash.balance_factor + 99) / 100;
+	unsigned tot_slots = ((s->proxy->served + 1) * s->proxy->lbprm.hash_balance_factor + 99) / 100;
 	unsigned slots_per_weight = tot_slots / s->proxy->lbprm.tot_weight;
 	unsigned remainder = tot_slots % s->proxy->lbprm.tot_weight;
 
@@ -368,7 +368,7 @@
 	}
 
 	loop = 0;
-	while (nsrv == avoid || (p->lbprm.chash.balance_factor && !chash_server_is_eligible(nsrv))) {
+	while (nsrv == avoid || (p->lbprm.hash_balance_factor && !chash_server_is_eligible(nsrv))) {
 		next = eb32_next(next);
 		if (!next) {
 			next = eb32_first(root);