Whamcloud - gitweb
Disable posix locking file op.
authordmilos <dmilos>
Thu, 18 Sep 2003 03:39:20 +0000 (03:39 +0000)
committerdmilos <dmilos>
Thu, 18 Sep 2003 03:39:20 +0000 (03:39 +0000)
Make test to schedule completion AST consistent with recent b_llp_hp changes.

lustre/ldlm/ldlm_flock.c

index b5c7b45..3f8d079 100644 (file)
@@ -346,17 +346,20 @@ ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq,
         }
 
         if (*flags != LDLM_FL_WAIT_NOREPROC) {
-                if (req->l_completion_ast)
+                if (first_enq) {
+                        /* The only problem with doing the reprocessing here
+                         * is that the completion ASTs for newly granted locks
+                         * will * be sent before the unlock completion is sent.
+                         * It shouldn't be an issue. Also note that
+                         * ldlm_process_flock_lock() will recurse, but only
+                         * once because there can't be unlock requests on the
+                         * wait queue. */
+                        if ((mode == LCK_NL) && overlaps)
+                                ldlm_reprocess_all(res);
+                } else {
+                        LASSERT(req->l_completion_ast);
                         ldlm_add_ast_work_item(req, NULL, NULL, 0);
-
-                /* The only problem with doing the reprocessing here is that
-                 * the completion ASTs for newly granted locks will be sent
-                 * before the unlock completion is sent. It shouldn't be an
-                 * issue. Also note that ldlm_process_flock_lock() will
-                 * recurse, but only once because there can't be unlock
-                 * requests on the wait queue. */
-                if ((mode == LCK_NL) && overlaps)
-                        ldlm_reprocess_queue(res, &res->lr_waiting);
+                }
         }
 
         ldlm_resource_dump(res);