aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorKurt Hackel <kurt.hackel@oracle.com>2006-05-01 14:46:59 -0400
committerMark Fasheh <mark.fasheh@oracle.com>2006-06-26 17:43:02 -0400
commite4eb03681a8313168d99c2f93175331a898a2c16 (patch)
tree37d2f18b8a60f672a84330725c32bcdd2f768b49 /fs/ocfs2
parentccd8b1f916bc5e4b2156f03ccd3546be7f65f6b3 (diff)
ocfs2: gracefully handle stale create_lock messages.
This is an error on the sending side, so gracefully error out on the receiving end. Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com> Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/dlm/dlmlock.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c
index 55cda25ae11b..57576208b79c 100644
--- a/fs/ocfs2/dlm/dlmlock.c
+++ b/fs/ocfs2/dlm/dlmlock.c
@@ -280,6 +280,14 @@ static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm,
280 if (tmpret >= 0) { 280 if (tmpret >= 0) {
281 // successfully sent and received 281 // successfully sent and received
282 ret = status; // this is already a dlm_status 282 ret = status; // this is already a dlm_status
283 if (ret == DLM_RECOVERING) {
284 mlog(ML_ERROR, "%s:%.*s: BUG. this is a stale lockres "
285 "no longer owned by %u. that node is coming back "
286 "up currently.\n", dlm->name, create.namelen,
287 create.name, res->owner);
288 dlm_print_one_lock_resource(res);
289 BUG();
290 }
283 } else { 291 } else {
284 mlog_errno(tmpret); 292 mlog_errno(tmpret);
285 if (dlm_is_host_down(tmpret)) { 293 if (dlm_is_host_down(tmpret)) {
@@ -428,11 +436,16 @@ int dlm_create_lock_handler(struct o2net_msg *msg, u32 len, void *data)
428 if (!dlm_grab(dlm)) 436 if (!dlm_grab(dlm))
429 return DLM_REJECTED; 437 return DLM_REJECTED;
430 438
431 mlog_bug_on_msg(!dlm_domain_fully_joined(dlm),
432 "Domain %s not fully joined!\n", dlm->name);
433
434 name = create->name; 439 name = create->name;
435 namelen = create->namelen; 440 namelen = create->namelen;
441 status = DLM_RECOVERING;
442 if (!dlm_domain_fully_joined(dlm)) {
443 mlog(ML_ERROR, "Domain %s not fully joined, but node %u is "
444 "sending a create_lock message for lock %.*s!\n",
445 dlm->name, create->node_idx, namelen, name);
446 dlm_error(status);
447 goto leave;
448 }
436 449
437 status = DLM_IVBUFLEN; 450 status = DLM_IVBUFLEN;
438 if (namelen > DLM_LOCKID_NAME_MAX) { 451 if (namelen > DLM_LOCKID_NAME_MAX) {