From 9bbf06a652a960bffcea0a90cc0e69991dd64ec5 Mon Sep 17 00:00:00 2001 From: GangCao Date: Wed, 13 Dec 2017 02:04:29 -0500 Subject: [PATCH] bdevperf: only count successful IOs in completed IOs Change-Id: I5a51d03c2cb4f2538b2b3567741c524991af46fc Signed-off-by: GangCao Reviewed-on: https://review.gerrithub.io/391597 Tested-by: SPDK Automated Test System Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker --- test/lib/bdev/bdevperf/bdevperf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/lib/bdev/bdevperf/bdevperf.c b/test/lib/bdev/bdevperf/bdevperf.c index b0d50b5f64..8560ba5d31 100644 --- a/test/lib/bdev/bdevperf/bdevperf.c +++ b/test/lib/bdev/bdevperf/bdevperf.c @@ -268,7 +268,10 @@ bdevperf_complete(struct spdk_bdev_io *bdev_io, bool success, void *cb_arg) } target->current_queue_depth--; - target->io_completed++; + + if (success) { + target->io_completed++; + } TAILQ_INSERT_TAIL(&target->task_list, task, link);