summaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2015-04-30 13:28:44 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2015-05-05 06:57:43 -0700
commit170cc4ea08aa48e69c2df6be5841076c9a119d5a (patch)
treea1afb1e9efc19225a4f37a1cb08deb6b4aaffebf /rpc
parent08107796c89f5f201b24d689ab6757237c743c0d (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: 1200262 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/10460 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.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;