File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -351,8 +351,10 @@ struct server {
351351 signed char use_ssl ; /* ssl enabled (1: on, 0: disabled, -1 forced off) */
352352 unsigned int flags ; /* server flags (SRV_F_*) */
353353 unsigned int pp_opts ; /* proxy protocol options (SRV_PP_*) */
354- struct list global_list ; /* attach point in the global servers */
355354 struct list el_px ; /* attach point in parent proxy */
355+ struct list el_alt ; /* extra attach point for several usages
356+ * - for <servers_to_init> global list during parsing
357+ */
356358 int cklen ; /* the len of the cookie, to speed up checks */
357359 int rdr_len ; /* the length of the redirection prefix */
358360 char * cookie ; /* the id set in the cookie */
Original file line number Diff line number Diff line change 4444extern struct idle_conns idle_conns [MAX_THREADS ];
4545extern struct task * idle_conn_task [MAX_THREADS ];
4646extern struct eb_root idle_conn_srv [MAX_THREADS ];
47- extern struct list all_servers ;
47+ extern struct list servers_to_init ;
4848extern struct dict server_key_dict ;
4949
5050int srv_downtime (const struct server * s );
@@ -402,7 +402,7 @@ static inline void srv_detach(struct server *srv)
402402
403403 if (global .mode & MODE_STARTING ) {
404404 /* Necessary if startup is interrupted due to an early error before check_config_validity(). */
405- LIST_DEL_INIT (& srv -> global_list );
405+ LIST_DEL_INIT (& srv -> el_alt );
406406 }
407407
408408 /* Reset the proxy's ready_srv if it was this one. */
Original file line number Diff line number Diff line change @@ -2383,11 +2383,11 @@ int check_config_validity()
23832383 * we must finish to initialize certain things on the servers,
23842384 * as some of the fields may be accessed soon
23852385 */
2386- list_for_each_entry_safe (newsrv , tmpsrv , & all_servers , global_list ) {
2386+ list_for_each_entry_safe (newsrv , tmpsrv , & servers_to_init , el_alt ) {
23872387 err_code |= srv_preinit (newsrv );
23882388 if (err_code & ERR_CODE )
23892389 goto out ;
2390- LIST_DEL_INIT (& newsrv -> global_list );
2390+ LIST_DEL_INIT (& newsrv -> el_alt );
23912391 }
23922392
23932393 list_for_each_entry (defpx , & defaults_list , el ) {
Original file line number Diff line number Diff line change @@ -2373,8 +2373,8 @@ static int hld_cfg_finalize(void)
23732373 if (srv_preinit (srv ))
23742374 goto leave ;
23752375
2376- /* No need to stay in <all_servers > as srv_preinit() is manually called. */
2377- LIST_DEL_INIT (& srv -> global_list );
2376+ /* No need to stay in <servers_to_init > as srv_preinit() is manually called. */
2377+ LIST_DEL_INIT (& srv -> el_alt );
23782378
23792379#if 0
23802380 /* XXX Must this be done? XXX */
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ struct srv_kw_list srv_keywords = {
7979
8080struct eb_root idle_conn_srv [MAX_THREADS ];
8181struct task * idle_conn_task [MAX_THREADS ] __read_mostly = {};
82- struct list all_servers = LIST_HEAD_INIT (all_servers );
82+ struct list servers_to_init = LIST_HEAD_INIT (servers_to_init );
8383static struct task * server_atomic_sync_task = NULL ;
8484static event_hdl_async_equeue server_atomic_sync_queue ;
8585
@@ -3209,9 +3209,9 @@ struct server *new_server(struct proxy *proxy)
32093209
32103210 HA_RWLOCK_INIT (& srv -> path_params .param_lock );
32113211
3212- LIST_INIT (& srv -> global_list );
3212+ LIST_INIT (& srv -> el_alt );
32133213 if (global .mode & MODE_STARTING )
3214- LIST_APPEND (& all_servers , & srv -> global_list );
3214+ LIST_APPEND (& servers_to_init , & srv -> el_alt );
32153215
32163216 return srv ;
32173217}
Original file line number Diff line number Diff line change @@ -1310,8 +1310,8 @@ struct sink *sink_new_from_logger(struct logger *logger)
13101310 if (srv_preinit (srv ) & ERR_CODE )
13111311 goto error ;
13121312
1313- /* No need to stay in <all_servers > as srv_preinit() is manually called. */
1314- LIST_DEL_INIT (& srv -> global_list );
1313+ /* No need to stay in <servers_to_init > as srv_preinit() is manually called. */
1314+ LIST_DEL_INIT (& srv -> el_alt );
13151315
13161316 /* Same thing for the forward proxy: check_config_validity() has
13171317 * already walked over sink_proxies_list, so this one is never
You can’t perform that action at this time.
0 commit comments