Hi,

Yes, that's a bug... Those ='s should be -, as with the straw bucket type.  
Opened http://tracker.newdream.net/issues/2096

Thanks!  This'll be fixed in v0.43.
sage


On Wed, 15 Feb 2012, ZhuRongze wrote:

> Hi,
> 
> The function crush_adjust_tree_bucket_item_weight in
> ceph-0.41/src/crush/builder.c seem to  have a bug. The argument weight is no
> use, because it is assigned .
> --------------------------------------------------------------------
> int crush_adjust_tree_bucket_item_weight(struct crush_bucket_tree *bucket, int
> item, int weight)
> {
>     int diff;
>     int node;
>     unsigned i, j;
>     unsigned depth = calc_depth(bucket->h.size);
> 
>     for (i = 0; i < bucket->h.size; i++) {
>         if (bucket->h.items[i] == item)
>             break;
>     }
>     if (i == bucket->h.size)
>         return 0;
> 
>     node = crush_calc_tree_node(i);
>     diff = weight = bucket->node_weights[node];
>     bucket->node_weights[node] = weight;
>     bucket->h.weight += diff;
> 
>     for (j=1; j<depth; j++) {
>         node = parent(node);
>         bucket->node_weights[node] += diff;
>     }
> 
>     return diff;
> 
> --------------------------------------------------------------------
> The function crush_adjust_list_bucket_item_weight also have a same problem.
> 
> -ZhuRongze
> 
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to