]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Set appropriate bucket quota value (when quota value is less than 0) 30920/head
authorGaryHyg <huygbj@inspur.com>
Tue, 15 Oct 2019 02:28:57 +0000 (10:28 +0800)
committerGaryHyg <huygbj@inspur.com>
Tue, 15 Oct 2019 02:38:38 +0000 (10:38 +0800)
Signed-off-by: GaryHyg <huygbj@inspur.com>
src/rgw/rgw_rest_user.cc

index c768789934d7843605dd5db3b3ba23941cb82a2b..3ad4a6bc2c00847ff99bc11c4819f6961dae2bcd 100644 (file)
@@ -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)