From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49527) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V03Ie-0006sp-A5 for qemu-devel@nongnu.org; Fri, 19 Jul 2013 01:32:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V03Ib-0004Lz-Jr for qemu-devel@nongnu.org; Fri, 19 Jul 2013 01:32:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:30871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V03Ib-0004Lt-Cn for qemu-devel@nongnu.org; Fri, 19 Jul 2013 01:32:13 -0400 Date: Fri, 19 Jul 2013 13:32:00 +0800 From: Stefan Hajnoczi Message-ID: <20130719053200.GA14634@stefanha-thinkpad.redhat.com> References: <1373521624-4380-1-git-send-email-xiawenc@linux.vnet.ibm.com> <20130718123452.GK3582@dhcp-200-207.str.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130718123452.GK3582@dhcp-200-207.str.redhat.com> Subject: Re: [Qemu-devel] [PATCH V5 0/8] add internal snapshot support at block device level List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: phrdina@redhat.com, famz@redhat.com, dietmar@proxmox.com, qemu-devel@nongnu.org, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com, Wenchao Xia On Thu, Jul 18, 2013 at 02:34:52PM +0200, Kevin Wolf wrote: > Am 11.07.2013 um 07:46 hat Wenchao Xia geschrieben: > > This series brings internal snapshot support at block devices level, now we > > have two three methods to do block snapshot lively: 1) backing chain, > > 2) internal one and 3) drive-back up approach. > > > > Comparation: > > Advantages: Disadvantages: > > 1) delta data, taken fast, export, size performance, delete slow. > > 2) taken fast, delete fast, performance, size delta data, format > > 3) performance, export, format taken slow, delta data, size > > > > I think in most case, saving vmstate in an standalone file is better than > > saving it inside qcow2, So suggest treat internal snapshot as block level > > methods and not encourage user to savevm in qcow2 any more. > > > > Implemention details: > > To avoid trouble, this serial have hide ID in create interfaces, this make > > sure no chaos of ID and name will be introduced by these interfaces. > > There is one patch may be common to Pavel's savvm transaction, patch 1/11, > > others are not quite related. Patch 1/11 will not set errp when no snapshot > > find, since patch 3/11 need to distinguish real error case. > > > > Next steps to better full VM snapshot: > > Improve internal snapshot's export capability. > > Better vmstate saving. > > > > Thanks Kevin to give advisement about how add it in qmp_transaction, oldest > > version comes drom Dietmar Maurer. > > > > v3: > > General: > > Rebased after Stenfan's driver-backup patch V6. > > > > Address Eric's comments: > > 4/9: grammar fix and better doc. > > 5/9: parameter name is mandatory now. grammar fix. > > 6/9: redesiged interface: take both id and name as optional parameter, return > > the deleted snapshot's info. > > > > Address Stefan's comments: > > 4/9: add '' around %s in message. drop code comments about vm_clock. > > 9/9: better doc, refined the code and add more test case. > > > > v4: > > Address Stefan's comments: > > 4/9: use error_setg_errno() to show error reason for bdrv_snapshot_create(), > > spell fix and better doc. > > 5/9: better doc. > > 6/9: remove spurious ';' in code, spell fix and better doc. > > > > v5: > > Address Kevin's comments: > > 3/8, 4/8, 8/8: remove the limit of numeric snapshot name. > > General change: > > 4/8: use existing type as parameter in qapi schema. > > > > Wenchao Xia (8): > > 1 snapshot: new function bdrv_snapshot_find_by_id_and_name() > > 2 snapshot: distinguish id and name in snapshot delete > > 3 qmp: add internal snapshot support in qmp_transaction > > 4 qmp: add interface blockdev-snapshot-internal-sync > > 5 qmp: add interface blockdev-snapshot-delete-internal-sync > > 6 hmp: add interface hmp_snapshot_blkdev_internal > > 7 hmp: add interface hmp_snapshot_delete_blkdev_internal > > 8 qemu-iotests: add 056 internal snapshot for block device test case > > Okay, reviewed the whole series. I had some comments on two or three > patches. > > One thing that I want to add is that in order to provide transactional > behaviour (i.e. snapshotting multiple device in one transaction should > result in a consistent snapshot), I think we may in fact need to stop > the VM while taking the snapshots. If we are doing guest memory snapshots we definitely need to stop vcpus. For disk-only snapshots I do not think it's necessary to stop the guest because: 1. Guest I/O can only be processed from the QEMU global mutex. But we currently hold it so no one else can make progress. 2. In the dataplane case the drain callback that I added stops the dataplane thread temporarily. It cannot be restarted until the main loop iterates again (see #1). Therefore I think stopping vcpus is not necessary for disk-only snapshots. Stefan