qcow2: Store exact backing format length
authorKevin Wolf <kwolf@redhat.com>
Thu, 26 Nov 2009 13:03:42 +0000 (14:03 +0100)
committerAnthony Liguori <aliguori@us.ibm.com>
Thu, 3 Dec 2009 17:45:49 +0000 (11:45 -0600)
commit0cf0b28220899059408222982a5f35bd891370c1
treeb283a6bbc755d9e20be49635b48f440f919130d4
parent902311bd4b851973f2760be2a9f54a4309282c98
qcow2: Store exact backing format length

Currently qcow2 unnecessarily rounds up the length of the backing format string
to the next multiple of 8. At the same time, the array in BlockDriverState can
only hold 15 characters, so in effect backing formats with 9 characters or more
don't work (e.g. host_device).

Save the real string length and things start to work for all valid image format
names.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block/qcow2.c