[CRIU] [PATCH v4 07/17] action scripts: set spfs environment in run_scripts
Stanislav Kinsburskiy
skinsbursky at virtuozzo.com
Thu Jun 2 05:07:02 PDT 2016
02.06.2016 13:14, Pavel Emelyanov пишет:
> On 05/20/2016 02:37 PM, Stanislav Kinsburskiy wrote:
>> 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 | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/criu/action-scripts.c b/criu/action-scripts.c
>> index ee59210..500e239 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",
>> @@ -48,6 +49,7 @@ static int run_shell_scripts(const char *action)
>>
>> #define ENV_IMGDIR 0x1
>> #define ENV_ROOTPID 0x2
>> +#define ENV_SPFS 0x3
> Unused.
>
>>
>> if (setenv("CRTOOLS_SCRIPT_ACTION", action, 1)) {
>> pr_perror("Can't set CRTOOLS_SCRIPT_ACTION=%s", action);
>> @@ -78,6 +80,11 @@ static int run_shell_scripts(const char *action)
>> }
>> }
>>
>> + if (!(env_set & ENV_IMGDIR)) {
> This if is already there, just expand the branch with more code if needed.
>
It's a typo. Will fix.
>> + if (spfs_set_env())
>> + return -1;
>> + }
>> +
>> list_for_each_entry(script, &scripts, node) {
>> pr_debug("\t[%s]\n", script->path);
>> ret |= system(script->path);
>>
>> _______________________________________________
>> CRIU mailing list
>> CRIU at openvz.org
>> https://lists.openvz.org/mailman/listinfo/criu
>> .
>>
More information about the CRIU
mailing list