]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
objecter: don't call op_throttle_ops.take(1) unconditionally
authorYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 26 Mar 2012 23:48:25 +0000 (16:48 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Mon, 26 Mar 2012 23:48:25 +0000 (16:48 -0700)
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
src/osdc/Objecter.h

index a5a3c0d0a19feef38c0bffbc84b3135d84d9ef4f..e733d3373e7c6345f9992220615a33c54641b752 100644 (file)
@@ -891,11 +891,12 @@ public:
   void throttle_op(Op *op, int op_size=0);
   void take_op_budget(Op *op) {
     int op_budget = calc_op_budget(op);
-    if (keep_balanced_budget)
+    if (keep_balanced_budget) {
       throttle_op(op, op_budget);
-    else
+    } else {
       op_throttle_bytes.take(op_budget);
-    op_throttle_ops.take(1);
+      op_throttle_ops.take(1);
+    }
   }
   void put_op_budget(Op *op) {
     int op_budget = calc_op_budget(op);