]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix EINVAL err when use "ceph tell osd.* bench" 1974/head
authorhuangjun <hjwsm1989@gmail.com>
Tue, 17 Jun 2014 05:12:58 +0000 (13:12 +0800)
committerhuangjun <hjwsm1989@gmail.com>
Tue, 17 Jun 2014 05:12:58 +0000 (13:12 +0800)
Signed-off-by: huangjun <hjwsm1989@gmail.com>
src/osd/OSD.cc

index 91ec596b72109a014c81ae4d83adf954cfd90af9..ee1935a2b6f4316500eecf8e72f8c6f22e7e8c94 100644 (file)
@@ -4481,9 +4481,8 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector<string>& cmd, buffe
       // However, to avoid the osd from getting hung on this and having
       // timers being triggered, we are going to limit the count assuming
       // a configurable throughput and duration.
-      int64_t total_throughput =
+      int64_t max_count =
         g_conf->osd_bench_large_size_max_throughput * duration;
-      int64_t max_count = (int64_t) (total_throughput / bsize);
       if (count > max_count) {
         ss << "'count' values greater than " << max_count
            << " for a block size of " << prettybyte_t(bsize) << ", assuming "