Re: [PATCH 2/2] snapshot: wire up qemu transaction command

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

 



On 03/22/2012 08:47 AM, Peter Krempa wrote:
> On 03/17/2012 10:27 PM, Eric Blake wrote:
>> The hardest part about adding transactions is not using the new
>> monitor command, but undoing the partial changes we made prior
>> to a failed transaction.
>>

>> +    if (virSecurityManagerRestoreImageLabel(driver->securityManager,
>> +                                            vm->def, disk)<  0)
>> +        VIR_WARN("Unable to restore security label on %s", disk->src);
>> +    if (virDomainLockDiskDetach(driver->lockManager, vm, disk)<  0)
>> +        VIR_WARN("Unable to release lock on %s", source);
>> +    if (need_unlink&&  stat(disk->src,&st) == 0
>> +&&  st.st_size == 0&&  S_ISREG(st.st_mode)&&  unlink(disk->src)<  0)
>> +        VIR_WARN("Unable to release lock on %s", disk->src);
> 
> Is this second warning correct? It looks to me like if you are unlinking
> the disk source file, but the error message states that lock release
> failed.

Looks like too much copy and paste on my part.  I'll change it to
_("Unable to delete just-created file %s").

> 
> I don't have many experience working with the locking and security code,
> but this funcion looks as it's doing what it should. I'd feel more
> confident if somebody other would look at this part.
> 
> ACK to the rest, and a not-so-confident ACK of the marked part if my
> question gets cleared.

Thanks for reviewing.  As with round 1, I will delay pushing these until
I have finished rounds 4 and 5 for the complete mirrored storage
migration solution, in case I come up with any other last-minute tweaks.

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

[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]