Am 07.04.2015 um 14:51 hat Kevin Wolf geschrieben:
> In recent qemu versions, it is possible to override the backing file
> name and format that is stored in the image file with values given at
> runtime. In such cases, the temporary override could end up in the
> image header if the qcow2 header was updated, while obviously correct
> behaviour would be to leave the on-disk backing file path/format
> unchanged.
> 
> Fix this and add a test case for it.
> 
> Reported-by: Michael Tokarev <m...@tls.msk.ru>
> Signed-off-by: Kevin Wolf <kw...@redhat.com>

> --- a/block/qcow2.h
> +++ b/block/qcow2.h
> @@ -283,6 +283,12 @@ typedef struct BDRVQcowState {
>      QLIST_HEAD(, Qcow2UnknownHeaderExtension) unknown_header_ext;
>      QTAILQ_HEAD (, Qcow2DiscardRegion) discards;
>      bool cache_discards;
> +
> +    /* Backing file path and format as stored in the image (this is not the
> +     * effective path/format, which may be the result of a runtime option
> +     * override) */
> +    char *image_backing_file;
> +    char *image_backing_format;
>  } BDRVQcowState;

*sigh* I guess freeing these in qcow2_close() wouldn't hurt either.
Sending v2.

Kevin

Reply via email to