From a28de7a157e3ee11d2e734ffc005fe4e97a2c1a0 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 12 Jun 2019 19:44:07 +0800 Subject: [PATCH] common/options: make mon_clean_pg_upmaps_per_chunk unsigned 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::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 --- src/common/legacy_config_opts.h | 2 +- src/common/options.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index f6b42d641709..040782f753e1 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -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 diff --git a/src/common/options.cc b/src/common/options.cc index b1d6b2b7c737..e9c6f8991871 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1320,7 +1320,7 @@ std::vector