+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ */
-#define MGR_STOPPING 1
-#define MGR_RUNNING 2
-#define MGR_STOPPED 4
-#define MGR_KILLED 8
-#define MGR_EVENT 16
-#define MGR_RECOVERING 32
-#define MGR_SIGNAL 64
+#ifndef _LUSTRE_HA_H
+#define _LUSTRE_HA_H
-struct lustre_ha_mgr {
- __u32 mgr_flags;
- struct task_struct *mgr_thread;
- wait_queue_head_t mgr_waitq;
- wait_queue_head_t mgr_ctl_waitq;
- spinlock_t mgr_lock;
-};
+struct obd_import;
+struct obd_export;
+struct obd_device;
+struct ptlrpc_request;
-struct lustre_ha_thread {
- char *name;
- struct lustre_ha_mgr *mgr;
- struct obd_device *dev;
-};
+
+void ptlrpc_run_failed_import_upcall(struct obd_import *imp);
+void ptlrpc_run_recovery_over_upcall(struct obd_device *obd);
+int ptlrpc_replay(struct obd_import *imp);
+int ptlrpc_resend(struct obd_import *imp);
+void ptlrpc_free_committed(struct obd_import *imp);
+void ptlrpc_wake_delayed(struct obd_import *imp);
+int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid);
+int ptlrpc_set_import_active(struct obd_import *imp, int active);
+void ptlrpc_activate_import(struct obd_import *imp);
+void ptlrpc_deactivate_import(struct obd_import *imp);
+void ptlrpc_invalidate_import(struct obd_import *imp, int in_rpc);
+void ptlrpc_fail_import(struct obd_import *imp, int generation);
+void ptlrpc_fail_export(struct obd_export *exp);
+
+#endif