Commit bdf43213 authored by jcl's avatar jcl Committed by Greg Kroah-Hartman

staging/lustre/mdc: layout lock rpc must not take rpc_lock

When a client issue an RPC to get a layout lock, it
must not hold rpc_lock because in case of a restore
the rpc can be blocking for a long time

Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3200
Lustre-change: http://review.whamcloud.com/6115Signed-off-by: default avatarJC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarJohann Lombardi <johann.lombardi@intel.com>
Signed-off-by: default avatarPeng Tao <tao.peng@emc.com>
Signed-off-by: default avatarAndreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2d58de78
...@@ -86,7 +86,8 @@ static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck, ...@@ -86,7 +86,8 @@ static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
{ {
ENTRY; ENTRY;
if (it != NULL && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP)) if (it != NULL && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP ||
it->it_op == IT_LAYOUT))
return; return;
/* This would normally block until the existing request finishes. /* This would normally block until the existing request finishes.
...@@ -123,7 +124,8 @@ static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck, ...@@ -123,7 +124,8 @@ static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck, static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
struct lookup_intent *it) struct lookup_intent *it)
{ {
if (it != NULL && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP)) if (it != NULL && (it->it_op == IT_GETATTR || it->it_op == IT_LOOKUP ||
it->it_op == IT_LAYOUT))
goto out; goto out;
if (lck->rpcl_it == MDC_FAKE_RPCL_IT) { /* OBD_FAIL_MDC_RPCS_SEM */ if (lck->rpcl_it == MDC_FAKE_RPCL_IT) { /* OBD_FAIL_MDC_RPCS_SEM */
......
...@@ -884,7 +884,7 @@ static int mdc_finish_intent_lock(struct obd_export *exp, ...@@ -884,7 +884,7 @@ static int mdc_finish_intent_lock(struct obd_export *exp,
struct mdt_body *mdt_body; struct mdt_body *mdt_body;
struct ldlm_lock *lock; struct ldlm_lock *lock;
int rc; int rc;
ENTRY;
LASSERT(request != NULL); LASSERT(request != NULL);
LASSERT(request != LP_POISON); LASSERT(request != LP_POISON);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment