From: John Spray Date: Mon, 27 Oct 2014 18:09:01 +0000 (+0000) Subject: messages: always encode barrier X-Git-Tag: v0.91~47^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2d993c4b2baaedceac54208a53630855d270ea1b;p=ceph.git messages: always encode barrier Instead of truncating on INLINE_DATA, send some blank fields there for clients that don't support it (the kclient) in order that we can include the following epoch_barrier field. Signed-off-by: John Spray --- diff --git a/src/messages/MClientCaps.h b/src/messages/MClientCaps.h index c97a84ec0d7c..ab9f0ad874bc 100644 --- a/src/messages/MClientCaps.h +++ b/src/messages/MClientCaps.h @@ -119,7 +119,7 @@ class MClientCaps : public Message { MClientCaps(int op, inodeno_t ino, inodeno_t realm, uint64_t id, int mseq, epoch_t oeb) - : Message(CEPH_MSG_CLIENT_CAPS, HEAD_VERSION), + : Message(CEPH_MSG_CLIENT_CAPS, HEAD_VERSION, COMPAT_VERSION), osd_epoch_barrier(oeb){ memset(&head, 0, sizeof(head)); head.op = op; @@ -226,8 +226,8 @@ public: ::encode(inline_version, payload); ::encode(inline_data, payload); } else { - header.version = 3; - return; + ::encode(inline_version, payload); + ::encode(bufferlist(), payload); } ::encode(osd_epoch_barrier, payload);