From 3016d3eba34f1718278e40d16d1e7e62e7c7abfa Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Wed, 3 Jun 2015 16:32:40 +1000 Subject: [PATCH] LU-6679 ldlm: do not send blocking ast for group locks Group locks are acquired and released manually on client so it doesn't make sense to send blocking AST to client when there is an incompatible lock enqueued. Currently client will set CBPENDING on the group lock when it receives a blocking AST. Having the CBPENDING flag set will make ldlm_lock_match to fail and there will be two group locks granted on the same resource on the client. Signed-off-by: Li Dongyang Change-Id: I7af89e957528b3ed9771d86243ac8271084ee81f Reviewed-on: http://review.whamcloud.com/15119 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Jinshan Xiong Reviewed-by: John L. Hammond Reviewed-by: Oleg Drokin --- lustre/ldlm/ldlm_extent.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lustre/ldlm/ldlm_extent.c b/lustre/ldlm/ldlm_extent.c index 523c294..cf5d7a9 100644 --- a/lustre/ldlm/ldlm_extent.c +++ b/lustre/ldlm/ldlm_extent.c @@ -339,7 +339,8 @@ static enum interval_iter ldlm_extent_compat_cb(struct interval_node *n, ldlm_lockname[mode], ldlm_lockname[lock->l_granted_mode]); count++; - if (lock->l_blocking_ast) + if (lock->l_blocking_ast && + lock->l_granted_mode != LCK_GROUP) ldlm_add_ast_work_item(lock, enq, work_list); } @@ -608,7 +609,8 @@ ldlm_extent_compat_queue(struct list_head *queue, struct ldlm_lock *req, *contended_locks += check_contention; compat = 0; - if (lock->l_blocking_ast) + if (lock->l_blocking_ast && + lock->l_req_mode != LCK_GROUP) ldlm_add_ast_work_item(lock, req, work_list); } } -- 1.8.3.1