qemu-stable
[Top][All Lists]
Advanced

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

Re: [Qemu-stable] [PATCH 1/3] migration: Allow ram_save_cleanup to be ca


From: Fam Zheng
Subject: Re: [Qemu-stable] [PATCH 1/3] migration: Allow ram_save_cleanup to be called with empty state
Date: Fri, 15 Sep 2017 14:49:07 +0800
User-agent: Mutt/1.8.3 (2017-05-23)

On Fri, 09/15 14:41, Peter Xu wrote:
> On Fri, Sep 15, 2017 at 01:44:02PM +0800, Fam Zheng wrote:
> > So that we can do cleanup unconditionally at the end of main().
> > 
> > Signed-off-by: Fam Zheng <address@hidden>
> > ---
> >  migration/ram.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/migration/ram.c b/migration/ram.c
> > index e18b3e2d4f..37e6a71241 100644
> > --- a/migration/ram.c
> > +++ b/migration/ram.c
> > @@ -1365,6 +1365,9 @@ static void ram_save_cleanup(void *opaque)
> >      RAMState **rsp = opaque;
> >      RAMBlock *block;
> >  
> > +    if (!rsp || !*rsp) {
> > +        return;
> > +    }
> >      /* caller have hold iothread lock or is in a bh, so there is
> >       * no writing race against this migration_bitmap
> >       */
> > -- 
> > 2.13.5
> > 
> 
> Instead of take special care on RAM, how about check in
> migrate_fd_cancel(), and return directly if migration_is_idle()?

This is not from migrate_fd_cancel(), but from qemu_savevm_state_cleanup(), so
that doesn't work.

Fam



reply via email to

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