qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v6 01/19] migration: Create migration_ioc_proces


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH v6 01/19] migration: Create migration_ioc_process_incoming()
Date: Fri, 8 Sep 2017 12:16:41 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Sep 06, 2017 at 01:07:47PM +0200, Juan Quintela wrote:
> Peter Xu <address@hidden> wrote:
> > On Tue, Aug 08, 2017 at 06:26:11PM +0200, Juan Quintela wrote:
> >
> > [...]
> >
> >>  void migration_fd_process_incoming(QEMUFile *f)
> >>  {
> >> -    Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, 
> >> f);
> >> -
> >> +    Coroutine *co = qemu_coroutine_create(process_incoming_migration_co, 
> >> NULL);
> >> +    MigrationIncomingState *mis = migration_incoming_get_current();
> >> +    
> >> +    if (!mis->from_src_file) {
> >> +        mis->from_src_file = f;
> >
> > [1]
> >
> >> +    }
> >>      qemu_file_set_blocking(f, false);
> >>      qemu_coroutine_enter(co);
> >>  }
> >>  
> >> +void migration_ioc_process_incoming(QIOChannel *ioc)
> >> +{
> >> +    MigrationIncomingState *mis = migration_incoming_get_current();
> >> +
> >> +    if (!mis->from_src_file) {
> >> +        QEMUFile *f = qemu_fopen_channel_input(ioc);
> >> +        mis->from_src_file = f;
> >
> > Remove this line? Since migration_fd_process_incoming() will set it up
> > as well below at [1].
> >
> > Then we can make sure there will be only one place to setup
> > from_src_file.
> 
> This can be end being called from rdma code.
> 
> Yes, I know it is a mess.

But isn't RDMA code calling migration_fd_process_incoming()?  Btw, I
meant removing the one in migration_ioc_process_incoming(), and keep
the one in migration_fd_process_incoming().

(did I miss anything?)

-- 
Peter Xu



reply via email to

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