diff options
| author | Kurt Hackel <kurt.hackel@oracle.com> | 2006-03-02 19:43:36 -0500 |
|---|---|---|
| committer | Mark Fasheh <mark.fasheh@oracle.com> | 2006-03-24 17:58:27 -0500 |
| commit | 29004858a76ba9e26393dd8a85e653f105a33753 (patch) | |
| tree | af526aed90f438d211e543ce7e8f2d8a1fa093e7 | |
| parent | 70bacbdbfa6f63f8cd10432891f9ecee62397ff2 (diff) | |
ocfs2: don't use MLF* in dlm/ files
Signed-off-by: Kurt Hackel <kurt.hackel@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
| -rw-r--r-- | fs/ocfs2/dlm/dlmast.c | 22 | ||||
| -rw-r--r-- | fs/ocfs2/dlm/dlmcommon.h | 15 | ||||
| -rw-r--r-- | fs/ocfs2/dlm/dlmconvert.c | 11 | ||||
| -rw-r--r-- | fs/ocfs2/dlm/dlmdebug.c | 18 | ||||
| -rw-r--r-- | fs/ocfs2/dlm/dlmrecovery.c | 12 | ||||
| -rw-r--r-- | fs/ocfs2/dlm/dlmunlock.c | 11 |
6 files changed, 64 insertions, 25 deletions
diff --git a/fs/ocfs2/dlm/dlmast.c b/fs/ocfs2/dlm/dlmast.c index 8d17d28ef91c..355593dd8ef8 100644 --- a/fs/ocfs2/dlm/dlmast.c +++ b/fs/ocfs2/dlm/dlmast.c | |||
| @@ -307,8 +307,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) | |||
| 307 | 307 | ||
| 308 | if (past->type != DLM_AST && | 308 | if (past->type != DLM_AST && |
| 309 | past->type != DLM_BAST) { | 309 | past->type != DLM_BAST) { |
| 310 | mlog(ML_ERROR, "Unknown ast type! %d, cookie=%"MLFu64", " | 310 | mlog(ML_ERROR, "Unknown ast type! %d, cookie=%u:%llu" |
| 311 | "name=%.*s\n", past->type, cookie, locklen, name); | 311 | "name=%.*s\n", past->type, |
| 312 | dlm_get_lock_cookie_node(cookie), | ||
| 313 | dlm_get_lock_cookie_seq(cookie), | ||
| 314 | locklen, name); | ||
| 312 | ret = DLM_IVLOCKID; | 315 | ret = DLM_IVLOCKID; |
| 313 | goto leave; | 316 | goto leave; |
| 314 | } | 317 | } |
| @@ -316,9 +319,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) | |||
| 316 | res = dlm_lookup_lockres(dlm, name, locklen); | 319 | res = dlm_lookup_lockres(dlm, name, locklen); |
| 317 | if (!res) { | 320 | if (!res) { |
| 318 | mlog(ML_ERROR, "got %sast for unknown lockres! " | 321 | mlog(ML_ERROR, "got %sast for unknown lockres! " |
| 319 | "cookie=%"MLFu64", name=%.*s, namelen=%u\n", | 322 | "cookie=%u:%llu, name=%.*s, namelen=%u\n", |
| 320 | past->type == DLM_AST ? "" : "b", | 323 | past->type == DLM_AST ? "" : "b", |
| 321 | cookie, locklen, name, locklen); | 324 | dlm_get_lock_cookie_node(cookie), |
| 325 | dlm_get_lock_cookie_seq(cookie), | ||
| 326 | locklen, name, locklen); | ||
| 322 | ret = DLM_IVLOCKID; | 327 | ret = DLM_IVLOCKID; |
| 323 | goto leave; | 328 | goto leave; |
| 324 | } | 329 | } |
| @@ -360,9 +365,12 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) | |||
| 360 | goto do_ast; | 365 | goto do_ast; |
| 361 | } | 366 | } |
| 362 | 367 | ||
| 363 | mlog(ML_ERROR, "got %sast for unknown lock! cookie=%"MLFu64", " | 368 | mlog(ML_ERROR, "got %sast for unknown lock! cookie=%u:%llu, " |
| 364 | "name=%.*s, namelen=%u\n", | 369 | "name=%.*s, namelen=%u\n", |
| 365 | past->type == DLM_AST ? "" : "b", cookie, locklen, name, locklen); | 370 | past->type == DLM_AST ? "" : "b", |
| 371 | dlm_get_lock_cookie_node(cookie), | ||
| 372 | dlm_get_lock_cookie_seq(cookie), | ||
| 373 | locklen, name, locklen); | ||
| 366 | 374 | ||
| 367 | ret = DLM_NORMAL; | 375 | ret = DLM_NORMAL; |
| 368 | unlock_out: | 376 | unlock_out: |
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index a8aec9341347..88cc43df18f1 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
| @@ -630,6 +630,21 @@ __dlm_lockres_state_to_status(struct dlm_lock_resource *res) | |||
| 630 | return status; | 630 | return status; |
| 631 | } | 631 | } |
| 632 | 632 | ||
| 633 | static inline u8 dlm_get_lock_cookie_node(u64 cookie) | ||
| 634 | { | ||
| 635 | u8 ret; | ||
| 636 | cookie >>= 56; | ||
| 637 | ret = (u8)(cookie & 0xffULL); | ||
| 638 | return ret; | ||
| 639 | } | ||
| 640 | |||
| 641 | static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie) | ||
| 642 | { | ||
| 643 | unsigned long long ret; | ||
| 644 | ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL; | ||
| 645 | return ret; | ||
| 646 | } | ||
| 647 | |||
| 633 | struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, | 648 | struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, |
| 634 | struct dlm_lockstatus *lksb); | 649 | struct dlm_lockstatus *lksb); |
| 635 | void dlm_lock_get(struct dlm_lock *lock); | 650 | void dlm_lock_get(struct dlm_lock *lock); |
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index f66e2d818ccd..8285228d9e37 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
| @@ -284,8 +284,10 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, | |||
| 284 | if (lock->ml.convert_type != LKM_IVMODE) { | 284 | if (lock->ml.convert_type != LKM_IVMODE) { |
| 285 | __dlm_print_one_lock_resource(res); | 285 | __dlm_print_one_lock_resource(res); |
| 286 | mlog(ML_ERROR, "converting a remote lock that is already " | 286 | mlog(ML_ERROR, "converting a remote lock that is already " |
| 287 | "converting! (cookie=%"MLFu64", conv=%d)\n", | 287 | "converting! (cookie=%u:%llu, conv=%d)\n", |
| 288 | lock->ml.cookie, lock->ml.convert_type); | 288 | dlm_get_lock_cookie_node(lock->ml.cookie), |
| 289 | dlm_get_lock_cookie_seq(lock->ml.cookie), | ||
| 290 | lock->ml.convert_type); | ||
| 289 | status = DLM_DENIED; | 291 | status = DLM_DENIED; |
| 290 | goto bail; | 292 | goto bail; |
| 291 | } | 293 | } |
| @@ -513,8 +515,9 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) | |||
| 513 | leave: | 515 | leave: |
| 514 | if (!lock) | 516 | if (!lock) |
| 515 | mlog(ML_ERROR, "did not find lock to convert on grant queue! " | 517 | mlog(ML_ERROR, "did not find lock to convert on grant queue! " |
| 516 | "cookie=%"MLFu64"\n", | 518 | "cookie=%u:%llu\n", |
| 517 | cnv->cookie); | 519 | dlm_get_lock_cookie_node(cnv->cookie), |
| 520 | dlm_get_lock_cookie_seq(cnv->cookie)); | ||
| 518 | else | 521 | else |
| 519 | dlm_lock_put(lock); | 522 | dlm_lock_put(lock); |
| 520 | 523 | ||
diff --git a/fs/ocfs2/dlm/dlmdebug.c b/fs/ocfs2/dlm/dlmdebug.c index 54f61b76ab51..c7eae5d3324e 100644 --- a/fs/ocfs2/dlm/dlmdebug.c +++ b/fs/ocfs2/dlm/dlmdebug.c | |||
| @@ -72,8 +72,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) | |||
| 72 | lock = list_entry(iter2, struct dlm_lock, list); | 72 | lock = list_entry(iter2, struct dlm_lock, list); |
| 73 | spin_lock(&lock->spinlock); | 73 | spin_lock(&lock->spinlock); |
| 74 | mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " | 74 | mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " |
| 75 | "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", | 75 | "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", |
| 76 | lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, | 76 | lock->ml.type, lock->ml.convert_type, lock->ml.node, |
| 77 | dlm_get_lock_cookie_node(lock->ml.cookie), | ||
| 78 | dlm_get_lock_cookie_seq(lock->ml.cookie), | ||
| 77 | list_empty(&lock->ast_list) ? 'y' : 'n', | 79 | list_empty(&lock->ast_list) ? 'y' : 'n', |
| 78 | lock->ast_pending ? 'y' : 'n', | 80 | lock->ast_pending ? 'y' : 'n', |
| 79 | list_empty(&lock->bast_list) ? 'y' : 'n', | 81 | list_empty(&lock->bast_list) ? 'y' : 'n', |
| @@ -85,8 +87,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) | |||
| 85 | lock = list_entry(iter2, struct dlm_lock, list); | 87 | lock = list_entry(iter2, struct dlm_lock, list); |
| 86 | spin_lock(&lock->spinlock); | 88 | spin_lock(&lock->spinlock); |
| 87 | mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " | 89 | mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " |
| 88 | "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", | 90 | "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", |
| 89 | lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, | 91 | lock->ml.type, lock->ml.convert_type, lock->ml.node, |
| 92 | dlm_get_lock_cookie_node(lock->ml.cookie), | ||
| 93 | dlm_get_lock_cookie_seq(lock->ml.cookie), | ||
| 90 | list_empty(&lock->ast_list) ? 'y' : 'n', | 94 | list_empty(&lock->ast_list) ? 'y' : 'n', |
| 91 | lock->ast_pending ? 'y' : 'n', | 95 | lock->ast_pending ? 'y' : 'n', |
| 92 | list_empty(&lock->bast_list) ? 'y' : 'n', | 96 | list_empty(&lock->bast_list) ? 'y' : 'n', |
| @@ -98,8 +102,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) | |||
| 98 | lock = list_entry(iter2, struct dlm_lock, list); | 102 | lock = list_entry(iter2, struct dlm_lock, list); |
| 99 | spin_lock(&lock->spinlock); | 103 | spin_lock(&lock->spinlock); |
| 100 | mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " | 104 | mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " |
| 101 | "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", | 105 | "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", |
| 102 | lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, | 106 | lock->ml.type, lock->ml.convert_type, lock->ml.node, |
| 107 | dlm_get_lock_cookie_node(lock->ml.cookie), | ||
| 108 | dlm_get_lock_cookie_seq(lock->ml.cookie), | ||
| 103 | list_empty(&lock->ast_list) ? 'y' : 'n', | 109 | list_empty(&lock->ast_list) ? 'y' : 'n', |
| 104 | lock->ast_pending ? 'y' : 'n', | 110 | lock->ast_pending ? 'y' : 'n', |
| 105 | list_empty(&lock->bast_list) ? 'y' : 'n', | 111 | list_empty(&lock->bast_list) ? 'y' : 'n', |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 36610bdf1231..805cbabac051 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
| @@ -744,10 +744,12 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) | |||
| 744 | dlm->name, dlm->reco.dead_node, dlm->reco.new_master, | 744 | dlm->name, dlm->reco.dead_node, dlm->reco.new_master, |
| 745 | dead_node, reco_master); | 745 | dead_node, reco_master); |
| 746 | mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u " | 746 | mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u " |
| 747 | "entry[0]={c=%"MLFu64",l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", | 747 | "entry[0]={c=%u:%llu,l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", |
| 748 | dlm->name, mres->lockname_len, mres->lockname, mres->master, | 748 | dlm->name, mres->lockname_len, mres->lockname, mres->master, |
| 749 | mres->num_locks, mres->total_locks, mres->flags, | 749 | mres->num_locks, mres->total_locks, mres->flags, |
| 750 | mres->ml[0].cookie, mres->ml[0].list, mres->ml[0].flags, | 750 | dlm_get_lock_cookie_node(mres->ml[0].cookie), |
| 751 | dlm_get_lock_cookie_seq(mres->ml[0].cookie), | ||
| 752 | mres->ml[0].list, mres->ml[0].flags, | ||
| 751 | mres->ml[0].type, mres->ml[0].convert_type, | 753 | mres->ml[0].type, mres->ml[0].convert_type, |
| 752 | mres->ml[0].highest_blocked, mres->ml[0].node); | 754 | mres->ml[0].highest_blocked, mres->ml[0].node); |
| 753 | BUG(); | 755 | BUG(); |
| @@ -1513,9 +1515,11 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, | |||
| 1513 | /* lock is always created locally first, and | 1515 | /* lock is always created locally first, and |
| 1514 | * destroyed locally last. it must be on the list */ | 1516 | * destroyed locally last. it must be on the list */ |
| 1515 | if (!lock) { | 1517 | if (!lock) { |
| 1518 | u64 c = ml->cookie; | ||
| 1516 | mlog(ML_ERROR, "could not find local lock " | 1519 | mlog(ML_ERROR, "could not find local lock " |
| 1517 | "with cookie %"MLFu64"!\n", | 1520 | "with cookie %u:%llu!\n", |
| 1518 | ml->cookie); | 1521 | dlm_get_lock_cookie_node(c), |
| 1522 | dlm_get_lock_cookie_seq(c)); | ||
| 1519 | BUG(); | 1523 | BUG(); |
| 1520 | } | 1524 | } |
| 1521 | BUG_ON(lock->ml.node != ml->node); | 1525 | BUG_ON(lock->ml.node != ml->node); |
diff --git a/fs/ocfs2/dlm/dlmunlock.c b/fs/ocfs2/dlm/dlmunlock.c index c95f08d2e925..7b1a27542674 100644 --- a/fs/ocfs2/dlm/dlmunlock.c +++ b/fs/ocfs2/dlm/dlmunlock.c | |||
| @@ -244,8 +244,10 @@ leave: | |||
| 244 | if (actions & DLM_UNLOCK_FREE_LOCK) { | 244 | if (actions & DLM_UNLOCK_FREE_LOCK) { |
| 245 | /* this should always be coupled with list removal */ | 245 | /* this should always be coupled with list removal */ |
| 246 | BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK)); | 246 | BUG_ON(!(actions & DLM_UNLOCK_REMOVE_LOCK)); |
| 247 | mlog(0, "lock %"MLFu64" should be gone now! refs=%d\n", | 247 | mlog(0, "lock %u:%llu should be gone now! refs=%d\n", |
| 248 | lock->ml.cookie, atomic_read(&lock->lock_refs.refcount)-1); | 248 | dlm_get_lock_cookie_node(lock->ml.cookie), |
| 249 | dlm_get_lock_cookie_seq(lock->ml.cookie), | ||
| 250 | atomic_read(&lock->lock_refs.refcount)-1); | ||
| 249 | dlm_lock_put(lock); | 251 | dlm_lock_put(lock); |
| 250 | } | 252 | } |
| 251 | if (actions & DLM_UNLOCK_CALL_AST) | 253 | if (actions & DLM_UNLOCK_CALL_AST) |
| @@ -493,8 +495,9 @@ int dlm_unlock_lock_handler(struct o2net_msg *msg, u32 len, void *data) | |||
| 493 | not_found: | 495 | not_found: |
| 494 | if (!found) | 496 | if (!found) |
| 495 | mlog(ML_ERROR, "failed to find lock to unlock! " | 497 | mlog(ML_ERROR, "failed to find lock to unlock! " |
| 496 | "cookie=%"MLFu64"\n", | 498 | "cookie=%u:%llu\n", |
| 497 | unlock->cookie); | 499 | dlm_get_lock_cookie_node(unlock->cookie), |
| 500 | dlm_get_lock_cookie_seq(unlock->cookie)); | ||
| 498 | else { | 501 | else { |
| 499 | /* send the lksb->status back to the other node */ | 502 | /* send the lksb->status back to the other node */ |
| 500 | status = lksb->status; | 503 | status = lksb->status; |
