[libvirt] [PATCH] qemu: allow snapshotting of sheepdog and rbd disks

Eric Blake eblake at redhat.com
Sat May 26 02:40:36 UTC 2012


On 05/25/2012 08:36 PM, Eric Blake wrote:
> On 03/30/2012 07:53 PM, Josh Durgin wrote:
>> Signed-off-by: Josh Durgin <josh.durgin at dreamhost.com>
>> ---
> 
> 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?
> 

>>      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?

Serves me right for not checking first; you posted a later version of
this patch, later committed as:

commit b57e01532a1691897e27f20eccfd667a46ee374e
Author: Josh Durgin <josh.durgin at dreamhost.com>
Date:   Mon Apr 30 22:55:22 2012 -0700

    qemu: allow snapshotting of sheepdog and rbd disks

    Signed-off-by: Josh Durgin <josh.durgin at dreamhost.com>

Sorry for the noise.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 620 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20120525/214a916f/attachment-0001.sig>


More information about the libvir-list mailing list