summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
Diffstat (limited to 'rpc')
-rw-r--r--rpc/rpc-lib/src/protocol-common.h2
-rw-r--r--rpc/xdr/src/cli1-xdr.c32
-rw-r--r--rpc/xdr/src/cli1-xdr.h27
-rw-r--r--rpc/xdr/src/cli1.c30
-rw-r--r--rpc/xdr/src/cli1.h12
-rw-r--r--rpc/xdr/src/cli1.x15
6 files changed, 115 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h
index a84c1eb..40283bf 100644
--- a/rpc/rpc-lib/src/protocol-common.h
+++ b/rpc/rpc-lib/src/protocol-common.h
@@ -103,6 +103,7 @@ enum gf_mgmt_procnum_ {
GD_MGMT_CLI_LOG_LOCATE,
GD_MGMT_CLI_LOG_ROTATE,
GD_MGMT_CLI_SYNC_VOLUME,
+ GD_MGMT_CLI_RESET_VOLUME,
GD_MGMT_MAXVALUE,
};
@@ -131,6 +132,7 @@ enum gf_cli_procnum {
GF1_CLI_GETSPEC,
GF1_CLI_PMAP_PORTBYBRICK,
GF1_CLI_SYNC_VOLUME,
+ GF1_CLI_RESET_VOLUME,
GF1_CLI_MAXVALUE,
};
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index cdf7be2..334cd26 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com>
+ Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com>
This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify
@@ -93,7 +93,7 @@ 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)
{
- register int32_t *buf;
+ register int32_t *buf;
if (xdrs->x_op == XDR_ENCODE) {
@@ -464,6 +464,32 @@ xdr_gf1_cli_replace_brick_rsp (XDR *xdrs, gf1_cli_replace_brick_rsp *objp)
}
bool_t
+xdr_gf1_cli_reset_vol_req (XDR *xdrs, gf1_cli_reset_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))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_reset_vol_rsp (XDR *xdrs, gf1_cli_reset_vol_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->volname, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_gf1_cli_set_vol_req (XDR *xdrs, gf1_cli_set_vol_req *objp)
{
@@ -484,6 +510,8 @@ xdr_gf1_cli_set_vol_rsp (XDR *xdrs, gf1_cli_set_vol_rsp *objp)
return FALSE;
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))
+ return FALSE;
return TRUE;
}
diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h
index 9988d54..7369ba8 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2010 Gluster, Inc. <http://www.gluster.com>
+ Copyright (c) 2007-2010 Gluster, Inc. <http://www.gluster.com>
This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify
@@ -282,6 +282,23 @@ struct gf1_cli_replace_brick_rsp {
};
typedef struct gf1_cli_replace_brick_rsp gf1_cli_replace_brick_rsp;
+struct gf1_cli_reset_vol_req {
+ char *volname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
+};
+typedef struct gf1_cli_reset_vol_req gf1_cli_reset_vol_req;
+
+struct gf1_cli_reset_vol_rsp {
+ int op_ret;
+ int op_errno;
+ char *volname;
+ char *op_errstr;
+};
+typedef struct gf1_cli_reset_vol_rsp gf1_cli_reset_vol_rsp;
+
struct gf1_cli_set_vol_req {
char *volname;
struct {
@@ -295,6 +312,10 @@ struct gf1_cli_set_vol_rsp {
int op_ret;
int op_errno;
char *volname;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
};
typedef struct gf1_cli_set_vol_rsp gf1_cli_set_vol_rsp;
@@ -387,6 +408,8 @@ extern bool_t xdr_gf1_cli_remove_brick_req (XDR *, gf1_cli_remove_brick_req*);
extern bool_t xdr_gf1_cli_remove_brick_rsp (XDR *, gf1_cli_remove_brick_rsp*);
extern bool_t xdr_gf1_cli_replace_brick_req (XDR *, gf1_cli_replace_brick_req*);
extern bool_t xdr_gf1_cli_replace_brick_rsp (XDR *, gf1_cli_replace_brick_rsp*);
+extern bool_t xdr_gf1_cli_reset_vol_req (XDR *, gf1_cli_reset_vol_req*);
+extern bool_t xdr_gf1_cli_reset_vol_rsp (XDR *, gf1_cli_reset_vol_rsp*);
extern bool_t xdr_gf1_cli_set_vol_req (XDR *, gf1_cli_set_vol_req*);
extern bool_t xdr_gf1_cli_set_vol_rsp (XDR *, gf1_cli_set_vol_rsp*);
extern bool_t xdr_gf1_cli_log_filename_req (XDR *, gf1_cli_log_filename_req*);
@@ -431,6 +454,8 @@ extern bool_t xdr_gf1_cli_remove_brick_req ();
extern bool_t xdr_gf1_cli_remove_brick_rsp ();
extern bool_t xdr_gf1_cli_replace_brick_req ();
extern bool_t xdr_gf1_cli_replace_brick_rsp ();
+extern bool_t xdr_gf1_cli_reset_vol_req ();
+extern bool_t xdr_gf1_cli_reset_vol_rsp ();
extern bool_t xdr_gf1_cli_set_vol_req ();
extern bool_t xdr_gf1_cli_set_vol_rsp ();
extern bool_t xdr_gf1_cli_log_filename_req ();
diff --git a/rpc/xdr/src/cli1.c b/rpc/xdr/src/cli1.c
index 22b74fd..41a97f9 100644
--- a/rpc/xdr/src/cli1.c
+++ b/rpc/xdr/src/cli1.c
@@ -408,6 +408,36 @@ gf_xdr_from_cli_replace_brick_req (struct iovec outmsg, void *req)
}
ssize_t
+gf_xdr_serialize_cli_reset_vol_rsp (struct iovec outmsg, void *rsp)
+{
+ return xdr_serialize_generic (outmsg, (void *)rsp,
+ (xdrproc_t)xdr_gf1_cli_reset_vol_rsp);
+
+}
+
+ssize_t
+gf_xdr_to_cli_reset_vol_req (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_reset_vol_req);
+}
+
+ssize_t
+gf_xdr_to_cli_reset_vol_rsp (struct iovec inmsg, void *args)
+{
+ return xdr_to_generic (inmsg, (void *)args,
+ (xdrproc_t)xdr_gf1_cli_reset_vol_rsp);
+}
+
+
+ssize_t
+gf_xdr_from_cli_reset_vol_req (struct iovec outmsg, void *req)
+{
+ return xdr_serialize_generic (outmsg, (void *)req,
+ (xdrproc_t)xdr_gf1_cli_reset_vol_req);
+}
+
+ssize_t
gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp)
{
return xdr_serialize_generic (outmsg, (void *)rsp,
diff --git a/rpc/xdr/src/cli1.h b/rpc/xdr/src/cli1.h
index ee22540..8d9e167 100644
--- a/rpc/xdr/src/cli1.h
+++ b/rpc/xdr/src/cli1.h
@@ -174,6 +174,18 @@ ssize_t
gf_xdr_from_cli_replace_brick_req (struct iovec outmsg, void *req);
ssize_t
+gf_xdr_serialize_cli_reset_vol_rsp (struct iovec outmsg, void *rsp);
+
+ssize_t
+gf_xdr_to_cli_reset_vol_req (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_to_cli_reset_vol_rsp (struct iovec inmsg, void *args);
+
+ssize_t
+gf_xdr_from_cli_reset_vol_req (struct iovec outmsg, void *req);
+
+ssize_t
gf_xdr_serialize_cli_set_vol_rsp (struct iovec outmsg, void *rsp);
ssize_t
diff --git a/rpc/xdr/src/cli1.x b/rpc/xdr/src/cli1.x
index 31a9968..b43bc46 100644
--- a/rpc/xdr/src/cli1.x
+++ b/rpc/xdr/src/cli1.x
@@ -194,6 +194,20 @@ struct gf1_cli_get_vol_rsp {
string status<>;
} ;
+struct gf1_cli_reset_vol_req {
+ string volname<>;
+ opaque dict<>;
+} ;
+
+
+ struct gf1_cli_reset_vol_rsp {
+ int op_ret;
+ int op_errno;
+ string volname<>;
+ string op_errstr<>;
+} ;
+
+
struct gf1_cli_set_vol_req {
string volname<>;
@@ -205,6 +219,7 @@ struct gf1_cli_set_vol_req {
int op_ret;
int op_errno;
string volname<>;
+ opaque dict<>;
} ;
struct gf1_cli_log_filename_req {