summaryrefslogtreecommitdiffstats
path: root/rpc/xdr
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2011-09-16 10:40:32 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-22 09:43:25 -0700
commit4765dd1a1c51c67ab86687fbd871c89156680c34 (patch)
treed1d3890457cbcb01131d21f66e40ec8a1c537cf1 /rpc/xdr
parent53b5da6dfab2e6b11ab2e40119e92ff7d4527b2c (diff)
glusterd: Implemented cmd to trigger self-heal on a replicate volume.v3.3.0qa10
This cmd is used in the context of proactive self-heal for replicated volumes. User invokes the following cmd when (s)he suspects that self-heal needs to be done on a particular volume, gluster volume heal <VOLNAME>. Change-Id: I3954353b53488c28b70406e261808239b44997f3 BUG: 3602 Reviewed-on: http://review.gluster.com/454 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'rpc/xdr')
-rw-r--r--rpc/xdr/src/cli1-xdr.c30
-rw-r--r--rpc/xdr/src/cli1-xdr.h21
-rw-r--r--rpc/xdr/src/cli1-xdr.x12
3 files changed, 63 insertions, 0 deletions
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index 25ab32a8fe9..1240dda8bf5 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -1068,3 +1068,33 @@ xdr_gf1_cli_umount_rsp (XDR *xdrs, gf1_cli_umount_rsp *objp)
return FALSE;
return TRUE;
}
+
+bool_t
+xdr_gf1_cli_heal_vol_req (XDR *xdrs, gf1_cli_heal_vol_req *objp)
+{
+ register int32_t *buf;
+ buf = NULL;
+
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_heal_vol_rsp (XDR *xdrs, gf1_cli_heal_vol_rsp *objp)
+{
+ register int32_t *buf;
+ buf = NULL;
+
+ 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;
+ 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 4077ff3c11b..f22c635f176 100644
--- a/rpc/xdr/src/cli1-xdr.h
+++ b/rpc/xdr/src/cli1-xdr.h
@@ -614,6 +614,23 @@ struct gf1_cli_umount_rsp {
};
typedef struct gf1_cli_umount_rsp gf1_cli_umount_rsp;
+struct gf1_cli_heal_vol_req {
+ char *volname;
+};
+typedef struct gf1_cli_heal_vol_req gf1_cli_heal_vol_req;
+
+struct gf1_cli_heal_vol_rsp {
+ int op_ret;
+ int op_errno;
+ char *volname;
+ char *op_errstr;
+ struct {
+ u_int dict_len;
+ char *dict_val;
+ } dict;
+};
+typedef struct gf1_cli_heal_vol_rsp gf1_cli_heal_vol_rsp;
+
/* the xdr functions */
#if defined(__STDC__) || defined(__cplusplus)
@@ -687,6 +704,8 @@ extern bool_t xdr_gf1_cli_mount_req (XDR *, gf1_cli_mount_req*);
extern bool_t xdr_gf1_cli_mount_rsp (XDR *, gf1_cli_mount_rsp*);
extern bool_t xdr_gf1_cli_umount_req (XDR *, gf1_cli_umount_req*);
extern bool_t xdr_gf1_cli_umount_rsp (XDR *, gf1_cli_umount_rsp*);
+extern bool_t xdr_gf1_cli_heal_vol_req (XDR *, gf1_cli_heal_vol_req*);
+extern bool_t xdr_gf1_cli_heal_vol_rsp (XDR *, gf1_cli_heal_vol_rsp*);
#else /* K&R C */
extern bool_t xdr_gf_cli_defrag_type ();
@@ -759,6 +778,8 @@ extern bool_t xdr_gf1_cli_mount_req ();
extern bool_t xdr_gf1_cli_mount_rsp ();
extern bool_t xdr_gf1_cli_umount_req ();
extern bool_t xdr_gf1_cli_umount_rsp ();
+extern bool_t xdr_gf1_cli_heal_vol_req ();
+extern bool_t xdr_gf1_cli_heal_vol_rsp ();
#endif /* K&R C */
diff --git a/rpc/xdr/src/cli1-xdr.x b/rpc/xdr/src/cli1-xdr.x
index 2a6168c0456..9a1f77c0ef7 100644
--- a/rpc/xdr/src/cli1-xdr.x
+++ b/rpc/xdr/src/cli1-xdr.x
@@ -455,3 +455,15 @@ struct gf1_cli_umount_rsp {
int op_ret;
int op_errno;
};
+
+struct gf1_cli_heal_vol_req {
+ string volname<>;
+} ;
+
+struct gf1_cli_heal_vol_rsp {
+ int op_ret;
+ int op_errno;
+ string volname<>;
+ string op_errstr<>;
+ opaque dict<>;
+} ;