+22
−3
Loading
If we kill the vhost process while VM is connected, the `g_fini_cb` will not be called due to active session is in the vhost-user device, but we're sure that this VM is stopped for this case, because `vhost_driver_unregister` is called in the shutdown thread, so here we reuse `g_vhost_user_started` flag for this case and free the sessions, the following call to `vhost_driver_unregister` can also handle this case, because the Unix Domain socket is already unregistered. Fixes commit 327d1c98 ("vhost: defer vhost_dev_unregister until scsi tgts removed") Change-Id: I4f368ac8c304dd9525d15abdce8fd5b2ed79b96e Signed-off-by:Changpeng Liu <changpeng.liu@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15623 Tested-by:
SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by:
Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by:
Jim Harris <james.r.harris@intel.com>