]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson: configure CRC for the temp_mon_client's messenger. 39454/head
authorRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 12 Feb 2021 19:18:23 +0000 (19:18 +0000)
committerRadoslaw Zarzynski <rzarzyns@redhat.com>
Fri, 12 Feb 2021 19:25:35 +0000 (19:25 +0000)
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
src/crimson/osd/main.cc

index edc712b2b21345846a04e3adca4628f6a3ff7daa..21654cddd1b7fc3ab8202f6769192a1ac5e3956d 100644 (file)
@@ -118,6 +118,16 @@ uint64_t get_nonce()
   }
 }
 
+static void configure_crc_handling(crimson::net::Messenger& msgr)
+{
+  if (local_conf()->ms_crc_data) {
+    msgr.set_crc_data();
+  }
+  if (local_conf()->ms_crc_header) {
+    msgr.set_crc_header();
+  }
+}
+
 seastar::future<> fetch_config()
 {
   // i don't have any client before joining the cluster, so no need to have
@@ -132,6 +142,7 @@ seastar::future<> fetch_config()
   auto msgr = crimson::net::Messenger::create(entity_name_t::CLIENT(),
                                               "temp_mon_client",
                                               get_nonce());
+  configure_crc_handling(*msgr);
   auto monc = std::make_unique<crimson::mon::Client>(*msgr, *auth_handler);
   msgr->set_auth_client(monc.get());
   return msgr->start({monc.get()}).then([monc=monc.get()] {
@@ -221,12 +232,7 @@ int main(int argc, char* argv[])
                                   make_pair(std::ref(hb_back_msgr), "hb_back"s)}) {
           msgr = crimson::net::Messenger::create(entity_name_t::OSD(whoami), name,
                                                  nonce);
-          if (local_conf()->ms_crc_data) {
-            msgr->set_crc_data();
-          }
-          if (local_conf()->ms_crc_header) {
-            msgr->set_crc_header();
-          }
+          configure_crc_handling(*msgr);
         }
         osd.start_single(whoami, nonce,
                          cluster_msgr, client_msgr,