Am 24.10.2014 um 15:57 hat Max Reitz geschrieben:
> qemu-img should use QMP commands whenever possible in order to ensure
> feature completeness of both online and offline image operations. For
> the "commit" command, this is relatively easy, so implement it first
> (in the hope that indeed others will follow).
> 
> As qemu-img does not have access to QMP (due to QMP being intertwined
> with basically everything in qemu), we cannot directly use QMP, but at
> least use the functions the corresponding QMP commands are using (which
> would be "block-commit", in this case).
> 
> 
> v14:
> - Patch 3:
>   - Pull the optimized code out into an own function [Kevin]
>   - Only run the optimized code if the image header, the reftable, a
>     single refblock and the L1 table can be described by that single
>     refblock [Kevin]
>   - Zero out the L1 table before modifying anything else [Kevin]
>   - Always set bs->drv to NULL if an error occured which broke the
>     in-memory refcount information and thus rendered the BDS unusable
>     (because all of the qcow2 code assumes that the in-memory
>     information is correct, obviously) [Kevin]
>   - Do truncation last, because while it is the eventual goal, it is
>     also the structurally least invasive and therefore least important
>     operation (we don't want it to fail and leave the BDS unusable)
>     [Kevin]

Reviewed-by: Kevin Wolf <kw...@redhat.com>

Reply via email to