On 03/30/2012 07:53 PM, Josh Durgin wrote: > Signed-off-by: Josh Durgin <josh.durgin@xxxxxxxxxxxxx> > --- A bit sparse on the commit message. How long have sheepdog and rbd disks supported snapshots? I'm assuming that this is system checkpoint snapshots (aka 'savevm'), where qemu saves both disk state and VM state into an internal portion of the same disk file? > .gnulib | 2 +- > src/qemu/qemu_driver.c | 14 ++++++++++---- > 2 files changed, 11 insertions(+), 5 deletions(-) > > diff --git a/.gnulib b/.gnulib > index d5612c7..6b93d00 160000 > --- a/.gnulib > +++ b/.gnulib > @@ -1 +1 @@ > -Subproject commit d5612c714c87555f1059d71d347e20271dced322 > +Subproject commit 6b93d00f5410ec183e3a70ebf8e418e3b1bb0191 You probably didn't mean to update git in this patch. > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index 7e6d59c..fc537df 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -9571,12 +9571,18 @@ qemuDomainSnapshotIsAllowed(virDomainObjPtr vm) > * that succeed as well > */ > for (i = 0; i < vm->def->ndisks; i++) { > - if ((vm->def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_LUN) || > - (vm->def->disks[i]->device == VIR_DOMAIN_DISK_DEVICE_DISK && > - STRNEQ_NULLABLE(vm->def->disks[i]->driverType, "qcow2"))) { > + virDomainDiskDefPtr disk = vm->def->disks[i]; > + if (disk->type == VIR_DOMAIN_DISK_TYPE_NETWORK && > + (disk->protocol == VIR_DOMAIN_DISK_PROTOCOL_SHEEPDOG || > + disk->protocol == VIR_DOMAIN_DISK_PROTOCOL_RBD)) > + continue; > + > + if ((disk->device == VIR_DOMAIN_DISK_DEVICE_LUN) || > + (disk->device == VIR_DOMAIN_DISK_DEVICE_DISK && > + STRNEQ_NULLABLE(disk->driverType, "qcow2"))) { > qemuReportError(VIR_ERR_OPERATION_INVALID, > _("Disk '%s' does not support snapshotting"), > - vm->def->disks[i]->src); > + disk->src); Looks reasonable; does this still apply to the latest libvirt.git? -- Eric Blake eblake@xxxxxxxxxx +1-919-301-3266 Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list