]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: configure user quota also through region map
authorYehuda Sadeh <yehuda@inktank.com>
Sat, 11 Jan 2014 01:32:35 +0000 (17:32 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Fri, 24 Jan 2014 18:28:51 +0000 (10:28 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
src/rgw/rgw_json_enc.cc
src/rgw/rgw_rados.cc

index 89c0238605db3e63d7c57c83da82a5e3e94a37c0..0f03df3c49cbc9f59085188eecc853bf43d629d2 100644 (file)
@@ -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
index 8a4927a315c836dd24905913e0c40b66a2d83beb..a173a029840403f36b008d5f450e5618439a2096 100644 (file)
@@ -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();