LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Oddity building LBLC

To: Martin Hamilton <martin@xxxxxxxxxxxxx>
Subject: Re: Oddity building LBLC
Cc: lvs-users@xxxxxxxxxxxxxxxxxxxxxx
From: Wensong Zhang <wensong@xxxxxxxxxxxx>
Date: Thu, 16 Nov 2000 22:55:49 +0800 (CST)
Hi Martin,

Thanks a lot for this fix.

I am awfully sorry for leaving that stupid locking bugs there.

I will change things for LBLC code, will release ipvs-1.0.0-2.2.17 soon.

Thanks,

Wensong


On Wed, 15 Nov 2000, Martin Hamilton wrote:

> Hi folks - I wasn't able to get the LBLC code to compile (as a module,
> FWIW) against a 2.2.17 kernel patched with ReiserFS 3.5.27 on a RedHat
> 6.2 box.  Making the changes below lets it compile, but as a newbie
> kernel hacker I'm not sure whether this is horribly broken :-)
> 
> Cheers,
> 
> Martin
> 
> 
> --- linux-2.2.17+ipvs-1.0.0beta1+reiserfs-3.5.27/net/ipv4/ip_vs_lblc.c.FCS
> Wed Nov 15 11:53:09 2000
> +++ linux-2.2.17+ipvs-1.0.0beta1+reiserfs-3.5.27/net/ipv4/ip_vs_lblc.c  Wed 
> Nov 
> 15 11:53:33 2000
> @@ -134,10 +134,10 @@
>           */
>          hash = ip_vs_lblc_hashkey(en->addr);
>  
> -        write_lock(tbl->lock);
> +        write_lock(&tbl->lock);
>          list_add(&en->list, &tbl->bucket[hash]);
>          atomic_inc(&tbl->entries);
> -        write_unlock(tbl->lock);
> +        write_unlock(&tbl->lock);
>          
>          return 1;
>  }
> @@ -182,19 +182,19 @@
>  
>          hash = ip_vs_lblc_hashkey(addr);
>  
> -        read_lock(tbl->lock);
> +        read_lock(&tbl->lock);
>          
>          l = &tbl->bucket[hash];
>          for (e=l->next; e!=l; e=e->next) {
>                  en = list_entry(e, struct ip_vs_lblc_entry, list);
>                  if (en->addr == addr) {
>                          /* HIT */
> -                        read_unlock(tbl->lock);
> +                        read_unlock(&tbl->lock);
>                          return en;
>                  }
>          }
>  
> -        read_unlock(tbl->lock);
> +        read_unlock(&tbl->lock);
>  
>          return NULL;
>  }
> 
> 
> 
> 





<Prev in Thread] Current Thread [Next in Thread>