From da5cf2d0209eadda7b6350205206e19253882edd Mon Sep 17 00:00:00 2001 From: Anand Avati Date: Fri, 9 Oct 2009 10:02:41 +0000 Subject: 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 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 --- xlators/protocol/client/src/client-protocol.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'xlators/protocol/client') 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); -- cgit