foreach_session() is used to e.g. close a bdev, where for each session we close any io_channels and then, on the final "finish" call, close the bdev descriptor. The vhost init thread is the one that called spdk_vhost_init() and also the same one that calls all management APIs. One of those is for hotplugging LUNs to vhost scsi targets, which practically results in opening bdev descriptors. By always scheduling that final foreach_session() callback to the init thread, we end up with calling spdk_bdev_close() always on the same thread which called spdk_bdev_open(), which is actually a bdev layer requirement. Change-Id: I2338e15c63f93ef37dd4412dd677dee40d272ec2 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/459166 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> |
||
---|---|---|
.. | ||
rte_vhost | ||
Makefile | ||
rte_vhost_compat.c | ||
vhost_blk.c | ||
vhost_internal.h | ||
vhost_nvme.c | ||
vhost_rpc.c | ||
vhost_scsi.c | ||
vhost.c |