qcow1 compression
Hi!
I have received a bug report from one of our users about compression in qcow(1). He converted disk images to qcow with compression, and the resulting images did not work. I looked into block-qcow.c and found several huge and, as it seems, long-standing bugs. For instance, QCOW_OFLAG_COMPRESSED is never set anywhere, causing compressed data to be returned verbatim on reading.
I'd like to get people's opinion on whether there is any point in fixing this stuff, considering that there is qcow2, and that it never worked to begin with. Perhaps a patch removing it would make more sense...
CU
Uli
Signature · 1 line
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Quoted 10 lines · Ulrich Hecht
I have received a bug report from one of our users about compression in qcow(1). He converted disk images to qcow with compression, and the resulting images did not work. I looked into
block-qcow.cand found several huge and, as it seems, long-standing bugs. For instance,QCOW_OFLAG_COMPRESSEDis never set anywhere, causing compressed data to be returned verbatim on reading.I'd like to get people's opinion on whether there is any point in fixing this stuff, considering that there is qcow2, and that it never worked to begin with. Perhaps a patch removing it would make more sense...
It definitely worked at some point and a quick look seems to show that the last patch to block-qcow.c (Rev 4673) breaks it. Despite the commit comment, the code wasn't all that dead: allocate == 2 is different from allocate == 1.
Reverting that patch should be enough (and possibly adding a comment so that it won't be broken again in future).
Kevin
Quoted 2 lines · Kevin Wolf
Reverting that patch should be enough (and possibly adding a comment so that it won't be broken again in future).
Yes, that worked for me.
CU
Uli
Signature · 1 line
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)