]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/msg: fix the problem of variable type inconsistent when define and use 20652/head
authorshangfufei <shangfufei@inspur.com>
Thu, 1 Mar 2018 00:49:44 +0000 (08:49 +0800)
committershangfufei <shangfufei@inspur.com>
Thu, 1 Mar 2018 05:33:00 +0000 (13:33 +0800)
Signed-off-by: shangfufei <shangfufei@inspur.com>
src/common/legacy_config_opts.h
src/common/options.cc
src/msg/async/AsyncConnection.cc
src/msg/async/AsyncConnection.h

index de2a10bc7bd98786d401bb6137f0f59f4b2a06e2..b108c1603a19a7be0c915b0968295a94fb9ca6bd 100644 (file)
@@ -119,7 +119,7 @@ OPTION(ms_public_type, OPT_STR)   // messenger backend
 OPTION(ms_cluster_type, OPT_STR)   // messenger backend
 OPTION(ms_tcp_nodelay, OPT_BOOL)
 OPTION(ms_tcp_rcvbuf, OPT_INT)
-OPTION(ms_tcp_prefetch_max_size, OPT_INT) // max prefetch size, we limit this to avoid extra memcpy
+OPTION(ms_tcp_prefetch_max_size, OPT_U32) // max prefetch size, we limit this to avoid extra memcpy
 OPTION(ms_initial_backoff, OPT_DOUBLE)
 OPTION(ms_max_backoff, OPT_DOUBLE)
 OPTION(ms_crc_data, OPT_BOOL)
index 1d9b68b8b1fd9666706dbaf09377a08a7c3b6ebf..3cf36a7d27f2e4c5046b0737e29512af7a489b30 100644 (file)
@@ -638,7 +638,7 @@ std::vector<Option> get_global_options() {
     .set_default(0)
     .set_description(""),
 
-    Option("ms_tcp_prefetch_max_size", Option::TYPE_INT, Option::LEVEL_ADVANCED)
+    Option("ms_tcp_prefetch_max_size", Option::TYPE_UINT, Option::LEVEL_ADVANCED)
     .set_default(4_K)
     .set_description(""),
 
index 8927201587a3764673d1404e951e429170792103..23532de85f5edba4a58d3fb6969ee485acc4c728 100644 (file)
@@ -45,7 +45,7 @@ ostream& AsyncConnection::_conn_prefix(std::ostream *_dout) {
 // Notes:
 // 1. Don't dispatch any event when closed! It may cause AsyncConnection alive even if AsyncMessenger dead
 
-const int AsyncConnection::TCP_PREFETCH_MIN_SIZE = 512;
+const uint32_t AsyncConnection::TCP_PREFETCH_MIN_SIZE = 512;
 const int ASYNC_COALESCE_THRESHOLD = 256;
 
 class C_time_wakeup : public EventCallback {
index a8c4ae9c3f11f217c0475347d63d7aa45cf20327..0a3da9ddccac82508986cdf3c3b36f6517e673c1 100644 (file)
@@ -248,7 +248,7 @@ class AsyncConnection : public Connection {
     STATE_WAIT,       // just wait for racing connection
   };
 
-  static const int TCP_PREFETCH_MIN_SIZE;
+  static const uint32_t TCP_PREFETCH_MIN_SIZE;
   static const char *get_state_name(int state) {
       const char* const statenames[] = {"STATE_NONE",
                                         "STATE_OPEN",