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)
commit28d1d4d28ae2ef6d976f8a78f3e5f81c175c4b53
tree79e98a23effcc460a3df565da246fe48e57ee016
parent7e6fa41beb42731373ef5e9990e43e7d9fc842b1
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