]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: server: remove the update list and the update lock
authorWilly Tarreau <w@1wt.eu>
Thu, 2 Aug 2018 13:56:36 +0000 (15:56 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 8 Aug 2018 07:57:45 +0000 (09:57 +0200)
These ones are not more used, let's get rid of them.

include/common/hathreads.h
include/proto/server.h
include/types/server.h
src/server.c

index d1dcbbf44662f59eaf07e33710047170060f618a..794fa8b6c17e46b6a1568dabedddba753c9d73bd 100644 (file)
@@ -353,7 +353,6 @@ enum lock_label {
        LISTENER_QUEUE_LOCK,
        PROXY_LOCK,
        SERVER_LOCK,
-       UPDATED_SERVERS_LOCK,
        LBPRM_LOCK,
        SIGNALS_LOCK,
        STK_TABLE_LOCK,
index dedb17f1536e865aefced41ebd68eabab719309f..1c2d1fdaff4c58381c04093229e1d6d92e57e7e1 100644 (file)
@@ -50,9 +50,6 @@ void srv_compute_all_admin_states(struct proxy *px);
 int srv_set_addr_via_libc(struct server *srv, int *err_code);
 int srv_init_addr(void);
 struct server *cli_find_server(struct appctx *appctx, char *arg);
-void servers_update_status(void);
-
-extern struct list updated_servers;
 
 /* functions related to server name resolution */
 int snr_update_srv_status(struct server *s, int has_no_ip);
index 0cd20c0965cdac64d6840a0d25633bd240b6f438..c30003bdbed06d19693133dfd0cf17d49c3bfbf3 100644 (file)
@@ -311,7 +311,6 @@ struct server {
                int nb_low;
                int nb_high;
        } tmpl_info;
-       struct list update_status;              /* to attach to list of servers chnaging status */
        struct {
                long duration;
                short status, code;
index d9b304a2b6476a7fa31351c57987860b0a243c92..c5e8945374b75b38b99507cb2c395b72d3378256 100644 (file)
@@ -44,9 +44,6 @@
 #include <proto/dns.h>
 #include <netinet/tcp.h>
 
-struct list updated_servers = LIST_HEAD_INIT(updated_servers);
-__decl_hathreads(HA_SPINLOCK_T updated_servers_lock);
-
 static void srv_update_status(struct server *s);
 static void srv_update_state(struct server *srv, int version, char **params);
 static int srv_apply_lastaddr(struct server *srv, int *err_code);
@@ -1618,8 +1615,6 @@ static struct server *new_server(struct proxy *proxy)
                LIST_INIT(&srv->safe_conns[i]);
        }
 
-       LIST_INIT(&srv->update_status);
-
        srv->next_state = SRV_ST_RUNNING; /* early server setup */
        srv->last_change = now.tv_sec;
 
@@ -4522,7 +4517,6 @@ static struct cli_kw_list cli_kws = {{ },{
 __attribute__((constructor))
 static void __server_init(void)
 {
-       HA_SPIN_INIT(&updated_servers_lock);
        cli_register_kw(&cli_kws);
 }
 
@@ -5060,22 +5054,6 @@ static void srv_update_status(struct server *s)
        /* Re-set log strings to empty */
        *s->adm_st_chg_cause = 0;
 }
-/*
- * This function loops on servers registered for asynchronous
- * status changes
- *
- * NOTE: No needs to lock <updated_servers> list because it is called inside the
- * sync point.
- */
-void servers_update_status(void) {
-       struct server *s, *stmp;
-
-       list_for_each_entry_safe(s, stmp, &updated_servers, update_status) {
-               srv_update_status(s);
-               LIST_DEL(&s->update_status);
-               LIST_INIT(&s->update_status);
-       }
-}
 
 /*
  * Local variables: