Whamcloud - gitweb
Branch b1_8_gate
authortianzy <tianzy>
Thu, 11 Sep 2008 14:51:26 +0000 (14:51 +0000)
committertianzy <tianzy>
Thu, 11 Sep 2008 14:51:26 +0000 (14:51 +0000)
This patch includes att18982, att18236, att18237,att18983 and att19061 in bz14840.
Slove "quota recovery deadlock during mds failover", it includes:
1. fix osts hang when mds does failover with quotaon
2. prevent watchdog storm when osts threads wait for the
   recovery of mds
b=14840
i=johann
i=shadow
i=panda

lustre/ldlm/ldlm_lib.c

index 9466996..cae90ce 100644 (file)
@@ -1945,7 +1945,12 @@ int target_handle_dqacq_callback(struct ptlrpc_request *req)
         }
 
         /* we use the observer */
-        LASSERT(obd->obd_observer && obd->obd_observer->obd_observer);
+        if (!obd->obd_observer || !obd->obd_observer->obd_observer) {
+                CERROR("Can't find the observer, it is recovering\n");
+                req->rq_status = -EIO;
+                GOTO(send_reply, rc = -EIO);
+        }
+
         master_obd = obd->obd_observer->obd_observer;
         qctxt = &master_obd->u.obt.obt_qctxt;
 
@@ -1978,7 +1983,7 @@ int target_handle_dqacq_callback(struct ptlrpc_request *req)
 
         /* Block the quota req. b=14840 */
         OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_BLOCK_QUOTA_REQ, obd_timeout);
-
+ send_reply:
         rc = ptlrpc_reply(req);
 out:
         OBD_FREE(qdata, sizeof(struct qunit_data));