2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25:49 +00:00

page-read: Don't check that an image file contains data

Modern tar and rsync can replace zero chunks with holes. So it's valid situation
and shouldn't abort the restore.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2013-12-26 22:49:37 +04:00
committed by Pavel Emelyanov
parent 0758b4c216
commit 73b689f81b

View File

@@ -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);