vhost/rpc: fix get_vhost_controllers
get_vhost_controllers was printing only one device of vhost scsi controller with multiple devices Change-Id: I392fc393d9e8f3d20c28139724d83b79d800456a Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com> Reviewed-on: https://review.gerrithub.io/391593 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
ac1818748c
commit
804f6ce45a
@ -1161,13 +1161,15 @@ spdk_vhost_scsi_config_json(struct spdk_vhost_dev *vdev, struct spdk_json_write_
|
||||
|
||||
assert(vdev != NULL);
|
||||
spdk_json_write_name(w, "scsi");
|
||||
spdk_json_write_object_begin(w);
|
||||
spdk_json_write_array_begin(w);
|
||||
for (dev_idx = 0; dev_idx < SPDK_VHOST_SCSI_CTRLR_MAX_DEVS; dev_idx++) {
|
||||
sdev = spdk_vhost_scsi_dev_get_tgt(vdev, dev_idx);
|
||||
if (!sdev) {
|
||||
continue;
|
||||
}
|
||||
|
||||
spdk_json_write_object_begin(w);
|
||||
|
||||
spdk_json_write_name(w, "scsi_dev_num");
|
||||
spdk_json_write_uint32(w, dev_idx);
|
||||
|
||||
@ -1198,9 +1200,10 @@ spdk_vhost_scsi_config_json(struct spdk_vhost_dev *vdev, struct spdk_json_write_
|
||||
}
|
||||
|
||||
spdk_json_write_array_end(w);
|
||||
spdk_json_write_object_end(w);
|
||||
}
|
||||
|
||||
spdk_json_write_object_end(w);
|
||||
spdk_json_write_array_end(w);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vhost_scsi", SPDK_LOG_VHOST_SCSI)
|
||||
|
Loading…
Reference in New Issue
Block a user