This patch series adds the functionality to change the backing file of existing images. This includes simple renaming of a backing file without converting the COW image as well as safe rebasing onto a different backing file that has some changes compared to the current backing file.
v2: - Added missing braces in copied code v3: - Added some missing error checks - Fixed storing the backing file format in qcow2 - Open backing files with right format v4: - Handle bdrv_pwrite failure Kevin Wolf (3): block: Introduce BDRV_O_NO_BACKING block: Add bdrv_change_backing_file qemu-img rebase block.c | 24 +++++- block.h | 3 + block/qcow2.c | 101 ++++++++++++++++++++++++ block_int.h | 3 + qemu-img-cmds.hx | 6 ++ qemu-img.c | 227 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 6 files changed, 361 insertions(+), 3 deletions(-)