[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [libvirt] [PATCH 3/4] use monitor fd for domain shutdown
- From: "Daniel P. Berrange" <berrange redhat com>
- To: Guido Günther <agx sigxcpu org>
- Cc: libvir-list redhat com
- Subject: Re: [libvirt] [PATCH 3/4] use monitor fd for domain shutdown
- Date: Tue, 20 Jan 2009 10:21:44 +0000
On Tue, Jan 20, 2009 at 08:17:07AM +0100, Guido G?nther wrote:
> Hi,
> On Mon, Jan 19, 2009 at 01:38:22PM +0000, Daniel P. Berrange wrote:
> > > /* Got them all, so now open the monitor console */
> > > - ret = qemudOpenMonitor(conn, vm, monitor);
> > > + qemuDriverLock(driver);
> > > + ret = qemudOpenMonitor(conn, driver, vm, monitor, 0);
> > > + qemuDriverUnlock(driver);
> >
> > What are the lock/unlock calls here for ? They will cause the whole
> > driver to deadlock, because they're violating the rule that a domain
> > lock must not be held while acquiring the driver lock. AFAICT in the
> > qemudOpenMonitor() method you are just passing the 'driver' object
> > straight through to the 'virEventAddHandle' method - since you are
> > not using any data fields in it, locking is not required.
> I looked at HACKING and couldn't find any explanation of the locking
> rules so I added those. They're bogus. Dropped in the new attached
> version.
Yes, I need to write a doc about threading - its too long to put into
the HACKING file directly.
ACK, this looks good now.
Daniel
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]