diff options
author | Paul Mackerras <paulus@samba.org> | 2006-02-23 22:05:47 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-02-23 22:05:47 -0500 |
commit | a00428f5b149e36b8225b2a0812742a6dfb07b8c (patch) | |
tree | a78869cd67cf78a0eb091fb0ea5d397734bd6738 /fs/ocfs2/dlm/dlmconvert.c | |
parent | 774fee58c465ea1c7e9775e347ec307bcf2deeb3 (diff) | |
parent | fb5c594c2acc441f0d2d8f457484a0e0e9285db3 (diff) |
Merge ../powerpc-merge
Diffstat (limited to 'fs/ocfs2/dlm/dlmconvert.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmconvert.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index 6001b22a997d..f66e2d818ccd 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -392,6 +392,11 @@ static enum dlm_status dlm_send_remote_convert_request(struct dlm_ctxt *dlm, | |||
392 | } else { | 392 | } else { |
393 | mlog_errno(tmpret); | 393 | mlog_errno(tmpret); |
394 | if (dlm_is_host_down(tmpret)) { | 394 | if (dlm_is_host_down(tmpret)) { |
395 | /* instead of logging the same network error over | ||
396 | * and over, sleep here and wait for the heartbeat | ||
397 | * to notice the node is dead. times out after 5s. */ | ||
398 | dlm_wait_for_node_death(dlm, res->owner, | ||
399 | DLM_NODE_DEATH_WAIT_MAX); | ||
395 | ret = DLM_RECOVERING; | 400 | ret = DLM_RECOVERING; |
396 | mlog(0, "node %u died so returning DLM_RECOVERING " | 401 | mlog(0, "node %u died so returning DLM_RECOVERING " |
397 | "from convert message!\n", res->owner); | 402 | "from convert message!\n", res->owner); |
@@ -421,7 +426,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) | |||
421 | struct dlm_lockstatus *lksb; | 426 | struct dlm_lockstatus *lksb; |
422 | enum dlm_status status = DLM_NORMAL; | 427 | enum dlm_status status = DLM_NORMAL; |
423 | u32 flags; | 428 | u32 flags; |
424 | int call_ast = 0, kick_thread = 0; | 429 | int call_ast = 0, kick_thread = 0, ast_reserved = 0; |
425 | 430 | ||
426 | if (!dlm_grab(dlm)) { | 431 | if (!dlm_grab(dlm)) { |
427 | dlm_error(DLM_REJECTED); | 432 | dlm_error(DLM_REJECTED); |
@@ -490,6 +495,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) | |||
490 | status = __dlm_lockres_state_to_status(res); | 495 | status = __dlm_lockres_state_to_status(res); |
491 | if (status == DLM_NORMAL) { | 496 | if (status == DLM_NORMAL) { |
492 | __dlm_lockres_reserve_ast(res); | 497 | __dlm_lockres_reserve_ast(res); |
498 | ast_reserved = 1; | ||
493 | res->state |= DLM_LOCK_RES_IN_PROGRESS; | 499 | res->state |= DLM_LOCK_RES_IN_PROGRESS; |
494 | status = __dlmconvert_master(dlm, res, lock, flags, | 500 | status = __dlmconvert_master(dlm, res, lock, flags, |
495 | cnv->requested_type, | 501 | cnv->requested_type, |
@@ -512,10 +518,10 @@ leave: | |||
512 | else | 518 | else |
513 | dlm_lock_put(lock); | 519 | dlm_lock_put(lock); |
514 | 520 | ||
515 | /* either queue the ast or release it */ | 521 | /* either queue the ast or release it, if reserved */ |
516 | if (call_ast) | 522 | if (call_ast) |
517 | dlm_queue_ast(dlm, lock); | 523 | dlm_queue_ast(dlm, lock); |
518 | else | 524 | else if (ast_reserved) |
519 | dlm_lockres_release_ast(dlm, res); | 525 | dlm_lockres_release_ast(dlm, res); |
520 | 526 | ||
521 | if (kick_thread) | 527 | if (kick_thread) |