Whamcloud - gitweb
Branch:b1_6
authorwangdi <wangdi>
Fri, 20 Jul 2007 03:18:32 +0000 (03:18 +0000)
committerwangdi <wangdi>
Fri, 20 Jul 2007 03:18:32 +0000 (03:18 +0000)
b=11190
reply intent enqueue error by rq_status
i=adilger
i-nathan

lustre/ChangeLog
lustre/ldlm/ldlm_lockd.c
lustre/mdc/mdc_locks.c
lustre/mds/handler.c

index 4bc4d0a..706530e 100644 (file)
@@ -540,6 +540,14 @@ Details    : Hash tables noticeably help when a lot of clients connect to a
              server, to faster identify duplicate connections or reconnects,
             also to faster find export to evict in manual eviction case.
 
+Severity   : normal
+Bugzilla   : 11190
+Description: Sometimes, when the server evict a client, and the client will
+             not be evicted as soon as possible.
+Details    : In enqueue req, the error was returned by intent, instead of
+             rq_status which make ptlrpc layer not detect this error, and 
+            does not evict the client. So enqueue error should be returned
+            by rq_status. 
 
 --------------------------------------------------------------------------------
 
index c582e35..f4fe219 100644 (file)
@@ -1004,12 +1004,11 @@ existing_lock:
 
         EXIT;
  out:
-        req->rq_status = err;
+        req->rq_status = rc ?: err;  /* return either error - bug 11190 */
         if (req->rq_reply_state == NULL) {
                 err = lustre_pack_reply(req, 1, NULL, NULL);
                 if (rc == 0)
                         rc = err;
-                req->rq_status = rc;
         }
 
         /* The LOCK_CHANGED code in ldlm_lock_enqueue depends on this
index f101e0d..7962b0a 100644 (file)
@@ -412,8 +412,6 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
                 lockreq->lock_flags |= LDLM_FL_INTENT_ONLY;
         }
 
-        /* This can go when we're sure that this can never happen */
-        LASSERT(rc != -ENOENT);
         if (rc == ELDLM_LOCK_ABORTED) {
                 einfo->ei_mode = 0;
                 memset(lockh, 0, sizeof(*lockh));
index 2477d58..de9aa4b 100644 (file)
@@ -2399,8 +2399,9 @@ static int mds_intent_policy(struct ldlm_namespace *ns,
 
                 /* If there was an error of some sort or if we are not
                  * returning any locks */
-                if (rep->lock_policy_res2 ||
-                    !intent_disposition(rep, DISP_OPEN_LOCK))
+                if (rep->lock_policy_res2)
+                        RETURN(rep->lock_policy_res2);
+                if (!intent_disposition(rep, DISP_OPEN_LOCK))
                         RETURN(ELDLM_LOCK_ABORTED);
                 break;
         case IT_LOOKUP: