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

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

 



Emmanuel Dreyfus <manu@xxxxxxxxxx> 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
manu@xxxxxxxxxx



[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux