qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <aliguori@us.ibm.com>
To: qemu-devel@nongnu.org
Cc: Uri Lublin <uril@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/2] Introducing qcow2 extensions + keep backing file format (v4)
Date: Thu, 26 Feb 2009 12:48:41 -0600	[thread overview]
Message-ID: <49A6E409.4030607@us.ibm.com> (raw)
In-Reply-To: <1234979501-9454-2-git-send-email-uril@redhat.com>

Uri Lublin wrote:
> Qcow2 extensions are build of magic (id) len (in bytes) and data.
> They reside between the end of the header and the filename.
>
> We can keep the backing file format in a such a qcow2 extension, to
> 1. Provide a way to know the backing file format without probing
>    it (setting the format at creation time).
> 2. Enable using qcow2 format over host block devices.
>    (only if the user specifically asks for it, by providing the format
>    at creation time).
>
> I've added bdrv_create2 and drv->bdrv_create2 (implemented only
> by block-qcow2 currently) to pass the backing-format to create.
>
> Based on a work done by Shahar Frank.
>
> Also fixes a security flaw found by Daniel P. Berrange on [1]
> which summarizes: "Autoprobing: just say no."
>
> [1] http://lists.gnu.org/archive/html/qemu-devel/2008-12/msg01083.html
>
> Signed-off-by: Uri Lublin <uril@redhat.com>
>   

This made it through my regression testing but...

>  int bdrv_create(BlockDriver *drv,
>                  const char *filename, int64_t size_in_sectors,
>                  const char *backing_file, int flags)
> @@ -348,6 +362,9 @@ int bdrv_open2(BlockDriverState *bs, const char *filename, int flags,
>  
>          /* if there is a backing file, use it */
>          bs1 = bdrv_new("");
> +/*         if (drv) */
> +/*             pstrcpy(bs1->backing_format, sizeof(bs->backing_format), */
> +/*                     drv->format_name); */
>   

I don't know if I missed this before or it was added since v3 but I'm 
curious why this is here and why it's commented out.

Regards,

Anthony Liguori

  parent reply	other threads:[~2009-02-26 18:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 17:51 [Qemu-devel] [PATCH 0/2] Introducing qcow2 extensions + keep backing file format (v4) Uri Lublin
2009-02-18 17:51 ` [Qemu-devel] [PATCH 1/2] " Uri Lublin
2009-02-18 17:51   ` [Qemu-devel] [PATCH 2/2] qemu-img: adding a "-F base_fmt" option to "qemu-img create -b" (v4) Uri Lublin
2009-02-26 18:48   ` Anthony Liguori [this message]
2009-03-01 11:22     ` [Qemu-devel] [PATCH 1/2] Introducing qcow2 extensions + keep backing file format (v4) Uri Lublin

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=49A6E409.4030607@us.ibm.com \
    --to=aliguori@us.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=uril@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).