]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: corrected resize RPC message backwards compatibility 14620/head
authorJason Dillaman <dillaman@redhat.com>
Tue, 18 Apr 2017 14:05:53 +0000 (10:05 -0400)
committerNathan Cutler <ncutler@suse.com>
Tue, 18 Apr 2017 19:38:00 +0000 (21:38 +0200)
Commit d1f2c557 incorrectly changed the order of variables within
the payload. This resulted in breaking the resize RPC message
with older versions of Ceph.

Fixes: http://tracker.ceph.com/issues/19636
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 9db305a99fd945059a173f5ae8ae61744dd28615)

src/librbd/WatchNotifyTypes.cc

index bbee3a100173ad2bff1534f9e02d2a864d825db1..f165441a54e3b8a3c1a70ee9305169dca883fc12 100644 (file)
@@ -208,14 +208,14 @@ void AsyncCompletePayload::dump(Formatter *f) const {
 }
 
 void ResizePayload::encode(bufferlist &bl) const {
-  AsyncRequestPayloadBase::encode(bl);
   ::encode(size, bl);
+  AsyncRequestPayloadBase::encode(bl);
   ::encode(allow_shrink, bl);
 }
 
 void ResizePayload::decode(__u8 version, bufferlist::iterator &iter) {
-  AsyncRequestPayloadBase::decode(version, iter);
   ::decode(size, iter);
+  AsyncRequestPayloadBase::decode(version, iter);
 
   if (version >= 4) {
     ::decode(allow_shrink, iter);