summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-04-30 13:28:44 +0530
committerVijay Bellur <vbellur@redhat.com>2015-05-07 04:23:28 -0700
commit04b3a04b6dd497ea423cb725b5b4c8f05490dbdd (patch)
tree80cad6eaa198f55215782f3b51ac77c96190512e /rpc
parent65fd47ca8fde790eb1a78f4c4231097a505a67c3 (diff)
Upcall: Send stat as part of cache_invalidation notifications
Have added support to send attributes of both entries and its parent (include oldparent in case of RENAME fop) in the same notification request to avoid multiple rpc requests. Also, made changes in gfapi to send parent object and its attributes changed in a single upcall event. Change-Id: I92833da3bcec38d65216921c2ce4d10367c32ef1 BUG: 1217711 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/10568 Tested-by: NetBSD Build System Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'rpc')
-rw-r--r--rpc/xdr/src/glusterfs3.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/rpc/xdr/src/glusterfs3.h b/rpc/xdr/src/glusterfs3.h
index 6808064cb95..e50bd9e6c59 100644
--- a/rpc/xdr/src/glusterfs3.h
+++ b/rpc/xdr/src/glusterfs3.h
@@ -16,6 +16,8 @@
#include "xdr-generic.h"
#include "glusterfs3-xdr.h"
#include "iatt.h"
+#include "protocol-common.h"
+#include "upcall-utils.h"
#define xdr_decoded_remaining_addr(xdr) ((&xdr)->x_private)
#define xdr_decoded_remaining_len(xdr) ((&xdr)->x_handy)
@@ -289,6 +291,9 @@ gf_proto_cache_invalidation_from_upcall (gfs3_cbk_cache_invalidation_req *gf_c_r
gf_c_req->event_type = gf_up_data->event_type;
gf_c_req->flags = gf_c_data->flags;
gf_c_req->expire_time_attr = gf_c_data->expire_time_attr;
+ gf_stat_from_iatt (&gf_c_req->stat, &gf_c_data->stat);
+ gf_stat_from_iatt (&gf_c_req->parent_stat, &gf_c_data->p_stat);
+ gf_stat_from_iatt (&gf_c_req->oldparent_stat, &gf_c_data->oldp_stat);
out:
return;
@@ -319,6 +324,9 @@ gf_proto_cache_invalidation_to_upcall (gfs3_cbk_cache_invalidation_req *gf_c_req
gf_c_data->flags = gf_c_req->flags;
gf_c_data->expire_time_attr = gf_c_req->expire_time_attr;
+ gf_stat_to_iatt (&gf_c_req->stat, &gf_c_data->stat);
+ gf_stat_to_iatt (&gf_c_req->parent_stat, &gf_c_data->p_stat);
+ gf_stat_to_iatt (&gf_c_req->oldparent_stat, &gf_c_data->oldp_stat);
out:
return;