On Fri, Apr 02, 2010 at 11:54:59AM -0400, Laine Stump wrote:
On 04/01/2010 12:22 PM, Daniel Veillard wrote:
>@@ -5928,6 +6096,29 @@ static int qemudDomainStart(virDomainPtr dom) {
> goto endjob;
> }
>
>+ /*
>+ * If there is a managed saved state restore it instead of starting
>+ * from scratch. In any case the old state is removed.
>+ */
>+ managed_save = qemuDomainManagedSavePath(driver, vm);
>+ if ((managed_save)&& (virFileExists(managed_save))) {
>+ virDomainObjUnlock(vm);
>+ qemuDriverUnlock(driver);
>+ ret = qemudDomainRestore(dom->conn, managed_save);
There is problem here.
qemudDomainRestore will call qemuDomainObjBeginJobWithDriver, which
was already called just above this bit of code in qemudDomainStart.
The result will be a temporary deadlock, while the semaphore wait
times out, followed by failure.
Either qemudDomainStart needs to call that function later, or else
it needs to call qemuDomainObjEndJob before calling
qemudDomainRestore.
(Unfortunately, I haven't yet had the time to do any more of a
review other than build and try running the code.)
Right, spot on !
With the fix and the restore patch from Chris the cycle seems to work
just fine for me now :-)
I will integrate the feedback and update the patches,
thanks !
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit
http://xmlsoft.org/
daniel(a)veillard.com | Rpmfind RPM search engine
http://rpmfind.net/
http://veillard.com/ | virtualization library
http://libvirt.org/