[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] Is the use of bdrv_getlength() in qcow.c kosher?
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] Is the use of bdrv_getlength() in qcow.c kosher? |
Date: |
Fri, 4 Aug 2017 10:32:18 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 08/04/2017 07:45 AM, Markus Armbruster wrote:
> Markus Armbruster <address@hidden> writes:
>
>> bdrv_getlength() can fail. The uses in qcow.c don't check. Is that
>> safe?
>
> There's another one in qcow2_co_pwritev_compressed().
>
> Yet another one in dump_refcounts().
>
> While we're talking: the one in qcow2_measure() assigns to a variable of
> type ssize_t. Should be int64_t.
Oh indeed. I wonder if my recently-added qemu-iotests 190 will catch
that on a 32-bit machine? If not, it should...
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature