From: Sage Weil Date: Sat, 26 Mar 2016 01:56:01 +0000 (-0400) Subject: messages/MOSDOp: clear reqid inc for v6 encoding X-Git-Tag: v10.1.1~92^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F8299%2Fhead;p=ceph.git messages/MOSDOp: clear reqid inc for v6 encoding For the new v7 encoding, we put the client incarnation in the reqid so that we can have it at the beginning of the encoding. However, we do *not* want to do this for the v6 encoding, as that version of get_reqid() will return reqid if it is not == osd_reqid_t(). Fixes: #15230 Signed-off-by: Sage Weil --- diff --git a/src/messages/MOSDOp.h b/src/messages/MOSDOp.h index fc087fca5472..3384c964db88 100755 --- a/src/messages/MOSDOp.h +++ b/src/messages/MOSDOp.h @@ -315,7 +315,13 @@ struct ceph_osd_request_head { ::encode(retry_attempt, payload); ::encode(features, payload); - ::encode(reqid, payload); + if (reqid.name != entity_name_t() || reqid.tid != 0) { + ::encode(reqid, payload); + } else { + // don't include client_inc in the reqid for the legacy v6 + // encoding or else we'll confuse older peers. + ::encode(osd_reqid_t(), payload); + } } else { // new, reordered, v7 message encoding header.version = HEAD_VERSION;