]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: upldate the max-buckets when the quota is uploaded 20063/head
authorzhaokun <develop@hikdata.com>
Tue, 23 Jan 2018 02:33:34 +0000 (10:33 +0800)
committerzhaokun <develop@hikdata.com>
Tue, 23 Jan 2018 02:33:34 +0000 (10:33 +0800)
Fixes:https://tracker.ceph.com/issues/22745

Signed-off-by: zhaokun <develop.hikdata.com>
src/rgw/rgw_rest_user.cc

index 906daa173d71df38d8d55d657064e2e6c2dc64ff..84194bfa8c0347c48c69a5b8bf4aa44ee0189451 100644 (file)
@@ -213,6 +213,7 @@ void RGWOp_User_Modify::execute()
   bool suspended;
   bool system;
 
+  bool quota_set;
   int32_t max_buckets;
 
   RGWUserAdminOpState op_state;
@@ -227,7 +228,7 @@ void RGWOp_User_Modify::execute()
   RESTArgs::get_string(s, "user-caps", caps, &caps);
   RESTArgs::get_bool(s, "generate-key", false, &gen_key);
   RESTArgs::get_bool(s, "suspended", false, &suspended);
-  RESTArgs::get_int32(s, "max-buckets", RGW_DEFAULT_MAX_BUCKETS, &max_buckets);
+  RESTArgs::get_int32(s, "max-buckets", RGW_DEFAULT_MAX_BUCKETS, &max_buckets, &quota_set);
   RESTArgs::get_string(s, "key-type", key_type_str, &key_type_str);
 
   RESTArgs::get_bool(s, "system", false, &system);
@@ -245,7 +246,7 @@ void RGWOp_User_Modify::execute()
   op_state.set_access_key(access_key);
   op_state.set_secret_key(secret_key);
 
-  if (max_buckets != RGW_DEFAULT_MAX_BUCKETS)
+  if (quota_set)
     op_state.set_max_buckets(max_buckets);
 
   if (gen_key)