[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_
Re: [Qemu-block] [PATCH 11/22] qcow2-bitmap: add qcow2_store_persistent_bitmaps()
Fri, 21 Oct 2016 16:04:40 -0500
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
On 10/21/2016 02:44 PM, Max Reitz wrote:
>> Now I think I can drop this assignment, as bdrv_aligned_preadv have
>> 'return ret < 0 ? ret : 0;' in the end... Am I right? Can bdrv_pwrite
>> and friends return positive value on success?
> I think so, but if they do return positive value they're supposed to be
> equal to the number of bytes written. In practice, though, any
> non-negative return value is treated the same (as success).
At one point in my conversion to byte access, I ran into test failures
when trying to return number of bytes written; so commit 1a62d0a
hard-codes a return of 0 on success instead. It will be a long and
painful audit to find which callers expect which semantics, which I did
not want to do.
> I was just wondering about the comment, though, not about the assignment
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Description: OpenPGP digital signature