Spdk/lib/vhost
Changpeng Liu e753aa807f lib/vhost: quit vhost subsystem while VM is connected
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>
2023-01-06 16:14:35 +00:00
..
Makefile update Intel copyright notices 2022-11-10 08:28:53 +00:00
rte_vhost_user.c lib/vhost: quit vhost subsystem while VM is connected 2023-01-06 16:14:35 +00:00
spdk_vhost.map event/vhost: separate vhost subsystem to scsi and blk 2022-05-20 09:20:07 +00:00
vhost_blk.c lib/vhost: use user_dev's lock to protect vhost sessions 2023-01-06 16:14:35 +00:00
vhost_internal.h lib/vhost: use user_dev's lock to protect vhost sessions 2023-01-06 16:14:35 +00:00
vhost_rpc.c lib/vhost: use user_dev's lock to protect vhost sessions 2023-01-06 16:14:35 +00:00
vhost_scsi.c lib/vhost: use user_dev's lock to protect vhost sessions 2023-01-06 16:14:35 +00:00
vhost.c lib/vhost: use user_dev's lock to protect vhost sessions 2023-01-06 16:14:35 +00:00