From e8abdb3150a057ee0a7e4a9a4f355f9ca8642c91 Mon Sep 17 00:00:00 2001 From: Mike Tappro Date: Wed, 17 Feb 2010 10:45:43 +0300 Subject: [PATCH 1/1] b=20997 Reset imp_vbr_fail flag upon eviction Flag was reset when recovery ends but recovery can be aborted and this flag stands after reconnection and cause false eviction later i=rread i=zam --- lustre/ptlrpc/import.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c index d5a1e74..d2a9ad4 100644 --- a/lustre/ptlrpc/import.c +++ b/lustre/ptlrpc/import.c @@ -1197,9 +1197,6 @@ static int completed_replay_interpret(const struct lu_env *env, CDEBUG(D_WARNING, "%s: version recovery fails, reconnecting\n", req->rq_import->imp_obd->obd_name); - cfs_spin_lock(&req->rq_import->imp_lock); - req->rq_import->imp_vbr_failed = 0; - cfs_spin_unlock(&req->rq_import->imp_lock); } else { CDEBUG(D_HA, "%s: LAST_REPLAY message error: %d, " "reconnecting\n", @@ -1289,6 +1286,10 @@ int ptlrpc_import_recovery_state_machine(struct obd_import *imp) CDEBUG(D_HA, "evicted from %s@%s; invalidating\n", obd2cli_tgt(imp->imp_obd), imp->imp_connection->c_remote_uuid.uuid); + /* reset vbr_failed flag upon eviction */ + cfs_spin_lock(&imp->imp_lock); + imp->imp_vbr_failed = 0; + cfs_spin_unlock(&imp->imp_lock); #ifdef __KERNEL__ /* bug 17802: XXX client_disconnect_export vs connect request -- 1.8.3.1