From 7f9fe22a1c73d5f2783c3303fb9f3a7cfcea61c5 Mon Sep 17 00:00:00 2001 From: huangjun Date: Tue, 17 Jun 2014 13:12:58 +0800 Subject: [PATCH] Fix EINVAL err when use "ceph tell osd.* bench" Signed-off-by: huangjun (cherry picked from commit 7dc93a9651f602d9c46311524fc6b54c2f1ac595) --- src/osd/OSD.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 7e42880c440eb..85d089e3394a0 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4392,9 +4392,8 @@ void OSD::do_command(Connection *con, ceph_tid_t tid, vector& 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 " -- 2.39.5