From: Josh Durgin Date: Thu, 8 Nov 2012 02:19:07 +0000 (-0800) Subject: OSDMonitor: remove max_devices and max_osd interdependency X-Git-Tag: v0.55~135 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cd144534e98620015f519c19bfd3f7645907a6b7;p=ceph.git OSDMonitor: remove max_devices and max_osd interdependency 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 --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 54db82c6d597..db737b182990 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -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 ("