[CRIU] [PATCH 3/2] options: Define DEFAULT_GHOST_LIMIT
Cyrill Gorcunov
gorcunov at gmail.com
Mon Aug 10 05:39:15 PDT 2015
On Mon, Aug 10, 2015 at 03:25:40PM +0300, Cyrill Gorcunov wrote:
> On Mon, Aug 10, 2015 at 03:13:01PM +0300, Pavel Emelyanov wrote:
> >
On top of the series.
-------------- next part --------------
>From cbe9e251997610e72c0d93f49799fda8f1bc734d Mon Sep 17 00:00:00 2001
From: Cyrill Gorcunov <gorcunov at openvz.org>
Date: Mon, 10 Aug 2015 15:37:56 +0300
Subject: [PATCH] options: Define DEFAULT_GHOST_LIMIT
Instead of opencoded number.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
crtools.c | 2 +-
include/cr_options.h | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/crtools.c b/crtools.c
index 996eb3b3ce5c..69883602bb97 100644
--- a/crtools.c
+++ b/crtools.c
@@ -60,7 +60,7 @@ void init_opts(void)
opts.cpu_cap = CPU_CAP_DEFAULT;
opts.manage_cgroups = CG_MODE_DEFAULT;
opts.ps_socket = -1;
- opts.ghost_limit = (1 * 1024 * 1024);
+ opts.ghost_limit = DEFAULT_GHOST_LIMIT;
}
static int parse_ns_string(const char *ptr)
diff --git a/include/cr_options.h b/include/cr_options.h
index 74aa0103ddec..6fb7a5bdb1d7 100644
--- a/include/cr_options.h
+++ b/include/cr_options.h
@@ -33,6 +33,11 @@ struct cg_root_opt {
#define CG_MODE_DEFAULT (CG_MODE_SOFT)
+/*
+ * Ghost file size we allow to carry by default.
+ */
+#define DEFAULT_GHOST_LIMIT (1 << 20)
+
struct cr_options {
int final_state;
char *show_dump_file;
--
2.4.3
More information about the CRIU
mailing list