qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH for-2.10 1/3] block: Add errp to b{lk, drv}_trun


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH for-2.10 1/3] block: Add errp to b{lk, drv}_truncate()
Date: Wed, 8 Mar 2017 18:04:30 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

On 07.03.2017 11:47, Kevin Wolf wrote:
> Am 06.03.2017 um 20:54 hat Max Reitz geschrieben:
>> For one thing, this allows us to drop the error message generation from
>> qemu-img.c and blockdev.c and instead have it unified in
>> bdrv_truncate().
>>
>> Signed-off-by: Max Reitz <address@hidden>
> 
>>  block/commit.c                 |  5 +++--
>>  block/mirror.c                 |  2 +-
> 
> These still pass NULL after the series. Fixing it would require to add a
> way to complete jobs with an Error object, but maybe we should do this
> sooner or later anyway. Not necessarily part of this series, though.
> 
>>  block/vhdx.c                   |  6 +++---
>>  block/vpc.c                    |  2 +-
> 
> vpc can easily be fixed to pass the actual errp from vpc_create() to the
> blk_truncate() call. In vhdx.c, the blk_truncate() call is a bit more
> deeply nested, but it doesn't seem completely unreasonable there either.

vhdx is insofar not completely unreasonable because it already sometimes
generates Error objects and sometimes doesn't; so if I were to expand on
that inconsistent behavior, I wouldn't make matters worse. But still I
don't feel quite comfortable touching that.

Let's see, maybe I prepend a patch that makes vhdx_create() always
generate Error objects.

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]