gluster-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gluster-devel] [PATCH] Re: Stale NFS file handle, then EINVAL


From: Emmanuel Dreyfus
Subject: [Gluster-devel] [PATCH] Re: Stale NFS file handle, then EINVAL
Date: Fri, 22 Jul 2011 06:59:32 +0200
User-agent: MacSOUP/2.7 (unregistered for 1644 days)

Emmanuel Dreyfus <address@hidden> wrote:

> As I understand, on READDIR the glusterfs server reports the gfid of the
> shadow linkto file to the client, and subsequent file usage will report the
> correct gfid, leading to the mismatch.
> 
> You suggest that the FUSE implementation should filter out ESTALE by inssuing
> another LOOKUP? I can implement this, but I have trouble to understand why you
> have a bug report on this problem if Linux FUSE does that.

Here is a patch against 3.2.1 that fixes the problem for me. I do not master the
thing enough to evaluate potential side effects. What do you think?

--- xlators/protocol/client/srcclient3_1-fops.c.orig
+++ xlators/protocol/client/srcclient3_1-fops.c
@@ -2208,13 +2208,11 @@
         }
 
         if ((!uuid_is_null (inode->gfid))
             && (uuid_compare (stbuf.ia_gfid, inode->gfid) != 0)) {
-                gf_log (frame->this->name, GF_LOG_DEBUG,
+                gf_log (frame->this->name, GF_LOG_WARNING,
                         "gfid changed for %s", local->loc.path);
-                rsp.op_ret = -1;
-                op_errno = ESTALE;
-                goto out;
+               memcpy(&stbuf.ia_gfid, &inode->gfid, sizeof(inode->gfid));
         }
 
         rsp.op_ret = 0;
 


-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]