From 0fb3e52e16c607efdb63dc10e410d900541d3f65 Mon Sep 17 00:00:00 2001 From: jiangheng Date: Sun, 7 Sep 2014 14:48:03 +0800 Subject: [PATCH] correct error of repeatedly adding io_size to off in do_bench_write Signed-off-by: jiangheng --- src/rbd.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rbd.cc b/src/rbd.cc index 9a411ec7a73..fb2d8fa0992 100644 --- a/src/rbd.cc +++ b/src/rbd.cc @@ -924,7 +924,7 @@ static int do_bench_write(librbd::Image& image, uint64_t io_size, printf(" SEC OPS OPS/SEC BYTES/SEC\n"); uint64_t off; - for (off = 0; off < io_bytes; off += io_size) { + for (off = 0; off < io_bytes; ) { b.wait_for(io_threads - 1); i = 0; while (i < io_threads && off < io_bytes &&