]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
msg: fixup for 2ffacbe (crc configuration in messenger)
authorMykola Golub <mgolub@mirantis.com>
Fri, 23 Jan 2015 09:47:45 +0000 (11:47 +0200)
committerSage Weil <sage@redhat.com>
Wed, 4 Feb 2015 19:21:37 +0000 (11:21 -0800)
commit71c6d98979ac26fb37b94172316cb65c475bc6e4
treea87d9db322d7e238000d459cd8f9254ddeba4e02
parentfa9a1603776af81bd3447c7a43657ca21e939f60
msg: fixup for 2ffacbe (crc configuration in messenger)

* Update the remaining Message::encode() calls, which now expect crc
  flags to be passed as a flags parameter instead of a bool (this e.g.
  fixes the issue with routing messages forwarded from an older client).

* In Message::encode() data crc is calculated when MSG_CRC_DATA is
  set, but in decode_message(), Pipe::read/write_message() data crc is
  calculated when MSG_CRC_HEADER is set. Fix this.

Note, 2ffacbe changed the behavior of Pipe::read_message/write_message():
previously the methods always calculated crc, now they calculate it
only if crc is enabled in the config. This means crc can not be disabled
if there are monitors of older version in the cluster.

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Sage Weil <sage@redhat.com>
src/msg/Message.cc
src/msg/Message.h
src/msg/async/AsyncMessenger.cc
src/msg/simple/Pipe.cc