]> git.ipfire.org Git - thirdparty/qemu.git/commit
qcow2: fix autoclear image header update
authorStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Thu, 14 Jun 2012 10:42:23 +0000 (11:42 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 25 Jun 2012 13:55:38 +0000 (08:55 -0500)
commit0da4c073228c645a0366f3fe801df072cf268482
treef7ced80eb0e86284226cdba3131f5a37702426a2
parentee7735fa639c43ccb3746d84609332e48e22479f
qcow2: fix autoclear image header update

The autoclear feature bits can be used for qcow2 file format features
that are safe to "drop" by old programs that do not understand the
feature.  Upon opening the image file unknown autoclear feature bits are
cleared and the image file header is rewritten, but this was happening
too early in the code when critical header fields were not yet loaded.

Process autoclear feature bits after all necessary header information
has been loaded.

Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit af7b708db2d03eb47f7ba44a050439ad9ee65e7a)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/qcow2.c