Prevent qemu-img resize from causing "Active L1 table too large"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
This commit prevents qemu from overallocating if qcow2 image is too big (whatever that means): https:/
However, `qemu-img resize` isn't protected by the same code and allows to go beyond that.
root@nwkr-laptop ~virtkick/hdd # qemu-img resize 33_test_
Image resized.
Which then causes "Active L1 table too large" error that cannot be reversed.
root@nwkr-laptop ~virtkick/hdd # qemu-img info 33_test_
qemu-img: Could not open '33_test_
root@nwkr-laptop ~virtkick/hdd # qemu-img resize 33_test_
qemu-img: Could not open '33_test_
I originally faces this bug when I passed wrong parameters to qemu-img in a programatic way which caused an image to go corrupt. It's good to protect user's images from being resized too much.
Thanks for the report, sorry for the late reply: This has been fixed in commit 84c26520d3c1c9f f4a104557481394 63278816d5 (included in the 2.7.0 release).