[CRIU] [PATCH] page-read: don't check that an image file contains data

Andrey Vagin avagin at openvz.org
Thu Dec 26 09:44:21 PST 2013


Here are two reasons:
* Image files can be moved. tar and rsync can replace zero chunks on
holes.
* maps04 fails sometimes.
Restore log:
/var/lib/jenkins/jobs/CRIU/workspace/test/dump/maps04/9871/1/restore.log
--------------------------------- grep Error
---------------------------------
(07.738266)      4: Error (page-read.c:145): Can't read page because of
hole /1a143000: No such file or directory
(07.799325)      1: Error (cr-restore.c:1065): 4 exited, status=1
(07.799465) Error (cr-restore.c:1600): Restoring FAILED.

I tried to execute "criu restore" again and it completed successfully.
so image files were valid.

Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 page-read.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/page-read.c b/page-read.c
index 2afacf3..739b51c 100644
--- a/page-read.c
+++ b/page-read.c
@@ -141,10 +141,6 @@ static int read_pagemap_page(struct page_read *pr, unsigned long vaddr, void *bu
 		off_t current_vaddr = lseek(pr->fd_pg, 0, SEEK_CUR);
 		pr_debug("\tpr%u Read page %lx from self %lx/%"PRIx64"\n", pr->id,
 				vaddr, pr->cvaddr, current_vaddr);
-		if (current_vaddr != lseek(pr->fd_pg, current_vaddr, SEEK_DATA)) {
-			pr_perror("Can't read page because of hole /%"PRIx64, current_vaddr);
-			return -1;
-		}
 		ret = read(pr->fd_pg, buf, PAGE_SIZE);
 		if (ret != PAGE_SIZE) {
 			pr_perror("Can't read mapping page %d", ret);
-- 
1.8.3.1



More information about the CRIU mailing list