2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-05 08:45:49 +00:00

soft-dirty: Check that kernel reports soft-dirty bits

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-04-15 13:24:32 +04:00
parent 5b343b40eb
commit 199dba2361
4 changed files with 72 additions and 0 deletions

View File

@@ -25,6 +25,7 @@
#include "mount.h"
#include "tty.h"
#include "ptrace.h"
#include "kerndat.h"
static int check_tty(void)
{
@@ -486,6 +487,16 @@ int check_ptrace_peeksiginfo()
return ret;
}
static int check_mem_dirty_track(void)
{
if (kerndat_get_dirty_track() < 0)
return -1;
if (!kerndat_has_dirty_track)
pr_info("Dirty tracking is OFF. Memory snapshot will not work.\n");
return 0;
}
int cr_check(void)
{
int ret = 0;
@@ -513,6 +524,7 @@ int cr_check(void)
ret |= check_ipc();
ret |= check_sigqueuinfo();
ret |= check_ptrace_peeksiginfo();
ret |= check_mem_dirty_track();
if (!ret)
pr_msg("Looks good.\n");