Hi, On Fri, Jun 17, 2022 at 4:00 PM Alexander Aring <[email protected]> wrote: > > This patch removes a feature in DLM to warn about if we don't get an > answer back if we send a DLM message out and we wait for a reply > message. There are in my opinion two reasons to add such warning, first > is to know there might be a communication error and a message drop due > communication errors. Second the other side dropped the message on stack > because some reason. > > However the first reason the midcomms layer will notify us if a message > was received otherwise midcomms debugfs can tell us if there are still > pending messages around. > > For the second reason we can check the other nodes debug messages to see > if there was a drop on application layer. However I think the initial > idea of this feature was to check for the first reason. > > This patch also removes the configfs entry waitwarn_us which is not > being set by official dlm user space software, we assume fail to setting > this configfs entry will not end in an critical error. > > Signed-off-by: Alexander Aring <[email protected]> > --- > fs/dlm/config.c | 7 ---- > fs/dlm/config.h | 1 - > fs/dlm/dlm_internal.h | 1 - > fs/dlm/lock.c | 80 ------------------------------------------- > fs/dlm/lockspace.c | 1 - > 5 files changed, 90 deletions(-) > > diff --git a/fs/dlm/config.c b/fs/dlm/config.c > index 42eee2783756..081fd201e3a8 100644 > --- a/fs/dlm/config.c > +++ b/fs/dlm/config.c > @@ -76,7 +76,6 @@ struct dlm_cluster { > unsigned int cl_protocol; > unsigned int cl_mark; > unsigned int cl_timewarn_cs; > - unsigned int cl_waitwarn_us; > unsigned int cl_new_rsb_count; > unsigned int cl_recover_callbacks; > char cl_cluster_name[DLM_LOCKSPACE_LEN]; > @@ -103,7 +102,6 @@ enum { > CLUSTER_ATTR_PROTOCOL, > CLUSTER_ATTR_MARK, > CLUSTER_ATTR_TIMEWARN_CS, > - CLUSTER_ATTR_WAITWARN_US, > CLUSTER_ATTR_NEW_RSB_COUNT, > CLUSTER_ATTR_RECOVER_CALLBACKS, > CLUSTER_ATTR_CLUSTER_NAME, > @@ -225,7 +223,6 @@ CLUSTER_ATTR(log_info, NULL); > CLUSTER_ATTR(protocol, dlm_check_protocol_and_dlm_running); > CLUSTER_ATTR(mark, NULL); > CLUSTER_ATTR(timewarn_cs, dlm_check_zero); > -CLUSTER_ATTR(waitwarn_us, NULL); > CLUSTER_ATTR(new_rsb_count, NULL); > CLUSTER_ATTR(recover_callbacks, NULL); > > @@ -241,7 +238,6 @@ static struct configfs_attribute *cluster_attrs[] = { > [CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol, > [CLUSTER_ATTR_MARK] = &cluster_attr_mark, > [CLUSTER_ATTR_TIMEWARN_CS] = &cluster_attr_timewarn_cs, > - [CLUSTER_ATTR_WAITWARN_US] = &cluster_attr_waitwarn_us, > [CLUSTER_ATTR_NEW_RSB_COUNT] = &cluster_attr_new_rsb_count, > [CLUSTER_ATTR_RECOVER_CALLBACKS] = &cluster_attr_recover_callbacks, > [CLUSTER_ATTR_CLUSTER_NAME] = &cluster_attr_cluster_name, > @@ -433,7 +429,6 @@ static struct config_group *make_cluster(struct > config_group *g, > cl->cl_log_info = dlm_config.ci_log_info; > cl->cl_protocol = dlm_config.ci_protocol; > cl->cl_timewarn_cs = dlm_config.ci_timewarn_cs; > - cl->cl_waitwarn_us = dlm_config.ci_waitwarn_us; > cl->cl_new_rsb_count = dlm_config.ci_new_rsb_count; > cl->cl_recover_callbacks = dlm_config.ci_recover_callbacks; > memcpy(cl->cl_cluster_name, dlm_config.ci_cluster_name, > @@ -955,7 +950,6 @@ int dlm_our_addr(struct sockaddr_storage *addr, int num) > #define DEFAULT_PROTOCOL DLM_PROTO_TCP > #define DEFAULT_MARK 0 > #define DEFAULT_TIMEWARN_CS 500 /* 5 sec = 500 centiseconds */ > -#define DEFAULT_WAITWARN_US 0 > #define DEFAULT_NEW_RSB_COUNT 128 > #define DEFAULT_RECOVER_CALLBACKS 0 > #define DEFAULT_CLUSTER_NAME "" > @@ -972,7 +966,6 @@ struct dlm_config_info dlm_config = { > .ci_protocol = DEFAULT_PROTOCOL, > .ci_mark = DEFAULT_MARK, > .ci_timewarn_cs = DEFAULT_TIMEWARN_CS, > - .ci_waitwarn_us = DEFAULT_WAITWARN_US, > .ci_new_rsb_count = DEFAULT_NEW_RSB_COUNT, > .ci_recover_callbacks = DEFAULT_RECOVER_CALLBACKS, > .ci_cluster_name = DEFAULT_CLUSTER_NAME > diff --git a/fs/dlm/config.h b/fs/dlm/config.h > index df92b0a07fc6..cb23d018e863 100644 > --- a/fs/dlm/config.h > +++ b/fs/dlm/config.h > @@ -38,7 +38,6 @@ struct dlm_config_info { > int ci_protocol; > int ci_mark; > int ci_timewarn_cs; > - int ci_waitwarn_us; > int ci_new_rsb_count; > int ci_recover_callbacks; > char ci_cluster_name[DLM_LOCKSPACE_LEN]; > diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h > index 151f98fc3f22..19136b7374a1 100644 > --- a/fs/dlm/dlm_internal.h > +++ b/fs/dlm/dlm_internal.h > @@ -258,7 +258,6 @@ struct dlm_lkb { > struct list_head lkb_ownqueue; /* list of locks for a > process */ > struct list_head lkb_time_list; > ktime_t lkb_timestamp; > - ktime_t lkb_wait_time; > unsigned long lkb_timeout_cs; > > struct mutex lkb_cb_mutex; > diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c > index e80d42ba64ae..080cd216a9a4 100644 > --- a/fs/dlm/lock.c > +++ b/fs/dlm/lock.c > @@ -1402,75 +1402,6 @@ static int msg_reply_type(int mstype) > return -1; > } > > -static int nodeid_warned(int nodeid, int num_nodes, int *warned) > -{ > - int i; > - > - for (i = 0; i < num_nodes; i++) { > - if (!warned[i]) { > - warned[i] = nodeid; > - return 0; > - } > - if (warned[i] == nodeid) > - return 1; > - } > - return 0; > -} > - > -void dlm_scan_waiters(struct dlm_ls *ls) > -{
there is probably a prototype which I need to remove as well... and I need to check the other patches... - Alex
