Whamcloud - gitweb
LU-6679 ldlm: do not send blocking ast for group locks 19/15119/3
authorLi Dongyang <dongyang.li@anu.edu.au>
Wed, 3 Jun 2015 06:32:40 +0000 (16:32 +1000)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 25 Jul 2015 03:07:07 +0000 (03:07 +0000)
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 <dongyang.li@anu.edu.au>
Change-Id: I7af89e957528b3ed9771d86243ac8271084ee81f
Reviewed-on: http://review.whamcloud.com/15119
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/ldlm/ldlm_extent.c

index 523c294..cf5d7a9 100644 (file)
@@ -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);
                 }
         }