Hello, In our scene, we need to delete dirty-bitmap created by using qmp command 'block-dirty-bitmap-add'. we can use qmp command 'block-dirty-bitmap-remove' to remove bitmap. Then I think that we should add a new function in qemu-img to do the same work.
The command format is: qemu-img removebmp file-name bitmap-name I test the function by using qmp command to create a named dirty-bitmap in qcow2 image, then shutdown the vm and using qemu-img to remove it. Then I test to remove a bitmap with 'IN_USE' flags in qcow2 file, and it works. I alse test to do the same job to the qcow2 image encrypted by luks. Please help to review. Thanks. mahaocong (1): Add new command 'removebmp' to remove bitmap in qcow2 file. The format is: qemu-img removebmp qcow2-file-name bitmap-name qemu-img-cmds.hx | 6 +++ qemu-img.c | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 125 insertions(+) -- 2.14.1