]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
msg/Message.cc: fix build error when WITH_BLKIN is on
authorYang Honggang <yanghonggang@kuaishou.com>
Mon, 1 Jun 2020 05:43:21 +0000 (13:43 +0800)
committerYang Honggang <yanghonggang@kuaishou.com>
Tue, 2 Jun 2020 05:31:08 +0000 (13:31 +0800)
Signed-off-by: Yang Honggang <yanghonggang@kuaishou.com>
src/msg/Message.cc
src/test/rgw/CMakeLists.txt

index 27ef95d9db0fe80c7b7af23f25a11f1834f9188d..1d6cbeaa19731adcf93d9886e2d1a2c136b6a179 100644 (file)
 #include "messages/MOSDPGUpdateLogMissing.h"
 #include "messages/MOSDPGUpdateLogMissingReply.h"
 
+#ifdef WITH_BLKIN
+#include "Messenger.h"
+#endif
+
 #define DEBUGLVL  10    // debug level of output
 
 #define dout_subsys ceph_subsys_ms
@@ -973,12 +977,12 @@ void Message::decode_trace(ceph::bufferlist::const_iterator &p, bool create)
   const auto msgr = connection->get_messenger();
   const auto endpoint = msgr->get_trace_endpoint();
   if (info.trace_id) {
-    trace.init(get_type_name(), endpoint, &info, true);
+    trace.init(get_type_name().data(), endpoint, &info, true);
     trace.event("decoded trace");
   } else if (create || (msgr->get_myname().is_osd() &&
                         msgr->cct->_conf->osd_blkin_trace_all)) {
     // create a trace even if we didn't get one on the wire
-    trace.init(get_type_name(), endpoint);
+    trace.init(get_type_name().data(), endpoint);
     trace.event("created trace");
   }
   trace.keyval("tid", get_tid());
index b96b06f3a13e1c8ce5d6d7f5f097b61fd177ee88..ab1e2f65a5b5fd0b37c8685c1cbbe4d249ca284a 100644 (file)
@@ -86,6 +86,7 @@ target_link_libraries(ceph_test_rgw_obj
   cls_user_client
   librados
   global
+  ceph-common
   ${CURL_LIBRARIES}
   ${EXPAT_LIBRARIES}
   ${CMAKE_DL_LIBS}