diff options
author | Sunil Mushran <sunil.mushran@oracle.com> | 2011-07-24 13:23:54 -0400 |
---|---|---|
committer | Sunil Mushran <sunil.mushran@oracle.com> | 2011-07-24 13:23:54 -0400 |
commit | 8decab3c8dadcdf4f54ffb30df6e6f67b398b6e0 (patch) | |
tree | c1221be95579ae14f55774d13d48d9d938152071 /fs/ocfs2/dlm/dlmlock.c | |
parent | 1dfecf810e0eacb35987905082f23e5c2cd26e91 (diff) |
ocfs2/dlm: Clean up messages in o2dlm
o2dlm messages needed a facelift.
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmlock.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmlock.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/fs/ocfs2/dlm/dlmlock.c b/fs/ocfs2/dlm/dlmlock.c index 8d39e0fd66f7..c7f3e22bda1e 100644 --- a/fs/ocfs2/dlm/dlmlock.c +++ b/fs/ocfs2/dlm/dlmlock.c | |||
@@ -319,27 +319,23 @@ static enum dlm_status dlm_send_remote_lock_request(struct dlm_ctxt *dlm, | |||
319 | tmpret = o2net_send_message(DLM_CREATE_LOCK_MSG, dlm->key, &create, | 319 | tmpret = o2net_send_message(DLM_CREATE_LOCK_MSG, dlm->key, &create, |
320 | sizeof(create), res->owner, &status); | 320 | sizeof(create), res->owner, &status); |
321 | if (tmpret >= 0) { | 321 | if (tmpret >= 0) { |
322 | // successfully sent and received | 322 | ret = status; |
323 | ret = status; // this is already a dlm_status | ||
324 | if (ret == DLM_REJECTED) { | 323 | if (ret == DLM_REJECTED) { |
325 | mlog(ML_ERROR, "%s:%.*s: BUG. this is a stale lockres " | 324 | mlog(ML_ERROR, "%s: res %.*s, Stale lockres no longer " |
326 | "no longer owned by %u. that node is coming back " | 325 | "owned by node %u. That node is coming back up " |
327 | "up currently.\n", dlm->name, create.namelen, | 326 | "currently.\n", dlm->name, create.namelen, |
328 | create.name, res->owner); | 327 | create.name, res->owner); |
329 | dlm_print_one_lock_resource(res); | 328 | dlm_print_one_lock_resource(res); |
330 | BUG(); | 329 | BUG(); |
331 | } | 330 | } |
332 | } else { | 331 | } else { |
333 | mlog(ML_ERROR, "Error %d when sending message %u (key 0x%x) to " | 332 | mlog(ML_ERROR, "%s: res %.*s, Error %d send CREATE LOCK to " |
334 | "node %u\n", tmpret, DLM_CREATE_LOCK_MSG, dlm->key, | 333 | "node %u\n", dlm->name, create.namelen, create.name, |
335 | res->owner); | 334 | tmpret, res->owner); |
336 | if (dlm_is_host_down(tmpret)) { | 335 | if (dlm_is_host_down(tmpret)) |
337 | ret = DLM_RECOVERING; | 336 | ret = DLM_RECOVERING; |
338 | mlog(0, "node %u died so returning DLM_RECOVERING " | 337 | else |
339 | "from lock message!\n", res->owner); | ||
340 | } else { | ||
341 | ret = dlm_err_to_dlm_status(tmpret); | 338 | ret = dlm_err_to_dlm_status(tmpret); |
342 | } | ||
343 | } | 339 | } |
344 | 340 | ||
345 | return ret; | 341 | return ret; |