[lxc-devel] [PATCH] c/r: enable tracefs

Tycho Andersen tycho.andersen at canonical.com
Fri Aug 14 16:24:47 UTC 2015


tracefs is a new filesystem that can be mounted by users. Only the options
and fs name need to be passed to restore the state, so we can use criu's
auto fs feature.

Signed-off-by: Tycho Andersen <tycho.andersen at canonical.com>
---
 src/lxc/criu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lxc/criu.c b/src/lxc/criu.c
index e939b37..bd6ecac 100644
--- a/src/lxc/criu.c
+++ b/src/lxc/criu.c
@@ -49,7 +49,7 @@ lxc_log_define(lxc_criu, lxc);
 void exec_criu(struct criu_opts *opts)
 {
 	char **argv, log[PATH_MAX];
-	int static_args = 20, argc = 0, i, ret;
+	int static_args = 22, argc = 0, i, ret;
 	int netnr = 0;
 	struct lxc_list *it;
 
@@ -60,7 +60,7 @@ void exec_criu(struct criu_opts *opts)
 	 * --manage-cgroups action-script foo.sh -D $(directory) \
 	 * -o $(directory)/$(action).log --ext-mount-map auto
 	 * --enable-external-sharing --enable-external-masters
-	 * --enable-fs hugetlbfs
+	 * --enable-fs hugetlbfs --enable-fs tracefs
 	 * +1 for final NULL */
 
 	if (strcmp(opts->action, "dump") == 0) {
@@ -122,6 +122,8 @@ void exec_criu(struct criu_opts *opts)
 	DECLARE_ARG("--enable-external-masters");
 	DECLARE_ARG("--enable-fs");
 	DECLARE_ARG("hugetlbfs");
+	DECLARE_ARG("--enable-fs");
+	DECLARE_ARG("tracefs");
 	DECLARE_ARG("-D");
 	DECLARE_ARG(opts->directory);
 	DECLARE_ARG("-o");
-- 
2.1.4



More information about the lxc-devel mailing list