colo-compare: Use IOThread to Check old packet regularly and Process pactkets of...
commitdd321ecfc2e82e6f9578b986060b1aa3f036bd98
authorWang Yong <wang.yong155@zte.com.cn>
Tue, 29 Aug 2017 07:22:38 +0000 (29 15:22 +0800)
committerJason Wang <jasowang@redhat.com>
Fri, 8 Sep 2017 01:34:31 +0000 (8 09:34 +0800)
treeb4c56f2d878abb2a93f2f9be9733017c727dcaa6
parent329163cbe64a615b4edf6c40f2fff8c79dbc8fb4
colo-compare: Use IOThread to Check old packet regularly and Process pactkets of the primary

Remove the task which check old packet in the comparing thread,
then use IOthread context timer to handle it.

Process pactkets in the IOThread which arrived over the socket.
we use iothread_get_g_main_context to create a new g_main_loop in
the IOThread.then the packets from the primary and the secondary
are processed in the IOThread.

Finally remove the colo-compare thread using the IOThread instead.

Reviewed-by: Zhang Chen<zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Wang Yong <wang.yong155@zte.com.cn>
Signed-off-by: Wang Guang <wang.guang55@zte.com.cn>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/colo-compare.c