From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wen Congyang Subject: Re: [RFC Patch v2 13/16] xc_domain_save: flush cache before calling callbacks->postcopy() Date: Fri, 12 Jul 2013 09:36:17 +0800 Message-ID: <51DF5D91.3000006@cn.fujitsu.com> References: <1373531748-12547-1-git-send-email-wency@cn.fujitsu.com> <1373531748-12547-14-git-send-email-wency@cn.fujitsu.com> <51DEB699.2060909@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51DEB699.2060909@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Lai Jiangshan , Jiang Yunhong , Dong Eddie , Ye Wei , xen-devl , Hong Tao , Xu Yao , Shriram Rajagopalan List-Id: xen-devel@lists.xenproject.org At 07/11/2013 09:43 PM, Andrew Cooper Wrote: > On 11/07/13 09:35, Wen Congyang wrote: >> callbacks->postcopy() may use the fd to transfer something to the >> other end, so we should flush cache before calling callbacks->postcopy() >> >> Signed-off-by: Ye Wei >> Signed-off-by: Jiang Yunhong >> Signed-off-by: Wen Congyang >> --- > > This looks like it is a bugfix on its own, so perhaps might be better > submitted as individual fix, rather than being mixed in with a huge > series for new functionaltiy Currently, callbacks->postcopy() does not use this fd to send anything to the other end. So remus can work. In colo mode, we will use this fd, so I fix it. Thanks Wen Congyang > > ~Andrew > >> tools/libxc/xc_domain_save.c | 6 +++--- >> 1 files changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c >> index fbc15e9..b477188 100644 >> --- a/tools/libxc/xc_domain_save.c >> +++ b/tools/libxc/xc_domain_save.c >> @@ -2034,9 +2034,6 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter >> out: >> completed = 1; >> >> - if ( !rc && callbacks->postcopy ) >> - callbacks->postcopy(callbacks->data); >> - >> /* guest has been resumed. Now we can compress data >> * at our own pace. >> */ >> @@ -2066,6 +2063,9 @@ int xc_domain_save(xc_interface *xch, int io_fd, uint32_t dom, uint32_t max_iter >> >> discard_file_cache(xch, io_fd, 1 /* flush */); >> >> + if ( !rc && callbacks->postcopy ) >> + callbacks->postcopy(callbacks->data); >> + >> /* Enable compression now, finally */ >> compressing = (flags & XCFLAGS_CHECKPOINT_COMPRESS); >> > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel >