]> git.apps.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>
Wed, 27 Sep 2017 16:29:39 +0000 (09:29 -0700)
This correct an assertion failure.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/common/options.cc
src/mds/Server.cc

index e8fb47a339658fcde1f48378d521c46349f9c400..1d67d286f546571e71d0404b5fe5789b23117d95 100644 (file)
@@ -5782,7 +5782,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 54495e1c33fa30a099ac30226ec7bf68ac809950..3c339210fc98018d06c7426d6e3f953ac4836b28 100644 (file)
@@ -1083,8 +1083,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;