Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-25 Thread Daniel P . Berrangé
On Wed, Apr 25, 2018 at 07:29:05AM +, wangxin (U) wrote: > > > -Original Message- > > From: Peter Xu [mailto:pet...@redhat.com] > > Sent: Wednesday, April 25, 2018 11:32 AM > > To: Daniel P. Berrangé > > Cc: Dr. David Alan Gilbert ; wangxin

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-25 Thread wangxin (U)
> -Original Message- > From: Peter Xu [mailto:pet...@redhat.com] > Sent: Wednesday, April 25, 2018 11:32 AM > To: Daniel P. Berrangé > Cc: Dr. David Alan Gilbert ; wangxin (U) > ; qemu-devel@nongnu.org; >

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-24 Thread Peter Xu
On Wed, Apr 25, 2018 at 11:14:23AM +0800, Peter Xu wrote: > On Tue, Apr 24, 2018 at 07:24:05PM +0100, Daniel P. Berrangé wrote: > > On Tue, Apr 24, 2018 at 06:16:31PM +0100, Dr. David Alan Gilbert wrote: > > > * Wang Xin (wangxinxin.w...@huawei.com) wrote: > > > > If the fd socket peer closed

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-24 Thread Peter Xu
On Tue, Apr 24, 2018 at 07:24:05PM +0100, Daniel P. Berrangé wrote: > On Tue, Apr 24, 2018 at 06:16:31PM +0100, Dr. David Alan Gilbert wrote: > > * Wang Xin (wangxinxin.w...@huawei.com) wrote: > > > If the fd socket peer closed shortly, ppoll may receive a POLLHUP > > > event before the expected

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-24 Thread Daniel P . Berrangé
On Tue, Apr 24, 2018 at 06:16:31PM +0100, Dr. David Alan Gilbert wrote: > * Wang Xin (wangxinxin.w...@huawei.com) wrote: > > If the fd socket peer closed shortly, ppoll may receive a POLLHUP > > event before the expected POLLIN event, and qemu will do nothing > > but goes into an infinite loop of

Re: [Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-24 Thread Dr. David Alan Gilbert
* Wang Xin (wangxinxin.w...@huawei.com) wrote: > If the fd socket peer closed shortly, ppoll may receive a POLLHUP > event before the expected POLLIN event, and qemu will do nothing > but goes into an infinite loop of the POLLHUP event. > > So, abort the migration if we receive a POLLHUP event.

[Qemu-devel] [PATCH] migration/fd: abort migration if receive POLLHUP event

2018-04-21 Thread Wang Xin
If the fd socket peer closed shortly, ppoll may receive a POLLHUP event before the expected POLLIN event, and qemu will do nothing but goes into an infinite loop of the POLLHUP event. So, abort the migration if we receive a POLLHUP event. Signed-off-by: Wang Xin