From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:35591) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ts79u-0003OM-4h for qemu-devel@nongnu.org; Mon, 07 Jan 2013 02:30:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ts79r-0005NQ-CJ for qemu-devel@nongnu.org; Mon, 07 Jan 2013 02:30:10 -0500 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:47228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ts79q-0005FS-QN for qemu-devel@nongnu.org; Mon, 07 Jan 2013 02:30:07 -0500 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 7 Jan 2013 17:26:54 +1000 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [9.190.234.120]) by d23dlp01.au.ibm.com (Postfix) with ESMTP id CA0A22CE804D for ; Mon, 7 Jan 2013 18:29:56 +1100 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r077ISe265143008 for ; Mon, 7 Jan 2013 18:18:29 +1100 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r077TtWI021073 for ; Mon, 7 Jan 2013 18:29:55 +1100 From: Wenchao Xia Date: Mon, 7 Jan 2013 15:27:58 +0800 Message-Id: <1357543689-11415-1-git-send-email-xiawenc@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH V2 00/10] snapshot: take block snapshots in unified way List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, aliguori@us.ibm.com, quintela@redhat.com, stefanha@gmail.com, Wenchao Xia , lcapitulino@redhat.com, pbonzini@redhat.com, dietmar@proxmox.com 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 functions: 1 live snapshot block device internal/external. 2 live save vmstate internal/external. 3 combination of the function unit. This serial provide part one. v2: 1) seperate patches for bdrv_deappend() and bdrv_snapshot_find(). 2) use error set function which will keep first error instead of replacing a existing error. 3) use qemu_timespec for snapshot timestamp, added a lock in localtime_r() on windows and use it for timestamp. 4) remove space in comments and use present tense. 5) remove member async in BlkTransactionStates and async related structure, which is not supported now. 6) remove snapshot delete function. 7) remove snapshot info function. 8) redesign qmp interface, new interface is added instead of using parameter to distinguish internal case in old external interface. 9) renamed parameter in hmp interface, and better tips for it. 10) patches are splitted to more smaller ones. 11) code adjust according to comments. Wenchao Xia (10): block: export function bdrv_find_snapshot() block: add function deappend() error: add function error_set_check() oslib-win32: add lock for time functions snapshot: design of internal common API to take snapshots snapshot: implemention of internal common API to take snapshots snapshot: qmp use new internal API for external snapshot transaction snapshot: qmp add internal snapshot transaction interface snapshot: qmp add blockdev-snapshot-internal-sync interface snapshot: hmp add internal snapshot support for block device block.c | 44 +++ blockdev.c | 753 +++++++++++++++++++++++++++++++++++++-------- error.c | 19 ++ hmp-commands.hx | 28 +- hmp.c | 25 +- include/block/block.h | 3 + include/qapi/error.h | 5 + include/sysemu/blockdev.h | 119 +++++++ oslib-win32.c | 12 +- qapi-schema.json | 50 +++- qmp-commands.hx | 52 +++- savevm.c | 22 -- 12 files changed, 954 insertions(+), 178 deletions(-)