提交 d0e4b762 编写于 作者: O Osier Yang

qemu: Update shared disk table when reconnecting qemu process

上级 a4504ac1
...@@ -3189,6 +3189,7 @@ qemuProcessReconnect(void *opaque) ...@@ -3189,6 +3189,7 @@ qemuProcessReconnect(void *opaque)
int reason; int reason;
virQEMUDriverConfigPtr cfg; virQEMUDriverConfigPtr cfg;
virCapsPtr caps = NULL; virCapsPtr caps = NULL;
size_t i;
memcpy(&oldjob, &data->oldjob, sizeof(oldjob)); memcpy(&oldjob, &data->oldjob, sizeof(oldjob));
...@@ -3230,6 +3231,15 @@ qemuProcessReconnect(void *opaque) ...@@ -3230,6 +3231,15 @@ qemuProcessReconnect(void *opaque)
if (qemuUpdateActiveUsbHostdevs(driver, obj->def) < 0) if (qemuUpdateActiveUsbHostdevs(driver, obj->def) < 0)
goto error; goto error;
/* XXX: Need to change as long as lock is introduced for
* qemu_driver->sharedDisks.
*/
for (i = 0; i < obj->def->ndisks; i++) {
if (qemuAddSharedDisk(driver, obj->def->disks[i],
obj->def->name) < 0)
goto error;
}
if (qemuProcessUpdateState(driver, obj) < 0) if (qemuProcessUpdateState(driver, obj) < 0)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册