|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [RFC PATCH 4/7] xc_domain_save: flush cache before calling callbacks->postcopy()
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 <wei.ye1987@xxxxxxxxx>
Signed-off-by: Jiang Yunhong <yunhong.jiang@xxxxxxxxx>
Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
---
tools/libxc/xc_domain_save.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/libxc/xc_domain_save.c b/tools/libxc/xc_domain_save.c
index 3aafa61..cc4004a 100644
--- a/tools/libxc/xc_domain_save.c
+++ b/tools/libxc/xc_domain_save.c
@@ -1886,9 +1886,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);
-
/* Flush last write and discard cache for file. */
if ( outbuf_flush(xch, &ob, io_fd) < 0 ) {
PERROR("Error when flushing output buffer");
@@ -1897,6 +1894,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);
+
/* checkpoint_cb can spend arbitrarily long in between rounds */
if (!rc && callbacks->checkpoint &&
callbacks->checkpoint(callbacks->data) > 0)
--
1.8.0
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |