From: Uri Lublin <uril@redhat.com>
To: qemu-devel@nongnu.org
Cc: Uri Lublin <uril@redhat.com>
Subject: [Qemu-devel] [PATCH For Review 0/2] qemu block changes: keep backing file format v3
Date: Wed, 4 Feb 2009 18:08:57 +0200 [thread overview]
Message-ID: <1233763739-23230-2-git-send-email-uril@redhat.com> (raw)
In-Reply-To: <1233763739-23230-1-git-send-email-uril@redhat.com>
This is another implementation for keeping a backing file format, such
that we would not need probing to figure it out.
This time I introduce qcow2 extensions which can be used in the
future.
I assing one such an extension to keeping the backing file format,
and use it when opening a file.
Qcow2 extensions are build of magic (id) len (in bytes) and data.
They reside between the end of the header and the filename.
We 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
Currently this is implemented only for qcow2, but touches code in some
block*.[ch] files. An alternative that touches only block-qcow2.c is
possible, but will need to change the implementation of -snapshot,
and call bdrv_open2 directly from qcow_open.
Please review,
Thanks,
Uri.
next prev parent reply other threads:[~2009-02-04 16:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 16:08 [Qemu-devel] [PATCH For Review 0/2] qemu block changes: keep backing file format v3 Uri Lublin
2009-02-04 16:08 ` Uri Lublin [this message]
2009-02-04 16:08 ` [Qemu-devel] [PATCH 1/2] Introducing qcow2 extensions + keep backing file format Uri Lublin
2009-02-04 16:08 ` [Qemu-devel] [PATCH 2/2] qemu-img: adding a "-F base_fmt" option to "qemu-img create -b" 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=1233763739-23230-2-git-send-email-uril@redhat.com \
--to=uril@redhat.com \
--cc=qemu-devel@nongnu.org \
/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).