From 9a7f76a7bd88cd79d47cad92d4dd4ab786262fa0 Mon Sep 17 00:00:00 2001 From: GaryHyg Date: Tue, 15 Oct 2019 10:28:57 +0800 Subject: [PATCH] Set appropriate bucket quota value (when quota value is less than 0) Signed-off-by: GaryHyg --- src/rgw/rgw_rest_user.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/rgw/rgw_rest_user.cc b/src/rgw/rgw_rest_user.cc index c768789934d..3ad4a6bc2c0 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) -- 2.47.3