[1/2] pre-dump: don't allow --lazy-pages option

Submitted by Mike Rapoport on Dec. 10, 2018, 3:44 p.m.

Details

Message ID 1544456651-20935-2-git-send-email-rppt@linux.ibm.com
State Accepted
Series "fix faiulures of lazy-migration Jenkins job"
Headers show

Commit Message

Mike Rapoport Dec. 10, 2018, 3:44 p.m.
Using --lazy-pages with pre-dump causes partial memory dump and it's not
the intention. The whole point of pre-dump is to keep amount of memory that
would be dumped during tasks freeze to minimum.

Disallow running pre-dump with --lazy-pages.

Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
---
 criu/crtools.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/criu/crtools.c b/criu/crtools.c
index 64d298d..c8b9ab1 100644
--- a/criu/crtools.c
+++ b/criu/crtools.c
@@ -239,6 +239,11 @@  int main(int argc, char *argv[], char *envp[])
 		if (!opts.tree_id)
 			goto opt_pid_missing;
 
+		if (opts.lazy_pages) {
+			pr_err("Cannot pre-dump with --lazy-pages\n");
+			return 1;
+		}
+
 		return cr_pre_dump_tasks(opts.tree_id) != 0;
 	}