qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_f


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 04/18] savevm: set right return value for qemu_file_rate_limit
Date: Fri, 23 Aug 2013 01:34:17 -0400 (EDT)

> Say, In ram_save_iterate(), the current logic is:
> 
> ret = qemu_file_rate_limit();
> while(ret == 0) {
>      save RAM blocks until no more to send.
> }
> if (ret < 0) {
>      return ret;
> }
> ...
> 
> And in savevm layer, qemu_savevm_state_iterate() set an error if the return
> value of ram_save_iterate < 0.

But that is to report errors *not in the QEMUFile*.  Errors in the
QEMUFile are already reported by qemu_file_get_error(), and
qemu_savevm_state_iterate() will not overwrite them.

qemu_file_rate_limit() returning 1 is enough to exit the loop,
which is all that is needed.

> Obviously the return value of qemu_file_rate_limit() should have an negative
> value for there has been an error. Otherwise we need to modify the logic
> above.

It is not obvious to me... what is, again, the bug that you're observing?
I think it is happening only because you're modifying the migration thread's
body.  If you use the normal code of the migration thread, it will just work.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]