[CRIU] [PATCH] page-server: Allow blocking on pipe

Pavel Emelyanov xemul at virtuozzo.com
Mon Dec 19 02:13:51 PST 2016


This splice tries to get pages from socket into local pipe to
splice them into images later. The data on the socket may not
be there by the time we get to this splice, so there's no reason
to force non-blocking IO here.

Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/page-xfer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/page-xfer.c b/criu/page-xfer.c
index 41e6c8a..39c6977 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -596,7 +596,7 @@ static int page_server_add(int sk, struct page_server_iov *pi, u32 flags)
 		if (chunk > cxfer.pipe_size)
 			chunk = cxfer.pipe_size;
 
-		chunk = splice(sk, NULL, cxfer.p[1], NULL, chunk, SPLICE_F_MOVE | SPLICE_F_NONBLOCK);
+		chunk = splice(sk, NULL, cxfer.p[1], NULL, chunk, SPLICE_F_MOVE);
 		if (chunk < 0) {
 			pr_perror("Can't read from socket");
 			return -1;
-- 
2.5.0


More information about the CRIU mailing list