Loading fs/ocfs2/dlm/dlmast.c +15 −7 Original line number Diff line number Diff line Loading @@ -307,8 +307,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) if (past->type != DLM_AST && past->type != DLM_BAST) { mlog(ML_ERROR, "Unknown ast type! %d, cookie=%"MLFu64", " "name=%.*s\n", past->type, cookie, locklen, name); mlog(ML_ERROR, "Unknown ast type! %d, cookie=%u:%llu" "name=%.*s\n", past->type, dlm_get_lock_cookie_node(cookie), dlm_get_lock_cookie_seq(cookie), locklen, name); ret = DLM_IVLOCKID; goto leave; } Loading @@ -316,9 +319,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) res = dlm_lookup_lockres(dlm, name, locklen); if (!res) { mlog(ML_ERROR, "got %sast for unknown lockres! " "cookie=%"MLFu64", name=%.*s, namelen=%u\n", "cookie=%u:%llu, name=%.*s, namelen=%u\n", past->type == DLM_AST ? "" : "b", cookie, locklen, name, locklen); dlm_get_lock_cookie_node(cookie), dlm_get_lock_cookie_seq(cookie), locklen, name, locklen); ret = DLM_IVLOCKID; goto leave; } Loading Loading @@ -360,9 +365,12 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) goto do_ast; } mlog(ML_ERROR, "got %sast for unknown lock! cookie=%"MLFu64", " mlog(ML_ERROR, "got %sast for unknown lock! cookie=%u:%llu, " "name=%.*s, namelen=%u\n", past->type == DLM_AST ? "" : "b", cookie, locklen, name, locklen); past->type == DLM_AST ? "" : "b", dlm_get_lock_cookie_node(cookie), dlm_get_lock_cookie_seq(cookie), locklen, name, locklen); ret = DLM_NORMAL; unlock_out: Loading fs/ocfs2/dlm/dlmcommon.h +15 −0 Original line number Diff line number Diff line Loading @@ -630,6 +630,21 @@ __dlm_lockres_state_to_status(struct dlm_lock_resource *res) return status; } static inline u8 dlm_get_lock_cookie_node(u64 cookie) { u8 ret; cookie >>= 56; ret = (u8)(cookie & 0xffULL); return ret; } static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie) { unsigned long long ret; ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL; return ret; } struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, struct dlm_lockstatus *lksb); void dlm_lock_get(struct dlm_lock *lock); Loading fs/ocfs2/dlm/dlmconvert.c +7 −4 Original line number Diff line number Diff line Loading @@ -284,8 +284,10 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, if (lock->ml.convert_type != LKM_IVMODE) { __dlm_print_one_lock_resource(res); mlog(ML_ERROR, "converting a remote lock that is already " "converting! (cookie=%"MLFu64", conv=%d)\n", lock->ml.cookie, lock->ml.convert_type); "converting! (cookie=%u:%llu, conv=%d)\n", dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), lock->ml.convert_type); status = DLM_DENIED; goto bail; } Loading Loading @@ -513,8 +515,9 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) leave: if (!lock) mlog(ML_ERROR, "did not find lock to convert on grant queue! " "cookie=%"MLFu64"\n", cnv->cookie); "cookie=%u:%llu\n", dlm_get_lock_cookie_node(cnv->cookie), dlm_get_lock_cookie_seq(cnv->cookie)); else dlm_lock_put(lock); Loading fs/ocfs2/dlm/dlmdebug.c +12 −6 Original line number Diff line number Diff line Loading @@ -72,8 +72,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) lock = list_entry(iter2, struct dlm_lock, list); spin_lock(&lock->spinlock); mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), list_empty(&lock->ast_list) ? 'y' : 'n', lock->ast_pending ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n', Loading @@ -85,8 +87,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) lock = list_entry(iter2, struct dlm_lock, list); spin_lock(&lock->spinlock); mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), list_empty(&lock->ast_list) ? 'y' : 'n', lock->ast_pending ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n', Loading @@ -98,8 +102,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) lock = list_entry(iter2, struct dlm_lock, list); spin_lock(&lock->spinlock); mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), list_empty(&lock->ast_list) ? 'y' : 'n', lock->ast_pending ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n', Loading fs/ocfs2/dlm/dlmrecovery.c +8 −4 Original line number Diff line number Diff line Loading @@ -744,10 +744,12 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) dlm->name, dlm->reco.dead_node, dlm->reco.new_master, dead_node, reco_master); mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u " "entry[0]={c=%"MLFu64",l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", "entry[0]={c=%u:%llu,l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", dlm->name, mres->lockname_len, mres->lockname, mres->master, mres->num_locks, mres->total_locks, mres->flags, mres->ml[0].cookie, mres->ml[0].list, mres->ml[0].flags, dlm_get_lock_cookie_node(mres->ml[0].cookie), dlm_get_lock_cookie_seq(mres->ml[0].cookie), mres->ml[0].list, mres->ml[0].flags, mres->ml[0].type, mres->ml[0].convert_type, mres->ml[0].highest_blocked, mres->ml[0].node); BUG(); Loading Loading @@ -1513,9 +1515,11 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, /* lock is always created locally first, and * destroyed locally last. it must be on the list */ if (!lock) { u64 c = ml->cookie; mlog(ML_ERROR, "could not find local lock " "with cookie %"MLFu64"!\n", ml->cookie); "with cookie %u:%llu!\n", dlm_get_lock_cookie_node(c), dlm_get_lock_cookie_seq(c)); BUG(); } BUG_ON(lock->ml.node != ml->node); Loading Loading
fs/ocfs2/dlm/dlmast.c +15 −7 Original line number Diff line number Diff line Loading @@ -307,8 +307,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) if (past->type != DLM_AST && past->type != DLM_BAST) { mlog(ML_ERROR, "Unknown ast type! %d, cookie=%"MLFu64", " "name=%.*s\n", past->type, cookie, locklen, name); mlog(ML_ERROR, "Unknown ast type! %d, cookie=%u:%llu" "name=%.*s\n", past->type, dlm_get_lock_cookie_node(cookie), dlm_get_lock_cookie_seq(cookie), locklen, name); ret = DLM_IVLOCKID; goto leave; } Loading @@ -316,9 +319,11 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) res = dlm_lookup_lockres(dlm, name, locklen); if (!res) { mlog(ML_ERROR, "got %sast for unknown lockres! " "cookie=%"MLFu64", name=%.*s, namelen=%u\n", "cookie=%u:%llu, name=%.*s, namelen=%u\n", past->type == DLM_AST ? "" : "b", cookie, locklen, name, locklen); dlm_get_lock_cookie_node(cookie), dlm_get_lock_cookie_seq(cookie), locklen, name, locklen); ret = DLM_IVLOCKID; goto leave; } Loading Loading @@ -360,9 +365,12 @@ int dlm_proxy_ast_handler(struct o2net_msg *msg, u32 len, void *data) goto do_ast; } mlog(ML_ERROR, "got %sast for unknown lock! cookie=%"MLFu64", " mlog(ML_ERROR, "got %sast for unknown lock! cookie=%u:%llu, " "name=%.*s, namelen=%u\n", past->type == DLM_AST ? "" : "b", cookie, locklen, name, locklen); past->type == DLM_AST ? "" : "b", dlm_get_lock_cookie_node(cookie), dlm_get_lock_cookie_seq(cookie), locklen, name, locklen); ret = DLM_NORMAL; unlock_out: Loading
fs/ocfs2/dlm/dlmcommon.h +15 −0 Original line number Diff line number Diff line Loading @@ -630,6 +630,21 @@ __dlm_lockres_state_to_status(struct dlm_lock_resource *res) return status; } static inline u8 dlm_get_lock_cookie_node(u64 cookie) { u8 ret; cookie >>= 56; ret = (u8)(cookie & 0xffULL); return ret; } static inline unsigned long long dlm_get_lock_cookie_seq(u64 cookie) { unsigned long long ret; ret = ((unsigned long long)cookie) & 0x00ffffffffffffffULL; return ret; } struct dlm_lock * dlm_new_lock(int type, u8 node, u64 cookie, struct dlm_lockstatus *lksb); void dlm_lock_get(struct dlm_lock *lock); Loading
fs/ocfs2/dlm/dlmconvert.c +7 −4 Original line number Diff line number Diff line Loading @@ -284,8 +284,10 @@ enum dlm_status dlmconvert_remote(struct dlm_ctxt *dlm, if (lock->ml.convert_type != LKM_IVMODE) { __dlm_print_one_lock_resource(res); mlog(ML_ERROR, "converting a remote lock that is already " "converting! (cookie=%"MLFu64", conv=%d)\n", lock->ml.cookie, lock->ml.convert_type); "converting! (cookie=%u:%llu, conv=%d)\n", dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), lock->ml.convert_type); status = DLM_DENIED; goto bail; } Loading Loading @@ -513,8 +515,9 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data) leave: if (!lock) mlog(ML_ERROR, "did not find lock to convert on grant queue! " "cookie=%"MLFu64"\n", cnv->cookie); "cookie=%u:%llu\n", dlm_get_lock_cookie_node(cnv->cookie), dlm_get_lock_cookie_seq(cnv->cookie)); else dlm_lock_put(lock); Loading
fs/ocfs2/dlm/dlmdebug.c +12 −6 Original line number Diff line number Diff line Loading @@ -72,8 +72,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) lock = list_entry(iter2, struct dlm_lock, list); spin_lock(&lock->spinlock); mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), list_empty(&lock->ast_list) ? 'y' : 'n', lock->ast_pending ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n', Loading @@ -85,8 +87,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) lock = list_entry(iter2, struct dlm_lock, list); spin_lock(&lock->spinlock); mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), list_empty(&lock->ast_list) ? 'y' : 'n', lock->ast_pending ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n', Loading @@ -98,8 +102,10 @@ void __dlm_print_one_lock_resource(struct dlm_lock_resource *res) lock = list_entry(iter2, struct dlm_lock, list); spin_lock(&lock->spinlock); mlog(ML_NOTICE, " type=%d, conv=%d, node=%u, " "cookie=%"MLFu64", ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, lock->ml.cookie, "cookie=%u:%llu, ast=(empty=%c,pend=%c), bast=(empty=%c,pend=%c)\n", lock->ml.type, lock->ml.convert_type, lock->ml.node, dlm_get_lock_cookie_node(lock->ml.cookie), dlm_get_lock_cookie_seq(lock->ml.cookie), list_empty(&lock->ast_list) ? 'y' : 'n', lock->ast_pending ? 'y' : 'n', list_empty(&lock->bast_list) ? 'y' : 'n', Loading
fs/ocfs2/dlm/dlmrecovery.c +8 −4 Original line number Diff line number Diff line Loading @@ -744,10 +744,12 @@ static void dlm_request_all_locks_worker(struct dlm_work_item *item, void *data) dlm->name, dlm->reco.dead_node, dlm->reco.new_master, dead_node, reco_master); mlog(ML_ERROR, "%s: name=%.*s master=%u locks=%u/%u flags=%u " "entry[0]={c=%"MLFu64",l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", "entry[0]={c=%u:%llu,l=%u,f=%u,t=%d,ct=%d,hb=%d,n=%u}\n", dlm->name, mres->lockname_len, mres->lockname, mres->master, mres->num_locks, mres->total_locks, mres->flags, mres->ml[0].cookie, mres->ml[0].list, mres->ml[0].flags, dlm_get_lock_cookie_node(mres->ml[0].cookie), dlm_get_lock_cookie_seq(mres->ml[0].cookie), mres->ml[0].list, mres->ml[0].flags, mres->ml[0].type, mres->ml[0].convert_type, mres->ml[0].highest_blocked, mres->ml[0].node); BUG(); Loading Loading @@ -1513,9 +1515,11 @@ static int dlm_process_recovery_data(struct dlm_ctxt *dlm, /* lock is always created locally first, and * destroyed locally last. it must be on the list */ if (!lock) { u64 c = ml->cookie; mlog(ML_ERROR, "could not find local lock " "with cookie %"MLFu64"!\n", ml->cookie); "with cookie %u:%llu!\n", dlm_get_lock_cookie_node(c), dlm_get_lock_cookie_seq(c)); BUG(); } BUG_ON(lock->ml.node != ml->node); Loading