diff options
author | Poornima G <pgurusid@redhat.com> | 2015-12-16 05:45:03 -0500 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2016-05-19 02:28:07 -0700 |
commit | 8facd588f20ef8305b6f6b53da0f6d54d300093b (patch) | |
tree | 066a5c1d7f7bf4c56685be859ca5c256e4d8c1e8 /xlators/protocol/client/src/client-callback.c | |
parent | 005d18a623dc49397e2a83a7fb80607ae0a9aed9 (diff) |
upcall: pass dict with xattrs on xattr invalidation
In case of xattr invalidation, return a dict containing
the updated xattrs.
[ndevos: move chunks to change 12995 and only address the xattrs-dict here]
Change-Id: I8733f06a519a9a0f24be1bb4b2c38c9c9dce0ce2
BUG: 1211863
Signed-off-by: Poornima G <pgurusid@redhat.com>
Reviewed-on: http://review.gluster.org/12996
Smoke: Gluster Build System <jenkins@build.gluster.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Reviewed-by: soumya k <skoduri@redhat.com>
Tested-by: soumya k <skoduri@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client-callback.c')
-rw-r--r-- | xlators/protocol/client/src/client-callback.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xlators/protocol/client/src/client-callback.c b/xlators/protocol/client/src/client-callback.c index 4935ef5de7c..bedc8f6ec2b 100644 --- a/xlators/protocol/client/src/client-callback.c +++ b/xlators/protocol/client/src/client-callback.c @@ -103,10 +103,13 @@ 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); + ret = gf_proto_cache_invalidation_to_upcall (THIS, &ca_req, + &upcall_data); + if (ret < 0) + goto out; - gf_msg_trace (THIS->name, 0, "Upcall gfid = %s, ret = %d", - ca_req.gfid, ret); + gf_msg_trace (THIS->name, 0, "Cache invalidation cbk recieved for gfid:" + " %s, ret = %d", ca_req.gfid, ret); default_notify (THIS, GF_EVENT_UPCALL, &upcall_data); @@ -117,6 +120,9 @@ out: if (ca_req.xdata.xdata_val) free (ca_req.xdata.xdata_val); + if (ca_data.dict) + dict_unref (ca_data.dict); + return 0; } |