From 12f5801bbddfd40bfedf35f1d8fb1cbbbc8f147c Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Fri, 10 Jan 2014 17:32:35 -0800 Subject: [PATCH] rgw: configure user quota also through region map Signed-off-by: Yehuda Sadeh --- src/rgw/rgw_json_enc.cc | 3 ++- src/rgw/rgw_rados.cc | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/rgw/rgw_json_enc.cc b/src/rgw/rgw_json_enc.cc index 89c0238605db3..0f03df3c49cbc 100644 --- a/src/rgw/rgw_json_enc.cc +++ b/src/rgw/rgw_json_enc.cc @@ -694,13 +694,14 @@ void RGWRegionMap::dump(Formatter *f) const encode_json("regions", regions, f); encode_json("master_region", master_region, f); encode_json("bucket_quota", bucket_quota, f); + encode_json("user_quota", user_quota, f); } void RGWRegionMap::decode_json(JSONObj *obj) { JSONDecoder::decode_json("regions", regions, obj); JSONDecoder::decode_json("master_region", master_region, obj); - JSONDecoder::decode_json("bucket_quota", bucket_quota, obj); + JSONDecoder::decode_json("user_quota", user_quota, obj); } void RGWMetadataLogInfo::dump(Formatter *f) const diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc index 8a4927a315c83..a173a02984040 100644 --- a/src/rgw/rgw_rados.cc +++ b/src/rgw/rgw_rados.cc @@ -390,20 +390,23 @@ int RGWZoneParams::store_info(CephContext *cct, RGWRados *store, RGWRegion& regi } void RGWRegionMap::encode(bufferlist& bl) const { - ENCODE_START(2, 1, bl); + ENCODE_START(3, 1, bl); ::encode(regions, bl); ::encode(master_region, bl); ::encode(bucket_quota, bl); + ::encode(user_quota, bl); ENCODE_FINISH(bl); } void RGWRegionMap::decode(bufferlist::iterator& bl) { - DECODE_START(2, bl); + DECODE_START(3, bl); ::decode(regions, bl); ::decode(master_region, bl); if (struct_v >= 2) ::decode(bucket_quota, bl); + if (struct_v >= 3) + ::decode(user_quota, bl); DECODE_FINISH(bl); regions_by_api.clear(); -- 2.39.5