]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
messages: always encode barrier
authorJohn Spray <john.spray@redhat.com>
Mon, 27 Oct 2014 18:09:01 +0000 (18:09 +0000)
committerJohn Spray <john.spray@redhat.com>
Tue, 16 Dec 2014 20:51:49 +0000 (20:51 +0000)
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 <john.spray@redhat.com>
src/messages/MClientCaps.h

index c97a84ec0d7c15c53300585b1ca9637be76ce4ab..ab9f0ad874bc0ef7f5d83fa1fed1f14edc7c8a65 100644 (file)
@@ -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);