spdk_put_io_channel() was designed to be called on the same thread that called spdk_get_io_channel(). spdk_put_io_channel() sends a message to its own thread, to allow the context to unwind before releasing the resources. This had the side effect to allow an incorrect thread to call spdk_put_io_channel(). This patch will fix that. Bdevperf tool had a design flaw that needed the side effect, but it was fixed recently. We do not know if we have any other case. Hence add assert to spdk_put_io_channel() to find other case. We found that unit test for blobstore had called spdk_put_io_channel() and fix it together in this patch. Besides, correct the comment for spdk_put_io_channel() in include/spdk/thread.h not to create any other case in future. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I6ec7bf074818abef43b23ca40bc9385adac70a75 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/479390 Community-CI: SPDK CI Jenkins <sys_sgci@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Alexey Marchuk <alexeymar@mellanox.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> |
||
---|---|---|
.. | ||
blob.c | ||
bs_dev_common.c | ||
bs_scheduler.c | ||
Makefile |