Description of problem: qemu-img measure ignores options preallocation=metadata and returns same result as if this option is not provided, returning wrong result for images preallocated with metadata. Version-Release number of selected component (if applicable): qemu-img-2.11.2-4 How reproducible: always Steps to Reproduce: vjuranek@localhost vb$ qemu-img create test.img 1m Formatting 'test.img', fmt=raw size=1048576 vjuranek@localhost vb$ qemu-img measure -f raw -O qcow2 -o preallocation=metadata test.img required size: 327680 fully allocated size: 1376256 vjuranek@localhost vb$ qemu-img measure -f raw -O qcow2 test.img required size: 327680 fully allocated size: 1376256 vjuranek@localhost vb$ qemu-img measure -f raw -O qcow2 -o preallocation=metadata test.img required size: 327680 fully allocated size: 1376256 vjuranek@localhost vb$ qemu-img convert -f raw -O qcow2 -o preallocation=metadata test.img test-prelloc-metadata.qcow2 vjuranek@localhost vb$ ls -la test-prelloc-metadata.qcow2 -rw-r--r--. 1 vjuranek vjuranek 1376256 pro 12 12:19 test-prelloc-metadata.qcow2 Actual results: required size is 327680 Expected results: required size is equal or higher than 1376256 Additional info:
This message is a reminder that Fedora 28 is nearing its end of life. On 2019-May-28 Fedora will stop maintaining and issuing updates for Fedora 28. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '28'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 28 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Vojtech if you're still seeing this issue on latest Fedora, please file an upstream qemu bug: https://www.qemu.org/contribute/report-a-bug/