Skip to content

Commit df3256f

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/teigland/dlm: dlm: make plock operation killable dlm: remove shared message stub for recovery dlm: delayed reply message warning dlm: Remove superfluous call to recalc_sigpending()
2 parents b0ca118 + 901025d commit df3256f

9 files changed

Lines changed: 223 additions & 51 deletions

File tree

‎fs/dlm/config.c‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ struct dlm_cluster {
100100
unsigned int cl_log_debug;
101101
unsigned int cl_protocol;
102102
unsigned int cl_timewarn_cs;
103+
unsigned int cl_waitwarn_us;
103104
};
104105

105106
enum {
@@ -114,6 +115,7 @@ enum {
114115
CLUSTER_ATTR_LOG_DEBUG,
115116
CLUSTER_ATTR_PROTOCOL,
116117
CLUSTER_ATTR_TIMEWARN_CS,
118+
CLUSTER_ATTR_WAITWARN_US,
117119
};
118120

119121
struct cluster_attribute {
@@ -166,6 +168,7 @@ CLUSTER_ATTR(scan_secs, 1);
166168
CLUSTER_ATTR(log_debug, 0);
167169
CLUSTER_ATTR(protocol, 0);
168170
CLUSTER_ATTR(timewarn_cs, 1);
171+
CLUSTER_ATTR(waitwarn_us, 0);
169172

170173
static struct configfs_attribute *cluster_attrs[] = {
171174
[CLUSTER_ATTR_TCP_PORT] = &cluster_attr_tcp_port.attr,
@@ -179,6 +182,7 @@ static struct configfs_attribute *cluster_attrs[] = {
179182
[CLUSTER_ATTR_LOG_DEBUG] = &cluster_attr_log_debug.attr,
180183
[CLUSTER_ATTR_PROTOCOL] = &cluster_attr_protocol.attr,
181184
[CLUSTER_ATTR_TIMEWARN_CS] = &cluster_attr_timewarn_cs.attr,
185+
[CLUSTER_ATTR_WAITWARN_US] = &cluster_attr_waitwarn_us.attr,
182186
NULL,
183187
};
184188

@@ -439,6 +443,7 @@ static struct config_group *make_cluster(struct config_group *g,
439443
cl->cl_log_debug = dlm_config.ci_log_debug;
440444
cl->cl_protocol = dlm_config.ci_protocol;
441445
cl->cl_timewarn_cs = dlm_config.ci_timewarn_cs;
446+
cl->cl_waitwarn_us = dlm_config.ci_waitwarn_us;
442447

443448
space_list = &sps->ss_group;
444449
comm_list = &cms->cs_group;
@@ -986,6 +991,7 @@ int dlm_our_addr(struct sockaddr_storage *addr, int num)
986991
#define DEFAULT_LOG_DEBUG 0
987992
#define DEFAULT_PROTOCOL 0
988993
#define DEFAULT_TIMEWARN_CS 500 /* 5 sec = 500 centiseconds */
994+
#define DEFAULT_WAITWARN_US 0
989995

990996
struct dlm_config_info dlm_config = {
991997
.ci_tcp_port = DEFAULT_TCP_PORT,
@@ -998,6 +1004,7 @@ struct dlm_config_info dlm_config = {
9981004
.ci_scan_secs = DEFAULT_SCAN_SECS,
9991005
.ci_log_debug = DEFAULT_LOG_DEBUG,
10001006
.ci_protocol = DEFAULT_PROTOCOL,
1001-
.ci_timewarn_cs = DEFAULT_TIMEWARN_CS
1007+
.ci_timewarn_cs = DEFAULT_TIMEWARN_CS,
1008+
.ci_waitwarn_us = DEFAULT_WAITWARN_US
10021009
};
10031010

‎fs/dlm/config.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ struct dlm_config_info {
2828
int ci_log_debug;
2929
int ci_protocol;
3030
int ci_timewarn_cs;
31+
int ci_waitwarn_us;
3132
};
3233

3334
extern struct dlm_config_info dlm_config;

‎fs/dlm/dlm_internal.h‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ struct dlm_args {
209209
#define DLM_IFL_WATCH_TIMEWARN 0x00400000
210210
#define DLM_IFL_TIMEOUT_CANCEL 0x00800000
211211
#define DLM_IFL_DEADLOCK_CANCEL 0x01000000
212+
#define DLM_IFL_STUB_MS 0x02000000 /* magic number for m_flags */
212213
#define DLM_IFL_USER 0x00000001
213214
#define DLM_IFL_ORPHAN 0x00000002
214215

@@ -245,6 +246,7 @@ struct dlm_lkb {
245246

246247
int8_t lkb_wait_type; /* type of reply waiting for */
247248
int8_t lkb_wait_count;
249+
int lkb_wait_nodeid; /* for debugging */
248250

249251
struct list_head lkb_idtbl_list; /* lockspace lkbtbl */
250252
struct list_head lkb_statequeue; /* rsb g/c/w list */
@@ -254,6 +256,7 @@ struct dlm_lkb {
254256
struct list_head lkb_ownqueue; /* list of locks for a process */
255257
struct list_head lkb_time_list;
256258
ktime_t lkb_timestamp;
259+
ktime_t lkb_wait_time;
257260
unsigned long lkb_timeout_cs;
258261

259262
struct dlm_callback lkb_callbacks[DLM_CALLBACKS_SIZE];

0 commit comments

Comments
 (0)