diff options
author | Kaushal M <kaushal@redhat.com> | 2012-09-03 15:58:26 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2012-10-30 10:18:58 -0700 |
commit | d7cc779da48e484d0edb7bfbd903f941d0ccca32 (patch) | |
tree | 1d4cc1e5e3772b35a3861538d10da6229ffc77f8 /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 5c272f4d1c4ae67a3cf5a6af17518c82f520c1de (diff) |
glusterd: op-version handshake implementation
Brings in a new rpc program MGMT_HANDSHAKE, which implements the op-version
handshake. This is required for bringing in the op-version feature as described
in http://www.gluster.org/community/documentation/index.php/Features/Opversion
Change-Id: I4333fd2714dbbd3a2a3fca5862cbb3c56615529e
BUG: 814534
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.org/3688
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index b3fe1400aaa..0bf5beee884 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -91,6 +91,23 @@ typedef struct { gf_boolean_t running; } nodesrv_t; +#define GD_OP_VERSION_KEY "operating-version" +#define GD_MIN_OP_VERSION_KEY "minimum-operating-version" +#define GD_MAX_OP_VERSION_KEY "maxium-operating-version" + +/* Gluster versions - OP-VERSION mapping + * + * 3.3.0 - 1 + * 3.3.Next/3.Next - 2 + * + * (TODO: Change above comment once gluster version is finalised) + */ +#define GD_OP_VERSION_MIN 1 /* MIN is the fresh start op-version, mostly + should not change */ +#define GD_OP_VERSION_MAX 2 /* MAX VERSION is the maximum count in VME table, + should keep changing with introduction of newer + versions */ + typedef struct { struct _volfile_ctx *volfile; pthread_mutex_t mutex; @@ -110,15 +127,21 @@ typedef struct { gf_timer_t *timer; glusterd_sm_tr_log_t op_sm_log; struct rpc_clnt_program *gfs_mgmt; + struct list_head mount_specs; #ifdef DEBUG gf_boolean_t valgrind; #endif pthread_t brick_thread; void *hooks_priv; - xlator_t *xl; /* Should be set to 'THIS' before creating thread */ + xlator_t *xl; /* Should be set to 'THIS' before creating thread */ + + /* need for proper handshake_t */ + int op_version; /* Starts with 1 for 3.3.0 */ + } glusterd_conf_t; + typedef enum gf_brick_status { GF_BRICK_STOPPED, GF_BRICK_STARTED, @@ -556,8 +579,8 @@ glusterd_volume_txn (rpcsvc_request_t *req, char *volname, int flags, glusterd_op_t op); int -glusterd_peer_handshake (xlator_t *this, struct rpc_clnt *rpc, - glusterd_peerctx_t *peerctx); +glusterd_peer_dump_version (xlator_t *this, struct rpc_clnt *rpc, + glusterd_peerctx_t *peerctx); int glusterd_validate_reconfopts (glusterd_volinfo_t *volinfo, dict_t *val_dict, char **op_errstr); |