From 2d993c4b2baaedceac54208a53630855d270ea1b Mon Sep 17 00:00:00 2001 From: John Spray Date: Mon, 27 Oct 2014 18:09:01 +0000 Subject: [PATCH] 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 --- src/messages/MClientCaps.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.47.3