Fam Zheng <f...@redhat.com> wrote: > Previously, dst side will immediately try to lock the write byte upon > receiving QEMU_VM_EOF, but at src side, bdrv_inactivate_all() is only > done after sending it. If the src host is under load, dst may fail to > acquire the lock due to racing with the src unlocking it. > > Fix this by hoisting the bdrv_inactivate_all() operation before > QEMU_VM_EOF. > > N.B. A further improvement could possibly be done to cleanly handover > locks between src and dst, so that there is no window where a third QEMU > could steal the locks and prevent src and dst from running. > > Reported-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Fam Zheng <f...@redhat.com>
Reviewed-by: Juan Quintela <quint...@redhat.com>