diff --git a/criu/cr-dump.c b/criu/cr-dump.c index 01063af03..2a5595c97 100644 --- a/criu/cr-dump.c +++ b/criu/cr-dump.c @@ -1602,7 +1602,7 @@ static int cr_lazy_mem_dump(void) int ret = 0; pr_info("Starting lazy pages server\n"); - ret = cr_page_server(false, -1); + ret = cr_page_server(false, true, -1); for_each_pstree_item(item) { destroy_page_pipe(dmpi(item)->mem_pp); diff --git a/criu/cr-service.c b/criu/cr-service.c index c746e2575..81b0bc632 100644 --- a/criu/cr-service.c +++ b/criu/cr-service.c @@ -735,7 +735,7 @@ static int start_page_server_req(int sk, CriuOpts *req) pr_debug("Starting page server\n"); - pid = cr_page_server(true, start_pipe[1]); + pid = cr_page_server(true, false, start_pipe[1]); if (pid < 0) goto out_ch; diff --git a/criu/crtools.c b/criu/crtools.c index 06471f179..af1f0c588 100644 --- a/criu/crtools.c +++ b/criu/crtools.c @@ -744,7 +744,7 @@ int main(int argc, char *argv[], char *envp[]) return cr_check() != 0; if (!strcmp(argv[optind], "page-server")) - return cr_page_server(opts.daemon_mode, -1) != 0; + return cr_page_server(opts.daemon_mode, false, -1) != 0; if (!strcmp(argv[optind], "service")) return cr_service(opts.daemon_mode); diff --git a/criu/include/page-xfer.h b/criu/include/page-xfer.h index dfe43e5a1..1f59bdb03 100644 --- a/criu/include/page-xfer.h +++ b/criu/include/page-xfer.h @@ -2,7 +2,7 @@ #define __CR_PAGE_XFER__H__ #include "pagemap.h" -extern int cr_page_server(bool daemon_mode, int cfd); +extern int cr_page_server(bool daemon_mode, bool lazy_dump, int cfd); /* * page_xfer -- transfer pages into image file. diff --git a/criu/page-xfer.c b/criu/page-xfer.c index bfe99e43d..e282536f2 100644 --- a/criu/page-xfer.c +++ b/criu/page-xfer.c @@ -969,18 +969,17 @@ static int page_server_init_send(void) return 0; } -int cr_page_server(bool daemon_mode, int cfd) +int cr_page_server(bool daemon_mode, bool lazy_dump, int cfd) { int ask = -1; int sk = -1; int ret; - if (!opts.lazy_pages) { + if (!opts.lazy_pages) up_page_ids_base(); - } else { + else if (!lazy_dump) if (page_server_init_send()) return -1; - } if (opts.ps_socket != -1) { ret = 0;