<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    V2:<br>
      - removed replacements of lseek() to lseek64() from patch<br>
    <br>
    While doing some testing with Qemu and creating huge logfiles I
    encountered the case where the VM could not start anymore due to the
    lseek() to the end of the Qemu VM's log file failing. The patch
    below fixes the problem by replacing the previously used 'int' with
    'off_t'.<br>
    <br>
    To reproduce this error, you could do the following:
    <br>
    <br>
    dd if=<i class="moz-txt-slash"><span class="moz-txt-tag">/</span>dev/zero
      of=/var/log/libvirt/qemu<span class="moz-txt-tag">/</span></i><name
    of VM>.log bs=1024 count=$((1024*2048))
    <br>
    <br>
    and you should get an error like this:
    <br>
    <br>
    error: Failed to start domain <name of VM>
    <br>
    error: Unable to seek to -2147482651 in <i class="moz-txt-slash"><span
        class="moz-txt-tag">/</span>var/log/libvirt/qemu<span
        class="moz-txt-tag">/</span></i><name of VM>.log: Success<br>
    <br>
    Signed-off-by: Stefan Berger <a class="moz-txt-link-rfc2396E" href="mailto:stefanb@us.ibm.com"><stefanb@us.ibm.com></a><br>
    <br>
    ---<br>
     src/qemu/qemu_driver.c |    6 +++---<br>
     1 file changed, 3 insertions(+), 3 deletions(-)<br>
    <br>
    Index: libvirt-acl/src/qemu/qemu_driver.c<br>
    ===================================================================<br>
    --- libvirt-acl.orig/src/qemu/qemu_driver.c<br>
    +++ libvirt-acl/src/qemu/qemu_driver.c<br>
    @@ -2624,7 +2624,7 @@ static int qemudStartVMDaemon(virConnect<br>
                                   enum virVMOperationType vmop) {<br>
         int ret;<br>
         unsigned long long qemuCmdFlags;<br>
    -    int pos = -1;<br>
    +    off_t pos = -1;<br>
         char ebuf[1024];<br>
         char *pidfile = NULL;<br>
         int logfile = -1;<br>
    <br>
  </body>
</html>