All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: mjt@tls.msk.ru, qemu-devel@nongnu.org, stefanha@redhat.com
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	[thread overview]
Message-ID: <20150407130146.GG4635@noname.str.redhat.com> (raw)
In-Reply-To: <1428411078-536-1-git-send-email-kwolf@redhat.com>

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 <mjt@tls.msk.ru>
> Signed-off-by: Kevin Wolf <kwolf@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	other threads:[~2015-04-07 13:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07 12:51 [Qemu-devel] [PATCH for-2.3] qcow2: Fix header update with overridden backing file Kevin Wolf
2015-04-07 13:01 ` Kevin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150407130146.GG4635@noname.str.redhat.com \
    --to=kwolf@redhat.com \
    --cc=mjt@tls.msk.ru \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.