[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for-2.3] qcow2: Fix header update with overridde
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH for-2.3] qcow2: Fix header update with overridden backing file |
Date: |
Tue, 7 Apr 2015 15:01:46 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> Signed-off-by: Kevin Wolf <address@hidden>
> --- 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