Whamcloud - gitweb
b=7356
authoralex <alex>
Wed, 24 Aug 2005 04:36:29 +0000 (04:36 +0000)
committeralex <alex>
Wed, 24 Aug 2005 04:36:29 +0000 (04:36 +0000)
 - we should allow processing for request being resent during request
   replay stage. but we may do that only when all clients are connected
   (or after evicting clients that haven't connect in time)

lustre/include/linux/obd.h
lustre/ldlm/ldlm_lib.c

index 0ec27fa..09e1902 100644 (file)
@@ -731,7 +731,7 @@ struct obd_device {
         int obd_minor;
         unsigned int obd_attached:1, obd_set_up:1, obd_recovering:1,
                 obd_abort_recovery:1, obd_replayable:1, obd_no_transno:1,
-                obd_no_recov:1, obd_stopping:1;
+                obd_no_recov:1, obd_stopping:1, obd_req_replaying:1;
         atomic_t obd_refcount;
         wait_queue_head_t obd_refcount_waitq;
         struct proc_dir_entry *obd_proc_entry;
index eb18c35..d4f2ee3 100644 (file)
@@ -1413,6 +1413,7 @@ static int target_recovery_thread(void *arg)
 
         /* next stage: replay requests */
         delta = jiffies;
+        obd->obd_req_replaying = 1;
         CDEBUG(D_ERROR, "1: request replay stage - %d clients from t"LPU64"\n",
               atomic_read(&obd->obd_req_replay_clients),
               obd->obd_next_recovery_transno);
@@ -1637,7 +1638,7 @@ int target_queue_recovery_request(struct ptlrpc_request *req,
          * handled will pass through here and be processed immediately.
          */
         spin_lock_bh(&obd->obd_processing_task_lock);
-        if (transno < obd->obd_next_recovery_transno && check_for_clients(obd)) {
+        if (transno < obd->obd_next_recovery_transno && obd->obd_req_replaying) {
                 /* Processing the queue right now, don't re-add. */
                 LASSERT(list_empty(&req->rq_list));
                 spin_unlock_bh(&obd->obd_processing_task_lock);