summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorVijay Bellur <vijay@gluster.com>2010-07-12 08:19:44 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-07-12 06:59:29 -0700
commit6ef7f0e25fb7c76231b4d4ae05cbc45330de300d (patch)
tree6e5b8537dfbee8b7d8e51cdbb62af1d9d0f31a35 /xlators/protocol
parent9bee476eabb5034a27e994008a12ef684755d76c (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/protocol')
-rw-r--r--xlators/protocol/lib/src/cli-xdr.c126
-rw-r--r--xlators/protocol/lib/src/cli-xdr.h108
-rw-r--r--xlators/protocol/lib/src/gluster1.h46
-rw-r--r--xlators/protocol/lib/src/gluster1.x27
-rw-r--r--xlators/protocol/lib/src/gluster1_xdr.c79
-rw-r--r--xlators/protocol/lib/src/protocol-common.h5
6 files changed, 363 insertions, 28 deletions
diff --git a/xlators/protocol/lib/src/cli-xdr.c b/xlators/protocol/lib/src/cli-xdr.c
index c6a351b124f..ba9565261c1 100644
--- a/xlators/protocol/lib/src/cli-xdr.c
+++ b/xlators/protocol/lib/src/cli-xdr.c
@@ -36,6 +36,12 @@ gf_xdr_to_cli_probe_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_probe_req);
}
+ssize_t
+gf_xdr_to_cli_probe_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_probe_rsp);
+}
ssize_t
gf_xdr_from_cli_probe_req (struct iovec outmsg, void *req)
@@ -44,8 +50,64 @@ gf_xdr_from_cli_probe_req (struct iovec outmsg, void *req)
(xdrproc_t)xdr_gf1_cli_probe_req);
}
+ssize_t
+gf_xdr_serialize_cli_deprobe_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_deprobe_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_deprobe_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_deprobe_req);
+}
+
+ssize_t
+gf_xdr_to_cli_deprobe_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_deprobe_rsp);
+}
+
+ssize_t
+gf_xdr_from_cli_deprobe_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_deprobe_req);
+}
+
+ssize_t
+gf_xdr_serialize_cli_peer_list_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_peer_list_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_peer_list_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_peer_list_req);
+}
+
+ssize_t
+gf_xdr_to_cli_peer_list_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_peer_list_rsp);
+}
ssize_t
+gf_xdr_from_cli_peer_list_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_peer_list_req);
+}
+ssize_t
gf_xdr_serialize_cli_create_vol_rsp (struct iovec outmsg, void *rsp)
{
return xdr_serialize_generic (outmsg, (void *)rsp,
@@ -60,6 +122,12 @@ gf_xdr_to_cli_create_vol_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_create_vol_req);
}
+ssize_t
+gf_xdr_to_cli_create_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_create_vol_rsp);
+}
ssize_t
gf_xdr_from_cli_create_vol_req (struct iovec outmsg, void *req)
@@ -86,6 +154,13 @@ gf_xdr_to_cli_delete_vol_req (struct iovec inmsg, void *args)
ssize_t
+gf_xdr_to_cli_delete_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_delete_vol_rsp);
+}
+
+ssize_t
gf_xdr_from_cli_delete_vol_req (struct iovec outmsg, void *req)
{
return xdr_serialize_generic (outmsg, (void *)req,
@@ -107,6 +182,12 @@ gf_xdr_to_cli_start_vol_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_start_vol_req);
}
+ssize_t
+gf_xdr_to_cli_start_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_start_vol_rsp);
+}
ssize_t
gf_xdr_from_cli_start_vol_req (struct iovec outmsg, void *req)
@@ -131,6 +212,12 @@ gf_xdr_to_cli_stop_vol_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_stop_vol_req);
}
+ssize_t
+gf_xdr_to_cli_stop_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_stop_vol_rsp);
+}
ssize_t
gf_xdr_from_cli_stop_vol_req (struct iovec outmsg, void *req)
@@ -155,6 +242,12 @@ gf_xdr_to_cli_rename_vol_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_rename_vol_req);
}
+ssize_t
+gf_xdr_to_cli_rename_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_rename_vol_rsp);
+}
ssize_t
gf_xdr_from_cli_rename_vol_req (struct iovec outmsg, void *req)
@@ -173,13 +266,19 @@ gf_xdr_serialize_cli_defrag_vol_rsp (struct iovec outmsg, void *rsp)
}
ssize_t
+gf_xdr_to_cli_defrag_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_defrag_vol_rsp);
+}
+
+ssize_t
gf_xdr_to_cli_defrag_vol_req (struct iovec inmsg, void *args)
{
return xdr_to_generic (inmsg, (void *)args,
(xdrproc_t)xdr_gf1_cli_defrag_vol_req);
}
-
ssize_t
gf_xdr_from_cli_defrag_vol_req (struct iovec outmsg, void *req)
{
@@ -204,6 +303,12 @@ gf_xdr_to_cli_add_brick_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_add_brick_req);
}
+ssize_t
+gf_xdr_to_cli_add_brick_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_add_brick_rsp);
+}
ssize_t
gf_xdr_from_cli_add_brick_req (struct iovec outmsg, void *req)
@@ -230,6 +335,13 @@ gf_xdr_to_cli_remove_brick_req (struct iovec inmsg, void *args)
ssize_t
+gf_xdr_to_cli_remove_brick_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_remove_brick_rsp);
+}
+
+ssize_t
gf_xdr_from_cli_remove_brick_req (struct iovec outmsg, void *req)
{
return xdr_serialize_generic (outmsg, (void *)req,
@@ -252,6 +364,12 @@ gf_xdr_to_cli_replace_brick_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_replace_brick_req);
}
+ssize_t
+gf_xdr_to_cli_replace_brick_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_replace_brick_rsp);
+}
ssize_t
gf_xdr_from_cli_replace_brick_req (struct iovec outmsg, void *req)
@@ -275,6 +393,12 @@ gf_xdr_to_cli_set_vol_req (struct iovec inmsg, void *args)
(xdrproc_t)xdr_gf1_cli_set_vol_req);
}
+ssize_t
+gf_xdr_to_cli_set_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_set_vol_rsp);
+}
ssize_t
gf_xdr_from_cli_set_vol_req (struct iovec outmsg, void *req)
diff --git a/xlators/protocol/lib/src/cli-xdr.h b/xlators/protocol/lib/src/cli-xdr.h
index 9705071bad4..2ec4f95241e 100644
--- a/xlators/protocol/lib/src/cli-xdr.h
+++ b/xlators/protocol/lib/src/cli-xdr.h
@@ -33,86 +33,140 @@ ssize_t
gf_xdr_to_cli_probe_req (struct iovec inmsg, void *args);
ssize_t
+gf_xdr_to_cli_probe_rsp (struct iovec inmsg, void *args);
+
+ssize_t
gf_xdr_from_cli_probe_req (struct iovec outmsg, void *req);
ssize_t
+gf_xdr_serialize_cli_deprobe_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_deprobe_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_deprobe_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_deprobe_req (struct iovec outmsg, void *req);
+
+ssize_t
+gf_xdr_serialize_cli_peer_list_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_peer_list_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_peer_list_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_peer_list_req (struct iovec outmsg, void *req);
+
+ssize_t
gf_xdr_serialize_cli_create_vol_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_create_vol_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_create_vol_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_create_vol_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_delete_vol_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_delete_vol_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_delete_vol_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_delete_vol_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_start_vol_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_start_vol_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_start_vol_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_start_vol_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_stop_vol_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_stop_vol_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_stop_vol_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_stop_vol_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_rename_vol_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_rename_vol_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_rename_vol_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_rename_vol_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_defrag_vol_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_defrag_vol_req (struct iovec inmsg, void *args);
-
+
ssize_t
gf_xdr_from_cli_defrag_vol_req (struct iovec outmsg, void *req);
-
+
+ssize_t
+gf_xdr_to_cli_defrag_vol_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_serialize_cli_add_brick_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_add_brick_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_add_brick_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_add_brick_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_remove_brick_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_remove_brick_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_remove_brick_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_remove_brick_req (struct iovec outmsg, void *req);
-
+
ssize_t
gf_xdr_serialize_cli_replace_brick_rsp (struct iovec outmsg, void *rsp);
-
+
ssize_t
gf_xdr_to_cli_replace_brick_req (struct iovec inmsg, void *args);
-
+
+ssize_t
+gf_xdr_to_cli_replace_brick_rsp (struct iovec inmsg, void *args);
+
ssize_t
gf_xdr_from_cli_replace_brick_req (struct iovec outmsg, void *req);
@@ -122,6 +176,8 @@ gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp);
ssize_t
gf_xdr_to_cli_set_vol_req (struct iovec inmsg, void *args);
+ssize_t
+gf_xdr_to_cli_set_vol_rsp (struct iovec inmsg, void *args);
ssize_t
gf_xdr_from_cli_set_vol_req (struct iovec outmsg, void *req);
diff --git a/xlators/protocol/lib/src/gluster1.h b/xlators/protocol/lib/src/gluster1.h
index 359fdcf42ba..81948b34aac 100644
--- a/xlators/protocol/lib/src/gluster1.h
+++ b/xlators/protocol/lib/src/gluster1.h
@@ -31,6 +31,11 @@ enum gf1_cli_replace_op {
};
typedef enum gf1_cli_replace_op gf1_cli_replace_op;
+enum gf1_cli_enum_friends_list {
+ GF_CLI_LIST_ALL = 1,
+};
+typedef enum gf1_cli_enum_friends_list gf1_cli_enum_friends_list;
+
struct gf1_cli_probe_req {
char *hostname;
};
@@ -43,6 +48,37 @@ struct gf1_cli_probe_rsp {
};
typedef struct gf1_cli_probe_rsp gf1_cli_probe_rsp;
+struct gf1_cli_deprobe_req {
+ char *hostname;
+};
+typedef struct gf1_cli_deprobe_req gf1_cli_deprobe_req;
+
+struct gf1_cli_deprobe_rsp {
+ int op_ret;
+ int op_errno;
+ char *hostname;
+};
+typedef struct gf1_cli_deprobe_rsp gf1_cli_deprobe_rsp;
+
+struct gf1_cli_peer_list_req {
+ int flags;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
+};
+typedef struct gf1_cli_peer_list_req gf1_cli_peer_list_req;
+
+struct gf1_cli_peer_list_rsp {
+ int op_ret;
+ int op_errno;
+ struct {
+ u_int friends_len;
+ char *friends_val;
+ } friends;
+};
+typedef struct gf1_cli_peer_list_rsp gf1_cli_peer_list_rsp;
+
struct gf1_cli_create_vol_req {
char *volname;
gf1_cluster_type type;
@@ -200,8 +236,13 @@ typedef struct gf1_cli_set_vol_rsp gf1_cli_set_vol_rsp;
#if defined(__STDC__) || defined(__cplusplus)
extern bool_t xdr_gf1_cluster_type (XDR *, gf1_cluster_type*);
extern bool_t xdr_gf1_cli_replace_op (XDR *, gf1_cli_replace_op*);
+extern bool_t xdr_gf1_cli_enum_friends_list (XDR *, gf1_cli_enum_friends_list*);
extern bool_t xdr_gf1_cli_probe_req (XDR *, gf1_cli_probe_req*);
extern bool_t xdr_gf1_cli_probe_rsp (XDR *, gf1_cli_probe_rsp*);
+extern bool_t xdr_gf1_cli_deprobe_req (XDR *, gf1_cli_deprobe_req*);
+extern bool_t xdr_gf1_cli_deprobe_rsp (XDR *, gf1_cli_deprobe_rsp*);
+extern bool_t xdr_gf1_cli_peer_list_req (XDR *, gf1_cli_peer_list_req*);
+extern bool_t xdr_gf1_cli_peer_list_rsp (XDR *, gf1_cli_peer_list_rsp*);
extern bool_t xdr_gf1_cli_create_vol_req (XDR *, gf1_cli_create_vol_req*);
extern bool_t xdr_gf1_cli_create_vol_rsp (XDR *, gf1_cli_create_vol_rsp*);
extern bool_t xdr_gf1_cli_delete_vol_req (XDR *, gf1_cli_delete_vol_req*);
@@ -226,8 +267,13 @@ extern bool_t xdr_gf1_cli_set_vol_rsp (XDR *, gf1_cli_set_vol_rsp*);
#else /* K&R C */
extern bool_t xdr_gf1_cluster_type ();
extern bool_t xdr_gf1_cli_replace_op ();
+extern bool_t xdr_gf1_cli_enum_friends_list ();
extern bool_t xdr_gf1_cli_probe_req ();
extern bool_t xdr_gf1_cli_probe_rsp ();
+extern bool_t xdr_gf1_cli_deprobe_req ();
+extern bool_t xdr_gf1_cli_deprobe_rsp ();
+extern bool_t xdr_gf1_cli_peer_list_req ();
+extern bool_t xdr_gf1_cli_peer_list_rsp ();
extern bool_t xdr_gf1_cli_create_vol_req ();
extern bool_t xdr_gf1_cli_create_vol_rsp ();
extern bool_t xdr_gf1_cli_delete_vol_req ();
diff --git a/xlators/protocol/lib/src/gluster1.x b/xlators/protocol/lib/src/gluster1.x
index 1fe7ef14f6b..a8af1b7d658 100644
--- a/xlators/protocol/lib/src/gluster1.x
+++ b/xlators/protocol/lib/src/gluster1.x
@@ -13,6 +13,10 @@
GF_REPLACE_OP_STATUS
} ;
+enum gf1_cli_enum_friends_list {
+ GF_CLI_LIST_ALL = 1
+} ;
+
struct gf1_cli_probe_req {
string hostname<>;
} ;
@@ -23,6 +27,27 @@
string hostname<>;
} ;
+ struct gf1_cli_deprobe_req {
+ string hostname<>;
+} ;
+
+ struct gf1_cli_deprobe_rsp {
+ int op_ret;
+ int op_errno;
+ string hostname<>;
+} ;
+
+struct gf1_cli_peer_list_req {
+ int flags;
+ opaque dict<>;
+} ;
+
+struct gf1_cli_peer_list_rsp {
+ int op_ret;
+ int op_errno;
+ opaque friends<>;
+} ;
+
struct gf1_cli_create_vol_req {
string volname<>;
gf1_cluster_type type;
@@ -39,7 +64,7 @@
struct gf1_cli_delete_vol_req {
string volname<>;
} ;
-
+
struct gf1_cli_delete_vol_rsp {
int op_ret;
int op_errno;
diff --git a/xlators/protocol/lib/src/gluster1_xdr.c b/xlators/protocol/lib/src/gluster1_xdr.c
index 2cd83315ac8..9a44b9989ae 100644
--- a/xlators/protocol/lib/src/gluster1_xdr.c
+++ b/xlators/protocol/lib/src/gluster1_xdr.c
@@ -8,6 +8,7 @@
bool_t
xdr_gf1_cluster_type (XDR *xdrs, gf1_cluster_type *objp)
{
+
if (!xdr_enum (xdrs, (enum_t *) objp))
return FALSE;
return TRUE;
@@ -16,6 +17,16 @@ xdr_gf1_cluster_type (XDR *xdrs, gf1_cluster_type *objp)
bool_t
xdr_gf1_cli_replace_op (XDR *xdrs, gf1_cli_replace_op *objp)
{
+
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_enum_friends_list (XDR *xdrs, gf1_cli_enum_friends_list *objp)
+{
+
if (!xdr_enum (xdrs, (enum_t *) objp))
return FALSE;
return TRUE;
@@ -24,6 +35,7 @@ xdr_gf1_cli_replace_op (XDR *xdrs, gf1_cli_replace_op *objp)
bool_t
xdr_gf1_cli_probe_req (XDR *xdrs, gf1_cli_probe_req *objp)
{
+
if (!xdr_string (xdrs, &objp->hostname, ~0))
return FALSE;
return TRUE;
@@ -32,6 +44,29 @@ xdr_gf1_cli_probe_req (XDR *xdrs, gf1_cli_probe_req *objp)
bool_t
xdr_gf1_cli_probe_rsp (XDR *xdrs, gf1_cli_probe_rsp *objp)
{
+
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->hostname, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_deprobe_req (XDR *xdrs, gf1_cli_deprobe_req *objp)
+{
+
+ if (!xdr_string (xdrs, &objp->hostname, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_deprobe_rsp (XDR *xdrs, gf1_cli_deprobe_rsp *objp)
+{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -42,8 +77,33 @@ xdr_gf1_cli_probe_rsp (XDR *xdrs, gf1_cli_probe_rsp *objp)
}
bool_t
+xdr_gf1_cli_peer_list_req (XDR *xdrs, gf1_cli_peer_list_req *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->flags))
+ return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_peer_list_rsp (XDR *xdrs, gf1_cli_peer_list_rsp *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->friends.friends_val, (u_int *) &objp->friends.friends_len, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_gf1_cli_create_vol_req (XDR *xdrs, gf1_cli_create_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
if (!xdr_gf1_cluster_type (xdrs, &objp->type))
@@ -58,6 +118,7 @@ xdr_gf1_cli_create_vol_req (XDR *xdrs, gf1_cli_create_vol_req *objp)
bool_t
xdr_gf1_cli_create_vol_rsp (XDR *xdrs, gf1_cli_create_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -70,6 +131,7 @@ xdr_gf1_cli_create_vol_rsp (XDR *xdrs, gf1_cli_create_vol_rsp *objp)
bool_t
xdr_gf1_cli_delete_vol_req (XDR *xdrs, gf1_cli_delete_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
return TRUE;
@@ -78,6 +140,7 @@ xdr_gf1_cli_delete_vol_req (XDR *xdrs, gf1_cli_delete_vol_req *objp)
bool_t
xdr_gf1_cli_delete_vol_rsp (XDR *xdrs, gf1_cli_delete_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -90,6 +153,7 @@ xdr_gf1_cli_delete_vol_rsp (XDR *xdrs, gf1_cli_delete_vol_rsp *objp)
bool_t
xdr_gf1_cli_start_vol_req (XDR *xdrs, gf1_cli_start_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
return TRUE;
@@ -98,6 +162,7 @@ xdr_gf1_cli_start_vol_req (XDR *xdrs, gf1_cli_start_vol_req *objp)
bool_t
xdr_gf1_cli_start_vol_rsp (XDR *xdrs, gf1_cli_start_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -110,6 +175,7 @@ xdr_gf1_cli_start_vol_rsp (XDR *xdrs, gf1_cli_start_vol_rsp *objp)
bool_t
xdr_gf1_cli_stop_vol_req (XDR *xdrs, gf1_cli_stop_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
return TRUE;
@@ -118,6 +184,7 @@ xdr_gf1_cli_stop_vol_req (XDR *xdrs, gf1_cli_stop_vol_req *objp)
bool_t
xdr_gf1_cli_stop_vol_rsp (XDR *xdrs, gf1_cli_stop_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -130,6 +197,7 @@ xdr_gf1_cli_stop_vol_rsp (XDR *xdrs, gf1_cli_stop_vol_rsp *objp)
bool_t
xdr_gf1_cli_rename_vol_req (XDR *xdrs, gf1_cli_rename_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->old_volname, ~0))
return FALSE;
if (!xdr_string (xdrs, &objp->new_volname, ~0))
@@ -140,6 +208,7 @@ xdr_gf1_cli_rename_vol_req (XDR *xdrs, gf1_cli_rename_vol_req *objp)
bool_t
xdr_gf1_cli_rename_vol_rsp (XDR *xdrs, gf1_cli_rename_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -152,6 +221,7 @@ xdr_gf1_cli_rename_vol_rsp (XDR *xdrs, gf1_cli_rename_vol_rsp *objp)
bool_t
xdr_gf1_cli_defrag_vol_req (XDR *xdrs, gf1_cli_defrag_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
return TRUE;
@@ -160,6 +230,7 @@ xdr_gf1_cli_defrag_vol_req (XDR *xdrs, gf1_cli_defrag_vol_req *objp)
bool_t
xdr_gf1_cli_defrag_vol_rsp (XDR *xdrs, gf1_cli_defrag_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -172,6 +243,7 @@ xdr_gf1_cli_defrag_vol_rsp (XDR *xdrs, gf1_cli_defrag_vol_rsp *objp)
bool_t
xdr_gf1_cli_add_brick_req (XDR *xdrs, gf1_cli_add_brick_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
if (!xdr_gf1_cluster_type (xdrs, &objp->type))
@@ -186,6 +258,7 @@ xdr_gf1_cli_add_brick_req (XDR *xdrs, gf1_cli_add_brick_req *objp)
bool_t
xdr_gf1_cli_add_brick_rsp (XDR *xdrs, gf1_cli_add_brick_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -198,6 +271,7 @@ xdr_gf1_cli_add_brick_rsp (XDR *xdrs, gf1_cli_add_brick_rsp *objp)
bool_t
xdr_gf1_cli_remove_brick_req (XDR *xdrs, gf1_cli_remove_brick_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
if (!xdr_gf1_cluster_type (xdrs, &objp->type))
@@ -212,6 +286,7 @@ xdr_gf1_cli_remove_brick_req (XDR *xdrs, gf1_cli_remove_brick_req *objp)
bool_t
xdr_gf1_cli_remove_brick_rsp (XDR *xdrs, gf1_cli_remove_brick_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -224,6 +299,7 @@ xdr_gf1_cli_remove_brick_rsp (XDR *xdrs, gf1_cli_remove_brick_rsp *objp)
bool_t
xdr_gf1_cli_replace_brick_req (XDR *xdrs, gf1_cli_replace_brick_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
if (!xdr_gf1_cli_replace_op (xdrs, &objp->op))
@@ -238,6 +314,7 @@ xdr_gf1_cli_replace_brick_req (XDR *xdrs, gf1_cli_replace_brick_req *objp)
bool_t
xdr_gf1_cli_replace_brick_rsp (XDR *xdrs, gf1_cli_replace_brick_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
@@ -250,6 +327,7 @@ xdr_gf1_cli_replace_brick_rsp (XDR *xdrs, gf1_cli_replace_brick_rsp *objp)
bool_t
xdr_gf1_cli_set_vol_req (XDR *xdrs, gf1_cli_set_vol_req *objp)
{
+
if (!xdr_string (xdrs, &objp->volname, ~0))
return FALSE;
if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
@@ -260,6 +338,7 @@ xdr_gf1_cli_set_vol_req (XDR *xdrs, gf1_cli_set_vol_req *objp)
bool_t
xdr_gf1_cli_set_vol_rsp (XDR *xdrs, gf1_cli_set_vol_rsp *objp)
{
+
if (!xdr_int (xdrs, &objp->op_ret))
return FALSE;
if (!xdr_int (xdrs, &objp->op_errno))
diff --git a/xlators/protocol/lib/src/protocol-common.h b/xlators/protocol/lib/src/protocol-common.h
index 0cb62426c66..c4fc12a7042 100644
--- a/xlators/protocol/lib/src/protocol-common.h
+++ b/xlators/protocol/lib/src/protocol-common.h
@@ -83,7 +83,10 @@ enum gf_mgmt_procnum {
GD_MGMT_CLUSTER_UNLOCK,
GD_MGMT_STAGE_OP,
GD_MGMT_COMMIT_OP,
+ GD_MGMT_FRIEND_REMOVE,
GD_MGMT_CLI_PROBE,
+ GD_MGMT_CLI_DEPROBE,
+ GD_MGMT_CLI_LIST_FRIENDS,
GD_MGMT_CLI_CREATE_VOLUME,
GD_MGMT_CLI_GET_VOLUME,
GD_MGMT_CLI_DELETE_VOLUME,
@@ -101,6 +104,8 @@ enum gf_mgmt_procnum {
enum gf_cli_procnum {
GF1_CLI_NULL = GD_MGMT_MAXVALUE+1, /* 0 */
GF1_CLI_PROBE,
+ GF1_CLI_DEPROBE,
+ GF1_CLI_LIST_FRIENDS,
GF1_CLI_CREATE_VOLUME,
GF1_CLI_GET_VOLUME,
GF1_CLI_DELETE_VOLUME,