mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 12:35:17 +00:00
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.
This commit is contained in:
parent
b17c0f0e9a
commit
48a055607c
@ -873,8 +873,6 @@ qemuStateInitialize(bool privileged,
|
||||
NULL, NULL) < 0)
|
||||
goto error;
|
||||
|
||||
qemuProcessReconnectAll(conn, qemu_driver);
|
||||
|
||||
virDomainObjListForEach(qemu_driver->domains,
|
||||
qemuDomainSnapshotLoad,
|
||||
cfg->snapshotDir);
|
||||
@ -883,6 +881,8 @@ qemuStateInitialize(bool privileged,
|
||||
qemuDomainManagedSaveLoad,
|
||||
qemu_driver);
|
||||
|
||||
qemuProcessReconnectAll(conn, qemu_driver);
|
||||
|
||||
qemu_driver->workerPool = virThreadPoolNew(0, 1, 0, qemuProcessEventHandler, qemu_driver);
|
||||
if (!qemu_driver->workerPool)
|
||||
goto error;
|
||||
|
Loading…
x
Reference in New Issue
Block a user