summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2014-06-14 06:08:17 +0000
committerVijay Bellur <vbellur@redhat.com>2014-06-20 02:45:54 -0700
commit239a1dfca881d155811a170587fb00342765670f (patch)
tree49a82c2ee9f8b470d1e7218bcea7241bdd33d1b8 /xlators/cluster/dht/src
parentd01cd0ce5ade63476af48957ccd8761b4b02ac85 (diff)
protocol/server: send ENOENT instead of ESTALE for older clients
Modify protocol/server and storage/posix to send ENOENT to older clients instead of ESTALE http://goo.gl/t83hmL Change-Id: Ie63e91e73e33769ce9dc3d964938cfd6eb4c4be5 BUG: 1109832 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/8080 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index ed4babd328c..4c85cd3a807 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1451,6 +1451,14 @@ dht_lookup (call_frame_t *frame, xlator_t *this,
local->xattr_req = dict_new ();
}
+ /* Older (glusterfs 3.4) clients don't set this. If set, the server
+ * sends ESTALE when ENOENT occurs. */
+ ret = dict_set_int32 (local->xattr_req, "missing-gfid-ESTALE", 1);
+ if (ret < 0) {
+ gf_log (this->name, GF_LOG_DEBUG,
+ "%s: Unable to set dict value for missing-gfid-ESTALE",
+ loc->path);
+ }
if (uuid_is_null (loc->pargfid) && !uuid_is_null (loc->gfid) &&
!__is_root_gfid (loc->inode->gfid)) {
local->cached_subvol = NULL;