From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNL2o-0004Yi-HS for qemu-devel@nongnu.org; Wed, 03 Apr 2013 06:35:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UNL2k-0005k9-GR for qemu-devel@nongnu.org; Wed, 03 Apr 2013 06:35:54 -0400 Received: from e28smtp06.in.ibm.com ([122.248.162.6]:57377) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UNL2j-0005jk-P9 for qemu-devel@nongnu.org; Wed, 03 Apr 2013 06:35:50 -0400 Received: from /spool/local by e28smtp06.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 3 Apr 2013 16:01:17 +0530 Received: from d28relay02.in.ibm.com (d28relay02.in.ibm.com [9.184.220.59]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id 1E4EE3940059 for ; Wed, 3 Apr 2013 16:05:43 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay02.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r33AZdDP60162122 for ; Wed, 3 Apr 2013 16:05:39 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r33AZgRY008037 for ; Wed, 3 Apr 2013 21:35:42 +1100 Message-ID: <515C05F0.9010903@linux.vnet.ibm.com> Date: Wed, 03 Apr 2013 18:35:28 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1364810491-21404-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1364810491-21404-4-git-send-email-xiawenc@linux.vnet.ibm.com> <20130402135948.GK2341@dhcp-200-207.str.redhat.com> <515BBFB2.2000406@linux.vnet.ibm.com> <20130403090351.GB2854@dhcp-200-207.str.redhat.com> In-Reply-To: <20130403090351.GB2854@dhcp-200-207.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 3/3] block: change rollback sequence in qmp_transaction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, dietmar@proxmox.com, stefanha@gmail.com 于 2013-4-3 17:03, Kevin Wolf 写道: > Am 03.04.2013 um 07:35 hat Wenchao Xia geschrieben: >> 于 2013-4-2 21:59, Kevin Wolf 写道: >>> Am 01.04.2013 um 12:01 hat Wenchao Xia geschrieben: >>>> Last operaton should be cancelled first. >>>> >>>> Signed-off-by: Wenchao Xia >>> >>> Should it? This commit message does little to convince me. >>> >>> Kevin >>> >> I think so, if two request are "snapshot_blkdev ide0 newimage.qcow2", >> "snapshot_blkdev_internal ide0 snap0", then in rollback delete of >> snap0 would be wrong. > > I think this problem exists only because you didn't properly separate > the prepare and the commit stage. If any changes only took effect in a > non-failing commit stage, then you don't ever have to delete a snapshot. > Instead, you just abort the creation of the snapshot. > > Kevin > OK, I got your point, will split bdrv_snapshot_create() before adding it in qmp_transaction. -- Best Regards Wenchao Xia