d8f4bbeb43
Add two new public APIs, spdk_nvme_detach_async() and spdk_nvme_detach_poll_async() to detach multiple controllers in parallel as a simple manner to users. Hold the target controller to nvme_ctrlr_detach_ctx because users will free any object which held it after returning spdk_nvme_detach_async(). spdk_nvme_detach_ctx holds all nvme_ctrlr_detach_ctx in a sequence by linked list. spdk_nvme_detach_ctx has a boolean variable polling_started to prevent the user from calling spdk_nvme_detach_async() while spdk_nvme_detach_poll_async() is called repeatedly. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>i Change-Id: Ib049c19f7ef24410b963fd5c777a21184f3012d1 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4758 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>