summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/glusterfs3-xdr.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2012-04-24 10:27:18 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-25 04:05:35 -0700
commit8f2eba00fd315b42aeaa01d683b765fbd2ee111b (patch)
tree18ef5e7b1aa828fce4e2a2c8fa1dfdc54e8d35c0 /rpc/xdr/src/glusterfs3-xdr.c
parent3f35280a364bd35293d3e5804eb2a659a7f174b1 (diff)
rebalance: handshake_event_notify to make fsd talk to glusterd
Event_notify can be used by others to communicate with glusterd. A cbk event is also added for future use. req has a op, and dict. rsp has op_ret, op_errno, and dict. With this, rebalance process can update the status before exiting. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: If5c0ec00514eb3a109a790b2ea273317611e4562 BUG: 807126 Reviewed-on: http://review.gluster.com/3013 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'rpc/xdr/src/glusterfs3-xdr.c')
-rw-r--r--rpc/xdr/src/glusterfs3-xdr.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/rpc/xdr/src/glusterfs3-xdr.c b/rpc/xdr/src/glusterfs3-xdr.c
index 5dffda3e0..dd8281ee2 100644
--- a/rpc/xdr/src/glusterfs3-xdr.c
+++ b/rpc/xdr/src/glusterfs3-xdr.c
@@ -1892,3 +1892,31 @@ xdr_gf_set_lk_ver_req (XDR *xdrs, gf_set_lk_ver_req *objp)
return FALSE;
return TRUE;
}
+
+bool_t
+xdr_gf_event_notify_req (XDR *xdrs, gf_event_notify_req *objp)
+{
+ register int32_t *buf;
+ buf = NULL;
+
+ if (!xdr_int (xdrs, &objp->op))
+ 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_gf_event_notify_rsp (XDR *xdrs, gf_event_notify_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_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
+ return TRUE;
+}