From: David Teigland Date: Tue, 29 Aug 2017 20:18:12 +0000 (-0500) Subject: lvmlockd: fix check for no running lock manager X-Git-Tag: v2_02_174~5 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=09c792c20667aa8d7fb2799e484d913a5eb8a147;p=lvm2.git lvmlockd: fix check for no running lock manager In some cases it was reporting there was no running lock manager when there is. --- diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index f9d07c151..a92114048 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -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"); } }