From 023e5a2da4e3fa953632b804b0c0405c675f8149 Mon Sep 17 00:00:00 2001
From: girish <girish>
Date: Sat, 6 Sep 2008 12:17:32 +0000
Subject: [PATCH] Allow granting glimpse locks for PW requests. (Andreas)
 b=16845 i=green i=yury.umanets

---
 lustre/obdfilter/filter.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c
index 3cac141c08..134db4742b 100644
--- a/lustre/obdfilter/filter.c
+++ b/lustre/obdfilter/filter.c
@@ -1699,14 +1699,11 @@ static int filter_intent_policy(struct ldlm_namespace *ns,
 
         //fixup_handle_for_resent_req(req, lock, &lockh);
 
-        /* If we grant any lock at all, it will be a whole-file read lock.
-         * Call the extent policy function to see if our request can be
-         * granted, or is blocked. 
-         * If the OST lock has LDLM_FL_HAS_INTENT set, it means a glimpse lock
+        /* Call the extent policy function to see if our request can be
+         * granted, or is blocked.
+         * If the OST lock has LDLM_FL_HAS_INTENT set, it means a glimpse
+         * lock, and should not be granted if the lock will be blocked.
          */
-        lock->l_policy_data.l_extent.start = 0;
-        lock->l_policy_data.l_extent.end = OBD_OBJECT_EOF;
-        lock->l_req_mode = LCK_PR;
 
         LASSERT(ns == res->lr_namespace);
         lock_res(res);
-- 
GitLab