]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/async: don't calculate msg header crc when not needed 7815/head
authorPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Fri, 26 Feb 2016 09:18:11 +0000 (10:18 +0100)
committerPiotr Dałek <piotr.dalek@ts.fujitsu.com>
Fri, 26 Feb 2016 09:18:11 +0000 (10:18 +0100)
There was a missing condition that caused to calculate outgoing message
header CRC even if CRC checking was disabled in Ceph configuration.
This change fixes that.

Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
src/msg/async/AsyncConnection.cc

index fffb144d3de1c747de7e2966ecdb57c6bb131962..8bb806d9cc5645efbb9b4961f6740734d30f7df9 100644 (file)
@@ -2316,7 +2316,8 @@ ssize_t AsyncConnection::write_message(Message *m, bufferlist& bl)
     m->get();
   }
 
-  m->calc_header_crc();
+  if (msgr->crcflags & MSG_CRC_HEADER)
+    m->calc_header_crc();
 
   ceph_msg_header& header = m->get_header();
   ceph_msg_footer& footer = m->get_footer();