Commit 5aae23aa authored by GangCao's avatar GangCao Committed by Jim Harris
Browse files

test/bdev: handle the error case the IO channel is not setup



This issue may be hit under some large IO and large queue
depth cases where much memory will be consumed and the channel
may be failed to create due to insufficient memory.

The general fix here is that we need to properly handle
the error case that the channel is not created due to this
or that reason.

Change-Id: Icf58a7c8a9cba625ef1b8da6b8bf68ef72ef5546
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
Reviewed-on: https://review.gerrithub.io/386051


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarHailiang Wang <hailiangx.e.wang@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 24c8d965
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -495,6 +495,16 @@ bdevperf_submit_on_core(void *arg1, void *arg2)
	 * completes, another will be submitted. */
	while (target != NULL) {
		target->ch = spdk_bdev_get_io_channel(target->bdev_desc);
		if (!target->ch) {
			printf("Skip this device (%s) as IO channel not setup.\n",
			       spdk_bdev_get_name(target->bdev));
			g_target_count--;
			g_run_failed = true;
			spdk_bdev_close(target->bdev_desc);

			target = target->next;
			continue;
		}

		/* Start a timer to stop this I/O chain when the run is over */
		target->run_timer = spdk_poller_register(end_target, target,