+17
−7
Loading
Error handling of spdk_bs_destroy and spdk_bs_unload is confusing. They may or may not free the spdk_blob_store structure on error, depending on when the error happens. And users can not know if the structure has been freed after the processes finished, thus unable to handle it correctly. To fix this problem, we only free the structure when there are no errors happended. In this way, users can be sure that the structure pointer is still valid after the failed opertation. They can then retry the operation or debug the failure. Fixes #3560. Change-Id: I4f7194ab8fce4f1a408ce3e6500514fd214427d4 Signed-off-by:Jinlong Chen <chenjinlong.cjl@alibaba-inc.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/25472 Reviewed-by:
Jim Harris <jim.harris@nvidia.com> Reviewed-by:
GangCao <gang.cao@intel.com> Reviewed-by:
Yankun Li <845245370@qq.com> Community-CI: Community CI Samsung <spdk.community.ci.samsung@gmail.com> Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by:
Ben Walker <ben@nvidia.com> Community-CI: Mellanox Build Bot