From mboxrd@z Thu Jan 1 00:00:00 1970 From: Han-Lin Li Subject: [PATCH] fix "Error flushing ioemu cache" message in xenpaging Date: Wed, 15 Dec 2010 12:04:57 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org While using xenpaging, "Error flushing ioemu cache" message will be shown on screen even if the "flush-cache" command is sent to xenstore correctly. That is because xenpaging assume xc_mem_paging_flush_ioemu_cache() return non-zero value when operation fail. But xc_mem_paging_flush_ioemu_cache() return the return value from xs_write() which is zero when operation fail. So, we should invert the return value f= rom xs_write() before use it as return value to prevent printing those incorrect error messages. --- Another problem is that the "flush-cache" command isn't supported by xenstore until you apply the patch below http://thread.gmane.org/gmane.comp.emulators.xen.devel/91768/focus=3D91770 This patch isn't merged to unstable version yet. Users need to merge this patch manually to make this function work correctl= y. Anyone knows why this patch isn't merged to the unstable version? --- Signed-off-by: Han-Lin Li diff -r 89116f28083f tools/xenpaging/xc.c --- a/tools/xenpaging/xc.c =A0 =A0 =A0Wed Dec 08 10:46:31 2010 +0000 +++ b/tools/xenpaging/xc.c =A0 =A0 =A0Wed Dec 15 19:23:53 2010 +0800 @@ -62,7 +62,7 @@ =A0=A0 =A0 xs_daemon_close(xsh); - =A0 =A0return rc; + =A0 =A0return !rc; =A0} =A0int xc_wait_for_event_or_timeout(xc_interface *xch, int xce_handle, unsigned long ms)