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 <vsement...@virtuozzo.com> > --- > > 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
signature.asc
Description: OpenPGP digital signature