mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
lazy-pages: fix lazy dump
The introduction of page-server send mode have broken the lazy dump because instead of using existing pstree, the page server now tries to recreate the pstree from the images. Adding lazy_dump parameter to cr_page_server resolves this issue. travis-ci: success for lazy-pages: fix lazy dump Signed-off-by: Mike Rapoport <rppt@linux.vnet.ibm.com> Acked-by: Adrian Reber <areber@redhat.com> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Andrei Vagin
parent
6f82f87a44
commit
d1051de021
@@ -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);
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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);
|
||||
|
@@ -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.
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user