From aeda79b0df902a07ca67ab4c25072f07bc68e714 Mon Sep 17 00:00:00 2001 From: dmilos Date: Thu, 18 Sep 2003 03:39:20 +0000 Subject: [PATCH] Disable posix locking file op. Make test to schedule completion AST consistent with recent b_llp_hp changes. --- lustre/ldlm/ldlm_flock.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lustre/ldlm/ldlm_flock.c b/lustre/ldlm/ldlm_flock.c index b5c7b45..3f8d079 100644 --- a/lustre/ldlm/ldlm_flock.c +++ b/lustre/ldlm/ldlm_flock.c @@ -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); -- 1.8.3.1