From c4afaf9dabd261853a44b2e08f0911c075c1cd3a Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 10 Jul 2014 10:36:16 -0700 Subject: [PATCH] rgw: fix RGWObjManifestRule decoder Only decode the new field if it is a new struct. Fixes: #8804 Backport: firefly Signed-off-by: Sage Weil Reviewed-by: Josh Durgin --- src/rgw/rgw_rados.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h index f00e21579d8d8..dc023c26cbedb 100644 --- a/src/rgw/rgw_rados.h +++ b/src/rgw/rgw_rados.h @@ -162,7 +162,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; -- 2.39.5