Commit 948bf822 authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei 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: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent 240b243a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -325,10 +325,10 @@ submit_single_io(void)

	if (rc != 0) {
		fprintf(stderr, "starting I/O failed\n");
	}

	} else {
		g_ns->current_queue_depth++;
	}
}

static void
io_complete(void *ctx, const struct spdk_nvme_cpl *completion)
+2 −2
Original line number Diff line number Diff line
@@ -202,10 +202,10 @@ 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++;
	}
}

static void
task_complete(struct reset_task *task, const struct spdk_nvme_cpl *completion)