瀏覽代碼

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: Sage Weil <sage@newdream.net>
Sage Weil 15 年之前
父節點
當前提交
153a10939e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/ceph/crush/mapper.c

+ 1 - 1
fs/ceph/crush/mapper.c

@@ -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;