[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] qemu driver: use lseek64 for setting position in logfile



[hmm, are you aware that messages from you are adding a cc to
libvir-list-bounces?]

On 01/04/2011 08:02 AM, Stefan Berger wrote:
>> 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 
>> replaces the two occurrences of lseek() in the relevant path with 
>> lseek64() and solves this problem. It may be a good idea to look at 
>> other occurrences of lseek() as well whether they should be replaced. 
>> off_t is 8 bytes long (64 bit), so it doesn't need to be replaced with 
>> the explicit off64_t.

NACK to the bulk of this patch.  Gnulib already guarantees that we have
large-file support (and therefore, off_t should already be off64_t on
platforms that support dual mode off_t sizing); we should NOT be
explicitly referencing the non-standard off64_t or lseek64, since they
do not exist on all platforms.

>> @@ -2624,7 +2624,7 @@ static int qemudStartVMDaemon(virConnect
>>                                 enum virVMOperationType vmop) {
>>       int ret;
>>       unsigned long long qemuCmdFlags;
>> -    int pos = -1;
>> +    off_t pos = -1;
>>       char ebuf[1024];
>>       char *pidfile = NULL;
>>       int logfile = -1;
> 
> ... actually this is really the only hunk that's necessary to fix this 
> problem.

Agree that changing that one mistaken type should fix things.  Can you
resubmit as a v2 with a fixed commit message, at which point I will feel
more comfortable giving ack?

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]