]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Fix EINVAL err when use "ceph tell osd.* bench"
authorhuangjun <hjwsm1989@gmail.com>
Tue, 17 Jun 2014 05:12:58 +0000 (13:12 +0800)
committerSage Weil <sage@redhat.com>
Sat, 16 Aug 2014 04:47:06 +0000 (21:47 -0700)
Signed-off-by: huangjun <hjwsm1989@gmail.com>
(cherry picked from commit 7dc93a9651f602d9c46311524fc6b54c2f1ac595)

src/osd/OSD.cc

index 7e42880c440ebe72e59627036358e675a6d55526..85d089e3394a081cae636fd53e208d87c63b47d6 100644 (file)
@@ -4392,9 +4392,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 "