]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
messages/: always set header.version in encode_payload() 16421/head
authorKefu Chai <kchai@redhat.com>
Wed, 19 Jul 2017 13:13:35 +0000 (21:13 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 19 Jul 2017 13:30:25 +0000 (21:30 +0800)
commit0e33001e17238b192e1b47fcf22496e299b443cf
tree7715337b4967eea09ee88b9c182ecdd92c8d3f95
parent07223aa86d066a42eaa51866efadde5d1d635d1a
messages/: always set header.version in encode_payload()

we encode the payload w/o the writelock even can_write == NOWRITE, if
the message "can_fast_prepare". in that case, the "feature" of the
connection is 0, as no handshake happens yet. so the header.version is
always set to a version compatible with pre-luminous. but when the
message is re-encoded when the connection is re-established with feature
with luminous, the header.version is not set back to HEADER_VERSION.
that's why the message's encoding is not consistent with header.version
sometimes.

in this change, we always set the header.version in encode_payload(), so
it's consistent even after connection reset and message re-encoding.

Fixes: http://tracker.ceph.com/issues/19939
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/messages/MOSDPGInfo.h
src/messages/MOSDPGLog.h
src/messages/MOSDPGNotify.h
src/messages/MOSDPGQuery.h
src/messages/MOSDPGRemove.h
src/messages/MOSDPing.h
src/messages/MOSDRepOp.h
src/messages/MOSDRepOpReply.h