diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-07-12 08:19:44 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-07-12 06:59:29 -0700 |
commit | 6ef7f0e25fb7c76231b4d4ae05cbc45330de300d (patch) | |
tree | 6e5b8537dfbee8b7d8e51cdbb62af1d9d0f31a35 /xlators/mgmt/glusterd/src/glusterd-sm.h | |
parent | 9bee476eabb5034a27e994008a12ef684755d76c (diff) |
Changes in CLI and glusterd
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 971 (dynamic volume management)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-sm.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-sm.h | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.h b/xlators/mgmt/glusterd/src/glusterd-sm.h index 087a4c301..6f03a8497 100644 --- a/xlators/mgmt/glusterd/src/glusterd-sm.h +++ b/xlators/mgmt/glusterd/src/glusterd-sm.h @@ -28,6 +28,7 @@ #include <pthread.h> #include <uuid/uuid.h> +#include "rpc-clnt.h" #include "glusterfs.h" #include "xlator.h" #include "logging.h" @@ -35,27 +36,52 @@ #include "authenticate.h" #include "fd.h" #include "byte-order.h" -#include "glusterd.h" +//#include "glusterd.h" #include "rpcsvc.h" - typedef enum glusterd_friend_sm_state_ { GD_FRIEND_STATE_DEFAULT = 0, GD_FRIEND_STATE_REQ_SENT, GD_FRIEND_STATE_REQ_RCVD, GD_FRIEND_STATE_BEFRIENDED, + GD_FRIEND_STATE_REQ_ACCEPTED, GD_FRIEND_STATE_REQ_SENT_RCVD, GD_FRIEND_STATE_REJECTED, + GD_FRIEND_STATE_UNFRIEND_SENT, GD_FRIEND_STATE_MAX } glusterd_friend_sm_state_t; +typedef struct glusterd_peer_state_info_ { + glusterd_friend_sm_state_t state; + struct timeval transition_time; +}glusterd_peer_state_info_t; + + +struct glusterd_peerinfo_ { + uuid_t uuid; + char uuid_str[50]; + glusterd_peer_state_info_t state; + char *hostname; + int port; + struct list_head uuid_list; + struct list_head op_peers_list; + struct rpc_clnt *rpc; +}; + +typedef struct glusterd_peerinfo_ glusterd_peerinfo_t; + + + typedef enum glusterd_friend_sm_event_type_ { GD_FRIEND_EVENT_NONE = 0, GD_FRIEND_EVENT_PROBE, GD_FRIEND_EVENT_INIT_FRIEND_REQ, GD_FRIEND_EVENT_RCVD_ACC, + GD_FRIEND_EVENT_LOCAL_ACC, GD_FRIEND_EVENT_RCVD_RJT, + GD_FRIEND_EVENT_LOCAL_RJT, GD_FRIEND_EVENT_RCVD_FRIEND_REQ, + GD_FRIEND_EVENT_INIT_REMOVE_FRIEND, GD_FRIEND_EVENT_REMOVE_FRIEND, GD_FRIEND_EVENT_MAX } glusterd_friend_sm_event_type_t; |