block-qcow2: keep backing file format in a qcow2 extension (Uri Lublin)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Mar 2009 17:55:14 +0000 (17:55 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Sat, 28 Mar 2009 17:55:14 +0000 (17:55 +0000)
commitf965509c9ee8635c66dbf4342a9c67c222951bc3
tree79e98a23effcc460a3df565da246fe48e57ee016
parent5eb456396d20554a6b9637b23519579f083aa992
block-qcow2: keep backing file format in a qcow2 extension (Uri Lublin)

Use a qcow2 extension to keep the backing file format.

By keeping the backing file format, we can:
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).

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>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6909 c046a42c-6fe2-441c-8c8c-71466251a162
block-qcow2.c