Re: [PATCH] qemu_domain: fix startup policy for disks

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

 



On 2.7.2014 15:21, Michal Privoznik wrote:
> On 27.06.2014 17:06, Pavel Hrdina wrote:
>> https://bugzilla.redhat.com/show_bug.cgi?id=1086121
>>
>> We now support startupPolicy='optional' for disks, but this
>> should work only for cold boot, not for restore or migrate.
>>
>> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
>> ---
>>   src/qemu/qemu_domain.c | 5 +++++
>>   1 file changed, 5 insertions(+)
>>
>> diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c
>> index 9e38d02..a8cce76 100644
>> --- a/src/qemu/qemu_domain.c
>> +++ b/src/qemu/qemu_domain.c
>> @@ -2230,11 +2230,16 @@
>> qemuDomainCheckDiskStartupPolicy(virQEMUDriverPtr driver,
>>   {
>>       char uuid[VIR_UUID_STRING_BUFLEN];
>>       int startupPolicy = vm->def->disks[diskIndex]->startupPolicy;
>> +    int device = vm->def->disks[diskIndex]->device;
>>
>>       virUUIDFormat(vm->def->uuid, uuid);
>>
>>       switch ((virDomainStartupPolicy) startupPolicy) {
>>           case VIR_DOMAIN_STARTUP_POLICY_OPTIONAL:
> 
> I'd put here a comment why you're doing this change. Something like:
> 
> /* Once started with an optional disk, qemu saves its section in the
> migration stream, so later, when restoring from it we must make sure the
> sections match. */
> 
>> +            if (!cold_boot &&
>> +                device != VIR_DOMAIN_DISK_DEVICE_FLOPPY &&
>> +                device != VIR_DOMAIN_DISK_DEVICE_CDROM)
>> +                goto error;
>>               break;
>>
>>           case VIR_DOMAIN_STARTUP_POLICY_MANDATORY:
>>
> 
> 
> ACK
> 
> Michal

Thanks, pushed with the comment.

Pavel

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