From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNJop-0002uy-G3 for qemu-devel@nongnu.org; Wed, 03 Apr 2013 05:17:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNJok-0002u5-UL for qemu-devel@nongnu.org; Wed, 03 Apr 2013 05:17:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:20040) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNJok-0002tv-M8 for qemu-devel@nongnu.org; Wed, 03 Apr 2013 05:17:18 -0400 Message-ID: <515BF395.6010101@redhat.com> Date: Wed, 03 Apr 2013 11:17:09 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1364810491-21404-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1364810491-21404-3-git-send-email-xiawenc@linux.vnet.ibm.com> <20130402135520.GJ2341@dhcp-200-207.str.redhat.com> <515BC36F.7080307@linux.vnet.ibm.com> <1466473402.1066275.1364973672613.JavaMail.root@redhat.com> <515BF023.8080701@linux.vnet.ibm.com> In-Reply-To: <515BF023.8080701@linux.vnet.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] block: adjust qmp_transaction to be extendable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia Cc: Kevin Wolf , stefanha@gmail.com, qemu-devel@nongnu.org, dietmar@proxmox.com Il 03/04/2013 11:02, Wenchao Xia ha scritto: >> > Sorry I haven't state it clearly. What about bdrv_snapshot_create() > operation? If it need to be rolled back, I think bdrv_snapshot_delete() > will get called and it may fail. But in most case if > bdrv_snapshot_create() succeed before, the bdrv_snapshot_delete should > succeed also, so if fail there may be unexpected error below, could > assert be used for this? No. Transactionable means that commit and rollback cannot fail. For bdrv_snapshot_create() it is the same as for bdrv_snapshot_delete() (the overview I wrote was for qcow2_write_snapshots, which is the common part of bdrv_snapshot_create() and bdrv_snapshot_delete()). Please do one thing at a time. Split the series in multiple pieces if possible. Otherwise you will just fail, and you will have wasted a lot of your and other people's time. Paolo