Re: [PATCH RFCv2 10/10] qemu: snapshot: Improve approach to deal with snapshot metadata

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]