[CRIU] [PATCH 13/12] page-xfer: Don't send zero pages if none found

Pavel Emelyanov xemul at virtuozzo.com
Thu Jun 29 13:33:44 MSK 2017


When page-server gets a request from lazy-daemon for a pagemap,
the former cannot read no pages from the image.

Mike says: "The pagemap should be completely in sync between src
and dst and dst should never request pages that are not present.
Maybe we should return -1 here? At least we'll have a chance that
dump will unroll everything..."

Why not?!

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

diff --git a/criu/page-xfer.c b/criu/page-xfer.c
index 24fc565..d949c06 100644
--- a/criu/page-xfer.c
+++ b/criu/page-xfer.c
@@ -678,10 +678,8 @@ static int page_server_get_pages(int sk, struct page_server_iov *pi)
 	 */
 
 	if (pi->nr_pages == 0) {
-		/* no iovs found means we've hit a zero page */
 		pr_debug("no iovs found, zero pages\n");
-		pi->cmd = encode_ps_cmd(PS_IOV_ADD_F, 0);
-		return send_psi(sk, pi);
+		return -1;
 	}
 
 	pi->cmd = encode_ps_cmd(PS_IOV_ADD_F, PE_PRESENT);
-- 
2.1.4



More information about the CRIU mailing list