dlm: print log message when cluster name is not set
authorZhu Lingshan <lszhu@suse.com>
Tue, 11 Jul 2017 14:26:55 +0000 (09:26 -0500)
committerDavid Teigland <teigland@redhat.com>
Mon, 7 Aug 2017 16:23:09 +0000 (11:23 -0500)
Print a message when a cluster name is not specified by
the caller.  In this case the cluster name configured
for the dlm is used without any validation that it is
the cluster expected by the application.

Signed-off-by: Zhu Lingshan <lszhu@suse.com>
Signed-off-by: David Teigland <teigland@redhat.com>
fs/dlm/lockspace.c

index 323341661d082c26031c3a453fdd0f10d3a7d6d5..9ebfa05df9d2eff532b6b29ea37ad8636cc3f51f 100644 (file)
@@ -453,6 +453,10 @@ static int new_lockspace(const char *name, const char *cluster,
                        *ops_result = 0;
        }
 
+       if (!cluster)
+               log_print("dlm cluster name '%s' is being used without an application provided cluster name",
+                         dlm_config.ci_cluster_name);
+
        if (dlm_config.ci_recover_callbacks && cluster &&
            strncmp(cluster, dlm_config.ci_cluster_name, DLM_LOCKSPACE_LEN)) {
                log_print("dlm cluster name '%s' does not match "