From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:41883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USg9r-0003JZ-Lu for qemu-devel@nongnu.org; Thu, 18 Apr 2013 00:09:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USg9n-0002m3-RC for qemu-devel@nongnu.org; Thu, 18 Apr 2013 00:09:15 -0400 Received: from e23smtp05.au.ibm.com ([202.81.31.147]:37874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USg9n-0002lp-9w for qemu-devel@nongnu.org; Thu, 18 Apr 2013 00:09:11 -0400 Received: from /spool/local by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 18 Apr 2013 14:04:11 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id E4F153578050 for ; Thu, 18 Apr 2013 14:09:03 +1000 (EST) Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.235.138]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3I3sv8o65405002 for ; Thu, 18 Apr 2013 13:54:57 +1000 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 r3I48XPH031681 for ; Thu, 18 Apr 2013 14:08:33 +1000 Message-ID: <516F7176.1030703@linux.vnet.ibm.com> Date: Thu, 18 Apr 2013 12:07:18 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1365843407-16504-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1365843407-16504-7-git-send-email-xiawenc@linux.vnet.ibm.com> <516F0BA0.4060302@redhat.com> In-Reply-To: <516F0BA0.4060302@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: kwolf@redhat.com, phrdina@redhat.com, qemu-devel@nongnu.org, stefanha@gmail.com, armbru@redhat.com, lcapitulino@redhat.com, pbonzini@redhat.com 于 2013-4-18 4:52, Eric Blake 写道: > On 04/13/2013 02:56 AM, Wenchao Xia wrote: >> This patch adds a parameter to tell whether return valid snapshots >> for whole VM only. >> Note that the snapshot check logic is copied from do_info_snapshots(), >> which is different with load_vmstate() and will be changed in next patch. >> >> Signed-off-by: Wenchao Xia >> Reviewed-by: Eric Blake >> Reviewed-by: Kevin Wolf >> --- > >> + >> + /* Check logic is connected with load_vmstate(): >> + Only check the devices that can snapshot, other devices that can't >> + take snapshot, for example, readonly ones, will be ignored in >> + load_vmstate(). */ >> + while ((bs1 = bdrv_next(bs1))) { >> + if (bs1 != bs && bdrv_can_snapshot(bs1)) { >> + ret = bdrv_snapshot_find(bs1, sn_info, sn->id_str, NULL); > > This says for a snapshot to be consistent, all block devices must share > the same id but can have different names. Is that really true? Or is > it backwards from reality? If snapshot ids allocated incrementally per > block device, can I use hotplug to create a situation where I have a VM > with two disks > OK, it would check both. > where the existing HMP 'loadvm B' should load the snapshot named 'B' > from both disks, regardless of the different number, and where snapshot > 'A' is inconsistent unless disk b is hot-unplugged? > -- Best Regards Wenchao Xia