[libvirt] [PATCH RFCv2 10/10] qemu: snapshot: Improve approach to deal with snapshot metadata
Peter Krempa
pkrempa at redhat.com
Fri Jun 20 12:22:32 UTC 2014
On 06/19/14 22:47, Eric Blake wrote:
> On 06/19/2014 07:46 AM, Peter Krempa wrote:
>> Until now we were changing information about the disk source via
>> multiple steps of copying data. Now that we changed to a pointer to
>> store the disk source we might use it to change the approach to track
>> the data.
>>
>> Additionally this will allow proper tracking of the backing chain.
>> ---
>>
>> Now the security data is copied, but I'm still not sure that's everything we need.
>>
>> src/qemu/qemu_driver.c | 113 ++++++++++++-------------------------------------
>> 1 file changed, 27 insertions(+), 86 deletions(-)
...
>> @@ -13037,35 +12996,18 @@ qemuDomainSnapshotUndoSingleDiskActive(virQEMUDriverPtr driver,
>> virStorageFileUnlink(disk->src) < 0)
>> VIR_WARN("Unable to remove just-created %s", disk->src->path);
>>
>> + virStorageFileDeinit(disk->src);
>> +
>
> Why do you need to explicitly deinit? Can't you just let that happen
> automatically when freeing the virStorageSourcePtr down below?
The deinit calls into the storage driver and thus can't be integrated
into the util code freeing the virStorageSource.
>
>> /* Update vm in place to match changes. */
>> - VIR_FREE(disk->src->path);
>> - disk->src->path = source;
>> - source = NULL;
>> - disk->src->format = origdisk->src->format;
>> - disk->src->type = origdisk->src->type;
>> - disk->src->protocol = origdisk->src->protocol;
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140620/a1c726c5/attachment-0001.sig>
More information about the libvir-list
mailing list