Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-16 Thread Paolo Bonzini
Il 16/07/2014 19:10, Dr. David Alan Gilbert ha scritto: > > > >Handling it within the migration thread would make it much more complicated > >(which would be bad since it's already complex enough); > > Ok. I'm not sure why it is more complicated since migration is essentially > two-phase, one w

Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-16 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 16/07/2014 13:52, Dr. David Alan Gilbert ha scritto: > >* Paolo Bonzini (pbonz...@redhat.com) wrote: > >>Il 16/07/2014 11:37, Dr. David Alan Gilbert ha scritto: > > > >+ > >+/* If it's already open, return it */ > >+if (qfs->

Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-16 Thread Paolo Bonzini
Il 16/07/2014 13:52, Dr. David Alan Gilbert ha scritto: * Paolo Bonzini (pbonz...@redhat.com) wrote: Il 16/07/2014 11:37, Dr. David Alan Gilbert ha scritto: + +/* If it's already open, return it */ +if (qfs->file->return_path) { +return qfs->file->return_path; Wouldn't this l

Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-16 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 16/07/2014 11:37, Dr. David Alan Gilbert ha scritto: > >>> > >>>+ > >>>+/* If it's already open, return it */ > >>>+if (qfs->file->return_path) { > >>>+return qfs->file->return_path; > >> > >>Wouldn't this leave a dangling file descr

Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-16 Thread Paolo Bonzini
Il 16/07/2014 11:37, Dr. David Alan Gilbert ha scritto: + +/* If it's already open, return it */ +if (qfs->file->return_path) { +return qfs->file->return_path; Wouldn't this leave a dangling file descriptor if you call socket_dup_return_path twice, and then close the original Q

Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-16 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > Il 04/07/2014 19:41, Dr. David Alan Gilbert (git) ha scritto: > >From: "Dr. David Alan Gilbert" > > > >Postcopy needs a method to send messages from the destination back to > >the source, this is the 'return path'. > > > >+/* Give a QEMUFile* off t

Re: [Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-05 Thread Paolo Bonzini
Il 04/07/2014 19:41, Dr. David Alan Gilbert (git) ha scritto: From: "Dr. David Alan Gilbert" Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's using a dup'd fd. Signed-off-by: Dr. David Alan Gilbert

[Qemu-devel] [PATCH 07/46] Return path: Open a return path on QEMUFile for sockets

2014-07-04 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. Wire it up for 'socket' QEMUFile's using a dup'd fd. Signed-off-by: Dr. David Alan Gilbert --- include/migration/qemu-file.h | 8 + qemu-file.c