From: GaryHyg Date: Tue, 15 Oct 2019 02:28:57 +0000 (+0800) Subject: Set appropriate bucket quota value (when quota value is less than 0) X-Git-Tag: v15.1.0~80^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9a7f76a7bd88cd79d47cad92d4dd4ab786262fa0;p=ceph.git Set appropriate bucket quota value (when quota value is less than 0) Signed-off-by: GaryHyg --- diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index c768789934d7..3ad4a6bc2c00 100644 --- a/src/rgw/rgw_rest_user.cc +++ b/src/rgw/rgw_rest_user.cc @@ -183,6 +183,9 @@ void RGWOp_User_Create::execute() } if (max_buckets != default_max_buckets) + if (max_buckets < 0) { + max_buckets = -1; + } op_state.set_max_buckets(max_buckets); if (s->info.args.exists("suspended")) @@ -275,6 +278,9 @@ void RGWOp_User_Modify::execute() op_state.set_secret_key(secret_key); if (quota_set) + if (max_buckets < 0 ) { + max_buckets = -1; + } op_state.set_max_buckets(max_buckets); if (gen_key)