From 04b3a04b6dd497ea423cb725b5b4c8f05490dbdd Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Thu, 30 Apr 2015 13:28:44 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/10568 Tested-by: NetBSD Build System Reviewed-by: Kaleb KEITHLEY Tested-by: Gluster Build System --- rpc/xdr/src/glusterfs3.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'rpc') 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; -- cgit