From: huangjun Date: Tue, 17 Jun 2014 05:12:58 +0000 (+0800) Subject: Fix EINVAL err when use "ceph tell osd.* bench" X-Git-Tag: v0.83~69^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1974%2Fhead;p=ceph.git Fix EINVAL err when use "ceph tell osd.* bench" Signed-off-by: huangjun --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 91ec596b721..ee1935a2b6f 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -4481,9 +4481,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 "