summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-02-16 11:47:58 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-03-17 14:01:21 -0700
commit2a4561ef08b8be3b7d79b951252e87ba8f987120 (patch)
treeed5cc0c87f6532b167ebb2b775389a9a391a3cf4 /rpc/xdr/src
parentd81182cf69a4f188f304fcce6d651ffd56b67aac (diff)
gfapi: APIs to store and process upcall notifications received
In case of any upcall cbk events received by the protocol/client, gfapi will be notified which queues them up in a list (<gfapi_cbk_upcall>). Applicatons are responsible to provide APIs to process & notify them in case of any such upcall events queued. Added a new API which will be used by Ganesha to repeatedly poll for any such upcall event notified (<glfs_h_poll_upcall>). A new test-file has been added to test the cache_invalidation upcall events. Below link has a writeup which explains the code changes done - URL: https://soumyakoduri.wordpress.com/2015/02/25/glusterfs-understanding-upcall-infrastructure-and-cache-invalidation-support/ Change-Id: Iafc6880000c865fd4da22d0cfc388ec135b5a1c5 BUG: 1200262 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/9536 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'rpc/xdr/src')
-rw-r--r--rpc/xdr/src/glusterfs3.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/rpc/xdr/src/glusterfs3.h b/rpc/xdr/src/glusterfs3.h
index b3ee267b64d..c2fa15f9e79 100644
--- a/rpc/xdr/src/glusterfs3.h
+++ b/rpc/xdr/src/glusterfs3.h
@@ -279,4 +279,17 @@ gf_proto_upcall_from_upcall (gfs3_upcall_req *gf_up_req,
gf_up_req->flags = gf_up_data->flags;
gf_up_req->expire_time_attr = gf_up_data->expire_time_attr;
}
+
+static inline void
+gf_proto_upcall_to_upcall (gfs3_upcall_req *gf_up_req,
+ struct gf_upcall *gf_up_data)
+{
+ if (!gf_up_req || !gf_up_data)
+ return;
+
+ memcpy (gf_up_data->gfid, gf_up_req->gfid, 16);
+ gf_up_data->event_type = gf_up_req->event_type;
+ gf_up_data->flags = gf_up_req->flags;
+ gf_up_data->expire_time_attr = gf_up_req->expire_time_attr;
+}
#endif /* !_GLUSTERFS3_H */