提交 153a1093 编写于 作者: S Sage Weil

ceph: fix crush device 'out' threshold to 1.0, not 0.1

Fix a typo that made any OSD weighted between 0.1 and 1.0 effectively
weighted as 1.0 (fully in).
Signed-off-by: NSage Weil <sage@newdream.net>
上级 443b3760
...@@ -264,7 +264,7 @@ static int crush_bucket_choose(struct crush_bucket *in, int x, int r) ...@@ -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) static int is_out(struct crush_map *map, __u32 *weight, int item, int x)
{ {
if (weight[item] >= 0x1000) if (weight[item] >= 0x10000)
return 0; return 0;
if (weight[item] == 0) if (weight[item] == 0)
return 1; return 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册