]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: fix 'osd crush add ..' weight
authorSage Weil <sage.weil@dreamhost.com>
Sat, 12 Nov 2011 22:04:15 +0000 (14:04 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Sat, 12 Nov 2011 22:04:15 +0000 (14:04 -0800)
This was changed to floating point in commit 3f67893.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mon/OSDMonitor.cc

index 9380ce025fbbfe1daf994801f21cc3f14b2344b7..a789f3579fd52b77e4c5a0833c980467ae88e1f8 100644 (file)
@@ -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;