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> |
||
---|---|---|
.. | ||
Makefile | ||
spdk_thread.map | ||
thread_internal.h | ||
thread.c |