]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMonitor: remove max_devices and max_osd interdependency
authorJosh Durgin <josh.durgin@inktank.com>
Thu, 8 Nov 2012 02:19:07 +0000 (18:19 -0800)
committerSage Weil <sage@inktank.com>
Sat, 10 Nov 2012 09:42:09 +0000 (01:42 -0800)
Higher max_osd than max_devices doesn't hurt anything (and is the
normal way to add more osds). Higher max_devices than max_osds are
filtered out of crush results since e541c0f8d871172ec61962372efca943308e5fe,
so they don't matter either.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
src/mon/OSDMonitor.cc

index 54db82c6d59733872244b81713ef7ed20b94cd02..db737b182990e9529a2a6ec4d072526a2506bee0 100644 (file)
@@ -1998,13 +1998,6 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
        goto out;
       }
 
-      if (crush.get_max_devices() > osdmap.get_max_osd()) {
-       err = -ERANGE;
-       ss << "crushmap max_devices " << crush.get_max_devices()
-          << " > osdmap max_osd " << osdmap.get_max_osd();
-       goto out;
-      }
-
       // sanity check: test some inputs to make sure this map isn't totally broken
       dout(10) << " testing map" << dendl;
       stringstream ess;
@@ -2230,12 +2223,6 @@ bool OSDMonitor::prepare_command(MMonCommand *m)
        err = -EINVAL;
        goto out;
       }
-      if (newmax < osdmap.crush->get_max_devices()) {
-       err = -ERANGE;
-       ss << "cannot set max_osd to " << newmax << " which is < crush max_devices "
-          << osdmap.crush->get_max_devices();
-       goto out;
-      }
       if (newmax > g_conf->mon_max_osd) {
        err = -ERANGE;
        ss << "cannot set max_osd to " << newmax << " which is > conf.mon_max_osd ("