|
@@ -106,6 +106,7 @@ struct ip_vs_lblc_table {
|
|
|
struct rcu_head rcu_head;
|
|
|
struct hlist_head bucket[IP_VS_LBLC_TAB_SIZE]; /* hash bucket */
|
|
|
struct timer_list periodic_timer; /* collect stale entries */
|
|
|
+ struct ip_vs_service *svc; /* pointer back to service */
|
|
|
atomic_t entries; /* number of entries */
|
|
|
int max_size; /* maximum size of entries */
|
|
|
int rover; /* rover for expire check */
|
|
@@ -294,10 +295,10 @@ static inline void ip_vs_lblc_full_check(struct ip_vs_service *svc)
|
|
|
* of the table.
|
|
|
* The full expiration check is for this purpose now.
|
|
|
*/
|
|
|
-static void ip_vs_lblc_check_expire(unsigned long data)
|
|
|
+static void ip_vs_lblc_check_expire(struct timer_list *t)
|
|
|
{
|
|
|
- struct ip_vs_service *svc = (struct ip_vs_service *) data;
|
|
|
- struct ip_vs_lblc_table *tbl = svc->sched_data;
|
|
|
+ struct ip_vs_lblc_table *tbl = from_timer(tbl, t, periodic_timer);
|
|
|
+ struct ip_vs_service *svc = tbl->svc;
|
|
|
unsigned long now = jiffies;
|
|
|
int goal;
|
|
|
int i, j;
|
|
@@ -369,12 +370,12 @@ static int ip_vs_lblc_init_svc(struct ip_vs_service *svc)
|
|
|
tbl->rover = 0;
|
|
|
tbl->counter = 1;
|
|
|
tbl->dead = 0;
|
|
|
+ tbl->svc = svc;
|
|
|
|
|
|
/*
|
|
|
* Hook periodic timer for garbage collection
|
|
|
*/
|
|
|
- setup_timer(&tbl->periodic_timer, ip_vs_lblc_check_expire,
|
|
|
- (unsigned long)svc);
|
|
|
+ timer_setup(&tbl->periodic_timer, ip_vs_lblc_check_expire, 0);
|
|
|
mod_timer(&tbl->periodic_timer, jiffies + CHECK_EXPIRE_INTERVAL);
|
|
|
|
|
|
return 0;
|