On Fri, Oct 03, 2014 at 06:47:22PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > Open a return path, and handle messages that are received upon it. > > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
[snip] > @@ -414,6 +448,11 @@ static void migrate_fd_cancel(MigrationState *s) > int old_state ; > trace_migrate_fd_cancel(); > > + if (s->return_path) { > + /* shutdown the rp socket, so causing the rp thread to shutdown */ > + qemu_file_shutdown(s->return_path); Terminating the rp thread via shutting down its file seems roundabout, and kind of dependent on the socket file implementation. [snip] > +__attribute__ (( unused )) /* Until later in patch series */ > +static int open_outgoing_return_path(MigrationState *ms) > +{ > + > + ms->return_path = qemu_file_get_return_path(ms->file); So, another reason this get_return_path abstraction doesn't seem right to me, is that it's not obvious that for non-socket file types, the source and destination side "get return path" operations would necessarily be the same. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson
pgpVxGDtb3bsA.pgp
Description: PGP signature