EXIT;
}
-static void target_recovery_expired(unsigned long castmeharder)
-{
- struct obd_device *obd = (struct obd_device *)castmeharder;
- LCONSOLE_WARN("%s: recovery timed out; %d clients never reconnected "
- "after %lds (%d clients did)\n",
- obd->obd_name, obd->obd_recoverable_clients,
- cfs_time_current_sec()- obd->obd_recovery_start,
- obd->obd_connected_clients);
- spin_lock_bh(&obd->obd_processing_task_lock);
- if (obd->obd_recovering)
- obd->obd_abort_recovery = 1;
- cfs_waitq_signal(&obd->obd_next_transno_waitq);
- spin_unlock_bh(&obd->obd_processing_task_lock);
-}
-
-
/* obd_processing_task_lock should be held */
void target_cancel_recovery_timer(struct obd_device *obd)
{
obd->obd_name, (unsigned)left);
}
-static void resume_recovery_timer(struct obd_device *obd)
-{
- LASSERT(!cfs_timer_is_armed(&obd->obd_recovery_timer));
-
- /* to be safe, make it at least OBD_RECOVERY_FACTOR * obd_timeout */
- reset_recovery_timer(obd, OBD_RECOVERY_FACTOR * obd_timeout, 1);
-}
-
static void check_and_start_recovery_timer(struct obd_device *obd)
{
spin_lock_bh(&obd->obd_processing_task_lock);
RETURN(0);
}
+static void resume_recovery_timer(struct obd_device *obd)
+{
+ LASSERT(!cfs_timer_is_armed(&obd->obd_recovery_timer));
+
+ /* to be safe, make it at least OBD_RECOVERY_FACTOR * obd_timeout */
+ reset_recovery_timer(obd, OBD_RECOVERY_FACTOR * obd_timeout, 1);
+}
+
static int target_recovery_thread(void *arg)
{
struct obd_device *obd = arg;
}
EXPORT_SYMBOL(target_recovery_fini);
+static void target_recovery_expired(unsigned long castmeharder)
+{
+ struct obd_device *obd = (struct obd_device *)castmeharder;
+ LCONSOLE_WARN("%s: recovery timed out; %d clients never reconnected "
+ "after %lds (%d clients did)\n",
+ obd->obd_name, obd->obd_recoverable_clients,
+ cfs_time_current_sec()- obd->obd_recovery_start,
+ obd->obd_connected_clients);
+ spin_lock_bh(&obd->obd_processing_task_lock);
+ if (obd->obd_recovering)
+ obd->obd_abort_recovery = 1;
+ cfs_waitq_signal(&obd->obd_next_transno_waitq);
+ spin_unlock_bh(&obd->obd_processing_task_lock);
+}
+
void target_recovery_init(struct obd_device *obd, svc_handler_t handler)
{
if (obd->obd_max_recoverable_clients == 0)