summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/include/lustre_mdc.h
diff options
context:
space:
mode:
authorjcl <jacques-charles.lafoucriere@cea.fr>2013-07-23 00:06:33 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 12:48:22 -0700
commitbdf43213f9e7faf980025f44ec82b80caf453e8d (patch)
treed63fba69a61742d5c9188da5566611ba5c98b40f /drivers/staging/lustre/lustre/include/lustre_mdc.h
parent2d58de78b2f6c53688a154b02bae3ada19ed15a9 (diff)
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/6115 Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Johann Lombardi <johann.lombardi@intel.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/include/lustre_mdc.h')
-rw-r--r--drivers/staging/lustre/lustre/include/lustre_mdc.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h
index fb1561a809b9..82d1f2f13031 100644
--- a/drivers/staging/lustre/lustre/include/lustre_mdc.h
+++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h
@@ -86,7 +86,8 @@ static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
{
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;
/* 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,
static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
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;
if (lck->rpcl_it == MDC_FAKE_RPCL_IT) { /* OBD_FAIL_MDC_RPCS_SEM */