Skip to content

Commit 3b0e761

Browse files
Zhu Lingshanteigland
authored andcommitted
dlm: print log message when cluster name is not set
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>
1 parent 2ab93ae commit 3b0e761

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎fs/dlm/lockspace.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,10 @@ static int new_lockspace(const char *name, const char *cluster,
453453
*ops_result = 0;
454454
}
455455

456+
if (!cluster)
457+
log_print("dlm cluster name '%s' is being used without an application provided cluster name",
458+
dlm_config.ci_cluster_name);
459+
456460
if (dlm_config.ci_recover_callbacks && cluster &&
457461
strncmp(cluster, dlm_config.ci_cluster_name, DLM_LOCKSPACE_LEN)) {
458462
log_print("dlm cluster name '%s' does not match "

0 commit comments

Comments
 (0)