提交 48a05560 编写于 作者: P Peter Krempa

qemu: driver: Reload snapshots and managedsaves prior to reconnecting

Reconnect to the VM is a possibly long-running job spawned in a separate
thread. We should reload the snapshot defs and managedsave state prior
to spawning the thread to avoid blocking of the daemon startup which
would serialize on the VM lock.

Also the reloading code would violate the domain job held while
reconnecting as the loader functions don't create jobs.
上级 b17c0f0e
...@@ -873,8 +873,6 @@ qemuStateInitialize(bool privileged, ...@@ -873,8 +873,6 @@ qemuStateInitialize(bool privileged,
NULL, NULL) < 0) NULL, NULL) < 0)
goto error; goto error;
qemuProcessReconnectAll(conn, qemu_driver);
virDomainObjListForEach(qemu_driver->domains, virDomainObjListForEach(qemu_driver->domains,
qemuDomainSnapshotLoad, qemuDomainSnapshotLoad,
cfg->snapshotDir); cfg->snapshotDir);
...@@ -883,6 +881,8 @@ qemuStateInitialize(bool privileged, ...@@ -883,6 +881,8 @@ qemuStateInitialize(bool privileged,
qemuDomainManagedSaveLoad, qemuDomainManagedSaveLoad,
qemu_driver); qemu_driver);
qemuProcessReconnectAll(conn, qemu_driver);
qemu_driver->workerPool = virThreadPoolNew(0, 1, 0, qemuProcessEventHandler, qemu_driver); qemu_driver->workerPool = virThreadPoolNew(0, 1, 0, qemuProcessEventHandler, qemu_driver);
if (!qemu_driver->workerPool) if (!qemu_driver->workerPool)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册