From: zhaokun Date: Tue, 23 Jan 2018 02:33:34 +0000 (+0800) Subject: rgw: upldate the max-buckets when the quota is uploaded X-Git-Tag: v13.0.2~270^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0f3dd4841ee98351fe94dfc1d4dbb37ffcbb4fbb;p=ceph.git rgw: upldate the max-buckets when the quota is uploaded Fixes:https://tracker.ceph.com/issues/22745 Signed-off-by: zhaokun --- diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index 906daa173d71..84194bfa8c03 100644 --- a/src/rgw/rgw_rest_user.cc +++ b/src/rgw/rgw_rest_user.cc @@ -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, "a_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)