test/nvme: Increment current_queue_depth only if I/O submission succeeded

current_queue_depth should have been incremented only if I/O submission
succeeded.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: Ib26b42b0ab195eba7536b2403a31d42305d77433
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2585
Community-CI: Mellanox Build Bot
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
Shuhei Matsumoto 2020-05-25 10:09:29 +09:00 committed by Tomasz Zawadzki
parent 240b243af5
commit 948bf82228
2 changed files with 4 additions and 4 deletions

View File

@ -325,9 +325,9 @@ submit_single_io(void)
if (rc != 0) {
fprintf(stderr, "starting I/O failed\n");
} else {
g_ns->current_queue_depth++;
}
g_ns->current_queue_depth++;
}
static void

View File

@ -202,9 +202,9 @@ submit_single_io(struct ns_worker_ctx *ns_ctx)
if (rc != 0) {
fprintf(stderr, "starting I/O failed\n");
} else {
ns_ctx->current_queue_depth++;
}
ns_ctx->current_queue_depth++;
}
static void