]> sourceware.org Git - lvm2.git/commitdiff
lvmlockd: fix check for no running lock manager
authorDavid Teigland <teigland@redhat.com>
Tue, 29 Aug 2017 20:18:12 +0000 (15:18 -0500)
committerDavid Teigland <teigland@redhat.com>
Tue, 29 Aug 2017 20:18:12 +0000 (15:18 -0500)
In some cases it was reporting there was no running
lock manager when there is.

daemons/lvmlockd/lvmlockd-core.c

index f9d07c151a9b6879a1f5905a65bc9d7b2a8c8205..a92114048d85f62ef8d9381e55833251aa006186 100644 (file)
@@ -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");
                }
        }
 
This page took 0.060128 seconds and 5 git commands to generate.