From: Sage Weil Date: Sat, 12 Nov 2011 22:04:15 +0000 (-0800) Subject: mon: fix 'osd crush add ..' weight X-Git-Tag: v0.39~68 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ec97c852d7467f8afea32d395614e38f101d6120;p=ceph-ci.git mon: fix 'osd crush add ..' weight This was changed to floating point in commit 3f67893. Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9380ce025fb..a789f3579fd 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1523,9 +1523,7 @@ bool OSDMonitor::prepare_command(MMonCommand *m) bufferlist::iterator p = bl.begin(); newcrush.decode(p); - if (id >= newcrush.get_max_devices()) - newcrush.set_max_devices(id + 1); - err = newcrush.insert_item(id, (int)(weight * (float)0x10000), name, loc); + err = newcrush.insert_item(id, weight, name, loc); if (err == 0) { if (newcrush.get_max_devices() > osdmap.get_max_osd()) { err = -ERANGE;