qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] qemu-img: improve convert_iteration_sectors()


From: Max Reitz
Subject: Re: [Qemu-block] [PATCH] qemu-img: improve convert_iteration_sectors()
Date: Wed, 26 Apr 2017 22:48:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 07.04.2017 13:34, Vladimir Sementsov-Ogievskiy wrote:
> Do not do extra call to _get_block_status()
> 
> Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
> ---
> 
> Also, I'm not sure about last line:
> s->status = s->target_has_backing ? BLK_BACKING_FILE : BLK_DATA;
> 
> (which is equal to old code)
> 
> may be, it should be
> s->status = s->target_has_backing ? BLK_BACKING_FILE : BLK_ZERO;
> 
> as it is the case, when range is not allocated at all. Should we copy it in 
> this case?

Intuitively, I don't think the else branch can happen in that case at
all. If it does, BLK_DATA will be safe, so it seems the best choice to me.

Thanks, applied to my block-next branch:

https://github.com/XanClic/qemu/commits/block-next

Max

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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