mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-31 06:15:24 +00:00
mem: Move mem_pp from ctl to pstree_item's dmpi
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
@@ -1443,6 +1443,7 @@ static int cr_pre_dump_finish(int ret)
|
||||
pr_info("Pre-dumping tasks' memory\n");
|
||||
for_each_pstree_item(item) {
|
||||
struct parasite_ctl *ctl = dmpi(item)->parasite_ctl;
|
||||
struct page_pipe *mem_pp;
|
||||
struct page_xfer xfer;
|
||||
|
||||
if (!ctl)
|
||||
@@ -1454,7 +1455,8 @@ static int cr_pre_dump_finish(int ret)
|
||||
if (ret < 0)
|
||||
goto err;
|
||||
|
||||
ret = page_xfer_dump_pages(&xfer, ctl->mem_pp, 0);
|
||||
mem_pp = dmpi(item)->mem_pp;
|
||||
ret = page_xfer_dump_pages(&xfer, mem_pp, 0);
|
||||
|
||||
xfer.close(&xfer);
|
||||
|
||||
@@ -1463,7 +1465,7 @@ static int cr_pre_dump_finish(int ret)
|
||||
|
||||
timing_stop(TIME_MEMWRITE);
|
||||
|
||||
destroy_page_pipe(ctl->mem_pp);
|
||||
destroy_page_pipe(mem_pp);
|
||||
parasite_cure_local(ctl);
|
||||
}
|
||||
|
||||
|
@@ -52,8 +52,6 @@ struct parasite_ctl {
|
||||
void *addr_args; /* address for arguments */
|
||||
unsigned long args_size;
|
||||
int tsock; /* transport socket for transferring fds */
|
||||
|
||||
struct page_pipe *mem_pp;
|
||||
};
|
||||
|
||||
extern int parasite_dump_sigacts_seized(struct parasite_ctl *ctl, struct cr_imgset *cr_imgset);
|
||||
|
@@ -43,7 +43,7 @@ struct dmp_info {
|
||||
* threads. Dumping tasks with different creds is not supported.
|
||||
*/
|
||||
struct proc_status_creds *pi_creds;
|
||||
|
||||
struct page_pipe *mem_pp;
|
||||
struct parasite_ctl *parasite_ctl;
|
||||
};
|
||||
|
||||
|
@@ -389,7 +389,7 @@ out_pp:
|
||||
if (ret || !mdc->pre_dump)
|
||||
destroy_page_pipe(pp);
|
||||
else
|
||||
ctl->mem_pp = pp;
|
||||
dmpi(item)->mem_pp = pp;
|
||||
out:
|
||||
pmc_fini(&pmc);
|
||||
pr_info("----------------------------------------\n");
|
||||
|
Reference in New Issue
Block a user