From: Josh Durgin <josh.durgin@inktank.com>
To: "Ma, Jianpeng" <jianpeng.ma@intel.com>,
"ceph-devel@vger.kernel.org" <ceph-devel@vger.kernel.org>
Subject: Re: [PATCH] rbd.cc: Check io-size avoid floating point exception.
Date: Thu, 10 Jul 2014 18:01:53 -0700 [thread overview]
Message-ID: <53BF3781.5090707@inktank.com> (raw)
In-Reply-To: <6AA21C22F0A5DA478922644AD2EC308C87E2AA@SHSMSX101.ccr.corp.intel.com>
On 06/12/2014 01:15 AM, Ma, Jianpeng wrote:
> In func do_bench_write if io_size is zero,it can cause floating point execption.
>
> Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Applied, thanks!
Josh
> ---
> src/rbd.cc | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/src/rbd.cc b/src/rbd.cc
> index d6658e3..c068ed6 100644
> --- a/src/rbd.cc
> +++ b/src/rbd.cc
> @@ -2038,6 +2038,14 @@ int main(int argc, const char **argv)
> return EXIT_FAILURE;
> }
> } else if (ceph_argparse_withlonglong(args, i, &bench_io_size, &err, "--io-size", (char*)NULL)) {
> + if (!err.str().empty()) {
> + cerr << "rbd: " << err.str() << std::endl;
> + return EXIT_FAILURE;
> + }
> + if (bench_io_size == 0) {
> + cerr << "rbd: io-size must be > 0" << std::endl;
> + return EXIT_FAILURE;
> + }
> } else if (ceph_argparse_withlonglong(args, i, &bench_io_threads, &err, "--io-threads", (char*)NULL)) {
> } else if (ceph_argparse_withlonglong(args, i, &bench_bytes, &err, "--io-total", (char*)NULL)) {
> } else if (ceph_argparse_witharg(args, i, &bench_pattern, &err, "--io-pattern", (char*)NULL)) {
>
prev parent reply other threads:[~2014-07-11 1:01 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-12 8:15 [PATCH] rbd.cc: Check io-size avoid floating point exception Ma, Jianpeng
2014-07-11 1:01 ` Josh Durgin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BF3781.5090707@inktank.com \
--to=josh.durgin@inktank.com \
--cc=ceph-devel@vger.kernel.org \
--cc=jianpeng.ma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.