diff options
author | tsutomu.owa@toshiba.co.jp <tsutomu.owa@toshiba.co.jp> | 2017-09-12 04:56:08 -0400 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2017-09-25 13:45:21 -0400 |
commit | 5966121241b10a32396d770a0b39a41441511a8c (patch) | |
tree | bb12be3b34d337e4a215907df405c1119893438b /fs/dlm/rcom.c | |
parent | c7355827b27c550824bbcc1f0586cf993bf83d94 (diff) |
DLM: retry rcom when dlm_wait_function is timed out.
If a node sends a DLM_RCOM_STATUS command and an error occurs on the
receiving side, the DLM_RCOM_STATUS_REPLY response may not be returned.
We retransmitted the DLM_RCOM_STATUS command so that we do not wait for
an infinite response.
Signed-off-by: Tadashi Miyauchi <miyauchi@toshiba-tops.co.jp>
Signed-off-by: Tsutomu Owa <tsutomu.owa@toshiba.co.jp>
Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/rcom.c')
-rw-r--r-- | fs/dlm/rcom.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/dlm/rcom.c b/fs/dlm/rcom.c index f3f5e72a29ba..4ff061de927e 100644 --- a/fs/dlm/rcom.c +++ b/fs/dlm/rcom.c | |||
@@ -155,6 +155,7 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid, uint32_t status_flags) | |||
155 | goto out; | 155 | goto out; |
156 | } | 156 | } |
157 | 157 | ||
158 | retry: | ||
158 | error = create_rcom(ls, nodeid, DLM_RCOM_STATUS, | 159 | error = create_rcom(ls, nodeid, DLM_RCOM_STATUS, |
159 | sizeof(struct rcom_status), &rc, &mh); | 160 | sizeof(struct rcom_status), &rc, &mh); |
160 | if (error) | 161 | if (error) |
@@ -169,6 +170,8 @@ int dlm_rcom_status(struct dlm_ls *ls, int nodeid, uint32_t status_flags) | |||
169 | 170 | ||
170 | error = dlm_wait_function(ls, &rcom_response); | 171 | error = dlm_wait_function(ls, &rcom_response); |
171 | disallow_sync_reply(ls); | 172 | disallow_sync_reply(ls); |
173 | if (error == -ETIMEDOUT) | ||
174 | goto retry; | ||
172 | if (error) | 175 | if (error) |
173 | goto out; | 176 | goto out; |
174 | 177 | ||
@@ -276,6 +279,7 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len) | |||
276 | 279 | ||
277 | ls->ls_recover_nodeid = nodeid; | 280 | ls->ls_recover_nodeid = nodeid; |
278 | 281 | ||
282 | retry: | ||
279 | error = create_rcom(ls, nodeid, DLM_RCOM_NAMES, last_len, &rc, &mh); | 283 | error = create_rcom(ls, nodeid, DLM_RCOM_NAMES, last_len, &rc, &mh); |
280 | if (error) | 284 | if (error) |
281 | goto out; | 285 | goto out; |
@@ -288,6 +292,8 @@ int dlm_rcom_names(struct dlm_ls *ls, int nodeid, char *last_name, int last_len) | |||
288 | 292 | ||
289 | error = dlm_wait_function(ls, &rcom_response); | 293 | error = dlm_wait_function(ls, &rcom_response); |
290 | disallow_sync_reply(ls); | 294 | disallow_sync_reply(ls); |
295 | if (error == -ETIMEDOUT) | ||
296 | goto retry; | ||
291 | out: | 297 | out: |
292 | return error; | 298 | return error; |
293 | } | 299 | } |