[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH 02/11] migration: qemu_savevm_state_cleanup() in cleanup |
Date: |
Wed, 3 Jan 2018 17:36:19 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Wed, Jan 03, 2018 at 10:15:41AM +0100, Juan Quintela wrote:
> Peter Xu <address@hidden> wrote:
> > Moving existing callers all into migrate_fd_cleanup(). It simplifies
> > migration_thread() a bit.
> >
> > Signed-off-by: Peter Xu <address@hidden>
>
> Reviewed-by: Juan Quintela <address@hidden>
Thanks.
>
> I am trying to see if we can call migrate_fd_cleanup() twice. As far as
> I can see, we are not doing it. But, and it is a big but, we are not
> checking that we are not calling qemu_savevm_state_cleanup() twice. If
> that happens, we can get double frees and similar.
>
> I put the reviewed-by anyways, because I *think* that we are doing it
> right now, and otherwise, we should make sure that we are not calling it
> twice, not papering over it.
>
> Once here, I have notice that we call block_cleanup_parameters() in
> *three* places. We call notifier_list_notify() on two of this places (I
> can't see any good reason *why* we don't call the notifier for
> migrate_fd_cancel).
Indeed.
IMHO we can remove two calls of block_cleanup_parameters(), only keep
the one in migrate_fd_cleanup(), and remove on notifier_list_notify()
in migrate_fd_error() (these can be two more patches). What do you
think?
--
Peter Xu
[Qemu-devel] [PATCH 03/11] migration: remove "enable_colo" var, Peter Xu, 2018/01/03
[Qemu-devel] [PATCH 05/11] migration: move vm_old_running into global state, Peter Xu, 2018/01/03