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 <xiaw...@linux.vnet.ibm.com> > Reviewed-by: Eric Blake <ebl...@redhat.com> > Reviewed-by: Kevin Wolf <kw...@redhat.com> > ---
> + > + /* 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