From: Douglas Fuller Date: Thu, 28 Jun 2018 15:21:38 +0000 (-0400) Subject: mon/OSDMonitor: Warn when expected_num_objects will have no effect X-Git-Tag: v13.2.2~40^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9d773d69ec2aeaf47c8b2a5b1030ce953ccbceaf;p=ceph.git mon/OSDMonitor: Warn when expected_num_objects will have no effect The expected_num_objects argument to ceph osd pool create is only effective on filestore pools when merging is disabled (filestore_merge_threshold < 0). Warn and disallow pool creation in this situation. Signed-off-by: Douglas Fuller (cherry picked from commit 4c108a50e5f74a56965d49687a8c817f4a5ce42b) --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 592aa496a2898..ea41571c77707 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -11063,6 +11063,14 @@ bool OSDMonitor::prepare_command_impl(MonOpRequestRef op, goto reply; } + if (expected_num_objects > 0 && + cct->_conf->osd_objectstore == "filestore" && + cct->_conf->filestore_merge_threshold > 0) { + ss << "'expected_num_objects' requires 'filestore_merge_threshold < 0'"; + err = -EINVAL; + goto reply; + } + int64_t fast_read_param; cmd_getval(cct, cmdmap, "fast_read", fast_read_param, int64_t(-1)); FastReadType fast_read = FAST_READ_DEFAULT;