numam-spdk/lib
Darek Stojaczyk e1c0c4c785 vhost/scsi: fix starting a session while SCSI targets are hotplugged
Vhost sessions currently inherit the SCSI target
status from their vhost devices when started. So
if a session is started while an asynchronous SCSI
target hotplug is in progress, the newly started
session will inherit the VHOST_SCSI_DEV_ADDING
state, which was not meant to be used in sessions
and will likely cause vhost to misbehave. The
ADDING status is used by the entire vhost device
to indicate that some sessions are still hotplugging
the SCSI target and that target can't be hotremoved
just yet. The sessions set their targets' state to
PRESENT when hotplugging them, so newly started
sessions should do the same.

This patch also prevents the same SCSI target to be
hotplugged twice to a single session. It wouldn't
cause any problems, but some resources could've been
leaked.

Change-Id: Icdbff78c167fc1f2f65137087334bd5512e81546
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/450052
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
2019-04-22 15:41:51 +00:00
..
bdev bdev/nvme: fix issue about coredump which caused by assert error. 2019-04-22 15:23:11 +00:00
blob blobstore: rename resize_in_progress to locked_operation_in_progress 2019-04-08 21:39:08 +00:00
blobfs blobfs: remove unused parameter in spdk_fs_cb_args 2019-04-18 22:09:32 +00:00
conf string: spdk_strtol to delegate additional error checking 2019-01-29 00:10:57 +00:00
copy ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
env_dpdk env/dpdk: detach pci devices from EAL interrupt thread 2019-04-18 22:49:30 +00:00
event rpc/notifications: add notification support to RPC client and SPDK host. 2019-04-09 23:01:52 +00:00
ftl lib/ftl: check for null 2019-04-02 08:22:48 +00:00
ioat ioat: allocate device struct using regular calloc 2019-04-09 06:30:42 +00:00
iscsi lib/iscsi: Set destructed at the start of target node destruction 2019-04-11 18:33:18 +00:00
json json_util: add debug logs to spdk_json_decode_object function 2019-01-10 14:31:37 +00:00
jsonrpc jsonrpc: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
log app, log: clarify how to enable log flags 2019-03-29 02:35:48 +00:00
lvol lvol: Fix for lvol failed deletion flow 2019-04-02 19:23:22 +00:00
nbd nbd: optional nbd_device in start_nbd_disk 2019-04-04 08:35:50 +00:00
net net: Use spdk_json_write_named_* APIs throughout 2019-02-04 07:08:04 +00:00
notify notify: add notification library 2019-03-29 21:15:14 +00:00
nvme nvme_rdma: Allow the SGL to be larger than the req_length 2019-04-19 17:29:45 +00:00
nvmf nvmf: remove unused tcp trace point 2019-04-22 15:25:37 +00:00
reduce reduce: account for compressed buffers 2019-04-02 21:40:21 +00:00
rocksdb blobfs: spdk_fs_thread_ctx is no longer a channel 2019-04-02 23:24:30 +00:00
rpc rpc: add get_spdk_version rpc method 2019-03-26 22:54:28 +00:00
scsi scsi: don't zero entire vpd_ext_inquiry structure 2019-04-18 16:09:57 +00:00
sock sock/vpp: do not continue if buf writed is less than provided 2019-03-12 22:19:42 +00:00
thread thread: add spdk_thread_is_idle() 2019-03-01 21:38:02 +00:00
trace lib/trace: add trace_record tool 2019-01-30 06:36:25 +00:00
ut_mock thread: Eliminate use of pthread_self and thread_ids 2019-01-15 16:53:12 +00:00
util lib/util/cpuset: add negate and xor 2019-04-09 17:40:24 +00:00
vhost vhost/scsi: fix starting a session while SCSI targets are hotplugged 2019-04-22 15:41:51 +00:00
virtio virtio: allocate virtqueue structs using regular calloc 2019-04-17 22:53:05 +00:00
Makefile notify: add notification library 2019-03-29 21:15:14 +00:00