[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in b
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list() |
Date: |
Wed, 17 Apr 2013 14:52:48 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
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 <address@hidden>
> Reviewed-by: Eric Blake <address@hidden>
> Reviewed-by: Kevin Wolf <address@hidden>
> ---
> +
> + /* 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
disk a has snapshot id 1 named 'A', id 2 named 'B'
disk b has snapshot id 1 named 'B'
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?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH V12 07/18] block: change VM snapshot checking logic, (continued)
- [Qemu-devel] [PATCH V12 09/18] block: move qmp_query_block() and bdrv_query_info() to block/qapi.c, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 02/18] block: distinguish id and name in bdrv_find_snapshot(), Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 01/18] block: move bdrv_snapshot_find() to block/snapshot.c, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 10/18] qmp: add interface query-snapshots, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 11/18] qmp: add recursive member in ImageInfo, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list(), Wenchao Xia, 2013/04/13
- Re: [Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list(),
Eric Blake <=
- [Qemu-devel] [PATCH V12 13/18] block: move bdrv_snapshot_dump() and dump_human_image_info() to block/qapi.c, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 15/18] hmp: add function hmp_info_snapshots(), Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 17/18] hmp: show ImageInfo in 'info block', Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 14/18] block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump(), Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 12/18] qmp: add ImageInfo in BlockDeviceInfo used by query-block, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 16/18] hmp: switch snapshot info function to qmp based one, Wenchao Xia, 2013/04/13
- [Qemu-devel] [PATCH V12 18/18] hmp: add parameters device and -v for info block, Wenchao Xia, 2013/04/13