Whamcloud - gitweb
6598be05ebc884cb9f7c775d2fbde537db3d65bb
[fs/lustre-release.git] / lustre / include / linux / lustre_ha.h
1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=8:tabstop=8:
3  */
4
5 #ifndef _LUSTRE_HA_H
6 #define _LUSTRE_HA_H
7
8 #include <linux/lustre_net.h>
9
10 #define LUSTRE_HA_NAME "ptlrpc"
11
12 #define CONNMGR_CONNECT 1
13
14 extern struct recovd_obd *ptlrpc_connmgr;
15
16 struct connmgr_thread {
17         struct recovd_obd *mgr;
18         char *name;
19 };
20
21 struct connmgr_body {
22         __u64 conn;
23         __u64 conn_token;
24         __u32 generation;
25         __u8  conn_uuid[37];
26 };
27
28 int connmgr_connect(struct recovd_obd *mgr, struct ptlrpc_connection *conn);
29 int connmgr_handle(struct obd_device *dev, struct ptlrpc_service *svc,
30                    struct ptlrpc_request *req);
31 void recovd_cli_fail(struct ptlrpc_client *cli);
32 void recovd_cli_manage(struct recovd_obd *mgr, struct ptlrpc_client *cli);
33 void recovd_cli_fixed(struct ptlrpc_client *cli);
34 int recovd_setup(struct recovd_obd *mgr);
35 int recovd_cleanup(struct recovd_obd *mgr);
36
37 #endif