Commit f77ea250 authored by Denis Barakhtanov's avatar Denis Barakhtanov Committed by Tomasz Zawadzki
Browse files

thread: print error message if device I/O channel was not created



This is mostly relevant for the group channels that are created on the
modules themselves. If the error was not logged in that module, the subsequent call:

ch->group_ch = spdk_io_channel_get_ctx(spdk_get_io_channel(&module_if));

returns an invalid address (not NULL), which might be tricky to debug.

Signed-off-by: default avatarDenis Barakhtanov <denis.barahtanov@croit.io>
Change-Id: I0330a40254e70c60346aed13ea2b4c2520f28a72
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/18574


Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
parent 7be0593a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2337,6 +2337,8 @@ spdk_get_io_channel(void *io_device)
		RB_REMOVE(io_channel_tree, &ch->thread->io_channels, ch);
		dev->refcnt--;
		free(ch);
		SPDK_ERRLOG("could not create io_channel for io_device %s (%p): %s (rc=%d)\n",
			    dev->name, io_device, spdk_strerror(-rc), rc);
		pthread_mutex_unlock(&g_devlist_mutex);
		return NULL;
	}