From: Casey Bodley Date: Wed, 19 Sep 2018 13:35:03 +0000 (-0400) Subject: rgw: remove redundant quota logic from admin/user api X-Git-Tag: v14.0.1~173^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3a252bbc59fd0a0fb8430e09948420c7092717a6;p=ceph.git rgw: remove redundant quota logic from admin/user api RGWOp_User_Create was applying the configured default quotas to the RGWUserAdminOpState, but RGWUser::execute_add() will already apply those defaults when the AdminOpState doesn't provide them Signed-off-by: Casey Bodley --- diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index 3782246f1f28..78ac94cf9a1e 100644 --- a/src/rgw/rgw_rest_user.cc +++ b/src/rgw/rgw_rest_user.cc @@ -153,37 +153,6 @@ void RGWOp_User_Create::execute() if (gen_key) op_state.set_generate_key(); - RGWQuotaInfo bucket_quota; - RGWQuotaInfo user_quota; - - if (s->cct->_conf->rgw_bucket_default_quota_max_objects >= 0) { - bucket_quota.max_objects = s->cct->_conf->rgw_bucket_default_quota_max_objects; - bucket_quota.enabled = true; - } - - if (s->cct->_conf->rgw_bucket_default_quota_max_size >= 0) { - bucket_quota.max_size = s->cct->_conf->rgw_bucket_default_quota_max_size; - bucket_quota.enabled = true; - } - - if (s->cct->_conf->rgw_user_default_quota_max_objects >= 0) { - user_quota.max_objects = s->cct->_conf->rgw_user_default_quota_max_objects; - user_quota.enabled = true; - } - - if (s->cct->_conf->rgw_user_default_quota_max_size >= 0) { - user_quota.max_size = s->cct->_conf->rgw_user_default_quota_max_size; - user_quota.enabled = true; - } - - if (bucket_quota.enabled) { - op_state.set_bucket_quota(bucket_quota); - } - - if (user_quota.enabled) { - op_state.set_user_quota(user_quota); - } - http_ret = RGWUserAdminOp_User::create(store, op_state, flusher); }