From 33603bf6d58289738e5291c42934161847694201 Mon Sep 17 00:00:00 2001 From: shadow Date: Wed, 28 Jan 2009 09:14:36 +0000 Subject: [PATCH] don't lose wakeup for imp_recovery_waitq Branch b1_6 b=18154 i=nathan i=rread --- lustre/ChangeLog | 8 ++++++++ lustre/ptlrpc/client.c | 4 ++-- lustre/ptlrpc/import.c | 6 +++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index d8a1208..2112105 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -45,6 +45,14 @@ tbd Sun Microsystems, Inc. more information, please refer to bugzilla 17630. Severity : normal +Frequency : rare +Bugzilla : 18154 +Descriptoin: don't lose wakeup for imp_recovery_waitq +Details : recover_import_no_retry or invalidate_import and import_close can + both sleep on imp_recovery_waitq, but we was send only one wakeup + to sleep queue. + +Severity : normal Frequency : start MDS on uncleanly shutdowned MDS device Bugzilla : 16839 Descriptoin: ll_sync thread stay in waiting mds<>ost recovery finished diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c index a6e6edf..02fa834 100644 --- a/lustre/ptlrpc/client.c +++ b/lustre/ptlrpc/client.c @@ -1293,7 +1293,7 @@ int ptlrpc_check_set(struct ptlrpc_request_set *set) spin_unlock(&imp->imp_lock); set->set_remaining--; - cfs_waitq_signal(&imp->imp_recovery_waitq); + cfs_waitq_broadcast(&imp->imp_recovery_waitq); } /* If we hit an error, we want to recover promptly. */ @@ -2098,7 +2098,7 @@ restart: LASSERT(!req->rq_receiving_reply); ptlrpc_rqphase_move(req, RQ_PHASE_INTERPRET); - cfs_waitq_signal(&imp->imp_recovery_waitq); + cfs_waitq_broadcast(&imp->imp_recovery_waitq); RETURN(rc); } diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index 32d7503..3964762 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -353,7 +353,7 @@ void ptlrpc_invalidate_import(struct obd_import *imp) obd_import_event(imp->imp_obd, imp, IMP_EVENT_INVALIDATE); atomic_dec(&imp->imp_inval_count); - cfs_waitq_signal(&imp->imp_recovery_waitq); + cfs_waitq_broadcast(&imp->imp_recovery_waitq); } /* unset imp_invalid */ @@ -1110,7 +1110,7 @@ finish: imp->imp_last_recon = 0; spin_unlock(&imp->imp_lock); - cfs_waitq_signal(&imp->imp_recovery_waitq); + cfs_waitq_broadcast(&imp->imp_recovery_waitq); RETURN(rc); } @@ -1287,7 +1287,7 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp) } if (imp->imp_state == LUSTRE_IMP_FULL) { - cfs_waitq_signal(&imp->imp_recovery_waitq); + cfs_waitq_broadcast(&imp->imp_recovery_waitq); ptlrpc_wake_delayed(imp); } -- 1.8.3.1