master - lvmlockd: fix check for no running lock manager
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=09c792c20667aa8d7fb2799e484d913a5eb8a147 Commit: 09c792c20667aa8d7fb2799e484d913a5eb8a147 Parent: f847fcd31a41f61dd81b30ac91f3e2720088b8f2 Author: David Teigland <[email protected]> AuthorDate: Tue Aug 29 15:18:12 2017 -0500 Committer: David Teigland <[email protected]> CommitterDate: Tue Aug 29 15:18:12 2017 -0500
lvmlockd: fix check for no running lock manager
In some cases it was reporting there was no running lock manager when there is.
--- daemons/lvmlockd/lvmlockd-core.c | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-)
daemons/lvmlockd/lvmlockd-core.c +11 -1
@@ -3676,7 +3676,17 @@ static int client_send_result(struct client *cl, struct action *act)if (!gl_lsname_dlm[0 ])strcat (result_flags,"NO_GL_LS," ); }else { -strcat (result_flags,"NO_GL_LS,NO_LM" ); +int found_lm =0 ; + +if (lm_support_dlm () &&lm_is_running_dlm ()) + found_lm++; +if (lm_support_sanlock () &&lm_is_running_sanlock ()) + found_lm++; + +if (!found_lm) +strcat (result_flags,"NO_GL_LS,NO_LM" ); +else +strcat (result_flags,"NO_GL_LS" ); } }