Il 07/10/2014 12:29, Dr. David Alan Gilbert ha scritto: > You mean something like this (untested) ? > > if (mis->postcopy_ram_state != POSTCOPY_RAM_INCOMING_NONE) { > if (mis->postcopy_ram_state == POSTCOPY_RAM_INCOMING_ADVISE) { > /* > * Where a migration had postcopy enabled (and thus went to advise) > * but managed to complete within the precopy period > */ > postcopy_ram_incoming_cleanup(mis); > } else if (ret >= 0) { > /* > * Postcopy was started, cleanup should happen at the end of the > * postcopy thread. > */ > DPRINTF("process_incoming_migration_co: exiting main branch"); > return; > } > }
Yes. Not sure why postcopy_ram_incoming_cleanup is not needed if ret < 0, but you sure know. :) Of course, this is subject to my previous comment that I would rename a lot of postcopy_ram_* symbols to just postcopy_*. Paolo