[Ocfs2-tools-devel] [PATCH 1/4] o2cb: unable to start o2cb service on 2.6.18-xxx kernel.
Junxiao Bi
junxiao.bi at oracle.com
Fri Oct 21 00:42:17 PDT 2016
From: Tariq Saeed <tariq.x.saeed at oracle.com>
commit 4483004b5723("Auto setup o2cb stack as default if no stack is setup")
refactored the code and this bug was introduce. It does not realize that on
2.6.18-xxx kernel, there is no /sys/fs/ocfs2/cluster-stack synthetic file.
Fix is to realize that after loading modules, if the above file does not exist,
then use the classic stack as before. Since ocfs2_stack_o2cb don't exist
on 2.6.18-xxx, use the modprob quite option to to suppress printing
"FATAL: Module ocfs2_stack_o2cb not found."
Signed-off-by: Tariq Saeed <tariq.x.saeed at oracle.com>
Reviewed-by: Junxiao Bi <junxiao.bi at oracle.com>
---
libo2cb/o2cb_abi.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
index b72a266c60d6..6609aa46e092 100644
--- a/libo2cb/o2cb_abi.c
+++ b/libo2cb/o2cb_abi.c
@@ -204,6 +204,9 @@ redo:
o2cb_setup_stack(OCFS2_CLASSIC_CLUSTER_STACK);
setup_performed = 1;
goto redo;
+ } else {
+ current_stack = &classic_stack;
+ err = 0;
}
}
@@ -2615,11 +2618,12 @@ static int perform_modprobe(char *module_name)
pid_t child;
int child_status;
- char *argv[3];
+ char *argv[4];
argv[0] = MODPROBE_COMMAND;
argv[1] = module_name;
- argv[2] = NULL;
+ argv[2] = "-q";
+ argv[3] = NULL;
child = fork();
if (child == 0) {
@@ -2678,7 +2682,7 @@ redo:
else if (!strncmp(stack_name, classic_stack.s_name,
OCFS2_STACK_LABEL_LEN))
perform_modprobe(O2CB_KERNEL_MODULE);
-
+ modprobe_performed = 1;
write_single_line_file(CLUSTER_STACK_FILE, stack_name,
OCFS2_STACK_LABEL_LEN);
write_performed = 1;
--
1.7.9.5
More information about the Ocfs2-tools-devel
mailing list