From cd144534e98620015f519c19bfd3f7645907a6b7 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 7 Nov 2012 18:19:07 -0800 Subject: [PATCH] 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 --- src/mon/OSDMonitor.cc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 54db82c6d5973..db737b182990e 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 (" -- 2.39.5