summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2016-11-08 10:32:29 +0530
committerRajesh Joseph <rjoseph@redhat.com>2016-12-02 02:46:58 -0800
commit4536f7bdf16f8286d67598eda9a46c029f0c0bf4 (patch)
tree5e62c0cc93c5ab941a83ac43b90530aed5243856 /rpc/xdr/src
parent91e72a0f2e4e51ce20550946578a6d50cbb88e26 (diff)
dht/md-cache: Filter invalidate if the file is made a linkto file
Upcall as a part of setattr, sends an invalidation and the invalidation carries the resulting stat value. When a file is converted to linkto files, even then an invalidation is set and as a result the mountpoint shows the sticky bit in the stat of the file. eg: ---------T. 945 root root 0 Nov 8 10:14 hardlink.999 Fix: When dht recieves a notification of sticky bit change, it updates the flag, to indicate md-cache to send the subsequent lookup. Change-Id: Ic2fd7a5b196db0754f9b97072e644e6bf69da606 BUG: 1392713 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15789 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'rpc/xdr/src')
-rw-r--r--rpc/xdr/src/glusterfs3.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/rpc/xdr/src/glusterfs3.h b/rpc/xdr/src/glusterfs3.h
index e95252a73be..b74ab933800 100644
--- a/rpc/xdr/src/glusterfs3.h
+++ b/rpc/xdr/src/glusterfs3.h
@@ -410,8 +410,16 @@ gf_proto_cache_invalidation_to_upcall (xlator_t *this,
(gf_c_req->xdata).xdata_val,
(gf_c_req->xdata).xdata_len, ret,
ret, out);
- if (ret > 0)
+ if (ret > 0) {
ret = -ret;
+ goto out;
+ }
+
+ /* If no dict was sent, create an empty dict, so that each xlator
+ * need not check if empty then create new dict. Will be unref'd by the
+ * caller */
+ if (!gf_c_data->dict)
+ gf_c_data->dict = dict_new ();
out:
return ret;
}