Spdk/lib/thread
GangCao 13c7a98d33 thread: add assert for io_channel_iter allocation failure
For example, in the calling from spdk_bdev_get_current_qd(), if
spdk_for_each_channel() failed to allocate struct spdk_io_channel_iter,
it will just return and the ctx allocated in spdk_bdev_get_current_qd()
is not released.

Instead to change the public API of spdk_for_each_channel() to return
the failed status to let the caller properly handle the NOMEM case and
release the allocation, it just adds the assert here.

Change-Id: I6a95207dd390586bdae4e86e5d550cdac709e10a
Signed-off-by: GangCao <gang.cao@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14657
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2022-09-29 07:27:27 +00:00
..
Makefile Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
spdk_thread.map thread: add spdk_poller_get_id 2021-11-16 09:06:10 +00:00
thread_internal.h Replace most BSD 3-clause license text with SPDX identifier. 2022-06-09 07:35:12 +00:00
thread.c thread: add assert for io_channel_iter allocation failure 2022-09-29 07:27:27 +00:00