From 65fd47ca8fde790eb1a78f4c4231097a505a67c3 Mon Sep 17 00:00:00 2001 From: Soumya Koduri Date: Wed, 29 Apr 2015 08:05:21 +0530 Subject: rpc: Included necessary stats in 'gfs3_cbk_cache_invalidation_req' To avoid extra network fops, it will benifit clients if the server can send the updated stat of the file/dir and of the parent directory (including oldparent in case of RENAME fop) while sending GF_CBK_CACHE_INVALIDATION upcall event. This patch handles rpc protocol changes. Change-Id: Ic096a61c4d24a8d75a8285be78deb237d7ef9484 BUG: 1217711 Signed-off-by: Soumya Koduri Reviewed-on: http://review.gluster.org/10452 Reviewed-by: Kaleb KEITHLEY Reviewed-on: http://review.gluster.org/10567 Tested-by: Gluster Build System Tested-by: NetBSD Build System --- rpc/xdr/src/glusterfs3-xdr.x | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'rpc/xdr') diff --git a/rpc/xdr/src/glusterfs3-xdr.x b/rpc/xdr/src/glusterfs3-xdr.x index 5304a26da3a..4d7ec5e8b18 100644 --- a/rpc/xdr/src/glusterfs3-xdr.x +++ b/rpc/xdr/src/glusterfs3-xdr.x @@ -50,6 +50,12 @@ struct gfs3_cbk_cache_invalidation_req { unsigned int flags; /* or mask of events incase of inotify */ unsigned int expire_time_attr; /* the amount of time which client * can cache this entry */ + struct gf_iatt stat; /* Updated/current stat of the file/dir */ + struct gf_iatt parent_stat; /* Updated stat of the parent dir + * needed in case of create, mkdir, + * unlink, rmdir, rename fops */ + struct gf_iatt oldparent_stat; /* Updated stat of the oldparent dir + needed in case of rename fop */ opaque xdata<>; /* Extra data */ }; -- cgit