mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +00:00
kdat: Merge dump and restore kerndats
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com> Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
This commit is contained in:
parent
a840995689
commit
e4d14b65d7
@ -2167,7 +2167,7 @@ int cr_restore_tasks(void)
|
||||
if (init_stats(RESTORE_STATS))
|
||||
goto err;
|
||||
|
||||
if (kerndat_init_rst())
|
||||
if (kerndat_init())
|
||||
goto err;
|
||||
|
||||
timing_start(TIME_RESTORE);
|
||||
|
@ -11,7 +11,6 @@ struct stat;
|
||||
*/
|
||||
|
||||
extern int kerndat_init(void);
|
||||
extern int kerndat_init_rst(void);
|
||||
extern int kerndat_get_dirty_track(void);
|
||||
extern int kerndat_fdinfo_has_lock(void);
|
||||
extern int kerndat_loginuid(void);
|
||||
|
@ -589,40 +589,8 @@ int kerndat_init(void)
|
||||
ret = kerndat_tcp_repair();
|
||||
if (!ret)
|
||||
ret = kerndat_compat_restore();
|
||||
|
||||
kerndat_lsm();
|
||||
kerndat_mmap_min_addr();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int kerndat_init_rst(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* Read TCP sysctls before anything else,
|
||||
* since the limits we're interested in are
|
||||
* not available inside namespaces.
|
||||
*/
|
||||
|
||||
ret = check_pagemap();
|
||||
if (!ret)
|
||||
ret = get_last_cap();
|
||||
if (!ret)
|
||||
ret = kerndat_has_memfd_create();
|
||||
if (!ret)
|
||||
ret = get_task_size();
|
||||
if (!ret)
|
||||
ret = get_ipv6();
|
||||
if (!ret)
|
||||
ret = kerndat_loginuid();
|
||||
if (!ret)
|
||||
ret = kerndat_iptables_has_xtlocks();
|
||||
if (!ret)
|
||||
ret = kerndat_tcp_repair();
|
||||
if (!ret)
|
||||
ret = kerndat_compat_restore();
|
||||
|
||||
kerndat_lsm();
|
||||
kerndat_mmap_min_addr();
|
||||
|
@ -111,7 +111,7 @@ void kerndat_lsm(void)
|
||||
{
|
||||
/* On restore, if someone passes --lsm-profile, we might end up doing
|
||||
* detection twice, once during flag parsing and once for
|
||||
* kerndat_init_rst(). Let's detect when we've already done detection
|
||||
* kerndat_init(). Let's detect when we've already done detection
|
||||
* and not do it again.
|
||||
*/
|
||||
if (name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user