On 10/29/2012 10:08 AM, Michal Privoznik wrote:
On 25.10.2012 23:56, Eric Blake wrote:
> On 10/24/2012 09:49 AM, Michal Privoznik wrote:
>> Currently, we use iohelper when saving/restoring a domain.
>> However, if there's some kind of error (like I/O) it is not
>> propagated to libvirt. Since it is not qemu who is doing
>> the actual write() it will not get error. The iohelper does.
>> Therefore we should check for iohelper errors as it makes
>> libvirt more user friendly.
>> ---
>>
> ACK once you fix up that comment.
>
Thanks, pushed with this:
diff --git a/src/util/virfile.c b/src/util/virfile.c
index 36b3420..9593151 100644
--- a/src/util/virfile.c
+++ b/src/util/virfile.c
@@ -291,7 +291,9 @@ virFileWrapperFdNew(int *fd, const char *name, unsigned int flags)
goto error;
/* deliberately don't use virCommandNonblockingFDs here as it is all or
- * nothing. And we want iohelper's stdin to block. */
+ * nothing. And we want iohelper's stdin and stdout to block (default).
+ * However, stderr is read within event loop and therefore it must be
+ * nonblocking.*/
Shoot, now I'm getting link failures:
CCLD libvirt_iohelper
./.libs/libvirt_util.a(libvirt_util_la-event_poll.o): In function
`virEventPollAddHandle':
/home/dummy/libvirt/src/util/event_poll.c:136: undefined reference to
`libvirt_event_poll_add_handle_semaphore'
...
./.libs/libvirt_util.a(libvirt_util_la-event_poll.o):(.note.stapsdt+0x24):
undefined reference to `libvirt_event_poll_add_handle_semaphore'
Something in this patch make libvirt_iohelper now drag in new link
dependencies that aren't being met. But since you didn't see this in
your testing, it's got to be some difference in the configure results
for which devel libraries were found on your platform vs. mine. I'm
trying to narrow down what might be the culprit, but the ".note.stapsdt"
portion of the error message makes me think it has to do with systemtap
support.
--
Eric Blake eblake(a)redhat.com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org