Shuhei Matsumoto 3806b2e1f9 lib/nvme: Make nvme_ctrlr_destruct() asynchronous
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>
2020-10-20 16:55:55 +00:00
..
2020-10-20 02:42:16 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-19 10:02:10 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-10-15 08:23:39 +00:00
2020-09-15 07:12:44 +00:00
2020-10-15 08:23:39 +00:00