Whamcloud - gitweb
- Fixed some screwy ldlm resource refcount issues
[fs/lustre-release.git] / lustre / include / linux / lustre_ha.h
index 652a64c..6598be0 100644 (file)
@@ -1,35 +1,37 @@
+/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
+ * vim:expandtab:shiftwidth=8:tabstop=8:
+ */
+
 #ifndef _LUSTRE_HA_H
 #define _LUSTRE_HA_H
 
-#define MGR_STOPPING   1
-#define MGR_RUNNING    2
-#define MGR_STOPPED    4
-#define MGR_KILLED     8
-#define MGR_EVENT      16
-#define MGR_WORKING    32
-#define MGR_SIGNAL     64
-
-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;
-        time_t              mgr_waketime;
-        struct list_head    mgr_connections_lh;  /* connections managed by the mgr */
-        struct list_head    mgr_troubled_lh;  /* connections in trouble */
-};
+#include <linux/lustre_net.h>
+
+#define LUSTRE_HA_NAME "ptlrpc"
+
+#define CONNMGR_CONNECT 1
 
-struct lustre_ha_thread { 
-        char                 *name;
-        struct lustre_ha_mgr *mgr; 
-        struct obd_device    *dev;
-}; 
+extern struct recovd_obd *ptlrpc_connmgr;
 
-int llite_ha_cleanup(struct lustre_ha_mgr *mgr);
-struct lustre_ha_mgr *llite_ha_setup(void);
-void llite_ha_conn_fail(struct ptlrpc_client *cli);
-void llite_ha_conn_manage(struct lustre_ha_mgr *mgr, struct ptlrpc_client *cli);
+struct connmgr_thread {
+        struct recovd_obd *mgr;
+        char *name;
+};
+
+struct connmgr_body {
+        __u64 conn;
+        __u64 conn_token;
+        __u32 generation;
+        __u8  conn_uuid[37];
+};
 
+int connmgr_connect(struct recovd_obd *mgr, struct ptlrpc_connection *conn);
+int connmgr_handle(struct obd_device *dev, struct ptlrpc_service *svc,
+                   struct ptlrpc_request *req);
+void recovd_cli_fail(struct ptlrpc_client *cli);
+void recovd_cli_manage(struct recovd_obd *mgr, struct ptlrpc_client *cli);
+void recovd_cli_fixed(struct ptlrpc_client *cli);
+int recovd_setup(struct recovd_obd *mgr);
+int recovd_cleanup(struct recovd_obd *mgr);
 
 #endif