]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/options: make mon_clean_pg_upmaps_per_chunk unsigned 28509/head
authorKefu Chai <kchai@redhat.com>
Wed, 12 Jun 2019 11:44:07 +0000 (19:44 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 13 Jun 2019 05:40:49 +0000 (13:40 +0800)
we don't use a negative number for some different purpose, for instance,
for disabling this option. and this helps to silence following warning:

/home/jenkins-build/build/workspace/ceph-pull-requests/src/mon/OSDMonitor.cc:
In member function 'virtual void
OSDMonitor::encode_pending(MonitorDBStore::TransactionRef)':
/home/jenkins-build/build/workspace/ceph-pull-requests/src/mon/OSDMonitor.cc:1195:31:
warning: comparison of integer expressions of different signedness:
'std::vector<pg_t>::size_type' {aka 'long unsigned int'} and 'int64_t'
{aka 'long int'} [-Wsign-compare]
       if (pgs_to_check.size() < g_conf()->mon_clean_pg_upmaps_per_chunk
* 2) {
           ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/legacy_config_opts.h
src/common/options.cc

index f6b42d641709ceea9dea0fc7825ff0f7ca9aff17..040782f753e154eaa2bf30c704be0a44029e10b4 100644 (file)
@@ -187,7 +187,7 @@ OPTION(mon_osd_cache_size, OPT_INT)  // the size of osdmaps cache, not to rely o
 
 OPTION(mon_cpu_threads, OPT_INT)
 OPTION(mon_osd_mapping_pgs_per_chunk, OPT_INT)
-OPTION(mon_clean_pg_upmaps_per_chunk, OPT_INT)
+OPTION(mon_clean_pg_upmaps_per_chunk, OPT_U64)
 OPTION(mon_osd_max_creating_pgs, OPT_INT)
 OPTION(mon_tick_interval, OPT_INT)
 OPTION(mon_session_timeout, OPT_INT)    // must send keepalive or subscribe
index b1d6b2b7c737e7022585366588174e50fbd48d52..e9c6f8991871baf251b39dfbf75f79186c2108ec 100644 (file)
@@ -1320,7 +1320,7 @@ std::vector<Option> get_global_options() {
     .add_service("mon")
     .set_description("granularity of PG placement calculation background work"),
 
-    Option("mon_clean_pg_upmaps_per_chunk", Option::TYPE_INT, Option::LEVEL_DEV)
+    Option("mon_clean_pg_upmaps_per_chunk", Option::TYPE_UINT, Option::LEVEL_DEV)
     .set_default(256)
     .add_service("mon")
     .set_description("granularity of PG upmap validation background work"),