2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 14:25: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

7
mem.c
View File

@@ -10,6 +10,7 @@
#include "page-pipe.h"
#include "page-xfer.h"
#include "log.h"
#include "kerndat.h"
#include "protobuf.h"
#include "protobuf/pagemap.pb-c.h"
@@ -62,6 +63,12 @@ static struct mem_snap_ctx *mem_snap_init(struct parasite_ctl *ctl)
if (!opts.mem_snapshot)
return NULL;
if (!kerndat_has_dirty_track) {
pr_err("Kernel doesn't support dirty tracking. "
"No snapshot available.\n");
return ERR_PTR(-1);
}
p_fd = get_service_fd(PARENT_FD_OFF);
if (p_fd < 0) {
pr_debug("Will do full memory dump\n");