summaryrefslogtreecommitdiffstats
path: root/xlators/protocol
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-04-14 04:03:36 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-04-30 05:11:31 -0700
commit664d2d243deb132dd5daad0280ae9fa2406ca26a (patch)
treebc0bfabc3dfe20cca9ab49d47971aff6df7c77d4 /xlators/protocol
parent2bf85951c6c25aa17acc591fabc3b3927b6dc82f (diff)
Upcall: Replaced opaque gfid with string in rpc cbk args
For GF_CBK_CACHE_INVALIDATION, have changed the type of gfid to be string (cannonical form) instead of opaque byte format to ensure correctness across platforms supporting different endianness. BUG: 1200262 Change-Id: Iac4372714f4b4ebcd9c4393aaf46ceba3f37f587 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/10224 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r--xlators/protocol/client/src/client-callback.c5
-rw-r--r--xlators/protocol/server/src/server.c2
2 files changed, 3 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client-callback.c b/xlators/protocol/client/src/client-callback.c
index 722db7d0f5f..78b9cef197d 100644
--- a/xlators/protocol/client/src/client-callback.c
+++ b/xlators/protocol/client/src/client-callback.c
@@ -49,7 +49,7 @@ client_cbk_cache_invalidation (struct rpc_clnt *rpc, void *mydata, void *data)
struct gf_upcall upcall_data = {0,};
uuid_t gfid;
struct gf_upcall_cache_invalidation ca_data = {0,};
- gfs3_cbk_cache_invalidation_req ca_req = {{0,},};
+ gfs3_cbk_cache_invalidation_req ca_req = {0,};
gf_log (THIS->name, GF_LOG_TRACE, "Upcall callback is called");
@@ -69,9 +69,8 @@ client_cbk_cache_invalidation (struct rpc_clnt *rpc, void *mydata, void *data)
upcall_data.data = &ca_data;
gf_proto_cache_invalidation_to_upcall (&ca_req, &upcall_data);
- memcpy (gfid, ca_req.gfid, 16);
gf_log (THIS->name, GF_LOG_TRACE, "Upcall gfid = %s, ret = %d",
- uuid_utoa (gfid), ret);
+ ca_req.gfid, ret);
default_notify (THIS, GF_EVENT_UPCALL, &upcall_data);
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c
index bdb9bae9cb6..a148646e215 100644
--- a/xlators/protocol/server/src/server.c
+++ b/xlators/protocol/server/src/server.c
@@ -1124,7 +1124,7 @@ server_process_event_upcall (xlator_t *this, void *data)
void *up_req = NULL;
rpc_transport_t *xprt = NULL;
enum gf_cbk_procnum cbk_procnum = GF_CBK_NULL;
- gfs3_cbk_cache_invalidation_req gf_c_req = {{0,},};
+ gfs3_cbk_cache_invalidation_req gf_c_req = {0,};
xdrproc_t xdrproc;
GF_VALIDATE_OR_GOTO(this->name, data, out);