On Fri, Nov 15, 2013 at 21:38:35 +0900, WhiteWind wrote:
On Fri, 15 Nov 2013 21:18:08 +0900, Jiri Denemark
<jdenemar(a)redhat.com>
wrote:
> On Fri, Nov 15, 2013 at 20:47:43 +0900, Michael Avdienko wrote:
>> QEMU 1.6.0 introduced new migration status: setup
>> Libvirt does not expect such string in QMP and refuses to migrate with
>> error
>> "unexpected migration status in setup"
>>
>> This patch fixes it.
>>
>> Sorry for previous bad try.
>> Unfortunately I have seen Serge Hallyn's patch too late.
>> Now I think it's better to include following code into my patch:
>> if (setting_up) {
>> priv->job.info.fileTotal = -1;
>> priv->job.info.fileRemaining = -1;
>> priv->job.info.fileProcessed = 0;
>
> I don't think this is needed at all, I'd just keep them all 0.
>
> This patch gets my ACK as is but I won't it push yet in case someone
> provides a good reasoning for initializing the counters to 2^64-1.
>
> Jirka
But my patch does not initialize these fields at all.
Are these fields initialized here?
qemuDomainObjPrivatePtr priv = vm->privateData;
If not, I'm almost sure that I should set them all to 0 explicitly
when status is QEMU_MONITOR_MIGRATION_STATUS_SETUP
It's initialized at the very beginning of migration by
qemuMigrationJobStart(), which results in the following sequence of
function calls leading to the initialization:
qemuDomainObjBeginAsyncJob, qemuDomainObjBeginJobInternal,
qemuDomainObjResetAsyncJob, memset(&job->info, 0, sizeof(job->info)). I
agree it's pretty hidden :-)
Jirka