[01/13] page-read: Don't try to dedup from img cache/proxy

Submitted by Pavel Emelianov on July 6, 2017, 9:38 a.m.

Details

Message ID 035e2ac8-af00-fbce-a754-9fb49aaa323c@virtuozzo.com
State Accepted
Series "A set of cleanups for pagemaps/xfers/reads before master merge (resend)"
Headers show

Commit Message

Pavel Emelianov July 6, 2017, 9:38 a.m.
It's simply impossible (yet), so emit a warning.

Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
---
 criu/pagemap.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/pagemap.c b/criu/pagemap.c
index 130e511..4a0f142 100644
--- a/criu/pagemap.c
+++ b/criu/pagemap.c
@@ -433,11 +433,8 @@  static int maybe_read_page_img_cache(struct page_read *pr, unsigned long vaddr,
 			break;
 	}
 
-	if (opts.auto_dedup) {
-		ret = punch_hole(pr, pr->pi_off, len, false);
-		if (ret == -1)
-			return -1;
-	}
+	if (opts.auto_dedup)
+		pr_warn_once("Can't dedup from image cache\n");
 
 	if (ret == 0 && pr->io_complete)
 		ret = pr->io_complete(pr, vaddr, nr);