From 2c94a36a7d4c6e2bd49800be4be61f1458a3b3a4 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 24 Aug 2005 04:36:29 +0000 Subject: [PATCH] b=7356 - 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 | 2 +- lustre/ldlm/ldlm_lib.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h index 0ec27fa..09e1902 100644 --- a/lustre/include/linux/obd.h +++ b/lustre/include/linux/obd.h @@ -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; diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c index eb18c35..d4f2ee3 100644 --- a/lustre/ldlm/ldlm_lib.c +++ b/lustre/ldlm/ldlm_lib.c @@ -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); -- 1.8.3.1