These patch added a seperated layer to take internal or external snapshots in a unified way, the granularity is block device, so other functions can just combine the request and submit, such as group snapshot, savevm.
Total goal are: Live back up vm in external or internal image, which need three function: 1 live snapshot block device internal/external. 2 live save vmstate internal/external. 3 combination of the function unit. This patch basically provide function one in unified style with granularity of device. Wenchao Xia (6): snapshot: export function in block.c snapshot: add error set function snapshot: design of common API to take snapshots snapshot: implemention of common API to take snapshots snapshot: qmp interface snapshot: human monitor interface block.c | 30 ++ block.h | 3 + blockdev.c | 833 +++++++++++++++++++++++++++++++++++++++++++++--------- blockdev.h | 129 +++++++++ error.c | 23 ++ error.h | 9 + hmp-commands.hx | 50 +++- hmp.c | 30 ++- hmp.h | 1 + monitor.c | 21 +- qapi-schema.json | 102 ++++++- savevm.c | 77 ++++-- sysemu.h | 2 +- 13 files changed, 1117 insertions(+), 193 deletions(-)