]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix RGWObjManifestRule decoder
authorSage Weil <sage@inktank.com>
Thu, 10 Jul 2014 17:36:16 +0000 (10:36 -0700)
committerSage Weil <sage@inktank.com>
Thu, 10 Jul 2014 17:37:08 +0000 (10:37 -0700)
Only decode the new field if it is a new struct.

Fixes: #8804
Backport: firefly
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
(cherry picked from commit c4afaf9dabd261853a44b2e08f0911c075c1cd3a)

src/rgw/rgw_rados.h

index 7aa91d0eeef0a95aee40d72f81d8e9aaaff4cb48..5cc9c73407b9203d665c8979d741d7d656b9bc26 100644 (file)
@@ -161,7 +161,8 @@ struct RGWObjManifestRule {
     ::decode(start_ofs, bl);
     ::decode(part_size, bl);
     ::decode(stripe_max_size, bl);
-    ::decode(override_prefix, bl);
+    if (struct_v >= 2)
+      ::decode(override_prefix, bl);
     DECODE_FINISH(bl);
   }
   void dump(Formatter *f) const;