]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix conf types
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 27 Sep 2017 16:29:39 +0000 (09:29 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 29 Sep 2017 00:12:43 +0000 (17:12 -0700)
This correct an assertion failure.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit bfc490249566356cff785f2f89dc03d69af322da)

src/common/options.cc
src/mds/Server.cc

index d6adab257c5e78b0b80461790284364bb928380d..1990e761bf23f23d8cfe6c773f485ccfeaef4019 100644 (file)
@@ -5749,7 +5749,7 @@ std::vector<Option> get_mds_options() {
     .set_default(1024)
     .set_description(""),
  
-    Option("mds_min_caps_per_client", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+    Option("mds_min_caps_per_client", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(100)
     .set_description("Set the minimum cache number of client"),
 
index d299aa3aca2d72a7bd40c21c0cf6b5f24cbbb0df..91017396a2b16fad2b349af0fbae2acb8b4d5431 100644 (file)
@@ -1085,8 +1085,8 @@ void Server::recover_filelocks(CInode *in, bufferlist locks, int64_t client)
 void Server::recall_client_state(void)
 {
   /* try to recall at least 80% of all caps */
-  uint64_t max_caps_per_client = (uint64_t)(Capability::count() * g_conf->get_val<float>("mds_max_ratio_caps_per_client"));
-  uint64_t min_caps_per_client = (uint64_t)g_conf->get_val<int>("mds_min_caps_per_client");
+  uint64_t max_caps_per_client = Capability::count() * g_conf->get_val<double>("mds_max_ratio_caps_per_client");
+  uint64_t min_caps_per_client = g_conf->get_val<uint64_t>("mds_min_caps_per_client");
   if (max_caps_per_client < min_caps_per_client) {
     dout(0) << "max_caps_per_client " << max_caps_per_client
             << "<" << "min_caps_per_client " << min_caps_per_client << dendl;