summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client-protocol.c
diff options
context:
space:
mode:
authorAnand Avati <avati@dev.gluster.com>2009-10-09 10:02:41 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-09 08:42:38 -0700
commitda5cf2d0209eadda7b6350205206e19253882edd (patch)
treefaa7ef0da76e88cbde55e7147513223a07cfc303 /xlators/protocol/client/src/client-protocol.c
parentb0f456cdd55ebfa0498db75157b544ad88904d03 (diff)
fail revalidate properly
fail revalidate calls if inoode number has changed for the basename at the server side. This is a temporary workaround for most of the cases till inode-gen is merged Avati Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 112 (parallel deletion of files mounted by different clients on the same back-end hangs and/or does not completely delete) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=112
Diffstat (limited to 'xlators/protocol/client/src/client-protocol.c')
-rw-r--r--xlators/protocol/client/src/client-protocol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-protocol.c b/xlators/protocol/client/src/client-protocol.c
index abf365e9d..bca6012b7 100644
--- a/xlators/protocol/client/src/client-protocol.c
+++ b/xlators/protocol/client/src/client-protocol.c
@@ -4902,7 +4902,7 @@ client_lookup_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen,
ret = inode_ctx_get (inode, frame->this, &oldino);
if (oldino != stbuf.st_ino) {
- if (oldino)
+ if (oldino) {
gf_log (frame->this->name, GF_LOG_DEBUG,
"LOOKUP %"PRId64"/%s (%s): "
"inode number changed from "
@@ -4911,6 +4911,9 @@ client_lookup_cbk (call_frame_t *frame, gf_hdr_common_t *hdr, size_t hdrlen,
local->loc.name,
local->loc.path,
oldino, stbuf.st_ino);
+ op_errno = ESTALE;
+ goto fail;
+ }
ret = inode_ctx_put (inode, frame->this,
stbuf.st_ino);