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

2014-07-17 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 where the

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 dgilb...@redhat.com Postcopy needs a method to send messages from the destination back to the source, this is the 'return path'. snip +/* Give a

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

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 descriptor if you call

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

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-file-return_path) { +

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 dgilb...@redhat.com 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.

[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 dgilb...@redhat.com 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 dgilb...@redhat.com ---