3806b2e1f9
Following the last patch, separate nvme_ctrlr_destruct() into nvme_ctrlr_destruct_async() and nvme_ctrlr_destruct_poll_async(), but keep nvme_ctrlr_destruct() by replacing the internal by nvme_ctrlr_destruct_async() and nvme_ctrlr_destruct_poll_async(). Add shutdown_complete to nvme_ctrlr_detach_ctx. If shutdown_complete is true, we can destruct the controller. The case that nvme_ctrlr_shutdown_async() failed sets shutdown_complete to true. The case that nvme_ctrlr_disable() is called sets shutdown_complete to true unconditionally. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I3994e259f9d3ccf8fede3ac03aadef911eefb9dd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4415 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jacek Kalwas <jacek.kalwas@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>