From 0e9d0a6563f4acef5a27eade8eb29c7e6748c8d2 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Jun 26 2020 17:25:05 +0000 Subject: dlm_controld: add support for waitplock_recovery switch This patch adds support to set the cluster attribute waitplock_recovery via enable_waitplock_recover arg or config file attribute. --- diff --git a/dlm_controld/action.c b/dlm_controld/action.c index 126e3b6..6304022 100644 --- a/dlm_controld/action.c +++ b/dlm_controld/action.c @@ -876,6 +876,11 @@ int setup_configfs_options(void) dlm_options[timewarn_ind].file_set) set_configfs_cluster("timewarn_cs", NULL, opt(timewarn_ind)); + if (dlm_options[enable_waitplock_recovery_ind].cli_set || + dlm_options[enable_waitplock_recovery_ind].file_set) + set_configfs_cluster("waitplock_recovery", NULL, + opt(enable_waitplock_recovery_ind)); + set_configfs_cluster("mark", NULL, optu(mark_ind)); proto_name = opts(protocol_ind); diff --git a/dlm_controld/dlm.conf.5 b/dlm_controld/dlm.conf.5 index 1ce0c64..e92dfc8 100644 --- a/dlm_controld/dlm.conf.5 +++ b/dlm_controld/dlm.conf.5 @@ -46,6 +46,8 @@ debug_logfile .br enable_plock .br +enable_waitplock_recovery +.br plock_debug .br plock_rate_limit diff --git a/dlm_controld/dlm_daemon.h b/dlm_controld/dlm_daemon.h index 9e7a5fb..979aab7 100644 --- a/dlm_controld/dlm_daemon.h +++ b/dlm_controld/dlm_daemon.h @@ -102,6 +102,7 @@ enum { mark_ind, enable_fscontrol_ind, enable_plock_ind, + enable_waitplock_recovery_ind, plock_debug_ind, plock_rate_limit_ind, plock_ownership_ind, diff --git a/dlm_controld/main.c b/dlm_controld/main.c index b330f88..3ec318c 100644 --- a/dlm_controld/main.c +++ b/dlm_controld/main.c @@ -1752,6 +1752,11 @@ static void set_opt_defaults(void) 1, NULL, "enable/disable posix lock support for cluster fs"); + set_opt_default(enable_waitplock_recovery_ind, + "enable_waitplock_recovery", '\0', req_arg_bool, + 1, NULL, + "enable/disable posix lock to wait for dlm recovery after lock acquire"); + set_opt_default(plock_debug_ind, "plock_debug", 'P', no_arg, 0, NULL,