]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: server: rename global servers_list to all_servers
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 23 Jul 2026 14:15:24 +0000 (16:15 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 24 Jul 2026 07:29:19 +0000 (09:29 +0200)
Rename global <servers_list> to <all_servers>. This name better reflects
that it contains all the servers and servers a similar purpose to
<all_proxies> list.

include/haproxy/server.h
src/cfgparse.c
src/server.c

index 44f82137ec16efb780d257a0dd3e9e594a42e570..5662666a702baa107a5e83b205fc378048fce0db 100644 (file)
@@ -44,7 +44,7 @@
 extern struct idle_conns idle_conns[MAX_THREADS];
 extern struct task *idle_conn_task[MAX_THREADS];
 extern struct eb_root idle_conn_srv[MAX_THREADS];
-extern struct mt_list servers_list;
+extern struct mt_list all_servers;
 extern struct dict server_key_dict;
 
 int srv_downtime(const struct server *s);
index 9a901d96eac6c3960779f8b4bb68eb7d8f656e24..2e538ed669ac277a16dba8944ce1dc3f46a0e5d3 100644 (file)
@@ -2363,7 +2363,7 @@ int check_config_validity()
         * we must finish to initialize certain things on the servers,
         * as some of the fields may be accessed soon
         */
-       MT_LIST_FOR_EACH_ENTRY_LOCKED(newsrv, &servers_list, global_list, back) {
+       MT_LIST_FOR_EACH_ENTRY_LOCKED(newsrv, &all_servers, global_list, back) {
                err_code |= srv_preinit(newsrv);
                if (err_code & ERR_CODE)
                        goto out;
index 8248c6cc461e1ba271ebd4cbc7c5a687f4e68d6b..1dc5e10012dc43165236081a31509ab20506740b 100644 (file)
@@ -78,7 +78,7 @@ struct srv_kw_list srv_keywords = {
 
 struct eb_root idle_conn_srv[MAX_THREADS];
 struct task *idle_conn_task[MAX_THREADS] __read_mostly = {};
-struct mt_list servers_list = MT_LIST_HEAD_INIT(servers_list);
+struct mt_list all_servers = MT_LIST_HEAD_INIT(all_servers);
 static struct task *server_atomic_sync_task = NULL;
 static event_hdl_async_equeue server_atomic_sync_queue;
 
@@ -3135,7 +3135,7 @@ void srv_settings_cpy(struct server *srv, const struct server *src, int srv_tmpl
        }
 }
 
-/* Allocates a server, attaches it to the global servers_list
+/* Allocates a server, attaches it to the global <all_servers> list
  * and adds it to <proxy> server list. Before deleting the server with
  * srv_drop(), srv_detach() must be called to remove it from the parent
  * proxy list
@@ -3154,7 +3154,7 @@ struct server *new_server(struct proxy *proxy)
 
        srv->obj_type = OBJ_TYPE_SERVER;
        srv->proxy = proxy;
-       MT_LIST_APPEND(&servers_list, &srv->global_list);
+       MT_LIST_APPEND(&all_servers, &srv->global_list);
        LIST_INIT(&srv->srv_rec_item);
        LIST_INIT(&srv->ip_rec_item);
        LIST_INIT(&srv->pp_tlvs);