diff options
author | Kurt Hackel <kurt.hackel@oracle.com> | 2007-01-17 18:11:36 -0500 |
---|---|---|
committer | Mark Fasheh <mark.fasheh@oracle.com> | 2007-02-07 15:06:24 -0500 |
commit | 74aa25856c693d20a886cdb31a004aaca411d135 (patch) | |
tree | ea833f164771279a3141668e537e316c21027387 /fs/ocfs2/dlm/dlmconvert.c | |
parent | 90aaaf1c235a70daee04e897e9501415b766de69 (diff) |
ocfs2_dlm: Cookies in locks not being printed correctly in error messages
The dlm encodes the node number and a sequence number in the lock cookie.
It also stores the cookie in the lockres in the big endian format to avoid
swapping 8 bytes on each lock request. The bug here was that it was assuming
the cookie to be in the cpu format when decoding it for printing the error
message. This patch swaps the bytes before the print.
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
Diffstat (limited to 'fs/ocfs2/dlm/dlmconvert.c')
-rw-r--r-- | fs/ocfs2/dlm/dlmconvert.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index 370f23c385f1..59fb63da8b65 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -286,8 +286,8 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, | |||
286 | __dlm_print_one_lock_resource(res); | 286 | __dlm_print_one_lock_resource(res); |
287 | mlog(ML_ERROR, "converting a remote lock that is already " | 287 | mlog(ML_ERROR, "converting a remote lock that is already " |
288 | "converting! (cookie=%u:%llu, conv=%d)\n", | 288 | "converting! (cookie=%u:%llu, conv=%d)\n", |
289 | dlm_get_lock_cookie_node(lock->ml.cookie), | 289 | dlm_get_lock_cookie_node(be64_to_cpu(lock->ml.cookie)), |
290 | dlm_get_lock_cookie_seq(lock->ml.cookie), | 290 | dlm_get_lock_cookie_seq(be64_to_cpu(lock->ml.cookie)), |
291 | lock->ml.convert_type); | 291 | lock->ml.convert_type); |
292 | status = DLM_DENIED; | 292 | status = DLM_DENIED; |
293 | goto bail; | 293 | goto bail; |
@@ -484,8 +484,8 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) | |||
484 | status = DLM_IVLOCKID; | 484 | status = DLM_IVLOCKID; |
485 | mlog(ML_ERROR, "did not find lock to convert on grant queue! " | 485 | mlog(ML_ERROR, "did not find lock to convert on grant queue! " |
486 | "cookie=%u:%llu\n", | 486 | "cookie=%u:%llu\n", |
487 | dlm_get_lock_cookie_node(cnv->cookie), | 487 | dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)), |
488 | dlm_get_lock_cookie_seq(cnv->cookie)); | 488 | dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie))); |
489 | __dlm_print_one_lock_resource(res); | 489 | __dlm_print_one_lock_resource(res); |
490 | goto leave; | 490 | goto leave; |
491 | } | 491 | } |