On 10/08/2013 08:33 PM, Paolo Bonzini wrote:
> Il 08/10/2013 11:23, Kevin Wolf ha scritto:
>>>> I think you need to modify qcow2_save_vmstate to save and restore
>>>> bs->total_sectors.  Can you test that and if so post the patch?
>> It's a regression introduced by commit df2a6f29, right?
> 
> Yes, that's what introduced the "if".
> 
>> What you suggest probably works as a quick hack to fix the bug. The VM
>> state functions in qcow2 are getting uglier and uglier, though. Maybe
>> they should avoid going through block.c and adding hacks to disable or
>> revert side effects.
> 
> Yes, that would work too.

Sorry for my ignorance (I never ever touched this part of qemu) but how can
you possibly avoid block.c while doing savevm? The qcow2 driver must not
use posix read()/write(), right? So no matter how, all writes end up in
bdrv_co_do_writev() which changes blocks number. Or use
raw_aio_readv()/raw_aio_writev() API directly? Please give some more hints.
Thanks.


-- 
Alexey

Reply via email to