[CRIU] [PATCH 07/17] action scripts: set spfs environment in run_scripts

Stanislav Kinsburskiy skinsbursky at virtuozzo.com
Wed May 18 09:28:21 PDT 2016


This environment is required to switch spfs mount points into Stub mode, once
files reopen is completed.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky at virtuozzo.com>
---
 criu/action-scripts.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/criu/action-scripts.c b/criu/action-scripts.c
index 4c1173c..7afc191 100644
--- a/criu/action-scripts.c
+++ b/criu/action-scripts.c
@@ -11,6 +11,7 @@
 #include "cr-service.h"
 #include "action-scripts.h"
 #include "pstree.h"
+#include "spfs.h"
 
 static const char *action_names[ACT_MAX] = {
 	[ ACT_PRE_DUMP ]	= "pre-dump",
@@ -56,6 +57,9 @@ int run_scripts(enum script_actions act)
 		}
 	}
 
+	if (spfs_set_env())
+		return -1;
+
 	list_for_each_entry(script, &opts.scripts, node) {
 		if (script->path == SCRIPT_RPC_NOTIFY) {
 			pr_debug("\tRPC\n");



More information about the CRIU mailing list