]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: fix "in" threshold to be 1.0, not 0.1
authorSage Weil <sage@newdream.net>
Sat, 26 Jun 2010 02:20:18 +0000 (19:20 -0700)
committerSage Weil <sage@newdream.net>
Sat, 26 Jun 2010 04:47:00 +0000 (21:47 -0700)
We were effectively counting any item with weight > .1 to be weight 1.0.

src/crush/mapper.c

index 374266bddd9ca92883dec6f0368c3198c6c0032a..a4eec133258e80a880a8cecca0282c54e11982ac 100644 (file)
@@ -264,7 +264,7 @@ static int crush_bucket_choose(struct crush_bucket *in, int x, int r)
  */
 static int is_out(struct crush_map *map, __u32 *weight, int item, int x)
 {
-       if (weight[item] >= 0x1000)
+       if (weight[item] >= 0x10000)
                return 0;
        if (weight[item] == 0)
                return 1;