From: Piotr Dałek Date: Fri, 26 Feb 2016 09:18:11 +0000 (+0100) Subject: msg/async: don't calculate msg header crc when not needed X-Git-Tag: v10.1.0~249^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c9a40adfa1337edfa9323d57fef483d6d1055916;p=ceph.git msg/async: don't calculate msg header crc when not needed 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 --- diff --git a/src/msg/async/AsyncConnection.cc b/src/msg/async/AsyncConnection.cc index fffb144d3de1..8bb806d9cc56 100644 --- a/src/msg/async/AsyncConnection.cc +++ b/src/msg/async/AsyncConnection.cc @@ -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();